配置文件 config.py

# 存放被测试项目基本信息,如url地址等

import os

# 设置项目环境域名
BASE_URL = "http://kdtx-test.itheima.net"

# 获取项目根路径
BASE_PATH= os.path.dirname(__file__)
print(BASE_PATH)

  配置文件 config.py 位置

 Allure报告

Allure文档:Allure

Allure安装:pip install allure-pytest

1. 使用步骤:

 2. 使用Allure生成在线报告

3. 在终端输入pytest运行测试,然后输入 allure serve report  生成测试报告

总结:

更多推荐