英文:
java.lang.NoSuchMethodError: org.hamcrest.beans.SamePropertyValuesAs.isNotNull(Ljava/lang/Object;Lorg/hamcrest/Description;)
问题
我在尝试使用IntelliJ(版本11.0.5,macOS)运行测试时遇到了这个问题。但是,当我使用Gradle命令运行测试时,一切正常。
我注意到,当我使用旧版本的gradle依赖来引入rest-assured库时,测试能够成功运行。
testCompile('io.rest-assured:rest-assured:3.x.x')
然而,我们目前的依赖是:
testCompile('io.rest-assured:rest-assured:4.1.0')
我想知道为什么只在IntelliJ中运行这些测试会出问题,而使用常规的Gradle构建时却可以正常运行。
英文:
I am facing this issue when I am trying to run the tests using intelliJ (Version 11.0.5) only.(macos). When i run tests using Gradle commands it works fine though.
I noticed I am able to run these test successfully with older gradle dependency for rest-assured library.
testCompile('io.rest-assured:rest-assured:3.x.x') how ever we have the current dependency as
testCompile('io.rest-assured:rest-assured:4.1.0'). Just wondering what is the issue with running them only in intelliJ as they run fine with regular Gradle build.
专注分享java语言的经验与见解,让所有开发者获益!
评论