Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/naokikimura/junit-reports-combiner

Combine JUnit XML reports from two and more.
https://github.com/naokikimura/junit-reports-combiner

cli junit xml

Last synced: about 1 month ago
JSON representation

Combine JUnit XML reports from two and more.

Awesome Lists containing this project

README

        

# junit-reports-combiner

[![npm version](https://badge.fury.io/js/junit-reports-combiner.svg)](https://badge.fury.io/js/junit-reports-combiner) [![CircleCI](https://circleci.com/gh/naokikimura/junit-reports-combiner.svg?style=svg)](https://circleci.com/gh/naokikimura/junit-reports-combiner) [![codecov](https://codecov.io/gh/naokikimura/junit-reports-combiner/branch/master/graph/badge.svg)](https://codecov.io/gh/naokikimura/junit-reports-combiner) [![Known Vulnerabilities](https://snyk.io/test/github/naokikimura/junit-reports-combiner/badge.svg?targetFile=package.json)](https://snyk.io/test/github/naokikimura/junit-reports-combiner?targetFile=package.json)

Combine JUnit XML reports from two and more.

The reports of two and more can be combined using the set operations union, intersection, and difference.

## Installation

### Requires

- Node.js 10+

### CLI

```sh
npm i -g junit-reports-combiner
```

### Modules

```sh
npm i junit-reports-combiner
```

## Usage

### CLI

Combines two reports:

```sh
junit-reports-combiner TEST-example.FooTest.xml TEST-example.BarTest.xml
```

See the `man junit-reports-combiner` for details.

### Modules

```javascript
import { DOMParser } from 'xmldom';
import JUnitReportsCombiner from 'junit-reports-combiner';

const parser = new DOMParser();

const xml1 = `



`;
const doc1 = parser.parseFromString(xml1, 'application/xml');

const xml2 = `


java.lang.AssertionError


`;
const doc2 = parser.parseFromString(xml2, 'application/xml');

const combiner = new JUnitReportsCombiner();
const doc3 = combiner.combine(doc1, doc2);
```

## Contributing
Bug reports and pull requests are welcome on GitHub at https://github.com/naokikimura/junit-reports-combiner

## License
The gem is available as open source under the terms of the [MIT License](https://opensource.org/licenses/MIT).