Skip to content
This repository was archived by the owner on Dec 4, 2023. It is now read-only.

Commit 3ca313a

Browse files
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>
1 parent 8399a7f commit 3ca313a

File tree

13 files changed

+62
-242
lines changed

13 files changed

+62
-242
lines changed

libraries/bot-ai-luis-v3/pom.xml

Lines changed: 0 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -96,25 +96,6 @@
9696
</activation>
9797
<build>
9898
<plugins>
99-
<plugin>
100-
<groupId>org.eluder.coveralls</groupId>
101-
<artifactId>coveralls-maven-plugin</artifactId>
102-
<configuration>
103-
<repoToken>yourcoverallsprojectrepositorytoken</repoToken>
104-
</configuration>
105-
</plugin>
106-
<plugin>
107-
<groupId>org.codehaus.mojo</groupId>
108-
<artifactId>cobertura-maven-plugin</artifactId>
109-
<configuration>
110-
<outputDirectory>../../cobertura-report/bot-ai-luis-v3</outputDirectory>
111-
<format>xml</format>
112-
<maxmem>256m</maxmem>
113-
<!-- aggregated reports for multi-module projects -->
114-
<aggregate>true</aggregate>
115-
<check/>
116-
</configuration>
117-
</plugin>
11899
</plugins>
119100
</build>
120101
</profile>

libraries/bot-ai-qna/pom.xml

Lines changed: 0 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -95,25 +95,6 @@
9595
</activation>
9696
<build>
9797
<plugins>
98-
<plugin>
99-
<groupId>org.eluder.coveralls</groupId>
100-
<artifactId>coveralls-maven-plugin</artifactId>
101-
<configuration>
102-
<repoToken>yourcoverallsprojectrepositorytoken</repoToken>
103-
</configuration>
104-
</plugin>
105-
<plugin>
106-
<groupId>org.codehaus.mojo</groupId>
107-
<artifactId>cobertura-maven-plugin</artifactId>
108-
<configuration>
109-
<outputDirectory>../../cobertura-report/bot-ai-qna</outputDirectory>
110-
<format>xml</format>
111-
<maxmem>256m</maxmem>
112-
<!-- aggregated reports for multi-module projects -->
113-
<aggregate>true</aggregate>
114-
<check/>
115-
</configuration>
116-
</plugin>
11798
</plugins>
11899
</build>
119100
</profile>

libraries/bot-applicationinsights/pom.xml

Lines changed: 0 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -74,25 +74,6 @@
7474
</activation>
7575
<build>
7676
<plugins>
77-
<plugin>
78-
<groupId>org.eluder.coveralls</groupId>
79-
<artifactId>coveralls-maven-plugin</artifactId>
80-
<configuration>
81-
<repoToken>yourcoverallsprojectrepositorytoken</repoToken>
82-
</configuration>
83-
</plugin>
84-
<plugin>
85-
<groupId>org.codehaus.mojo</groupId>
86-
<artifactId>cobertura-maven-plugin</artifactId>
87-
<configuration>
88-
<outputDirectory>../../cobertura-report/bot-applicationinsights</outputDirectory>
89-
<format>xml</format>
90-
<maxmem>256m</maxmem>
91-
<!-- aggregated reports for multi-module projects -->
92-
<aggregate>true</aggregate>
93-
<check/>
94-
</configuration>
95-
</plugin>
9677
</plugins>
9778
</build>
9879
</profile>

libraries/bot-azure/pom.xml

Lines changed: 0 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -90,25 +90,6 @@
9090
</activation>
9191
<build>
9292
<plugins>
93-
<plugin>
94-
<groupId>org.eluder.coveralls</groupId>
95-
<artifactId>coveralls-maven-plugin</artifactId>
96-
<configuration>
97-
<repoToken>yourcoverallsprojectrepositorytoken</repoToken>
98-
</configuration>
99-
</plugin>
100-
<plugin>
101-
<groupId>org.codehaus.mojo</groupId>
102-
<artifactId>cobertura-maven-plugin</artifactId>
103-
<configuration>
104-
<outputDirectory>../../cobertura-report/bot-azure</outputDirectory>
105-
<format>xml</format>
106-
<maxmem>256m</maxmem>
107-
<!-- aggregated reports for multi-module projects -->
108-
<aggregate>true</aggregate>
109-
<check/>
110-
</configuration>
111-
</plugin>
11293
</plugins>
11394
</build>
11495

libraries/bot-builder/pom.xml

Lines changed: 0 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -114,25 +114,6 @@
114114
</execution>
115115
</executions>
116116
</plugin>
117-
<plugin>
118-
<groupId>org.eluder.coveralls</groupId>
119-
<artifactId>coveralls-maven-plugin</artifactId>
120-
<configuration>
121-
<repoToken>yourcoverallsprojectrepositorytoken</repoToken>
122-
</configuration>
123-
</plugin>
124-
<plugin>
125-
<groupId>org.codehaus.mojo</groupId>
126-
<artifactId>cobertura-maven-plugin</artifactId>
127-
<configuration>
128-
<outputDirectory>../../cobertura-report/bot-builder</outputDirectory>
129-
<format>xml</format>
130-
<maxmem>256m</maxmem>
131-
<!-- aggregated reports for multi-module projects -->
132-
<aggregate>true</aggregate>
133-
<check/>
134-
</configuration>
135-
</plugin>
136117
</plugins>
137118
</build>
138119
</profile>

libraries/bot-connector/pom.xml

Lines changed: 0 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -144,26 +144,6 @@
144144
</activation>
145145
<build>
146146
<plugins>
147-
<plugin>
148-
<groupId>org.eluder.coveralls</groupId>
149-
<artifactId>coveralls-maven-plugin</artifactId>
150-
<configuration>
151-
<repoToken>yourcoverallsprojectrepositorytoken</repoToken>
152-
</configuration>
153-
</plugin>
154-
<plugin>
155-
<groupId>org.codehaus.mojo</groupId>
156-
<artifactId>cobertura-maven-plugin</artifactId>
157-
<configuration>
158-
<outputDirectory>../../cobertura-report/bot-connector</outputDirectory>
159-
<format>xml</format>
160-
<maxmem>256m</maxmem>
161-
<!-- aggregated reports for multi-module projects -->
162-
<aggregate>true</aggregate>
163-
<check/>
164-
</configuration>
165-
</plugin>
166-
167147
<plugin>
168148
<groupId>org.apache.maven.plugins</groupId>
169149
<artifactId>maven-pmd-plugin</artifactId>

libraries/bot-connector/src/main/java/com/microsoft/bot/restclient/serializer/AdditionalPropertiesDeserializer.java

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -95,9 +95,11 @@ public Object deserialize(JsonParser jp, DeserializationContext ctxt) throws IOE
9595
Field[] fields = c.getDeclaredFields();
9696
for (Field field : fields) {
9797
JsonProperty property = field.getAnnotation(JsonProperty.class);
98-
String key = property.value().split("((?<!\\\\))\\.")[0];
99-
if (!key.isEmpty() && copy.has(key)) {
100-
copy.remove(key);
98+
if (property != null) {
99+
String key = property.value().split("((?<!\\\\))\\.")[0];
100+
if (!key.isEmpty() && copy.has(key)) {
101+
copy.remove(key);
102+
}
101103
}
102104
}
103105
}

libraries/bot-dialogs/pom.xml

Lines changed: 0 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -111,25 +111,6 @@
111111
</activation>
112112
<build>
113113
<plugins>
114-
<plugin>
115-
<groupId>org.eluder.coveralls</groupId>
116-
<artifactId>coveralls-maven-plugin</artifactId>
117-
<configuration>
118-
<repoToken>yourcoverallsprojectrepositorytoken</repoToken>
119-
</configuration>
120-
</plugin>
121-
<plugin>
122-
<groupId>org.codehaus.mojo</groupId>
123-
<artifactId>cobertura-maven-plugin</artifactId>
124-
<configuration>
125-
<outputDirectory>../../cobertura-report/bot-dialogs</outputDirectory>
126-
<format>xml</format>
127-
<maxmem>256m</maxmem>
128-
<!-- aggregated reports for multi-module projects -->
129-
<aggregate>true</aggregate>
130-
<check/>
131-
</configuration>
132-
</plugin>
133114
<plugin>
134115
<groupId>org.apache.maven.plugins</groupId>
135116
<artifactId>maven-pmd-plugin</artifactId>

libraries/bot-dialogs/src/test/java/com/microsoft/bot/dialogs/prompts/ChoicePromptTests.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -489,7 +489,7 @@ public void ShouldRecognizeAChoice() {
489489

490490
// This is being left out for now due to it failing due to an issue in the Text Recognizers library.
491491
// It should be worked out in the recognizers and then this test should be enabled again.
492-
//@Test
492+
@Test
493493
public void ShouldNotRecognizeOtherText() {
494494
ConversationState convoState = new ConversationState(new MemoryStorage());
495495
StatePropertyAccessor<DialogState> dialogState = convoState.createProperty("dialogState");

libraries/bot-integration-core/pom.xml

Lines changed: 0 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -74,27 +74,6 @@
7474
<activeByDefault>true</activeByDefault>
7575
</activation>
7676
<build>
77-
<plugins>
78-
<plugin>
79-
<groupId>org.eluder.coveralls</groupId>
80-
<artifactId>coveralls-maven-plugin</artifactId>
81-
<configuration>
82-
<repoToken>yourcoverallsprojectrepositorytoken</repoToken>
83-
</configuration>
84-
</plugin>
85-
<plugin>
86-
<groupId>org.codehaus.mojo</groupId>
87-
<artifactId>cobertura-maven-plugin</artifactId>
88-
<configuration>
89-
<outputDirectory>../../cobertura-report/bot-integration-core</outputDirectory>
90-
<format>xml</format>
91-
<maxmem>256m</maxmem>
92-
<!-- aggregated reports for multi-module projects -->
93-
<aggregate>true</aggregate>
94-
<check/>
95-
</configuration>
96-
</plugin>
97-
</plugins>
9877
</build>
9978
</profile>
10079
</profiles>

0 commit comments

Comments
 (0)