Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

Introduction

Tiptip
titleBig Hint

Within about ten lines of command line coding you may be enable to perform live code coverage for your favorite piece of code and generate live reportsreporting. Below is the recipe

Introduction

Emma is an open source code coverage tool. In our case, Emma enables code coverage by instrumenting the target code. The instrumentation process involves Emma looking at the class or jar files and adding its own layer between the JVM and the code normally called.

...

Code Block
java emma ctl -connect localhost:47653 -command coverage.get,{$EMMA_REP0RT_HOME}/coverage.ec \
-command coverage.reset

Note: 1 The port number is 47653 is default and may be changed
Note: 2 If you want to start with fresh information remember to delete {$EMMA_REP0RT_HOME}/coverage.ec
Note: 3 In theory you may contact other instrumented systems not residing locally

Generate the actual report:

...