Browser is not invoking thru Jenkins | Selenium Forum
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( [ERROR] at zoho.managers.CustomListeners.onTestFailure( [ERROR] at org.testng.internal.TestListenerHelper.runTestListeners( [ERROR] at org.testng.internal.TestInvoker.runTestResultListener( [ERROR] at org.testng.internal.TestInvoker$MethodInvocationAgent.invoke( [ERROR] at org.testng.internal.TestInvoker.invokeTestMethods( [ERROR] at org.testng.internal.TestMethodWorker.invokeTestMethods( [ERROR] at [ERROR] at java.util.ArrayList.forEach( [ERROR] at org.testng.TestRunner.privateRun( [ERROR] at [ERROR] at org.testng.SuiteRunner.runTest( [ERROR] at org.testng.SuiteRunner.runSequentially( [ERROR] at org.testng.SuiteRunner.privateRun( [ERROR] at [ERROR] at org.testng.SuiteRunnerWorker.runSuite( [ERROR] at [ERROR] at org.testng.TestNG.runSuitesSequentially( [ERROR] at org.testng.TestNG.runSuitesLocally( [ERROR] at org.testng.TestNG.runSuites( [ERROR] at [ERROR] at [ERROR] at org.apache.maven.surefire.testng.TestNGXmlTestSuite.execute( [ERROR] at org.apache.maven.surefire.testng.TestNGProvider.invoke( [ERROR] at org.apache.maven.surefire.booter.ForkedBooter.invokeProviderInSameClassLoader( [ERROR] at org.apache.maven.surefire.booter.ForkedBooter.runSuitesInProcess( [ERROR] at org.apache.maven.surefire.booter.ForkedBooter.main( [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] Build step 'Invoke top-level Maven targets' marked build as failure
Finished: FAILURE

Ashish Replied on 03/09/2021

[ERROR] 	at zoho.reports.TestUtil.captureScreenshot

This is nthe location where null pointer exception is coming