allure2 icon indicating copy to clipboard operation
allure2 copied to clipboard

[TestNG] All Set Up methods are listed in each test case when @Factory is used

Open Taredel opened this issue 5 years ago • 0 comments

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 allureFactoryBug

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

Taredel avatar Sep 30 '20 08:09 Taredel