Hi there,
I am new to Clover and I installed the clover for Android based on the link below.
https://confluence.atlassian.com/display/CLOVER/Clover-for-Android
But after all the steps we are not getting any coverage results. Please make sure that this steps are enough or else guide us how to proceed to get the coverage results.
Thanks,
Vijay
I've seen Clover working fine for Android recently, and the users were new to Clover like you. They followed the instructions, fiddled a bit and got results.
I think you need to go back over your configuration, re-read the usage instructions, and read the logs to find out what you've missed.
Thanks for your inputs...
Yes i made some changes in the initstring with the link provided.
Now am getting some numbers in the "Av Me Cpx" and "Cpx". But i am not getting anything in the Cov% column, which i mainly required. Also i am not getting any Test execution results in the consolidated Test Execution field...
please see the screen shot for more info..
Vijay
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
1) The "Referenced Libraries" has the CLOVER_RUNTIME library on the list - is the "export" checkbox enabled?
2) Do you run tests in the emulator or on some hardware?
3) Did you run unit tests or did you perform some manual tests?
4) What value of InitString do you have? (Project Properties > Clover > InitString)
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
1. Yes CLOVER_RUNTIME is enabled.
2. I am running in a real hardware and it is connected through ip and USB cable
3. I am performing a manual testing?
4. My Initstring value is clover+remote:file:///c%3A%5CUsers%5Cvayyathx%5Cworkspace%5Cmediastress%5Ccoverage-test.db?localCoverageDir=/data/app/clover
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
ad 4. Does your application have write permissions to the /data/app/clover directory?
Please open check if the /data/app/clover directory has any coverage files in it (they should be named like "coverage-test.db<some_hash_code>". If not - then the most probably you don't have a write permission to this location - in such case change the initstring. If you see coverage files, then please check if they have been copied back to your PC - go to the location defined in InitString (the "c:\Users\vayyathx\workspace\mediastress" I presume) and check if in addition to the coverage-test.db file you see coverage files as well. If not - open the "Coverage Explorer" view and click the "Refresh coverage" button - it should fetch the data files from a device.
Please also note that typically Android applications have write access to the "/data/data/<your appplication name>" directory (see the sample InitString on the Clover-for-Android page).
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
One more question: did you check the "Troubleshooting" chapter from the Clover-for-Android page? What messages do you see in the "Error Log" view?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Thanks for your reply... I am getting a warning message stating that they are changing the existing XX*report*XX.html file.
But the report says like we are not exercing the software... After the test execution we are not getting any coverage over it.... i am attaching my html report with this. ()
Vijay
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
The HTML report is not needed at the moment. You have to achieve that coverage recording files are being generated first, as I wrote above.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
i created "coverage_test.db" file from windows pc and pushed inside the "/data/data/com.android.stresstestapp/" directory with full permisson. But that file was as it is after running the test. I think that is the problem.
Vijay
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
There is no need to push "coverage_test.db" to the Android device. Exceprt from the Clover-for-Android page:
Running instrumented application on a device or emulator
1) Select "Run as ... > Android application" from main menu or Package Explorer context menu. You can execute your application or unit tests on a real device or simulator. Choose device you wish to use.
There is no need to copy the clover.db to a device (yay!). Clover-for-Android is using a special coverage recorder version, which does not require presence of this database.
There is also no need to copy clover.jar to a device (yay!). Google Android Toolkit will automatically package CLOVER_RUNTIME jar file into Dalvik image during packaging.
The "coverage_test.db" is a Clover database and it's produced after compilation. What you need are coverage recording files which are being generated at runtime. More details about Clover's files you can find here: https://confluence.atlassian.com/display/CLOVER/Managing+the+Coverage+Database
Please follow the steps from the "ad 4. Does your application have write permissions to the /data/app/clover directory?" comment and tell what results do you see after each step.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Ok. I checked the write permission in /data/data/com.android.stresstestapp/clover" directory. It was given for all users. So my application do have the same.
i am not copying the clover.db and clover.jar to my DUT(Android device).
I need to know why i am getting 0.0% coverage in the coverage report. Please tell me the clear resolution. We are planning to purchase a licensed copy soon i get evaluated this thing.
Vijay
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
After the test execution, clover is generating the "coverage-test.db.liverec" file inside "/data/data/com.android.stresstestapp/clover"... So it is confirming that the App has permission to write something in that directory.
The file has some garbage value of one line.
Vijay
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Vijay,
After the test execution, clover is generating the "coverage-test.db.liverec" file inside "/data/data/com.android.stresstestapp/clover"... So it is confirming that the App has permission to write something in that directory.
OK. So the write permissions are fine. The most probably you have a wrong flush policy set - go to the Project Properties > Clover > Instrumentation tab. in the "Flush policy" box please select the "At set intervals" radio button and set it to 1000 ms.
We are planning to purchase a licensed copy soon i get evaluated this thing.
It's great that you are interested in our Clover product. However, please take into account that the Clover-for-Android is an alpha version and we do not provide technical support for it, as stated in the documentation.
Please also note that the full Android support is not on the Clover road map currently.
Regards
Marek
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Marek,
Eventhough i changed the flush policy as "At set intervals", i am not getting expected output. Thanks for your support.
May i know when you guys start work with "Clover for Android"
Vijay
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hello Vijay,
May i know when you guys start work with "Clover for Android"
Atlassian do not plan to work on "Clover for Android" in the nearest future and do not plan to support current alpha version. The number of possible devices and user specific environments makes it a big task.
Therefore we decided to put our effort into supported and most used parts of Clover like Maven, Ant and IDEs. Please take a look at the official Clover page for more details about the product, supported platforms and tools:
https://www.atlassian.com/software/clover/overview
https://confluence.atlassian.com/display/CLOVER/Supported+Platforms
Cheers,
Jacek
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.