Akshay jain
Akshay jain

Reputation: 555

Not getting the coverage on new code in sonar dashboard

I am trying to use scm activity plugin 1.8 for clearcase and using sonar 4.3.3 and got the blame information in the sonar but did not getting the coverage on new code in dashboard

Upvotes: 3

Views: 1468

Answers (1)

agabrys
agabrys

Reputation: 9136

You should add Code Coverage Tool to your build process. If you use Maven, then you can add:

<build>
    ...
    <plugins>
        ...
        <plugin>
            <groupId>org.jacoco</groupId>
            <artifactId>jacoco-maven-plugin</artifactId>
            <version>0.7.5.201505241946</version>
            <executions>
                <execution>
                    <id>jacoco-initialize</id>
                    <goals>
                        <goal>prepare-agent</goal>
                    </goals>
                </execution>
            </executions>
            <configuration>
                <rules>
                    <rule>
                        <element>CLASS</element>
                        <excludes>
                            <exclude>*Test</exclude>
                        </excludes>
                    </rule>
                </rules>
            </configuration>
        </plugin>
    </plugins>
    ...
</build>

Upvotes: 1

Related Questions