We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
根据下面这个v2版本的api用例,生成出来的.py文件中Config对象加载的不正确.
config: name: "global variable" variables: host: "http://127.0.0.1:8888" username: "zhangsan" password: "zhangsan123" status_code: 200 body_status: 200 body_msg: "login success" name: login request: method: POST url: "${host}/login" headers: User-Agent: HttpRunner/${get_httprunner_version()} Content-Type: "application/x-www-form-urlencoded" data: "username=${username}&password=${password}" validate: - eq: ["status_code", "${status_code}"] - eq: ["body.status", "${body_status}"] - eq: ["body.msg", "${body_msg}"]
生成出来的.py文件
# NOTE: Generated By HttpRunner v3.1.6 # FROM: testcases/login-api-variables-global.yml from httprunner import HttpRunner, Config, Step, RunRequest, RunTestCase class TestCaseLoginApiVariablesGlobal(HttpRunner): config = Config("login") # 这里加载的是不符合预期的name. teststeps = [ Step( RunRequest("login") .post("${host}/login") .with_headers( **{ "User-Agent": "HttpRunner/${get_httprunner_version()}", "Content-Type": "application/x-www-form-urlencoded", } ) .with_data("username=${username}&password=${password}") .validate() .assert_equal("status_code", "${status_code}") .assert_equal("body.status", "${body_status}") .assert_equal("body.msg", "${body_msg}") ), ] if __name__ == "__main__": TestCaseLoginApiVariablesGlobal().test_start()
请提供如下版本信息:
The text was updated successfully, but these errors were encountered:
fix: httprunner#1137 missing config when ensuring api testcase
3f2ca42
debugtalk
No branches or pull requests
问题描述
根据下面这个v2版本的api用例,生成出来的.py文件中Config对象加载的不正确.
生成出来的.py文件
版本信息
请提供如下版本信息:
The text was updated successfully, but these errors were encountered: