aboutsummaryrefslogtreecommitdiffstats
path: root/jacoco-maven-plugin.test/it
diff options
context:
space:
mode:
authorMarc R. Hoffmann <hoffmann@mountainminds.com>2013-03-20 11:55:53 +0100
committerMarc R. Hoffmann <hoffmann@mountainminds.com>2013-05-23 22:21:25 +0200
commit55fae171b754e20062fae7cdb2d5feae8ee54017 (patch)
tree5dfac8aae54da8cb7585f63e6433caf75ccd7531 /jacoco-maven-plugin.test/it
parentccbbc428f5bad06f43ae6c42f9691a1c9f5a2f73 (diff)
downloadplatform_external_jacoco-55fae171b754e20062fae7cdb2d5feae8ee54017.tar.gz
platform_external_jacoco-55fae171b754e20062fae7cdb2d5feae8ee54017.tar.bz2
platform_external_jacoco-55fae171b754e20062fae7cdb2d5feae8ee54017.zip
New coverage check implementation.
New report APIs to check coverage, support for coverage checks in Ant, rework Maven check goal implementation based on new APIs.
Diffstat (limited to 'jacoco-maven-plugin.test/it')
-rw-r--r--jacoco-maven-plugin.test/it/it-check-fails-halt/invoker.properties (renamed from jacoco-maven-plugin.test/it/it-check-fails-hault/invoker.properties)0
-rw-r--r--jacoco-maven-plugin.test/it/it-check-fails-halt/pom.xml (renamed from jacoco-maven-plugin.test/it/it-check-fails-hault/pom.xml)23
-rw-r--r--jacoco-maven-plugin.test/it/it-check-fails-halt/src/main/java/Example.java (renamed from jacoco-maven-plugin.test/it/it-check-fails-hault/src/main/java/Example.java)0
-rw-r--r--jacoco-maven-plugin.test/it/it-check-fails-halt/src/test/java/ExampleTest.java (renamed from jacoco-maven-plugin.test/it/it-check-fails-hault/src/test/java/ExampleTest.java)0
-rw-r--r--jacoco-maven-plugin.test/it/it-check-fails-halt/verify.bsh (renamed from jacoco-maven-plugin.test/it/it-check-fails-hault/verify.bsh)2
-rw-r--r--jacoco-maven-plugin.test/it/it-check-fails-no-halt/pom.xml (renamed from jacoco-maven-plugin.test/it/it-check-fails-no-hault/pom.xml)20
-rw-r--r--jacoco-maven-plugin.test/it/it-check-fails-no-halt/src/main/java/Example.java (renamed from jacoco-maven-plugin.test/it/it-check-fails-no-hault/src/main/java/Example.java)0
-rw-r--r--jacoco-maven-plugin.test/it/it-check-fails-no-halt/src/test/java/ExampleTest.java (renamed from jacoco-maven-plugin.test/it/it-check-fails-no-hault/src/test/java/ExampleTest.java)0
-rw-r--r--jacoco-maven-plugin.test/it/it-check-fails-no-halt/verify.bsh (renamed from jacoco-maven-plugin.test/it/it-check-fails-no-hault/verify.bsh)2
-rw-r--r--jacoco-maven-plugin.test/it/it-check-passes/pom.xml25
10 files changed, 46 insertions, 26 deletions
diff --git a/jacoco-maven-plugin.test/it/it-check-fails-hault/invoker.properties b/jacoco-maven-plugin.test/it/it-check-fails-halt/invoker.properties
index 324b5fb9..324b5fb9 100644
--- a/jacoco-maven-plugin.test/it/it-check-fails-hault/invoker.properties
+++ b/jacoco-maven-plugin.test/it/it-check-fails-halt/invoker.properties
diff --git a/jacoco-maven-plugin.test/it/it-check-fails-hault/pom.xml b/jacoco-maven-plugin.test/it/it-check-fails-halt/pom.xml
index bf1af894..d2bf960f 100644
--- a/jacoco-maven-plugin.test/it/it-check-fails-hault/pom.xml
+++ b/jacoco-maven-plugin.test/it/it-check-fails-halt/pom.xml
@@ -39,14 +39,21 @@
<goal>check</goal>
</goals>
<configuration>
- <check>
- <classRatio>100</classRatio>
- <instructionRatio>100</instructionRatio>
- <methodRatio>100</methodRatio>
- <branchRatio>100</branchRatio>
- <complexityRatio>100</complexityRatio>
- <lineRatio>100</lineRatio>
- </check>
+ <rules>
+ <rule>
+ <element>CLASS</element>
+ <includes>
+ <include>Example</include>
+ </includes>
+ <limits>
+ <limit>
+ <counter>METHOD</counter>
+ <value>MISSEDCOUNT</value>
+ <maximum>0</maximum>
+ </limit>
+ </limits>
+ </rule>
+ </rules>
</configuration>
</execution>
</executions>
diff --git a/jacoco-maven-plugin.test/it/it-check-fails-hault/src/main/java/Example.java b/jacoco-maven-plugin.test/it/it-check-fails-halt/src/main/java/Example.java
index 79220852..79220852 100644
--- a/jacoco-maven-plugin.test/it/it-check-fails-hault/src/main/java/Example.java
+++ b/jacoco-maven-plugin.test/it/it-check-fails-halt/src/main/java/Example.java
diff --git a/jacoco-maven-plugin.test/it/it-check-fails-hault/src/test/java/ExampleTest.java b/jacoco-maven-plugin.test/it/it-check-fails-halt/src/test/java/ExampleTest.java
index 1bd3e5fa..1bd3e5fa 100644
--- a/jacoco-maven-plugin.test/it/it-check-fails-hault/src/test/java/ExampleTest.java
+++ b/jacoco-maven-plugin.test/it/it-check-fails-halt/src/test/java/ExampleTest.java
diff --git a/jacoco-maven-plugin.test/it/it-check-fails-hault/verify.bsh b/jacoco-maven-plugin.test/it/it-check-fails-halt/verify.bsh
index ed4fce20..9854a863 100644
--- a/jacoco-maven-plugin.test/it/it-check-fails-hault/verify.bsh
+++ b/jacoco-maven-plugin.test/it/it-check-fails-halt/verify.bsh
@@ -18,6 +18,6 @@ if ( buildLog.indexOf( "Coverage checks have not been met." ) < 0 ) {
throw new RuntimeException( "Coverage checks should not have been met." );
}
-if ( buildLog.indexOf( "Insufficient code coverage for" ) < 0 ) {
+if ( buildLog.indexOf( "methods missed count is 1, but expected maximum is 0" ) < 0 ) {
throw new RuntimeException( "Should have displayed insufficient code coverage messages." );
}
diff --git a/jacoco-maven-plugin.test/it/it-check-fails-no-hault/pom.xml b/jacoco-maven-plugin.test/it/it-check-fails-no-halt/pom.xml
index 4255e614..58f9b065 100644
--- a/jacoco-maven-plugin.test/it/it-check-fails-no-hault/pom.xml
+++ b/jacoco-maven-plugin.test/it/it-check-fails-no-halt/pom.xml
@@ -40,14 +40,18 @@
</goals>
<configuration>
<haltOnFailure>false</haltOnFailure>
- <check>
- <classRatio>100</classRatio>
- <instructionRatio>100</instructionRatio>
- <methodRatio>100</methodRatio>
- <branchRatio>100</branchRatio>
- <complexityRatio>100</complexityRatio>
- <lineRatio>100</lineRatio>
- </check>
+ <rules>
+ <rule>
+ <element>BUNDLE</element>
+ <limits>
+ <limit>
+ <counter>METHOD</counter>
+ <value>MISSEDCOUNT</value>
+ <maximum>0</maximum>
+ </limit>
+ </limits>
+ </rule>
+ </rules>
</configuration>
</execution>
</executions>
diff --git a/jacoco-maven-plugin.test/it/it-check-fails-no-hault/src/main/java/Example.java b/jacoco-maven-plugin.test/it/it-check-fails-no-halt/src/main/java/Example.java
index 79220852..79220852 100644
--- a/jacoco-maven-plugin.test/it/it-check-fails-no-hault/src/main/java/Example.java
+++ b/jacoco-maven-plugin.test/it/it-check-fails-no-halt/src/main/java/Example.java
diff --git a/jacoco-maven-plugin.test/it/it-check-fails-no-hault/src/test/java/ExampleTest.java b/jacoco-maven-plugin.test/it/it-check-fails-no-halt/src/test/java/ExampleTest.java
index 1bd3e5fa..1bd3e5fa 100644
--- a/jacoco-maven-plugin.test/it/it-check-fails-no-hault/src/test/java/ExampleTest.java
+++ b/jacoco-maven-plugin.test/it/it-check-fails-no-halt/src/test/java/ExampleTest.java
diff --git a/jacoco-maven-plugin.test/it/it-check-fails-no-hault/verify.bsh b/jacoco-maven-plugin.test/it/it-check-fails-no-halt/verify.bsh
index f78d267d..672922cd 100644
--- a/jacoco-maven-plugin.test/it/it-check-fails-no-hault/verify.bsh
+++ b/jacoco-maven-plugin.test/it/it-check-fails-no-halt/verify.bsh
@@ -18,6 +18,6 @@ if ( buildLog.indexOf( "Coverage checks have not been met." ) < 0 ) {
throw new RuntimeException( "Coverage checks should not have been met." );
}
-if ( buildLog.indexOf( "Insufficient code coverage for" ) < 0 ) {
+if ( buildLog.indexOf( "methods missed count is 1, but expected maximum is 0" ) < 0 ) {
throw new RuntimeException( "Should have displayed insufficient code coverage messages." );
}
diff --git a/jacoco-maven-plugin.test/it/it-check-passes/pom.xml b/jacoco-maven-plugin.test/it/it-check-passes/pom.xml
index cef3b178..c3beaaec 100644
--- a/jacoco-maven-plugin.test/it/it-check-passes/pom.xml
+++ b/jacoco-maven-plugin.test/it/it-check-passes/pom.xml
@@ -39,14 +39,23 @@
<goal>check</goal>
</goals>
<configuration>
- <check>
- <classRatio>100</classRatio>
- <instructionRatio>100</instructionRatio>
- <methodRatio>100</methodRatio>
- <branchRatio>100</branchRatio>
- <complexityRatio>100</complexityRatio>
- <lineRatio>100</lineRatio>
- </check>
+ <rules>
+ <rule>
+ <element>BUNDLE</element>
+ <limits>
+ <limit>
+ <counter>INSTRUCTION</counter>
+ <value>COVEREDRATIO</value>
+ <minimum>0.90</minimum>
+ </limit>
+ <limit>
+ <counter>CLASS</counter>
+ <value>MISSEDCOUNT</value>
+ <maximum>0</maximum>
+ </limit>
+ </limits>
+ </rule>
+ </rules>
</configuration>
</execution>
</executions>