Closed warnyul closed 6 months ago
The recent updates aim to refine Robolectric's testing framework by adjusting annotation usage, enhancing synchronization in test execution, and improving looper management. Changes include clarifying limitations in the README.md
, removing looperMode
parameter, optimizing method parameters and functionality, and enforcing stricter rules for annotation placement to uphold test integrity.
File Path | Change Summary |
---|---|
README.md |
Updated limitations on parallel test execution and annotation restrictions. |
.../internal/JUnit5RobolectricSandboxManager.kt |
Removed looperMode from constructor. |
.../internal/JUnit5RobolectricTestRunner.kt |
Improved looper management in runBeforeTest and runFinallyAfterTest methods. |
.../internal/JUnit5RobolectricTestRunnerHelper.kt |
Enhanced runFinallyAfterTest with this parameter. |
.../internal/SandboxExtensions.kt |
Introduced functions to clear and reset the ShadowLooper. |
.../internal/validation/TestClassValidator.kt |
Removed LooperMode import and usage in validation function. |
.../robolectric/RobolectricExtensionLooperModeSelfTest.kt |
Added tests for different LooperMode settings. |
.../robolectric/RobolectricExtensionSelfTest.kt |
Removed testMethod_shouldBeInvoked_onMainThread function. |
🐇✨ In the realm of code and byte, Where tests dance in the moonlight, A rabbit hops with pure delight, Looper modes now shine bright. Changes made with care and might, Ensuring tests are airtight! 🌟📜
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 your favorite social media?
Total Project Coverage | 66.67% | :white_check_mark: |
---|
File | Coverage [91.67%] | :white_check_mark: |
---|---|---|
robolectric-extension/src/main/kotlin/tech/apter/junit/jupiter/robolectric/internal/JUnit5RobolectricSandboxManager.kt | 100.00% | :white_check_mark: |
robolectric-extension/src/main/kotlin/tech/apter/junit/jupiter/robolectric/internal/JUnit5RobolectricTestRunner.kt | 97.78% | :white_check_mark: |
robolectric-extension/src/main/kotlin/tech/apter/junit/jupiter/robolectric/internal/JUnit5RobolectricTestRunnerHelper.kt | 95.74% | :white_check_mark: |
robolectric-extension/src/main/kotlin/tech/apter/junit/jupiter/robolectric/internal/SandboxExtensions.kt | 80.65% | :white_check_mark: |
robolectric-extension/src/main/kotlin/tech/apter/junit/jupiter/robolectric/internal/validation/TestClassValidator.kt | 81.25% | :white_check_mark: |
Total Project Coverage | 83.95% | :white_check_mark: |
---|
Summary by CodeRabbit
LooperMode
settings to verify thread behavior in a Robolectric test environment.