0

I am unable to measure code coverage for my scala application using the tests written in Python. Steps followed to generate the report,

  1. Compile the application activator -Dsbt.override.build.repos=true -Dsbt.repository.config=./repositories -Dsbt.log.noformat=true clean coverage dist

  2. Run the application on port 9002 cd target/universal unzip sample-app-1.0.zip cd sample-app-1.0 bin/sample-app -Dhttp.port=9002

  3. Run python tests against this application cd /home/python-tests python ./tests/sample_tests/pkg1/

  4. lsof -t -i:9002 (Kill the application)

  5. activator -Dsbt.override.build.repos=true - Dsbt.repository.config=./repositories -Dsbt.log.noformat=true coverageReport

Can someone please help me understand if the setup is correct?

Krishhna
  • 21
  • 2
  • I took `play-scala-starter-example`, added scoverage plugin to `project/plugins.sbt` and run instrumented application in two ways to test it manually: a) `sbt clean coverage run coverageReport` b) `sbt clean coverage dist`, go to `target/universal`, unzip and run the application, kill it, return to project root and call `sbt coverageReport`. In both cases it has worked and I've had proper coverage reports. Create simple and publish somewhere simple test project. Without that I cannot help you. – Grzegorz Slowikowski Jul 06 '17 at 16:10
  • I was able to figure out the issue and fix it. I was not running my tests the right way against my instrumented code – Krishhna Jul 07 '17 at 19:45

0 Answers0