Add logging to settings test
Test: https://android-build.corp.google.com/builds/abtd/run/L05100030011808312
Bug: 413390588
Change-Id: I0adeee7bda19a08c4b56973e28e40ef91ca6d614
diff --git a/tests/automotive/functional/settings/src/android/platform/tests/AppInfoSettingTest.java b/tests/automotive/functional/settings/src/android/platform/tests/AppInfoSettingTest.java
index d90d50b..914f64f 100644
--- a/tests/automotive/functional/settings/src/android/platform/tests/AppInfoSettingTest.java
+++ b/tests/automotive/functional/settings/src/android/platform/tests/AppInfoSettingTest.java
@@ -7,6 +7,7 @@
import android.platform.helpers.IAutoAppInfoSettingsHelper.State;
import android.platform.helpers.IAutoSettingHelper;
import android.platform.helpers.SettingsConstants;
+import android.util.Log;
import androidx.test.runner.AndroidJUnit4;
@@ -21,6 +22,7 @@
public class AppInfoSettingTest {
private HelperAccessor<IAutoAppInfoSettingsHelper> mAppInfoSettingsHelper;
private HelperAccessor<IAutoSettingHelper> mSettingHelper;
+ private static final String LOG_TAG = AppInfoSettingTest.class.getSimpleName();
private static final String CONTACTS_APP = "Contacts";
private static final String PHONE_PERMISSION = "Phone";
@@ -47,12 +49,17 @@
@Test
public void testDisableEnableApplication() {
+ Log.i(LOG_TAG, "Act: Open the Contacts App");
mAppInfoSettingsHelper.get().selectApp(CONTACTS_APP);
+ Log.i(LOG_TAG, "Act: Disable the contacts app");
mAppInfoSettingsHelper.get().enableDisableApplication(State.DISABLE);
+ Log.i(LOG_TAG, "Assert: Application is disabled");
assertTrue(
"Application is not disabled",
mAppInfoSettingsHelper.get().isApplicationDisabled(CONTACT_PACKAGE));
+ Log.i(LOG_TAG, "Act: Enable the contacts app");
mAppInfoSettingsHelper.get().enableDisableApplication(State.ENABLE);
+ Log.i(LOG_TAG, "Assert: Application is enabled");
assertTrue(
"Application is not enabled",
!mAppInfoSettingsHelper.get().isApplicationDisabled(CONTACT_PACKAGE));
@@ -60,12 +67,17 @@
@Test
public void testApplicationPermissions() {
+ Log.i(LOG_TAG, "Act: Open the Contacts App");
mAppInfoSettingsHelper.get().selectApp(CONTACTS_APP);
+ Log.i(LOG_TAG, "Act: Enable the phone app permission");
mAppInfoSettingsHelper.get().setAppPermission(PHONE_PERMISSION, State.ENABLE);
+ Log.i(LOG_TAG, "Assert: Permission is enabled");
assertTrue(
"Permission is disabled",
mAppInfoSettingsHelper.get().getCurrentPermissions().contains(PHONE_PERMISSION));
+ Log.i(LOG_TAG, "Act: Disable the phone app permission");
mAppInfoSettingsHelper.get().setAppPermission(PHONE_PERMISSION, State.DISABLE);
+ Log.i(LOG_TAG, "Assert: Permission is disabled");
assertTrue(
"Permission is not disabled",
!mAppInfoSettingsHelper.get().getCurrentPermissions().contains(PHONE_PERMISSION));
@@ -73,9 +85,10 @@
@Test
public void testAllowedAppNumber() {
-
+ Log.i(LOG_TAG, "Act: Open the App Settings");
// Navigate to the app permission manager.
mSettingHelper.get().openSetting(SettingsConstants.APPS_SETTINGS);
+ Log.i(LOG_TAG, "Act: Open the Permission manager");
mAppInfoSettingsHelper.get().openPermissionManager();
// Get one specific Permission UI element (that we have not looked at before).
@@ -86,7 +99,7 @@
int summaryTotal = results.get(1);
int listedAllowed = results.get(2);
int listedTotal = results.get(3);
-
+ Log.i(LOG_TAG, "Assert: Number of listed allowed apps matches the display");
assertTrue(
String.format(
"Number of listed apps allowed does not match display."
@@ -95,7 +108,7 @@
summaryAllowed,
listedAllowed),
summaryAllowed == listedAllowed);
-
+ Log.i(LOG_TAG, "Assert: Number of listed not allowed apps matches the display");
assertTrue(
String.format(
"Number of listed apps not allowed does not match display."
diff --git a/tests/automotive/functional/settings/src/android/platform/tests/AppInfoVerifyUIElementsTest.java b/tests/automotive/functional/settings/src/android/platform/tests/AppInfoVerifyUIElementsTest.java
index 0e65c9f..11768c8 100644
--- a/tests/automotive/functional/settings/src/android/platform/tests/AppInfoVerifyUIElementsTest.java
+++ b/tests/automotive/functional/settings/src/android/platform/tests/AppInfoVerifyUIElementsTest.java
@@ -24,6 +24,7 @@
import android.platform.helpers.IAutoSettingHelper;
import android.platform.helpers.IAutoUISettingsHelper;
import android.platform.helpers.SettingsConstants;
+import android.util.Log;
import androidx.test.runner.AndroidJUnit4;
@@ -37,6 +38,7 @@
private HelperAccessor<IAutoAppInfoSettingsHelper> mAppInfoSettingsHelper;
private HelperAccessor<IAutoSettingHelper> mSettingHelper;
private HelperAccessor<IAutoUISettingsHelper> mSettingsUIHelper;
+ private static final String LOG_TAG = AppInfoVerifyUIElementsTest.class.getSimpleName();
private static final String CALENDAR_APP = "Calendar";
@@ -48,6 +50,7 @@
@Before
public void openAppInfoFacet() {
+ Log.i(LOG_TAG, "Assert: Open the application settings");
mSettingHelper.get().openSetting(SettingsConstants.APPS_SETTINGS);
}
@@ -59,29 +62,36 @@
@Test
public void testVerifyAppsPermissionUIElements() {
+ Log.i(LOG_TAG, "Assert: App Settings is open");
assertTrue(
"Apps setting did not open.",
mSettingsUIHelper
.get()
.hasUIElement(AutomotiveConfigConstants.RECENTLY_OPENED_UI_ELEMENT)
|| mSettingHelper.get().checkMenuExists("Reset app grid to A-Z order"));
+ Log.i(LOG_TAG, "Act: Show all apps");
mAppInfoSettingsHelper.get().showAllApps();
+ Log.i(LOG_TAG, "Act: Open the Calendar app");
mAppInfoSettingsHelper.get().selectApp(CALENDAR_APP);
+ Log.i(LOG_TAG, "Assert: Stop app button is open");
assertTrue(
"Stop app Button is not displayed",
mSettingsUIHelper
.get()
.hasUIElement(AutomotiveConfigConstants.STOP_APP_UI_ELEMENT));
+ Log.i(LOG_TAG, "Assert: Notification Option is displayed");
assertTrue(
"Notification Option is not displayed",
mSettingsUIHelper
.get()
.hasUIElement(AutomotiveConfigConstants.NOTIFICATIONS_UI_ELEMENT));
+ Log.i(LOG_TAG, "Assert: Permissions Option is displayed");
assertTrue(
"Permissions Option is not displayed",
mSettingsUIHelper
.get()
.hasUIElement(AutomotiveConfigConstants.PERMISSIONS_UI_ELEMENT));
+ Log.i(LOG_TAG, "Assert: Storage and Cache is displayed");
assertTrue(
"Storage and Cache Option is not displayed",
mSettingsUIHelper
@@ -91,27 +101,32 @@
@Test
public void testVerifyAppsInfoUIElements() {
+ Log.i(LOG_TAG, "Assert: Permissions manager Option is displayed");
assertTrue(
"Permission manager Option is not displayed",
mSettingsUIHelper
.get()
.hasUIElement(AutomotiveConfigConstants.PERMISSION_MANAGER_UI_ELEMENT));
+ Log.i(LOG_TAG, "Assert: Default apps option is displayed");
assertTrue(
"Default apps Option is not displayed",
mSettingsUIHelper
.get()
.hasUIElement(AutomotiveConfigConstants.DEFAULT_APPS_UI_ELEMENT));
+ Log.i(LOG_TAG, "Assert: Unused apps option is displayed");
assertTrue(
"Unused apps Option is not displayed",
mSettingsUIHelper
.get()
.hasUIElement(AutomotiveConfigConstants.UNUSED_APPS_UI_ELEMENT));
+ Log.i(LOG_TAG, "Assert: Performance-impacting apps option is displayed");
assertTrue(
"Performance-impacting apps Option is not displayed",
mSettingsUIHelper
.get()
.hasUIElement(
AutomotiveConfigConstants.PERFORMANCE_IMPACTING_APPS_UI_ELEMENT));
+ Log.i(LOG_TAG, "Assert: Special apps access option is displayed");
assertTrue(
"Special app access Option is not displayed",
mSettingsUIHelper
diff --git a/tests/automotive/functional/settings/src/android/platform/tests/BluetoothSettingTest.java b/tests/automotive/functional/settings/src/android/platform/tests/BluetoothSettingTest.java
index ed5f891..fe74669 100644
--- a/tests/automotive/functional/settings/src/android/platform/tests/BluetoothSettingTest.java
+++ b/tests/automotive/functional/settings/src/android/platform/tests/BluetoothSettingTest.java
@@ -21,6 +21,7 @@
import android.platform.helpers.IAutoBluetoothSettingsHelper;
import android.platform.helpers.IAutoSettingHelper;
import android.platform.helpers.SettingsConstants;
+import android.util.Log;
import androidx.test.runner.AndroidJUnit4;
@@ -32,6 +33,7 @@
public class BluetoothSettingTest {
private HelperAccessor<IAutoBluetoothSettingsHelper> mBluetoothSettingHelper;
private HelperAccessor<IAutoSettingHelper> mSettingHelper;
+ private static final String LOG_TAG = BluetoothSettingTest.class.getSimpleName();
public BluetoothSettingTest() throws Exception {
mBluetoothSettingHelper = new HelperAccessor<>(IAutoBluetoothSettingsHelper.class);
@@ -45,10 +47,13 @@
@Test
public void testBluetoothDefaultState() {
+ Log.i(LOG_TAG, "Act: Open the Bluetooth Setting");
mSettingHelper.get().openSetting(SettingsConstants.BLUETOOTH_SETTINGS);
+ Log.i(LOG_TAG, "Assert: Bluetooth is turned on by default");
assertTrue(
"Bluetooth default state is not turned on in the System",
mSettingHelper.get().isBluetoothOn());
+ Log.i(LOG_TAG, "Assert: Use Bluetooth toggle is turned on in the Settings");
assertTrue(
"Use Bluetooth toggle is not turned on in the Settings",
mBluetoothSettingHelper.get().isUseBluetoothToggleChecked());
diff --git a/tests/automotive/functional/settings/src/android/platform/tests/DisplaySettingTest.java b/tests/automotive/functional/settings/src/android/platform/tests/DisplaySettingTest.java
index 61da94f..4bc9b05 100644
--- a/tests/automotive/functional/settings/src/android/platform/tests/DisplaySettingTest.java
+++ b/tests/automotive/functional/settings/src/android/platform/tests/DisplaySettingTest.java
@@ -23,6 +23,7 @@
import android.platform.helpers.IAutoDisplaySettingsHelper;
import android.platform.helpers.IAutoSettingHelper;
import android.platform.helpers.SettingsConstants;
+import android.util.Log;
import org.junit.Test;
@@ -30,6 +31,7 @@
private final HelperAccessor<IAutoSettingHelper> mSettingHelper;
private HelperAccessor<IAutoDisplaySettingsHelper> mDisplaySettingsHelper;
+ private static final String LOG_TAG = DisplaySettingTest.class.getSimpleName();
public DisplaySettingTest() {
mSettingHelper = new HelperAccessor<>(IAutoSettingHelper.class);
@@ -38,6 +40,7 @@
@Test
public void testBrightnessIncrease() {
+ Log.i(LOG_TAG, "Act: Open the Display Setting");
mSettingHelper.get().openSetting(SettingsConstants.DISPLAY_SETTINGS);
assertTrue(
"Display Setting did not open",
@@ -60,12 +63,14 @@
@Test
public void testAdaptiveBrightnessDefaultValue() {
+ Log.i(LOG_TAG, "Act: Open the Display Setting");
mSettingHelper.get().openSetting(SettingsConstants.DISPLAY_SETTINGS);
+ Log.i(LOG_TAG, "Act: Settings did not open");
assertTrue(
"Display Setting did not open",
mSettingHelper.get().checkMenuExists("Adaptive brightness"));
- // Verify that Adaptive Brightness is not enabled.
+ Log.i(LOG_TAG, "Assert: Adaptive brightness is disabled");
assertFalse(
"Adaptive Brightness was enabled, when it should be disabled by default.",
mDisplaySettingsHelper.get().isAdaptiveBrightnessEnabled());
@@ -73,16 +78,20 @@
@Test
public void testAdaptiveBrightnessToggle() {
+ Log.i(LOG_TAG, "Act: Open the Display Setting");
mSettingHelper.get().openSetting(SettingsConstants.DISPLAY_SETTINGS);
+ Log.i(LOG_TAG, "Assert: Display setting is opened");
assertTrue(
"Display Setting did not open",
mSettingHelper.get().checkMenuExists("Adaptive brightness"));
// Verify that Adaptive Brightness can be toggled.
boolean startSetting = mDisplaySettingsHelper.get().isAdaptiveBrightnessEnabled();
+ Log.i(LOG_TAG, "Act: Toggle Adaptive brightness");
mDisplaySettingsHelper.get().toggleAdaptiveBrightness();
boolean endSetting = mDisplaySettingsHelper.get().isAdaptiveBrightnessEnabled();
+ Log.i(LOG_TAG, "Assert: Adaptive Brightness Value is changed after toggle");
assertFalse(
String.format(
"Adaptive Brightness value did not change after toggle;"
diff --git a/tests/automotive/functional/settings/src/android/platform/tests/EnableDevelopersOption.java b/tests/automotive/functional/settings/src/android/platform/tests/EnableDevelopersOption.java
index 13d5d4d..4df42d3 100644
--- a/tests/automotive/functional/settings/src/android/platform/tests/EnableDevelopersOption.java
+++ b/tests/automotive/functional/settings/src/android/platform/tests/EnableDevelopersOption.java
@@ -22,6 +22,7 @@
import android.platform.helpers.IAutoSettingHelper;
import android.platform.helpers.IAutoSystemSettingsHelper;
import android.platform.helpers.SettingsConstants;
+import android.util.Log;
import androidx.test.runner.AndroidJUnit4;
@@ -33,6 +34,7 @@
public class EnableDevelopersOption {
private HelperAccessor<IAutoSettingHelper> mSettingHelper;
private HelperAccessor<IAutoSystemSettingsHelper> mSystemSettingsHelper;
+ private static final String LOG_TAG = EnableDevelopersOption.class.getSimpleName();
public EnableDevelopersOption() throws Exception {
mSettingHelper = new HelperAccessor<>(IAutoSettingHelper.class);
@@ -41,8 +43,11 @@
@Test
public void testToVerifyDeveloperOptions() throws Exception {
+ Log.i(LOG_TAG, "Act: Open the System Setting");
mSettingHelper.get().openSetting(SettingsConstants.SYSTEM_SETTINGS);
+ Log.i(LOG_TAG, "Act: Enter Developer Mode");
mSystemSettingsHelper.get().enterDeveloperMode();
+ Log.i(LOG_TAG, "Assert: Developer Options is displayed");
assertTrue(
"Developer options are not displayed",
mSystemSettingsHelper.get().hasDeveloperOptions());
diff --git a/tests/automotive/functional/settings/src/android/platform/tests/MicroPhoneRecentAppsTest.java b/tests/automotive/functional/settings/src/android/platform/tests/MicroPhoneRecentAppsTest.java
index 2230a41..69133bc 100644
--- a/tests/automotive/functional/settings/src/android/platform/tests/MicroPhoneRecentAppsTest.java
+++ b/tests/automotive/functional/settings/src/android/platform/tests/MicroPhoneRecentAppsTest.java
@@ -23,6 +23,7 @@
import android.platform.helpers.IAutoPrivacySettingsHelper;
import android.platform.helpers.IAutoSettingHelper;
import android.platform.helpers.SettingsConstants;
+import android.util.Log;
import androidx.test.runner.AndroidJUnit4;
@@ -35,6 +36,7 @@
private HelperAccessor<IAutoSettingHelper> mSettingHelper;
private HelperAccessor<IAutoAppGridHelper> mAppGridHelper;
private HelperAccessor<IAutoPrivacySettingsHelper> mPrivacySettingsHelper;
+ private static final String LOG_TAG = MicroPhoneRecentAppsTest.class.getSimpleName();
private static final String APP = "Google Assistant";
private static final String APP_TXT = "Google Assistant is using the mic";
@@ -58,8 +60,11 @@
@Test
public void testRecentlyAccessedApps() {
+ Log.i(LOG_TAG, "Act: Open the privacy settings");
mSettingHelper.get().openSetting(SettingsConstants.PRIVACY_SETTINGS);
+ Log.i(LOG_TAG, "Assert: Open MicroPhone");
mSettingHelper.get().openMenuWith("MicroPhone");
+ Log.i(LOG_TAG, "Assert: Recent App time stamp is displayed in microphone settings page");
assertTrue(
"Recent App time stamp is not displayed in microphone settings page",
mPrivacySettingsHelper.get().isRecentAppDisplayedWithStamp(APP));
@@ -67,9 +72,13 @@
@Test
public void testViewAllLink() {
+ Log.i(LOG_TAG, "Act: Open the privacy settings");
mSettingHelper.get().openSetting(SettingsConstants.PRIVACY_SETTINGS);
+ Log.i(LOG_TAG, "Act: Open MicroPhone");
mSettingHelper.get().openMenuWith("MicroPhone");
+ Log.i(LOG_TAG, "Act: Click the View All Link");
mPrivacySettingsHelper.get().clickViewAllLink();
+ Log.i(LOG_TAG, "Assert: Recent App time stamp is displayed in view all page");
assertTrue(
"Recent App time stamp is not displayed in view all page",
mPrivacySettingsHelper.get().isRecentAppDisplayedWithStamp(APP));
@@ -77,7 +86,9 @@
@Test
public void testMicroPhonePanelUpdatedWithCurrentAppUsage() {
+ Log.i(LOG_TAG, "Act: Click MicroPhone Status bar");
mPrivacySettingsHelper.get().clickUnMutedMicroPhoneStatusBar();
+ Log.i(LOG_TAG, "Assert: Current App usage is displayed in the panel");
assertTrue(
"Current App usage is not displayed in the panel",
mPrivacySettingsHelper.get().isMicroPhoneStatusMessageUpdated(APP_TXT));
diff --git a/tests/automotive/functional/settings/src/android/platform/tests/MicroPhoneSettingTest.java b/tests/automotive/functional/settings/src/android/platform/tests/MicroPhoneSettingTest.java
index 0624ae3..add59af 100644
--- a/tests/automotive/functional/settings/src/android/platform/tests/MicroPhoneSettingTest.java
+++ b/tests/automotive/functional/settings/src/android/platform/tests/MicroPhoneSettingTest.java
@@ -27,6 +27,7 @@
import android.platform.test.annotations.RequiresFlagsEnabled;
import android.platform.test.flag.junit.CheckFlagsRule;
import android.platform.test.flag.junit.DeviceFlagsValueProvider;
+import android.util.Log;
import androidx.test.runner.AndroidJUnit4;
@@ -45,6 +46,7 @@
private HelperAccessor<IAutoFacetBarHelper> mFacetBarHelper;
private HelperAccessor<IAutoSettingHelper> mSettingHelper;
private HelperAccessor<IAutoPrivacySettingsHelper> mPrivacySettingsHelper;
+ private static final String LOG_TAG = MicroPhoneSettingTest.class.getSimpleName();
@Rule
public final CheckFlagsRule mCheckFlagsRule = DeviceFlagsValueProvider.createCheckFlagsRule();
@@ -57,15 +59,19 @@
@Before
public void openPrivacySetting() {
+ Log.i(LOG_TAG, "Act: Open the privacy settings");
mSettingHelper.get().openSetting(SettingsConstants.PRIVACY_SETTINGS);
+ Log.i(LOG_TAG, "Assert: Privacy Settings is open");
assertTrue(
"Privacy settings did not open",
mSettingHelper.get().checkMenuExists("Microphone"));
mSettingHelper.get().openMenuWith("MicroPhone");
+ Log.i(LOG_TAG, "Assert: Microphone Settings is open");
assertTrue(
"MicroPhone settings did not open",
mSettingHelper.get().checkMenuExists("Microphone access"));
mSettingHelper.get().openMenuWith("Microphone access");
+ Log.i(LOG_TAG, "Assert: Microphone Access is open");
assertTrue(
"MicroPhone access did not open",
mSettingHelper.get().checkMenuExists("Infotainment apps"));
@@ -85,12 +91,14 @@
@Test
public void manageMicrophonePermissions() {
+ Log.i(LOG_TAG, "Act: Privacy settings is open");
mSettingHelper.get().openSetting(SettingsConstants.PRIVACY_SETTINGS);
assertTrue(
"Privacy settings did not open",
mSettingHelper.get().checkMenuExists("Microphone"));
mSettingHelper.get().openMenuWith("MicroPhone");
mPrivacySettingsHelper.get().clickManageMicroPhonePermissions();
+ Log.i(LOG_TAG, "Assert: Microphone Permissions page is displayed");
assertTrue(
"Microphone Permissions page is not displayed",
mPrivacySettingsHelper.get().verifyMicrophoneManagePermissionsPage());
@@ -98,15 +106,21 @@
@Test
public void testMicroPhoneToggleOff() {
- // turn off microphone
+ Log.i(LOG_TAG, "Act: Turn Off the microphone");
mPrivacySettingsHelper.get().turnOnOffMicroPhone(false);
+ Log.i(LOG_TAG, "Assert: Microphone is Off");
assertFalse("MicroPhone is still on", mPrivacySettingsHelper.get().isMicroPhoneOn());
+ Log.i(LOG_TAG, "Act: Go back to settings screen");
mSettingHelper.get().goBackToSettingsScreen();
+ Log.i(LOG_TAG, "Act: Privacy settings is open");
mSettingHelper.get().openSetting(SettingsConstants.PRIVACY_SETTINGS);
+ Log.i(LOG_TAG, "Act: Open Microphone");
mSettingHelper.get().openMenuWith("MicroPhone");
+ Log.i(LOG_TAG, "Assert: Recent apps is displayed");
assertFalse(
"Recent apps is displayed",
mSettingHelper.get().checkMenuExists("Recently accessed"));
+ Log.i(LOG_TAG, "Assert: Micro Phone button is diplayed in the Status Bar");
assertTrue(
"Micro Phone button is not diplayed in the Status Bar",
mPrivacySettingsHelper.get().isMutedMicChipPresentOnStatusBar());
@@ -114,13 +128,17 @@
@Test
public void testMicroPhoneToggleOn() {
- // turn off microphone
+ Log.i(LOG_TAG, "Act: Turn Off the microphone");
mPrivacySettingsHelper.get().turnOnOffMicroPhone(false);
- // turn on microphone
+ Log.i(LOG_TAG, "Act: Turn On the microphone");
mPrivacySettingsHelper.get().turnOnOffMicroPhone(true);
+ Log.i(LOG_TAG, "Assert: Microphone is On");
assertTrue("MicroPhone is still off", mPrivacySettingsHelper.get().isMicroPhoneOn());
+ Log.i(LOG_TAG, "Act: Go back to settings screen");
mSettingHelper.get().goBackToSettingsScreen();
+ Log.i(LOG_TAG, "Act: Privacy settings is open");
mSettingHelper.get().openSetting(SettingsConstants.PRIVACY_SETTINGS);
+ Log.i(LOG_TAG, "Act: Open Microphone");
mSettingHelper.get().openMenuWith("MicroPhone");
assertTrue(
"Recently accessed is not present",
@@ -135,16 +153,19 @@
@Test
public void testMicroPhonePanelStatusBar() {
- // turn off microphone
+ Log.i(LOG_TAG, "Act: Turn Off the microphone");
mPrivacySettingsHelper.get().turnOnOffMicroPhone(false);
- // open microphone panel
+ Log.i(LOG_TAG, "Act: Open Microphone panel");
mPrivacySettingsHelper.get().clickMicroPhoneStatusBar();
+ Log.i(LOG_TAG, "Assert: MicroPhone status is updated");
assertTrue(
"MicroPhone status not updated",
mPrivacySettingsHelper.get().isMicroPhoneStatusMessageUpdated(MICROPHONE_OFF_TXT));
+ Log.i(LOG_TAG, "Assert: MicroPhone settings link is present");
assertTrue(
"MicroPhone settings link is not present",
mPrivacySettingsHelper.get().isMicroPhoneSettingsLinkPresent());
+ Log.i(LOG_TAG, "Assert: MicroPhone toggle is present in status bar");
assertTrue(
"MicroPhone toggle not present in status bar",
mPrivacySettingsHelper.get().isMicroPhoneTogglePresent());
@@ -152,14 +173,17 @@
@Test
public void testMicroPhonePanelStatusBarFromHome() {
- // turn off microphone
+ Log.i(LOG_TAG, "Act: Turn Off the microphone");
mPrivacySettingsHelper.get().turnOnOffMicroPhone(false);
+ Log.i(LOG_TAG, "Act: Go to Homescreen");
mFacetBarHelper.get().goToHomeScreen();
- // open microphone panel
+ Log.i(LOG_TAG, "Act: Open Microphone panel");
mPrivacySettingsHelper.get().clickMicroPhoneStatusBar();
+ Log.i(LOG_TAG, "Assert: MicroPhone settings link is present");
assertTrue(
"MicroPhone settings link is not present",
mPrivacySettingsHelper.get().isMicroPhoneSettingsLinkPresent());
+ Log.i(LOG_TAG, "Assert: MicroPhone toggle is present in status bar");
assertTrue(
"MicroPhone toggle not present in status bar",
mPrivacySettingsHelper.get().isMicroPhoneTogglePresent());
@@ -167,9 +191,9 @@
@Test
public void testMicroPhonePanelSettingsLink() {
- // turn off microphone
+ Log.i(LOG_TAG, "Act: Turn Off the microphone");
mPrivacySettingsHelper.get().turnOnOffMicroPhone(false);
- // open microphone panel
+ Log.i(LOG_TAG, "Act: Open Microphone panel");
mPrivacySettingsHelper.get().clickMicroPhoneStatusBar();
// go to privacy settings
mPrivacySettingsHelper.get().clickMicroPhoneSettingsLink();
@@ -180,20 +204,25 @@
@Test
public void testMicroPhonePanelToggle() {
- // turn off microphone
+ Log.i(LOG_TAG, "Act: Turn Off the microphone");
mPrivacySettingsHelper.get().turnOnOffMicroPhone(false);
+ Log.i(LOG_TAG, "Act: Open Microphone panel");
mPrivacySettingsHelper.get().clickMicroPhoneStatusBar();
- // turn on microphone
+ Log.i(LOG_TAG, "Act: Turn On the microphone");
mPrivacySettingsHelper.get().clickMicroPhoneToggleStatusBar();
+ Log.i(LOG_TAG, "Assert: Microphone is On");
assertTrue("MicroPhone is still off", mPrivacySettingsHelper.get().isMicroPhoneOn());
+ Log.i(LOG_TAG, "Assert: MicroPhone button updated in the status bar");
assertFalse(
"MicroPhone button not updated in status bar",
mPrivacySettingsHelper.get().isMutedMicChipPresentWithMicPanel());
+ Log.i(LOG_TAG, "Assert: MicroPhone status updated in the status bar");
assertTrue(
"MicroPhone status not updated",
mPrivacySettingsHelper.get().isMicroPhoneStatusMessageUpdated(USE_MICROPHONE_TXT));
- // turn off microphone
+ Log.i(LOG_TAG, "Act: Turn Off the microphone");
mPrivacySettingsHelper.get().clickMicroPhoneToggleStatusBar();
+ Log.i(LOG_TAG, "Act: MicroPhone button is muted");
assertTrue(
"MicroPhone button should be muted",
mPrivacySettingsHelper.get().isMutedMicChipPresentWithMicPanel());
@@ -201,14 +230,19 @@
@Test
public void testMicroPhoneButtonDismiss() {
+ Log.i(LOG_TAG, "Act: Turn Off the microphone");
mPrivacySettingsHelper.get().turnOnOffMicroPhone(false);
+ Log.i(LOG_TAG, "Act: Open Microphone panel");
mPrivacySettingsHelper.get().clickMicroPhoneStatusBar();
- // turn microphone on
+ Log.i(LOG_TAG, "Act: Turn On the microphone");
mPrivacySettingsHelper.get().clickMicroPhoneToggleStatusBar();
+ Log.i(LOG_TAG, "Act: Muted MicroPhone button is displayed in status bar");
assertFalse(
"Muted MicroPhone button is displayed in status bar",
mPrivacySettingsHelper.get().isMutedMicChipPresentWithMicPanel());
+ Log.i(LOG_TAG, "Assert: Goto Homescreen");
mFacetBarHelper.get().goToHomeScreen();
+ Log.i(LOG_TAG, "Assert: Muted MicroPhone button is still displayed on status bar");
assertFalse(
"MicroPhone button is still displayed on status bar",
mPrivacySettingsHelper.get().isMicChipPresentOnStatusBar());
diff --git a/tests/automotive/functional/settings/src/android/platform/tests/SettingTest.java b/tests/automotive/functional/settings/src/android/platform/tests/SettingTest.java
index 83df8f9..7412b02 100644
--- a/tests/automotive/functional/settings/src/android/platform/tests/SettingTest.java
+++ b/tests/automotive/functional/settings/src/android/platform/tests/SettingTest.java
@@ -25,6 +25,7 @@
import android.platform.helpers.IAutoSettingHelper;
import android.platform.helpers.IAutoUISettingsHelper;
import android.platform.helpers.SettingsConstants;
+import android.util.Log;
import androidx.test.runner.AndroidJUnit4;
@@ -38,6 +39,7 @@
private HelperAccessor<IAutoAppInfoSettingsHelper> mAppInfoSettingsHelper;
private HelperAccessor<IAutoSettingHelper> mSettingHelper;
private HelperAccessor<IAutoUISettingsHelper> mSettingsUIHelper;
+ private static final String LOG_TAG = SettingTest.class.getSimpleName();
public SettingTest() throws Exception {
mSettingsUIHelper = new HelperAccessor<>(IAutoUISettingsHelper.class);
@@ -53,7 +55,9 @@
@Test
public void testDisplaySettings() {
+ Log.i(LOG_TAG, "Act: Open the Display Setting");
mSettingHelper.get().openSetting(SettingsConstants.DISPLAY_SETTINGS);
+ Log.i(LOG_TAG, "Assert: Display Setting is open");
assertTrue(
"Display Setting did not open",
mSettingHelper.get().checkMenuExists("Brightness level"));
@@ -61,7 +65,9 @@
@Test
public void testSoundSettings() {
+ Log.i(LOG_TAG, "Act: Open the Sound Setting");
mSettingHelper.get().openSetting(SettingsConstants.SOUND_SETTINGS);
+ Log.i(LOG_TAG, "Assert: Sound Setting is open");
assertTrue(
"Sound setting did not open",
mSettingsUIHelper
@@ -71,7 +77,9 @@
@Test
public void testAppinfoSettings() {
+ Log.i(LOG_TAG, "Act: Open the App Setting");
mSettingHelper.get().openSetting(SettingsConstants.APPS_SETTINGS);
+ Log.i(LOG_TAG, "Assert: App Setting is open");
assertTrue(
"Apps setting did not open",
mSettingHelper.get().checkMenuExists("Recently opened")
@@ -81,7 +89,9 @@
@Test
public void testAccountsSettings() {
+ Log.i(LOG_TAG, "Act: Open the Account Setting");
mSettingHelper.get().openSetting(SettingsConstants.PROFILE_ACCOUNT_SETTINGS);
+ Log.i(LOG_TAG, "Assert: Profiles and accounts settings is open");
assertTrue(
"Profiles and accounts settings did not open",
mSettingHelper.get().checkMenuExists("Add a profile"));
@@ -89,7 +99,9 @@
@Test
public void testSystemSettings() {
+ Log.i(LOG_TAG, "Act: Open the System Setting");
mSettingHelper.get().openSetting(SettingsConstants.SYSTEM_SETTINGS);
+ Log.i(LOG_TAG, "Assert: System Setting is opened");
assertTrue(
"System settings did not open",
mSettingHelper.get().checkMenuExists("Languages & input"));
@@ -97,12 +109,17 @@
@Test
public void testBluetoothSettings() {
+ Log.i(LOG_TAG, "Act: Open the Bluetooth Setting");
mSettingHelper.get().openSetting(SettingsConstants.BLUETOOTH_SETTINGS);
+ Log.i(LOG_TAG, "Assert: Bluetooth Setting is opened");
assertTrue(
"Bluetooth Setting did not open",
mSettingHelper.get().checkMenuExists("Pair new device"));
+ Log.i(LOG_TAG, "Act: Turn Off the Bluetooth");
mSettingHelper.get().turnOnOffBluetooth(false);
+ Log.i(LOG_TAG, "Assert: Blue Setting is Off");
assertFalse(mSettingHelper.get().isBluetoothOn());
+ Log.i(LOG_TAG, "Act: Turn On the Bluetooth");
mSettingHelper.get().turnOnOffBluetooth(true);
}
}
diff --git a/tests/automotive/functional/settings/src/android/platform/tests/SoundSettingTest.java b/tests/automotive/functional/settings/src/android/platform/tests/SoundSettingTest.java
index c2a2f66..da08d0e 100644
--- a/tests/automotive/functional/settings/src/android/platform/tests/SoundSettingTest.java
+++ b/tests/automotive/functional/settings/src/android/platform/tests/SoundSettingTest.java
@@ -26,6 +26,7 @@
import android.platform.helpers.IAutoSoundsSettingHelper.VolumeType;
import android.platform.helpers.IAutoUISettingsHelper;
import android.platform.helpers.SettingsConstants;
+import android.util.Log;
import androidx.test.runner.AndroidJUnit4;
@@ -43,6 +44,7 @@
private HelperAccessor<IAutoUISettingsHelper> mSettingsUIHelper;
private HelperAccessor<IAutoSoundsSettingHelper> mSoundsSettingHelper;
private HelperAccessor<IAutoSettingHelper> mSettingHelper;
+ private static final String LOG_TAG = SoundSettingTest.class.getSimpleName();
public SoundSettingTest() throws Exception {
mSoundsSettingHelper = new HelperAccessor<>(IAutoSoundsSettingHelper.class);
@@ -53,7 +55,9 @@
@Before
public void openSoundsSettingFacet() {
+ Log.i(LOG_TAG, "Act: Open the sound settings");
mSettingHelper.get().openSetting(SettingsConstants.SOUND_SETTINGS);
+ Log.i(LOG_TAG, "Assert: Sound settings is open");
assertTrue(
"Sound setting did not open",
mSettingsUIHelper
@@ -70,6 +74,7 @@
public void testChangeMediaVolume() {
mSoundsSettingHelper.get().setVolume(VolumeType.MEDIA, INDEX);
int volume = mSoundsSettingHelper.get().getVolume(VolumeType.MEDIA);
+ Log.i(LOG_TAG, "Assert: Media Volume is set");
assertTrue("Volume was not set", volume == INDEX);
}
@@ -77,6 +82,7 @@
public void testChangeAlarmVolume() {
mSoundsSettingHelper.get().setVolume(VolumeType.ALARM, INDEX);
int volume = mSoundsSettingHelper.get().getVolume(VolumeType.ALARM);
+ Log.i(LOG_TAG, "Assert: Alarm Volume is set");
assertTrue("Volume was not set", volume == INDEX);
}
@@ -84,6 +90,7 @@
public void testChangeNavigationVolume() {
mSoundsSettingHelper.get().setVolume(VolumeType.NAVIGATION, INDEX);
int volume = mSoundsSettingHelper.get().getVolume(VolumeType.NAVIGATION);
+ Log.i(LOG_TAG, "Assert: Navigation Volume is set");
assertTrue("Volume was not set", volume == INDEX);
}
@@ -98,6 +105,7 @@
public void testChangeRingtone() {
mSoundsSettingHelper.get().setSound(SoundType.RINGTONE, RINGTONE);
String sound = mSoundsSettingHelper.get().getSound(SoundType.RINGTONE);
+ Log.i(LOG_TAG, "Assert: Ringtone Volume is set");
assertTrue("Sound was not changed", sound.equals(RINGTONE));
}
@@ -105,6 +113,7 @@
public void testChangeNotificationSound() {
mSoundsSettingHelper.get().setSound(SoundType.NOTIFICATION, NOTIFICATION_SOUND);
String sound = mSoundsSettingHelper.get().getSound(SoundType.NOTIFICATION);
+ Log.i(LOG_TAG, "Assert: Notification Volume is set");
assertTrue("Sound was not changed", sound.equals(NOTIFICATION_SOUND));
}
@@ -112,6 +121,7 @@
public void testChangeAlarmSound() {
mSoundsSettingHelper.get().setSound(SoundType.ALARM, ALARM_SOUND);
String sound = mSoundsSettingHelper.get().getSound(SoundType.ALARM);
+ Log.i(LOG_TAG, "Assert: Alarm Volume is set");
assertTrue("Sound was not changed", sound.equals(ALARM_SOUND));
}
}
diff --git a/tests/automotive/functional/settings/src/android/platform/tests/StorageSettingTest.java b/tests/automotive/functional/settings/src/android/platform/tests/StorageSettingTest.java
index c9c5e5a..809c5cd 100644
--- a/tests/automotive/functional/settings/src/android/platform/tests/StorageSettingTest.java
+++ b/tests/automotive/functional/settings/src/android/platform/tests/StorageSettingTest.java
@@ -24,6 +24,7 @@
import android.platform.helpers.IAutoSystemSettingsHelper;
import android.platform.helpers.IAutoUISettingsHelper;
import android.platform.helpers.SettingsConstants;
+import android.util.Log;
import androidx.test.runner.AndroidJUnit4;
@@ -37,6 +38,7 @@
private HelperAccessor<IAutoSettingHelper> mSettingHelper;
private HelperAccessor<IAutoUISettingsHelper> mSettingsUIHelper;
private HelperAccessor<IAutoSystemSettingsHelper> mSystemSettingsHelper;
+ private static final String LOG_TAG = StorageSettingTest.class.getSimpleName();
public StorageSettingTest() throws Exception {
mSettingsUIHelper = new HelperAccessor<>(IAutoUISettingsHelper.class);
@@ -46,10 +48,13 @@
@Before
public void openSystemStorageFacet() {
+ Log.i(LOG_TAG, "Act: Open the system settings");
mSettingHelper.get().openSetting(SettingsConstants.SYSTEM_SETTINGS);
+ Log.i(LOG_TAG, "Assert: System settings is opened ");
assertTrue(
"System settings did not open",
mSettingHelper.get().checkMenuExists("Languages & input"));
+ Log.i(LOG_TAG, "Act: Open Storage Menu ");
mSystemSettingsHelper.get().openStorageMenu();
}
@@ -60,19 +65,23 @@
@Test
public void testMusicAndAudio() {
+ Log.i(LOG_TAG, "Assert: Music and Audio and Usage are Present");
assertTrue(
"Music and Audio and Usage are not Present",
mSystemSettingsHelper
.get()
.verifyUsageinGB(AutomotiveConfigConstants.STORAGE_MUSIC_AUDIO_SETTINGS));
+ Log.i(LOG_TAG, "Assert: Music and Audio are present");
assertTrue(
"Music and Audio is not present",
mSettingsUIHelper
.get()
.hasUIElement(AutomotiveConfigConstants.STORAGE_MUSIC_AUDIO_SETTINGS));
+ Log.i(LOG_TAG, "Act: Music Audio Settings");
mSettingsUIHelper
.get()
.openUIOptions(AutomotiveConfigConstants.STORAGE_MUSIC_AUDIO_SETTINGS);
+ Log.i(LOG_TAG, "Assert: Music and Audio is open");
assertTrue(
"Music and Audio is not open",
mSettingHelper.get().checkMenuExists("Hide system apps"));
@@ -80,30 +89,36 @@
@Test
public void testOtherApps() {
+ Log.i(LOG_TAG, "Assert: Other apps Usage is Present");
assertTrue(
"Other apps Usage is not Present",
mSystemSettingsHelper
.get()
.verifyUsageinGB(AutomotiveConfigConstants.STORAGE_OTHER_APPS_SETTINGS));
+ Log.i(LOG_TAG, "Assert: Other apps is Present");
assertTrue(
"Other apps is not present",
mSettingsUIHelper
.get()
.hasUIElement(AutomotiveConfigConstants.STORAGE_OTHER_APPS_SETTINGS));
+ Log.i(LOG_TAG, "Assert: Other apps Storage settings");
mSettingsUIHelper
.get()
.openUIOptions(AutomotiveConfigConstants.STORAGE_OTHER_APPS_SETTINGS);
+ Log.i(LOG_TAG, "Assert: Other apps is open");
assertTrue(
"Other apps is not open", mSettingHelper.get().checkMenuExists("Hide system apps"));
}
@Test
public void testFiles() {
+ Log.i(LOG_TAG, "Assert: Files Usage is Present in GBs");
assertTrue(
"Files Usage is not Present",
mSystemSettingsHelper
.get()
.verifyUsageinGB(AutomotiveConfigConstants.STORAGE_FILES_SETTINGS));
+ Log.i(LOG_TAG, "Assert: Files is Present under Storage");
assertTrue(
"Files Usage is not present",
mSettingsUIHelper
@@ -114,11 +129,13 @@
@Test
public void testSystem() {
+ Log.i(LOG_TAG, "Assert: System Usage is Present");
assertTrue(
"System Usage is not Present",
mSystemSettingsHelper
.get()
.verifyUsageinGB(AutomotiveConfigConstants.STORAGE_SYSTEM_SETTINGS));
+ Log.i(LOG_TAG, "Assert: System is Present under Storage");
assertTrue(
"System is not present",
mSettingsUIHelper
diff --git a/tests/automotive/functional/settings/src/android/platform/tests/SystemSettingTest.java b/tests/automotive/functional/settings/src/android/platform/tests/SystemSettingTest.java
index f73367b..78422a8 100644
--- a/tests/automotive/functional/settings/src/android/platform/tests/SystemSettingTest.java
+++ b/tests/automotive/functional/settings/src/android/platform/tests/SystemSettingTest.java
@@ -22,6 +22,7 @@
import android.platform.helpers.IAutoSettingHelper;
import android.platform.helpers.IAutoSystemSettingsHelper;
import android.platform.helpers.SettingsConstants;
+import android.util.Log;
import androidx.test.runner.AndroidJUnit4;
@@ -36,6 +37,7 @@
public class SystemSettingTest {
private HelperAccessor<IAutoSettingHelper> mSettingHelper;
private HelperAccessor<IAutoSystemSettingsHelper> mSystemSettingsHelper;
+ private static final String LOG_TAG = SystemSettingTest.class.getSimpleName();
public SystemSettingTest() throws Exception {
mSettingHelper = new HelperAccessor<>(IAutoSettingHelper.class);
@@ -45,7 +47,9 @@
@Before
public void openSystemFacet() {
+ Log.i(LOG_TAG, "Act: Open the System Settings");
mSettingHelper.get().openSetting(SettingsConstants.SYSTEM_SETTINGS);
+ Log.i(LOG_TAG, "Assert: System settings is open");
assertTrue(
"System settings did not open",
mSettingHelper.get().checkMenuExists("Languages & input"));
@@ -59,6 +63,7 @@
@Test
public void testDeviceModel() {
String model = android.os.Build.MODEL;
+ Log.i(LOG_TAG, "Assert: Model from API and Model from UI are the same");
assertTrue(
"Model from API and Model from UI are not the same",
mSystemSettingsHelper.get().getDeviceModel().endsWith(model));
@@ -68,6 +73,7 @@
public void testAndroidVersion() {
String androidVersion = android.os.Build.VERSION.RELEASE;
String androidVersionCodename = android.os.Build.VERSION.RELEASE_OR_CODENAME;
+ Log.i(LOG_TAG, "Assert: Android Version from API and Android Version from UI are the same");
assertTrue(
"Android Version from API and Android Version from UI are not the same",
mSystemSettingsHelper.get().getAndroidVersion().endsWith(androidVersion)
@@ -86,6 +92,7 @@
Integer.valueOf(arr[0]),
Integer.valueOf(arr[1]) - 1,
Integer.valueOf(arr[2]));
+ Log.i(LOG_TAG, "Assert: security patch from API and security patch from UI are the same");
assertTrue(
"security patch from API and security patch from UI are not the same",
date.equals(mSystemSettingsHelper.get().getAndroidSecurityPatchLevel()));
@@ -94,6 +101,7 @@
@Test
public void testKernelVersion() {
String kernelVersion = System.getProperty("os.version");
+ Log.i(LOG_TAG, "Assert: kernel version from API and kernel from UI are the same");
assertTrue(
"kernel version from API and kernel from UI are not the same",
mSystemSettingsHelper.get().getKernelVersion().startsWith(kernelVersion));
@@ -102,6 +110,7 @@
@Test
public void testBuildNumber() {
String buildNumber = android.os.Build.DISPLAY;
+ Log.i(LOG_TAG, "Assert: Build number from API and Build number from UI are the same");
assertTrue(
"Build number from API and Build number from UI are not the same",
buildNumber.equals(mSystemSettingsHelper.get().getBuildNumber()));
diff --git a/tests/automotive/functional/settings/src/android/platform/tests/SystemSettingVerifyUIElementsTest.java b/tests/automotive/functional/settings/src/android/platform/tests/SystemSettingVerifyUIElementsTest.java
index 7059e63..d1529d1 100644
--- a/tests/automotive/functional/settings/src/android/platform/tests/SystemSettingVerifyUIElementsTest.java
+++ b/tests/automotive/functional/settings/src/android/platform/tests/SystemSettingVerifyUIElementsTest.java
@@ -24,6 +24,7 @@
import android.platform.helpers.IAutoSystemSettingsHelper;
import android.platform.helpers.IAutoUISettingsHelper;
import android.platform.helpers.SettingsConstants;
+import android.util.Log;
import androidx.test.runner.AndroidJUnit4;
@@ -36,6 +37,7 @@
public class SystemSettingVerifyUIElementsTest {
private HelperAccessor<IAutoSettingHelper> mSettingHelper;
private HelperAccessor<IAutoUISettingsHelper> mSettingsUIHelper;
+ private static final String LOG_TAG = SystemSettingVerifyUIElementsTest.class.getSimpleName();
public SystemSettingVerifyUIElementsTest() throws Exception {
mSettingHelper = new HelperAccessor<>(IAutoSettingHelper.class);
@@ -44,7 +46,9 @@
@Before
public void openSystemFacet() {
+ Log.i(LOG_TAG, "Act: Open the system settings");
mSettingHelper.get().openSetting(SettingsConstants.SYSTEM_SETTINGS);
+ Log.i(LOG_TAG, "Assert: System settings did not open");
assertTrue(
"System settings did not open",
mSettingHelper.get().checkMenuExists("Languages & input"));
@@ -57,25 +61,30 @@
@Test
public void testLanguagesinputSystemSettings() {
+ Log.i(LOG_TAG, "Act: Open Languages & Input");
mSettingsUIHelper.get().openUIOptions(AutomotiveConfigConstants.LANGUAGES_INPUT_IN_SYSTEM);
+ Log.i(LOG_TAG, "Assert: Languages displayed in Languages & input");
assertTrue(
- "Languages displayed in Languages & input",
+ "Languages not displayed in Languages & input",
mSettingsUIHelper.get().hasUIElement(AutomotiveConfigConstants.LANGUAGES_MENU));
+ Log.i(LOG_TAG, "Assert: Autofill service displayed in Languages & input");
assertTrue(
- "Autofill service displayed in Languages & input",
+ "Autofill service not displayed in Languages & input",
mSettingsUIHelper
.get()
.hasUIElement(
AutomotiveConfigConstants
.LANGUAGE_SYSTEM_SETTINGS_AUTOFILL_SERVICE));
+ Log.i(LOG_TAG, "Assert: Keyboard service displayed in Languages & input");
assertTrue(
- "Keyboard service displayed in Languages & input",
+ "Keyboard service not displayed in Languages & input",
mSettingsUIHelper
.get()
.hasUIElement(AutomotiveConfigConstants.LANGUAGE_SYSTEM_SETTINGS_KEYBOARD));
+ Log.i(LOG_TAG, "Assert: Text to speech output displayed in Languages & input");
assertTrue(
- "Text to speechoutput displayed in Languages & input",
+ "Text to speech output not displayed in Languages & input",
mSettingsUIHelper
.get()
.hasUIElement(
@@ -85,24 +94,29 @@
@Test
public void testUnitSystemSettings() {
+ Log.i(LOG_TAG, "Act: Open Units in System Settings");
mSettingsUIHelper.get().openUIOptions(AutomotiveConfigConstants.SYSTEM_SETTINGS_UNITS);
+ Log.i(LOG_TAG, "Assert: Speed is displayed in Units");
assertTrue(
- "Speed displayed in Units",
+ "Speed is not displayed in Units",
mSettingsUIHelper
.get()
.hasUIElement(AutomotiveConfigConstants.UNIT_SYSTEM_SETTINGS_SPEED));
+ Log.i(LOG_TAG, "Assert: Distance is displayed in Units");
assertTrue(
- "Distance displayed in Units",
+ "Distance is not displayed in Units",
mSettingsUIHelper
.get()
.hasUIElement(AutomotiveConfigConstants.UNIT_SYSTEM_SETTINGS_DISTANCE));
+ Log.i(LOG_TAG, "Assert: Temperature is displayed in Units");
assertTrue(
- "Temperature displayed in Units",
+ "Temperature is not displayed in Units",
mSettingsUIHelper
.get()
.hasUIElement(AutomotiveConfigConstants.UNIT_SYSTEM_SETTINGS_TEMPERATURE));
+ Log.i(LOG_TAG, "Assert: Pressue is displayed in Units");
assertTrue(
- "Pressure displayed in Units",
+ "Pressure is not displayed in Units",
mSettingsUIHelper
.get()
.hasUIElement(AutomotiveConfigConstants.UNIT_SYSTEM_SETTINGS_PRESSURE));
diff --git a/tests/automotive/functional/settings/src/android/platform/tests/WifiSettingTest.java b/tests/automotive/functional/settings/src/android/platform/tests/WifiSettingTest.java
index 349cc7b..cef4517 100644
--- a/tests/automotive/functional/settings/src/android/platform/tests/WifiSettingTest.java
+++ b/tests/automotive/functional/settings/src/android/platform/tests/WifiSettingTest.java
@@ -24,6 +24,7 @@
import android.platform.helpers.IAutoSettingHelper;
import android.platform.helpers.IAutoUISettingsHelper;
import android.platform.helpers.SettingsConstants;
+import android.util.Log;
import androidx.test.runner.AndroidJUnit4;
@@ -36,6 +37,7 @@
public class WifiSettingTest {
private HelperAccessor<IAutoSettingHelper> mSettingHelper;
private HelperAccessor<IAutoUISettingsHelper> mSettingsUIHelper;
+ private static final String LOG_TAG = WifiSettingTest.class.getSimpleName();
public WifiSettingTest() throws Exception {
mSettingsUIHelper = new HelperAccessor<>(IAutoUISettingsHelper.class);
@@ -58,28 +60,41 @@
@Test
public void testWifiSettings() {
+ Log.i(LOG_TAG, "Act: Turn Off Wifi");
mSettingHelper.get().turnOnOffWifi(false);
+ Log.i(LOG_TAG, "Assert: Wifi is turned off");
assertFalse(mSettingHelper.get().isWifiOn());
+ Log.i(LOG_TAG, "Act: Turn On Wifi");
mSettingHelper.get().turnOnOffWifi(true);
+ Log.i(LOG_TAG, "Assert: Wifi is turned on");
assertTrue(mSettingHelper.get().isWifiOn());
}
@Test
public void testTurnOnOffHotspot() {
+ Log.i(LOG_TAG, "Act: Turn On Hotspot");
mSettingHelper.get().turnOnOffHotspot(true);
+ Log.i(LOG_TAG, "Assert: Hotspot is On");
assertTrue(mSettingHelper.get().isHotspotOn());
+ Log.i(LOG_TAG, "Act: Turn Off Hotspot");
mSettingHelper.get().turnOnOffHotspot(false);
+ Log.i(LOG_TAG, "Assert: Hotspot is Off");
+ assertFalse(mSettingHelper.get().isHotspotOn());
}
@Test
public void testWifiPreferences() {
+ Log.i(LOG_TAG, "Assert: Wi-Fi Preferences option is displayed");
assertTrue(
"Wi-Fi Preferences option is not displayed",
mSettingsUIHelper.get().hasUIElement(AutomotiveConfigConstants.WIFI_PREFERENCES));
+ Log.i(LOG_TAG, "Act: Open Wifi preferences");
mSettingHelper.get().openMenuWith("Wi‑Fi preferences");
+ Log.i(LOG_TAG, "Assert: Turn on Wi‑Fi automatically is displayed");
assertTrue(
"Turn on Wi‑Fi automatically is not displayed",
mSettingHelper.get().checkMenuExists("Turn on Wi‑Fi automatically"));
+ Log.i(LOG_TAG, "Assert: Turn on Wi-Fi automatically toggle is displayed");
assertTrue(
"Turn on Wi-Fi automatically toggle is not displayed",
mSettingsUIHelper
@@ -89,6 +104,7 @@
@Test
public void testJoinOtherNetwork() {
+ Log.i(LOG_TAG, "Assert: Join other network option is displayed");
assertTrue(
"Join other network option is not displayed",
mSettingsUIHelper.get().hasUIElement(AutomotiveConfigConstants.JOIN_OTHER_NETWORK));