Browser is not invoking thru Jenkins | Selenium Forum
S
sumit kalra Posted on 31/08/2021

Hi Ashish,

My maven is configured in my machine and the same path is given in jenkins as  well(In "maven home" in global tool configuration page). I am using my ZOHO BDD code which is present in my machine. I am getting below error message and browser does not invokes. Can you please guide me what is the error and how to fix it.






Tests run: 0, Failures: 0, Errors: 0, Skipped: 0 [INFO] ------------------------------------------------------------------------ [INFO] BUILD FAILURE [INFO] ------------------------------------------------------------------------ [INFO] Total time: 33.689 s [INFO] Finished at: 2021-08-31T10:13:13+05:30 [INFO] ------------------------------------------------------------------------ [ERROR] Failed to execute goal org.apache.maven.plugins:maven-surefire-plugin:2.19.1:test (default-test) on project ZOHOCucumberPOM: Execution default-test of goal org.apache.maven.plugins:maven-surefire-plugin:2.19.1:test failed: There was an error in the forked process [ERROR] java.lang.NullPointerException [ERROR] at zoho.reports.TestUtil.captureScreenshot(TestUtil.java:28) [ERROR] at zoho.managers.CustomListeners.onTestFailure(CustomListeners.java:70) [ERROR] at org.testng.internal.TestListenerHelper.runTestListeners(TestListenerHelper.java:66) [ERROR] at org.testng.internal.TestInvoker.runTestResultListener(TestInvoker.java:219) [ERROR] at org.testng.internal.TestInvoker$MethodInvocationAgent.invoke(TestInvoker.java:826) [ERROR] at org.testng.internal.TestInvoker.invokeTestMethods(TestInvoker.java:146) [ERROR] at org.testng.internal.TestMethodWorker.invokeTestMethods(TestMethodWorker.java:146) [ERROR] at org.testng.internal.TestMethodWorker.run(TestMethodWorker.java:128) [ERROR] at java.util.ArrayList.forEach(ArrayList.java:1249) [ERROR] at org.testng.TestRunner.privateRun(TestRunner.java:766) [ERROR] at org.testng.TestRunner.run(TestRunner.java:587) [ERROR] at org.testng.SuiteRunner.runTest(SuiteRunner.java:384) [ERROR] at org.testng.SuiteRunner.runSequentially(SuiteRunner.java:378) [ERROR] at org.testng.SuiteRunner.privateRun(SuiteRunner.java:337) [ERROR] at org.testng.SuiteRunner.run(SuiteRunner.java:286) [ERROR] at org.testng.SuiteRunnerWorker.runSuite(SuiteRunnerWorker.java:53) [ERROR] at org.testng.SuiteRunnerWorker.run(SuiteRunnerWorker.java:96) [ERROR] at org.testng.TestNG.runSuitesSequentially(TestNG.java:1187) [ERROR] at org.testng.TestNG.runSuitesLocally(TestNG.java:1109) [ERROR] at org.testng.TestNG.runSuites(TestNG.java:1039) [ERROR] at org.testng.TestNG.run(TestNG.java:1007) [ERROR] at org.apache.maven.surefire.testng.TestNGExecutor.run(TestNGExecutor.java:281) [ERROR] at org.apache.maven.surefire.testng.TestNGXmlTestSuite.execute(TestNGXmlTestSuite.java:75) [ERROR] at org.apache.maven.surefire.testng.TestNGProvider.invoke(TestNGProvider.java:121) [ERROR] at org.apache.maven.surefire.booter.ForkedBooter.invokeProviderInSameClassLoader(ForkedBooter.java:290) [ERROR] at org.apache.maven.surefire.booter.ForkedBooter.runSuitesInProcess(ForkedBooter.java:242) [ERROR] at org.apache.maven.surefire.booter.ForkedBooter.main(ForkedBooter.java:121) [ERROR] [ERROR] -> [Help 1] [ERROR] [ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch. [ERROR] Re-run Maven using the -X switch to enable full debug logging. [ERROR] [ERROR] For more information about the errors and possible solutions, please read the following articles: [ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/PluginExecutionException Build step 'Invoke top-level Maven targets' marked build as failure
Finished: FAILURE

A
Ashish Replied on 03/09/2021

NullPointerException
[ERROR] 	at zoho.reports.TestUtil.captureScreenshot

This is nthe location where null pointer exception is coming