IDE-314: Stabilize and optimize sensor list tests with Robolectric integration test#5200
Open
harshsomankar123-tech wants to merge 1 commit into
Conversation
0b93373 to
5687b6d
Compare
5687b6d to
45b0b49
Compare
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.



Description
Jira Ticket: IDE-314 (https://catrobat.atlassian.net/browse/IDE-314)
This PR overhauls the
FormulaEditorSensorListtesting strategy. We replaced the slow, flakey Espresso verification with a comprehensive Robolectric integration test that successfully validates the content and ordering of all 160+ sensor items across 16 different categories.Key Changes
FormulaEditorSensorListIntegrationTest.kt(Robolectric).SensorHandlerto simulate 100% hardware availability (Accelerometer, Compass, etc.) in a headless environment.NullPointerExceptionissues.FormulaEditorSensorListTest.kt.ProjectManagerandSensorHandlersingletons between the test runner and the application context.AppCompatActivityas a lightweight context provider.Verification Plan
./gradlew testCatroidDebugUnitTest --tests "*FormulaEditorSensorListIntegrationTest*"(Passed)../gradlew connectedCatroidDebugAndroidTest --tests "*FormulaEditorSensorListTest*"(Passed).Performance Impact
Your checklist for this pull request
Please review the contributing guidelines and wiki pages of this repository.