class TestUninstall(BaseCase): """ 卸载 """ PRIORITY = 3 # 用于指定用例执行顺序 def setUp(self): self.install = ActionInstallApk(self.uuid) def tearDown(self): pass def test_start_app(self): self.install.start_app(self.package_name)
class TestInstall(BaseCase): """ 安装 """ PRIORITY = 1 # 用于指定用例执行顺序 def setUp(self): self.install = ActionInstallApk(self.uuid) def tearDown(self): pass def test_install(self): # 检测是否已经安装过该包 if self.package_name not in self.install.dev.list_app(): # 安装相关操作 proc_ = self.install.start_install(self.apk_path) if self.install.ui_install_object_info.get('installing'): self.install.do_installing( self.install.ui_install_object_info.get('installing')) proc_.wait() # 等待apk安装完毕,执行后续操作 self.install.stop_app(self.package_name) def test_start_app(self): self.install.start_app(self.package_name)
def execute_install(uuid, apk_path, package_name): """ 执行安装 """ install = ActionInstallApk(uuid) # 安装相关操作 proc_ = install.start_install(apk_path) if install.ui_install_object_info.get('installing'): install.do_installing(install.ui_install_object_info.get('installing')) proc_.wait() # 等待apk安装完毕,执行后续操作 install.start_app(package_name)
def execute_install(self, uuid): """ 执行安装 """ install = ActionInstallApk(uuid) # 安装相关操作 proc_ = install.start_install(self.apk_path) if install.ui_install_object_info.get('installing'): install.do_installing( install.ui_install_object_info.get('installing')) proc_.wait() # 等待apk安装完毕,执行后续操作 install.start_app(self.package) return
def setUp(self): self.install = ActionInstallApk(self.uuid)