摘要:pytest运用引进@pytest.mark.parametrize中ids 导致编码乱码解决 执行用例的名字会出现乱码: 结果: 创建个pytest.ini 文件 [pytest] disable_test_id_escaping_and_forfeit_all_rights_to_communi
阅读全文
摘要:allure报告的定制以及参数化 1.定制代码如下: import allure import pytest # 左边定制 @allure.epic("汽车尾气检测项目") @allure.feature('用户模块') class Test_api(): @allure.story("登录接口")
阅读全文
摘要:固件和allure报告 一.Fixture固件 作用:某一些用例、类和模块前后需要执行某一些的操作,以及数据使用数据驱动。 Fixture完整的方法如下: @pytest.fixture(scope="作用域",params="数据驱动",autouse="是否自动执 行",ids=“参数别名”,n
阅读全文
摘要:何为pytest? 基于python的单元测试框架.用来发现测试用例、执行测试用例、判断测试结果、生成测试报告 1.相关插件: pytest 自己 pytest-html 生成测试报告 pytest-xdist 多线程执行 ytest-rerunfailures 执行重跑 pytest-orderi
阅读全文