allure-java icon indicating copy to clipboard operation
allure-java copied to clipboard

All configuration methods run by @Factory are listed under each "Set up"

Open yayaryna opened this issue 6 years ago • 2 comments

I'm submitting a ...

  • [x] bug report
  • [ ] feature request
  • [ ] support request => Please do not submit support request here, see note at the top of this template.

What is the current behavior?

When running tests with TestNG @factory annotation, all configuration methods are listed under each "Set up" in allure report. 2019-05-07_13h03_25

If the current behavior is a bug, please provide the steps to reproduce and if possible a minimal demo of the problem

Run the following class:

public class TestPoc {

    @TestInstanceParameter("Iteration")
    int i = 1;

    public TestPoc() {

    }

    public TestPoc(int i) {
        this.i = i;
    }

    @BeforeClass
    public void beforeClass() {
    }

    @Test
    public void stepFailDemo() {
        try {
            failStep();
        } catch (AssertionError e) {/*do nothing*/
        }
    }

    @Step("Failing step")
    private void failStep() {
        Assert.fail("Failing an inner step  " + i);
    }


    @Factory
    public Object[] myFactory() {
        return new Object[]{new TestPoc(5), new TestPoc(6), new TestPoc(7)};
    }
}

What is the expected behavior?

Expected behavior - In each "set up" should be shown just related test configuration methods, not all of them.

Please tell us about your environment:

Allure version 2.2.0
Test framework [email protected]
Allure integration [email protected]
Generate report using [email protected]

yayaryna avatar May 07 '19 10:05 yayaryna

Got same issue when @DataProvider + @Factory is used. @baev any updates or workaround on this one?

Taredel avatar Sep 30 '20 08:09 Taredel

workaround on this one?

don't know

any updates

I'll try to assign someone to this one, stay tuned

baev avatar Sep 30 '20 09:09 baev

Closed as stale. Please create a GitHub discussion if the feature is still needed.

baev avatar Jan 08 '24 18:01 baev