0

Is there a way to send nightwatch.js functional test reports into phpstorm?

(I haven't found a selenium plugin, or anything else about this.)

inf3rno
  • 24,976
  • 11
  • 115
  • 197
  • PHPStorm doesn't provide any support for nightwatch.js. However, tests for nightwatch are written using nodeunit as the test framework, so you can try using NodeUnit run configuration to eun them in PHPStorm – lena Apr 29 '14 at 14:39
  • It is not so simple, I guess nightwatch has a special test environment. I'll check its cli test runner, maybe I can do something... Thanks the idea btw! – inf3rno Apr 29 '14 at 15:01

1 Answers1

1

I managed to run nightwatch from phpstorm on windows 7.

  • npm install nightwatch
  • add a nightwatch.json file (set the test directory, and everything else)
  • add a nightwatch.js file with require('nightwatch/bin/runner.js');
  • create a node.js running configuration in phpstorm with the nightwatch.js
  • run your configuration from phpstorm

It should return the same as it does from cli. Sadly nightwatch does not have an itellij reporter, so you have to settle for the cli reporter...

It is possible to start the selenium server before the tests. I just simply added a selenium.bat file to the before launch / external tools with the following content .

start javaw -jar selenium-server-standalone-2.41.0.jar

The selenium server does not allow multiple instances, so you don't have to check whether it is already running...

inf3rno
  • 24,976
  • 11
  • 115
  • 197
  • For anyone else who comes across this looking for a list of all command line parameters, I found using `java -jar selenium-server-standalone-.jar -h` will list them. – Josh Mc Apr 05 '16 at 22:01