def main():
    #SETUP
    try:
        base.unlock()
        base.setup()

        #discovery and no discovery
        i = 0
        while i < 10:
            base.find_setting()
            bt.enable_bt()
            time.sleep(1)
            bt.start_discovery()
            time.sleep(1)
            bt.disable_bt()

            #######
            bt.enable_bt()
            bt.check_scanner()
            bt.stop_discovery()
            bt.disable_bt()
            ######
            bt.enable_bt()
            bt.stop_discovery()
            base.exit_app()
            i += 1
    except Exception, msg:
        logger.debug('Exception:%s' % msg)
def main():
    stauts = True
    try:
        base.unlock()
        base.setup()
        camera.opencamera()
        camera.camera_button()
        time.sleep(1)
        camera.check_camera_size()
        time.sleep(2)
        camera.teardown()
        base.exit_app()
        ###########take one minute video
        camera.opencamera()
        camera.video_button(90)
        i = 0
        while i <30:
            Command('adb -host shell input tap 623 700').start()
            logger.info('click the video button')
            time.sleep(60)
            Command('adb -host shell input tap 623 700').start()
            time.sleep(1)
            i+=1

        # camera.check_video_size()

    except Exception,msg:
        logger.debug('FAILED:%s'%msg)
        stauts = False
def main():
    try:
        i = 0
        while i < 5:
            base.unlock()
            base.setup()
            base.find_setting()
            BTbase().enable_bt()
    #Reboot the DUT,enter the Bluetooth setting
            base.setting_reboot_version1()
            newstatus =BTbase().bt()
            if newstatus== False:
                logger.debug('bluetooth is closed after reboot ')
                exit(1)
            else:
                BTbase().disable_bt()
                base.setting_reboot_version1()
                newstatus =BTbase().bt()
                if newstatus == False:
                    logger.info('Success:bluetooth still is closed')


                else:
                    logger.debug('Failed:bluetooth is opened')
                    exit(1)

            logger.info('try times is %d'%i)
            base.exit_app()
            i+=1
    except Exception,msg:
        logger.debug('Exception:%s'%msg)
Exemple #4
0
def main():
    stauts = True
    try:
        base.unlock()
        base.setup()
        base.find_setting()
        bt.disable_airplane()
        time.sleep(3)
        i = 0
        while i < 50:
            wifi.wifi_setup()
            wifi.connect_wifi('YUNOS_Auto_Test_2G')
            base.back()
            bt.enable_airplane()
            time.sleep(10)
            wifi.check_connect_disable()
            bt.disable_airplane()
            time.sleep(10)
            wifi.check_connect_enable()
            base.exit_app()
            i += 1
            logger.info('stress times is %d' % i)
    ##########################

    except Exception, msg:
        logger.debug('Exception:%s' % msg)
        stauts = False
Exemple #5
0
def discon_wifi():
    count = 0
    while count < 2:
        time.sleep(2)
        Command('adb -host shell input longtap 200 180').start()
        time.sleep(3)
        Command('adb -host shell input longtap 270 580').start()
        time.sleep(5)
        count += 1
    base.exit_app()
Exemple #6
0
 def clear_history(self):
     self.input_address()
     checkfile.click('resource-id="historyClearView"')
     time.sleep(2)
     checkfile.click('text="清除"')
     status =checkfile.check_stauts('resource-id="historyClearView"')
     if status == True:
         raise Exception('clear the history is failed')
     else:
         logger.info('clear the history is success')
     base.exit_app()
def main():
    stauts = True
    try:
        base.unlock()
        base.setup()
        wifi.wifi_setup()
        wifi.connect_wifi('YUNOS_Auto_Test_2G')
        wifi.check_info()
        base.exit_app()

##########################

    except Exception, msg:
        logger.debug('Exception:%s' % msg)
        stauts = False
def main():
    stauts = True
    try:
        base.unlock()
        base.setup()
        wifi.wifi_setup()
        wifi.connect_wifi('text="YUNOS_Auto_Test_2G"')
        wifi.change_ipv4_stress()
        wifi.check_ifconfig()
        base.exit_app()
    ##########################

    except Exception, msg:
        logger.debug('Exception:%s' % msg)
        stauts = False
Exemple #9
0
def main():
    stauts = True
    try:
        video.video_set_up('dayu.mp4')
        #####play video
        base.unlock()
        time.sleep(3)
        video.launch_video()
        time.sleep(1)
        video.check_push_video()
        video.play_video()
        base.change_unmute_mute(3)
        base.exit_app()
    except Exception, msg:
        logger.debug('Exception:%s' % msg)
        stauts = False
def main():
    stauts = True
    try:
        video.video_set_up('dayu.mp4')
        #####play video
        base.unlock()
        time.sleep(3)
        video.launch_video()
        time.sleep(1)
        video.check_push_video()
        video.play_video()
        video.pause_resume(100)
        base.exit_app()

    except Exception, msg:
        logger.debug('Main_Exception:%s' % msg)
        stauts = False
def main():
    stauts = True
    try:
        base.unlock()
        base.setup()
        camera.opencamera()
        camera.camera_button()
        time.sleep(1)
        camera.check_camera_size()
        camera.teardown()
        base.exit_app()
        ###########take one minute video
        camera.opencamera()
        camera.video_button(60)
        camera.check_video_size()
    except Exception,msg:
        logger.debug('FAILED:%s'%msg)
        stauts = False
Exemple #12
0
def main():
    stauts = True
    try:
        video.video_set_up('zhoujielun.mp4', 'animal.mp4')
        base.unlock()
        ##play video with 3d high rate video
        video.launch_video()
        time.sleep(1)
        video.check_push_video()
        video.play_video_assign('text="zhoujielun"')
        time.sleep(60)
        base.back()
        video.play_video_assign('text="animal"')
        time.sleep(60)
        base.exit_app()
    except Exception, msg:
        logger.debug('Exception:%s' % msg)
        stauts = False
def main():
    stauts = True
    try:
        video.video_set_up('animal.mp4')
        base.unlock()
        gfx.set_up('YUNOS_Auto_Test_2G')
        gfx.address_4()
        gfx.start_address_4(50)
        ##########
        video.launch_video()
        time.sleep(1)
        video.check_push_video()
        video.play_video_assign('text="animal"')
        time.sleep(80)
        base.exit_app()

    except Exception, msg:
        logger.debug('Exception:%s' % msg)
        stauts = False
def main():
    stauts = True
    try:
        base.unlock()
        base.setup()
        i = 0
        while i < 50:
            wifi.wifi_setup()
            wifi.connect_wifi('YUNOS_Auto_Test_2G')
            base.back()
            wifi.disconnect_wifi('YUNOS_Auto_Test_2G')
            base.exit_app()
            i += 1
            logger.info('stress times is %d' % i)
    ##########################

    except Exception, msg:
        logger.debug('Exception:%s' % msg)
        stauts = False
Exemple #15
0
def main():
    stauts = True
    try:
        video.video_set_up('animal.mp4')
        base.unlock()
        time.sleep(3)
        video.launch_video()
        time.sleep(1)
        video.check_push_video()
        video.play_video()
        time.sleep(10)
        video.cyclic_video()
        finish_time = video.run_Task()
        if finish_time == True:
            check_system.check_test_result('page://videoplayer.yunos.com')
            base.exit_app()
    except Exception, msg:
        logger.debug('Exception:%s' % msg)
        stauts = False
def main():
    stauts = True
    try:
        #######setup
        video.video_set_up('Aboy.mp4', 'zhoujielun.mp4', 'animal.mp4')
        ####play video
        base.unlock()
        time.sleep(3)
        video.launch_video()
        time.sleep(10)
        video.check_push_video()
        video.play_video_createlist()
        for i in range(50):
            video.video_player_cycle('Aboy', 'zhoujielun', 'animal')
            logger.info('**********current cycle is %d******' % i)
        base.exit_app()
        ##########
    except Exception, msg:
        logger.debug('Exception:%s' % msg)
        stauts = False
Exemple #17
0
def main():
    stauts = True
    try:
        video.video_set_up('animal.mp4')
        base.unlock()
        gfx.set_up('YUNOS_Auto_Test_2G')
        gfx.address_1()
        time.sleep(1)
        gfx.add_web_package()
        gfx.address_2()
        ##########################
        ##play video with 3d high rate video
        video.launch_video()
        time.sleep(1)
        video.check_push_video()
        video.play_video_assign('text="animal"')
        time.sleep(80)
        base.exit_app()
    except Exception, msg:
        logger.debug('Exception:%s' % msg)
        stauts = False
Exemple #18
0
def main():
    stauts = True
    try:
        base.unlock()
        base.setup()
        wifi.wifi_setup()
        base.reboot_version1()
        base.unlock()

        wifi.diconnect_check_enable()
        wifi.disable_wifi()
        base.reboot_version1()
        base.unlock()
        wifi.diconnect_check_disable()
        base.exit_app()

      ##########################

    except Exception,msg:
        logger.debug('Exception:%s'%msg)
        stauts = False
        video.cyclic_video()
        i = 0
        while i < 100:
            time.sleep(1)
            base.screen_on()
            time.sleep(1)
            base.screen_on()
            base.unlock()
            i += 1
            logger.info('poweroff_screen try: %d' % (i))
        ##########
    except Exception, msg:
        logger.debug('Exception:%s' % msg)
        stauts = False
    finally:
        base.exit_app()
    return stauts


try:
    main_test = main()
    check = Check_system().check_test_result('page://videoplayer.yunos.com')
    del_video = video.delete_video_file()
    if main_test == True and check == True and del_video == True:
        VERDICT = SUCCESS
    else:
        VERDICT = FAILURE
except Exception, msg:
    logger.debug('Exception:%s' % msg)
###clear
finally:
Exemple #20
0
 def set_up(self,args):
     base.unlock()
     base.setup()
     wifi.launch_wifi()
     wifi.connect_wifi(args)
     base.exit_app()