35 lines
1.2 KiB
YAML
35 lines
1.2 KiB
YAML
config:
|
|
name: "测试套件"
|
|
base_url: "http://127.0.0.1:8000"
|
|
|
|
testcases:
|
|
-
|
|
name: 登录接口测试
|
|
testcase: testcases/login_testcase.yml
|
|
# 指定登录测试用例运行的参数
|
|
parameters:
|
|
# title-username-password-status_code-msg:
|
|
# - [ "正常登录", "flora01", "123456", 200, "token" ]
|
|
# - ["密码错误", "flora01", "123457", 400, "non_field_errors"]
|
|
# - ["账号错误", "flora01111", "123456", 400, "non_field_errors"]
|
|
# - ["用户名为空", "", "123456", 400, "username"]
|
|
# - ["密码为空", "flora01", "", 400, "password"]
|
|
# 从csv文件中读取用例数据
|
|
# title-username-password-status_code-msg: ${P(data/accounts.csv)}
|
|
# 从内置函数learn_httprunner/debugtalk.py/get_accounts()中读取用例数据
|
|
title-username-password-status_code-msg: ${get_accounts()}
|
|
-
|
|
name: 注册接口测试
|
|
testcase: testcases/register_testcase.yml
|
|
parameters:
|
|
title-username-password-email-password_confirm-status_code-msg: ${generate_accounts()}
|
|
|
|
-
|
|
name: 获取项目列表接口测试
|
|
testcase: testcases/get_projects_list_testcase.yml
|
|
parameters:
|
|
title-username-password-status_code-msg: ${generate_projects()}
|
|
|
|
|
|
|