Skip to content

[Allure-TestNG] TestCaseId adding in process of building TestResult object #470

@Bohdan-Khylia

Description

@Bohdan-Khylia

I'm submitting a ...

  • 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?

Now, TestResult object contains null value for the field TestCaseId in process of test case execution.

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

Implement listener TestLifecycleListener(location: allure-java-commons/src/main/java/io/qameta/allure/listener/TestLifecycleListener.java) for the new class.
Override method afterTestStart(TestResult result)
Write log info for result.getTestCaseId().
Add new class to the testng.xml.
Run any test with @AllureId("Any_Id") annotation from testng.xml.

What is the expected behavior?

TestResult object should have TestCaseId value, that received from @AllureId() annotation

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

Please tell us about your environment:

Allure version 2.2.0
Test framework testng@7.0.0
Allure integration allure-testng@2.13.5
Generate report using maven-surefire-plugin@3.0.0-M4

Other information

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