[New arch] Increase test coverage
Nobody has claimed this yet.
- Dominant language
- Kotlin
- Stars
- 4.2k
- Forks
- 3.1k
- Avg merge
- 1d 12h
- Merged PRs (30d)
- 7
Description
We are working on the new architecture, and meanwhile we are creating tests. This way, it will be easier to debug and find potential bugs before merging a PR, or releasing a new version.
Android Studio let us know how many test coverage we have. But only for unit tests. We can check this coverage performing next action:

Once all tests finish, a new tab appears and shows the test coverage in that module.
For example, this would be the test coverage for domain module at the moment.
Domain module
This module can be tested completely using unit tests.
Coverage Result: 82% lines and 50% classes
We have around 100% use cases test coverage and we can improve this general coverage testing those exceptions.

Mobile module
Since this module is where old architecture resides, and most of the tests here are instrumented, the test coverage is pretty low yet.
But if we move to the package where we have started working on new architecture, we can see that those new viewModels have a good test coverage.

Data module
This module is a little bit tricky for test coverage. Since here we have some tests that are instrumented.
Result: 16% lines and 38% classes coverage

But we can move to shares package for example.
There, we can see that excluding db package where instrumented tests are, unit tests coverage for repository and datasources is around 100%.

To sum up
We have a decent unit test coverage for the new architecture modules but we can easily detect where we can increase it. The goal would be to have around 100% test coverage with unit tests.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by reviewing the domain, mobile, and data modules in Android Studio and run their unit and instrumented tests to inspect coverage. Focus on uncovered areas in the new architecture, especially domain exceptions and the shares repository and datasource packages; done means substantially improved unit-test coverage toward the stated 100% goal.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- android, kotlin
- Domain
- mobile, testing
- Issue type
- Refactor
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100