httprunner 变量问题
学习httprunner接口测试,使用csv里的数据时,总是提示找不到变量代码如下‘’‘- config:
name: testcase description
variables: {}
test:
name: /query
parameters:
- postid1: ${P(postid.csv)}
request:
headers:
User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36
(KHTML, like Gecko) Chrome/73.0.3683.103 Safari/537.36
X-Requested-With: XMLHttpRequest
method: GET
params:
phone: ''
postid: $postid1
temp: '0.8965555064774655'
type: huitongkuaidi
url: http://www.kuaidi100.com/query
validate:
- eq:
- status_code
- 200
- eq:
- headers.Content-Type
- text/html;charset=UTF-8
’‘’报错信息如下:
‘httprunner.exceptions.VariableNotFound: postid1’
看看名称 名称是否正确 检查一下名称,看看是否一致 名称??
页:
[1]