- Prepare tests manually or have tests generated by WebStorm.
- Create a test runner configuration file.
Create a run configuration of the type JSTestDriver.
To have specific files excluded from coverage analysis, specify the paths to them in the Coverage tab of the Run/Debug Configuration: JSTestDriver dialog box.
- Start the JSTestDriver server and capture a browser to run the tests in.
- On the main toolbar, select the JSTestDriver run configuration in the Run/Debug Configurations drop-down list and click the Run with Coverage button .
- Monitor the code coverage in the Coverage tool window.