一次令人头秃的小记:java.lang.NoSuchMethodError: io.qameta.allure.model.TestResultContainer.setUuid(Ljava/lang/String;)Lio/qameta/allure/model/TestResultContainer;

背景:要给一个新项目写UI自动化,找了份去年的代码,把配置直接复制过来了。中间不知道哪一步出现错误,一直报错。

查问题:上来就百度,百度的各种,引入的jar包版本过低、类冲突、Jar包冲突、Jar包版本冲突、有类没方法、有方法没部署

 

实际原因,

查到原因,某包确实存在冲突

 

 

实际原因:

某包的库不支持某方法,直接添加了另一个版本的依赖。导致冲突

<dependency>
<groupId>io.qameta.allure</groupId>
<artifactId>allure-testng</artifactId>
<version>2.12.1</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>io.qameta.allure</groupId>
<artifactId>allure-java-commons</artifactId>
<version>2.12.1</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>io.qameta.allure</groupId>
<artifactId>allure-java-commons</artifactId>
<version>2.6.0</version>
<scope>test</scope>
</dependency>
以上,换成同一个版本即可
posted @ 2022-02-16 15:36  小町  阅读(129)  评论(0编辑  收藏  举报