user1107888 user1107888 - 9 months ago 118
Java Question

JaCoCo missing executable issue

I have a small Maven application which uses JaCoCo for test coverage report. I keep getting the following error:

Skipping JaCoCo execution due to missing execution data file

Here is my POM.xml file. I have removed the Project Element myself.








Here is my main class which is under the

public class Punkt {
private Double x;
private Double y;

public Punkt(Double x,Double y) {
this.x = x;
this.y = y;

public Punkt(Punkt zweiterPunkt) {
this.x = zweiterPunkt.x;
this.y = zweiterPunkt.y;

public Double getX() {
return x;

public void setX(Double x) {
this.x = x;

public Double getY() {
return y;

public void setY(Double y) {
this.y = y;

public boolean punkteVergleichen(Punkt zweiterPunkt) {
return this.getX().equals(zweiterPunkt.getX()) &&

public String toString() {
return "("+this.x+","+this.y+")";


And here is class with unit tests which is under the

public class PunktUnitTests {

public void PunkteVergleichen() throws Exception {
//a(10.0, 20.0)
Punkt a = new Punkt(10.0,20.0);

Punkt b = new Punkt(30.0,40.0);

//Der Fall X1!=X2 und Y1!=Y2
//a(10.0,20.0) und b(30.0,40.0) sind unterschiedlich

//Der Fall X1 == X2 && Y1 == Y2
//a(10.0,20.0) und c(10.0,20.0) sind gleich
Punkt c = new Punkt(a);

//Der Fall X1 == X2 && Y1 != Y2
//a(10.0,20.0) und c(10.0,90.0) sind unterschiedlich


How can I solve this problem?

Answer Source

Although the message may be a bit misleading, the JaCoCo Maven plugin will emit this warning when no tests have been run. This is your problem here: by default, the Maven Surefire Plugin executes tests that follow a particular naming convention, namely:

  • "**/Test*.java";
  • "**/*";
  • and "**/*".

But your test is named PunktUnitTests, with a trailing "s", and it causes it not to be executed. Thus, what happens is the following: the Surefire Plugin is not running any tests, so the JaCoCo agent is never used, and, as a result, the execution data file is not getting created.

The simple solution here is to rename your test according to the conventions of the Surefire Plugin, namely to PunktUnitTest.

Another solution would be to configure the plugin to execute your tests ending with "s":


Note that if you want to prevent such errors in the future, you can configure the Surefire Plugin to fail if no tests are run, by setting the failIfNoTests parameter to true.