-
Notifications
You must be signed in to change notification settings - Fork 0
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 local tests to project #129
Conversation
8080b67
to
2965f7c
Compare
2965f7c
to
ca0ab7a
Compare
Signed-off-by: Patryk Miś <[email protected]>
Signed-off-by: Patryk Miś <[email protected]>
Signed-off-by: Patryk Miś <[email protected]>
5b46d1d
to
91a30b9
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.
Great work! I've performed some cleanup regarding example tests and example instrumented tests, noticing that you removed the runners dependency. Additionally, I've updated the dependencies to avoid creating unnecessary pull requests, as everything will be reflected in the commit history.
@coderabbitai review |
WalkthroughThe project's testing configuration has been overhauled, particularly for Android unit testing. The update includes a new Gradle run configuration for metadata, improvements to build scripts, and the introduction of custom view tests. Notably, there's a shift from instrumented tests to local unit tests with Robolectric, as seen in the Changes
Poem
Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on X ? TipsChat with CodeRabbit Bot (
|
@PatrykMis I'm testing CodeRabbit on the project, do you like it? It's a free AI code review tool for open source projects. |
@Irineu333 it's a great tool which, as I see, summarizes changes made in pull requests, it is also capable to see them in context of linked issues. And what about integrating SonarCloud? |
I was a bit disappointed with the CodeRabbit. I thought it could point out potential problems in the code like a reviewer, but the comments are very generic (see #128). In this PR, it just summarized the changes. Regarding SonarCloud, I will study it. |
Description
The implementation of tests is crucial to prevent regressions and accelerate development. This pull request represents a significant step towards full test coverage in Speak Touch.
Given that the SpeakTouch code intensely interacts with the Android framework APIs, local tests isolated from the Android framework are not viable. One option would be to simulate these structures with Mockito or Mockk. However, although valid, this approach requires the developer to code the simulated structures, which will most likely not reflect the actual behavior, but rather the developer's expectations. Therefore, I opted to use Robolectric to simulate the Android framework locally. This approach seems more effective and aligned with the application's real behavior. My experience with Robolectric was surprisingly positive, especially due to the ease of creating tests with it
Improvements
Type