0

Within Jenkins Build Step, if i want to use Windows Batch command to start a nightwatch test and view results, what syntax do i use

Already tried: start nightwatch -t tests\google.js

it doesnt do it. I can run the test on windows cmd, but not via Jenkins.

priia9
  • 11
  • 4
  • On your jenkins machine, check if NodeJS is installed ($ node -v) and if nightwatch is installed as global ($ npm install -g nightwatch) ? – Nicolas Pennec May 18 '15 at 11:54

1 Answers1

0

I have installed the XShell Plugin for jenkins and use the following command to start nightwatch:

cd "C:\path_to_testdir"
nightwatch

The only thing I'm currently stuck on is the fact that nightwatch starts and runs the selenium server, find the test it needs to run, but then hangs at starting up the browser...

EDIT I found out why it looked like Nightwatch was hanging here. Services apparently get their own hidden desktop. The solution to that is to not run Jenkins as a service. Just start it using java -jar {directoryOfJenkinsFile}/jenkins.war

Community
  • 1
  • 1
Koningh
  • 628
  • 2
  • 8
  • 22