Sauce Storage is a private temporary storage space. Files uploaded will expire seven days after upload, and be removed. If it has been over seven days since you uploaded your application to Sauce Storage, you will need to upload it again. You can upload the application you want to test to Sauce Storage using our REST API, and then access it for testing by specifying sauce-storage:myapp
for the app
capability in your test script. You upload apps using the upload_file
method of the Sauce Labs REST API.
You can use any REST client; cURL is a convenient command-line option.
US-WEST Data Center
$ curl -u $SAUCE_USERNAME:$SAUCE_ACCESS_KEY -X POST -H "Content-Type: application/octet-stream" \ "https://saucelabs.com/rest/v1/storage/$SAUCE_USERNAME/$APP_NAME?overwrite=true" --data-binary @path/to/your_file_name
> curl -u %SAUCE_USERNAME%:%SAUCE_ACCESS_KEY% -X POST -H "Content-Type: application/octet-stream" \ "https://saucelabs.com/rest/v1/storage/%SAUCE_USERNAME%/%APP_NAME%?overwrite=true" --data-binary @path\to\your_file_name
US-EAST Data Center
$ curl -u $SAUCE_USERNAME:$SAUCE_ACCESS_KEY -X POST -H "Content-Type: application/octet-stream" \ "https://us-east-1.saucelabs.com/rest/v1/storage/$SAUCE_USERNAME/$APP_NAME?overwrite=true" --data-binary @path/to/your_file_name
> curl -u %SAUCE_USERNAME%:%SAUCE_ACCESS_KEY% -X POST -H "Content-Type: application/octet-stream" \ "https://us-east-1.saucelabs.com/rest/v1/storage/%SAUCE_USERNAME%/%APP_NAME%?overwrite=true" --data-binary @path\to\your_file_name
EU Data Center
$ curl -u $SAUCE_USERNAME:$SAUCE_ACCESS_KEY -X POST -H "Content-Type: application/octet-stream" \ "https://eu-central-1.saucelabs.com/rest/v1/storage/$SAUCE_USERNAME/$APP_NAME?overwrite=true" --data-binary @path/to/your_file_name
> curl -u %SAUCE_USERNAME%:%SAUCE_ACCESS_KEY% -X POST -H "Content-Type: application/octet-stream" \ "https://eu-central-1.saucelabs.com/rest/v1/storage/%SAUCE_USERNAME%/%APP_NAME%?overwrite=true" --data-binary @path\to\your_file_name
Uploading with cURL
If you're using cURL for the upload, you must include the @
before path/to/your_file_name
Uploading Other Test Assets to Sauce Storage (Browsers Tests Only)
When testing on desktop browsers, you can also use Sauce Storage for other assets that you want to use in your automated tests, such as pre-run executables.