Skip to content

Support @Param metadata for TestNG test parameters#1288

Merged
baev merged 2 commits into
mainfrom
fix-params
Jun 11, 2026
Merged

Support @Param metadata for TestNG test parameters#1288
baev merged 2 commits into
mainfrom
fix-params

Conversation

@baev

@baev baev commented Jun 11, 2026

Copy link
Copy Markdown
Member

Context

TestNG users can now use Allure’s @Param annotation on test method parameters to control how those parameters appear in the report. Custom names, hidden and masked modes, and excluded parameters are preserved for both data provider values and parameters supplied through TestNG XML.

This also fixes cases where TestNG injects framework parameters such as Method, ITestContext, ITestResult, XmlTest, or Object[] into a test method. Allure now skips those injected arguments when matching user-provided values to parameter names, so renamed parameters no longer produce duplicate stale entries or shift names onto the wrong values.

fixes #893

Checklist

@github-actions github-actions Bot added theme:testng TestNG related issue theme:core labels Jun 11, 2026
@baev baev added the type:bug Something isn't working label Jun 11, 2026
@github-actions

github-actions Bot commented Jun 11, 2026

Copy link
Copy Markdown

Allure Report Summary

Name Duration Stats New Flaky Retry Report
Allure Java – Pull request #1288 17m 49s Passed tests 1637   Skipped tests 2 0 0 0 View

@baev baev merged commit d8ebd65 into main Jun 11, 2026
10 checks passed
@baev baev deleted the fix-params branch June 11, 2026 15:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

theme:core theme:testng TestNG related issue type:bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Annotation @Param doesn't work with TestNG framework

2 participants