Skip to content

Latest commit

 

History

History
60 lines (44 loc) · 2.64 KB

README.md

File metadata and controls

60 lines (44 loc) · 2.64 KB

maven-spring-sandbox

Maintainability Test Coverage

Getting started

Running in CLI

mvn spring-boot:run

Testing and Code coverage

Run simple tests:

mvn clean test

An updated report will be generated in the folder:

/target/site/jacoco/index.html

To check if coverage level is under minimum expected (see pom.xml for details):

mvn clean verify

Details

Different results of coverage

Pay attention to slight different value of code coverage, according the way it was invoked. For example:

  • with mvn clean verify there is 98% (missed 2 of 114 instructions)
  • with Intellij's Run with Coverage there is 94% (missed 6 of 118 instructions)
Covering Spring Code

To cover Spring code properly pay attention to pom.xml entry:

 <execution>
    <id>default-report</id>
    <phase>verify</phase>
    <goals>
        <goal>report</goal>
    </goals>
</execution>

Extra links (answers, repositories):

Reference Documentation

For further reference, please consider the following sections:

Guides

The following guides illustrate how to use some features concretely: