Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in

Next challenges

Recent achievements

  • Global
  • Personal

Recognition

  • Give kudos
  • Received
  • Given

Leaderboard

  • Global

Trophy case

Kudos (beta program)

Kudos logo

You've been invited into the Kudos (beta program) private group. Chat with others in the program, or give feedback to Atlassian.

View group

It's not the same without you

Join the community to find out what other Atlassian users are discussing, debating and creating.

Atlassian Community Hero Image Collage

How to include integration tests when running code coverage ?

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

1 answer

0 votes

Hi Santhosh,

Your description of the problem is insufficient, could you provide more details, please?

  • what Clover integration do you use (Ant / Maven / Grails / Eclipse / IDEA ...)?
  • what Clover version do you use?
  • how do you launch your tests?
  • what test report do you refer to?
    • are you talking about Clover's HTML Report and the "Tests results" tab? 
    • or about some JUnit test report(s)?
    • or something else?

Cheers
Marek 

Hello Marek,

Thanks for the reply and please see my responses inline.

  • what Clover integration do you use (Ant / Maven / Grails / Eclipse / IDEA ...)?
    Response:Dev stack Grails framework, report run from IDEA
  • what Clover version do you use?
    Response: clover:4.1.1
  • how do you launch your tests?
    Response: Tests launched from IDEA 'test-app 'and picked up during build time(gradle)
  • what test report do you refer to?
    • are you talking about Clover's HTML Report and the "Tests results" tab? 
      Response: I am referring to clover's html report and Test results Tab - These have report from unit tests only.
    • or about some JUnit test report(s)?
    • or something else?

    Thanks

> 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.

Suggest an answer

Log in or Sign up to answer
TAGS
Community showcase
Published in Marketplace Apps & Integrations

Learn how to request and manage app requests in the Marketplace

G’day everyone! Super exciting news coming from the Marketplace. We have now fully rolled out the ability for end-users to submit app requests to admins directly from within the product! No longer ...

9 views 0 2
Read article

Community Events

Connect with like-minded Atlassian users at free events near you!

Find an event

Connect with like-minded Atlassian users at free events near you!

Unfortunately there are no Community Events near you at the moment.

Host an event

You're one step closer to meeting fellow Atlassian users at your local event. Learn more about Community Events

Events near you