Could the default for reportTestSuiteErrors move to being enabled in a future release? #277
-
|
We recently tripped over this foot-gun with our testing suites. It feels like an odd choice to default to ignoring that test suites fail to run, considering it gives the false impression that tests have passed when they've actually failed entirely. Could a safer default be added in the next major release? There seems to be a bit of discussion here: #220 but the explanation doesn't seem to justify the downsides considering that users could still opt-out if they're sensitive to these kind of results. I don't think the default behaviour users expect for a test reporter is to suppress failures of any kind. For context, we use this reporter with a Github Action to get rich test reporting for our pull requests. |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 2 replies
-
|
Absolutely not. Here is the main issue and why that is the case. As you know, you can configure jest-junit to set suiteNameTemplate, className, etc so that your junit file is configured the way you want. Each of those test suites and test cases now are essentially a unique identifier. Many people ingest junit files into tooling to keep track of tests over time, so stability of identifiers matter. So why is this a problem? Well if you enable reportTestSuiteErrors and a test suite fails to load, we have to default to using file path as the identifier. If you aren't already configuring your test suites to utilize file path then we've effectively just introduced a new unique identifier you may not have expected. Systems like jenkins have plugins which can keep track of test flakiness so we have to keep default settings such that unique identifiers remain stable. Hope this helps. |
Beta Was this translation helpful? Give feedback.
Absolutely not.
Here is the main issue and why that is the case.
As you know, you can configure jest-junit to set suiteNameTemplate, className, etc so that your junit file is configured the way you want.
Each of those test suites and test cases now are essentially a unique identifier.
Many people ingest junit files into tooling to keep track of tests over time, so stability of identifiers matter.
So why is this a problem?
Well if you enable reportTestSuiteErrors and a test suite fails to load, we have to default to using file path as the identifier. If you aren't already configuring your test suites to utilize file path then we've effectively just introduced a new unique identifier you ma…