3D-e-Chem / tycho-knime-node-archetype

Maven archetype for Knime node extension
Apache License 2.0
5 stars 2 forks source link

Add test coverage #3

Closed sverhoeven closed 7 years ago

sverhoeven commented 8 years ago

Before tycho-surefire-plugin added:

            <plugin>
                <groupId>org.jacoco</groupId>
                <artifactId>jacoco-maven-plugin</artifactId>
                <version>0.7.7.201606060606</version>
                <executions>
                    <execution>
                        <goals>
                            <goal>prepare-agent</goal>
                        </goals>
                    </execution>
                    <execution>
                        <id>default-report</id>
                        <phase>verify</phase>
                        <goals>
                            <goal>report</goal>
                        </goals>
                    </execution>
                </executions>
            </plugin>

Replaced argLine of tycho-surefire-plugin to

<argLine>${tycho.testArgLine} ${tycho.test.jvmArgs}</argLine>

Running mvn verify generated a Jacoco coverage html report, sadly it only tracked coverage of the tests itself and not of the code under test.

sverhoeven commented 7 years ago

Used jacoco ant reporter to get coverage report see https://github.com/3D-e-Chem/knime-plants/commit/234aa8536b00dec3a5f2e379df0f364fb1efbffc