Root Cause: Only happen when running `make RunSettingsRoboTests` not happen when running `make RunSettingsRoboTests ROBOTEST_FILTER=HearingAidUtilsTest`. It is dependency test case fail when other tests also have AlertDialog pop up alerady. Solution: Move ShadowAlertDialog reset before running each test, not after running each test. Bug: 238829557 Test: make RunSettingsRoboTests Change-Id: I32da4ee87580b4f475556905f7574b211a69b29b
Running Settings Robolectric tests
The full suite
$ croot
$ make RunSettingsRoboTests
Running a single test class
$ croot
$ make RunSettingsRoboTests ROBOTEST_FILTER=<ClassName>
For example:
make RunSettingsRoboTests ROBOTEST_FILTER=CodeInspectionTest
You can also use partial class name in ROBOTEST_FILTER. If the partial class name matches multiple file names, all of them will be executed.