TestNG报错:Cannot load class from file
发布网友
发布时间:2024-03-29 22:05
我来回答
共1个回答
热心网友
时间:2024-06-20 06:58
[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中的多个值不能换行,如果有换行或者空格,删除