Skip to main content

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 before migrating to device reservation workflow?

To get the most value out of this optimization, we expect customers to follow best practices of writing small, atomic, and independent tests which are more stable and can be efficiently executed with parallel testing.

3. 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.

3. Can I preserve the app state across subsequent test sessions in device reservation workflow?

Currently, there is no way to preserve the state of AUT (Application under test) across multiple test sessions on the same assigned device. Instead, 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