打开APP
userphoto
未登录

开通VIP,畅享免费电子书等14项超值服

开通VIP
playwright-pytest-example - 使用 Python、Playwright 和 Pytest 进行 e2e 网络测试 ptoject 和 Allure 报告并将视频文件附加到 a

 

运行测试

进入

test
目录

在 1 个线程中运行测试

pytest login_tests.py --headful

并行运行测试

pipenv install pytest-xdist
cd test
pytest login_tests.py registration_tests.py article_tests.py --headful -n 3

与 Allure Report 并行运行

cd test
pytest login_tests.py article_tests.py registration_tests.py --headful --alluredir=./allure-results -n 3
allure generate
allure serve allure-results

在所有浏览器引擎(chromium、firefox、webkit)上运行测试

# Note!!!!
# Make sure that "@pytest.mark.only_browser" decorators are commented under the tests

pytest article_tests.py --browser chromium --browser firefox --browser webkit --headful -n 3
本站仅提供存储服务,所有内容均由用户发布,如发现有害或侵权内容,请点击举报
打开APP,阅读全文并永久保存 查看更多类似文章
猜你喜欢
类似文章
pytest封神之路第一步 tep介绍
Python、Pytest、Allure、Playwright和Jenkins实现测试自动化集成示例
pytest文档31-allure标记用例级别severity
Allure测试框架,测试报告美化与定制
pytest文档12-skip跳过用例
PyTest Xfail /跳过测试
更多类似文章 >>
生活服务
热点新闻
分享 收藏 导长图 关注 下载文章
绑定账号成功
后续可登录账号畅享VIP特权!
如果VIP功能使用有故障,
可点击这里联系客服!

联系客服