COM001_task_login_testcases.yml
1.0 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
config:
name: 用户登录APP
base_url: ${ENV(base_url)}
variables:
phone: ${ENV(adminphone)}
teststeps:
- name: $phone 登陆统一用户中心
api: api/app_api/login_api/ucenter_login_api.yml
extract:
cuid: content.data.cuid
credentials: content.data.credentials
muid: content.data.companys.0.muid
varidate:
validate:
- eq:
- content.msg
- ok
- name: 价值系统登录
variables:
credentials: $credentials
cuid: $cuid
muid: $muid
cid: ${ENV(companyid)}
api: api/app_api/login_api/authorize_api.yml
teardown_hooks:
- ${teardown_hook_get_authcode($response)}
varidate:
validate:
- eq:
- content.msg
- 登录成功
- name: 获取accessToken
api: api/app_api/login_api/accessToken_api.yml
teardown_hooks:
- ${teardown_hook_get_task_accesstoken($response)}
validate:
- eq:
- content.msg
- 获取成功