mercredi 24 février 2016

Jacoco for Android Instrumentation Test using AndroidJunit

I am facing an issue while creating an test report using jacoco for Android Instrumentation Test. I am using AndroidJUnit4 to create test cases.

Here is what I am doing:

  1. Created the test cases and placed under default src/androidTest directory. Tested all the test cases executed properly.
  2. Integrated jacoco, taken the reference from http://ift.tt/1RondGf
  3. When I try to generate the jacoco report I am getting an error on gradle console that :app:testDebugUnitTestCoverage SKIPPED but no other warning or error.
  4. Also when I write the test cases using jUnit and everything is working as expected. I able to see the reports generated in the build directory. Note: As these are unit test cases so I put them in src/test not in src/androidTest

Does anybody has idea how we can create reports using jacoco for test cases created using AndroidJunit4.

Thanks

Aucun commentaire:

Enregistrer un commentaire