def setUp(self): super(Messaging, self).setUp() self.__test_name = __name__ print "Setup: %s" % self.__test_name self.d = g_common_obj.get_device() UiAutomatorUtils.unlock_screen() resource.disable_app_verification() _apk_path = resource.get_resource_from_atifactory\ ("tests.tablet.artifactory.conf", "GCM", "gcm_listener") g_common_obj.adb_cmd_common("install -r %s" % _apk_path) self._jar_path = resource.get_resource_from_atifactory\ ("tests.tablet.artifactory.conf", "GCM", "gcm_sender") self._proxy_file = resource.get_resource_from_atifactory\ ("tests.tablet.artifactory.conf", "Proxy", "http_proxy") with open(self._proxy_file) as pf: self._proxy = pf.read().strip('\n') """ Get Android version: adb shell getprop | grep ro.build.version.sdk """ cmd = 'getprop | grep ro.build.version.sdk' sdk_string = g_common_obj.adb_cmd_capture_msg(cmd) if '24' in sdk_string: self.android_version = "N" elif '23' in sdk_string: self.android_version = "M" elif '22' in sdk_string: self.android_version = "L"
def setUp(self): super(Safe_Mode, self).setUp() self.__test_name = __name__ print "Setup: %s" % self.__test_name self.d = g_common_obj.get_device() resource.disable_app_verification() _apk_path = resource.get_resource_from_atifactory\ ("tests.tablet.artifactory.conf", "SDK_API", "api_demos") g_common_obj.adb_cmd_common("install -r %s" % _apk_path)
def setUp(self): super(Accounts, self).setUp() self.__test_name = __name__ print "Setup: %s" % self.__test_name self._cts_test = CTS_Impl() resource.disable_app_verification() _apk_path = resource.get_resource_from_atifactory\ ("tests.tablet.artifactory.conf", "CTS_APKS", "accounts") g_common_obj.adb_cmd_common("install -r %s" % _apk_path)
def setUp(self): super(DataUsage, self).setUp() self.__test_name = __name__ print "Setup: %s" % self.__test_name self._cts_test = CTS_Impl() UiAutomatorUtils.unlock_screen() resource.disable_app_verification() _apk_path = resource.get_resource_from_atifactory\ ("tests.tablet.artifactory.conf", "SDK_API", "api_test") g_common_obj.adb_cmd_common("install -r %s" % _apk_path)
def setUp(self): super(SaturationHue, self).setUp() self.__test_name = __name__ print "Setup: %s" % self.__test_name resource.disable_app_verification() _apk_path = resource.get_resource_from_atifactory\ ("tests.tablet.artifactory.conf", "SDK_API", "api_test") g_common_obj.adb_cmd_common("install -r %s" % _apk_path) _apk_path = resource.get_resource_from_atifactory\ ("tests.tablet.artifactory.conf", "CTS_APKS", "graphics_test") g_common_obj.adb_cmd_common("install -r %s" % _apk_path)
def setUp(self): super(Calendar_Reminder, self).setUp() self.__test_name = __name__ print "Setup: %s" % self.__test_name self.c = Calendar() self.d = g_common_obj.get_device() UiAutomatorUtils.unlock_screen() resource.disable_app_verification() _apk_path = resource.get_resource_from_atifactory\ ("tests.tablet.artifactory.conf", "SDK_API", "api_test") g_common_obj.adb_cmd_common("install -r %s" % _apk_path)
def setUp(self): super(Clock_Alarm_Reboot, self).setUp() self.__test_name = __name__ print "Setup: %s" % self.__test_name self.d = g_common_obj.get_device() UiAutomatorUtils.unlock_screen() resource.disable_app_verification() for i in ["api_test", "system_api"]: _apk_path = resource.get_resource_from_atifactory\ ("tests.tablet.artifactory.conf", "SDK_API", i) g_common_obj.adb_cmd_common("install -r %s" % _apk_path)
def setUp(self): super(SystemTimeUpdate, self).setUp() self.__test_name = __name__ print "Setup: %s" % self.__test_name self.d = g_common_obj.get_device() UiAutomatorUtils.unlock_screen() resource.disable_app_verification() self.screenshooter = ScreenshotUtils() _apk_path = resource.get_resource_from_atifactory\ ("tests.tablet.artifactory.conf", "SDK_API", "system_api") g_common_obj.adb_cmd_common("install -r %s" % _apk_path)
def setUp(self): super(Recents_20, self).setUp() self.__test_name = __name__ print "Setup: %s" % self.__test_name self.d = g_common_obj.get_device() UiAutomatorUtils.unlock_screen() resource.disable_app_verification() for i in range(1, 21): _apk_path = resource.get_resource_from_atifactory\ ("tests.tablet.artifactory.conf", "20recents", str(i)) g_common_obj.adb_cmd_common("install -r %s" % _apk_path)
def setUp(self): super(ImmersiveMode, self).setUp() self.__test_name = __name__ print "Setup: %s" % self.__test_name self.d = g_common_obj.get_device() UiAutomatorUtils.unlock_screen() resource.disable_app_verification() self.screenshooter = ScreenshotUtils() for i in ["temple_run", "immersive_ui"]: _apk_path = resource.get_resource_from_atifactory\ ("tests.tablet.artifactory.conf", "ImmersiveMode", i) g_common_obj.adb_cmd_common("install -r %s" % _apk_path)
def setUp(self): super(Animation, self).setUp() self.__test_name = __name__ print "Setup: %s" % self.__test_name self._cts_test = CTS_Impl() resource.disable_app_verification() if EnvironmentUtils.get_android_version() == 'N': _apk_path = resource.get_resource_from_atifactory\ ("tests.tablet.artifactory.conf", "CTS_APKS", "animation_n") else: _apk_path = resource.get_resource_from_atifactory\ ("tests.tablet.artifactory.conf", "CTS_APKS", "animation") g_common_obj.adb_cmd_common("install -r %s" % _apk_path)