Skip to content

Annotation @Param doesn't work with TestNG framework #893

Closed

Description

@DLukov

Describe the bug
Annotation @PARAM doesn't work with TestNG framework

To Reproduce

  1. Mark data provider parameters with @PARAM annotation
  2. Run test
  3. See allure report
public class AllureParameterizedTest {
    @DataProvider
    public static Object[][] numbers() {
        return new Object[][] {
                {1, 1, 2},
                {2, 2, 4}
        };
    }
    @Test(dataProvider = "numbers")
    public void sumTest(
            @Param("First Number") Integer a,
            @Param("Second Number") Integer b,
            @Param(value = "Result", excluded = true) Integer r) { 

        step(("Arrange"), () ->{
            step(String.format("Take collection №[%s] of parameters", a));
        });
        step(("Act"), () -> {
            step(String.format("Add [%s]", a) + String.format("to [%s]", b));
        });
        step(("Assert"), () -> {
            step("Compare the sum");
            assert a + b == r;
        });
    }

}

Actual behavior
Params in allure report marked as arg0, arg1, etc.

Expected behavior
Params marked with text from @PARAM annotation

Screenshots
image

Versions:

  • allure-testng 2.13.1
  • testng 7.5

Activity

  1. sleepstream commented on Mar 28, 2023

    @sleepstream

    io.qameta.allure 2.21.0
    testng 7.7.0

    but in report has correct names of parameters
    изображение

    but i have flag exclude = true - and it's not working for me

  2. added 8 commits that reference this issue on Sep 22, 2024
  3. added a commit that references this issue on Nov 29, 2024
  4. added a commit that references this issue on Jan 14, 2025
  5. added theissue type on Jul 10, 2026
  6. removed
    pr:bugSomething isn't working
    on Jul 10, 2026
  7. added a commit that references this issue on Aug 12, 2026
    d8ebd65
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

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions