Java Allure JUnit Maven-报告中未显示DisplayName

Java Allure JUnit Maven-报告中未显示DisplayName,java,maven,junit4,allure,Java,Maven,Junit4,Allure,我正在使用Java、JUnit4、Maven和Allure。无法使@DisplayName显示在我的报告中 下面是一个pom.xml <?xml version="1.0" encoding="UTF-8"?> 我已经通过brew安装了Allure,并使用如下方式: allure serve ./target/allure-report/ 但不显示@DisplayName或@Description,只显示我的测试比较方法的原始名称 我做错了

我正在使用Java、JUnit4、Maven和Allure。无法使@DisplayName显示在我的报告中

下面是一个pom.xml

<?xml version="1.0" encoding="UTF-8"?>
我已经通过brew安装了Allure,并使用如下方式:

allure serve ./target/allure-report/
但不显示@DisplayName或@Description,只显示我的测试比较方法的原始名称


我做错了什么?

JUnit4没有
@DisplayName
这是JUnit Jupiter又名JUnit5,而且所有依赖项看起来都像JUnit4。。。而不是JUnit5。。。此外,您使用maven编译器插件、maven surefire插件等插件的旧版本还有什么原因。请参阅此处了解当前版本的插件:
@Test
@DisplayName("Compare something with expected one")
@Description("This is ololo description")
public void testCompareSomething()
allure serve ./target/allure-report/