Add new unit test cases in 1. WifiP2pSettingsTest.java 2. WifiConfigController2Test.java 3. WifiP2PPreferenceControllerTest.java 4. WifiP2pPeerTest.java the coverage rate of 1. com.android.settings.wifi will raise from 44% to 45% 2. com.android.settings.wifi.P2p will raise from 69% to 85% Bug: 151696220 Test: make RunSettingsRoboTests ROBOTEST_FILTER=WifiP2pSettingsTest make RunSettingsRoboTests ROBOTEST_FILTER=WifiConfigController2Test make RunSettingsRoboTests ROBOTEST_FILTER=WifiP2pPeerTest make RunSettingsRoboTests ROBOTEST_FILTER=WifiP2PPreferenceControllerTest Change-Id: I365494e1654376b23b08f18b1a799ffc59323a4c
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.