allure2
allure2 copied to clipboard
[TestNG] All Set Up methods are listed in each test case when @Factory is used
Describe the bug When testNG @Factory is used all set up methods are listed in each test case
To Reproduce Steps to reproduce the behavior:
public class FactoryAllureTest {
@TestInstanceParameter
private String testCase;
public FactoryAllureTest(String testCase) {
this.testCase = testCase;
}
@Factory
public Object[] myFactory() {
return new Object[]{new FactoryAllureTest("testCase1"), new FactoryAllureTest("testCase2"), new FactoryAllureTest("testCase3")};
}
@BeforeClass
public void start() {
System.out.println(testCase);
}
@Test
public void simpleTest() {
System.out.println(testCase);
}
}
Expected behavior
The Set up section must only display configuration methods for the current test.
Screenshots
Environment (please complete the following information):
| Allure version | 2.13.3 |
|---|---|
| Test framework | [email protected] |
| Allure adaptor | [email protected] |
| Generate report using | [email protected] |
Additional context This issue is duplicate of https://github.com/allure-framework/allure-java/issues/350 but that one was for Allure so since the issue still exists, I created it for Allure 2