import sys sys.path.append('..') from Public.Drivers import Drivers from Public.Report import * from TestCase.VivaVideo.test_01_Init import test_init from Public.Decorator import * import unittest from Public.Test_data import * PATH = lambda p: os.path.abspath(os.path.join(os.path.dirname(__file__), p)) if __name__ == '__main__': # back up old report dir 备份旧的测试报告文件夹到TestReport_backup下 date = time.strftime('%Y%m%d%H%M', time.localtime(time.time())) backup_report(date) suite = unittest.TestSuite() suite.addTest(test_init.app_init('test_01_install')) suite.addTest(test_init.app_init('test_02_start')) suite.addTest(test_init.app_init('test_03_camera')) # 从install页面下载最新版本的测试app apk = get_apk(url=ReadConfig().get_APP_URL(), keyword=ReadConfig().get_APP_URL_KEY('XY')) download_apk(apk) # 调试用 # apk ='apk/XiaoYing_V8.1.5_1-Abroad-Bv8.1.5-xiaoyingtest-20200420_145037.apk' Drivers().run(suite, apk, upload=False)
#!/usr/bin/env python # -*- coding: utf-8 -*- from Public.Drivers import Drivers from Public.Report import * from Public.maxim_monkey import Maxim import unittest from Monkey import login_steps if __name__ == '__main__': # back up old report dir 备份旧的测试报告文件夹到TestReport_backup下 data = time.strftime('%Y%m%d%H%M', time.localtime(time.time())) backup_report('./MaximReport', './MaximReport_History', data) cases = unittest.TestSuite() cases.addTest(login_steps.abcd('test_install_login')) command = Maxim().command(package='com.github.android_app_bootstrap', runtime=1, mode='uiautomatordfs', throttle=500, options=' -v -v ', whitelist=True) Drivers().run_maxim(cases=cases, command=command, actions=True, widget_black=False)
# -*- coding: utf-8 -*- import sys sys.path.append('..') from Public.CaseStrategy import CaseStrategy from Public.Drivers import Drivers if __name__ == '__main__': cs = CaseStrategy() cases = cs.collect_cases(suite=True) # in future, cases_list may be used for testing strategy in multi devices Drivers().run(cases)
# @Time: 2020/4/16 5:29 PM # @Author: lemon_zhulixin # @Email: [email protected] # @Project: UI # @File: __init__.py.py import sys sys.path.append('..') from Public.CaseStrategy import CaseStrategy from Public.Drivers import Drivers from Public.Report import * from Public.Test_data import * PATH = lambda p: os.path.abspath(os.path.join(os.path.dirname(__file__), p)) if __name__ == '__main__': # back up old report dir 备份旧的测试报告文件夹到TestReport_History下 date = time.strftime('%Y%m%d%H%M', time.localtime(time.time())) backup_report(date) cs = CaseStrategy() cases = cs.collect_cases(suite=False) # 从install页面下载最新版本的测试app apk = get_apk(url=ReadConfig().get_APP_URL(), keyword=ReadConfig().get_APP_URL_KEY('XY')) download_apk(apk) # 调试用 # apk ='apk/XiaoYing_V8.1.5_1-Abroad-Bv8.1.5-xiaoyingtest-20200420_145037.apk' Drivers().run(cases, apk, upload=False)