Comments (6)
This is on my roadmap. Happy to prioritize it.
from android-showcase.
The differences I've noticed seemed linked to lines in kotlin that are interpreted as several different lines in Java: typically, a field declared in the kotlin constructor for instance that result in a constructor parameter, a field declaration, a getter and a setter in the byte code. So the same line can be marked as covered because the constructor parameter is executed but it can also be marked as not covered because the getter is not. Hard to decide which interpretation is the best, I guess.
from android-showcase.
I was experimenting with jacoco.
There is jacoco Gradle plugin, but it looks that it needs a bit of additional configuration for Kotlin and Android. It is not always that straight forward due to the usage of Gradle Kotlin DSL
.
On top of the above there are two Gradle plugins that can simplify the configuration process (for multiple modules and potentially multiple build variants):
- arturdm/jacoco-android-gradle-plugin - plugin has to be applied at the subproject (module) level and it was not generating reports for me out of the box and it has many unresolved issues
- vanniktech/gradle-android-junit-jacoco-plugin - this one looks promising because it can be applied at the root project level. It also provides some tasks to merge Jacoco reports. Unfortunately, this plugin does not support
android dynamic feature modules
so I have opened the PR #158.
(I also tried to run an updated version of this plugin locally, but it requires to provide some Android dependencies which is too much hustle for now)
Next steps:
Wait for PR to be merged.
If this will not happen soon then I may think about configuring this manually.
from android-showcase.
I've had some difficulties setting it up for my project, especially because I had my tests in a separate module and I had to concatenate source folders from the others modules for jacoco to report coverage on them. If you're interested, you can look at the /gradle/coverage.gradle file in my project httpmocker: https://github.com/speekha/httpmocker
from android-showcase.
Also Codacy and Codecov seem to interpret the reports differently. Codecov has a lot of missed lines (which are actually tested) that Codacy marks as covered. Not sure if that's because of a positive lack of accuracy on Codacy's part or a negative lack of accuracy on Codecov's part.
from android-showcase.
thx for the project, I will take a look.
This comparison between Codacy
and Codecov
is a nice catch - I will take a closer look at this as well. It should be quite easy to determine which one is right by analyzing Jacoco reports, running AS test coverage and comparing all results.
from android-showcase.
Related Issues (20)
- Deduplication in BaseViewModel HOT 1
- who have a toolbar with this project example? I use toolbar in tab will blinks,anyone who can help me, thanks in advance. HOT 1
- AlbumAdapter.kt: Unresolved reference: FragmentAlbumListItemBinding HOT 2
- RuntimeException: cannot find implementation for feature.album.data.database.AlbumDatabase. AlbumDatabase_Impl does not exist HOT 1
- Caused by: android.view.InflateException: Binary XML file line #20 in com.igorwojda.showcase:layout/activity_nav_host: Binary XML file line #20 in com.igorwojda.showcase:layout/activity_nav_host: Error inflating class fragment HOT 3
- maybe simple? HOT 1
- run error HOT 1
- please fix this project HOT 1
- build fail
- third-party package HOT 2
- How about performance if state alway update whole view? HOT 1
- Dependency Dashboard
- Action Required: Fix Renovate Configuration
- More info about every element of project HOT 2
- Could you add a pure Kotlin module? HOT 1
- Update `TaskController.updateTask` to use`@RequestBody` with dedicated use case
- Search Bar does not execute search on 'Enter'
- Update the TopBar 'Search' icon.
- Can't build the app HOT 4
- Text visibility is not good in dark mode HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from android-showcase.