sauceclient Module

Sauce Labs REST API client

Copyright (c) 2013-2017 Corey Goldberg

This file is part of: sauceclient https://github.com/cgoldberg/sauceclient

License: Apache Version 2.0 http://www.apache.org/licenses/LICENSE-2.0

Sauce Labs REST API documentation: http://saucelabs.com/docs/rest

class sauceclient.Account(client)[source]

Account Methods

These methods provide user account information and management. - https://wiki.saucelabs.com/display/DOCS/Account+Methods

change_access_key()[source]

Change access key of your account.

create_user(username, password, name, email)[source]

Create a sub account.

get_activity()[source]

Check account concurrency limits.

get_concurrency()[source]

Check account concurrency limits.

get_siblings()[source]

Get a list of sibling accounts associated with provided account.

get_subaccount_info()[source]

Get information about a sub account.

get_subaccounts()[source]

Get a list of sub accounts associated with a parent account.

get_usage(start=None, end=None)[source]

Access historical account usage data.

get_user()[source]

Access basic account information.

class sauceclient.Analytics(client)[source]

Analytics Methods

These methods provide user account information and management. - https://wiki.saucelabs.com/display/DOCS/Analytics+Methods

get_concurrency(start=None, end=None, interval=None, time_range=None, scope=None, owner=None, status=None, pretty=False)[source]
get_tests(start=None, end=None, size=None, time_range=None, scope=None, owner=None, status=None, pretty=False, error=None, build=None, skip=None, missing_build=False)[source]
class sauceclient.Information(client)[source]

Information Methods

Information resources are publicly available data about Sauce Lab’s service. - https://wiki.saucelabs.com/display/DOCS/Information+Methods

get_appium_eol_dates()[source]

Get a list of Appium end-of-life dates. Dates are displayed in Unix time.

get_platforms(automation_api='all')[source]

Get a list of objects describing all the OS and browser platforms currently supported on Sauce Labs.

get_status()[source]

Get the current status of Sauce Labs services.

class sauceclient.JavaScriptTests(client)[source]

JavaScript Unit Testing Methods

js_tests(platforms, url, framework)[source]

Start your JavaScript unit tests on as many browsers as you like with a single request.

js_tests_status(js_tests)[source]

Get the status of your JS unit tests.

class sauceclient.Jobs(client)[source]

Job Methods

delete_job(job_id)[source]

Removes the job from the system with all the linked assets.

delete_job_assets(job_id)[source]

Delete all the assets captured during a test run.

get_auth_token(job_id, date_range=None)[source]

Get an auth token to access protected job resources.

https://wiki.saucelabs.com/display/DOCS/Building+Links+to+Test+Results

get_job(job_id)[source]

Retreive a single job.

get_job_asset_url(job_id, filename)[source]

Get details about the static assets collected for a specific job.

get_job_assets(job_id)[source]

Get details about the static assets collected for a specific job.

get_jobs(full=None, limit=None, skip=None, start=None, end=None, output_format=None)[source]

List jobs belonging to a specific user.

stop_job(job_id)[source]

Terminates a running job.

update_job(job_id, build=None, custom_data=None, name=None, passed=None, public=None, tags=None)[source]

Edit an existing job.

class sauceclient.SauceClient(sauce_username=None, sauce_access_key=None, apibase=None)[source]

SauceClient class.

get_auth_string()[source]

Create auth string from credentials.

make_auth_headers(content_type)[source]

Add authorization header.

make_headers(content_type='application/json')[source]

Create content-type header.

request(method, url, body=None, content_type='application/json')[source]

Send http request.

exception sauceclient.SauceException(*args, **kwargs)[source]

SauceClient exception.

class sauceclient.Storage(client)[source]

Temporary Storage Methods

get_stored_files()[source]

Check which files are in your temporary storage.

upload_file(filepath, overwrite=True)[source]

Uploads a file to the temporary sauce storage.

class sauceclient.Tunnels(client)[source]

Tunnel Methods

delete_tunnel(tunnel_id)[source]

Get information for a tunnel given its ID.

get_tunnel(tunnel_id)[source]

Get information for a tunnel given its ID.

get_tunnels()[source]

Retrieves all running tunnels for a specific user.