运行测试配置时出错

时间:2019-06-26 07:11:58

标签: java eclipse selenium-webdriver nullpointerexception selenium-extent-report

我正在尝试生成范围报告。如果我单独运行测试用例,它可以工作,但是如果通过testng.xml运行,则显示错误

BasePage

Error

Error

I am in onStart method hub spot regression Test
Test Suite started!
Starting ChromeDriver 74.0.3729.6 (255758eccf3d244491b8a1317aa76e1ce10d57e9-refs/branch-heads/3729@{#29}) on port 17946
Only local connections are allowed.
Please protect ports used by ChromeDriver and related test frameworks to prevent access by malicious code.
[1561609348.589][WARNING]: This version of ChromeDriver has not been tested with Chrome version 75.
Jun 27, 2019 12:22:29 AM org.openqa.selenium.remote.ProtocolHandshake createSession
INFO: Detected dialect: OSS
I am in onTestStart method verifyLoginPageTitleTest start
I am in on TestFailure method verifyLoginPageTitleTest failed
Screenshot captured for test case:verifyLoginPageTitleTest
verifyLoginPageTitleTest failed!
I am in on TestFailure method verifyLoginPageTitleTest failed
Screenshot captured for test case:verifyLoginPageTitleTest
verifyLoginPageTitleTest failed!
I am in onFinish method hub spot regression Test
Test Suite is ending!

java.lang.NullPointerException
    at com.qa.hubspot.listeners.ExtentReportListener.onTestFailure(ExtentReportListener.java:98)
    at org.testng.internal.Invoker.runTestListeners(Invoker.java:1693)
    at org.testng.internal.Invoker.runTestListeners(Invoker.java:1677)
    at org.testng.internal.Invoker.invokeTestMethods(Invoker.java:1185)
    at org.testng.internal.TestMethodWorker.invokeTestMethods(TestMethodWorker.java:129)
    at org.testng.internal.TestMethodWorker.run(TestMethodWorker.java:112)
    at org.testng.TestRunner.privateRun(TestRunner.java:782)
    at org.testng.TestRunner.run(TestRunner.java:632)
    at org.testng.SuiteRunner.runTest(SuiteRunner.java:366)
    at org.testng.SuiteRunner.runSequentially(SuiteRunner.java:361)
    at org.testng.SuiteRunner.privateRun(SuiteRunner.java:319)
    at org.testng.SuiteRunner.run(SuiteRunner.java:268)
    at org.testng.SuiteRunnerWorker.runSuite(SuiteRunnerWorker.java:52)
    at org.testng.SuiteRunnerWorker.run(SuiteRunnerWorker.java:86)
    at org.testng.TestNG.runSuitesSequentially(TestNG.java:1244)
    at org.testng.TestNG.runSuitesLocally(TestNG.java:1169)
    at org.testng.TestNG.run(TestNG.java:1064)
    at org.testng.remote.RemoteTestNG.run(RemoteTestNG.java:113)
    at org.testng.remote.RemoteTestNG.initAndRun(RemoteTestNG.java:206)
    at org.testng.remote.RemoteTestNG.main(RemoteTestNG.java:177)

LoginPage

LoginPageTest

testng.xml

0 个答案:

没有答案