View Flutter JUnit XML report on BrowserStack
Once the execution of your Flutter test suite is complete, you can access the test reports to review detailed information about your test execution results across devices.
To view the details of your Flutter test executions on BrowserStack, utilize the JUnit XML report. You can access this report at the session level. In the context of Flutter, a session refers to the execution of a test suite on a single device. The report’s schema corresponds to the base schema utilized by Android Studio’s Gradle build system for generating reports.
Accessing the report using REST API
Once your Flutter build execution is complete on BrowserStack, use the sessions REST API to access the report in standard JUnit XML format.
Here is an example request to access reports:
Here is an example response of the above sample request:
<?xml version="1.0"?>
<testsuites>
<testsuite name="com.sample.browserstack.samplecalculator.EnsureInputTests" tests="4" failures="1" skipped="0" timedout="0" errors="0" time="21.225" timestamp="2020-08-31 09:06:02 +0000">
<properties>
<property session_id="y7t1e4296580bd3af29828ffa64e770de9f32b8"/>
<property devicename="Samsung Galaxy S8"/>
<property os="Android"/>
<property version="7.0"/>
</properties>
<testcase name="ensureDivisionWorks" classname="com.sample.browserstack.samplecalculator.EnsureInputTests" result="passed" test_id="fa64e77096580bd3de9f32baf29828ffa632ba5fad668d2" time="2.633" video_url="https://www.browserstack.com/s3-upload/bs-video-logs-aps/s3-ap-south-1/fa64e77096580bd3de9f32baf29828ffa632ba5fad668d2/video-fa64e77096580bd3de9f32baf29828ffa632ba5fad668d2.mp4#t=0,5"/>
<testcase name="ensureMultiplicationWorks" classname="com.sample.browserstack.samplecalculator.EnsureInputTests" result="failed" test_id="fa64e77096580bd3de9f32baf29828ffa632ba5fa855597fc0" time="2.917" video_url="https://www.browserstack.com/s3-upload/bs-video-logs-aps/s3-ap-south-1/fa64e77096580bd3de9f32baf29828ffa632ba5fa855597fc0/video-fa64e77096580bd3de9f32baf29828ffa632ba5fa855597fc0.mp4#t=13,19">
<failure>java.lang.NullPointerException: Attempt to invoke virtual method 'java.io.FileOutputStream android.content.Context.openFileOutput(java.lang.String, int)' on a null object reference
</failure>
</testcase>
</testsuite>
</testsuites>
Report structure
XML tag | Description |
---|---|
<testsuite> |
- Represents a session of test-suite execution. - Contains attributes and information about the session. - Provides a summary of the test-suite execution: Total number of tests, number of failed/errored/skipped tests, duration of the session. |
<properties> |
- Nested within the <testsuite> tag.- Contains additional properties or metadata related to the session. |
<testcase> |
- Corresponds to the execution of a single test case within a session. - Contains attributes and information about the test case. - If successful, represents a passed test case. |
<failure> |
- Nested within a <testcase> element.- Denotes a failure encountered during the test case execution. |
<error> |
- Nested within a <testcase> element.- Denotes an error encountered during the test case execution. - Contains information about the failure: error type, error message, stack trace |
Related topics
-
Manage your uploaded apps using our REST API.
-
Use the recent apps API endpoint to list your recently uploaded apps.
-
Delete your uploaded apps using the delete app API endpoint.
-
If you have any queries, get in touch with us.
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
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!