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

Multiple failures in the same test should not duplicate testcase in Junit output #353

Open
FabienLydoire opened this issue Mar 30, 2019 · 2 comments

Comments

@FabienLydoire
Copy link

When a test raises several failures, a testcase tag is created for every failure, resulting in the wrong number of tests and failures in the testsuite tag.

The failures in the same test should be grouped in the unique testcase representing the test.
The number of failures in the testsuite tag should be the number of failed testcase, not the total number of failures raised by the tests included in the test suite.

  <testsuite name='MyAppUITests.TestClass' tests='3' failures='3'>
    <testcase classname='MyAppUITests.TestClass' name='testA'>
      <failure message='XCTAssertTrue failed'>Test.swift:34</failure>
    </testcase>
    <testcase classname='MyAppUITests.TestClass' name='testA'>
      <failure message='Lost connection to the application.'>Test.swift:41</failure>
    </testcase>
    <testcase classname='MyAppUITests.TestClass' name='testA'>
      <failure message='XCTAssertEqual failed:'>Test.swift:41</failure>
    </testcase>
  </testsuite>

Should be

  <testsuite name='MyAppUITests.TestClass' tests='1' failures='1'>
    <testcase classname='MyAppUITests.TestClass' name='testA'>
      <failure message='XCTAssertTrue failed'>Test.swift:34</failure>
      <failure message='Lost connection to the application.'>Test.swift:41</failure>
      <failure message='XCTAssertEqual failed:'>Test.swift:41</failure>
    </testcase>
  </testsuite>
@Earnin-MobileBuildTeam
Copy link

+1

1 similar comment
@saratchandrakarumuri
Copy link

+1

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants