Get Flutter iOS session information via App Automate API
View your Flutter iOS session using the BrowserStack App Automate API.
Each executed build is composed of one or more test sessions. By default, each session is the execution of your test-package on a single device. Thus, each device in the build will have a single test session. However, if sharding is used, each session is the execution of a single shard on a single device. Thus, each device in the build will have multiple sessions (one for each shard).
Each session has a unique identifier (session ID) associated with it. This can be obtained using our Get build status endpoint. Using this session ID, you can use our REST API to access its test execution details including test results and debugging information for each individual test case.
Get session details
You can fetch status and test execution details for a given test session. For individual test cases, you can also access test results and debugging information such as:
- Instrumentation logs
- Device logs
- Network logs
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/<build-id>/sessions/<session-id>"
-
build_id* String
Build ID of the test session.
-
session_id* String
Session ID.
Response attributes 200 application/json
Response
{
"id": "c9215a31aace1d2b885f1c7a9f5d73bce55b4543",
"name": "login_test",
"status": "failed",
"browserstack_status": "done",
"reason": "CLIENT_STOPPED_SESSION",
"start_time": "2020-06-04 07:44:20 +0000",
"created_at": "2020-06-04 07:44:18 +0000",
"duration": 43,
"device": "iPhone 14 Pro",
"os": "ios",
"os_version": "16.0",
"build_name": "SampleBuild",
"project_name": "SampleProject",
"build_hashed_id": "5c5ab4338cec13aeb78f7a6977344556ac00bccd6",
"test_package_details": {
"url": "bs://89c874f21852ba57957a3fdc33f47514288c4ba1",
"bundle_id": "com.sample.browserstack.samplecalculator.test",
"version": "1.0.0",
"name": "sample.zip"
},
"testcases": {
"count": 6,
"status": {
"passed": 0,
"failed": 6,
"skipped": 0,
"timedout": 0,
"error": 0,
"running": 0,
"queued": 0
},
"data": [
{
"class": "EnsureOperationTests",
"testcases": [
{
"name": "ensureMultiplicationWorks",
"start_time": "2020-06-04 07:44:25 +0000",
"status": "failed",
"duration": "2.057",
"video": "https://api.browserstack.com/app-automate/flutter-integration-tests/builds/57cc68e05f76ca3c9c0d4600fd78ae064fa537bb/sessions/tests/c9215a31aace1d2b885f1c7a9f5d73bce55b4543406d4de4/video#t=0,5",
"id": "c9215a31aace1d2b885f1c7a9f5d73bce55b4543406d4de4",
"instrumentation_log": "https://api.browserstack.com/app-automate/flutter-integration-tests/builds/57cc68e05f76ca3c9c0d4600fd78ae064fa537bb/sessions/tests/c9215a31aace1d2b885f1c7a9f5d73bce55b4543406d4de4/instrumentationlogs",
"device_log": "https://api.browserstack.com/app-automate/flutter-integration-tests/builds/57cc68e05f76ca3c9c0d4600fd78ae064fa537bb/sessions/tests/c9215a31aace1d2b885f1c7a9f5d73bce55b4543406d4de4/devicelogs",
"network_log": "https://api.browserstack.com/app-automate/flutter-integration-tests/builds/57cc68e05f76ca3c9c0d4600fd78ae064fa537bb/sessions/tests/c9215a31aace1d2b885f1c7a9f5d73bce55b4543406d4de4/networklogs"
},
{
"name": "ensureDivisionWorks",
"start_time": "2020-06-04 07:44:31 +0000",
"status": "failed",
"duration": "1.96",
"video": "https://api.browserstack.com/app-automate/Flutter/builds/57cc68e05f76ca3c9c0d4600fd78ae064fa537bb/sessions/tests/c9215a31aace1d2b885f1c7a9f5d73bce55b4543e5295377/video#t=6,11",
"id": "c9215a31aace1d2b885f1c7a9f5d73bce55b4543e5295377",
"instrumentation_log": "https://api.browserstack.com/app-automate/flutter-integration-tests/builds/57cc68e05f76ca3c9c0d4600fd78ae064fa537bb/sessions/tests/c9215a31aace1d2b885f1c7a9f5d73bce55b4543e5295377/instrumentationlogs",
"device_log": "https://api.browserstack.com/app-automate/flutter-integration-tests/builds/57cc68e05f76ca3c9c0d4600fd78ae064fa537bb/sessions/tests/c9215a31aace1d2b885f1c7a9f5d73bce55b4543e5295377/devicelogs",
"network_log": "https://api.browserstack.com/app-automate/flutter-integration-tests/builds/57cc68e05f76ca3c9c0d4600fd78ae064fa537bb/sessions/tests/c9215a31aace1d2b885f1c7a9f5d73bce55b4543e5295377/networklogs"
}
]
},
{
"class": "EnsureInputTests",
"testcases": [
{
"name": "ensureMultipleInputIsHandled",
"start_time": "2020-06-04 07:44:50 +0000",
"status": "failed",
"duration": "0.313",
"video": "https://api.browserstack.com/app-automate/flutter-integration-tests/builds/57cc68e05f76ca3c9c0d4600fd78ae064fa537bb/sessions/tests/c9219a12aace1d2b885f1c7a9f5d73bce55b454324e815c7/video#t=25,28",
"id": "c9219a12aace1d2b885f1c7a9f5d73bce55b454324e815c7",
"instrumentation_log": "https://api.browserstack.com/app-automate/flutter-integration-tests/builds/57cc68e05f76ca3c9c0d4600fd78ae064fa537bb/sessions/tests/c9219a12aace1d2b885f1c7a9f5d73bce55b454324e815c7/instrumentationlogs",
"device_log": "https://api.browserstack.com/app-automate/flutter-integration-tests/builds/57cc68e05f76ca3c9c0d4600fd78ae064fa537bb/sessions/tests/c9219a12aace1d2b885f1c7a9f5d73bce55b454324e815c7/devicelogs",
"network_log": "https://api.browserstack.com/app-automate/flutter-integration-tests/builds/57cc68e05f76ca3c9c0d4600fd78ae064fa537bb/sessions/tests/c9219a12aace1d2b885f1c7a9f5d73bce55b454324e815c7/networklogs"
}
]
}
]
},
}
-
id String
Session ID.
Example:<session_id> -
name String
Name of your test session.
-
status String
Test session status. Know more about viewing test status
-
browserstack_status String
Status of the session on BrowserStack. The possible values are:
Key Value runningThe test session is currently running. doneThe test session completed. timeoutThe test session was idle for 90 seconds and got terminated. failedThe test session encountered an error. -
reason String
Reason for session termination. For example, this is set to
CLIENT_STOPPED_SESSIONwhen a session terminates upon completion of the test package execution. - Show 11 more
-
start_time String
Timestamp for starting test session execution.
-
created_at String
Timestamp at which the test session was created.
-
duration String
Total duration for test session execution.
-
device String
Name of the device on which the session was executed.
Example:iPhone 14 Pro -
os String
OS on which your session was executed. The value is always
ios. -
os_version String
OS version on which your session was executed.
-
build_name String
Name of the build. If a build name was not set, the default value is
Untitled Build. -
project_name String
Name of the project. If a project name was not set, the default value is
Untitled Project. -
build_hashed_id String
Unique identifier of the build to which this session belongs.
Example:<build_id> -
test_package_details Object
â–¶ SHOW VALUESDetails of the test package under test uploaded on BrowserStack.
-
url String
The
test_package_urlof the test package(.zip) file uploaded on BrowserStack. -
bundle_id String
Bundle ID of the app under test contained in the test package.
-
version String
Version of the app under test contained in the test package.
-
name String
Name of your test package(.zip) file.
-
-
testcases Object
â–¶ SHOW VALUESDetails about each test-case execution for this session.
-
count Integer
The total number of test cases in the session
-
status Object
â–¶ SHOW VALUESCount of the test cases for each status types.
-
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.
-
-
data Array
â–¶ SHOW VALUESDetails about the test case execution.
-
class String
Name of the class containing the test cases.
-
testcases Array
â–¶ SHOW VALUESList of all the test cases belonging to given class and their test execution details.
-
name String
Name of the test case
-
start_time String
Timestamp at which the test execution started.
-
status String
Status of the test case execution on a given device or session. Different values for test case status:
Key Value passedExplicit assertion in the test case that marks the test as passed. failedExplicit assertion in the test case that marks the test as failed. This can also happen if there is an uncaught runtime exception during test execution. skippedA test case that was never invoked during the test-suite execution. It can happen in two different scenarios :
(a) The session got timed out (by BrowserStack) because it exceeded 2 hour limit. All remaining test cases in the session will be marked as skipped.
(b) Execution of a test case is skipped by the test runner. For e.g. This can happen if the test case uses an @Ignore annotation.timedoutExecution of a test case (in a running state) is halted either because :
(a) The session got timed out (by BrowserStack) because it exceeded 2 hour limit
(b) The test case wasidlefor 15 mins (Idleis defined as no update from the test runner)errorAn errored test is one that failed due to an unanticipated issue on BrowserStack testing infrastructure. runningTest case that is being executed by the test runner. queuedTest case queued for execution. This is the default initial state. -
duration String
Total duration of test case execution on the given device.
-
video String
URL to fetch video logs for the test case execution.
-
id String
Unique ID of the test case execution on the given device.
-
instrumentation_log String
URL to fetch instrumentation logs for the test case execution.
-
device_log String
URL to fetch device logs for the test case execution if you’ve set the
deviceLogsparameter totruewhen running the test case. -
network_log String
URL to fetch network logs for the test case execution if you’ve set the
networkLogsparameter totruewhen running the test case.
-
-
-
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.