Skip to content
Permalink
Browse files

adding JaCoCo coverage

  • Loading branch information...
arcuri82 committed Apr 6, 2019
1 parent b5bec26 commit 497c3ced1d1a8273f9533321c01f979e04a13d53
@@ -4,13 +4,19 @@
import org.evomaster.e2etests.spring.examples.SpringTestBase;
import org.junit.jupiter.api.BeforeAll;

import java.time.Duration;

import static org.junit.jupiter.api.Assertions.assertTimeoutPreemptively;

public class DbAuthTestBase extends SpringTestBase {


@BeforeAll
public static void initClass() throws Exception {

SpringTestBase.initClass(new DbAuthController());
assertTimeoutPreemptively(Duration.ofMinutes(2), () -> {
SpringTestBase.initClass(new DbAuthController());
});
}

}
38 pom.xml
@@ -22,6 +22,7 @@
<module>client-java</module>
<module>e2e-tests</module>
<module>experiments</module>
<module>report</module>
</modules>

<issueManagement>
@@ -532,7 +533,7 @@
<forkCount>1</forkCount>
<redirectTestOutputToFile>true</redirectTestOutputToFile>
<rerunFailingTestsCount>2</rerunFailingTestsCount>
<argLine>-Xms1024m -Xmx2048m</argLine>
<argLine>@{argLine} -Xms1024m -Xmx2048m</argLine>
<!-- Needed for some weird bug in JDK used in CircleCI-->
<useSystemClassLoader>false</useSystemClassLoader>
</configuration>
@@ -676,8 +677,43 @@
<artifactId>go-offline-maven-plugin</artifactId>
<version>1.1.0</version>
</plugin>

<!--
Used to calculate code-coverage of the tests.
Note: Kotlin still has problems, as its compiler not marking
yet the automatically generated/added functions
-->
<plugin>
<groupId>org.jacoco</groupId>
<artifactId>jacoco-maven-plugin</artifactId>
<version>0.8.3</version>
<executions>
<execution>
<id>default-prepare-agent</id>
<goals>
<goal>prepare-agent</goal>
</goals>
</execution>
<execution>
<id>default-report</id>
<phase>prepare-package</phase>
<goals>
<goal>report</goal>
</goals>
</execution>
</executions>
</plugin>
</plugins>
</pluginManagement>


<plugins>
<!-- Executed JaCoCo in all the modules. Default binding is on "verify" -->
<plugin>
<groupId>org.jacoco</groupId>
<artifactId>jacoco-maven-plugin</artifactId>
</plugin>
</plugins>
</build>


@@ -0,0 +1,84 @@
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
<modelVersion>4.0.0</modelVersion>

<parent>
<groupId>org.evomaster</groupId>
<artifactId>evomaster</artifactId>
<version>0.2.1-SNAPSHOT</version>
</parent>

<artifactId>evomaster-project-report</artifactId>
<packaging>jar</packaging>

<dependencies>
<!--
Here we need dependency to all other modules, to force this one
to be built last. Furthermore, also needed for transitive coverage
-->
<dependency>
<groupId>org.evomaster</groupId>
<artifactId>evomaster-client-java-util</artifactId>
<version>${project.version}</version>
</dependency>
<dependency>
<groupId>org.evomaster</groupId>
<artifactId>evomaster-client-java-controller</artifactId>
<version>${project.version}</version>
</dependency>
<dependency>
<groupId>org.evomaster</groupId>
<artifactId>evomaster-client-java-controller-api</artifactId>
<version>${project.version}</version>
</dependency>
<dependency>
<groupId>org.evomaster</groupId>
<artifactId>evomaster-client-database-spy</artifactId>
<version>${project.version}</version>
</dependency>
<dependency>
<groupId>org.evomaster</groupId>
<artifactId>evomaster-client-java-instrumentation</artifactId>
<version>${project.version}</version>
</dependency>
<dependency>
<groupId>org.evomaster</groupId>
<artifactId>evomaster-core</artifactId>
<version>${project.version}</version>
</dependency>
<dependency>
<groupId>org.evomaster</groupId>
<artifactId>evomaster-e2e-tests-spring-examples</artifactId>
<version>${project.version}</version>
</dependency>
<dependency>
<groupId>org.evomaster</groupId>
<artifactId>evomaster-e2e-tests-utils</artifactId>
<version>${project.version}</version>
</dependency>
<dependency>
<groupId>org.evomaster</groupId>
<artifactId>evomaster-e2e-tests-dropwizard-examples</artifactId>
<version>${project.version}</version>
</dependency>
</dependencies>


<build>
<plugins>
<plugin>
<groupId>org.jacoco</groupId>
<artifactId>jacoco-maven-plugin</artifactId>
<executions>
<execution>
<id>report-aggregate</id>
<phase>verify</phase>
<goals>
<goal>report-aggregate</goal>
</goals>
</execution>
</executions>
</plugin>
</plugins>
</build>
</project>

0 comments on commit 497c3ce

Please sign in to comment.
You can’t perform that action at this time.