How to include integration tests when running code coverage from clover , currently test-app includes tests only from unit tests directory, we have tests in unit tests and integration tests under tests package. Test report is not showing tests from integration directory. Any help is appreciated.
Thanks
Hi Santhosh,
Your description of the problem is insufficient, could you provide more details, please?
Cheers
Marek
Hello Marek,
Thanks for the reply and please see my responses inline.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
> Dev stack Grails framework, report run from IDEA
Please note that currently Clover does not support instrumentation of Groovy code in Eclipse and IDEA - the only way to get coverage for Groovy is to run a build from a command line (Ant / Maven / Grails).
What Grails version do you use? Please note that Clover is not compatible with Grails 3 (which changed their build system from Gant to Gradle).
> clover:4.1.1
By the way: there is a newer version available - 4.1.2 - it brings a critical bug fix for Groovy instrumentation, so you may find valuable to update.
> Tests launched from IDEA 'test-app 'and picked up during build time(gradle)
I recall that there are some problems with Grails application and launching tests from IntelliJ IDEA - the reason is that IDEA launches tests a little bit differently than the 'grails test-app' command - see https://jira.atlassian.com/browse/CLOV-1443.
Could you please clarify how do you run tests - are you calling 'grails test-app' goal from the Grails view or do you run tests via 'Edit Configurations...' + 'Run' button?
> build time(gradle)
What do you mean by this? Please note that Clover does not officially support Gradle yet. What plugin do you use?
> I am referring to clover's html report and Test results Tab - These have report from unit tests only.
In which language do you have your application code / unit tests / integration tests written? Are they in Java or Groovy?
One more question: what happens when you launch a build from a command line - is Clover able to correctly measure code coverage for both unit and integration tests? I'm asking because I'd like to clarify whether it's a problem in IntelliJ IDEA only or whether it does not work in a command line too.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.