๐: Allure step annotation causes all method parameter values are being added to the allure result json file.
tbarabanov opened this issue ยท 1 comments
tbarabanov commented
What happened?
allure @Step
annotation causes all method args are being added to the allure result json file
consider a case
public class DaTests {
@Test
public void doTest() {
doTestStep(List.of("a", "b", "c"));
}
@Step("some description here")
void doTestStep(List<String> values) {
}
}
allure result contains all Step
method args
"steps": [
{
"name": "some description here",
"status": "passed",
"stage": "finished",
"steps": [],
"attachments": [],
"parameters": [
{
"name": "values",
"value": "[a, b, c]"
}
],
"start": 1718895390012,
"stop": 1718895390013
}
]
I believe this should't happen. Described behaviour causes huge allure result files in our ci runner.
What Allure Integration are you using?
allure-java-commons, allure-junit5
What version of Allure Integration you are using?
2.22.3
What version of Allure Report you are using?
2.22.3
Code of Conduct
- I agree to follow this project's Code of Conduct
baev commented
You can use LifecycleListener
to post-process test results and remove unnecessary data. The other option is to wrap step parameters into a POJO and override the toString()
method.