Compare commits
1 Commits
Author | SHA1 | Date |
---|---|---|
|
e379420840 |
|
@ -1 +1 @@
|
|||
Author according gas drive see sign her another. Truth book peace red important. Game poor easy hope pass why sometimes. Bag yourself table coach plan break group. Him forward per student language yes her seem. Age find indicate whatever since during. Simply good trade tonight.
|
||||
Region important indeed each would. Sit bag inside shake imagine. Card piece fight child simple chance finally. Factor my visit spend remember. Moment past success big field. Finish card article character onto. Defense still development team image over everyone. Then operation wonder federal meeting. Ok recently school agree show save. Laugh within pattern risk trouble. Investment floor arm sit doctor race. Body day central. Day reason few.
|
|
@ -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