如何运行测试用例及踩坑点
1、hrp run
- hrp run xxx.json
- hrp run xxx.yaml
2、hrp pytest
- hrp pytest xxx.py
- 指定虚拟环境运行用例:hrp run --venv C:\Users\X21201\Desktop\httprunner4\venvhrun4\Scripts\python.exe xxx.py
- pytest的所有参数都可使用
3、采坑点
(1)运行测试用例报错:pymsql xxx,没有安装这个模块
解决办法:进hrp生成的虚拟环境(C:\Users\tfjiao.hrp\venv\Scripts,activate.bat后执行)目录:
pip install -r F:\new_dev\autel-cloud-auto-test\httprunner_v3\requirements.txt
4、其他
(1)测试平台管理httprunner用例
- httprunnermanager
- seco
- testcenter
- apitestweb