public class SauceREST extends Object
| Modifier and Type | Field and Description |
|---|---|
protected String |
accessKey |
protected String |
username |
| Constructor and Description |
|---|
SauceREST(String username,
String accessKey)
Constructs a SauceREST object with all necessary authentication information.
|
| Modifier and Type | Method and Description |
|---|---|
org.json.simple.JSONObject |
deleteTunnel(String tunnelId) |
org.json.simple.JSONObject |
getAccountDetails()
Returns details for a given Sauce Labs account, including minutes used.
|
org.json.simple.JSONArray |
getAllJobs()
Gets a list of all jobs ever for the user, not just current jobs.
|
org.json.simple.JSONArray |
getAllTunnels() |
org.json.simple.JSONObject |
getJobStatus(String jobId)
Returns status details for a given job, including pass/fail and
all tags.
|
org.json.simple.JSONArray |
getSauceBrowsers()
Gets a list of all currently supported browser/os combinations.
|
org.json.simple.JSONObject |
getSauceStatus()
Not currently supported by Sauce Labs, but will one day return status of Sauce Labs services.
|
org.json.simple.JSONObject |
getTunnelStatus(String tunnelId) |
org.json.simple.JSONObject |
getUsageData()
Returns detailed usage data for the Sauce Labs account, including minutes
used on a daily basis.
|
boolean |
isTunnelPresent()
Verifies that one or more tunnels exist (but does not check tunnel state).
|
org.json.simple.JSONObject |
jobFailed(String jobId)
Marks a job as failed; will appear as such in jobs list in Sauce Labs.
|
org.json.simple.JSONObject |
jobPassed(String jobId)
Marks a job as passed; will appear as such in jobs list in Sauce Labs.
|
Object |
sendRestRequest(SauceRESTRequest request)
Send a request to Sauce Labs configured using a SauceRESTRequest object.
|
org.json.simple.JSONObject |
stopJob(String jobId)
Stop a currently running job.
|
org.json.simple.JSONObject |
updateJob(String jobId,
String jsonKey,
Object jsonValue)
Updates a job in Sauce Labs with an arbitrary JSON key/value pair.
|
public org.json.simple.JSONObject getAccountDetails()
public org.json.simple.JSONObject getUsageData()
public org.json.simple.JSONArray getAllJobs()
public org.json.simple.JSONObject getJobStatus(String jobId)
jobId - The session id for a Sauce job.public org.json.simple.JSONObject jobPassed(String jobId)
jobId - The session id for the Sauce Job that passed.public org.json.simple.JSONObject jobFailed(String jobId)
jobId - The session id for the Sauce Job that failed.public org.json.simple.JSONObject updateJob(String jobId, String jsonKey, Object jsonValue)
jobId - The session id for the Sauce job to update.jsonKey - A String key for the json object.jsonValue - A value for the json object (discrete, a list, or a map, for instance).public org.json.simple.JSONObject stopJob(String jobId)
jobId - The session id for the Sauce job to update.public boolean isTunnelPresent()
public org.json.simple.JSONArray getAllTunnels()
public org.json.simple.JSONObject getTunnelStatus(String tunnelId)
public org.json.simple.JSONObject deleteTunnel(String tunnelId)
public org.json.simple.JSONObject getSauceStatus()
public org.json.simple.JSONArray getSauceBrowsers()
public Object sendRestRequest(SauceRESTRequest request)
request - An object containing all details for the REST request.Copyright © 2015 Dev9, LLC.. All rights reserved.