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 generate coverage across three projects in Android?

I have three projects as part of the source code. First one of them is a dependent project and the other and the third one is depedent on the second one.

My question is what settings should I be doing for InitString on all three projects. I'm using Eclipse IDE and have these as Android projects.

I have provided custom initstring values for two of the projects. Code gets instrumented but "clover" directory would not get created in the path I gave for InitString.

Any help here would be highly appreciated!

11 answers

0 votes

Could you paste exact initstring values used for all three projects?

Do you use relative or absolute path?

Do you use initstring in URI format?

You wrote that "clover" directory is not being created in the path specified for initstring. Is it created at all? Where?

0 votes

Regarding single report - it's possible to merge several Clover databases into one and generate a consolidated report. See <clover-merge/> Ant task for instance.

1st project: clover+remote:file:///c%3A%5CTemp%5C1.db?localCoverageDir=/data/data/com.intuit.quickbooks/clover1/

2nd project: clover+remote:file:///c%3A%5CTemp%5C2.db?localCoverageDir=/data/data/com.intuit.quickbooks/clover2/

3rd project: clover+remote:file:///c%3A%5CTemp%5C3.db?localCoverageDir=/data/data/com.intuit.quickbooks/clover3/

I'm using absolute path

If I enable clover on all three projects, clover directories are not getting created at all.

Please let me know if you need any further information.

Regarding single report, if I get dbs from all three projects above, I can combine them.

Request some help here!

0 votes

I created three 'NotePad' projects, renamed them from 'com.example.android.notepad' to 'com.intuit.quickbooks' and used initstrings as specified by you. Clover databases were created in c:\Temp directory, it was also possible to start an application and record coverage data and next pull them into Eclipse and see coverage in an IDE. So it works fine on my side.

Questions:

- did you install Clover-for-Eclipse or Clover-for-Android?

- do you see c:\Temp\1.db, 2.db, 3.db files after project rebuild?

- do you see any error messages in ErrorLog?

- why all three projects have the localCoverageDir=/data/data/com.intuit.quickbooks path? are all three projects named 'com.intuit.quickbooks' in AndroidManifest.xml?

- what Java, Eclipse, ADT, OS version do you have?

0 votes

One more question: were you able to run Example #1 and #2 from https://confluence.atlassian.com/display/CLOVER/Clover-for-Android ?

One more question: were you able to run Example #1 and #2 fromhttps://confluence.atlassian.com/display/CLOVER/Clover-for-Android ?

Yes. I ran both the examples successfully.

Questions:

- did you install Clover-for-Eclipse or Clover-for-Android?

Yes. I have installed.

- do you see c:\Temp\1.db, 2.db, 3.db files after project rebuild?

I see only two .db files.

- do you see any error messages in ErrorLog?

No. No error messages in the logs.

- why all three projects have the localCoverageDir=/data/data/com.intuit.quickbooks path? are all three projects named 'com.intuit.quickbooks' in AndroidManifest.xml?

Androidmanifest file has different setting in one project and same setting in tow other projects. Should I be giving the setting in the Andoirmanifest.xml file as the path for localcoverageDir? Please clarify

- what Java, Eclipse, ADT, OS version do you have?

Java-1.7

Eclipse-Indigo

0 votes

> However, I don't see the folder that would contain the .db file on the device

1) Could you run it in emulator? I'd like to ensure that it's not a problem of the device itself.

2) Have you disabled the per-test coverage feature? There's one known bug (CLOV-1194). See https://answers.atlassian.com/questions/107086/error-message-arrayindexoutofbounds-with-clover-for-android

> However, I don't see the folder that would contain the .db file on the device

1) Could you run it in emulator? I'd like to ensure that it's not a problem of the device itself.

Ans: I'm running the tests on a rooted device. My feeling is device should not be an issue here.

2) Have you disabled the per-test coverage feature? There's one known bug (CLOV-1194). Seehttps://answers.atlassian.com/questions/107086/error-message-arrayindexoutofbounds-with-clover-for-android

Ans: I'm running all the tests manually.

Another question: If I unplug the device and plug it in again through USB, will I get coverage for the tests ran manually before unplugging the device?

1) Neverthless, could you run it in emulator?

2) Despite of running tests manually, Clover can still gather coverage per test. Please disable that feature.

3) Do you run tests using 'Run with Clover...'?

4) If you run tests before unpluging device then all coverage files should be generated correctly. Unplugin and plugin device should not affect them.

Regards,
Jacek

Please answer my questions.

Suggest an answer

Log in or Sign up to answer
TAGS
Community showcase
Published in Jira

Jira Cloud Performance Improvements

Hello everyone, I am a product manager in the Jira Cloud team focused on making sure our customers have a delightful experience using our products. Towards that goal, one of the areas which is extr...

163 views 2 8
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