Delete interview_jw451UwT/login_demo.yaml
This commit is contained in:
parent
70f800d11f
commit
5e486465d4
|
@ -1,93 +0,0 @@
|
|||
# 公共参数
|
||||
case_common:
|
||||
allure_epic: GitLink接口(手动编写用例) # 敏捷里面的概念,定义史诗,相当于module级的标签, 往下是 feature
|
||||
allure_feature: 登录模块 # 功能点的描述,相当于class级的标签, 理解成模块往下是 story
|
||||
allure_story: 登录接口 # 故事,可以理解为场景,相当于method级的标签, 往下是 title
|
||||
case_markers: # pytest框架的标记 pytest.mark.
|
||||
- glcc: glcc相关的接口
|
||||
- get_project
|
||||
- skip: 跳过执行该用例
|
||||
|
||||
# 用例数据
|
||||
case_info:
|
||||
-
|
||||
id: case_login_01
|
||||
title: 用户名密码正确,登录成功(不校验数据库)
|
||||
run: True
|
||||
severity: normal
|
||||
url: /api/accounts/login.json
|
||||
method: POST
|
||||
headers: {"Content-Type": "application/json; charset=utf-8;"}
|
||||
cookies:
|
||||
request_type: json
|
||||
payload: { "login": "${login}","password": "${password}","autologin": 1 }
|
||||
files:
|
||||
extract:
|
||||
nickname: $.username
|
||||
login: $.login
|
||||
user_id: $.user_id
|
||||
assert_response:
|
||||
eq:
|
||||
http_code: 200
|
||||
$.user_id: ${user_id}
|
||||
in:
|
||||
$.login: ${login}
|
||||
gt:
|
||||
$.user_id: 84955
|
||||
lt:
|
||||
$.user_id: 84953
|
||||
not:
|
||||
$.user_id: 85390
|
||||
assert_sql:
|
||||
|
||||
-
|
||||
id: case_login_02
|
||||
title: 用户名密码正确,登录成功(校验数据库)
|
||||
run: False
|
||||
severity: minor
|
||||
url: /api/accounts/login.json
|
||||
method: POST
|
||||
headers: {"Content-Type": "application/json; charset=utf-8;"}
|
||||
cookies:
|
||||
request_type: json
|
||||
payload: { "login": "${login}","password": "${password}","autologin": 1 }
|
||||
files:
|
||||
extract:
|
||||
nickname: $.username
|
||||
login: $.login
|
||||
user_id: $.user_id
|
||||
assert_response:
|
||||
eq:
|
||||
http_code: 200
|
||||
$.user_id: ${user_id}
|
||||
in:
|
||||
$.login: ${login}
|
||||
gt:
|
||||
$.user_id: 84955
|
||||
lt:
|
||||
$.user_id: 84953
|
||||
not:
|
||||
$.user_id: 85390
|
||||
assert_sql:
|
||||
eq:
|
||||
sql: select count(*) from tokens where user_id=${user_id};
|
||||
len: 1
|
||||
|
||||
-
|
||||
id: case_login_03
|
||||
title: 用户名正确,密码错误,登录失败
|
||||
severity: critical
|
||||
run: False
|
||||
url: /api/accounts/login.json
|
||||
method: POST
|
||||
headers: {"Content-Type": "application/json; charset=utf-8;"}
|
||||
cookies:
|
||||
request_type: json
|
||||
payload: { "login": "chytest10","password": "password111","autologin": 1 }
|
||||
files:
|
||||
extract:
|
||||
assert_response:
|
||||
eq:
|
||||
http_code: 200
|
||||
$.status: -2
|
||||
assert_sql:
|
Loading…
Reference in New Issue