m_login_testcases.yml
1.4 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
46
47
48
49
50
51
52
53
54
55
56
57
58
config:
name: 账号登录测试
base_url: ${ENV(base_business_url)}
teststeps:
- name: 登录企业平台
api: api/m_api/login_api/auth/pwdLogin_api.yml
variables:
phone: ${ENV(wpftwphone)}
teardown_hooks:
- ${teardown_hook_get_Authorization($response)}
varidate:
validate:
- eq:
- content.msg
- ok
- name: 用户的公司列表
output:
- companyId
api: api/m_api/login_api/auth/userCompamies_api.yml
extract:
companyId: content.data.company.0.id
validate:
- eq:
- content.msg
- ok
- eq:
- content.data.company.0.id
- $companyId
- name: 登录公司
api: api/m_api/login_api/auth/anonymousLogin_api.yml
teardown_hooks:
- ${teardown_hook_get_access_token($response)}
varidate:
validate:
- eq:
- content.msg
- ok
#
- name: 登录列表
api: api/m_api/login_api/auth/getSingleLoginMenus_api.yml
teardown_hooks:
- ${teardown_hook_get_login_code($response)}
varidate:
validate:
- eq:
- content.msg
- ok
#
- name: 登录价值系统
api: api/m_api/login_api/auth/login_api.yml
teardown_hooks:
- ${teardown_hook_get_task_Authorization($response)}
varidate:
validate:
- eq:
- content.msg
- ok