Make WebUI unit tests to generate results as JUnit

Now WebUI unit tests are generating results in qunit format which
is not consumable well by Jenkins.

This patch adds NPM dependency for adding generation results in
JUnit XML format so it can be easily processed.

Reviewed-By: Christian Heimes <cheimes@redhat.com>
This commit is contained in:
Alexey Slaykovsky 2018-03-15 23:26:35 +01:00 committed by Christian Heimes
parent 69599560c1
commit c450e2dc8f
3 changed files with 8 additions and 2 deletions

View File

@ -60,7 +60,7 @@ steps:
- dnf install -y npm
- cd ${container_working_dir}/install/ui/js/libs && make
- cd ${container_working_dir}/install/ui && npm install
- cd ${container_working_dir}/install/ui && node_modules/grunt/bin/grunt --verbose qunit
- cd ${container_working_dir}/install/ui && node_modules/grunt/bin/grunt --verbose test
tox:
# just run one pylint and one Python 3 target (time/coverage trade-off)
- tox -e py27,py36,pypi,pylint3

View File

@ -1,5 +1,8 @@
module.exports = function(grunt) {
grunt.initConfig({
qunit_junit: {
options: {}
},
qunit: {
all: [
'test/all_tests.html'
@ -7,5 +10,7 @@ module.exports = function(grunt) {
}
});
grunt.loadNpmTasks('grunt-qunit-junit');
grunt.loadNpmTasks('grunt-contrib-qunit');
grunt.registerTask('test', ['qunit_junit', 'qunit']);
};

View File

@ -42,7 +42,8 @@
},
"devDependencies": {
"grunt": "^1.0.1",
"grunt-contrib-qunit": "^2.0.0"
"grunt-contrib-qunit": "^2.0.0",
"grunt-qunit-junit": "^0.3.1"
},
"dependencies": {
"dojo": "~1.8.1"