chetanmeh commented on issue #3243: Collect test code coverage data
   ## How scoverage works
   Scoverage [gradle plugin][1] configures a [scala compiler plugin][2] which 
then instruments the source code and generates instrumented classes in 
   It also generates a `build/scoverage/scoverage.coverage.xml` which is a db 
of source code instrumentation mapping
 &quot;path undefined&quot;)
   The instrumented source looks like below (post decompile). Here call is 
being made to `scoverage.Invoker.` with the position id
    public Seq<String> whisk$core$entity$EntityPath$$apply(Seq<String> parts)
       throws IllegalArgumentException
   Now as test execute and the code path gets executed it would record the 
invocation in `build/scoverage/` files. Post test 
complete a task is run which consumes the measurement file and 
scoverage.coverage.xml to produce a `build/reports/scoverage/scoverage.xml` 
which the coverage file for that module. Then multiple coverage file can be 
combined to produce the final report
   ### Runtime classpath implication
   For the instrumented code to work we need to include following deps in 
classpath (current version 1.3.1)
   1.  org.scoverage:scalac-scoverage-plugin_2.11
   2. org.scoverage:scalac-scoverage-runtime_2.11
   This is simpler for unit test or tests where code from common, invoker and 
controller is run in same vm as test cases as the scoverage gradle plugin 
adapts the classpaths. However it posses some challenge with Docker setups

This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:

With regards,
Apache Git Services

Reply via email to