pytest入门看着一篇就够了
直接执行 如下命令即可安装 pytest
pip install pytest
我们还需要产生测试报表,所以要安装一个第三方插件pytest-html,执行如下命令安装
pip install pytest-html
在命令行直接输入pytest ,就会执行项目下的所有以test_,或者以_test结尾的方法或类
可以输入pytest xxx yyy.py(xxx为指定文件夹,yyy指定文件)执行指定文件下的以test_,或者以_test结尾的方法或类
pytest --html=repor..
原创
2021-12-03 19:41:05 ·
189 阅读 ·
0 评论