Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Is there a nicer UI for karma-runner? [closed]

I'm using 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 nicer HTML UI for this??

Thanks!

like image 829
Dor Cohen Avatar asked Jul 04 '13 11:07

Dor Cohen


People also ask

Does karma run tests in parallel?

A Karma JS plugin to support sharding tests to run in parallel across multiple browsers.

How do you run karma with Jasmine?

We can run Jasmine tests in a browser ourselves by setting up and loading a HTML file, but more commonly we use a command-line tool called Karma. Karma handles the process of creating HTML files, opening browsers and running tests and returning the results of those tests to the command line.

What is the default capture time out in karma?

The capture timeout is set to the default value (60000).

Is Karma a test runner?

Karma is a test runner for JavaScript that runs on Node. js. It is very well suited to testing AngularJS or any other JavaScript projects. Using Karma to run tests using one of many popular JavaScript testing suites (Jasmine, Mocha, QUnit, etc.)


2 Answers

You can use my HTML reporter plugin:

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

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

reporters: ['progress', 'html'],

htmlReporter: {
  outputFile: 'tests/units.html'
}

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

like image 109
Matthias Avatar answered Oct 29 '22 04:10

Matthias


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

like image 26
Dusty Avatar answered Oct 29 '22 04:10

Dusty