Question

I'm testing JsTestDriver with Jenkins locally on Windows XP with Cygwin (at the front of my system Path).

Jenkins calls a .sh script which contains the following:

java -jar "D:\Tools\jstestdriverexample\JsTestDriver-1.3.4.b.jar" --port 9876 --server http://localhost:9876 --tests all --reset --config jsTestDriver-Jasmine.conf --testOutput results-jasmine --browser "C:/Program Files/Internet Explorer/iexplore.exe","C:/Program Files/Mozilla Firefox/firefox.exe","C:\Documents and Settings\alynch\Local Settings\Application Data\Google\Chrome\Application\chrome.exe"

When Google Chrome is included, the Jenkins job stalls and I eventually get this error in the console output:

Failures during test run.
Caused by:
Tried 1times: 
com.google.jstestdriver.util.RetryException: 
Failure 1: java.lang.NullPointerException
    at com.google.jstestdriver.util.RetryingCallable.call(RetryingCallable.java:62)
    at java.util.concurrent.FutureTask$Sync.innerRun(Unknown Source)
    at java.util.concurrent.FutureTask.run(Unknown Source)
    at java.util.concurrent.Executors$RunnableAdapter.call(Unknown 
    at java.util.concurrent.FutureTask$Sync.innerRun(Unknown 
    at java.util.concurrent.FutureTask.run(Unknown 
    at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$301(Unknown Source)
    at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(Unknown 
    at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(Unknown Source)
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
    at java.lang.Thread.run(Unknown Source)
Caused by: java.lang.NullPointerException
    at com.google.jstestdriver.browser.CommandLineBrowserRunner.stopBrowser(CommandLineBrowserRunner.java:94)
    at com.google.jstestdriver.browser.BrowserControl.stopBrowser(BrowserControl.java:148)
    at com.google.jstestdriver.browser.BrowserCallable.call(BrowserCallable.java:30)
    at com.google.jstestdriver.util.RetryingCallable.call(RetryingCallable.java:49)
    ... 10 more

    at com.google.jstestdriver.browser.BrowserActionExecutorAction.run(BrowserActionExecutorAction.java:154)
    at com.google.jstestdriver.ActionRunner.runActions(ActionRunner.java:81)
    at com.google.jstestdriver.embedded.JsTestDriverImpl.runConfigurationWithFlags(JsTestDriverImpl.java:342)
at com.google.jstestdriver.embedded.JsTestDriverImpl.runConfiguration(JsTestDriverImpl.java:233)
    at com.google.jstestdriver.Main.main(Main.java:70)
Caused by:
Tried 1times: 
com.google.jstestdriver.util.RetryException: 
Failure 1: java.lang.NullPointerException

If I try to run Google Chrome in Cygwin it works but I get the following message:

[5424:5192:3977000:ERROR:gpu_info_collector_win.cc(90)] Can't retrieve a valid WinSAT assessment.

Is the problem that I'm running Jenkins as a Windows service and it can't run Chrome because it needs to run as me (my user profile)?

Was it helpful?

Solution

The symptoms indeed point to running Jenkins as a service as the problem. To find out if that's indeed the case run Jenkins in the foreground:

java -jar jenkins.war <other options>

You can find the list of common options here.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top