当我使用selenium webdriver运行TestNG套件时,我看到了这个异常。有人可以帮我调试吗?

时间:2015-01-10 06:35:25

标签: java selenium selenium-webdriver

我发现代码没有达到@BeforeSuite方法。没有一个案例正在运行。不确定我在哪里做错了。 异常跟踪

Running TestSuite
org.apache.maven.surefire.util.SurefireReflectionException: java.lang.reflect.InvocationTargetException; nested exception is  java.lang.reflect.InvocationTargetException: null
java.lang.reflect.InvocationTargetException
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:606)
at org.apache.maven.surefire.util.ReflectionUtils.invokeMethodWithArray(ReflectionUtils.java:189)
at org.apache.maven.surefire.booter.ProviderFactory$ProviderProxy.invoke(ProviderFactory.java:165)
at org.apache.maven.surefire.booter.ProviderFactory.invokeProvider(ProviderFactory.java:85)
at org.apache.maven.surefire.booter.ForkedBooter.runSuitesInProcess(ForkedBooter.java:103)
at org.apache.maven.surefire.booter.ForkedBooter.main(ForkedBooter.java:74)
Caused by: org.testng.TestNGException: java.lang.NullPointerException
at org.testng.TestNG.initializeSuitesAndJarFile(TestNG.java:340)
at org.testng.TestNG.run(TestNG.java:1003)
at org.apache.maven.surefire.testng.TestNGExecutor.run(TestNGExecutor.java:177)
at org.apache.maven.surefire.testng.TestNGXmlTestSuite.execute(TestNGXmlTestSuite.java:92)
at org.apache.maven.surefire.testng.TestNGProvider.invoke(TestNGProvider.java:105)
... 9 more
Caused by: java.lang.NullPointerException
at org.testng.xml.Parser.parse(Parser.java:189)
at org.testng.TestNG.initializeSuitesAndJarFile(TestNG.java:310)
... 13 more

Results :

Tests run: 0, Failures: 0, Errors: 0, Skipped: 0

0 个答案:

没有答案