testng-eclipse icon indicating copy to clipboard operation
testng-eclipse copied to clipboard

Can't run test with Jacoco enabled project

Open missedone opened this issue 6 years ago • 0 comments

Problem Statement

after migrate to jacoco, the test failed to start in Eclipse, but runs well with maven cli.

<plugin>
          <groupId>org.apache.maven.plugins</groupId>
          <artifactId>maven-surefire-plugin</artifactId>
          <configuration>
            <argLine>
<!-- jacoco generate the property `argLine` -->
                ${argLine}
                -Xmx256m
                -noverify
            </argLine>
          </configuration>
        </plugin>
        <plugin>
            <groupId>org.jacoco</groupId>
            <artifactId>jacoco-maven-plugin</artifactId>
            <executions>
                <execution>
                    <goals>
                        <goal>prepare-agent</goal>
                    </goals>
                </execution>
                <!-- attached to Maven test phase -->
                <execution>
                    <id>report</id>
                    <phase>test</phase>
                    <goals>
                        <goal>report</goal>
                    </goals>
                </execution>
            </executions>
        </plugin>

Any relate message in "Error Log" view

"Windows -> Show View -> Others -> Error Log" Screenshot at Sep 13 11-04-04

The Dependency Management tool for your project

  • [x] Maven
  • [ ] Gradle
  • [ ] Ant
  • [ ] Eclipse Buildpath (aka. Use "TestNG Library" for your project in Eclipse)

Operating System

  • [ ] Windows
  • [ ] Linux
  • [x] OSX

missedone avatar Sep 13 '19 18:09 missedone