unified-code-coverage-android | coverage data from both Instrumented and Unit | Unit Testing library
kandi X-RAY | unified-code-coverage-android Summary
kandi X-RAY | unified-code-coverage-android Summary
A sample project showcase of how to merge the coverage data from both androidTest and test.
Support
Quality
Security
License
Reuse
Top functions reviewed by kandi - BETA
- Initializes the view
- Set button text
unified-code-coverage-android Key Features
unified-code-coverage-android Examples and Code Snippets
Community Discussions
Trending Discussions on unified-code-coverage-android
QUESTION
I know there are quite a few questions (and answers) for this topic, but I've tried everything I found in SO and other sites and I haven't found a way to make JaCoCo include coverage for Android tests that use Mockito.
My problem: I want to use JaCoCo to generate code coverage of both Unit Test and Instrumentation Test (androidTest). I'm using Mockito to mock some of the classes. I found a sample in GitHub to use JaCoCo and used it as a starting point.
https://github.com/rafaeltoledo/unified-code-coverage-android
When I run the custom jacocoTestReport task included in that example, the code coverage report is properly generated and code coverage is at 100%. The report includes both unit test and android test. However, that sample is not using Mockito (which I need), so I added the following to app/build.gradle
...ANSWER
Answered 2017-Oct-06 at 21:55am I doing something wrong?
Let's put aside Android, because there is IMO clearly something wrong with your expectations/understanding about core thing here - mocking:
even though I clearly have a test that exercises that class.
By
Community Discussions, Code Snippets contain sources that include Stack Exchange Network
Vulnerabilities
No vulnerabilities reported
Install unified-code-coverage-android
You can use unified-code-coverage-android like any standard Java library. Please include the the jar files in your classpath. You can also use any IDE and you can run and debug the unified-code-coverage-android component as you would do with any other Java program. Best practice is to use a build tool that supports dependency management such as Maven or Gradle. For Maven installation, please refer maven.apache.org. For Gradle installation, please refer gradle.org .
Support
Reuse Trending Solutions
Find, review, and download reusable Libraries, Code Snippets, Cloud APIs from over 650 million Knowledge Items
Find more librariesStay Updated
Subscribe to our newsletter for trending solutions and developer bootcamps
Share this Page