Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Mocha test reporter is hiding failures in the console output of AzDO #4759

Closed
d3r3kk opened this issue Mar 14, 2019 · 1 comment
Closed

Mocha test reporter is hiding failures in the console output of AzDO #4759

d3r3kk opened this issue Mar 14, 2019 · 1 comment
Assignees
Labels
debt Covers everything internal: CI, testing, refactoring of the codebase, etc.

Comments

@d3r3kk
Copy link

d3r3kk commented Mar 14, 2019

Our current 'custom mocha reporter' is causing problems diagnosing build issues.

The reporter is an extension class of the mocha-junit-reporter and is used to print out logging messages (in an AzDO friendly way) to the console, as well as collect JUnit-style logging output from the mocha test run.

The reporter caches all stdout/stderr during the mocha test run, and flushes it out to the console at the end of the mocha run.

Unfortunately, this causes an issue whenever a test run is aborted early. The flush never occurs, so the console output never gets logged into the AzDO report!

This makes it very difficult to determine the root cause of test failures on AzDO in some cases, and if the reproduction case is not reliable on local developer machines, makes it impossible to correct.

Remove the custom logger mocha-vsts-reporter.js from use and investigate replacements. We may not need this any longer at all as there has been work on the mocha unit tests that are outputting test logs already. (Also, AzDO console output supports colour proplerly now!).

@d3r3kk d3r3kk added needs PR debt Covers everything internal: CI, testing, refactoring of the codebase, etc. labels Mar 14, 2019
@d3r3kk d3r3kk self-assigned this Mar 14, 2019
@d3r3kk
Copy link
Author

d3r3kk commented Mar 14, 2019

One potential fix: Use the mocha-multiple-reporters extension and 'tee' the output between the current default reporter and to the mocha-junit-reporter.

@d3r3kk d3r3kk closed this as completed Mar 21, 2019
@ghost ghost removed the needs PR label Mar 21, 2019
@lock lock bot locked as resolved and limited conversation to collaborators Apr 18, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
debt Covers everything internal: CI, testing, refactoring of the codebase, etc.
Projects
None yet
Development

No branches or pull requests

1 participant