Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

SonarQube is shipped with 6 5 default tabsperspectives. Depending on the plugins you have that are installed, other tabs perspectives may be displayedavailable.

Source

...

Perspective

This tab perspective displays source code with highlighted syntax.

...

  • Where in the current file is this variable declared? Where is it used?




  • Where in the current file is this method declared? Where is it used?

Coverage

...

Perspective

The Coverage tab This perspective displays the source code decorated with information about code coverage (by unit tests and/or integration tests).

...

  • The first column displays the number of unit tests covering the line (available since version 3.5, was the number of hits by unit tests in versions prior to 3.5)
  • The second one displays the number of covered conditions by unit tests out of the total number of conditions to cover


The features described below are available since version 3.5.When clicking on a figure displayed in the first column, the unit tests covering this specific line are listed:

When selecting Per test > Covered lines in the second dropdown list, a third dropdown list appears. In this latter list, it is possible to select a specific unit test. Then, only lines covered by this unit test are displayed:

Anchor
issues_tab
issues_tab
Issues

...

Perspective

This perspective displays issues directly in the source code.

...

You can directly manage the issues: comment, assign, link to an action plan, etc. See the Issues documentation page for more details.

Anchor
tabduplications
tabduplications

Duplications

...

Perspectivce

This perspective displays every duplicated chunk of code within a class and the name of the other class it is duplicated with.

See Duplications for more information.

Dependencies Tab

...

LCOM4 Tab

...

LCOM4 Perspective

This perspective displays blocks of code within a class that have tight relationship. Having more that one block here probably means that the class is assuming more than one responsibility.

...

When drilling down into unit tests execution measures, you will eventually reach the unit test level:

Source

...

Perspectivce

This perspective displays the source code of the unit test file:

Tests

...

Perspective

This perspective displays the result of the unit tests belonging to the unit test class. In case of a failure or an error, the reason is displayed:

Since version 3.5, it It is also possible to see the mapping of unit tests and covered code. The objective is to answer the following questions:

  • Which files are covered by a given unit test?
  • How many lines of code are covered by a given unit test?
  • Which lines are covered by a given unit test?
  • Which tests cover a given line of code?

Issues

...

Perspective

This perspective displays issues on unit tests: