Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@wdio/junit-reporter

Package Overview
Dependencies
Maintainers
3
Versions
296
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@wdio/junit-reporter

A WebdriverIO reporter that creates Jenkins compatible XML based JUnit reports

  • 9.4.2
  • latest
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
197K
decreased by-8.04%
Maintainers
3
Weekly downloads
 
Created

What is @wdio/junit-reporter?

@wdio/junit-reporter is a reporter for the WebdriverIO test runner that produces test results in JUnit XML format. This format is widely used for reporting test results in continuous integration (CI) systems.

What are @wdio/junit-reporter's main functionalities?

JUnit XML Reporting

This feature allows you to generate test results in JUnit XML format, which is useful for integrating with CI systems. The code sample demonstrates how to configure the JUnit reporter in a WebdriverIO setup.

const { remote } = require('webdriverio');
const { JUnitReporter } = require('@wdio/junit-reporter');

const wdio = remote({
    logLevel: 'info',
    reporters: [
        [JUnitReporter, {
            outputDir: './junit-results',
            outputFileFormat: function(options) { // optional
                return `results-${options.cid}.xml`
            }
        }]
    ]
});

(async () => {
    await wdio.init();
    // your test code here
    await wdio.end();
})();

Custom Output File Naming

This feature allows you to customize the naming of the output files. The code sample shows how to use the `outputFileFormat` option to generate custom file names for the JUnit XML reports.

const { remote } = require('webdriverio');
const { JUnitReporter } = require('@wdio/junit-reporter');

const wdio = remote({
    logLevel: 'info',
    reporters: [
        [JUnitReporter, {
            outputDir: './junit-results',
            outputFileFormat: function(options) { // optional
                return `results-${options.cid}.xml`
            }
        }]
    ]
});

(async () => {
    await wdio.init();
    // your test code here
    await wdio.end();
})();

Integration with WebdriverIO

This feature demonstrates the seamless integration of the JUnit reporter with WebdriverIO. The code sample shows a basic setup where the JUnit reporter is added to the WebdriverIO configuration.

const { remote } = require('webdriverio');
const { JUnitReporter } = require('@wdio/junit-reporter');

const wdio = remote({
    logLevel: 'info',
    reporters: [
        [JUnitReporter, {
            outputDir: './junit-results'
        }]
    ]
});

(async () => {
    await wdio.init();
    // your test code here
    await wdio.end();
})();

Other packages similar to @wdio/junit-reporter

Keywords

FAQs

Package last updated on 12 Dec 2024

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc