Code coverage with Jacoco (#1068)
* JaCoCo test coverage * JaCoCo build target setup * Updates to support Jacoco code coverage Co-authored-by: tracyboehrer <tracyboehrer@users.noreply.github.com>
This commit is contained in:
Родитель
8399a7f3aa
Коммит
3ca313aea3
|
@ -96,25 +96,6 @@
|
|||
</activation>
|
||||
<build>
|
||||
<plugins>
|
||||
<plugin>
|
||||
<groupId>org.eluder.coveralls</groupId>
|
||||
<artifactId>coveralls-maven-plugin</artifactId>
|
||||
<configuration>
|
||||
<repoToken>yourcoverallsprojectrepositorytoken</repoToken>
|
||||
</configuration>
|
||||
</plugin>
|
||||
<plugin>
|
||||
<groupId>org.codehaus.mojo</groupId>
|
||||
<artifactId>cobertura-maven-plugin</artifactId>
|
||||
<configuration>
|
||||
<outputDirectory>../../cobertura-report/bot-ai-luis-v3</outputDirectory>
|
||||
<format>xml</format>
|
||||
<maxmem>256m</maxmem>
|
||||
<!-- aggregated reports for multi-module projects -->
|
||||
<aggregate>true</aggregate>
|
||||
<check/>
|
||||
</configuration>
|
||||
</plugin>
|
||||
</plugins>
|
||||
</build>
|
||||
</profile>
|
||||
|
|
|
@ -95,25 +95,6 @@
|
|||
</activation>
|
||||
<build>
|
||||
<plugins>
|
||||
<plugin>
|
||||
<groupId>org.eluder.coveralls</groupId>
|
||||
<artifactId>coveralls-maven-plugin</artifactId>
|
||||
<configuration>
|
||||
<repoToken>yourcoverallsprojectrepositorytoken</repoToken>
|
||||
</configuration>
|
||||
</plugin>
|
||||
<plugin>
|
||||
<groupId>org.codehaus.mojo</groupId>
|
||||
<artifactId>cobertura-maven-plugin</artifactId>
|
||||
<configuration>
|
||||
<outputDirectory>../../cobertura-report/bot-ai-qna</outputDirectory>
|
||||
<format>xml</format>
|
||||
<maxmem>256m</maxmem>
|
||||
<!-- aggregated reports for multi-module projects -->
|
||||
<aggregate>true</aggregate>
|
||||
<check/>
|
||||
</configuration>
|
||||
</plugin>
|
||||
</plugins>
|
||||
</build>
|
||||
</profile>
|
||||
|
|
|
@ -74,25 +74,6 @@
|
|||
</activation>
|
||||
<build>
|
||||
<plugins>
|
||||
<plugin>
|
||||
<groupId>org.eluder.coveralls</groupId>
|
||||
<artifactId>coveralls-maven-plugin</artifactId>
|
||||
<configuration>
|
||||
<repoToken>yourcoverallsprojectrepositorytoken</repoToken>
|
||||
</configuration>
|
||||
</plugin>
|
||||
<plugin>
|
||||
<groupId>org.codehaus.mojo</groupId>
|
||||
<artifactId>cobertura-maven-plugin</artifactId>
|
||||
<configuration>
|
||||
<outputDirectory>../../cobertura-report/bot-applicationinsights</outputDirectory>
|
||||
<format>xml</format>
|
||||
<maxmem>256m</maxmem>
|
||||
<!-- aggregated reports for multi-module projects -->
|
||||
<aggregate>true</aggregate>
|
||||
<check/>
|
||||
</configuration>
|
||||
</plugin>
|
||||
</plugins>
|
||||
</build>
|
||||
</profile>
|
||||
|
|
|
@ -90,25 +90,6 @@
|
|||
</activation>
|
||||
<build>
|
||||
<plugins>
|
||||
<plugin>
|
||||
<groupId>org.eluder.coveralls</groupId>
|
||||
<artifactId>coveralls-maven-plugin</artifactId>
|
||||
<configuration>
|
||||
<repoToken>yourcoverallsprojectrepositorytoken</repoToken>
|
||||
</configuration>
|
||||
</plugin>
|
||||
<plugin>
|
||||
<groupId>org.codehaus.mojo</groupId>
|
||||
<artifactId>cobertura-maven-plugin</artifactId>
|
||||
<configuration>
|
||||
<outputDirectory>../../cobertura-report/bot-azure</outputDirectory>
|
||||
<format>xml</format>
|
||||
<maxmem>256m</maxmem>
|
||||
<!-- aggregated reports for multi-module projects -->
|
||||
<aggregate>true</aggregate>
|
||||
<check/>
|
||||
</configuration>
|
||||
</plugin>
|
||||
</plugins>
|
||||
</build>
|
||||
|
||||
|
|
|
@ -114,25 +114,6 @@
|
|||
</execution>
|
||||
</executions>
|
||||
</plugin>
|
||||
<plugin>
|
||||
<groupId>org.eluder.coveralls</groupId>
|
||||
<artifactId>coveralls-maven-plugin</artifactId>
|
||||
<configuration>
|
||||
<repoToken>yourcoverallsprojectrepositorytoken</repoToken>
|
||||
</configuration>
|
||||
</plugin>
|
||||
<plugin>
|
||||
<groupId>org.codehaus.mojo</groupId>
|
||||
<artifactId>cobertura-maven-plugin</artifactId>
|
||||
<configuration>
|
||||
<outputDirectory>../../cobertura-report/bot-builder</outputDirectory>
|
||||
<format>xml</format>
|
||||
<maxmem>256m</maxmem>
|
||||
<!-- aggregated reports for multi-module projects -->
|
||||
<aggregate>true</aggregate>
|
||||
<check/>
|
||||
</configuration>
|
||||
</plugin>
|
||||
</plugins>
|
||||
</build>
|
||||
</profile>
|
||||
|
|
|
@ -144,26 +144,6 @@
|
|||
</activation>
|
||||
<build>
|
||||
<plugins>
|
||||
<plugin>
|
||||
<groupId>org.eluder.coveralls</groupId>
|
||||
<artifactId>coveralls-maven-plugin</artifactId>
|
||||
<configuration>
|
||||
<repoToken>yourcoverallsprojectrepositorytoken</repoToken>
|
||||
</configuration>
|
||||
</plugin>
|
||||
<plugin>
|
||||
<groupId>org.codehaus.mojo</groupId>
|
||||
<artifactId>cobertura-maven-plugin</artifactId>
|
||||
<configuration>
|
||||
<outputDirectory>../../cobertura-report/bot-connector</outputDirectory>
|
||||
<format>xml</format>
|
||||
<maxmem>256m</maxmem>
|
||||
<!-- aggregated reports for multi-module projects -->
|
||||
<aggregate>true</aggregate>
|
||||
<check/>
|
||||
</configuration>
|
||||
</plugin>
|
||||
|
||||
<plugin>
|
||||
<groupId>org.apache.maven.plugins</groupId>
|
||||
<artifactId>maven-pmd-plugin</artifactId>
|
||||
|
|
|
@ -95,9 +95,11 @@ public final class AdditionalPropertiesDeserializer extends StdDeserializer<Obje
|
|||
Field[] fields = c.getDeclaredFields();
|
||||
for (Field field : fields) {
|
||||
JsonProperty property = field.getAnnotation(JsonProperty.class);
|
||||
String key = property.value().split("((?<!\\\\))\\.")[0];
|
||||
if (!key.isEmpty() && copy.has(key)) {
|
||||
copy.remove(key);
|
||||
if (property != null) {
|
||||
String key = property.value().split("((?<!\\\\))\\.")[0];
|
||||
if (!key.isEmpty() && copy.has(key)) {
|
||||
copy.remove(key);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -111,25 +111,6 @@
|
|||
</activation>
|
||||
<build>
|
||||
<plugins>
|
||||
<plugin>
|
||||
<groupId>org.eluder.coveralls</groupId>
|
||||
<artifactId>coveralls-maven-plugin</artifactId>
|
||||
<configuration>
|
||||
<repoToken>yourcoverallsprojectrepositorytoken</repoToken>
|
||||
</configuration>
|
||||
</plugin>
|
||||
<plugin>
|
||||
<groupId>org.codehaus.mojo</groupId>
|
||||
<artifactId>cobertura-maven-plugin</artifactId>
|
||||
<configuration>
|
||||
<outputDirectory>../../cobertura-report/bot-dialogs</outputDirectory>
|
||||
<format>xml</format>
|
||||
<maxmem>256m</maxmem>
|
||||
<!-- aggregated reports for multi-module projects -->
|
||||
<aggregate>true</aggregate>
|
||||
<check/>
|
||||
</configuration>
|
||||
</plugin>
|
||||
<plugin>
|
||||
<groupId>org.apache.maven.plugins</groupId>
|
||||
<artifactId>maven-pmd-plugin</artifactId>
|
||||
|
|
|
@ -489,7 +489,7 @@ public class ChoicePromptTests {
|
|||
|
||||
// This is being left out for now due to it failing due to an issue in the Text Recognizers library.
|
||||
// It should be worked out in the recognizers and then this test should be enabled again.
|
||||
//@Test
|
||||
@Test
|
||||
public void ShouldNotRecognizeOtherText() {
|
||||
ConversationState convoState = new ConversationState(new MemoryStorage());
|
||||
StatePropertyAccessor<DialogState> dialogState = convoState.createProperty("dialogState");
|
||||
|
|
|
@ -74,27 +74,6 @@
|
|||
<activeByDefault>true</activeByDefault>
|
||||
</activation>
|
||||
<build>
|
||||
<plugins>
|
||||
<plugin>
|
||||
<groupId>org.eluder.coveralls</groupId>
|
||||
<artifactId>coveralls-maven-plugin</artifactId>
|
||||
<configuration>
|
||||
<repoToken>yourcoverallsprojectrepositorytoken</repoToken>
|
||||
</configuration>
|
||||
</plugin>
|
||||
<plugin>
|
||||
<groupId>org.codehaus.mojo</groupId>
|
||||
<artifactId>cobertura-maven-plugin</artifactId>
|
||||
<configuration>
|
||||
<outputDirectory>../../cobertura-report/bot-integration-core</outputDirectory>
|
||||
<format>xml</format>
|
||||
<maxmem>256m</maxmem>
|
||||
<!-- aggregated reports for multi-module projects -->
|
||||
<aggregate>true</aggregate>
|
||||
<check/>
|
||||
</configuration>
|
||||
</plugin>
|
||||
</plugins>
|
||||
</build>
|
||||
</profile>
|
||||
</profiles>
|
||||
|
|
|
@ -94,27 +94,6 @@
|
|||
<activeByDefault>true</activeByDefault>
|
||||
</activation>
|
||||
<build>
|
||||
<plugins>
|
||||
<plugin>
|
||||
<groupId>org.eluder.coveralls</groupId>
|
||||
<artifactId>coveralls-maven-plugin</artifactId>
|
||||
<configuration>
|
||||
<repoToken>yourcoverallsprojectrepositorytoken</repoToken>
|
||||
</configuration>
|
||||
</plugin>
|
||||
<plugin>
|
||||
<groupId>org.codehaus.mojo</groupId>
|
||||
<artifactId>cobertura-maven-plugin</artifactId>
|
||||
<configuration>
|
||||
<outputDirectory>../../cobertura-report/bot-integration-spring</outputDirectory>
|
||||
<format>xml</format>
|
||||
<maxmem>256m</maxmem>
|
||||
<!-- aggregated reports for multi-module projects -->
|
||||
<aggregate>true</aggregate>
|
||||
<check />
|
||||
</configuration>
|
||||
</plugin>
|
||||
</plugins>
|
||||
</build>
|
||||
</profile>
|
||||
</profiles>
|
||||
|
|
|
@ -82,27 +82,6 @@
|
|||
<activeByDefault>true</activeByDefault>
|
||||
</activation>
|
||||
<build>
|
||||
<plugins>
|
||||
<plugin>
|
||||
<groupId>org.eluder.coveralls</groupId>
|
||||
<artifactId>coveralls-maven-plugin</artifactId>
|
||||
<configuration>
|
||||
<repoToken>yourcoverallsprojectrepositorytoken</repoToken>
|
||||
</configuration>
|
||||
</plugin>
|
||||
<plugin>
|
||||
<groupId>org.codehaus.mojo</groupId>
|
||||
<artifactId>cobertura-maven-plugin</artifactId>
|
||||
<configuration>
|
||||
<outputDirectory>../../cobertura-report/bot-schema</outputDirectory>
|
||||
<format>xml</format>
|
||||
<maxmem>256m</maxmem>
|
||||
<!-- aggregated reports for multi-module projects -->
|
||||
<aggregate>true</aggregate>
|
||||
<check/>
|
||||
</configuration>
|
||||
</plugin>
|
||||
</plugins>
|
||||
</build>
|
||||
</profile>
|
||||
</profiles>
|
||||
|
|
97
pom.xml
97
pom.xml
|
@ -84,6 +84,44 @@
|
|||
<groupId>org.apache.maven.plugins</groupId>
|
||||
<artifactId>maven-checkstyle-plugin</artifactId>
|
||||
</plugin>
|
||||
<plugin>
|
||||
<groupId>org.jacoco</groupId>
|
||||
<artifactId>jacoco-maven-plugin</artifactId>
|
||||
<executions>
|
||||
<execution>
|
||||
<id>default-prepare-agent</id>
|
||||
<goals>
|
||||
<goal>prepare-agent</goal>
|
||||
</goals>
|
||||
</execution>
|
||||
<execution>
|
||||
<id>default-report</id>
|
||||
<goals>
|
||||
<goal>report</goal>
|
||||
</goals>
|
||||
</execution>
|
||||
<!-- <execution>-->
|
||||
<!-- <id>default-check</id>-->
|
||||
<!-- <goals>-->
|
||||
<!-- <goal>check</goal>-->
|
||||
<!-- </goals>-->
|
||||
<!-- <configuration>-->
|
||||
<!-- <rules>-->
|
||||
<!-- <rule>-->
|
||||
<!-- <element>BUNDLE</element>-->
|
||||
<!-- <limits>-->
|
||||
<!-- <limit>-->
|
||||
<!-- <counter>COMPLEXITY</counter>-->
|
||||
<!-- <value>COVEREDRATIO</value>-->
|
||||
<!-- <minimum>0.60</minimum>-->
|
||||
<!-- </limit>-->
|
||||
<!-- </limits>-->
|
||||
<!-- </rule>-->
|
||||
<!-- </rules>-->
|
||||
<!-- </configuration>-->
|
||||
<!-- </execution>-->
|
||||
</executions>
|
||||
</plugin>
|
||||
</plugins>
|
||||
</build>
|
||||
</profile>
|
||||
|
@ -141,12 +179,8 @@
|
|||
</executions>
|
||||
</plugin>
|
||||
<plugin>
|
||||
<groupId>org.eluder.coveralls</groupId>
|
||||
<artifactId>coveralls-maven-plugin</artifactId>
|
||||
</plugin>
|
||||
<plugin>
|
||||
<groupId>org.codehaus.mojo</groupId>
|
||||
<artifactId>cobertura-maven-plugin</artifactId>
|
||||
<groupId>org.jacoco</groupId>
|
||||
<artifactId>jacoco-maven-plugin</artifactId>
|
||||
</plugin>
|
||||
<plugin>
|
||||
<groupId>org.apache.maven.plugins</groupId>
|
||||
|
@ -504,42 +538,11 @@
|
|||
</plugin>
|
||||
|
||||
<plugin>
|
||||
<groupId>org.eluder.coveralls</groupId>
|
||||
<artifactId>coveralls-maven-plugin</artifactId>
|
||||
<version>4.3.0</version>
|
||||
<configuration>
|
||||
<coberturaReports>
|
||||
<coberturaReport>
|
||||
./cobertura-report/bot-builder/coverage.xml
|
||||
</coberturaReport>
|
||||
<coberturaReport>
|
||||
./cobertura-report/bot-schema/coverage.xml
|
||||
</coberturaReport>
|
||||
<coberturaReport>
|
||||
./cobertura-report/bot-connector/coverage.xml
|
||||
</coberturaReport>
|
||||
</coberturaReports>
|
||||
<groupId>org.jacoco</groupId>
|
||||
<artifactId>jacoco-maven-plugin</artifactId>
|
||||
<version>0.8.6</version>
|
||||
</plugin>
|
||||
|
||||
<sourceEncoding>UTF-8</sourceEncoding>
|
||||
<branch>${env.COVERALLS_GIT_BRANCH}</branch>
|
||||
<pullRequest>${env.COVERALLS_PULL_REQUEST}</pullRequest>
|
||||
<serviceBuildNumber>${env.COVERALLS_SERVICE_BUILD_NUMBER}</serviceBuildNumber>
|
||||
<serviceBuildUrl>${env.COVERALLS_SERVICE_BUILD_URL}</serviceBuildUrl>
|
||||
<serviceJobId>${env.COVERALLS_SERVICE_JOB_ID}</serviceJobId>
|
||||
<serviceName>${env.COVERALLS_SERVICE_NAME}</serviceName>
|
||||
</configuration>
|
||||
</plugin>
|
||||
<plugin>
|
||||
<groupId>org.codehaus.mojo</groupId>
|
||||
<artifactId>cobertura-maven-plugin</artifactId>
|
||||
<version>2.7</version>
|
||||
<configuration>
|
||||
<formats>
|
||||
<format>xml</format>
|
||||
</formats>
|
||||
<aggregate>true</aggregate>
|
||||
</configuration>
|
||||
</plugin>
|
||||
<plugin>
|
||||
<groupId>org.sonatype.plugins</groupId>
|
||||
<artifactId>nexus-staging-maven-plugin</artifactId>
|
||||
|
@ -625,6 +628,18 @@
|
|||
</reportSet>
|
||||
</reportSets>
|
||||
</plugin>
|
||||
<plugin>
|
||||
<groupId>org.jacoco</groupId>
|
||||
<artifactId>jacoco-maven-plugin</artifactId>
|
||||
<reportSets>
|
||||
<reportSet>
|
||||
<reports>
|
||||
<!-- select non-aggregate reports -->
|
||||
<report>report</report>
|
||||
</reports>
|
||||
</reportSet>
|
||||
</reportSets>
|
||||
</plugin>
|
||||
</plugins>
|
||||
</reporting>
|
||||
|
||||
|
|
Загрузка…
Ссылка в новой задаче