Giter Site home page Giter Site logo

franher / tap-reporter Goto Github PK

View Code? Open in Web Editor NEW

This project forked from tapjs/tap-mocha-reporter

1.0 0.0 1.0 1.85 MB

Format a TAP stream using Mocha's set of reporters including an additional Sonarqube report

License: Other

JavaScript 82.60% HTML 15.76% Pug 1.64%
tap sonarqube report mocha generic-test-execution test testing

tap-reporter's Introduction

tap-reporter

Format a TAP stream using a different set of reporters, mainly Mocha's.

The main reporter outside the mocha reporters is sonarqube. This reporter generates a Generic Execution Data, complatible with SonarQube.

Disclaimer

This package is a fork of tap-mocha-reporter. We decide to fork and publish this package because it seems all the open Pull Requests does not have activity in the last years. In any case, we acknowledgement the great job of the contributors of tap-mocha-reporter <3.

Getting started

Install the package using npm:

npm i tap-reporter

Usage

You need to specify a reporter with the first argument.

tap test/*.js | tap-reporter <reporter> [--options]

Programmatically, you can use this as a transform stream.

var TSR = require('tap-reporter');

fs.createReadStream('saved-test-output.tap').pipe(TSR('sonarqube'));

Options

--output (-o)

It generates a file with the output report.

tap test/\*.js | tap-reporter sonarqube --output tests-execution.xml

The reporters type that support this option are: sonarqube, xunit, json, doc, markdown.

--prependTestFileName (-p)

This option is only available for the sonarqube report type. This adds a string to the front of the generated file name in the report useful if you run tests from within a subdirectory.

tap test/\*.js | tap-reporter sonarqube --output tests-execution.xml --prependTestFileName "src/app/tests"

tap-reporter's People

Contributors

isaacs avatar dependabot[bot] avatar franher avatar github-actions[bot] avatar xavier-redondo avatar sa-spag avatar bmeck avatar coreyfarrell avatar

Stargazers

 avatar

Forkers

doxee

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.