Need help!

  • Anonymous - 2012-04-05

    I am using emma as a code coverage tool for one application. I have followed below instructions to generate the report..

    1. Instrumented our application's jar file with emma.jar
    2. Started the application
    3. Run a test case on the application
    4. Stop the application
    5. Generate the code coverage report by using the below command
    java -cp emma.jar emma report -r html -in coverage.em,

    I successfully got the report. But my problem is every time I start and stop the application and generate the report, I lose my previous information in the report rather than appending the latest coverage in the report. The application I am testing is very big application and takes almost 10 days to complete the testing. Every day I shutdown the application server. Can anyone please suggest the exact steps on how to append the test result to this report.

  • Ernest Quintin

    Ernest Quintin - 2012-05-17

    Don't just take the default name "".  Name each coverage file.  I suggest something like "myJava_{date}_{time}.ec"
    Then use the merge facility to merge the ec files.  E.g. java -cp ${PATH}/emma.jar emma merge -in ${FILE_LIST} -out ${PATH}/${DESTINATION_FILE}, where FILE_LIST is all or part of the *.ec files.
    Then run emma report like:
    java -cp ${PATH}/myJava.em, ${DESTINATION_FILEs} -Dreport.html.out.file=${PATH}/myJava.html
    For details, RTFM.


Log in to post a comment.