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

Configuring database location for integration tests

Hello,

I try to run clover for both integration tests and unit tests. The integration tests are in a seperate module and run after the module of the source code.

I configured in the pom properties the location of the clover.db file and in the clover-report the location of the source file.

1. Does the clover.db contains only source file information or coverage information as well? If it should contain coverage information, how to configure clover to produce clover.db file for module with source files located in another module?

2. At the end of run I get the message: "Processed 0 test case results from 13 results files"

Why it doesn't locate the test file?

Thanks for support.

Nava Polak Onik.

HP.

2 answers

1 accepted

0 votes
Answer accepted

Hi Nava,

Does the clover.db contains only source file information or coverage information as well?

The Clover Database (clover.db) contains information about code structure (packages, files, classes, methods, statements etc). It does not keep coverage information - coverage is stored in separate files which are named like:

  • clover.db<some_hash>, clover.db<some_hash>.1 - they contain global coverage data
  • clover.db<even_longer_hash>.s - they contain per-test coverage data

More details here: CLOVER/Managing+the+Coverage+Database

When rendering an HTML report, Clover reads content of source files from location(s) as was found during instrumentation. You can point to different source location by using <clover-report>/<sourcepath> (for Ant).

How to configure clover to produce clover.db file for module with source files located in another module?

I don't think that it's necessary, actually. You can either:

  • instrument every module separately (thus creating separate clover.db files for each module) or
  • use a single database for all modules (the <singleCloverDatabase> parameter for clover2:setup)

Next you have to run your code ensuring that all instrumented classes are able to find their corresponding databases. How to achieve this depends on your project and environment setup, there are plenty options available. See the "Decision Matrix" on CLOVER/Using+Clover+in+various+environment+configurations page.

At the end of run I get the message: "Processed 0 test case results from 13 results files". Why it doesn't locate the test file?

I would need more details to answer this question. The most probably it just did not found a corresponding test class in the Clover Database (clover.db). For instance, in case when you've used wrong clover.db for reporting. Or in case when your integration tests are not compatible with JUnit/TestNG and test names (in test reports in XML files) do not contain information about test class.

Feel free to create a support ticket at: support.atlassian.com(attaching your pom.xml, build logs, Clover databases, Clover report etc). I'll be happy to investigate it further.

Cheers
Marek

Thank you, I configured a single database and it worked fine for me.

Suggest an answer

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

Happy New Year and Welcome New Marketplace Partner Program Partners!

Happy New Year! We hope you all had a safe and restful holiday season. 2020 was a unique year full of unforeseen events; however, as we enter the new year of 2021, we’re optimistic for the light at t...

435 views 5 16
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