Socket
Socket
Sign inDemoInstall

junit-report-builder

Package Overview
Dependencies
Maintainers
1
Versions
21
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

junit-report-builder

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


Version published
Weekly downloads
617K
increased by6.04%
Maintainers
1
Weekly downloads
 
Created

What is junit-report-builder?

The junit-report-builder npm package is a tool for creating JUnit XML reports. These reports are commonly used in continuous integration (CI) systems to display test results. The package allows you to programmatically build and structure these reports, making it easier to integrate with various CI tools.

What are junit-report-builder's main functionalities?

Creating a Test Suite

This feature allows you to create a new test suite. A test suite is a collection of test cases that can be reported together.

const builder = require('junit-report-builder');
const suite = builder.testSuite().name('My Test Suite');

Adding Test Cases

This feature allows you to add test cases to a test suite. You can specify the class name, test name, execution time, and the result of the test (e.g., failure message).

const builder = require('junit-report-builder');
const suite = builder.testSuite().name('My Test Suite');
suite.testCase().className('MyClass').name('should do something').time(123).failure('Failure message');

Writing the Report to a File

This feature allows you to write the constructed JUnit report to an XML file. This file can then be used by CI tools to display test results.

const builder = require('junit-report-builder');
const suite = builder.testSuite().name('My Test Suite');
suite.testCase().className('MyClass').name('should do something').time(123).failure('Failure message');
builder.writeTo('test-report.xml');

Other packages similar to junit-report-builder

Keywords

FAQs

Package last updated on 16 Jul 2020

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