Skip to content

TestNG optional reporting for @After @Before failures #356

Closed

Description

@Gzyablik

I'm submitting a ...

  • feature request

What is the current behavior?

On Before/After(Class/Test) failures allure create reports as it was 'Test' and we have some inconvenience to displaying TeamCity allure reports. For example, next test class will report about two tests(one failed and one skipped)
public class Mytest { @BeforeMethod public void before() { Assert.fail(); } @Test public void test() { } }
This behavior was implemented with #135

What is the expected behavior?

Reporting of After/Before method to be optional. For example, using configuration flags.

What is the motivation / use case for changing the behavior?

Disabling the After/Before reporting was requested a sew times ago and those requests was rejected because of #135. My call is to make it optional to satisfy both behaviors with actual by default.

Please tell us about your environment:

| Test framework | testng@6.14.3 |
| Allure integration | allure-testng@2.9.0 |
| Generate report using | teamcity allure plugin |

Other information

We are using local snapshot with this workaround.
https://github.com/Gzyablik/allure-java/pull/1/files

Activity

  1. Proryanator commented on Mar 29, 2021

    @Proryanator

    I'd also love for this to get worked on/merged in. We recently upgraded to 2.13.6 of allure-testng, and didn't expect to see our config methods increasing the total count of tests.

    If this were an added feature where you could decide to either include them or to not, that'd be nice. It throws our reporting numbers off now if anything breaks in config methods for TestNG.

    Is there any more work to be done for this PR? If need be I can pickup where @Gzyablik started/left off.

  2. PavelChachotkinKudo commented on Jun 1, 2022

    @PavelChachotkinKudo

    I vote for this addition flag ))

  3. added a commit that references this issue on Feb 29, 2024
    3e3f173
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

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