Skip to main content
Revolutionize your testing approach with our latest products - Test Observability, App Percy & Test Management.

View test reports

Once your XCUI test suite execution is completed, you can access the test reports to view the details about your test execution results across devices. We can generate a result bundle.

The reports are available at the session level. A session in case of Xcuit refers to execution of test suite on a single device. However, in case of sharding enabled, a session refers to each shard execution on a device.

Result Bundles

You can view the details about your XCUI tests execution on BrowserStack using the result bundle.

Step 1: Build your app and test suite files

Build your app and test suite files. Upload your app and test suite files on BrowserStack.

Step 2: Execute your tests using enableResultBundle parameter

In order to generate the result bundle for your xcuit test execution on BrowserStack, you need to pass the enableResultBundle parameter as true in the REST API request to start your test execution.

REST API endpoint:

POST  /app-automate/xcuitest/v2/build
Parameter Description Values
enableResultBundle Enable generating result bundles for your XCUI test build execution. true/false. Default: false

Example cURL request:

curl -u "YOUR_USERNAME:YOUR_ACCESS_KEY" \
-X POST "https://api-cloud.browserstack.com/app-automate/espresso/v2/build" \
-d '{"enableResultBundle": true, "devices": ["iPhone X-11"], "app": "bs://f7c874f21852ba57957a3fdc33f47514288c4ba4", "testSuite": "bs://e994db8333e32a5863938666c3c3491e778352ff", "project": "SampleProject"}' \
-H "Content-Type: application/json"

Step 3: Retrieve the result bundle

Once the execution is completed, you can access the result bundle at session level using the REST API.

REST API endpoint:

GET /xcuitest/v2/builds/{build_id}/sessions/{session_id}/resultbundle

Example cURL request:

curl -u "YOUR_USERNAME:YOUR_ACCESS_KEY" \
-X GET "https://api-cloud.browserstack.com/app-automate/xcuitest/v2/builds/a40696273a8d1467f81f5bb63869be425ec336d6/sessions/78509dae7d5d606278bf4203a569406e27960806/resultbundle" --output result.zip

The API will have a binary response so you can save it to an empty result.zip file on your local machine. Once the result bundle has been generated, you can unzip the folder and view the report in a compatible Xcode editor.

Report Structure

Result bundle file can be opened in a compatible Xcode editor. Inside the result bundle:

  • Each session maps to a testsuite which gives a summary of a test suite execution in terms of total number of tests, number of failed/errored/skipped tests, duration etc.
  • The testsuite has nested testcase elements. Each testcase maps to a single test case execution inside a session. If a test case has a failure or an error, there will be a nested element <failure> or <error> to denote the error type, message and stack trace.
  • A sample report snapshot is as shown below:

Xcode Result Bundle Snapshot

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