08 2021 档案

摘要:''' 接口测试用例 ''' import os import allure import pytest # 进行接口用例的编写 desc = "<font color='red'>请求URL:</font>{}<br/>" \ "<font color='red'>请求类型:</font>{}<b 阅读全文

posted @ 2021-08-24 15:02 天堂炼狱 阅读(148) 评论(0) 推荐(0) |

摘要:一, pytest常用参数以及解析 - s 输出打印信息,关闭捕捉 -v 显示具体的详细信息 -k 执行包含关键字的用例 -q 简化输出信息 - x 出现一条测试用例失败,则退出测试 -m 指定目录以及特定类或者方法执行 生成junit xml格式测试报告 pytest.main(['-s','-- 阅读全文

posted @ 2021-08-20 17:07 天堂炼狱 阅读(349) 评论(0) 推荐(0) |

摘要:import os import allure import pytest from PageLocator.FirstPage import FirstPage as fp from PageLocator.LoginPage import LoginPage as lp from common. 阅读全文

posted @ 2021-08-17 14:22 天堂炼狱 阅读(195) 评论(0) 推荐(0) |

摘要:除了unittesr框架自带的setup和teardown功能,pytest也可以实现: 主要是4种情况: 第一批次: setup_module/ teardown_module: 在当前文件中,在所有用例执行前或者执行后执行 第二批次: setup_function/ teardown_funct 阅读全文

posted @ 2021-08-13 17:18 天堂炼狱 阅读(121) 评论(0) 推荐(0) |

博客园  ©  2004-2026
浙公网安备 33010602011771号 浙ICP备2021040463号-3