Unverified Commit 88ff339f authored by Buck Doyle's avatar Buck Doyle Committed by GitHub
Browse files

CI: add xUnit reporting for UI tests (#7585)

This surfaces test failures more clearly on CircleCI by adding
testem-multi-reporter to report both via the default TAP reporter
as well as an xUnit reporter whose output is stored as an artefact.
parent ec457bf6
Showing with 74 additions and 3 deletions
+74 -3
......@@ -454,8 +454,12 @@ jobs:
command: cd ui && yarn run lint:hbs
name: lint:hbs
- run:
command: cd ui && yarn test
command: mkdir -p /tmp/test-reports && cd ui && yarn test
name: Ember tests
- store_test_results:
path: /tmp/test-reports
- store_artifacts:
path: /tmp/test-reports
lint-go:
docker:
- image: golang:1.14.1
......
......@@ -24,4 +24,8 @@ steps:
command: cd ui && yarn run lint:hbs
- run:
name: Ember tests
command: cd ui && yarn test
command: mkdir -p /tmp/test-reports && cd ui && yarn test
- store_test_results:
path: /tmp/test-reports
- store_artifacts:
path: /tmp/test-reports
\ No newline at end of file
......@@ -116,6 +116,8 @@
"query-string": "^5.0.0",
"qunit-dom": "^0.9.0",
"sass": "^1.17.3",
"testem": "^3.0.3",
"testem-multi-reporter": "^1.2.0",
"text-encoder-lite": "^2.0.0",
"xterm": "^4.2.0-vscode1",
"xterm-addon-fit": "^0.3.0"
......
/* eslint-env node */
module.exports = {
const MultiReporter = require('testem-multi-reporter');
const TapReporter = require('testem/lib/reporters/tap_reporter');
const XunitReporter = require('testem/lib/reporters/xunit_reporter');
const fs = require('fs');
const config = {
test_page: 'tests/index.html?hidepassed',
disable_watching: true,
launch_in_ci: ['Chrome'],
......@@ -23,3 +28,19 @@ module.exports = {
}
}
};
if (process.env.CI) {
const reporters = [{
ReporterClass: TapReporter,
args: [false, null, { get: () => false }]
}, {
ReporterClass: XunitReporter,
args: [false, fs.createWriteStream('/tmp/test-reports/ui.xml'), { get: () => false }]
}];
const multiReporter = new MultiReporter({ reporters });
config.reporter = multiReporter;
}
module.exports = config;
......@@ -15142,6 +15142,11 @@ terser@^4.1.2:
source-map "~0.6.1"
source-map-support "~0.5.12"
 
testem-multi-reporter@^1.2.0:
version "1.2.0"
resolved "https://registry.yarnpkg.com/testem-multi-reporter/-/testem-multi-reporter-1.2.0.tgz#e93abdee54f821eb464232aba6b6483f2802664e"
integrity sha512-ttIds/wpU0njpRBQsDl+tcPOy8jvafad6MCEIy21+BpNEcpCBZWrYuNva8TtxaZcoLuFTW0B8FsWl6XuJfH3rQ==
testem@^2.14.0:
version "2.17.0"
resolved "https://registry.yarnpkg.com/testem/-/testem-2.17.0.tgz#1cb4a2a90524a088803dfe52fbf197a6fd73c883"
......@@ -15177,6 +15182,41 @@ testem@^2.14.0:
tmp "0.0.33"
xmldom "^0.1.19"
 
testem@^3.0.3:
version "3.0.3"
resolved "https://registry.yarnpkg.com/testem/-/testem-3.0.3.tgz#d59f1ffbcf497909aca5580b0496e6506350d7b8"
integrity sha512-mdBCCn8LlTmgFDpexemyGP4cjO1V0VASs/qbPGZk8Qo05EBnmch29LIqxvWUDih/nA6eau3reXp0rNEef7qpCw==
dependencies:
backbone "^1.1.2"
bluebird "^3.4.6"
charm "^1.0.0"
commander "^2.6.0"
compression "^1.7.4"
consolidate "^0.15.1"
execa "^1.0.0"
express "^4.10.7"
fireworm "^0.7.0"
glob "^7.0.4"
http-proxy "^1.13.1"
js-yaml "^3.2.5"
lodash.assignin "^4.1.0"
lodash.castarray "^4.4.0"
lodash.clonedeep "^4.4.1"
lodash.find "^4.5.1"
lodash.uniqby "^4.7.0"
mkdirp "^0.5.1"
mustache "^3.0.0"
node-notifier "^5.0.1"
npmlog "^4.0.0"
printf "^0.5.1"
rimraf "^2.4.4"
socket.io "^2.1.0"
spawn-args "^0.2.0"
styled_string "0.0.1"
tap-parser "^7.0.0"
tmp "0.0.33"
xmldom "^0.1.19"
text-encoder-lite@^2.0.0:
version "2.0.0"
resolved "https://registry.yarnpkg.com/text-encoder-lite/-/text-encoder-lite-2.0.0.tgz#3c865dd6f3720b279c9e370f8f36c831d2cee175"
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment