private void printPublicJobLink(String sessionId) { if (verboseMode) { String authLink = this.sauceREST.getPublicJobLink(sessionId); // String authLink = "test"; System.out.println("Job link: " + authLink); } }
private void printPublicJobLink(String sessionId) { if (verboseMode) { String authLink = this.sauceREST.getPublicJobLink(sessionId); // String authLink = "test"; System.out.println("Job link: " + authLink); } }
@Override public void close() { if(!failed) { String sessionId = remoteWebDriver.getSessionId().toString(); Map<String, Object> updates = new HashMap<String, Object>(); updates.put("passed", true); Utils.addBuildNumberToUpdate(updates); this.sauceREST.updateJobInfo(sessionId, updates); String authLink = this.sauceREST.getPublicJobLink(sessionId); System.out.println("Job link: " + authLink); } } }
/** * Invoked if the unit test either throws an error or fails. Invokes the Sauce REST API to mark the Sauce Job * as 'failed'. * * @param e not used * @param description not used */ protected void failed(Throwable e, Description description) { if (sessionIdProvider != null && sessionIdProvider.getSessionId() != null) { printSessionId(description); Map<String, Object> updates = new HashMap<String, Object>(); updates.put("passed", false); Utils.addBuildNumberToUpdate(updates); sauceREST.updateJobInfo(sessionIdProvider.getSessionId(), updates); if (verboseMode) { // get, and print to StdOut, the link to the job String authLink = sauceREST.getPublicJobLink(sessionIdProvider.getSessionId()); System.out.println("Job link: " + authLink); } } }
/** * Invoked if the unit test either throws an error or fails. Invokes the Sauce REST API to mark the Sauce Job * as 'failed'. * * @param e not used * @param description not used */ protected void failed(Throwable e, Description description) { if (sessionIdProvider != null && sessionIdProvider.getSessionId() != null) { printSessionId(description); Map<String, Object> updates = new HashMap<String, Object>(); updates.put("passed", false); Utils.addBuildNumberToUpdate(updates); sauceREST.updateJobInfo(sessionIdProvider.getSessionId(), updates); if (verboseMode) { // get, and print to StdOut, the link to the job String authLink = sauceREST.getPublicJobLink(sessionIdProvider.getSessionId()); System.out.println("Job link: " + authLink); } } }