class ChromeCast(UIATestBase):
    def setUp(self):
        super(ChromeCast, self).setUp()
        self._test_name = __name__
        print "[Setup]: %s" % self._test_name
        self._chromecast = ChromeCastImpl()
        self._chromecast.connect_chromecast()
        self._output_file = self._test_name.split(".")[-1]
        self._usb_camera_obj = UsbCamera(self._output_file)

    def tearDown(self):
        print "[Teardown]: %s" % self._test_name
        super(ChromeCast, self).tearDown()
        self._chromecast.disconnect_chromecast()

    def test_screencasting_presentationmode_dutscreenoff(self):
        ''' refer TC test_ScreenCasting_PresentationMode_DUTScreenOff
        '''
        try:
            self._usb_camera_obj.start_record()
            self._chromecast.install_apidemos()
            self._chromecast.launch_apidemos_am()
            self._chromecast.run_medie_router()
            self._chromecast.suspend_and_resume()
            self._chromecast.stop_apidemos_am()
            recorded_video = self._usb_camera_obj.stop_record()
            upload_file_to_prdshtwsv2d01(self, recorded_video)
        except:
            self._usb_camera_obj.stop_record()
Ejemplo n.º 2
0
class ChromeCast(UIATestBase):
    def setUp(self):
        super(ChromeCast, self).setUp()
        self._test_name = __name__
        print "[Setup]: %s" % self._test_name
        self._chromecast = ChromeCastImpl()
        self._photos = get_photo_implement()
        self._chromecast.connect_chromecast()
        self._chromecast.init_local_video()
        self._photos.refresh_sdcard()

    def tearDown(self):
        print "[Teardown]: %s" % self._test_name
        super(ChromeCast, self).tearDown()
        self._chromecast.disconnect_chromecast()
        self._photos.rm_delete_photos()
        self._photos.refresh_sdcard()

    def test_sleepmode_screencastingvideocontentfile(self):
        ''' refer TC test_SleepMode_ScreencastingVideoContentFile
        '''
        self._photos.launch_photos_am()
        self._photos.play_video()
        self._chromecast.suspend_and_resume()
        self._photos.stop_photos_am()
Ejemplo n.º 3
0
class ChromeCast(UIATestBase):

    def setUp(self):
        super(ChromeCast, self).setUp()
        self._test_name = __name__
        print "[Setup]: %s" % self._test_name
        self._chromecast = ChromeCastImpl()
        self._chromecast.connect_chromecast()
        self._video_path = self._chromecast.init_local_video()
        self._output_file = self._test_name.split(".")[-1]
        self._usb_camera_obj = UsbCamera(self._output_file)

    def tearDown(self):
        print "[Teardown]: %s" % self._test_name
        super(ChromeCast, self).tearDown()
        self._chromecast.disconnect_chromecast()
        self._chromecast.delete_local_video()

    def test_screencasting_sleepdutduringvideoplayback(self):
        ''' refer TC test_ScreenCasting_SleepDUTduringVideoPlayback
        '''
        try:
            self._usb_camera_obj.start_record()
            self._chromecast.launch_photos_am()
            self._chromecast.play_video_in_photos_direct(self._video_path)
            self._chromecast.suspend_and_resume()
            self._chromecast.stop_photos_am()
            recorded_video = self._usb_camera_obj.stop_record()
            upload_file_to_prdshtwsv2d01(self, recorded_video)
        except:
            self._usb_camera_obj.stop_record()
class ChromeCast(UIATestBase):
    def setUp(self):
        super(ChromeCast, self).setUp()
        self._test_name = __name__
        print "[Setup]: %s" % self._test_name
        self._chromecast = ChromeCastImpl()
        self._chromecast.connect_chromecast()

    def tearDown(self):
        print "[Teardown]: %s" % self._test_name
        super(ChromeCast, self).tearDown()
        self._chromecast.disconnect_chromecast()

    def test_screencasting_presentationmode_dutscreenoff(self):
        ''' refer TC test_ScreenCasting_PresentationMode_DUTScreenOff
        '''
        self._chromecast.install_apidemos()
        self._chromecast.launch_apidemos_am()
        self._chromecast.run_medie_router()
        self._chromecast.suspend_and_resume()
        self._chromecast.stop_apidemos_am()
class ChromeCast(UIATestBase):
    def setUp(self):
        super(ChromeCast, self).setUp()
        self._test_name = __name__
        print "[Setup]: %s" % self._test_name
        self._chromecast = ChromeCastImpl()
        self._chromecast.connect_chromecast()
        self._chromecast.init_local_video()

    def tearDown(self):
        print "[Teardown]: %s" % self._test_name
        super(ChromeCast, self).tearDown()
        self._chromecast.disconnect_chromecast()
        self._chromecast.delete_local_video()

    def test_screencasting_sleepdutduringvideoplayback(self):
        ''' refer TC test_ScreenCasting_SleepDUTduringVideoPlayback
        '''
        self._chromecast.launch_photos_am()
        self._chromecast.play_video_in_photos()
        self._chromecast.suspend_and_resume()
        self._chromecast.stop_photos_am()