Is there a more convenient interface for a karma runner?

I use the Karma - Spectacular Test Runner for JavaScript for unit testing in my project, the output is pretty ugly, a bunch of lines inside the command line.

Is there a more convenient HTML interface for this?

Thanks!

+8
unit-testing karma-runner
source share
3 answers

You can use my plugin for HTML reporter:

https://github.com/matthias-schuetz/karma-htmlfile-reporter

Just install via "npm install karma-htmlfile-reporter -g" and add some lines to your configuration.

reporters: ['progress', 'html'], htmlReporter: { outputFile: 'tests/units.html' } 

The HTML reporter will generate an HTML file that you can view in your browser.

+7
source share

WebStorm has support for running karma tests. They also feature test coverage with a simple plugin addition. Installation instructions can be found here.

+5
source share

you can specify the output file in your config as follows:

 junitReporter = { outputFile: 'reports/test-results.xml' }; 

The output file is then in XML format.

0
source share

All Articles