Configuring database location for integration tests

Nava Polk April 21, 2014

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
Marek Parfianowicz
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
April 22, 2014

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

0 votes
Nava Polk May 10, 2014

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

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events