Skip to main content
Transform your testing process with: Real Device Features, Company-wide Licences, & App Percy
No Result Found
Get your setup working faster. Join our Discord for optimisation tips from elite testers. Join our DiscordJoin our Discord

Enable Local Testing for Flutter integration tests

Enable Local Testing for Flutter integration tests on BrowserStack App Automate

Local Testing lets App Automate sessions reach servers on your local machine, CI/CD machines or nodes, or other private networks. Use it to test apps that retrieve data from those servers.

This feature is available on Android devices only.

Enabling Local Testing with App Automate is a two-step process:

  1. Establish a Local Testing connection.
  2. Configure your execution REST API call so that the execution happens through the Local Testing connection.

Establish a Local Testing connection

Start the BrowserStack Local binary before you run your tests.

Via command-line interface

You can start a Local Testing connection through your command-line interface by following the steps below:

  1. Download the appropriate binary for your system:

  2. Unzip the binary to a folder or directory on your machine.
  3. Open your command-line interface and navigate to the folder containing the Local binary.
  4. Run the binary using the following command:
./BrowserStackLocal --key YOUR_ACCESS_KEY

The download links are secure. Each binary has a digital signature that names BrowserStack Ltd. as the publisher.

Configure tests to run with Local Testing connection

After you establish the Local Testing connection, set the local parameter to true.

Capability Description Value
local Test against internal/local servers true or false
Default: false

Sample API cURL request to execute the test locally:

curl -u "YOUR_USERNAME:YOUR_ACCESS_KEY" \
-X POST "https://api-cloud.browserstack.com/app-automate/flutter-integration-tests/v2/android/build" \
-d '{"local" : "true", "devices": ["Samsung Galaxy S8-7.0"], "app": "bs://j3c874f21852ba57957a3fdc33f47514288c4ba4", "testSuite": "bs://f7c874f21852ba57957a3fdc33f47514288c4ba4"}' \
-H "Content-Type: application/json"

Replace the app and testSuite parameters with the app_url and test_url of your uploaded app and test suite on BrowserStack.

Start the Local Testing connection before you run the test suite. Stop it only after test execution completes.

Your Local Testing setup changes if you use a proxy or restrict connections to certain domains.

For advanced configuration, such as testing behind a proxy or managing multiple connections, see Test Flutter apps in local environments.

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