Testing Groovy Code with Spock / Cobertura

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

Testing Groovy Code with Spock / Cobertura

Kenny Reid
Hi,
 
I'm having difficulty testing Groovy Gode through Spock / Cobertura. While the code coverage looks correct, the branch coverage is not.
 
A simple if / else statement where both conditions were tested, only gave me 50% coverage.
From doing some browsing, I see that groovy is doing code optimization behind the scenes which results in "hidden branches" in the final code..
 
The most recent post I could find is this one, which explains the situation:-
 
 
This also concludes that there isnt much really you can do about it.
Just wondering if there is any update on this, or whether anyone can recommend a different tool for code coverage  / branch testing for Groovy Code with Spock?
 
Regards,
Kenny
 
 

--
You received this message because you are subscribed to the Google Groups "Spock Framework - User" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To post to this group, send email to [hidden email].
Visit this group at http://groups.google.com/group/spockframework.
For more options, visit https://groups.google.com/d/optout.
Loading...