kiwix-android
kiwix-android copied to clipboard
Add more Unit Tests to the project
Is your feature request related to a problem? Please describe. Kiwix's coverage is at 33%~ right now and we want that to be a lot higher. If you want to contribute to the project but are finding it diffcult to find a suitable ticket of a manageable size then this is for you!
Describe the solution you'd like
Comment here that you want to test a class (I recommend starting with small ones) with the class name to claim it. Then make a ticket and start working on it. Use ctrl+shift+t to automatically create the test class. You can check our codecov report to find classes without tests, ctrl+shift+t also navigates to a test class if it already exists.
Additional context Our unit testing strategy is based on this article which is a recap of KotlinConf talk on the topic, linked in the article. Mockk is the one of the more important libraries to know about and that link has several articles on the topic. As always kiwix team members can help if you open a PR in Draft.
@macgills I'd also like to work on tests starting with HistoryDao/HistoryEntity if that's ok.
Hi, I'd like to work on this too! Interested in starting with the NewRecentSearchDao.kt module.
@deborahlow97 @Frans-Lukas Please, carry on.
Hi, I'm new here and I would like to work on this issue. Can I start by writing tests for LocalFileTransferActivity?
@TejusR I would avoid Unit Testing any activity but please look for any other class
This issue has been automatically marked as stale because it has not had recent activity. It will be now be reviewed manually. Thank you for your contributions.
I would like to add some instrumentation tests for navigation. As the current test that tests navigation(MainActivityTest.java) contains tests for lesser components as now the app has been revamped with some new features so i would like to complete that MainActivityTest.java via adding missing tests
@s-ayush2903 this ticket is for unit tests
This issue has been automatically marked as stale because it has not had recent activity. It will be now be reviewed manually. Thank you for your contributions.
I would like to add test for NewBookmarkDao.kt class
i would like to add test for HistoryDao.kt class
@bhaktideshmukh Please go ahead!
This issue has been automatically marked as stale because it has not had recent activity. It will be now be reviewed manually. Thank you for your contributions.
This is the kind of ticket which never get closed because no clear boundaries. I obviously agree with the princiole but will close it because of this weakness. We should lead this effort based on Codecov feedback on CI. If someone has a clear wish regarding a precise piece of code, a dedicated ticket shoukd be open.