Skip to content

Commit

Permalink
Merge pull request #2268 from benjaminapetersen/bpetersen/test-junit-…
Browse files Browse the repository at this point in the history
…output

Automatic merge from submit-queue.

Add junit reporter for unit tests

@spadgett @stevekuznetsov 

Adds the junit reporter for our unit tests.  Will work on adding this for e2e next (seems like there is some tinkering that needs to be done).

Related to openshift-eng/aos-cd-jobs#730.
- generates the directory & files expected for the above PR to be meaningful.
  • Loading branch information
openshift-merge-robot authored Oct 14, 2017
2 parents 4c16ab5 + 784b87a commit 8b7c0d9
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 5 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -8,3 +8,4 @@ phantomjsdriver.log
openshift-jvm
/app/config.local.js
.DS_Store
test/junit/
7 changes: 4 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -40,19 +40,20 @@
"grunt-wiredep": "3.0.0",
"html-minifier": "1.1.1",
"imagemin": "1.0.5",
"jasmine-core": "^2.8.0",
"jasmine-beforeall": "0.1.1",
"jasmine-core": "^2.8.0",
"jasmine-spec-reporter": "1.1.2",
"jshint-stylish": "0.2.0",
"karma": "^1.7.1",
"karma-chrome-launcher": "^2.2.0",
"karma-coverage": "^1.1.1",
"karma-firefox-launcher": "^1.0.1",
"karma-jasmine": "^1.1.0",
"karma-ng-html2js-preprocessor": "^1.0.0",
"karma-jasmine-diff-reporter": "^1.1.0",
"karma-phantomjs-launcher": "^1.0.4",
"karma-junit-reporter": "^1.2.0",
"karma-ng-html2js-preprocessor": "^1.0.0",
"karma-nightmare": "^0.4.10",
"karma-phantomjs-launcher": "^1.0.4",
"less": "2.6.1",
"load-grunt-tasks": "0.4.0",
"lodash": "3.10.1",
Expand Down
10 changes: 8 additions & 2 deletions test/karma.conf.js
Original file line number Diff line number Diff line change
Expand Up @@ -131,7 +131,8 @@ module.exports = function(config) {
'karma-ng-html2js-preprocessor',
'karma-jasmine',
'karma-coverage',
'karma-jasmine-diff-reporter'
'karma-jasmine-diff-reporter',
'karma-junit-reporter'
],

// Continuous Integration mode
Expand Down Expand Up @@ -161,7 +162,7 @@ module.exports = function(config) {
},

// order of reporters matters, input/output may break
reporters: ['jasmine-diff', 'progress', 'coverage'],
reporters: ['jasmine-diff', 'progress', 'coverage', 'junit'],

coverageReporter: {
type: 'text',
Expand All @@ -174,6 +175,11 @@ module.exports = function(config) {
legacy: true
},

junitReporter: {
// will be resolved to basePath (in the same way as files/exclude patterns)
outputDir: 'test/junit/'
},

nightmareOptions: {
width: 1048,
height: 600,
Expand Down

0 comments on commit 8b7c0d9

Please sign in to comment.