buster-coverage

2019-10-11 admin

buster-coverage是什么

什么是buster-coverage,Generate lcov data files from Buster.JS

buster-coverage使用教程帮助文档

Unmaintained

Unfortunately I wasn’t able to give buster-coverage the love it deserves if you’re interested to take this project over please get in contact with me.

buster-coverage

An extension for buster.js to generage lcov files for everything listed in your source files. You will need lcov or something similar to generate meaningful reports.

It will output a coverage.lcov that combines all browser into a single file and a separated file for each client that was connected during the testrun.

Installation

Not yet released on npm, so go to your node_modules directory and clone it:

git clone git://github.com/ebi/buster-coverage.git

Then link it:

cd buster-coverage
npm link

Then add it to your buster.js config file:

config["My tests"] = {
  extensions: [ require("buster-coverage") ]
};

Configuration

By default it will write everything into the coverage subdirectory.

Example Configuration

config["My tests"] = {
  extensions: [ require("buster-coverage") ],
  "buster-coverage": {
    outputDirectory: "coverage_reports", //Write to this directory instead of coverage
    format: "cobertura", //At the moment cobertura and lcov are the only ones available
    combinedResultsOnly: true, //Write one combined file instead of one for each browser
    coverageExclusions: ["resources"] //Exclude everything with resources in it's path
  }
};

Generating reports

To generate a basic report you can just run:

genhtml coverage/coverage.lcov -o report

License

Copyright 2012, Tobias Ebnöther.

Released under the BSD license.

本站文章除注明转载外,均为本站原创或编译。欢迎任何形式的转载,但请务必注明出处。

转载请注明:文章转载自 JavaScript中文网 [https://www.javascriptcn.com]

本文地址:https://www.javascriptcn.com/read-77103.html

文章标题:buster-coverage

回到顶部