Coder Social home page Coder Social logo

junit-report-merger's Introduction

junit-report-merger

NPM version NPM downloads Dependencies Dev. Dependencies MIT License Build Status

Merges multiple JUnit XML reports into one.

JUnit XML reports are generated by reporters for popular testing frameworks, such as mocha-junit-reporter and karma-junit-reporter. Other packages also may store test results in JUnit XML format.

junit-report-merger creates a new test results report in JUnit XML format by collecting all <testsuite> elements from all XML reports and putting them together.

This can be useful when you have multiple test runners in your test pipeline but you need a single output file which includes results from all test runners.

API

Package exports a single object with the following methods.

mergeFiles(destFilePath, srcFilePaths, [options], cb)

Reads multiple files, merges their contents and write into the given file.

mergeStreams(destStream, srcStreams, [options], cb)

Reads multiple streams, merges their contents and write into the given stream.

mergeToString(srcStrings, [options])String

Merges contents of given XML strings and returns resulting XML string.

mergeFiles(destFilePath, srcFilePaths, [options], cb)

Reads multiple files, merges their contents and write into the given file.

Param Type Description
destFilePath String Where the output should be stored. Denotes a path to file. If file already exists, it will be overwritten.
srcFilePaths Array.<String> Paths to the files which should be merged.
[options] Object Merge options. Currently unused.
cb function Callback function which will be called at completion. Will receive error as first argument if any.

mergeStreams(destStream, srcStreams, [options], cb)

Reads multiple streams, merges their contents and write into the given stream.

Param Type Description
destStream WriteStream A stream which will be used to write the merge result.
srcStreams Array.<ReadStream> Streams which will be used to read data from.
[options] Object Merge options. Currently unused.
cb function Callback function which will be called at completion. Will receive error as first argument if any.

mergeToString(srcStrings, [options]) ⇒ String

Merges contents of given XML strings and returns resulting XML string.

Param Type Description
srcStrings Array.<String> Array of strings to merge together.
[options] Object Merge options. Currently unused.

License

MIT (http://www.opensource.org/licenses/mit-license.php)

junit-report-merger's People

Contributors

bhovhannes avatar greenkeeperio-bot avatar joaovieira avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.