Languages

JUnit 5 - how to add text description to test method?

6 points
Asked by:
Emerson-V
333

I am looking for easy way to add custom text description for executed test methods. When test fails or successes, I want to see my own text instead of generated one.

Is there some extension or parameter to get it?

1 answer
5 points
Answered by:
Root-ssh
178180

Use @DisplayName annotation.

e.g.

 

0 commentsAdd comment
Donate to Dirask
Our content is created by volunteers - like Wikipedia. If you think, the things we do are good, donate us. Thanks!
Join to our subscribers to be up to date with content, news and offers.
Native Advertising
🚀
Get your tech brand or product in front of software developers.
For more information Contact us
Dirask - we help you to
solve coding problems.
Ask question.

❤️💻 🙂

Join