description | icon |
---|---|
Integrate Currents with any framework by using JUnit compatible XML reporters |
grid |
Currents has flagship integrations with various testing frameworks via the dedicated reporters (like playwright, jest, currents-node-test-reporter.md 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.
A typical workflow for reporting JUnit XML results to Currents:
{% stepper %} {% step %}
Configure your testing tool to generate the results in JUnit XML format {% endstep %}
{% step %}
Run the tests and save the test results at a known location {% endstep %}
{% step %}
Run currents-convert.md command to convert JUnit XML report to a format compatible with Currents {% endstep %}
{% step %}
Run currents-upload.mdcommand to send the results to Currents for processing {% endstep %} {% endstepper %}
- Install currents-cmd package
npm i @currents/cmd
Refer to your framework documentation or contact Currents support for help with enabling JUnit reporter for your framework
Framework | Instructions |
---|---|
Vitest | https://vitest.dev/guide/reporters#junit-reporter |
NodeJS Test Runner | https://nodejs.org/api/test.html#test-reporters |
WebdriverIO | https://webdriver.io/docs/junit-reporter/ |
Cypress | https://github.com/michaelleeallen/mocha-junit-reporter |
Postman (Newman) | https://github.com/postmanlabs/newman?tab=readme-ov-file#junitxml-reporter |
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.
Use currents-convert.md command to convert JUnit format to internal Currents format. Refer to currents-convert.md 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
Use currents-upload.md 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
Check out the example repository that demonstrates how to generate and report test results from various testing frameworks to Currents.