Emma for the WAR file tool

I need to check the code coverage of web services hosted on Tomcat during unit testing. I will use manual testing tools. I will pass different parameter values ​​in my HTTP request and should have a coverage report for each test case for every request sent to the server. How can I do this with Emma or is there another tool I can use?

or

Tell us about the steps for using WAR WAR with Emma

+4
source share
1 answer
  • create an ANT target in your project that compiles the source code and documents class files and creates a war file.

                                                                                                                                                             

  • jma/jre/lib/ext/ java/jre/lib/ext/ema-2.1.5320.jar , java tomcat.

  • setenv.sh tomcat/bin/, :

    !//

export JAVA_OPTS = "$ JAVA_OPTS -XX: -UseSplitVerifier -Demma.coverage.out.merge = true"

  1. tomcat , tomcat (ps -aef | grep tomcat)
  2. tomcat/webapps/.
  3. , catalina.out EMMA:
0

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


All Articles