From 6b07d086f978d57f089b6c47d781526ca4f90b73 Mon Sep 17 00:00:00 2001 From: Michael Sommer Date: Thu, 24 Jul 2014 15:43:44 +0200 Subject: [PATCH] Using the karma junit reporter plugin to write junit results to karma build folder. --- src/lib/karmaServer.js | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/src/lib/karmaServer.js b/src/lib/karmaServer.js index 967c6641..9b070f5c 100644 --- a/src/lib/karmaServer.js +++ b/src/lib/karmaServer.js @@ -17,7 +17,11 @@ function KarmaServer(karmaPath, options) { ], proxies: options.proxies || {}, preprocessors: options.preprocessors || {}, - reporters: ["dots"], + reporters: ["dots", "junit"], + junitReporter: { + outputFile: 'test-results.xml', + suite: '' + }, colors: true, autoWatch: false, browsers: options.browsers || [], @@ -28,7 +32,8 @@ function KarmaServer(karmaPath, options) { "karma-chrome-launcher", "karma-firefox-launcher", "karma-phantomjs-launcher", - "karma-ie-launcher" + "karma-ie-launcher", + "karma-junit-reporter" ].concat(options.plugins || []) };