Skip to main content
Transform your testing process with: Real Device Features, Company-wide Licences, & App Percy
No Result Found
Connect & Get help from 6000+ developers on our Discord community. Ask the CommunityAsk the Community

Download post-test reports in Espresso

Learn how to download post-test reports in Espresso on BrowserStack App Automate

This guide outlines how to retrieve files and reports generated during your Espresso test sessions on real devices. This feature allows you to access and analyze post-test reports for debugging and validation.

Download reports

During your test execution, any files you save to a specific directory on the device is collected, compressed, and made available for download after the test session concludes.

  • Maximum File Size: The total size of all collected files must not exceed 500 MB.
  • Maximum Number of Files: You can save up to 100 files in the designated directory.
  • Retention Period: The zipped artifacts will be stored for a maximum of 30 days post-test execution. After this period, they will be permanently deleted.

Follow these steps to download your test reports successfully:

Store your files

While your test is running, ensure that all generated files, such as logs, reports, or other data, are written to the following directory on the device’s SD card:

/sdcard/Download/assets/session_data

Supported File Types: .log, .txt, .out, .err, .dat, .log.gz, .log.zip, .tgz, .tar.gz, .xz, .bz2, .evtx, .etl, .json, .ndjson, .xml, .csv, .har, .trace, .pcap, .pcapng, .logcat, .trace-perfetto

Upon completion of your test session, all the files and directories within /sdcard/Download/assets/session_data are automatically zipped into a single archive file and uploaded to a temporary storage location.

The artifacts will be available for 30 days post-test execution.

Enable report collection

By default, the sessionData capability is set to false, meaning you cannot download session assets unless you explicitly set this capability to true when triggering your builds. If you do not require these assets, no action is needed; however, to enable asset collection and download your reports, you must pass sessionData: true in your test script.

You can view build and session details on the App Automate Dashboard or retrieve them programmatically using the Espresso builds REST API and the sessions REST API.

Download your reports

You can download the zipped archive using the following REST API request.

To download, execute the following cURL command in your terminal, replacing the placeholders with your specific details:

Terminal
Copy icon Copy
Placeholder Description
YOUR_USERNAME Your BrowserStack username.
YOUR_ACCESS_KEY Your BrowserStack access key.
{build_id} The ID of your test build.
{session_id} The ID of the specific test session.
<filename>.zip The desired name for your downloaded zip file.

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 Check Circle