接口自动化框架搭建 -- 公司系统自测使用,只跑核心业务流程
编辑中......
1.安装Pytest
pip install -U pytest
1.1Pycharm测试脚本运行
创建project->test_demo1.py,然后再settings配合运行工具
测试脚本:test_demo1.py
def func(x): return x + 1 def test_demo1(): assert func(3) == 5
运行结果:
2.安装pytest-allure-adaptor插件
注意:安装了allure插件后,再运行pytest测试脚本test_demo1.py“失败”(卸载插件后,运行成功),应该是需要配置好allure在运行吧~~~
pip install pytest-allure-adaptor
3.安装allure
allure是基于Java
的一个程序,需要Java1.8
的环境。
下载地址:https://dl.bintray.com/qameta/generic/io/qameta/allure/allure/2.7.0/allure-2.7.0.zip
直接解压使用