Skip to content

Reporting plugins added - #88

Merged
SQiShER merged 2 commits into
SQiShER:masterfrom
msknapp:master
Feb 14, 2014
Merged

SQiShER merged 2 commits into
SQiShER:masterfrom
msknapp:master

Conversation

@msknapp

@msknapp msknapp commented Feb 13, 2014

Copy link
Copy Markdown
Contributor

added some reporting plugins, do a 'mvn site' and then 'firefox target/site/index.html' to see the product. Look at all the stuff in the reporting section. This should help other developers discover bugs and improve the application.

You will also notice in the cobertura report that there is still plenty of room for testing.

…t/site/index.html' to see the product. Look at all the stuff in the reporting section. This should help other developers discover bugs and improve the application.
@SQiShER

SQiShER commented Feb 13, 2014

Copy link
Copy Markdown
Owner

Thanks! This is great. It's actually just what I needed, ever since I started the transition from TestNG to Spock. Code Coverage in IDEA is not so good, when it's spread across two different testing frameworks.

However, the cobertura reports only seem to include JUnit/Spock tests, but not the TestNG tests (e.g. look at the coverage report for the PrimitiveDiffer and then look at its test). I changed the surefire plugin configuration to look like this:

            <plugin>
                <artifactId>maven-surefire-plugin</artifactId>
                <dependencies>
                    <dependency>
                        <groupId>org.apache.maven.surefire</groupId>
                        <artifactId>surefire-junit4</artifactId>
                        <version>2.16</version>
                    </dependency>
                    <dependency>
                        <groupId>org.apache.maven.surefire</groupId>
                        <artifactId>surefire-testng</artifactId>
                        <version>2.16</version>
                    </dependency>
                </dependencies>
                <configuration>
                    <redirectTestOutputToFile>true</redirectTestOutputToFile>
                    <enableAssertions>true</enableAssertions>
                    <includes>
                        <include>**/*Test.java</include>
                        <!--<include>**/*IntegrationTests.java</include>-->
                        <include>**/*Should.java</include>
                        <include>**/*Spec.java</include>
                        <include>**/*Specification.java</include>
                    </includes>
                </configuration>
            </plugin>

I basically replaced the execution configuration with two plugin dependencies. This seemingly allows cobertura to properly instrument all test classes.

After doing so, the coverage report looked much more like what I expected. Can you give it a try and send me a new pull request, when you think it works properly?

@msknapp

msknapp commented Feb 14, 2014

Copy link
Copy Markdown
Contributor Author

ok I updated the surefire plugin and committed. Is it good now?

@SQiShER

SQiShER commented Feb 14, 2014

Copy link
Copy Markdown
Owner

Yep, cool, thanks!

SQiShER added a commit that referenced this pull request Feb 14, 2014
Reporting plugins added
@SQiShER
SQiShER merged commit 6d78520 into SQiShER:master Feb 14, 2014
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants