Hi,
A clover question:
I'm trying to collect code coverage result from our system test framework. I found the example 3( or 3b) matches my scenarios on this page: https://confluence.atlassian.com/display/CLOVER/Using+Clover+in+various+environment+configurations#UsingCloverinvariousenvironmentconfigurations-Example#3-multipleapplicationsexecutedonseveralserversinisolation
I'm confused about this line "As every application runs in their own JVM and due to fact that we have used cloverDatabase (and optionally singleCloverDatabase) pointing to absolute path on a network drive, we don't need to provide clover.initstring parameter at runtime, because correct path is hardcoded in instrumented classes."
Where does the "correct path" of clover.db stored? Hardcoded in the instrumented classes?
If that's the case, does that mean 2 clover instrumented apps can run on the same JVM and we can collect the code coverage data without a problem? Assuming I put the clover.db files into the same path as it was in the build machine?
Thanks in advance,
Will
Hi Will,
Where does the "correct path" of clover.db stored? Hardcoded in the instrumented classes?
Yes, Clover stores a path to a database file in every class instrumented (more precisely - in every top-level class, for anonymous classes or inner classes it uses a path from the enclosing class).
If that's the case, does that mean 2 clover instrumented apps can run on the same JVM and we can collect the code coverage data without a problem?
Yes, in a single JVM you can run multiple applications or application modules with different paths to clover.db.
Assuming I put the clover.db files into the same path as it was in the build machine?
Yes, in case you used an absolute path in initstring, then you have to store clover.db files in the same location.
You can either copy them from a build machine to a test machine (e.g. tar -cf clover.db.tar `find . -name clover.db`; scp clover.db.tar ...) or use a network drive.
Alternatively, you can use a relative path and use -Dclover.initstring or -Dclover.initstring.basedir property on a test machine.
Regards
Marek
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
PS: Please have a look also at Example #4 from the page you linked - I guess you may be interested in having per-test code coverage in reports. Also have a look at this tutorial: Working+with+Distributed+Applications - it shows a standard setup.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Online forums and learning are now in one easy-to-use experience.
By continuing, you accept the updated Community Terms of Use and acknowledge the Privacy Policy. Your public name, photo, and achievements may be publicly visible and available in search engines.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.