/** * Marks a Sauce Job as 'failed'. * * @param jobId the Sauce Job Id, typically equal to the Selenium/WebDriver sessionId */ public void jobFailed(String jobId) { Map<String, Object> updates = new HashMap<>(); updates.put("passed", false); updateJobInfo(jobId, updates); }
/** * Marks a Sauce Job as 'passed'. * * @param jobId the Sauce Job Id, typically equal to the Selenium/WebDriver sessionId */ public void jobPassed(String jobId) { Map<String, Object> updates = new HashMap<>(); updates.put("passed", true); updateJobInfo(jobId, updates); }
private void markJobStatus(String sessionId, boolean passed) { try { Map<String, Object> updates = new HashMap<String, Object>(); updates.put("passed", passed); //Utils.addBuildNumberToUpdate(updates); sauceREST.updateJobInfo(sessionId, updates); } catch (Exception e) { e.printStackTrace(); } }
/** * Marks a Sauce Job as 'passed'. * * @param jobId the Sauce Job Id, typically equal to the Selenium/WebDriver sessionId */ public void jobPassed(String jobId) { Map<String, Object> updates = new HashMap<>(); updates.put("passed", true); updateJobInfo(jobId, updates); }
/** * Marks a Sauce Job as 'failed'. * * @param jobId the Sauce Job Id, typically equal to the Selenium/WebDriver sessionId */ public void jobFailed(String jobId) { Map<String, Object> updates = new HashMap<>(); updates.put("passed", false); updateJobInfo(jobId, updates); }
private void markJobStatus(String sessionId, boolean passed) { try { Map<String, Object> updates = new HashMap<String, Object>(); updates.put("passed", passed); //Utils.addBuildNumberToUpdate(updates); sauceREST.updateJobInfo(sessionId, updates); } catch (Exception e) { e.printStackTrace(); } }
public static void updateJobName(SauceOnDemandSessionIdProvider sessionIdProvider, String name) { client.updateJobInfo( sessionIdProvider.getSessionId(), ImmutableMap.of("name", name)); }
public void fail() { if(failed) { return; } String sessionId = remoteWebDriver.getSessionId().toString(); Map<String, Object> updates = new HashMap<String, Object>(); updates.put("passed", false); Utils.addBuildNumberToUpdate(updates); this.sauceREST.updateJobInfo(sessionId, updates); failed = true; }
@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 passes without error or failure. Invokes the Sauce REST API to mark the Sauce Job * as 'passed'. * * @param description not used */ protected void succeeded(Description description) { if (sessionIdProvider.getSessionId() != null) { //log the session id to the system out printSessionId(description); Map<String, Object> updates = new HashMap<String, Object>(); updates.put("passed", true); Utils.addBuildNumberToUpdate(updates); sauceREST.updateJobInfo(sessionIdProvider.getSessionId(), updates); } }
/** * Invoked if the unit test passes without error or failure. Invokes the Sauce REST API to mark the Sauce Job * as 'passed'. * * @param description not used */ protected void succeeded(Description description) { if (sessionIdProvider.getSessionId() != null) { //log the session id to the system out printSessionId(description); Map<String, Object> updates = new HashMap<String, Object>(); updates.put("passed", true); Utils.addBuildNumberToUpdate(updates); sauceREST.updateJobInfo(sessionIdProvider.getSessionId(), updates); } }
/** * 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); } } }