HttpRunner 设置 parameters 参数,后续调用提示找不到 httprunner.exceptions.VariableNotFound: user_id

周小凤 · September 07, 2019 · 923 hits

在 json 文件中,设置 parameters 这个参数,后面调用方式为 $xx,运行后提示找不到参数.

"parameters": {
               "user_id": [1001, 1002, 1003, 1004]
           },
           "request": {
               "url": "https://www.kuaidi100.com/query",
               "params": {
                   "type": "huitongkuaidi",
                   "postid":"$user_id",
                   "temp": "0.9077469410802252",
                   "phone": ""
               }

No Reply at the moment.
需要 Sign In 后方可回复, 如果你还没有账号请点击这里 Sign Up