TestNG报错:Cannot load class from
2019-03-07 本文已影响0人
Loistein
[RemoteTestNG] detected TestNG version 6.8.9
Exception in thread "main" org.testng.TestNGException:
Cannot load class from file:
at org.testng.internal.ClassHelper.fileToClass(ClassHelper.java:519)
at org.testng.TestNG.configure(TestNG.java:1452)
at org.testng.remote.AbstractRemoteTestNG.configure(AbstractRemoteTestNG.java:75)
at org.testng.remote.RemoteTestNG.initAndRun(RemoteTestNG.java:235)
at org.testng.remote.RemoteTestNG.main(RemoteTestNG.java:77)
Picked up JAVA_TOOL_OPTIONS: -Dfile.encoding=UTF8
解决办法:
pom.xml中:
检查maven-surefire-plugin的plugin,检查property,name = listener,value中的多个值不能换行,如果有换行或者空格,删除