Prerequisites
Note
-
The JSTestDriver plugin is installed and enabled.
The plugin is not bundled with PyCharm, but it is available from the PyCharm plugin repository
.
Once enabled, the plugin is available at the IDE level, that is, you can use it in all your PyCharm projects.
-
Additional third-party testing frameworks, for example, Jasmine
or QUnit
,
are downloaded and integrated with PyCharm.
- Prepare tests manually or have tests generated by PyCharm.
- 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.
