Others

Integrate Currents with any framework by using JUnit compatible XML reporters

Currents has flagship integrations with various testing frameworks via the dedicated reporters (like Playwright, Jest, @currents/node-test-reporter and Cypress).

Integration with other frameworks is possible by uploading a JUnit XML (or compatible) test results report to Currents using our CLI utilities from @currents/cmd package.

Send results from any framework that supports JUnit XML format

JUnit is an XML document used to represent the outcomes of automated tests. It is widely adopted for test reporting in CI/CD pipelines, allowing CI tools like Jenkins, GitHub Actions, ands other to parse and display test results.

JUnit reports typically contains information about:

  • Test suites - groups of test cases (e.g., a set of related tests)

  • Test cases - individual test scenarios with details like execution time, status (pass/fail), and optional logs (e.g., errors or skipped messages)

See a detailed example of a complete JUnit XML file.

Overview

A typical workflow for reporting JUnit XML results to Currents:

1

Configure testing framework

Configure your testing tool to generate the results in JUnit XML format

2

Run the tests

Run the tests and save the test results at a known location

3

Conver JUnit XML file

Run currents convert command to convert JUnit XML report to a format compatible with Currents

4

Upload the results to Currents

Run currents uploadcommand to send the results to Currents for processing

Setup

npm i @currents/cmd

Run the tests

Refer to your framework documentation or contact Currents support for help with enabling JUnit reporter for your framework

When running the tests, make sure to save the results at a known location - you will need to provide path to the generated files later.

Convert the JUnit XML report

Use currents convert command to convert JUnit format to internal Currents format. Refer to currents convert documentation for the list of supported formats and frameworks.

For example:

npx currents convert \
  --input-format=junit \
  --input-file=junit-file.xml \
  --output-dir=.currents \
  --framework=postman \
  --framework-version=v11.2.0

Upload the results

Use currents upload command to send the results to Currents. Get a Record key and Project ID from Currents dashboard.

npx currents upload --project-id=xxx --key=yyy

Example

Check out the example repository that demonstrates how to generate and report test results from various testing frameworks to Currents.

Last updated

Was this helpful?