Warning: file_get_contents(/data/phpspider/zhask/data//catemap/4/maven/5.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Maven 在JDK1.8上运行TestNG testcase时获取IllegalArgumentException_Maven_Java 8_Testng_Maven Surefire Plugin - Fatal编程技术网

Maven 在JDK1.8上运行TestNG testcase时获取IllegalArgumentException

Maven 在JDK1.8上运行TestNG testcase时获取IllegalArgumentException,maven,java-8,testng,maven-surefire-plugin,Maven,Java 8,Testng,Maven Surefire Plugin,当我尝试运行测试用例(testng-6.9.4)时,将java升级到1.8版本后,运行它时出现以下异常 我也在使用 maven surefire插件2.18.1版。 com.googlecode.jmockit版本0.999.15 异常日志: ------------------------------------------------------- T E S T S ------------------------------------------------------- R

当我尝试运行测试用例(
testng-6.9.4
)时,将java升级到1.8版本后,运行它时出现以下异常

我也在使用
maven surefire插件
2.18.1版。 com.googlecode.jmockit版本0.999.15

异常日志:

    -------------------------------------------------------
 T E S T S
-------------------------------------------------------
Running com.x.SampleTest
Configuring TestNG with: TestNG652Configurator
Tests run: 0, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 1.979 sec - in com.x.SampleTest
st
Running com.x.OtherFileImplTest
Configuring TestNG with: TestNG652Configurator
Tests run: 2, Failures: 2, Errors: 0, Skipped: 0, Time elapsed: 2.271 sec <<< FAILURE! - in com.x.OtherFileImplTest
testRetrieveCollectionOfViews(com.x.OtherFileImplTest)  Time elapsed: 0.022 sec  <<< FAILURE!
java.lang.IllegalArgumentException: null
        at org.apache.maven.surefire.testng.TestNGExecutor.run(TestNGExecutor.java:115)
        at org.apache.maven.surefire.testng.TestNGDirectoryTestSuite.executeSingleClass(TestNGDirectoryTestSuite.java:129)
        at org.apache.maven.surefire.testng.TestNGDirectoryTestSuite.execute(TestNGDirectoryTestSuite.java:113)
        at org.apache.maven.surefire.testng.TestNGProvider.invoke(TestNGProvider.java:111)
        at org.apache.maven.surefire.booter.ForkedBooter.invokeProviderInSameClassLoader(ForkedBooter.java:203)
        at org.apache.maven.surefire.booter.ForkedBooter.runSuitesInProcess(ForkedBooter.java:155)
        at org.apache.maven.surefire.booter.ForkedBooter.main(ForkedBooter.java:103)
-------------------------------------------------------
T T S T S
-------------------------------------------------------
运行com.x.SampleTest
使用:TestNG652配置器配置TestNG
测试运行:0,失败:0,错误:0,跳过:0,运行时间:1.979秒-在com.x.SampleTest中
圣
正在运行com.x.OtherFileImplTest
使用:TestNG652配置器配置TestNG

测试运行:2,失败:2,错误:0,跳过:0,所用时间:2.271秒是否还有其他日志?在surefire源代码中,没有任何东西表明抛出了异常,但异常上方应该有一行,以“
配置TestNG with:…”
+1开头。该异常不应该出现,或者堆栈跟踪的某些部分缺失。请参阅更新的异常日志@Kenney,log有类似于“使用:TestNG652Configurator配置TestNG”的内容,您可以在单独的JVM中尝试,看看这是否会改变什么。(也就是说,
1我也有这个配置,但仍然存在问题。你有更多的日志吗?在surefire源中,没有任何迹象表明有异常被抛出,但是在异常上方应该有一行,以
配置TestNG开始:…
+1此异常不应该存在,或者堆栈跟踪的某个部分是m。)issing.See更新了异常日志…@Kenney,日志中有类似“使用:TestNG652Configurator配置TestNG”的内容。您可以在单独的JVM中尝试,看看这是否会改变任何内容。(例如,
1我也有此配置,但仍然存在问题。)。