-
Notifications
You must be signed in to change notification settings - Fork 6
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add unit tests setup #78
Conversation
Because now project uses Kotlin Gradle Plugin, those constraints are no longer needed.
Adding Robolectric to test AsyncTasks. To remove in the future.
1caf874
to
71d763a
Compare
It's file generated by Android build. We don't need to test it.
71d763a
to
7b99eec
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👋 @wzieba !
I have reviewed and tested this PR as per the instructions, everything works as expected, great job, let's start testing! 🌟 🎉 🌟
This PR adds unit tests setup for the SDK. I decided to introduce Robolectric to be able to test AsyncTask API.
👍
It also adds support for measuring codecoverage via kover plugin, as well as integration with Codecov: https://app.codecov.io/github/Parsely/parsely-android
Awesome, thanks for that and for trying kotlinx-kover! 🥇
Kotlin Gradle Plugin is added as I plan to write tests in Kotlin and it was established internally, that we'll aim to rewrite the SDK to Kotlin as well.
👍
I have left few suggestions (💡) for you to consider. I am going to approve this PR anyway, since none is blocking. I am NOT going to merge this PR yet to give you some time to apply any of my suggestions. However, feel free to ignore them and merge the PR yourself.
EXTRAS
Welcome to Codecov 🎉Once merged to your default branch, Codecov will compare your coverage reports and display the results in this comment. Thanks for integrating Codecov - We've got you covered ☂️ |
Description
This PR adds unit tests setup for the SDK. I decided to introduce Robolectric to be able to test
AsyncTask
API.It also adds support for measuring codecoverage via
kover
plugin, as well as integration with Codecov: https://app.codecov.io/github/Parsely/parsely-androidKotlin Gradle Plugin is added as I plan to write tests in Kotlin and it was established internally, that we'll aim to rewrite the SDK to Kotlin as well.
To merge after #77 is merged
How to test
CI should be enough: you could also run
koverHtmlReportRelease
task and see generated HTML report with 0% code coverage.Kover report