随笔分类 -  pytest

摘要:https://cloud.tencent.com/developer/article/1801481 https://www.cnblogs.com/superhin/p/11478007.html https://www.cnblogs.com/hls-code/p/15065254.html 阅读全文
posted @ 2022-01-05 17:49 mkay 阅读(68) 评论(0) 推荐(0)
摘要:https://blog.csdn.net/qq_33801641/article/details/116220346 官方源码查看:https://www.cnblogs.com/canghai1024/p/13877314.html return需要前置的函数(提前封装好) # @pytest. 阅读全文
posted @ 2021-09-17 19:38 mkay 阅读(114) 评论(0) 推荐(0)
摘要:https://testerhome.com/topics/30872 阅读全文
posted @ 2021-09-09 19:29 mkay 阅读(300) 评论(0) 推荐(0)
摘要:命令行实现代码参考:https://blog.csdn.net/weixin_42357472/article/details/87874472 附 pytest中使用conftest.py实现命令行传参 def pytest_addoption(parser): parser.addoption( 阅读全文
posted @ 2021-09-09 10:09 mkay 阅读(237) 评论(0) 推荐(0)
摘要:https://reportportal.io/docs 在pytest.ini文件中添加配置 执行 pytest.main(["--html=../reports/report.html", "--reportportal" ]) 待完善。。。 阅读全文
posted @ 2021-09-08 15:36 mkay 阅读(362) 评论(0) 推荐(0)
摘要:https://www.bilibili.com/video/BV1yU4y1L7bH?from=search&seid=12967589487345537355 pip install pytest-xdist 可以选择按文件或按模块实现并发 pytest.main(["-s", '--allur 阅读全文
posted @ 2021-09-05 20:36 mkay 阅读(450) 评论(0) 推荐(0)
摘要:https://www.cnblogs.com/xiaogongjin/p/13847350.html 阅读全文
posted @ 2021-08-23 16:43 mkay 阅读(138) 评论(0) 推荐(0)
摘要:https://cloud.tencent.com/developer/article/1695576 https://zhuanlan.zhihu.com/p/262166303 pytest官方文档:https://docs.pytest.org/en/latest/reference/refe 阅读全文
posted @ 2021-07-12 21:59 mkay 阅读(174) 评论(0) 推荐(0)
摘要:http://www.51testing.com/html/34/n-4474534.html?nomobile=1 https://www.cnblogs.com/se7enjean/p/13513131.html 不止针对单个用例,可以测试类之间互相依赖 需要指定执行顺序 test_01依赖te 阅读全文
posted @ 2021-07-06 22:11 mkay 阅读(124) 评论(0) 推荐(0)
摘要:unittest unittest是python中的官方库,兼容性更好,更稳定。而pytest需要pip install 安装,在安装的时候,可能会出现和python版本的兼容问题。 定义测试用例类:用例类必须继承于unittest.TestCase定义测试用例:在测试用例类中,每一个以test开头 阅读全文
posted @ 2020-08-18 17:04 mkay 阅读(35) 评论(0) 推荐(0)
摘要:pytest 对比 unittest:1、pytest 兼容 unittest,使用unittest写的用例,可以通过pytest去执行2、pytest写用例更加简单3、加载用例更加智能:4、pytest可以对用例做分类管理,执行用例更加的灵活5、unittest是python中的官方库,兼容性更好 阅读全文
posted @ 2020-05-24 22:28 mkay 阅读(215) 评论(0) 推荐(0)