From 5c37303ca38eb58d0a258b73ae75ece3d114e3c7 Mon Sep 17 00:00:00 2001 From: Tim Buckley Date: Sat, 28 May 2016 15:47:39 -0600 Subject: [PATCH] Add karma-subunit-reporter This adds a new karma plugin, 'karma-subunit-reporter', to generate subunit streams for unit test output. These files should be compatible with stackviz itself (via stackviz-export) and other tools like subunit2sql and openstack-health. Change-Id: I8ee5425e1688fa090d5dc9fe3021345e779e2c07 --- .gitignore | 1 + package.json | 1 + test/karma.conf.js | 7 ++++++- 3 files changed, 8 insertions(+), 1 deletion(-) diff --git a/.gitignore b/.gitignore index 21d2183..53daf8e 100644 --- a/.gitignore +++ b/.gitignore @@ -5,6 +5,7 @@ build app/js/templates.js app/data *.py[cod] +karma.subunit # C extensions *.so diff --git a/package.json b/package.json index f166ee9..9b52aba 100644 --- a/package.json +++ b/package.json @@ -50,6 +50,7 @@ "karma-chrome-launcher": "0.2.3", "karma-coverage": "0.5.5", "karma-jasmine": "0.3.8", + "karma-subunit-reporter": "0.0.4", "morgan": "1.7.0", "nprogress": "^0.2.0", "pretty-hrtime": "1.0.2", diff --git a/test/karma.conf.js b/test/karma.conf.js index fdaf6cd..8f4970d 100644 --- a/test/karma.conf.js +++ b/test/karma.conf.js @@ -13,7 +13,7 @@ module.exports = function(config) { 'app/js/**/*.js': ['browserify', 'coverage'] }, browsers: ['Chrome'], - reporters: ['progress'], + reporters: ['progress', 'subunit'], autoWatch: true, singleRun: true, @@ -29,6 +29,11 @@ module.exports = function(config) { ] }, + subunitReporter: { + slug: true, + tags: ['worker-0'] + }, + proxies: { '/': 'http://localhost:9876/' },