Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Add parameter to test title in allure

I use Allure with jUnit. In parametrized test I see parameter in the title enter image description here

When I want to provide custom title via @Title annotation, these parameters is not shown. I tried to specify parameter as @Title("Test {0}") but it didn't work as well.

Is there a way to have custom title and parameter in the test case?

like image 248
just-boris Avatar asked Sep 14 '25 07:09

just-boris


1 Answers

How about setting name to @Parameterized annotation?

@Parameterized.Parameters(name = "My cool test {1} {2} {3}")

UPD: Allure gets @Title annotation value as is and does not support neither {method} nor {i} notation because it's being processed without aspects. Java on its turn does not allow dynamic expressions in annotations.

like image 54
vania-pooh Avatar answered Sep 17 '25 18:09

vania-pooh