- 博客(6)
- 收藏
- 关注
原创 Pytest学习(三)- 前置和后置setup、teardown
用例运行级别 模块级(setup_module/teardown_module)开始于模块始末,全局的 函数级(setup_function/teardown_function)只对函数用例生效(不在类中) 类级(setup_class/teardown_class)只在类中前后运行一次(在类中) 方法级(setup_method/teardown_method)开始于方法始末(在类中) 类里面的(setup/teardown)运行在调用方法的前后 函数式
2021-03-11 16:48:24 148
原创 Pytest学习(二)- pycharm运行pytest
1.以pytest方式运行,需要运行该设置默认的运行器:file->Setting->Tools->Pythonintegrated Tools->
2021-03-09 23:11:18 132
原创 Pytest学习(一)- 入门及基础
一、安装pytestpipinstall-Upytest二、快速入门示例代码如下:# coding: utf-8 def add(x): return x + 2;class TestClass(object): # 测试是否相等 def test_add(self): assert add(2) == 5 # 测试包含 def test_in(self): a = 'hello world'...
2020-11-07 17:19:25 169
原创 uiautomator2 使用Python测试 Android应用-1.环境准备
在app测试的蛮荒时代,如果要进行app自动化测试非常麻烦。我所知的有Appium,uiautomator2,SoloPi这几种。本系列先记录uiautomator2的使用方法1.介绍uiautomator2 是一个可以使用Python对Android设备进行UI自动化的库,而相比appium,这个工具封装的api更加简洁,百度了下资料,发现整个测试环境的搭建过程也要比Appium简单...
2019-11-29 17:24:15 213
原创 pip install --pre -U uiautomator2报错一直安装失败
最近在研究app自动化uiautomator2,在安装时pip install --pre uiautomator2 时报time out这个错,pip._vendor.urllib3.exceptions.ReadTimeoutError: HTTPSConnectionPool(host='files .pythonhosted.org',port=443): Read timed ou...
2019-11-29 14:26:12 3498
空空如也
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人