pytest --version
3.2、pytest规则
测试文件以test_开头(以_test结尾也可)
测试类以Test开头,注意,Test首字母要大写
测试类名称后面直接跟冒号,而不能有()
测试类不能带有...,
[3, 3, 6],
[4, 4, 8],
[5, 5, 10]
])
def test_add_list(a, b, expect):
assert add(a,...b) == expect
# 执行方式一
# "-s": 显示程序中的print/logging输出
# "-v": 丰富信息模式, 输出更详细的用例执行信息...测试报告
3.5.1、win安装allure
allure下载地址:https://repo.maven.apache.org/maven2/io/qameta/allure/allure-commandline...解压后将allure/bin添加到系统变量中,在cmd中输入allure验证是否安装成功。