Test Coverage integration for tomcat-deployed webapp?

I have a maven project that compiled as a WAR file. Then I have a separate test project containing an integration test. This project will launch the web application via tomcat from the WAR files, and then run the tests.

The only coverage report I have now is only for unit tests in the main project. Using JMockit coverage and JUnit .

How can I get code coverage for this web application?

+4
source share
1 answer

JaCoCo. JaCoCo - Java, JVM . Maven: jacoco-maven-plugin .

jacoco.exec .

:

maven-failsafe-plugin tomcat maven . , , - jacoco ant maven-antrun-plugin ( ). .

, JaCoCo maven .

,

+5

Source: https://habr.com/ru/post/1648612/


All Articles