Skip to main content
No Result Found

Simplify test configuration with BrowserStack SDK

Experience test setup flexibility with BrowserStack SDK to work alongside your existing configuration

The BrowserStack SDK offers a robust solution for automation testing with features like cross-browser testing (CBT), parallelization, test context management, and local testing. To learn more, see Benefits of BrowserStack SDK.

With the SDK, you can selectively enable or disable features based on your requirements. So, you leverage the best of both worlds: the powerful features of the SDK and your existing infrastructure.

This flexibility via is available in all top languages, including Java, Node, Python, and C#.

Key SDK configuration

With the SDK, you can manage the following key configuration for your test setup:

Cross-browser testing (CBT)

You can configure list of platforms to run your tests on, as shown here:

browserstack.yml
Copy icon Copy

When you set up platforms this way, all tests run on every defined platform. You can’t control which tests to run on specific platforms. You can do that via test scripts though. To control which tests run on specific platforms, comment out the platforms object.

Parallelization

With the SDK, you can achieve test parallelization at two levels:

  • CBT (m): Execute a test on multiple OS, device, and browser combinations in parallel. You do that by setting the platforms object, as shown earlier.
  • Test parallelization (n): Execute multiple, non-sequential tests in parallel. You do that by setting the parallelsPerPlatform attribute.

When you configure 3 platforms and set parallelsPerPlatform to 2, then a total of 6 (3 x 2) parallel threads are used on BrowserStack.

When you have configure 1 platform and set parallelsPerPlatform to 6, then a total of 6 (1 x 6) parallel threads are used on BrowserStack.

Perform CBT (m) only via SDK

If you want to perform CBT (m) without test parallelization (n), simply remove or comment out the parallelsPerPlatform capability from the SDK configuration file.

Perform test parallelization (n) only via SDK

If you want to perform only test parallelization (n parallelization), remove or comment out the platforms object while keeping the parallelsPerPlatform capability intact in the configuration file.

Parallelize without SDK

To implement parallelization without using the SDK, simply remove or comment out the platforms object and the parallelsPerPlatform capability from the configuration file.

Local Testing

Local testing can be configured to start with or without the BrowserStack binary, and even with an existing binary using a local identifier:

browserstack.yml
Copy icon Copy

Test Context

You can enable or disable auto-marking of test status and session names:

browserstack.yml
Copy icon Copy

Enable other BrowserStack product integrations

The benefits of SDK are not limited to Automation testing, but also has features and offerings around Advanced insights & Reporting (Observability), Accessibility Testing, and Visual Testing with Percy.

You can enable integrations with these solutions by setting the following BrowserStack capabilities:

browserstack.yml
Copy icon Copy

If you want to retain your existing Automate testing setup but want to leverage these integrations, you have to set browserstackAutomation to false:

browserstack.yml
Copy icon Copy

Conclusion

The parameterization in BrowserStack SDK allows for greater flexibility and control over automation testing setups. You can now tailor the SDK’s behavior to better integrate with your existing workflows and requirements. This enables you to leverage the powerful features of the SDK while maintaining your custom setups. For detailed information on each flag and its usage, refer to the capabilities generator.

For any questions or suggestions, contact support.

Next step

Now that you know how to enable or disable specific features via the SDK configuration file, integrate your test suite next.

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
Download Copy Check Circle