-
-
Notifications
You must be signed in to change notification settings - Fork 2
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
Instrumentation tests #41
Conversation
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #41 +/- ##
============================================
- Coverage 26.40% 26.00% -0.40%
- Complexity 193 195 +2
============================================
Files 101 102 +1
Lines 2860 2920 +60
Branches 404 403 -1
============================================
+ Hits 755 759 +4
- Misses 2063 2124 +61
+ Partials 42 37 -5
Flags with carried forward coverage won't be shown. Click here to find out more.
Continue to review full report in Codecov by Sentry.
|
0dc8e7d
to
639eef3
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.
Thank you for the work in this PR @eldcn!
Interesting and a good learning experience to see the differentiation between the test setup, modules that are used to facilitate the test as well as the face repositories that are injected + separation of view assertions in the simulator types.
It would be great if we could wither document this setup and pattern in a README in the testing support modules or point to a good tutorial or Google documentation that describes these types of setups in more detail.
Apart from this the PR looks good to me, we can also separate the documentation task in a separate PR, similar to the integration in GitHub Actions in #21 👍
Might make sense to merge the setup in its current state and then address the CI integration + documentation in separate PRs as we address these smaller issues to ensure that we have this infrastructure in main and @Basler182 can use these setups to facilitate a good testing infrastructure for incoming smaller PRs addressing individual issues that we have identified in this repo.
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, this will make testing much easier and is well structured. I agree with Paul. It would be ideal if we could merge it promptly so that I can build on it directly. from my point of view it is ready to be merged🚀
Instrumentation tests
HiltApplicationTestRunner
to execute instrumented android tests with hiltComposeContentActivity
indesign
module, in order to be able to start single screen instrumented tests in non-app modules - seeOnboardingScreenTest.kt
inonboarding
module for example usageComposeTestRule
andModifier
OnboardingScreenTest
in onboarding module using fake repository (via a test hilt module) and screen display and click interactionSimulator
- Introduced the concept of simulators. Wrappers aroundComposeTestRule
with a DSL-like API to interact with a certain composable screen.app
AppNavigationTest
- Several test methods that invoke navigation viaNavigator
component and ensure display of the expected screenOnboardingFlowTest
tests the display of the initial onboarding screens and the navigation to the next expected oneTODO:
connectedAndroidTest
(issue ExecuteconnectedAndroidTest
in CI #21) in CI and include in codecov♻️ Current situation & Problem
Link any open issues or pull requests (PRs) related to this PR. Please ensure that all non-trivial PRs are first tracked and discussed in an existing GitHub issue or discussion.
⚙️ Release Notes
Add a bullet point list summary of the feature and possible migration guides if this is a breaking change so this section can be added to the release notes.
Include code snippets that provide examples of the feature implemented or links to the documentation if it appends or changes the public interface.
📚 Documentation
Please ensure that you properly document any additions in conformance to Spezi Documentation Guide.
You can use this section to describe your solution, but we encourage contributors to document your reasoning and changes using in-line documentation.
✅ Testing
Please ensure that the PR meets the testing requirements set by CodeCov and that new functionality is appropriately tested.
This section describes important information about the tests and why some elements might not be testable.
📝 Code of Conduct & Contributing Guidelines
By submitting creating this pull request, you agree to follow our Code of Conduct and Contributing Guidelines: