RubyMine 5.4.0 Web Help

4.5+

Code Coverage shows how much of your code is covered with tests and marks covered and uncovered lines visually right in the editor.

In this section:

Prerequisites

Note

  1. Additional third-party testing frameworks, for example, Jasmine or QUnit, are downloaded and integrated with RubyMine.
To measure code coverage
  1. Prepare tests manually or have tests generated by RubyMine.
  2. Create a test runner configuration file.
  3. 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.

  4. Start the JSTestDriver server and capture a browser to run the tests in.
  5. On the main toolbar, select the JSTestDriver run configuration in the Run/Debug Configurations drop-down list and click the Run with Coverage button runWithCoverage.
  6. Monitor the code coverage in the Coverage tool window.

See Also

Procedures:

Reference:

Web Resources: