Ratpack Code Coverage

classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Ratpack Code Coverage

bhuddleston42
What are people using for code coverage with Ratpack?

I have tried:

Cobertura Gradle Plugin - Fails instrumenting on some Guava cache stuff saying "1" is not a valid class name.

Jacoco Gradle Plugin - This successfully instruments but shows auto-generated code such as @EqualsAndHashCode and groovy getters and setters as uncovered.  (I think Jacoco would let me filter it but the gradle plugin apparently does not support that.

What are you guys using?  Any suggestions?

-Brian
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Ratpack Code Coverage

Luke Daley
Administrator
This is pretty much a straight up Gradle question.

I haven't had to do this yet, but I'd probably go for Jacoco. From there I'd ask for help on the Gradle forums for how to solve those problems.
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Ratpack Code Coverage

neuromantik33
Sorry to resurrect an old thread, however I'm having trouble using Jacoco covering a standalone Ratpack groovy script.

Of course I'm testing with Spock using an integration style GroovyRatpackMainApplicationUnderTest. I haven't yet asked anything in the Gradle forums but it seems as though the ratpack gradle plugin doesn't really declare the 'src/ratpack' directory as a SourceSet. Even after adding at by hand I'm still getting nothing in the HTML report.

Any suggestions would be much appreciated :)
Loading...