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

junit-report-builder

Package Overview
Dependencies
Maintainers
1
Versions
23
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

  • 4.0.1
  • Source
  • npm
  • Socket score

Version published
Maintainers
1
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 31 Jul 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