pytest学习系列_为allure报告添加环境配置

一、前言
在我们进行自动化的时候,假如在预览的时候能够显眼的看到测试环境,接口版本号或app版本号的,会更加的友好

二、详细步骤
1、在工程的根目录下面新建文件environment.properties,输入如下内容
baseUrl=https://mi-api-test.sunvalleycloud.com
projectName=apiAutoTest
author=Durant.zeng
email=1350129201@qq.com

2、在jenkins的item里配置(以windows为例,linux注意更改分隔符)
pytest testcases\ --alluredir .\allure-results --clean
copy environment.properties allure-results\environment.properties

三、结果验证

posted @ 2020-10-21 17:18  未来可期_Durant  阅读(293)  评论(0编辑  收藏  举报