Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

sbt-jacoco plugin not getting executable data from jacoco agent when runing It tests #100

Open
rufusmsbennett opened this issue Nov 1, 2017 · 0 comments

Comments

@rufusmsbennett
Copy link

rufusmsbennett commented Nov 1, 2017

Expected vs Actual Behaviour

Problem ...
We run our service in a separate bash shell on localhost and run "it:jacoco" in another shell to execute our tests. When the tests are complete and the report is generated, we see no coverage from the server side, as if no executable data was retrieved from the jacoco agent. Apparently, it never dumped its executable data, or if it did, the plugin doesn't find it.

It should...
We thought that when the tests are complete, the sbt-jacoco plugin would send a REST call to the jacoco agent telling it to dump, then the plugin would add that data to the coverage report.

Instead it...
The coverage report does not show any coverage on the server side. Note: We can run our service with coverage in IntelliJ and generate a report which shows our test should cover about 80%.

Steps to Reproduce

  1. Add the sbt-jacoco plugin: addSbtPlugin("com.github.sbt" % "sbt-jacoco" % "3.0.3")

  2. Enable plugin:
    lazy val root = (project in file(".")).enablePlugins(BuildInfoPlugin,JacocoItPlugin) ...

  3. In a terminal window, launch service (sbt run) with the jacoco agent using the following JVM arguments:
    export SBT_OPTS="-javaagent:/etc/jacoco/org.jacoco.agent-0.7.6.201602180812-runtime.jar=output=tcpserver,port=6300,address=*"

  4. In another terminal window, run the tests: it:jacoco

Environment

  • SBT version: 0.13.16
  • Plugin version: 3.0.3
  • Scala version(s): 2.11.8
  • Java version: 1.8.0_60-b27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant