Skip to content

Debugging Nightwatch tests in WebStorm

Andrei Rusu edited this page Nov 12, 2015 · 7 revisions

You can setup Nightwatch to debug through WebStorm IDE. Here's how to do this:

Create New Configuration

  1. Click Run in the main toolbar
  2. Edit Configurations
  3. On the top left of the Run/Debug Configurations dialog, click the + sign.
  4. Choose Node.js
  5. Name the new configuration "Nightwatch"
  6. WebStorm should detect your node interpreter (probably in /usr/local/bin/node)
  7. Under "JavaScript file" enter node_modules/nightwatch/bin/runner.js
  8. Under "Application parameters" enter the config switch with the path to your nightwatch.json, e.g. "--config tests/integration/nightwatch.json"
  9. Click Apply.

Run Tests

  1. Click Run
  2. Debug "Nightwatch"