karma test runner detailed test report in console
I was looking for something similar, and found this: https://github.com/usrz/javascript-karma-verbose-reporter. Generates this kind of output:
$ karma start --reporters=verbose
Suites and tests results:
- the app.router.config module :
* contains a router property : ok
* configures the router title : ok
* should have a login route : ok
- the organization module :
* contains a state property : ok
* should have a streams route after configuration : ok
* when activated, should set state based on organization in route : ok
- the streams module :
* points to state : ok
* loads organization streams upon activation : ok
* loads organization streams via API : ok
Browser results:
- PhantomJS 1.9.8 (Mac OS X 0.0.0): 9 tests
- 9 ok
To make this a default option, you can add this to your karma config, e.g.:
reporters: ['verbose', 'junit']
I've just finished a HTML reporter for Karma, so you could add it to the reporters. You will get some additional information as in the console but you can go with "singleRun = true" in your configuration. The plugin is located here:
https://npmjs.org/package/karma-htmlfile-reporter
After installing the plugin via "npm install karma-htmlfile-reporter -g", you just need to add some lines to your karma.conf.js:
reporters: ['progress', 'html'],
htmlReporter: {
outputFile: 'tests/units.html'
},
plugins: [
// ... your other plugins here
'karma-htmlfile-reporter'
]
Now, after running your Karma tests, the plugin will produce a styled HTML file you can view in your browser.