mardi 23 février 2021

Generate a report for Junit

when I execute mvn test I can see individual reports generated for each test class. I have one test faiuled below.Where or how can i generate a reports where i can see how many and which test failed as my test cases grow.I am using spring boot , maven , jacoco plugin and junt5 with mockito

Tests run: 6, Failures: 0, Errors: 1, Skipped: 0 [INFO] [INFO] ------------------------------------------------------------------------ [INFO] BUILD FAILURE [INFO] ------------------------------------------------------------------------ [INFO] Total time: 12.633 s [INFO] Finished at: 2021-02-24T03:09:47+05:30

Below is my pom.xml snippet

<build>
        <plugins>
            <plugin>
                <groupId>org.springframework.boot</groupId>
                <artifactId>spring-boot-maven-plugin</artifactId>
            </plugin>
              <plugin>
        <groupId>org.jacoco</groupId>
        <artifactId>jacoco-maven-plugin</artifactId>
        <version>0.8.6</version>
        <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>
        </plugins>
    </build>

Aucun commentaire:

Enregistrer un commentaire