Media API
BrowserStack provides support for uploading your own files for testing
It’s easy to test scenarios that require device to be setup with sample media/non-media files, so that it’s available to your application during test execution.
How to use the files in tests
- Before starting test execution on BrowserStack, you first need to upload your files using REST API. The REST API response will return a
media_url
for each successful file upload. - Set
media_url
value depending on the automation framework you are using:-
Appium: Set value in
browserstack.uploadMedia
capability in your script.
Learn more about uploading your own files in Appium
Learn more about uploading your own contacts in Appium
-
Espresso: Set value in
uploadMedia
parameter in the REST API request to start Espresso test execution.
Learn more about uploading your own files in Espresso
Learn more about uploading your own contacts in Espresso
-
XCUITest: Set value in
uploadMedia
parameter in the REST API request to start XCUI test execution.
Learn more about uploading your own files in XCUITest
Learn more about uploading your own contacts in XCUITest
-
Appium: Set value in
Note:
- Only 5 files are allowed per test
- Supported format for images are JPG, JPEG, PNG, GIF, BMP and maximum file size allowed for images is 10MB
- Supported format for videos are .mp4, .mov and .3gp and maximum file size allowed for videos is 50MB
- Supported format for non-media files are XLS, XLSX, DOC, DOCX, PDF, CSV, TXT and maximum file size allowed is 15MB
- Supported format for contacts is .vcf and maximum file size allowed is 2MB
- Files are stored on BrowserStack servers for at most 30 days.
We're sorry to hear that. Please share your feedback so we can do better
Contact our Support team for immediate help while we work on improving our docs.