i am trying out clover on an android app in eclipse. i have a test app and a main app. when i try to run my function as clover it gives the following error.
junit.framework.AssertionFailedError: Exception in constructor: testDisplay (java.lang.NoClassDefFoundError: com_cenqua_clover.CoverageRecorder
at java.lang.reflect.Constructor.constructNative(Native Method)
at java.lang.reflect.Method.invokeNative(Native Method)
at dalvik.system.NativeStart.main(Native Method)
You cannot have default value of initstring. You must use "clover+remote:..." URI as described in manual above. You will also have to click "Referesh" button after tests in order to fetch coverage from Androd device (or emulator).
Thank you Marek for your reply. i read through your forums did a clean build and now my clover is atleast showing no error.
But its still not showing any coverage. I am just seeing the pink lines which means no coverage. may be its my initString on both main and test app. both have default value enabled.
if this is incorrect please specify any link which gives more insight on how to configure the initstring for juint tests for android.
ok so i just read through the tutorial. for my main app and the test app the nitString is .clover/coverage.db. This coverage.db is automatically created in the clover folder. In your tutorial it says not to use the same name of the.db file for both app and the test app. Do i need to create a new .db file with a separate name?
i tried to do that by naming it coverage-test.db but it generates an error.
ERROR: A problem was encountered while rendering the report: Clover registry file "C:\Users\marehman\workspace\helloTest\.clover\coverage-test.db" does not exist, cannot be read or is a directory.
Please ensure Clover has instrumented your source files.
You may need to remove existing .class files for this to occur.
Do you mean that your initstring is ".clover/coverage.db"? It's necessary to use URI with absolute path; and make sure that "Relative to project dir" toggle is disabled. In your case:
is would be:
The initstring format is clearly described on the Clover-for-Android page. Please note that in case of application running on Android you do not copy clover.db to a device (and note that normally Clover requires this clover.db in runtime). So instead of using a simple path for initstring, you have to use URI in order to give Clover more information:
This community is celebrating its one-year anniversary and Atlassian co-founder Mike Cannon-Brookes has all the feels.Read more
Atlas Camp is our developer event which will take place in Barcelona, Spain from the 6th -7th of September . This is a great opportunity to meet other developers and get n...
Connect with like-minded Atlassian users at free events near you!Find a group
Connect with like-minded Atlassian users at free events near you!
Unfortunately there are no AUG chapters near you at the moment.Start an AUG
You're one step closer to meeting fellow Atlassian users at your local meet up. Learn more about AUGs