1 | # karma-junit-reporter
|
2 |
|
3 | > Reporter for the JUnit XML format.
|
4 |
|
5 | ## Installation
|
6 |
|
7 | The easiest way is to keep `karma-junit-reporter` as a devDependency in your `package.json`.
|
8 | ```json
|
9 | {
|
10 | "devDependencies": {
|
11 | "karma": "~0.10",
|
12 | "karma-junit-reporter": "~0.1"
|
13 | }
|
14 | }
|
15 | ```
|
16 |
|
17 | You can simple do it by:
|
18 | ```bash
|
19 | npm install karma-junit-reporter --save-dev
|
20 | ```
|
21 |
|
22 | ## Configuration
|
23 | ```js
|
24 | // karma.conf.js
|
25 | module.exports = function(config) {
|
26 | config.set({
|
27 | reporters: ['progress', 'junit'],
|
28 |
|
29 | // the default configuration
|
30 | junitReporter: {
|
31 | outputFile: 'test-results.xml',
|
32 | suite: ''
|
33 | }
|
34 | });
|
35 | };
|
36 | ```
|
37 |
|
38 | You can pass list of reporters as a CLI argument too:
|
39 | ```bash
|
40 | karma start --reporters junit,dots
|
41 | ```
|
42 |
|
43 | ----
|
44 |
|
45 | For more information on Karma see the [homepage].
|
46 |
|
47 |
|
48 | [homepage]: http://karma-runner.github.com
|