UseOpenWifiPreferenceController is essentially reimplementing TogglePreferenceController. Add below 2 changes for test failure of CodeInspectionTest 1. Remove some arguments from constructor of the controller 2. Declare the controller in xml instead of in code Bug: 132391311 Test: manual UseOpenWifiPreferenceControllerTest Change-Id: Ie52e79fd0bc66a227bd46f09c74d1fbec614f636
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.