Closed C-Otto closed 7 years ago
Are you referring to coverage in the consumer tests? What build tool do you use to run the tests?
I have jacoco coverage working, but that is with Gradle + Groovy Pact DSL + Spock.
Sorry, that was very imprecise.
I'd like to see coverage when running consumer tests (against the mock server provided by PACT). I run maven with jacoco (pact-jvm-consumer-junit_2.11 version 3.1.0).
I have coverage working with Maven and with both Spock and JUnit but with groovy code. I'll try with the Pact Java DSL next.
@uglyog I see exactly this problem...how did you get it working with Pact Java DSL and JUnit?
To answer my own question....by switching from JUnit4 to JUnit5!
@uglyog when you say you have the coverage working, do you mean you can know from the consumer side, how many interfaces / interactions are covered with Pact tests? .. Are you keen on sharing your code?
No, this is just normal code coverage.
I fail to use jacoco to compute code coverage for my PACT tests. I expect the tested class to be (partially) covered, instead I see no coverage at all. I assume this is because PACT starts a new thread/JVM which is not instrumented by jacoco.