Skip to content
This repository has been 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

Closed
martoe opened this issue Nov 26, 2016 · 0 comments

Comments

@martoe
Copy link
Contributor

martoe commented Nov 26, 2016

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...

martoe pushed a commit to martoe/allure-core that referenced this issue Nov 26, 2016
martoe pushed a commit to martoe/allure-core that referenced this issue Nov 27, 2016
@baev baev closed this as completed in 5ec4ee6 Dec 17, 2016
wuhuizuo pushed a commit to wuhuizuo/allure-core that referenced this issue Apr 1, 2017
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant