class VideoPlayBackIteration(TestCaseBase):
    """
    @summary: Test Video PlayBack
    """

    def setUp(self):
        """
        @summary: set up
        @return: None
        """
        super(VideoPlayBackIteration, self).setUp()
        self._test_name = __name__
        print "[Setup]: %s" % self._test_name
        g_common_obj.stop_app_am("com.google.android.apps.plus")
        g_common_obj.stop_app_am("com.google.android.apps.photos")
        # Unlock screen
        g_common_obj.adb_cmd_capture_msg("input keyevent 82")

    def tearDown(self):
        """
        @summary: tear tearDown
        @return: None
        """
        super(VideoPlayBackIteration, self).tearDown()
        print "[Teardown]: %s" % self._test_name
        g_common_obj.stop_exp_handle()
        time.sleep(3)

    def appPrepare(self, case_name):
        cfg_file = os.path.join(os.environ.get('TEST_DATA_ROOT', ''), \
            'tests.tablet.mum_auto_video.conf')
        self.video = PhotosImpl(\
            self.config.read(cfg_file, case_name))
        self.setting = SettingImpl(\
            self.config.read(cfg_file, case_name))
        g_common_obj.adb_cmd_capture_msg(" rm -rf /sdcard/DCIM/Camera/*")
        
        self.multimedia_handle = MultiMediaHandle()
        self.multimedia_setting = MultiMediaSetting(cfg_file)
        self.multimedia_setting.clearFolder(self.video.cfg.get("remove_video"))
        self.multimedia_setting.install_apk("video_apk")
        time.sleep(2)
        self.push_path = self.multimedia_setting.push_file(self.video.cfg.get("push_video"), self.video.cfg.get("datapath"))
        
        g_common_obj.adb_cmd_capture_msg(self.video.cfg.get("refresh_sd"))
        self.video.set_orientation_n()
        # Unlock screen
        g_common_obj.adb_cmd_capture_msg("input keyevent 82")

    def videoPlayBackIteration(self, case_name, bigfileskiptime=0):
        print "run case is " + str(case_name)
        self.appPrepare(case_name)
        push_folder = os.path.split(os.path.split(self.push_path)[0])[-1]
        for iteration in range(int(self.video.cfg.get("iteration_times"))):
            logger.info("Playback video iteration: {0} ".format(iteration + 1))
            if self.multimedia_setting.get_android_version() == "O":
                self.multimedia_handle.launchVideoApp()
                self.multimedia_handle.videoPlayBack(self.push_path)
                assert self.multimedia_handle.checkVideoPlayBackWithComparePicture(60), 'video play failed'
            else:
                self.video.launchPhotos(push_folder)
                time.sleep(2)
                self.multimedia_handle.checkVideoPlayBackWithPhotoApp(int(self.video.cfg.get("iteration_last_time")), bigfileskiptime)
                self.setting.recent_app()
                self.setting.remove_recent_app("OtcVideoPlayer")
        print "case " + str(case_name) + " is pass"

    def testVideoPlayback_Iteration_3GP_H263_20cycles(self):
        """
        This test used to test Video playback
        The test case spec is following:
        1. Launch photos
        2. Play video('H263 for 3GP continuouly play 20 times')
        3. Former name: test_video_playback_iteration_mum_001
        """
        self.videoPlayBackIteration("mum_test_video_playback_iteration_001")

    def testVideoPlayback_Iteration_MP4_H264_HP_1080P_30fps_50Mbps_AAC_LC_48KHz_320Kbps(self):
        """
        This test used to test Video playback
        The test case spec is following:
        1. Launch photos
        2. Play video('H263 for 3GP continuouly play 20 times')
        3. Former name: test_video_playback_iteration_mum_002
        """
        self.videoPlayBackIteration("mum_test_video_playback_iteration_002")

    def testVideoPlayback_Iteration_MP4_H264_HP_1080P_30fps_25Mbps_AAC_ELD_48KHz_192kbps(self):
        """
        This test used to test Video playback
        The test case spec is following:
        1. Launch photos
        2. Play video('Iterative Video playback: H264_HP_1080P_30fps_25Mbps_AAC_ELD_48KHz_192kbps.mp4, iteratively')
        3. Former name: test_video_playback_iteration_mum_003
        """
        self.videoPlayBackIteration("mum_test_video_playback_iteration_003", 20)

    def test_video_playback_iteration_mum_004(self):
        """
        This test used to test Video playback
        The test case spec is following:
        1. Launch photos
        2. Play video('H263 for 3GP continuouly play 20 times')
        """
        self.videoPlayBackIteration("mum_test_video_playback_iteration_004")

    def test_video_playback_iteration_mum_005(self):
        """
        This test used to test Video playback
        The test case spec is following:
        1. Launch photos
        2. Play video('MPEG4 part 2 SP (Simple Profile) and (Advanced Simple Profile) play 20 times continuoously')
        """
        self.videoPlayBackIteration("mum_test_video_playback_iteration_005")

    def testVideoPlayback_Iteration_3GP_H264_Part2v4_20cycles(self):
        """
        This test used to test Video playback
        The test case spec is following:
        1. Launch photos
        2. Play video('H264 Part 2 For .3GPv4 continuouly play 20 times')
        3. Former name: test_video_playback_iteration_mum_006
        """
        self.videoPlayBackIteration("mum_test_video_playback_iteration_006")

    def testVideoPlayback_Iteration_H264_L3_0_L4_0_HP_20cycles(self):
        """
        This test used to test Video playback
        The test case spec is following:
        1. Launch photos
        2. Play video('Video Playback H.264 Level 3.0, 4.0 High Profile play contnuously 20 times')
        3. Former name: test_video_playback_iteration_mum_007
        """
        self.videoPlayBackIteration("mum_test_video_playback_iteration_007")

    def testVideoPlayback_Iteration_H264_L1_0_L2_0_BP_20cycles(self):
        """
        This test used to test Video playback
        The test case spec is following:
        1. Launch photos
        2. Play video('Video Playback H.264 Level 1.0, 2.0 Baseline Profile play continuously 20 times')
        3. Former name: test_video_playback_iteration_mum_008
        """
        self.videoPlayBackIteration("mum_test_video_playback_iteration_008")

    def testVideoPlayback_Iteration_MP4_H263_20cycles(self):
        """
        This test used to test Video playback
        The test case spec is following:
        1. Launch photos
        2. Play video('Video Codec : H263 For .Mp4 play 20 times')
        3. Former name: test_video_playback_iteration_mum_009
        """
        self.videoPlayBackIteration("mum_test_video_playback_iteration_009")

    def testVideoPlayback_Iteration_3GP_MPEG4_Part2_3GPv5_20cycles(self):
        """
        This test used to test Video playback
        The test case spec is following:
        1. Launch photos
        2. Play video('MPEG4 Part 2 For .3GPv5 continuouly play 20 times')
        3. Former name: test_video_playback_iteration_mum_010
        """
        self.videoPlayBackIteration("mum_test_video_playback_iteration_010")

    def test_video_playback_iteration_mum_011(self):
        """
        This test used to test Video playback
        The test case spec is following:
        1. Launch photos
        2. Play video('MPEG4 Part 2 For .3GPv5 continuouly play 20 times')
        """
        self.videoPlayBackIteration("mum_test_video_playback_iteration_011")

    def test_video_playback_iteration_mum_012(self):
        """
        This test used to test Video playback
        The test case spec is following:
        1. Launch photos
        2. Play video('MPEG4 Part 2 For .3GPv5 continuouly play 20 times')
        """
        self.videoPlayBackIteration("mum_test_video_playback_iteration_012")

    def test_video_playback_iteration_mum_013(self):
        """
        This test used to test Video playback
        The test case spec is following:
        1. Launch photos
        2. Play video('MPEG4 Part 2 For .3GPv5 continuouly play 20 times')
        """
        self.videoPlayBackIteration("mum_test_video_playback_iteration_013")

    def test_video_playback_iteration_001(self):
        """
        This test used to test Video playback
        The test case spec is following:
        1. Launch photos
        2. Play video('H263 Decoder, H263_720x450_30fps_no_audio')
        """
        self.videoPlayBackIteration("test_video_playback_iteration_001")

    def test_video_playback_iteration_004(self):
        """
        This test used to test Video playback
        The test case spec is following:
        1. Launch photos
        2. Play video
        """
        self.videoPlayBackIteration("test_video_playback_iteration_004")

    def test_video_playback_iteration_005(self):
        """
        This test used to test Video playback
        The test case spec is following:
        1. Launch photos
        2. Play video
        """
        self.videoPlayBackIteration("test_video_playback_iteration_005")

    def test_video_playback_iteration_006(self):
        """
        This test used to test Video playback
        The test case spec is following:
        1. Launch photos
        2. Play video
        """
        self.videoPlayBackIteration("test_video_playback_iteration_006")

    def test_video_playback_iteration_007(self):
        """
        This test used to test Video playback
        The test case spec is following:
        1. Launch photos
        2. Play video
        """
        self.videoPlayBackIteration("test_video_playback_iteration_007")

    def test_video_playback_iteration_008(self):
        """
        This test used to test Video playback
        The test case spec is following:
        1. Launch photos
        2. Play video
        """
        self.videoPlayBackIteration("test_video_playback_iteration_008")

    def test_video_playback_iteration_010(self):
        """
        This test used to test Video playback
        The test case spec is following:
        1. Launch photos
        2. Play video
        """
        self.videoPlayBackIteration("test_video_playback_iteration_010")

    def test_video_playback_iteration_011(self):
        """
        This test used to test Video playback
        The test case spec is following:
        1. Launch photos
        2. Play video
        """
        self.videoPlayBackIteration("test_video_playback_iteration_011")

    def test_video_playback_iteration_012(self):
        """
        This test used to test Video playback
        The test case spec is following:
        1. Launch photos
        2. Play video
        """
        self.videoPlayBackIteration("test_video_playback_iteration_012")

    def test_video_playback_iteration_013(self):
        """
        This test used to test Video playback
        The test case spec is following:
        1. Launch photos
        2. Play video
        """
        self.videoPlayBackIteration("test_video_playback_iteration_013")

    def test_video_playback_iteration_014(self):
        """
        This test used to test Video playback
        The test case spec is following:
        1. Launch photos
        2. Play video
        """
        self.videoPlayBackIteration("test_video_playback_iteration_014")

    def test_video_playback_iteration_015(self):
        """
        This test used to test Video playback
        The test case spec is following:
        1. Launch photos
        2. Play video
        """
        self.videoPlayBackIteration("test_video_playback_iteration_015")

    def test_video_playback_iteration_017(self):
        """
        This test used to test Video playback
        The test case spec is following:
        1. Launch photos
        2. Play video
        """
        self.videoPlayBackIteration("test_video_playback_iteration_017")

    def test_video_playback_iteration_018(self):
        """
        This test used to test Video playback
        The test case spec is following:
        1. Launch photos
        2. Play video
        """
        self.videoPlayBackIteration("test_video_playback_iteration_018")

    def test_video_playback_iteration_019(self):
        """
        This test used to test Video playback
        The test case spec is following:
        1. Launch photos
        2. Play video
        """
        self.videoPlayBackIteration("test_video_playback_iteration_019")

    def test_video_playback_iteration_021(self):
        """
        This test used to test Video playback
        The test case spec is following:
        1. Launch photos
        2. Play video
        """
        self.videoPlayBackIteration("test_video_playback_iteration_021")

    def test_video_playback_iteration_022(self):
        """
        This test used to test Video playback
        The test case spec is following:
        1. Launch photos
        2. Play video
        """
        self.videoPlayBackIteration("test_video_playback_iteration_022")

    def test_video_playback_iteration_024(self):
        """
        This test used to test Video playback
        The test case spec is following:
        1. Launch photos
        2. Play video
        """
        self.videoPlayBackIteration("test_video_playback_iteration_024")

    def test_video_playback_iteration_025(self):
        """
        This test used to test Video playback
        The test case spec is following:
        1. Launch photos
        2. Play video
        """
        self.videoPlayBackIteration("test_video_playback_iteration_025")

    def test_video_playback_iteration_026(self):
        """
        This test used to test Video playback
        The test case spec is following:
        1. Launch photos
        2. Play video
        """
        self.videoPlayBackIteration("test_video_playback_iteration_026")

    def test_video_playback_iteration_027(self):
        """
        This test used to test Video playback
        The test case spec is following:
        1. Launch photos
        2. Play video
        """
        self.videoPlayBackIteration("test_video_playback_iteration_027")

    def test_video_playback_iteration_028(self):
        """
        This test used to test Video playback
        The test case spec is following:
        1. Launch photos
        2. Play video
        """
        self.videoPlayBackIteration("test_video_playback_iteration_028")

    def test_video_playback_iteration_029(self):
        """
        This test used to test Video playback
        The test case spec is following:
        1. Launch photos
        2. Play video
        """
        self.videoPlayBackIteration("test_video_playback_iteration_029")

    def test_video_playback_iteration_030(self):
        """
        This test used to test Video playback
        The test case spec is following:
        1. Launch photos
        2. Play video
        """
        self.videoPlayBackIteration("test_video_playback_iteration_030")

    def test_video_playback_iteration_031(self):
        """
        This test used to test Video playback
        The test case spec is following:
        1. Launch photos
        2. Play video
        """
        self.videoPlayBackIteration("test_video_playback_iteration_031")

    def test_video_playback_iteration_032(self):
        """
        This test used to test Video playback
        The test case spec is following:
        1. Launch photos
        2. Play video
        """
        self.videoPlayBackIteration("test_video_playback_iteration_032")

    def test_video_playback_iteration_033(self):
        """
        This test used to test Video playback
        The test case spec is following:
        1. Launch photos
        2. Play video
        """
        self.videoPlayBackIteration("test_video_playback_iteration_033")

    def test_video_playback_iteration_034(self):
        """
        This test used to test Video playback
        The test case spec is following:
        1. Launch photos
        2. Play video
        """
        self.videoPlayBackIteration("test_video_playback_iteration_034")

    def test_video_playback_iteration_035(self):
        """
        This test used to test Video playback
        The test case spec is following:
        1. Launch photos
        2. Play video
        """
        self.videoPlayBackIteration("test_video_playback_iteration_035")

    def test_video_playback_iteration_036(self):
        """
        This test used to test Video playback
        The test case spec is following:
        1. Launch photos
        2. Play video
        """
        self.videoPlayBackIteration("test_video_playback_iteration_036")

    def test_video_playback_iteration_037(self):
        """
        This test used to test Video playback
        The test case spec is following:
        1. Launch photos
        2. Play video
        """
        self.videoPlayBackIteration("test_video_playback_iteration_037")

    def test_video_playback_iteration_038(self):
        """
        This test used to test Video playback
        The test case spec is following:
        1. Launch photos
        2. Play video
        """
        self.videoPlayBackIteration("test_video_playback_iteration_038")

    def test_video_playback_iteration_039(self):
        """
        This test used to test Video playback
        The test case spec is following:
        1. Launch photos
        2. Play video
        """
        self.videoPlayBackIteration("test_video_playback_iteration_039")

    def test_video_playback_iteration_040(self):
        """
        This test used to test Video playback
        The test case spec is following:
        1. Launch photos
        2. Play video
        """
        self.videoPlayBackIteration("test_video_playback_iteration_040")

    def test_video_playback_iteration_041(self):
        """
        This test used to test Video playback
        The test case spec is following:
        1. Launch photos
        2. Play video
        """
        self.videoPlayBackIteration("test_video_playback_iteration_041")

    def test_video_playback_iteration_042(self):
        """
        This test used to test Video playback
        The test case spec is following:
        1. Launch photos
        2. Play video
        """
        self.videoPlayBackIteration("test_video_playback_iteration_042")

    def test_video_playback_iteration_043(self):
        """
        This test used to test Video playback
        The test case spec is following:
        1. Launch photos
        2. Play video
        """
        self.videoPlayBackIteration("test_video_playback_iteration_043")

    def test_video_playback_iteration_044(self):
        """
        This test used to test Video playback
        The test case spec is following:
        1. Launch photos
        2. Play video
        """
        self.videoPlayBackIteration("test_video_playback_iteration_044")

    def test_video_playback_iteration_045(self):
        """
        This test used to test Video playback
        The test case spec is following:
        1. Launch photos
        2. Play video
        """
        self.videoPlayBackIteration("test_video_playback_iteration_045")

    def test_video_playback_iteration_046(self):
        """
        This test used to test Video playback
        The test case spec is following:
        1. Launch photos
        2. Play video
        """
        self.videoPlayBackIteration("test_video_playback_iteration_046")
Exemple #2
0
class VideoPlayBack(TestCaseBase):
    """
    @summary: Test Video PlayBack
    """
    def setUp(self):
        """
        @summary: set up
        @return: None
        """
        super(VideoPlayBack, self).setUp()
        self.d = g_common_obj.get_device()
        self._test_name = __name__
        print "[Setup]: %s" % self._test_name
        g_common_obj.stop_app_am("com.google.android.apps.plus")
        g_common_obj.stop_app_am("com.google.android.apps.photos")
        # Unlock screen
        g_common_obj.adb_cmd_capture_msg("input keyevent 82")

    def tearDown(self):
        """
        @summary: tear tearDown
        @return: None
        """
        super(VideoPlayBack, self).tearDown()
        print "[Teardown]: %s" % self._test_name
        g_common_obj.stop_exp_handle()
        time.sleep(3)

    def appPrepare2(self, case_name, model=1):
        cfg_file = os.path.join(os.environ.get('TEST_DATA_ROOT', ''),
                                'tests.tablet.mum_auto_video.conf')
        self.video = PhotosImpl(self.config.read(cfg_file, case_name))

        self.multimedia_handle = MultiMediaHandle()
        self.multimedia_setting = MultiMediaSetting(cfg_file)
        self.multimedia_setting.clearFolder(self.video.cfg.get("remove_video"))
        time.sleep(2)
        if model == 1:
            self.push_path = self.multimedia_setting.push_file(
                self.video.cfg.get("push_video"),
                self.video.cfg.get("datapath"))

        self.multimedia_setting.install_apk("video_apk")
        self.multimedia_setting.install_apk("alarm_apk")
        self.video.set_orientation_n()
        # Unlock screen
        g_common_obj.adb_cmd_capture_msg(self.video.cfg.get("refresh_sd"))
        g_common_obj.adb_cmd_capture_msg("input keyevent 82")

    def videoPlayBack(self, case_name, t_bigfileskiptime=0):
        print "run case is " + str(case_name)
        self.appPrepare2(case_name)
        push_folder = os.path.split(os.path.split(self.push_path)[0])[-1]
        if self.multimedia_setting.get_android_version() == "O":
            self.multimedia_handle.launchVideoApp()
            self.multimedia_handle.videoPlayBack(self.push_path)
            assert self.multimedia_handle.checkVideoPlayBack(
            ), 'video play failed'
        else:
            self.video.launchPhotos(push_folder)
            time.sleep(2)
            self.multimedia_handle.checkVideoPlayBackWithPhotoApp(
                stoptime=self.video.cfg.get("stop_time"),
                bigfileskiptime=t_bigfileskiptime)
        print "case " + str(case_name) + " is pass"

    def testVideoPlayBack(self, case_name):
        MultiMediaBasicTestCase().testVideoPlayBack(case_name)

    def checkVideoPlayBack(self, s=60):
        return self.multimedia_handle.checkVideoPlayBack(s)

    def testMPEG4_352_288_24fps_144kbps_aaclc_22_05kHz_38kbps_Mono_3GP(self):
        """
        This test used to test Video playback
        The test case spec is following:
        1. Launch play video app
        2. Play video
        """
        self.testVideoPlayBack("test_API_video_playback_008")

    def testVideoPlayback_MKV_VP8_640x360_25fps_Vorbis_44KHz_128Kbps(self):
        """
        This test used to test Video playback
        The test case spec is following:
        1. Launch photos
        2. Play video
        3. Former name: testVideoPlayBack_034
        """
        self.videoPlayBack("test_video_playback_034")

    def testPlayback_H264_HP_1080P_60fps_50Mbps_AAC_LC_48KHz_320Kbps_mp4(self):
        """
        This test used to test Video playback
        The test case spec is following:
        1. Launch play video app
        2. Play video
        """
        self.videoPlayBack("test_API_video_playback_035")
class ImageAPITest(TestCaseBase):
    """
    @summary: Test Video PlayBack
    """
    def setUp(self):
        """
        @summary: set up
        @return: None
        """
        super(ImageAPITest, self).setUp()
        self.d = g_common_obj.get_device()
        self._test_name = __name__
        self.x = self.d.info["displayWidth"]
        self.y = self.d.info["displayHeight"]
        self.dpx = self.d.info["displaySizeDpX"]
        self.dpy = self.d.info["displaySizeDpY"]
        self.tag = "[Image Decode image_api_test] "
        self.serial = self.d.server.adb.device_serial()
        logger.debug(self.tag + "[Setup]: %s" % self._test_name)
        g_common_obj.stop_app_am("com.intel.otc.instrument.otcphotos")
        # Unlock screen
        g_common_obj.adb_cmd_capture_msg("input keyevent 82")

    def tearDown(self):
        """
        @summary: tear tearDown
        @return: None
        """
        super(ImageAPITest, self).tearDown()
        print "[Teardown]: %s" % self._test_name
        g_common_obj.stop_exp_handle()
        time.sleep(3)
        g_common_obj.stop_app_am("com.intel.otc.instrument.otcphotos")
        time.sleep(1)
        g_common_obj.adb_cmd_capture_msg(self.video.cfg.get("remove_video"))

    def setTimeToSec(self, time):
        time = time.split(":")
        i = 1
        temp = 0
        for s in time[::-1]:
            temp += int(s) * i
            i *= 60
        return int(temp)

    def getOrientation(self):
        d = self.get_device()
        width = d.info["displayWidth"]
        height = d.info["displayHeight"]
        if width > height:
            return 1
        else:
            return 0

    def appPrepare(self, case_name, model=1):
        cfg_file = os.path.join(os.environ.get('TEST_DATA_ROOT', ''), \
            'tests.tablet.mum_auto_image.conf')
        self.video = PhotosImpl(\
            self.config.read(cfg_file, case_name))

        self.multimedia_handle = MultiMediaHandle()
        self.multimedia_setting = MultiMediaSetting(cfg_file)
        self.multimedia_setting.install_apk("photo_apk")
        self.multimedia_setting.install_apk("alarm_apk")
        self.video.set_orientation_n()
        if self.video.cfg.get("push_picture") is not None:
            self.multimedia_setting.push_file(
                self.video.cfg.get("push_picture"),
                self.video.cfg.get("datapath"))
        refresh_sd_cmd = self.config.read(cfg_file, 'common_cmd')['refresh_sd']
        g_common_obj.adb_cmd_capture_msg(refresh_sd_cmd)
        # Unlock screen
        g_common_obj.adb_cmd_capture_msg("input keyevent 82")

    def launchPhotoAPP(self):
        logger.debug(self.tag + "launch otcphotos app")
        SystemUI().unlock_screen()
        for _ in range(3):
            g_common_obj.launch_app_am("com.intel.otc.instrument.otcphotos", \
                                   "com.intel.otc.instrument.otcphotos.MainActivity")
            time.sleep(3)
            if self.d(textContains="/").exists:
                return
        assert self.d(textContains="/").exists, "launch photo app failed!"

    def checkPhotosBackupAndHandle(self):
        """
        check 'back up & sync' exist and handle it
        :return:
        """
        for _ in range(3):
            if self.d(textContains="Update Google Photos").exists:
                logger.debug("Ignore update google photos")
                self.d(textMatches="NOT NOW").click()
            time.sleep(1)
            if self.d(resourceId=
                      'com.android.packageinstaller:id/permission_allow_button'
                      ).exists:
                self.d(
                    resourceId=
                    'com.android.packageinstaller:id/permission_allow_button'
                ).click()
                time.sleep(1)
            if self.d(textContains='Google Photos uses face').exists and \
                    self.d(textMatches='[O|o][N|n]').exists:
                logger.debug("back up & sync display, try to init photos")
                x = self.d.info['displayHeight'] / 2
                y = self.d.info['displayWidth'] / 2
                self.d.click(x, y)
            if self.d(textContains="Keep backup off").exists:
                self.d(textMatches="Keep off|KEEP OFF").click()
            if self.d(textStartsWith="Never show").exists:
                self.d(textStartsWith="Never show").click()
            if self.d(textMatches="SKIP|Skip").exists:
                self.d(textMatches="SKIP|Skip").click()
            if self.d(textMatches="CANCEL|Cancel").exists:
                self.d(textMatches="CANCEL|Cancel").click()
            if self.d(description="Photos, selected, tab, 2 of 3").exists or\
                                self.d(resourceId="com.google.android.apps.photos:id/toolbar").exists:
                logger.debug("init completed")
                break

    def launchPhotoAPPWithShortCut(self):
        logger.debug(self.tag + "Launch Photos")
        self.d.press.home()
        if self.get_android_version() == "7.1.1":
            logger.debug("DUT android version is 7.1.1")
            self.d(description="Apps list").click()
        elif self.get_android_version() < "7.1.1":
            logger.debug("DUT android version is beloww 7.1.1")
            if self.d(text="GOT IT").exists:
                self.d(text="GOT IT").click()
            self.d(description="Apps").click()
        elif self.multimedia_setting.get_paltform_hardware() == 'androidia_64':
            logger.debug("For AIA, Photos in Google folder")
            self.d(description="Folder: Google").click()
            self.d(description="Photos").click()
            self.checkPhotosBackupAndHandle()
            assert self.d(
                resourceId="com.google.android.apps.photos:id/toolbar"
            ).exists, "launch photo app failed!"
            return True
        #for N build,firstly go into apps list,skip the tips
        for _ in range(3):
            if self.d(textContains="Choose some apps").exists:
                self.d(text="OK").click()
        assert not self.d(text="OK").exists, "skip the tips failed!"
        while not self.d(text="otcphoto-app").exists:
            self.d(className="android.view.View").swipe.left()
        self.d(text="otcphoto-app").click()
        time.sleep(3)
        assert self.d(textContains="/").exists, "launch photo app failed!"

    def launchGalleryAPPWithShortCut(self):
        # for bxtp o car, launch Gallery
        self.d.press.home()
        app_list_cmd = "adb -s %s shell input tap '%d' '%d'" % (
            self.serial, int(self.dpx * 0.78), int(self.dpy * 0.97))
        print app_list_cmd
        for _ in range(3):
            os.system(app_list_cmd)
            if self.d(resourceId=
                      "com.android.support.car.lenspicker:id/dismiss_area"
                      ).wait.exists(timeout=3000):
                try:
                    self.d(resourceId=
                           "com.android.support.car.lenspicker:id/dismiss_area"
                           ).scroll.vert.to(text='Gallery')
                except:
                    self.d.swipe(self.x / 2, self.y * 0.75, self.x / 2,
                                 self.y * 0.25)
                self.d(text="Gallery").click()
                if self.d(resourceId="com.android.gallery3d:id/gl_root_view"
                          ).wait.exists(timeout=3000):
                    logger.debug("Launch Gallery success!")
                    return True
        logger.debug("Launch Gallery Failed!")
        return False

    def get_android_version(self):

        prop = "ro.build.version.release"
        buf = g_common_obj.adb_cmd_capture_msg("getprop " + prop)
        v_str = buf.strip()
        return v_str

    def wait_boot_completed(self, timeout=1000):
        ''' wait Android boot_completed
    
        args: timeout -- optional timeout in second, default 180s
        '''
        count = 0
        sleep_time = 5
        while count < timeout:
            prop_val = adb.adb_cmd_capture_msg('getprop sys.boot_completed')
            if '1' in prop_val:
                print 'boot_completed'
                return
            count += sleep_time
            time.sleep(sleep_time)
        raise Exception('%ds timeout waiting for boot_completed' % timeout)

    def enterPhotoPath(self, path):
        logger.debug(self.tag + "enter picture path :" + path)
        push_str = path.strip("\"").split("/")
        if push_str[0] == "" and push_str[1] == "sdcard":
            push_str = push_str[2:]
        for t_str in push_str:
            logger.debug(self.tag + "try to click %s" % t_str)
            if t_str != "":
                self.d(text=t_str).click()
                time.sleep(2)

    def checkPictureExist(self, file_name):
        logger.debug(self.tag + "check picture exist, filename:" + file_name)
        if self.d(text=file_name).exists:
            logger.debug(self.tag + file_name + " found!")
            return True
        else:
            logger.debug(self.tag + file_name + " not find!")
            return False

    def openPictureWithGallery(self, file):
        print file
        open_picture_cmd = "shell am start -a android.intent.action.VIEW -d file://%s " \
                   " -t image/* -n com.android.gallery3d/.app.GalleryActivity" % (file)
        for _ in range(3):
            g_common_obj.adb_cmd_common(open_picture_cmd)
            time.sleep(1)
            if self.d(resourceId=
                      "com.android.gallery3d:id/photopage_bottom_controls"):
                return True
        logger.debug(self.tag + "open %s failed" % file)
        return False

    def openPictureWithPhotosCmd(self, file):
        logger.debug("Try to open %s with command" % file)
        open_picture_cmd = "shell am start -a android.intent.action.VIEW -d file://%s " \
                           " -t image/* -n com.google.android.apps.photos/.pager.HostPhotoPagerActivity" % (file)
        for _ in range(3):
            g_common_obj.adb_cmd_common(open_picture_cmd)
            time.sleep(1)
            if self.d(
                    resourceId=
                    "com.google.android.apps.photos:id/video_player_controller_fragment_container"
            ):
                logger.debug(self.tag + 'Open picture success.')
                return True
        logger.debug(self.tag + "open %s failed" % file)
        return False

    def getPictureSize(self):
        scaleLabel = self.d(
            resourceId="com.intel.otc.instrument.otcphotos:id/scaleLabel"
        ).info["text"]
        return int(scaleLabel.strip("%"))

    def checkVideoPlayBack(self, s=60):
        return self.multimedia_handle.checkVideoPlayBack(s)

    def imageViewRotatePicture(self, case_name):
        print "run case is " + str(case_name)
        self.appPrepare(case_name)
        path = self.video.cfg.get("push_picture").split(" ")[-1].strip("\"")
        print path
        self.launchPhotoAPP()
        self.enterPhotoPath(path)
        self.checkPictureExist(os.path.split(path)[1])
        self.d.orientation = "n"
        time.sleep(2)
        self.checkPictureExist(os.path.split(path)[1])
        self.video.set_orientation_n()
        time.sleep(2)
        self.checkPictureExist(os.path.split(path)[1])
        print "case " + str(case_name) + " is pass"

    def imageViewRotatePictureManyTimes(self, case_name, count):
        print "run case is " + str(case_name)
        self.appPrepare(case_name)
        path = self.video.cfg.get("push_picture").split(" ")[-1].strip("\"")
        print path
        self.launchPhotoAPP()
        self.enterPhotoPath(path)
        self.checkPictureExist(os.path.split(path)[1])
        for _ in range(count):
            self.d.orientation = "n"
            time.sleep(2)
            self.checkPictureExist(os.path.split(path)[1])
            self.video.set_orientation_n()
            time.sleep(2)
            self.checkPictureExist(os.path.split(path)[1])
        print "case " + str(case_name) + " is pass"

    def imageViewCheck(self, case_name):
        print "run case is " + str(case_name)
        self.appPrepare(case_name)
        path = self.video.cfg.get("push_picture").split(" ")[-1].strip("\"")
        print path
        self.launchPhotoAPP()
        self.enterPhotoPath(path)
        self.checkPictureExist(os.path.split(path)[1])
        print "case " + str(case_name) + " is pass"

    def imageViewCheckAfterDeleteFile(self, case_name):
        print "run case is " + str(case_name)
        self.appPrepare(case_name)
        path = self.video.cfg.get("push_picture").split(" ")[-1].strip("\"")
        print path
        self.launchPhotoAPP()
        self.enterPhotoPath(path)
        file_name = os.path.split(path)[1]
        self.checkPictureExist(file_name)
        self.multimedia_setting.clearFolder(self.video.cfg.get("remove_video"))
        time.sleep(2)
        self.d.press.back()
        self.d(text=file_name).click()
        assert not self.d(
            resourceId='com.intel.otc.instrument.otcphotos:id/sizeLabel'
        ).exists, "no warning messsage pop up"
        for _ in range(3):
            self.d.press.back()
        print "case " + str(case_name) + " is pass"

    def imageViewCheckWithUnlock(self, case_name):
        print "run case is " + str(case_name)
        self.appPrepare(case_name)
        path = self.video.cfg.get("push_picture").split(" ")[-1].strip("\"")
        print path
        self.launchPhotoAPP()
        self.enterPhotoPath(path)
        self.checkPictureExist(os.path.split(path)[1])
        if 'bxtp_abl' in self.multimedia_setting.get_paltform_hardware():
            #  For BXT use relay card press power to sleep
            self.multimedia_setting.pressPowerKey()
            time.sleep(10)
            self.multimedia_setting.pressPowerKey()
        else:
            self.d.press.power()
            time.sleep(2)
            self.d.press.power()
        self.lock = SystemUI()
        self.lock.unlock_screen()
        time.sleep(1)
        self.checkPictureExist(os.path.split(path)[1])
        print "case " + str(case_name) + " is pass"

    def imageViewCheckWithRotation(self, case_name):
        print "run case is " + str(case_name)
        self.appPrepare(case_name)
        path = self.video.cfg.get("push_picture").split(" ")[-1].strip("\"")
        print path
        self.launchPhotoAPP()
        self.d.orientation = "n"
        self.d.press.home()
        self.multimedia_setting.click_recent_app("otcphoto-app")
        time.sleep(1)
        assert self.d(textContains="/").exists, "launch photo app failed!"
        self.multimedia_setting.launchAlarmAPP()
        self.video.set_orientation_n()
        self.multimedia_setting.click_recent_app("otcphoto-app")
        time.sleep(1)
        assert self.d(textContains="/").exists, "launch photo app failed!"
        self.enterPhotoPath(path)
        self.checkPictureExist(os.path.split(path)[1])
        print "case " + str(case_name) + " is pass"

    def imageViewCheckWithInstallApp(self, case_name, flag=1):
        print "run case is " + str(case_name)
        self.appPrepare(case_name)
        path = self.video.cfg.get("push_picture").split(" ")[-1].strip("\"")
        print path
        if flag != 1:
            self.multimedia_setting.push_file(
                self.video.cfg.get("push_picture_2"),
                self.video.cfg.get("datapath"))
        self.launchPhotoAPP()
        self.enterPhotoPath(path)
        self.multimedia_setting.install_apk("video_apk")
        self.checkPictureExist(os.path.split(path)[1])
        if flag != 1:
            self.d(className="android.widget.ImageView").swipe.left()
            path_2 = self.video.cfg.get("push_picture_2").split(" ")[-1].strip(
                "\"")
            self.checkPictureExist(os.path.split(path_2)[1])
        self.push_path = self.multimedia_setting.push_file(
            self.video.cfg.get("push_video_2"),
            self.video.cfg.get("datapath_2"))
        self.multimedia_handle.launchVideoApp()
        time.sleep(2)
        self.multimedia_handle.videoPlayBack(self.push_path)
        self.multimedia_setting.install_apk("vpg_apk")
        self.checkVideoPlayBack(30)
        adb.adb_cmd_common(
            'uninstall videoplayer.app.instrument.otc.intel.com.otcvideoplayer'
        )
        adb.adb_cmd_common('uninstall com.intel.vpg.tool')
        print "case " + str(case_name) + " is pass"

    def imageViewCheckWithShortCut(self, case_name):
        print "run case is " + str(case_name)
        self.appPrepare(case_name)
        path = self.video.cfg.get("push_picture").split(" ")[-1].strip("\"")
        if "androidia_64" in self.multimedia_setting.get_paltform_hardware():
            self.launchPhotoAPPWithShortCut()
            assert self.openPictureWithPhotosCmd(path), "Picture not exists!"
        elif self.multimedia_setting.get_android_version() == "O":
            self.launchGalleryAPPWithShortCut()
            assert self.openPictureWithGallery(path), "Picture not exists!"
        else:
            self.launchPhotoAPPWithShortCut()
            self.enterPhotoPath(path)
            assert self.checkPictureExist(
                os.path.split(path)[1]), "Picture not exists!"
        print "case " + str(case_name) + " is pass"

    def imageViewCheckFolder(self, case_name):
        print "run case is " + str(case_name)
        self.appPrepare(case_name)
        path = self.video.cfg.get("push_picture").split(" ")[-1].strip("\"")
        path_2 = self.video.cfg.get("push_picture_2").split(" ")[-1].strip(
            "\"")
        print path, path_2
        self.multimedia_setting.push_file(self.video.cfg.get("push_picture_2"),
                                          self.video.cfg.get("datapath"))
        self.launchPhotoAPP()
        self.enterPhotoPath(path)
        file_name = os.path.split(path)[1]
        file_name_2 = os.path.split(path_2)[1]
        self.checkPictureExist(file_name)
        self.d.press.back()
        self.checkPictureExist(file_name)
        self.checkPictureExist(file_name_2)
        print "case " + str(case_name) + " is pass"

    def imageViewCheckSlideShow(self, case_name):
        print "run case is " + str(case_name)
        self.appPrepare(case_name)
        path = self.video.cfg.get("push_picture").split(" ")[-1].strip("\"")
        path_2 = self.video.cfg.get("push_picture_2").split(" ")[-1].strip(
            "\"")
        print path, path_2
        self.multimedia_setting.push_file(self.video.cfg.get("push_picture_2"),
                                          self.video.cfg.get("datapath"))
        self.launchPhotoAPP()
        self.enterPhotoPath(path)
        file_name = os.path.split(path)[1]
        file_name_2 = os.path.split(path_2)[1]
        self.checkPictureExist(file_name)
        self.d(className="android.widget.ImageView").swipe.left()
        self.checkPictureExist(file_name_2)
        print "case " + str(case_name) + " is pass"

    def imageViewTenTimes(self, case_name, t_time=10):
        print "run case is " + str(case_name)
        self.appPrepare(case_name)
        path = self.video.cfg.get("push_picture").split(" ")[-1].strip("\"")
        print path
        self.launchPhotoAPP()
        self.enterPhotoPath(path)
        file_name = os.path.split(path)[1]
        self.checkPictureExist(file_name)
        for _ in range(10):
            self.d.press.back()
            self.d(text=file_name).click()
            self.checkPictureExist(file_name)
        print "case " + str(case_name) + " is pass"

    def getCpuConsumption(self):
        cmd = "shell top -m 1 -n 1"
        t_pattern = re.compile("User (.*)%, System (.*)%, IOW.*")
        result = g_common_obj.adb_cmd_common(cmd)
        print result
        if t_pattern.findall(result) != []:
            (t_user, t_system) = t_pattern.findall(result)[0]
            return int(t_user) + int(t_system)
        else:
            return 0

    def imageViewWithManyTimes(self, case_name, times):
        print "run case is " + str(case_name)
        self.appPrepare(case_name)
        cpu_1 = self.getCpuConsumption()
        for iteration in range(times):
            logger.debug("Execute {0} times, total {1} times".format(
                iteration + 1, times))
            self.launchPhotoAPP()
            time.sleep(5)
            g_common_obj.stop_app_am("com.intel.otc.instrument.otcphotos")
            time.sleep(4)
        time.sleep(10)
        cpu_2 = self.getCpuConsumption()
        logger.info("cpu_1={0}, cpu_2={1}".format(cpu_1, cpu_2))
        assert cpu_1 + 10 >= cpu_2, "Cpu Consumption error! cpu_1=%s, cpu_2=%s" % (
            cpu_1, cpu_2)
        print "case " + str(case_name) + " is pass"

    def imageViewBackHome(self, case_name, flag=1):
        print "run case is " + str(case_name)
        self.appPrepare(case_name)
        path = self.video.cfg.get("push_picture").split(" ")[-1].strip("\"")
        print path
        if flag != 1:
            self.multimedia_setting.push_file(
                self.video.cfg.get("push_picture_2"),
                self.video.cfg.get("datapath"))
        self.launchPhotoAPP()
        self.enterPhotoPath(path)
        self.checkPictureExist(os.path.split(path)[1])
        self.d.press.home()
        self.multimedia_setting.click_recent_app("otcphoto-app")
        time.sleep(1)
        self.checkPictureExist(os.path.split(path)[1])
        if flag != 1:
            self.d(className="android.widget.ImageView").swipe.left()
            path_2 = self.video.cfg.get("push_picture_2").split(" ")[-1].strip(
                "\"")
            self.checkPictureExist(os.path.split(path_2)[1])
        print "case " + str(case_name) + " is pass"

    def imageViewWithAlarm(self, case_name, flag=1):
        print "run case is " + str(case_name)
        self.appPrepare(case_name)
        path = self.video.cfg.get("push_picture").split(" ")[-1].strip("\"")
        print path
        if flag != 1:
            self.multimedia_setting.push_file(
                self.video.cfg.get("push_picture_2"),
                self.video.cfg.get("datapath"))
        self.multimedia_setting.launchAlarmAPP()
        self.multimedia_setting.setAlarmTime(30)
        self.launchPhotoAPP()
        self.enterPhotoPath(path)
        self.checkPictureExist(os.path.split(path)[1])
        self.multimedia_setting.waitAlarmTriiggered(50, "Snooze")
        self.multimedia_setting.setAlarmTime(30)
        self.multimedia_setting.click_recent_app("otcphoto-app")
        time.sleep(1)
        self.checkPictureExist(os.path.split(path)[1])
        self.multimedia_setting.waitAlarmTriiggered(50, "Dismiss")
        self.multimedia_setting.click_recent_app("otcphoto-app")
        time.sleep(1)
        self.checkPictureExist(os.path.split(path)[1])
        if flag != 1:
            self.d(className="android.widget.ImageView").swipe.left()
            path_2 = self.video.cfg.get("push_picture_2").split(" ")[-1].strip(
                "\"")
            self.checkPictureExist(os.path.split(path_2)[1])
        print "case " + str(case_name) + " is pass"

    def imageViewWithReboot(self, case_name, flag=1):
        print "run case is " + str(case_name)
        self.appPrepare(case_name)
        path = self.video.cfg.get("push_picture").split(" ")[-1].strip("\"")
        logger.debug(self.tag + "path:" + path)
        if flag != 1:
            self.multimedia_setting.push_file(
                self.video.cfg.get("push_picture_2"),
                self.video.cfg.get("datapath"))
        self.launchPhotoAPP()
        self.enterPhotoPath(path)
        self.checkPictureExist(os.path.split(path)[1])
        adb.reboot_device()
        self.wait_boot_completed()
        time.sleep(20)
        if self.d(textContains="Drive safely").exists:
            logger.debug(self.tag + "Drive saftely exist , click owner")
            self.d(text="Owner").click()
            time.sleep(3)
        self.lock = SystemUI()
        self.lock.unlock_screen()
        self.launchPhotoAPP()
        self.enterPhotoPath(path)
        self.checkPictureExist(os.path.split(path)[1])
        if flag != 1:
            self.d(className="android.widget.ImageView").swipe.left()
            path_2 = self.video.cfg.get("push_picture_2").split(" ")[-1].strip(
                "\"")
            self.checkPictureExist(os.path.split(path_2)[1])
        print "case " + str(case_name) + " is pass"

    def imageViewWithInvalidFile(self, case_name):
        print "run case is " + str(case_name)
        self.appPrepare(case_name)
        path = self.video.cfg.get("push_picture").split(" ")[-1].strip("\"")
        logger.debug(self.tag + "test file patch:%s" % path)
        self.launchPhotoAPP()
        self.enterPhotoPath(os.path.split(path)[0])
        assert not self.d(text=os.path.split(path)[1]).exists, os.path.split(
            path)[1] + "Invalid file can be find! error!"
        print "case " + str(case_name) + " is pass"

    def imageViewZoomIn_ZoomOut(self, case_name):
        print "run case is " + str(case_name)
        self.appPrepare(case_name)
        path = self.video.cfg.get("push_picture").split(" ")[-1].strip("\"")
        print path
        self.launchPhotoAPP()
        self.enterPhotoPath(path)
        self.checkPictureExist(os.path.split(path)[1])
        self.d(className="android.widget.ImageView").gesture(
            (self.x / 2, self.y / 2 - 20), (self.x / 2, self.y / 2)).to(
                (self.x / 2, self.y / 4), (self.x / 2, self.y * 3 / 4))
        self.checkPictureExist(os.path.split(path)[1])
        x1 = self.getPictureSize()
        assert x1 > 100, "ZoomIn error"
        time.sleep(2)
        self.d(className="android.widget.ImageView").gesture(
            (self.x / 2, self.y / 4), (self.x / 2, self.y * 3 / 4)).to(
                (self.x / 2, self.y / 2 - 20), (self.x / 2, self.y / 2))
        self.checkPictureExist(os.path.split(path)[1])
        x2 = self.getPictureSize()
        assert x1 > x2, "ZoomOut error"
        print "case " + str(case_name) + " is pass"

    def testImage_View_RotatePicture(self):
        """
        This test used to test Image Decode
        The test case spec is following:
        1. Open a picture
        2. Rotate picture to landscape mode
        3. Rotate picture to Portrait mode
        """
        self.imageViewRotatePicture("test_API_image_001")

    def testMultiMedia_Gallery_SlideShow_Continue_Idle(self):
        """
        This test used to test Image Decode
        The test case spec is following:
        1. Open a picture
        2. Press home
        """
        self.imageViewBackHome("test_API_image_002", 2)

    def testMultiMedia_Gallery3D_GIF_87a_ZoomIn_ZoomOut(self):
        """
        This test used to test Image Decode
        The test case spec is following:
        1. Open a picture
        2. Press home
        """
        self.imageViewZoomIn_ZoomOut("test_API_image_004")

    def testMultiMedia_Gallery3D_GIF_89a_ZoomIn_ZoomOut(self):
        """
        This test used to test Image Decode
        The test case spec is following:
        1. Open a picture
        2. Press home
        """
        self.imageViewZoomIn_ZoomOut("test_API_image_005")

    def testImage_ViewMode_Full_And_non_FullScreen_Switch(self):
        """
        This test used to test Image Decode
        The test case spec is following:
        1. Open a picture
        """
        self.imageViewTenTimes("test_API_image_006", 10)

    def testMultiMedia_Gallery3D_SlideShow_AlarmReminder(self):
        """
        This test used to test Image Decode
        The test case spec is following:
        1. Open a picture
        """
        self.imageViewWithAlarm("test_API_image_007", 2)

    def testImage_View_InvalidFile(self):
        """
        This test used to test Image Decode
        The test case spec is following:
        1. Open a picture
        """
        self.imageViewWithInvalidFile("test_API_image_008")

    def testMultiMedia_Gallery_Format_UnSupportPicture(self):
        """
        This test used to test Image Decode
        The test case spec is following:
        1. Open a picture
        """
        self.imageViewWithInvalidFile("test_API_image_009")

    def testMultiMedia_Gallery_SlideShow_Then_PowerOff_ON(self):
        """
        This test used to test Image Decode
        The test case spec is following:
        1. Open a picture
        """
        self.imageViewWithReboot("test_API_image_010", 2)

    def testMultiMedia_Gallery_Format_ErrorPicture(self):
        """
        This test used to test Image Decode
        The test case spec is following:
        1. Open a picture
        """
        self.imageViewWithInvalidFile("test_API_image_011")

    def testMultiMedia_Gallery3D_SlideShow_Multiple_Events(self):
        """
        This test used to test Image Decode
        The test case spec is following:
        1. Open a picture
        """
        self.imageViewWithAlarm("test_API_image_012", 2)

    def testMultiMedia_MediaFramework_Display_Picture(self):
        """
        This test used to test Image Decode
        The test case spec is following:
        1. Open a picture
        """
        self.imageViewWithInvalidFile("test_API_image_013")

    def testMultiMedia_Gallery3D_ViewImage_Larger_Than_5_or_8_MB(self):
        """
        This test used to test Image Decode
        The test case spec is following:
        1. Open a picture
        """
        self.imageViewCheck("test_API_image_014")

    def test_Calendar_Alarm_EmailNote_When_SlideShow(self):
        """
        This test used to test Image Decode
        The test case spec is following:
        1. Open a picture
        """
        self.imageViewWithAlarm("test_API_image_015", 2)

    def testMultiMedia_Gallery3D_Launch_Exit_30_Times(self):
        """
        This test used to test Image Decode
        The test case spec is following:
        1. Open a picture
        """
        self.imageViewWithManyTimes("test_API_image_016", 30)

    def testMultiMedia_Gallery_Launch_Exit_100_Times(self):
        """
        This test used to test Image Decode
        The test case spec is following:
        1. Open a picture
        """
        self.imageViewWithManyTimes("test_API_image_017", 100)

    def testImage_Number_Indicator(self):
        """
        This test used to test Image Decode
        The test case spec is following:
        1. Open a picture
        """
        self.imageViewCheckFolder("test_API_image_018")

    def testCalendar_Interact_When_View_Picture(self):
        """
        This test used to test Image Decode
        The test case spec is following:
        1. Open a picture
        """
        self.imageViewWithAlarm("test_API_image_019")

    def testMultiMedia_Gallery_SlideShow_Long_Time(self):
        """
        This test used to test Image Decode
        The test case spec is following:
        1. Open a picture
        """
        self.imageViewCheckSlideShow("test_API_image_020")

    def testMultiMedia_Gallery_DifferentResolutions_3072x2304(self):
        """
        This test used to test Image Decode
        The test case spec is following:
        1. Open a picture
        """
        self.imageViewCheck("test_API_image_021")

    def testMultiMedia_MediaFramework_Display_BigSize_Picture(self):
        """
        This test used to test Image Decode
        The test case spec is following:
        1. Open a picture
        """
        self.imageViewCheck("test_API_image_022")

    def testMultiMedia_MediaFramework_Display_LittleSize_Picture(self):
        """
        This test used to test Image Decode
        The test case spec is following:
        1. Open a picture
        """
        self.imageViewCheck("test_API_image_023")

    def testMultiMedia_Gallery_Enter_By_ShortCut(self):
        """
        This test used to test Image Decode
        The test case spec is following:
        1. Open a picture
        """
        self.imageViewCheckWithShortCut("test_API_image_024")

    def testJPEG_HW_Decode(self):
        """
        This test used to test Image Decode
        The test case spec is following:
        1. Open a picture
        """
        self.imageViewCheck("test_API_image_025")

    def testMultiMedia_Gallery3D_Unsupported_Images_Videos(self):
        """
        This test used to test Image Decode
        The test case spec is following:
        1. Open a picture
        """
        self.imageViewWithInvalidFile("test_API_image_026")

    def testMultiMedia_Gallery3D_Gesturing_Screen(self):
        """
        This test used to test Image Decode
        The test case spec is following:
        1. Open a picture
        """
        self.imageViewCheckSlideShow("test_API_image_027")

    def testMultiMedia_Gallery_Panning_Single(self):
        """
        This test used to test Image Decode
        The test case spec is following:
        1. Open a picture
        2. Press home
        """
        self.imageViewZoomIn_ZoomOut("test_API_image_028")

    def testApp_Install_When_View_Picture_Video_SlideShow(self):
        """
        This test used to test Image Decode
        The test case spec is following:
        1. Open a picture
        """
        self.imageViewCheckWithInstallApp("test_API_image_029", 2)

    def testMultiMedia_Gallery_Rotation_Background(self):
        """
        This test used to test Image Decode
        The test case spec is following:
        1. Open a picture
        """
        self.imageViewCheckWithRotation("test_API_image_030")

    def testMultiMedia_Gallery_Image_Review_SD_USB(self):
        """
        This test used to test Image Decode
        The test case spec is following:
        1. Open a picture
        """
        self.imageViewCheck("test_API_image_031")

    def testImage_View_RotatePicture_ManyTimes(self):
        """
        This test used to test Image Decode
        The test case spec is following:
        1. Open a picture
        """
        self.imageViewRotatePictureManyTimes("test_API_image_043", 20)

    def testVideo_NonExist(self):
        """
        This test used to test Image Decode
        The test case spec is following:
        1. Open a picture
        """
        self.imageViewCheckAfterDeleteFile("test_API_image_044")
Exemple #4
0
class VideoPlayBack(TestCaseBase):
    """
    @summary: Test Video PlayBack
    """
    def setUp(self):
        """
        @summary: set up
        @return: None
        """
        super(VideoPlayBack, self).setUp()
        self.d = g_common_obj.get_device()
        self._test_name = __name__
        print "[Setup]: %s" % self._test_name
        g_common_obj.stop_app_am("com.google.android.apps.plus")
        g_common_obj.stop_app_am("com.google.android.apps.photos")
        # Unlock screen
        g_common_obj.adb_cmd_capture_msg("input keyevent 82")

    def tearDown(self):
        """
        @summary: tear tearDown
        @return: None
        """
        super(VideoPlayBack, self).tearDown()
        print "[Teardown]: %s" % self._test_name
        g_common_obj.stop_exp_handle()
        time.sleep(3)

    def appPrepare(self, case_name):
        cfg_file = os.path.join(os.environ.get('TEST_DATA_ROOT', ''), \
            'tests.tablet.mum_auto_video.conf')
        self.video = PhotosImpl(\
            self.config.read(cfg_file, case_name))
        self.file_name = self.video.cfg.get("push_video").split(
            "/")[-1].replace("\"", "")
        self.push_path = self.video.cfg.get("push_video").split(
            "\" \"")[1].replace("\"", "")

        self.multimedia_handle = MultiMediaHandle()
        self.multimedia_setting = MultiMediaSetting(cfg_file)
        self.multimedia_setting.clearFolder(self.video.cfg.get("remove_video"))
        time.sleep(2)
        self.multimedia_setting.push_file(self.video.cfg.get("push_video"),
                                          self.video.cfg.get("datapath"))
        self.video.set_orientation_n()
        # Unlock screen
        g_common_obj.adb_cmd_capture_msg(self.video.cfg.get("refresh_sd"))
        g_common_obj.adb_cmd_capture_msg("input keyevent 82")

    def appPrepare2(self, case_name, model=1):
        cfg_file = os.path.join(os.environ.get('TEST_DATA_ROOT', ''), \
            'tests.tablet.mum_auto_video.conf')
        self.video = PhotosImpl(\
            self.config.read(cfg_file, case_name))

        self.multimedia_handle = MultiMediaHandle()
        self.multimedia_setting = MultiMediaSetting(cfg_file)
        self.multimedia_setting.clearFolder(self.video.cfg.get("remove_video"))
        time.sleep(2)
        if model == 1:
            self.push_path = self.multimedia_setting.push_file(
                self.video.cfg.get("push_video"),
                self.video.cfg.get("datapath"))

        self.multimedia_setting.install_apk("video_apk")
        self.multimedia_setting.install_apk("alarm_apk")
        self.video.set_orientation_n()
        # Unlock screen
        g_common_obj.adb_cmd_capture_msg(self.video.cfg.get("refresh_sd"))
        g_common_obj.adb_cmd_capture_msg("input keyevent 82")

    def videoPlayBack(self, case_name, t_bigfileskiptime=0):
        print "run case is " + str(case_name)
        self.appPrepare2(case_name)
        push_folder = os.path.split(os.path.split(self.push_path)[0])[-1]
        if self.multimedia_setting.get_android_version() == "O":
            self.multimedia_handle.launchVideoApp()
            self.multimedia_handle.videoPlayBack(self.push_path)
            assert self.multimedia_handle.checkVideoPlayBack(
            ), 'video play failed'
        else:
            self.video.launchPhotos(push_folder)
            time.sleep(2)
            self.multimedia_handle.checkVideoPlayBackWithPhotoApp(
                stoptime=self.video.cfg.get("stop_time"),
                bigfileskiptime=t_bigfileskiptime)
        print "case " + str(case_name) + " is pass"

    def testVideoPlayBack(self, case_name):
        MultiMediaBasicTestCase().testVideoPlayBack(case_name)

    def checkVideoPlayBack(self, s=60):
        return self.multimedia_handle.checkVideoPlayBack(s)

    def checkVideoPlayBackWithComparePicture(self,
                                             stoptime,
                                             bigfileskiptime=0):
        return self.multimedia_handle.checkVideoPlayBackWithComparePicture(
            stoptime, bigfileskiptime)

    def checkVideoPlayBackComplete(self, s=900):
        tt = -1
        for _ in range(s / 10):
            time.sleep(10)
            if self.d(textContains="Completed").exists:
                return
            else:
                try:
                    if tt == -1:
                        for _ in range(10):
                            if self.d(resourceId="android:id/time").exists:
                                break
                            self.d.click(self.x / 2, self.y / 2)
                        tt = self.d(resourceId="android:id/time").text
                        tt = self.setTimeToSec(tt)
                    for _ in range(10):
                        if self.d(resourceId="android:id/time_current").exists:
                            break
                        self.d.click(self.x / 2, self.y / 2)
                    ct = self.d(resourceId="android:id/time_current").text
                    ct = self.setTimeToSec(ct)
                except Exception as e:
                    if self.d(textContains="Completed").exists:
                        return
                    else:
                        assert False, e
                if ct == tt:
                    assert not self.d(
                        textContains="error").exists or not self.d(
                            textContains="fail"
                        ).exists, "Play back error! please check it."
                    return

    def setTimeToSec(self, time):
        time = time.split(":")
        i = 1
        temp = 0
        for s in time[::-1]:
            temp += int(s) * i
            i *= 60
        return int(temp)

    def videoPlayBackNoTime(self, case_name):
        print "run case is " + str(case_name)
        self.appPrepare2(case_name)
        push_folder = os.path.split(os.path.split(self.push_path)[0])[-1]
        self.video.launchPhotos(push_folder)
        time.sleep(2)
        #         self.multimedia_handle.launchVideoApp()
        #         self.multimedia_handle.videoPlayBack(self.push_path)
        self.multimedia_handle.checkVideoPlayBackWithPhotoApp(
            stoptime=self.video.cfg.get("stop_time"))
        #         self.video.playback_video_un_QR_code_photoplus(playTime=self.video.cfg.get("wait_time"), stoptime=self.video.cfg.get("stop_time"), flag=True)
        print "case " + str(case_name) + " is pass"

    def testVideoPlayback_3GP_H263_720x450_30fps_no_audio(self):
        """
        This test used to test Video playback
        The test case spec is following:
        1. Launch photos
        2. Play video('H263 Decoder, H263_720x450_30fps_no_audio')
        3. Former name: testVideoPlayBack_001
        """
        self.videoPlayBack("test_video_playback_001")

    def testVideoPlayback_3GP_H264_128_94_25fps_145kbps_AAC_LC_22_05kHz_48kbps_Stereo(
            self):
        """
        This test used to test Video playback
        The test case spec is following:
        1. Launch photos
        2. Play video
        3. Former name: testVideoPlayBack_002
        """
        self.videoPlayBack("test_video_playback_002")

    def testVideoPlayback_MP4_H264_176_144_12_5fps_627kbps_ALAC_44_1kHz_352kbps_Stereo(
            self):
        """
        This test used to test Video playback
        The test case spec is following:
        1. Launch photos
        2. Play video
        3. Former name: testVideoPlayBack_003
        """
        self.videoPlayBack("test_video_playback_003")

    def testVideoPlayBack_004(self):
        """
        This test used to test Video playback
        The test case spec is following:
        1. Launch photos
        2. Play video
        """
        self.videoPlayBack("test_video_playback_004")

    def testVideoPlayBack_005(self):
        """
        This test used to test Video playback
        The test case spec is following:
        1. Launch photos
        2. Play video
        """
        self.videoPlayBack("test_video_playback_005")

    def testVideoPlayBack_006(self):
        """
        This test used to test Video playback
        The test case spec is following:
        1. Launch photos
        2. Play video
        """
        self.videoPlayBack("test_video_playback_006")

    def testVideoPlayBack_007(self):
        """
        This test used to test Video playback
        The test case spec is following:
        1. Launch photos
        2. Play video
        """
        self.videoPlayBack("test_video_playback_007")

    def testVideoPlayBack_008(self):
        """
        This test used to test Video playback
        The test case spec is following:
        1. Launch photos
        2. Play video
        """
        self.videoPlayBack("test_video_playback_008")

    def testVideoPlayback_MP4_H264_320_240_25fps_3566kbps_AAC_Main_48kHz_165kbps_Stereo(
            self):
        """
        This test used to test Video playback
        The test case spec is following:
        1. Launch photos
        2. Play video
        3. Former name: testVideoPlayBack_009
        """
        self.videoPlayBack("test_video_playback_009")

    def testVideoPlayBack_010(self):
        """
        This test used to test Video playback
        The test case spec is following:
        1. Launch photos
        2. Play video
        """
        self.videoPlayBack("test_video_playback_010")

    def testVideoPlayBack_011(self):
        """
        This test used to test Video playback
        The test case spec is following:
        1. Launch photos
        2. Play video
        """
        self.videoPlayBack("test_video_playback_011")

    def testVideoPlayBack_012(self):
        """
        This test used to test Video playback
        The test case spec is following:
        1. Launch photos
        2. Play video
        """
        self.videoPlayBack("test_video_playback_012")

    def testVideoPlayback_MP4_H264_800_600_30fps_1641kbps_AAC_LC_Stereo_44_1kHz_152kbps_Stereo(
            self):
        """
        This test used to test Video playback
        The test case spec is following:
        1. Launch photos
        2. Play video
        3. Former name: testVideoPlayBack_013
        """
        self.videoPlayBack("test_video_playback_013")

    def testVideoPlayback_MP4_L1_0_SP_QCIF_15fps_AACplus_112kbp_32KHz(self):
        """
        This test used to test Video playback
        The test case spec is following:
        1. Launch photos
        2. Play video
        3. Former name: testVideoPlayBack_014
        """
        self.videoPlayBack("test_video_playback_014")

    def testVideoPlayback_MP4_L2_0_SP_QVGA_15fps_eAACplus_96kbp_48KHz(self):
        """
        This test used to test Video playback
        The test case spec is following:
        1. Launch photos
        2. Play video
        3. Former name: testVideoPlayBack_015
        """
        self.videoPlayBack("test_video_playback_015")

    def testVideoPlayBack_016(self):
        """
        This test used to test Video playback
        The test case spec is following:
        1. Launch photos
        2. Play video
        """
        self.videoPlayBack("test_video_playback_016")

    def testVideoPlayback_3GP_MPEG4_SP_480P_30fps_AAC_ELD_48KHz_192kbps(self):
        """
        This test used to test Video playback
        The test case spec is following:
        1. Launch photos
        2. Play video
        3. Former name: testVideoPlayBack_017
        """
        self.videoPlayBack("test_video_playback_017")

    def testVideoPlayback_3GP_MPEG4_SP_720x480_30fps_AMR_NB_8KHz_12_2kbps(
            self):
        """
        This test used to test Video playback
        The test case spec is following:
        1. Launch photos
        2. Play video
        3. Former name: testVideoPlayBack_018
        """
        self.videoPlayBack("test_video_playback_018")

    def testVideoPlayback_MP4_MPEG4_SP_L1_1080_30fps_AACplus_160kbps_48KHz(
            self):
        """
        This test used to test Video playback
        The test case spec is following:
        1. Launch photos
        2. Play video
        3. Former name: testVideoPlayBack_019
        """
        self.videoPlayBack("test_video_playback_019")

    def testVideoPlayBack_020(self):
        """
        This test used to test Video playback
        The test case spec is following:
        1. Launch photos
        2. Play video
        """
        self.videoPlayBack("test_video_playback_020")

    def testVideoPlayback_MP4_H264_L1_3_HP_CIF_30fps_eAACplus_128kb_44KHz(
            self):
        """
        This test used to test Video playback
        The test case spec is following:
        1. Launch photos
        2. Play video
        3. Former name: testVideoPlayBack_021
        """
        self.videoPlayBack("test_video_playback_021")

    def testVideoPlayback_MP4_H264_L3_1_BP_720p_30fps_AAC_96kb_32KHz(self):
        """
        This test used to test Video playback
        The test case spec is following:
        1. Launch photos
        2. Play video
        3. Former name: testVideoPlayBack_022
        """
        self.videoPlayBack("test_video_playback_022")

    def testVideoPlayback_MP4_H264_852_480_30fps_7763kbps_ALAC_44_1kHz_352kbps_Stereo(
            self):
        """
        This test used to test Video playback
        The test case spec is following:
        1. Launch photos
        2. Play video
        3. Former name: testVideoPlayBack_023
        """
        self.videoPlayBack("test_video_playback_023", 20)

    def testVideoPlayBack_024(self):
        """
        This test used to test Video playback
        The test case spec is following:
        1. Launch photos
        2. Play video
        """
        self.videoPlayBack("test_video_playback_024")

    def testVideoPlayback_MP4_H264_L1_0_BP_QCIF_10fps_AAC_64kb_32KHz(self):
        """
        This test used to test Video playback
        The test case spec is following:
        1. Launch photos
        2. Play video
        3. Former name: testVideoPlayBack_025
        """
        self.videoPlayBack("test_video_playback_025")

    def testVideoPlayback_MP4_H264_L2_2_MP_VGA_15fps_AAC_112kb_48K(self):
        """
        This test used to test Video playback
        The test case spec is following:
        1. Launch photos
        2. Play video
        3. Former name: testVideoPlayBack_026
        """
        self.videoPlayBack("test_video_playback_026")

    def testVideoPlayback_MP4_H264_L3_0_HP_D1SD_30fps_eAACplus_128kb_48KHz(
            self):
        """
        This test used to test Video playback
        The test case spec is following:
        1. Launch photos
        2. Play video
        3. Former name: testVideoPlayBack_027
        """
        self.videoPlayBack("test_video_playback_027")

    def testVideoPlayBack_028(self):
        """
        This test used to test Video playback
        The test case spec is following:
        1. Launch photos
        2. Play video
        """
        self.videoPlayBack("test_video_playback_028")

    def testVideoPlayback_TS_H264_BP_720x576_25fps_AACplus_128kbps_22_05KHz(
            self):
        """
        This test used to test Video playback
        The test case spec is following:
        1. Launch photos
        2. Play video
        3. Former name: testVideoPlayBack_029
        """
        self.videoPlayBack("test_video_playback_029")

    def testVideoPlayback_TS_H264_HP_1280x960_51fps_AACplus_192kbps_44_1KHz(
            self):
        """
        This test used to test Video playback
        The test case spec is following:
        1. Launch photos
        2. Play video
        3. Former name: testVideoPlayBack_030
        """
        self.videoPlayBack("test_video_playback_030")

    def testVideoPlayback_TS_H264_HP_1408x1152_38fps_eAACplus_128kbps_48KHz(
            self):
        """
        This test used to test Video playback
        The test case spec is following:
        1. Launch photos
        2. Play video
        3. Former name: testVideoPlayBack_031
        """
        self.videoPlayBack("test_video_playback_031")

    def testVideoPlayback_3GP_H264_HP_L3_2_720P_60fps_AAC_LC_48KHz_320kbps(
            self):
        """
        This test used to test Video playback
        The test case spec is following:
        1. Launch photos
        2. Play video
        3. Former name: testVideoPlayBack_032
        """
        self.videoPlayBack("test_video_playback_032")

    def testVideoPlayback_MKV_VP8_30fps_852_480_AAC_LC_44_1kHz(self):
        """
        This test used to test Video playback
        The test case spec is following:
        1. Launch photos
        2. Play video
        3. Former name: testVideoPlayBack_033
        """
        self.videoPlayBack("test_video_playback_033")

    def testVideoPlayback_MKV_VP8_640x360_25fps_Vorbis_44KHz_128Kbps(self):
        """
        This test used to test Video playback
        The test case spec is following:
        1. Launch photos
        2. Play video
        3. Former name: testVideoPlayBack_034
        """
        self.videoPlayBack("test_video_playback_034")

    def testVideoPlayback_MP4_H264_1920x1080_30fps_24_7Mbps_AAC_352_8Kbps_44_1KHz(
            self):
        """
        This test used to test Video playback
        The test case spec is following:
        1. Launch photos
        2. Play video
        3. Former name: testVideoPlayBack_035
        """
        self.videoPlayBack("test_video_playback_035")

    def testVideoPlayBack_036(self):
        """
        This test used to test Video playback
        The test case spec is following:
        1. Launch photos
        2. Play video
        """
        self.videoPlayBack("test_video_playback_036")

    def testVideoPlayBack_037(self):
        """
        This test used to test Video playback
        The test case spec is following:
        1. Launch photos
        2. Play video
        """
        self.videoPlayBack("test_video_playback_037")

    def testVideoPlayBack_038(self):
        """
        This test used to test Video playback
        The test case spec is following:
        1. Launch photos
        2. Play video
        """
        self.videoPlayBack("test_video_playback_038")

    def testVideoPlayBack_039(self):
        """
        This test used to test Video playback
        The test case spec is following:
        1. Launch photos
        2. Play video
        """
        self.videoPlayBack("test_video_playback_039")

    def testVideoPlayback_MP4_MPEG4_800_600_30fps_2075kbps_AAC_LC_48kHz_165kbps_Stereo(
            self):
        """
        This test used to test Video playback
        The test case spec is following:
        1. Launch photos
        2. Play video
        3. Former name: testVideoPlayBack_040
        """
        self.videoPlayBack("test_video_playback_040")

    def testVideoPlayBack_041(self):
        """
        This test used to test Video playback
        The test case spec is following:
        1. Launch photos
        2. Play video
        """
        self.videoPlayBack("test_video_playback_041")

    def testVideoPlayback_WEBM_VP8_QCIF_25fps_Vorbis_44_1KHz_128kbps(self):
        """
        This test used to test Video playback
        The test case spec is following:
        1. Launch photos
        2. Play video
        3. Former name: testVideoPlayBack_042
        """
        self.videoPlayBack("test_video_playback_042")

    def testVideoPlayBack_043(self):
        """
        This test used to test Video playback
        The test case spec is following:
        1. Launch photos
        2. Play video
        """
        self.videoPlayBack("test_video_playback_043")

    def testVideoPlayBack_044(self):
        """
        This test used to test Video playback
        The test case spec is following:
        1. Launch photos
        2. Play video
        """
        self.videoPlayBack("test_video_playback_044")

    def testVideoPlayBack_045(self):
        """
        This test used to test Video playback
        The test case spec is following:
        1. Launch photos
        2. Play video
        """
        self.videoPlayBack("test_video_playback_045")

    def testVideoPlayback_WEBM_VP9_936Kbps_640x360_30fps_vorbis_224kbps_48khz_2channel(
            self):
        """
        This test used to test Video playback
        The test case spec is following:
        1. Launch photos
        2. Play video
        3. Former name: testVideoPlayBack_046
        """
        self.videoPlayBack("test_video_playback_046")

    def testVideoPlayback_MP4_H264_BP_1080P_24fps_25Mbps_AAC_ELD_48KHz_192kbps(
            self):
        """
        This test used to test Video playback
        The test case spec is following:
        1. Launch photos
        2. Play video
        3. Former name: testVideoPlayBack_047
        """
        self.videoPlayBack("test_video_playback_047")

    def testVideoPlayBack_048(self):
        """
        This test used to test Video playback
        The test case spec is following:
        1. Launch photos
        2. Play video
        """
        self.videoPlayBack("test_video_playback_048")

    def testVideoPlayBack_049(self):
        """
        This test used to test Video playback
        The test case spec is following:
        1. Launch photos
        2. Play video
        """
        self.videoPlayBack("test_video_playback_049")

    def testVideoPlayback_MP4_H264_L3_1_HP_720p_30fps_AAC_160kb_48KHz(self):
        """
        This test used to test Video playback
        The test case spec is following:
        1. Launch photos
        2. Play video
        3. Former name: testVideoPlayBack_050
        """
        self.videoPlayBack("test_video_playback_050")

    def testVideoPlayback_3GP_H263_Decoder_Level_30_CIF_352_288_30fps_384_Kbs(
            self):
        """
        This test used to test Video playback
        The test case spec is following:
        1. Launch photos
        2. Play video
        3. Former name: testVideoPlayBack_051
        """
        self.videoPlayBack("test_video_playback_051")

    def testVideoPlayback_3GP_H263_Level_40_0_None_352_288_30_0fps_2048kbps_aac_stereo_48khz_192kbps(
            self):
        """
        This test used to test Video playback
        The test case spec is following:
        1. Launch photos
        2. Play video
        3. Former name: testVideoPlayBack_052
        """
        self.videoPlayBack("test_video_playback_052")

    def testVideoPlayback_WEBM_VP8_CIF_25fps_Vorbis_44_1KHz_128kbps(self):
        """
        This test used to test Video playback
        The test case spec is following:
        1. Launch photos
        2. Play video
        3. Former name: testVideoPlayBack_053
        """
        self.videoPlayBack("test_video_playback_053")

    def testVideoPlayback_MP4_H264_L4_1_HP_720p_30fps_eAACplus_128kb_48KHz(
            self):
        """
        This test used to test Video playback
        The test case spec is following:
        1. Launch photos
        2. Play video
        3. Former name: testVideoPlayBack_054
        """
        self.videoPlayBack("test_video_playback_054")

    def testVideoPlayBack_055(self):
        """
        This test used to test Video playback
        The test case spec is following:
        1. Launch photos
        2. Play video
        """
        self.videoPlayBack("test_video_playback_055")

    def testVideoPlayBack_056(self):
        """
        This test used to test Video playback
        The test case spec is following:
        1. Launch photos
        2. Play video
        """
        self.videoPlayBack("test_video_playback_056")

    def testVideoPlayback_MP4_H264_Primary_Output_Video_Playback_Content_QVGA_15_fps(
            self):
        """
        This test used to test Video playback
        The test case spec is following:
        1. Launch photos
        2. Play video
        3. Former name: testVideoPlayBack_057
        """
        self.videoPlayBack("test_video_playback_057")

    def testVideoPlayBack_058(self):
        """
        This test used to test Video playback
        The test case spec is following:
        1. Launch photos
        2. Play video
        """
        self.videoPlayBack("test_video_playback_058")

    def testVideoPlayBack_059(self):
        """
        This test used to test Video playback
        The test case spec is following:
        1. Launch photos
        2. Play video
        """
        self.videoPlayBack("test_video_playback_059")

    def testVideoPlayBack_060(self):
        """
        This test used to test Video playback
        The test case spec is following:
        1. Launch photos
        2. Play video
        """
        self.videoPlayBack("test_video_playback_060")

    def testVideoPlayBack_061(self):
        """
        This test used to test Video playback
        The test case spec is following:
        1. Launch photos
        2. Play video
        """
        self.videoPlayBack("test_video_playback_061")

    def testVideoPlayBack_062(self):
        """
        This test used to test Video playback
        The test case spec is following:
        1. Launch photos
        2. Play video
        """
        self.videoPlayBack("test_video_playback_062")

    def testVideoPlayBack_063(self):
        """
        This test used to test Video playback
        The test case spec is following:
        1. Launch photos
        2. Play video
        """
        self.videoPlayBack("test_video_playback_063")

    def testVideoPlayBack_064(self):
        """
        This test used to test Video playback
        The test case spec is following:
        1. Launch photos
        2. Play video
        """
        self.videoPlayBack("test_video_playback_064")

    def testVideoPlayBack_065(self):
        """
        This test used to test Video playback
        The test case spec is following:
        1. Launch photos
        2. Play video
        """
        self.videoPlayBack("test_video_playback_065")

    def testVideoPlayBack_066(self):
        """
        This test used to test Video playback
        The test case spec is following:
        1. Launch photos
        2. Play video
        """
        self.videoPlayBack("test_video_playback_066")

    def testVideoPlayBack_067(self):
        """
        This test used to test Video playback
        The test case spec is following:
        1. Launch photos
        2. Play video
        """
        self.videoPlayBack("test_video_playback_067")

    def testVideoPlayBack_068(self):
        """
        This test used to test Video playback
        The test case spec is following:
        1. Launch photos
        2. Play video
        """
        self.videoPlayBack("test_video_playback_068")

    def testVideoPlayBack_069(self):
        """
        This test used to test Video playback
        The test case spec is following:
        1. Launch photos
        2. Play video
        """
        self.videoPlayBack("test_video_playback_069")

    def testVideoPlayBack_070(self):
        """
        This test used to test Video playback
        The test case spec is following:
        1. Launch photos
        2. Play video
        """
        self.videoPlayBack("test_video_playback_070")

    def testVideoPlayBack_071(self):
        """
        This test used to test Video playback
        The test case spec is following:
        1. Launch photos
        2. Play video
        """
        self.videoPlayBack("test_video_playback_071")

    def testVideoPlayBack_072(self):
        """
        This test used to test Video playback
        The test case spec is following:
        1. Launch photos
        2. Play video
        """
        self.videoPlayBack("test_video_playback_072")

    def testVideoPlayBack_073(self):
        """
        This test used to test Video playback
        The test case spec is following:
        1. Launch photos
        2. Play video
        """
        self.videoPlayBack("test_video_playback_073")

    def testVideoPlayBack_074(self):
        """
        This test used to test Video playback
        The test case spec is following:
        1. Launch photos
        2. Play video
        """
        self.videoPlayBack("test_video_playback_074")

    def testVideoPlayBack_075(self):
        """
        This test used to test Video playback
        The test case spec is following:
        1. Launch photos
        2. Play video
        """
        self.videoPlayBack("test_video_playback_075")

    def testVideoPlayBack_076(self):
        """
        This test used to test Video playback
        The test case spec is following:
        1. Launch photos
        2. Play video
        """
        self.videoPlayBack("test_video_playback_076")

    def testVideoPlayBack_077(self):
        """
        This test used to test Video playback
        The test case spec is following:
        1. Launch photos
        2. Play video
        """
        self.videoPlayBack("test_video_playback_077")

    def testVideoPlayBack_078(self):
        """
        This test used to test Video playback
        The test case spec is following:
        1. Launch photos
        2. Play video
        """
        self.videoPlayBack("test_video_playback_078")

    def testVideoPlayBack_079(self):
        """
        This test used to test Video playback
        The test case spec is following:
        1. Launch photos
        2. Play video
        """
        self.videoPlayBack("test_video_playback_079")

    def testVideoPlayBack_080(self):
        """
        This test used to test Video playback
        The test case spec is following:
        1. Launch photos
        2. Play video
        """
        self.videoPlayBack("test_video_playback_080")

    def testVideoPlayBack_081(self):
        """
        This test used to test Video playback
        The test case spec is following:
        1. Launch photos
        2. Play video
        """
        self.videoPlayBack("test_video_playback_081")

    def testVideoPlayBack_082(self):
        """
        This test used to test Video playback
        The test case spec is following:
        1. Launch photos
        2. Play video
        """
        self.videoPlayBack("test_video_playback_082")

    def testVideoPlayBack_083(self):
        """
        This test used to test Video playback
        The test case spec is following:
        1. Launch photos
        2. Play video
        """
        self.videoPlayBack("test_video_playback_083")

    def testVideoPlayBack_084(self):
        """
        This test used to test Video playback
        The test case spec is following:
        1. Launch photos
        2. Play video
        """
        self.videoPlayBack("test_video_playback_084")

    def testVideoPlayBack_085(self):
        """
        This test used to test Video playback
        The test case spec is following:
        1. Launch photos
        2. Play video
        """
        self.videoPlayBack("test_video_playback_085")

    def testVideoPlayBack_086(self):
        """
        This test used to test Video playback
        The test case spec is following:
        1. Launch photos
        2. Play video
        """
        self.videoPlayBack("test_video_playback_086")

    def testVideoPlayBack_087(self):
        """
        This test used to test Video playback
        The test case spec is following:
        1. Launch photos
        2. Play video
        """
        self.videoPlayBack("test_video_playback_087")

    def testVideoPlayBack_088(self):
        """
        This test used to test Video playback
        The test case spec is following:
        1. Launch photos
        2. Play video
        """
        self.videoPlayBack("test_video_playback_088")

    def testVideoPlayBack_089(self):
        """
        This test used to test Video playback
        The test case spec is following:
        1. Launch photos
        2. Play video
        """
        self.videoPlayBack("test_video_playback_089")

    def testVideoPlayBack_090(self):
        """
        This test used to test Video playback
        The test case spec is following:
        1. Launch photos
        2. Play video
        """
        self.videoPlayBack("test_video_playback_090")

    def testVideoPlayBack_091(self):
        """
        This test used to test Video playback
        The test case spec is following:
        1. Launch photos
        2. Play video
        """
        self.videoPlayBack("test_video_playback_091")

    def testVideoPlayBack_092(self):
        """
        This test used to test Video playback
        The test case spec is following:
        1. Launch photos
        2. Play video
        """
        self.videoPlayBack("test_video_playback_092")

    def testVideoPlayBack_093(self):
        """
        This test used to test Video playback
        The test case spec is following:
        1. Launch photos
        2. Play video
        """
        self.videoPlayBack("test_video_playback_093")

    def testVideoPlayBack_094(self):
        """
        This test used to test Video playback
        The test case spec is following:
        1. Launch photos
        2. Play video
        """
        self.videoPlayBack("test_video_playback_094")

    def testVideoPlayBack_095(self):
        """
        This test used to test Video playback
        The test case spec is following:
        1. Launch photos
        2. Play video
        """
        self.videoPlayBack("test_video_playback_095")

    def testVideoPlayBack_096(self):
        """
        This test used to test Video playback
        The test case spec is following:
        1. Launch photos
        2. Play video
        """
        self.videoPlayBack("test_video_playback_096")

    def testVideoPlayBack_097(self):
        """
        This test used to test Video playback
        The test case spec is following:
        1. Launch photos
        2. Play video
        """
        self.videoPlayBack("test_video_playback_097")

    def testVideoPlayBack_098(self):
        """
        This test used to test Video playback
        The test case spec is following:
        1. Launch photos
        2. Play video
        """
        self.videoPlayBack("test_video_playback_098")

    def testVideoPlayBack_099(self):
        """
        This test used to test Video playback
        The test case spec is following:
        1. Launch photos
        2. Play video
        """
        self.videoPlayBack("test_video_playback_099")

    def testVideoPlayBack_100(self):
        """
        This test used to test Video playback
        The test case spec is following:
        1. Launch photos
        2. Play video
        """
        self.videoPlayBack("test_video_playback_100")

    def testVideoPlayBack_101(self):
        """
        This test used to test Video playback
        The test case spec is following:
        1. Launch photos
        2. Play video
        """
        self.videoPlayBack("test_video_playback_101")

    def testVideoPlayBack_102(self):
        """
        This test used to test Video playback
        The test case spec is following:
        1. Launch photos
        2. Play video
        """
        self.videoPlayBack("test_video_playback_102")

    def testVideoPlayBack_103(self):
        """
        This test used to test Video playback
        The test case spec is following:
        1. Launch photos
        2. Play video
        """
        self.videoPlayBack("test_video_playback_103")

    def testVideoPlayBack_104(self):
        """
        This test used to test Video playback
        The test case spec is following:
        1. Launch photos
        2. Play video
        """
        self.videoPlayBack("test_video_playback_104")

    def testVideoPlayBack_105(self):
        """
        This test used to test Video playback
        The test case spec is following:
        1. Launch photos
        2. Play video
        """
        self.videoPlayBack("test_video_playback_105")

    def testVideoPlayBack_106(self):
        """
        This test used to test Video playback
        The test case spec is following:
        1. Launch photos
        2. Play video
        """
        self.videoPlayBack("test_video_playback_106")

    def testVideoPlayBack_107(self):
        """
        This test used to test Video playback
        The test case spec is following:
        1. Launch photos
        2. Play video
        """
        self.videoPlayBack("test_video_playback_107")

    def testVideoPlayBack_108(self):
        """
        This test used to test Video playback
        The test case spec is following:
        1. Launch photos
        2. Play video
        """
        self.videoPlayBack("test_video_playback_108")

    def testVideoPlayBack_109(self):
        """
        This test used to test Video playback
        The test case spec is following:
        1. Launch photos
        2. Play video
        """
        self.videoPlayBack("test_video_playback_109")

    def testVideoPlayback_MKV_MPEG4_ASP_720P_30fps_4_5Mbps_AAC_128kbps_32KHz(
            self):
        """
        This test used to test Video playback
        The test case spec is following:
        1. Launch photos
        2. Play video
        """
        self.videoPlayBack("mum_test_video_playback_047")

    def testMPEG4_352_288_24fps_144kbps_aaclc_22_05kHz_38kbps_Mono_3GP(self):
        """
        This test used to test Video playback
        The test case spec is following:
        1. Launch play video app
        2. Play video
        """
        self.testVideoPlayBack("test_API_video_playback_008")

    def testMPEG4_part_2_SP_Simple_Profile_Level3_CIF_352x288_30fps_NO_audio(
            self):
        """
        This test used to test Video playback
        The test case spec is following:
        1. Launch play video app
        2. Play video
        """
        self.testVideoPlayBack("test_API_video_playback_009")

    def testVideo_Playback_Mp3_Mkv(self):
        """
        This test used to test Video playback
        The test case spec is following:
        1. Launch play video app
        2. Play video
        """
        self.testVideoPlayBack("test_video_playback_110")

    def testVideo_Playback_HEAAC_V2_Mp4(self):
        """
        This test used to test Video playback
        The test case spec is following:
        1. Launch play video app
        2. Play video
        """
        self.testVideoPlayBack("test_video_playback_111")