Skip to main content
No Result Found

Upload JUnit XML reports to Test Observability

Quick start guide to upload your existing XML-formatted JUnit reports to BrowserStack Test Observability

JUnit XML reports have become the standard format for exchanging test results between tools. JUnit XML eports are not limited to Java and can be generated by many different testing frameworks for Java, JavaScript, Ruby, Python, or any other language.

You can upload your JUnit XML reports into Test Observability by making a POST request to the designated upload API. Follow this doc to import your first JUnit XML report into Test Observability.

Integrate using JUnit XML reports only if you do not see your framework in the list of supported frameworks. Due to limitations on information JUnit XML reports can hold, certain features in Test Observability such as test execution video, will not be available when using JUnit XML reports as a data source.

Prerequisites

Integrate with Test Observability using JUnit XML reports

Follow these steps to upload JUnit XML reports into Test Observability:

Prepare your JUnit XML reports for upload

Ensure that you have the JUnit XML files ready for import into Test Observability. Make sure the XML files comply with the required format and include all necessary test result information.

Here is a quick checklist to prepare your XML files:

  • The file format is zip archive(containing multiple XML files and screenshots if available) or a single XML file.
  • The XML file has a valid JUnit structure. Visit the API documentation for more details on supported XML schemas.
  • The XML files belong to the same build run in case of multiple XML files.

Make a POST API request

Make a POST request to https://upload-observability.browserstack.com/upload (refer to the sample cURL below) to upload the JUnit XML reports. Ensure to:

  1. Provide the path to the XML file or a zip archive to be uploaded.
  2. Populate the input parameter values according to your requirements. You can find the exhaustive list of supported API parameters and their use in the API documentation.
macOS/Linux sample
Copy icon Copy
Windows sample
Copy icon Copy

To learn more about the upload API you can visit the API documentation.

Note that the parsing of the uploaded XML files happens asynchronously and hence it might take a few seconds for the results to be available on Test Observability after the API request is made.

Visit Test Observability

Voila! It’s done, upon successful execution of the API request, you receive a success state in the response along with a URL to the uploaded build. You can then visit the URL to analyze and gain insights from the imported test results. Alternatively, you can also navigate to your build run using Build Runs.

Visit Test Observability


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