Enable JUnit report output during testRunner processing.#1901
Conversation
- Add reporter & reporterOptions to testRunner - Add support for xunit support - Add support for xunit output file
- change format of gulp.task to coincide with v4 - change order of defined tasks to work correctly
- gulp upgrade to v4
- add `mocha-junit-reporter` to dev deps - add `properties` reporterOption - add `mochaFile` reporterOption - set junit reporter options via env vars
- move MOCHA_ settings into constants - export the values as const - follow pattern of other env vars
|
Bit off too much, reverting the gulp upgrade... |
|
|
||
| // VSTS CI doesn't display colours correctly (yet). | ||
| if (IS_VSTS) { | ||
| options.useColors = false; |
There was a problem hiding this comment.
Please check useColors to true in line 26
| const options: testRunner.SetupOptions & { retries: number } = { | ||
| ui: 'tdd', | ||
| useColors: !IS_VSTS, | ||
| useColors: false, |
There was a problem hiding this comment.
The default value must be true if you're changing this to false further down.
Codecov Report
@@ Coverage Diff @@
## master #1901 +/- ##
==========================================
+ Coverage 74.42% 74.44% +0.02%
==========================================
Files 282 282
Lines 13260 13260
Branches 2385 2385
==========================================
+ Hits 9869 9872 +3
+ Misses 3260 3258 -2
+ Partials 131 130 -1
Continue to review full report at Codecov.
|
|
CI was interrupted for some reason...? |
|
Next todo: gather the logfiles and upload them into VSTS to see how we are doing. I don't love the test result logging at all, mocha doesn't seem to have a built-in 'tee' operation to get both the spec output to the console + JUnit report to a file. I'll explore some further options to see if I can get it to work in a more transparent way. |
|
Rebuild-go |
Fixes #1897
If the environment indicates the tests are being run on CI servers, the following environment variables are now inspected during test runs:
MOCHA_REPORTER_JUNIT: anyMOCHA_CI_REPORTFILE: stringMOCHA_CI_PROPERTIES: string{KEY:VALUE;[KEY2:VALUE2;]}) to add to the JUnit report fileThis pull request: