Skip to main content
Table of Contents

Builds

Each build represents an execution of your Flutter iOS test-package on one or more devices on Browserstack. Use our REST API to execute and manage your test builds. In addition, you can fetch build status in real-time as well as obtain access to video recording and other test execution logs.

List recent builds

GET /app-automate/flutter-integration-tests/v2/iOS/builds

Fetch 20 recent test builds sorted by timestamp. You can also filter builds by their project name.

Request parameters

Request

curl -u "YOUR_USERNAME:YOUR_ACCESS_KEY" \
-X GET "https://api-cloud.browserstack.com/app-automate/flutter-integration-tests/v2/iOS/builds"

# List builds using the project filter
curl -u "YOUR_USERNAME:YOUR_ACCESS_KEY" \
-X GET "https://api-cloud.browserstack.com/app-automate/flutter-integration-tests/v2/ios/builds?project=SampleBuild"
  • project String

    The project name of the build(s).
    Example: Flutter_Test

Response attributes 200 application/json

Response

[
    {
        "id": "5c5ab4338cec13aeb78f7a6977344556ac00bccd6",
        "start_time": "2019-11-06 13:07:45 UTC"
    },
    {
        "id": "235ab7338cec13ae6b8f7a6977344556ac00bccd6",
        "start_time": "2020-06-04 07:43:49 UTC"
    }
]
  • Array

    List of recent test builds sorted by timestamp

    SHOW VALUES
    • id String

      Build ID.

    • start_time String

      Timestamp at which the build execution was started.

Get build status

GET /app-automate/flutter-integration-tests/v2/ios/builds/{buildID}

Once a build is started, you can fetch its status using this endpoint. You can obtain the overall summary of your test execution as well as results for each individual test case. You can obtain the build ID from the List recent builds.

Request parameters

Request

curl -u "YOUR_USERNAME:YOUR_ACCESS_KEY"
  -X GET "https://api-cloud.browserstack.com/app-automate/flutter-integration-tests/v2/ios/builds/86b2169a119c394847c1644fc53831c277c93f86"
  • buildID* String

    Unique build ID for your Flutter test execution.
    Example: 57dd68e05f76ca3c9c0d4600fd78ae064fa537bb

Response attributes 200 application/json

Response

{
    "id": "5c5ab4338cec13aeb78f7a6977344556ac00bccd6",
    "framework": "Flutter inetgration tests",
    "duration": 83,
    "status": "failed",
    "input_capabilities": {
        "devices": [
            "iPhone 14 Pro-16"
        ],
        "project": "Untitled Flutter integration tests Project",
    },
    "start_time": "2020-06-04 07:43:49 UTC",
    "test_package_details": {
        "url": "bs://89c874f21852ba57957a3fdc33f47514288c4ba1",
        "bundle_id": "com.sample.browserstack.samplecalculator.test",
        "version": "1.0.0",
        "name": "sample.zip"
    },
    "devices": [
        {
            "device": "iPhone 14 Pro",
            "os": "ios",
            "os_version": "16.0",
            "sharding": false,
            "sessions": [
            {
                "id": "4fc55a08d7e33651d962ad676c7d6a0a08902702",
                "status": "failed",
                "start_time": "2020-06-04 07:44:07 +0000",
                "duration": 62,
                "testcases": {
                    "count": 9,
                    "status": {
                        "passed": 3,
                        "failed": 6,
                        "skipped": 0,
                        "timedout": 0,
                        "error": 0,
                        "running": 0,
                        "queued": 0
                    }
                }
            }]
        }
    ]
}
  • id String

    Unique build ID for your test execution.
    Example: 4fc55a08d7e33651d962ad676c7d6a0a08902702

  • framework String

    Name of the automation framework. This is set to Flutter Integration Test.

  • duration Integer

    Total duration for build completion (in seconds). This includes the time taken to install the app, test-suite, setting up the device along with the test execution time of all the test cases.

  • status Integer

    Status of the your build execution. This is computed based on the status of every test case executed in your entire test-suite.

  • input_capabilities Object

    Details about the input parameters passed while starting the build execution.

    SHOW VALUES
    • devices Array

      List of devices on which the build was executed.

    • project String

      Name of your project which was set inside the project parameter inside the build execution API.

    • test-package String

      The test-package_url of the test package uploaded on BrowserStack.
      Example: bs://9c6dcb5649a8280ca800075bfd8f151115bba6b3

  • start_time String

    Timestamp at which the build execution was started

  • test_package_details Object

    Details about the package under test uploaded on BrowserStack

    SHOW VALUES
  • devices Array

    Test execution details for each device in the build.

    SHOW VALUES
    • device String

      The name of the device.

    • os String

      By default, this is set to Android.

    • os_version String

      OS version.

    • sharding Boolean

      Indicates if the sharding was enabled for this build.

    • sessions Array

      If sharding is disabled, each session is the execution of your test on a single device. Thus, each device will have a single session. If sharding is enabled, each session is the execution of a single shard on a single device. Thus, each device will have multiple sessions (one for each shard).

      SHOW VALUES
      • id String

        A unique session ID.
        Example: 09a018967ec8b2dc5dd391de1130f69463840039

      • status String

        Status of this session.

      • start_time String

        Timestamp at which the session execution started.

      • duration String

        Duration of the session execution.

      • testcases Object

        Test case execution summary for this session.

        SHOW VALUES
        • count Integer

          The total number of test-cases in this session.

        • status Object

          Count of test-cases by each status type.

          SHOW VALUES
          • passed Integer

            Total count of test cases with explicit test assertions that marks the test as passed.

          • failed Integer

            Total count of test cases with uncaught exceptions or explicit test assertions that marks test as failed.

          • skipped Integer

            Total count of test cases that never got executed by the test runner.

          • timedout Integer

            Total count of test cases that got timed-out.

          • error Integer

            Total count of test cases that errored due to an unanticipated issue on BrowserStack.

          • running Integer

            Total count of test cases that are currently under execution.

          • queued Integer

            Total count of test cases that are queued for execution.

Execute a build

POST /app-automate/flutter-integration-tests/v2/ios/build

Start the execution of a new build on BrowserStack. While making a request, you must specify the package under test, Flutter iOS test package as well as a list of devices to execute your tests on. In addition, you can specify a number of other parameters to customise test execution. Every build has a unique build_id associated with it. This is returned in the response to this endpoint.

Request parameters

Request

curl -u "YOUR_USERNAME:YOUR_ACCESS_KEY" \
-X POST "https://api-cloud.browserstack.com/app-automate/flutter-integration-tests/v2/ios/build" \
-d '{ "testPackage": "<test-package-id>",  "devices": ["iPhone 11-13"]}' \
-H "Content-Type: application/json"
  • testPackage* String

    Specify the package under test. Use test_package_url, custom_id or shareable_id of a previously uploaded test package. Know more about test package upload.

  • devices* Array

    List of devices to execute your tests on. Learn more about selecting devices
    Example: ["iPhone 15-17", "iPhone 13-17"].

  • project String

    Unique identifier to logically group multiple builds together. Accepted characters are A-Z, a-z, 0-9, ., -, _. All other characters are ignored.

  • buildTag String

    A custom tag for your builds. Accepted characters are A-Z, a-z, 0-9, ., -, _. All other characters are ignored.

  • projectNotifyURL String

    Specify a callback URL to enable BrowserStack to notify you upon the completion of all builds under the given project. You will receive a callback if no new builds triggered for 5 mins and all existing builds have finished execution.

    Note: Set this parameter along with the ​project​ parameter.

  • deviceLogs Boolean

    Set to true to enable them. Default is false.

  • networkLogs Boolean

    Set to true to enable them. Default is false.

  • networkLogsOptions Boolean

    To capture response payloads, set the captureContent configuration to true within the networkLogsOptions parameter. Default is false. Click here to know more.

  • video Boolean

    Set to false to enable them. Default is true.

  • gpsLocation String

    Simulate the location of the device to specific GPS coordinates. Specify latitude followed by longitude. Learn more about gpsLocation API.
    Example: 40.730610,-73.935242

  • geoLocation String

    Test your app behavior from different countries using IP geolocation. Specify the two letter country code. Learn more about geoLocation API.
    Example: CN for China, FR for France.

  • networkProfile String

    Simulate different network conditions while testing your app.
    Example: 2g-gprs-good, 2g-gprs-lossy. View the list of supported network profiles.

  • customNetwork String

    Simulate custom network condition while testing your app. Specify download speed (kbps), upload speed (kbps), latency (ms), packet loss (%).
    Example: 1000, 1000, 100, 1

  • language String

    Set language of the app under test.
    Example: fr (for French)

  • locale String

    Set locale to test the localized version of your app.
    Example: fr_CA (for French-Canada)

  • deviceOrientation Boolean

    Set the screen orientation of the mobile device.
    Values: portrait, landscape. Default: portrait

  • acceptInsecureCerts Boolean

    Set this parameter to true to avoid invalid certificate errors while using self-signed certificate to test your app. By default, its set to false.

  • idleTimeout String

    Use this parameter to specify the maximum time limit for which your test execution can remain idle. If it exceeds this threshold, your build status will change to timed out. Accepted range of values are between 60 seconds to 900 seconds. By default, its set to 900 seconds.

Response attributes 200 application/json

Response

{
    "message": "Success",
    "build_id": "5c5ab4338cec13aeb78f7a6977344556ac00bccd6"
}
  • message String

    Status of the request.

  • build_id String

    A unique identifier for your test execution.
    Example: 5c5ab4338cec13aeb78f7a6977344556ac00bccd6

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