Skip to content
This repository was archived by the owner on Jan 14, 2019. It is now read-only.
This repository was archived by the owner on Jan 14, 2019. It is now read-only.

allure-testng-adaptor bug: Report shows wrong "pending" tests when using TestNG groups #880

@martoe

Description

@martoe

When running TestNG tests of a specific group, the Allure report shows all disabled tests (status "pending"), even if they are not part of the current group/suite.

For example, take the following TestNG class...

public class GroupTest {

  @Test(enabled = false)
  public void noGroupDisabled() {}
  
  @Test(groups = "myGroup")
  public void myGroup() {}
}

...and suite file:

<suite name="testsuite with groups">
  <test name="tests of myGroup">
    <groups><run><include name="myGroup"/></run></groups>
    <packages><package name=".*"/></packages>
  </test>
</suite>

This executes a single test ("myGroup"), so the expected output in the Allure dashboard would be one testcase with status "passed".
Actually, the dashboard shows two testcases: one "passed" and one "pending".

Hint:
In AllureTestListener.addPendingMathods() the "ITestContext.getExcludedMethods()" contains all disabled tests, but only those that are actually part of the current suite should be added...

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions