JSPM

  • ESM via JSPM
  • ES Module Entrypoint
  • Export Map
  • Keywords
  • License
  • Repository URL
  • TypeScript Types
  • README
  • Created
  • Published
  • Downloads 890424
  • Score
    100M100P100Q198087F

Aimed at making it easier to build Jenkins compatible JUnit XML reports in plugins for testing frameworks

Package Exports

  • junit-report-builder
  • junit-report-builder/src/factory

This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (junit-report-builder) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.

Readme

junit-report-builder

A project aimed at making it easier to build Jenkins compatible XML based JUnit report files.

Installation

To install the latest version, run:

npm install junit-report-builder --save

Usage

var builder = require('junit-report-builder').createBuilder();

// Create a test suite
var suite = builder.testSuite().name('My suite');

// Create a test case
var testCase = suite.testCase()
  .className('my.test.Class')
  .name('My first test');

// Create another test case which is marked as failed
var testCase = suite.testCase()
  .className('my.test.Class')
  .name('My second test')
  .failure();

builder.writeTo('test-report.xml');

This will create test-report.xml containing the following:

<?xml version="1.0"?>
<testsuites>
  <testsuite name="My suite">
    <testcase/>
    <testcase/>
    <testcase classname="my.test.Class" name="My first test"/>
    <testcase classname="my.test.Class" name="My second test">
      <failure/>
    </testcase>
  </testsuite>
</testsuites>

License

MIT. See LICENSE.

Changelog

0.0.1

  • Initial release