currents convert
CLI tool for converting reports from various formats to Currents-compatible format
currents convert allows converting test reports created by various frameworks to a format compatible with Currents API. A typical workflow is:
Run tests using your preferred framework and save the results in a file
Convert the report using
currents convertcommandUpload the report to Currents using currents upload command
Supported formats
The command converts files of one of the supported format, generated by the one of the supported frameworks.
Support frameworks
Postman
✅
Vitest
✅
WebdriverIO
✅
NodeJS Testing
✅ (see @currents/node-test-reporter)
Cypress
👷🏾♀️ work in progress
If you're interested in enabling support for more frameworks, please get in touch with our support team.
Usage
npx currents convert \
--input-format=<format> \
--input-file=<pattern> \
--output-dir=<path> \
--framework=<string> \
--framework-version=<string>Example:
Configuration
currents convert options apart from --framework-version are required. Use --help flag to list the available options.
--input-formatThe format of the input test reports. Use the
--helpflag to see the supported formatsType:
junit
--input-fileComma-separated glob patterns to match the test results files (e.g., "report1.xml,report2.xml)
The multi-file match is only available starting on version 1.6.8 of
@currents/cmdpackage.Type:
string
-o, --output-dirThe directory to save the converted test reports
Type:
string
--frameworkThe testing framework used to generate the test reports
Type:
postman, vitest, wdio
--framework-versionThe version of the testing framework used to generate the test reports
Type:
string
--debugEnable debug logs
Environment variable:
DEBUG=currents*Type:
boolean
Artifacts
Artifacts are files that can be linked with specific instance, test or attempt according to the Level of the artifact.
The artifacts are taken from the JUnit XML file that can be read from this tags structure:
if the artifact is at attempt level it must also include the attempt index:
For
instancelevel artifacts, the<properties>tag must exist within a<testsuite>tag.For
testandattemptlevel artifacts, the<properties>tag must exist within a<testcase>tag.
See Artifact for a more specific data structure and the JUnit example in the repository.
Level
The generic API reports support three types Type of artifact levels:
attempt: Corresponds to the attempts (retries) made on each test.test: Is the specific test code executed for a testing framework.instance: Group of tests in a spec file.
Type
Currents Generic API accepts the following types of artifacts, each one according to the artifact level.
attempt:video,screenshot,attachmenttest:attachmentinstance:coverage,attachment,stdout
Last updated
Was this helpful?