Media API
BrowserStack provides support for the uploading media files for testing
Its easy to test scenarios that require device to be setup with sample media, so that it’s available to your application during test execution.
How to use the media files in tests
- Before starting test execution on BrowserStack, you first need to upload the media 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 media files in Appium -
Espresso: Set value in
uploadMedia
parameter in the REST API request to start Espresso test execution. Learn more about uploading your own media files in Expresso -
XCUITest: Set value in
uploadMedia
parameter in the REST API request to start XCUI test execution. Learn more about uploading your own media files 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
Note: Custom media feature is currently not supported on iOS 13+ devices.
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.