-
Notifications
You must be signed in to change notification settings - Fork 985
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
[rfc ...] test: use verbose spec reporter #643
base: master
Are you sure you want to change the base?
Conversation
Codecov Report
@@ Coverage Diff @@
## master #643 +/- ##
=======================================
Coverage 74.36% 74.36%
=======================================
Files 13 13
Lines 1845 1845
=======================================
Hits 1372 1372
Misses 473 473 Continue to review full report at Codecov.
|
y? |
|
I am definitely in favour of displaying stacktraces on failed tests. |
Any thoughts on having the if (process.env.CI) {
const { SpecReporter } = require('jasmine-spec-reporter');
const reporter = new SpecReporter({
suite: {
displayNumber: true
},
spec: {
displayErrorMessages: true,
displayStacktrace: true,
displaySuccessful: false,
displayFailed: true,
displayPending: true,
displayDuration: true
},
summary: {
displayErrorMessages: false,
displayStacktrace: false,
displaySuccessful: false,
displayFailed: false,
displayPending: false,
displayDuration: true
}
});
jasmine.getEnv().clearReporters();
jasmine.getEnv().addReporter(reporter);
} The idea that I was thinking is we should only display the failed results and do not show any of the successful tests. This will help minimize the printout. Additionally, I am not entirely sure if we need this type of printout formatting locally. For sure, there is a benefit in the CI testing services. |
Agreed, but stacktraces for failed tests are displayed by Jasmine's default reporter as well. The reason I enabled the verbose logging in Another advantage of the verbose output is the ability to locate the origin of unwanted console output during tests. But in case that everything goes well (test finish quickly, no garbage printed to console) I actually prefer the more terse default output when running the tests locally. I like the solution proposed by @erisu that enables verbose output when running on CI services. Additionally, I would suggest also checking another environment variable that only controls this behavior (e.g. However, to have all advantages that I mentioned above, we should not disable output of successful tests in verbose mode. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
See above comments from over a month ago.
Co-authored-by: Christopher J. Brody <[email protected]> Co-authored-by: Raphael von der Grün <[email protected]>
15fe446
to
2a5a9b0
Compare
Thanks to @erisu and others for the feedback. I still fail to see much benefit of reducing the verbose test output in case of running I did make some updates to use the verbose reporter in "e2e-tests", which seems to only include a single create.spec.js test. I can think of a few more things we should consider:
I am keeping this PR in WIP status for now, will understand if others want to close it. |
…erbose-spec-reporter
Co-authored-by: エリス <[email protected]> Co-authored-by: Christopher J. Brody <[email protected]>
I tried moving |
Co-Authored-By: エリス <[email protected]>
No description provided.