URL: https://github.com/freeipa/freeipa/pull/1696 Author: slaykovsky Title: #1696: Make WebUI unit tests to generate results as JUnit Action: opened
PR body: """ 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. """ To pull the PR as Git branch: git remote add ghfreeipa https://github.com/freeipa/freeipa git fetch ghfreeipa pull/1696/head:pr1696 git checkout pr1696
From 3b87db92ef59034cb031eea3d465c0ce33c5d967 Mon Sep 17 00:00:00 2001 From: Alexey Slaykovsky <ale...@slaykovsky.com> Date: Thu, 15 Mar 2018 23:26:35 +0100 Subject: [PATCH] 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. --- .test_runner_config.yaml | 2 +- install/ui/Gruntfile.js | 5 +++++ install/ui/src/freeipa/package.json | 3 ++- 3 files changed, 8 insertions(+), 2 deletions(-) diff --git a/.test_runner_config.yaml b/.test_runner_config.yaml index 07f4a97152..125c1ea7f7 100644 --- a/.test_runner_config.yaml +++ b/.test_runner_config.yaml @@ -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 diff --git a/install/ui/Gruntfile.js b/install/ui/Gruntfile.js index 2c7d35df45..ba46411277 100644 --- a/install/ui/Gruntfile.js +++ b/install/ui/Gruntfile.js @@ -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']); }; diff --git a/install/ui/src/freeipa/package.json b/install/ui/src/freeipa/package.json index f666bd6cff..8ba114ec42 100644 --- a/install/ui/src/freeipa/package.json +++ b/install/ui/src/freeipa/package.json @@ -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"
_______________________________________________ FreeIPA-devel mailing list -- freeipa-devel@lists.fedorahosted.org To unsubscribe send an email to freeipa-devel-le...@lists.fedorahosted.org