Skip to main content
Check out our new courses about Mobile Testing with BrowserStack App Automate on Test University!

Device reservation workflow

The device reservation workflow is an optimization that can help provide better performance by reducing overall test execution time on BrowserStack App Automate. In this guide, you will learn about :

  1. What is device reservation workflow?

  2. How to get started?

  3. Frequently Asked Questions (FAQs)

1. What is device reservation workflow ?

By default, for every new Appium test session, BrowserStack assigns a pristine device that provides a consistent state for every test run and helps reduce test flakiness. In addition, upon completion of a test session, the device undergoes an extensive cleanup process to ensure security before the device is sent back to the common device pool.

The device reservation workflow is an optional optimization that can be enabled to improve your test execution performance while providing the same level of test stability and security. In this workflow, BrowserStack lets you run multiple Appium test sessions on the same assigned device. Once you have finished running tests on that device, it undergoes the same extensive cleanup process before the device is sent back to the common device pool.

This workflow improves overall test execution time as the device doesn’t need to repeatedly undergo the initial configuration process for each test session.

Important: Currently, this feature is in private beta. Also, it’s only supported for Appium tests.

2. How to get started ?

To enable reserve device workflow, set the browserstack.reserveDevice capability to true for all test sessions in a build.

Capability Value Description
browserstack.reserveDevice true or false(default value) Indicates that BrowserStack will reserve the device for 30 seconds after the test session ends. If you start a subsequent test session with matching BrowserStack capabilities within 30 seconds, BrowserStack will assign the same device to execute the new test session. If not, BrowserStack will release the reserved device and send it back into an extensive device cleaning process.

Frequently Asked Questions (FAQs)

1. Are there any pre-requisites for using device reservation workflow?

To get the most value out of this optimization, we expect the following :

  • The Appium capabilities remain the same across a logical group of tests to attempt allocation of a reserved device. For instance, ensure BrowserStack capabilities such as project, build, device, os_version, language, etc remain the same for a logical group of tests
  • Subsequent test sessions are queued within 30 seconds of previous test completion to attempt allocation of a reserved device
  • Testing best practices such as writing small, atomic & independent tests are followed

2. What is the expected performance improvement after using device reservation workflow?

Performance improvement experienced by the users with this workflow can vary depending on the BrowserStack capabilities used, device-OS combinations, app size, test duration, etc. From internal benchmarks, we see improvement between 10-20% in build execution time.

3. Is the app state preserved across subsequent test sessions in device reservation workflow?

No. Currently, the app state is reset after each session to ensure each test session execution is isolated and independent of each other.

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.

We're continuously improving our docs. We'd love to know what you liked






Thank you for your valuable feedback

Is this page helping you?

Yes
No

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.

We're continuously improving our docs. We'd love to know what you liked






Thank you for your valuable feedback!

Talk to an Expert
Talk to an Expert