Skip to content

Commit

Permalink
[ELY-2480] Add code coverage to the project
Browse files Browse the repository at this point in the history
  • Loading branch information
Dimitris Kafetzis committed Aug 26, 2024
1 parent 1eb5d16 commit b1af876
Show file tree
Hide file tree
Showing 2 changed files with 51 additions and 1 deletion.
7 changes: 7 additions & 0 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -83,6 +83,13 @@ mvn clean install -Dtest=TestClassName
```
Note: Some tests will fail if `localhost` is not listed first in `/etc/hosts` file for the loopback addresses (IPv4 and IPv6).

To generate a report on test coverage, use:

```bash
mvn clean install -Ptest-coverage org.openclover:clover-maven-plugin:aggregate org.openclover:clover-maven-plugin:clover
```
The generated report is at `target/site/clover` and to access it start by opening `index.html` in the directory with a browser of choice.

For more information, including details on how WildFly Elytron is integrated in WildFly Core and WildFly, check out our [developer guide](https://wildfly-security.github.io/wildfly-elytron/getting-started-for-developers/).

## Contributing Guidelines
Expand Down
45 changes: 44 additions & 1 deletion pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,6 @@
<version.io.rest-assured>4.3.3</version.io.rest-assured>
<version.net.sourceforge.htmlunit.htmlunit>2.40.0</version.net.sourceforge.htmlunit.htmlunit>
<version.org.apache.santuario>2.3.0</version.org.apache.santuario>
<version.org.keycloak.keycloak-services>3.1.0.Final</version.org.keycloak.keycloak-services>

<test.level>INFO</test.level>
<!-- Checkstyle configuration -->
Expand Down Expand Up @@ -1249,10 +1248,54 @@
</exclusion>
</exclusions>
</dependency>
<!-- https://mvnrepository.com/artifact/org.openclover/clover-maven-plugin -->
<dependency>
<groupId>org.openclover</groupId>
<artifactId>clover-maven-plugin</artifactId>
<version>${version.org.openclover}</version>
</dependency>

</dependencies>
</dependencyManagement>

<profiles>
<profile>
<!--To generate a report on test coverage run
mvn clean install -Ptest-coverage org.openclover:clover-maven-plugin:aggregate org.openclover:clover-maven-plugin:clover
-->
<id>test-coverage</id>
<build>
<plugins>
<plugin>
<groupId>org.openclover</groupId>
<artifactId>clover-maven-plugin</artifactId>
<executions>
<execution>
<id>clover-setup</id>
<phase>process-sources</phase>
<goals>
<goal>setup</goal>
</goals>
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-checkstyle-plugin</artifactId>
<configuration>
<skip>true</skip>
</configuration>
</plugin>
<plugin>
<groupId>com.github.siom79.japicmp</groupId>
<artifactId>japicmp-maven-plugin</artifactId>
<configuration>
<skip>true</skip>
</configuration>
</plugin>
</plugins>
</build>
</profile>
<profile>
<id>modularizedJdk</id>
<activation>
Expand Down

0 comments on commit b1af876

Please sign in to comment.