2021年1月25日

模块六 测试报告定制

摘要: 学习文档 https://docs.qameta.io/allure/# 安装allure-pytest 生成测试报告需要两个步骤: ① 生成测试报告 pytest --alluredir=./result/1 (执行路径result/1下) ② 打开测试报告: allure serve ./res 阅读全文

posted @ 2021-01-25 21:06 Cc01 阅读(67) 评论(0) 推荐(0) 编辑

模块五 数据驱动

摘要: import pytest import yaml class TestDemo: @pytest.mark.parametrize("env", yaml.safe_load(open("./date.yaml"))) def test_demo(self,env): if "test" in e 阅读全文

posted @ 2021-01-25 20:11 Cc01 阅读(51) 评论(0) 推荐(0) 编辑

模块四 参数化用例

摘要: pytest数据参数化 参数化使用 使用string import pytest @pytest.mark.parametrize("a,b",[ (1,2), (10,20), (100,200) ]) class TestDemo: def test_param(self,a,b): print 阅读全文

posted @ 2021-01-25 19:38 Cc01 阅读(75) 评论(0) 推荐(0) 编辑

模块三 pytest测试框架

摘要: 介绍 官方文档: https://docs.pytest.org/en/stable/ 安装:pip install -U pytest 查看安装版本:pytest --version pytest安装 ① pip install pytest 升级: pip install -U pytest ② 阅读全文

posted @ 2021-01-25 17:32 Cc01 阅读(83) 评论(0) 推荐(0) 编辑

导航