/CoverageManager

Unit test coverage report manager

Primary LanguageJavaScriptApache License 2.0Apache-2.0

CoverageManager

This is unit test coverage report manager.

Step to run

Prerequisites

Edit webpack.config.js and package.json files in the webml-pollyfill object.

  • Open webpack.config.js file:

    Change:

      module: {rules: [{ test: /\.js$/, loader: 'babel-loader', exclude: /node_modules/ }]}
    

    to:

      module: {rules: [{test: /\.js$/, use: {loader: 'babel-loader', options: {plugins: ['istanbul']}}, exclude: /node_modules/}]}
    
  • Open package.json file:

    Add:

    "babel-plugin-istanbul": "^5.1.0"
    

    into devDependencies

  • Build and start the webml-pollyfill object.

Install dependency package for CoverageManager

$ npm install

Set Configurations

There are three fields in the config.json:

  • webmlpolyfillCommit: {string}, the commit number of webml-pollyfill object.
  • remoteURL: {string}, remote test URL or local URL http://localhost:8080/test/index.html.
  • browser: {string}, the browser to run unit test page and get coverage report.

Start CoverageManager

$ npm start

Report

  • General report: ./coverage display current test coverage reports.
  • Detailed report: ./report-tree display the history of test coverage reports.

Support Platforms

Linux Mac Android Windows
PASS PASS TODO TODO