A client has asked to share an HTML version of test coverage report for the AEM project.
What plugin should the AEM developer use to generate test coverage report using latest archetype?
A)
B)
C)
To generate a test coverage report for an AEM project using the latest archetype, the correct plugin to use is the maven-surefire-plugin (Option A). The maven-surefire-plugin is a part of the Maven ecosystem and is widely used to run unit tests within a Maven project. This plugin can be configured to generate detailed test reports, including HTML versions, which can be easily shared with clients.
Here's how to configure the maven-surefire-plugin to generate test coverage reports:
Add the Plugin to the POM File: Add the maven-surefire-plugin configuration in your pom.xml file:
<groupId>org.apache.maven.plugins</groupId>
<version>2.22.2</version>
<configuration>
<reportsDirectory>${project.build.directory}/surefire-reports</reportsDirectory>
<reportFormat>html</reportFormat>
<trimStackTrace>false</trimStackTrace>
</configuration>
Execute the Maven Command: Run the following command to execute the tests and generate the coverage report:
mvn clean test
Locate the Report: The HTML test coverage report will be generated in the target/surefire-reports directory of your project.
Lyda
2 months agoLavera
20 days agoStefanie
21 days agoRebecka
2 months agoLatia
2 months agoAugustine
2 months agoHoward
2 months agoOretha
2 months agoWade
2 months agoAnnmarie
2 months agoLavonda
1 months agoNidia
2 months agoWhitley
2 months agoNicholle
2 months agoLasandra
2 months agoKarl
2 months agoMose
2 months agoJettie
2 months agoElvera
2 months agoStephen
2 months agoWade
3 months agoBilly
3 months agoAmmie
2 months agoPaulina
2 months ago