Search code examples
spring-bootcode-coveragespring-tool-suite

STS4 How to run Code Coverage in Spring Tools Suite 4?


I am unable to find a way how to run code coverage in STS4.

In Eclipse Oxygen, I needed to do:

  1. Right-click on project > Properties > Coverage to enable code coverage

  2. Then, right-click on project > Run Code Coverage

However, both of these 2 options are missing in STS4


Solution

  • There is no code coverage feature installed by default in the Spring Tools 4 for Eclipse distribution (and never was, as far as I remember), but you might have had an Eclipse installation with such a third-party plugin installed. Maybe installing this from the marketplace helps:

    marketplace.eclipse.org/content/eclemma-java-code-coverage