RubyMine 2017.2 Help

Viewing Code Coverage Results

Viewing code coverage helps you detect pieces of your source code that are not affected by simulation.

To view code coverage results

  1. Do one of the following:
  2. View coverage results:
  3. Open in the editor the files you want to explore.
  4. Use the color indicators in the left gutter to detect the uncovered lines of code.
  5. To find out how many times a line has been hit, click the line in the gutter area.

    The pop-up window that opens shows the statistic for the line at caret. For lines with conditions, the pop-up window also provides statistic:


    Use the following toolbar buttons:

    • /help/img/idea/2017.2/arrowUp.png/help/img/idea/2017.2/arrowDown.png: jump to the next/previous groups of covered or uncovered lines.
    • /help/img/idea/2017.2/settingsCoverage.png: open the Color Scheme settings, where you have to choose the node Line Coverage.
    • /help/img/idea/2017.2/close.png: hide coverage information.
  6. Create missing tests, as described in the section Creating Test Templates or Generating Missing Tests for Rails Applications Creating JavaScript Unit Tests. For JavaScript, tests can be generated as described in the Creating JavaScript Unit Tests section.
Last modified: 26 October 2017

See Also