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.

  • devices* Array

    List of devices to execute your tests on.

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