Search code examples
javajunitcode-coverageemmabytecode-manipulation

How does Emma work?


For using Emma we'll first instrument the jar using Emma. During that time em metadata files will get generated and when you run the JUnit test cases over the instrumented jars ec files will get generated. Which is used for generating the coverage report.

My question is we are not specifying the path to the em files when we are running the the test cases, so how it is able to generate the ec files? also I have heard Emma uses a port while running. What is that port ?


Solution

  • Andrew, by default EMMA is using current folder to look for coverage.em file. I don't believe it is listening on any TCP ports, I did a quick scan trough EMMA source code and couldn't find any references to sockets. It is only using URLs for loading class files from the classpath for instrumentation.