You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@maven.apache.org by "Elliotte Rusty Harold (Jira)" <ji...@apache.org> on 2019/12/19 19:43:00 UTC
[jira] [Updated] (SUREFIRE-779) Surefire reports wrong number of
failed tests when using JUnit's ErrorCollector rule
[ https://issues.apache.org/jira/browse/SUREFIRE-779?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Elliotte Rusty Harold updated SUREFIRE-779:
-------------------------------------------
Priority: Minor (was: Major)
> Surefire reports wrong number of failed tests when using JUnit's ErrorCollector rule
> ------------------------------------------------------------------------------------
>
> Key: SUREFIRE-779
> URL: https://issues.apache.org/jira/browse/SUREFIRE-779
> Project: Maven Surefire
> Issue Type: Bug
> Components: Maven Surefire Plugin
> Affects Versions: 2.10
> Reporter: Lieven Doclo
> Assignee: Tibor Digana
> Priority: Minor
>
> When running a test that contains an ErrorCollector, test failures are not correct when an errorcollector contains failures. For example:
> {noformat}
> public class ExampleTest {
> @Rule
> public ErrorCollector errorCollector = new ErrorCollector();
> @Test
> public void testWithErrorCollector() {
> errorCollector.checkThat(true, is(false));
> errorCollector.checkThat(3, is(4));
> }
> }
> {noformat}
> Surefire will reports 2 tests run (of which all failed). However, when you fix the same test so that no checks fail, Surefire will report 1 test run.
> This is incorrect, as this will result in false information in systems like Hudson or Sonar, the number of testcase should not fluctuate. Surefire should only report 1 test run, as that reflects the actual situation.
--
This message was sent by Atlassian Jira
(v8.3.4#803005)