作者 bianxinhua

add README

wpftwphone=19990000008
pfphone=19990000011
pfphone1=19990000015
wtaskphone=19990000012
pfphone2=18100000005
wtaskphone=19999999999
appphone1=19990000014
appphone=19990000015
password=123456
base_url=https://ability-test.fjmaimaimai.com
... ...
name: 公司任务(进行中)
base_url: ${ENV(base_url)}
verify: False
variables:
currtime: ${make_time()}
uuid: ${make_uuid()}
access_token: ${get_task_accesstoken()}
sign: ${make_sign($currtime, $uuid, $access_token)}
teardown_hooks:
- ${teardown_hook_get_task_3_1_total($response)}
request:
headers:
Content-Type: application/json;charset=utf-8
User-Agent: okhttp/3.12.3
X-MMM-AccessToken: $access_token
X-MMM-AppName: com.mmm.ability
X-MMM-AppProject: ability
X-MMM-DeviceType: '0'
X-MMM-Sign: $sign
X-MMM-Timestamp: $currtime
X-MMM-Uuid: $uuid
X-MMM-Version: 1.0.0
json:
action: 0
newest: 0
pageIndex: 0
pageSize: 20
method: POST
url: v1/task/currentTasks
validate:
- eq:
- content.code
- 0
- eq:
- content.msg
- 获取成功
# - eq:
# - $task_total1
# - $task_total2
\ No newline at end of file
... ...
name: 公司任务(进行中)
base_url: ${ENV(base_url)}
verify: False
variables:
currtime: ${make_time()}
uuid: ${make_uuid()}
access_token: ${get_task_accesstoken()}
sign: ${make_sign($currtime, $uuid, $access_token)}
teardown_hooks:
- ${teardown_hook_get_task_3_2_total($response)}
request:
headers:
Content-Type: application/json;charset=utf-8
User-Agent: okhttp/3.12.3
X-MMM-AccessToken: $access_token
X-MMM-AppName: com.mmm.ability
X-MMM-AppProject: ability
X-MMM-DeviceType: '0'
X-MMM-Sign: $sign
X-MMM-Timestamp: $currtime
X-MMM-Uuid: $uuid
X-MMM-Version: 1.0.0
json:
action: 0
newest: 0
pageIndex: 0
pageSize: 20
method: POST
url: v1/task/currentTasks
validate:
- eq:
- content.code
- 0
- eq:
- content.msg
- 获取成功
# - eq:
# - $task_total1
# - $task_total2
\ No newline at end of file
... ...
name: 公司悬赏任务
base_url: ${ENV(base_url)}
verify: False
variables:
currtime: ${make_time()}
uuid: ${make_uuid()}
access_token: ${get_task_accesstoken()}
sign: ${make_sign($currtime, $uuid, $access_token)}
request:
headers:
Content-Type: application/json;charset=utf-8
User-Agent: okhttp/3.12.3
X-MMM-AccessToken: $access_token
X-MMM-AppName: com.mmm.ability
X-MMM-AppProject: ability
X-MMM-DeviceType: '0'
X-MMM-Sign: $sign
X-MMM-Timestamp: $currtime
X-MMM-Uuid: $uuid
X-MMM-Version: 1.0.0
json:
pageIndex: 0
pageSize: 20
method: POST
url: v1/task/rewards
validate:
- eq:
- content.code
- 0
- eq:
- content.data.tasks.0.id
- $id
- eq:
- content.msg
- 获取成功
\ No newline at end of file
... ...
... ... @@ -3,7 +3,7 @@ base_url: ${ENV(base_url)}
variables:
currtime: ${make_time()}
uuid: ${make_uuid()}
var_access_token: ${get_accesstoken()}
var_access_token: ${get_task_accesstoken()}
sign: ${make_sign($currtime, $uuid, $var_access_token)}
request:
headers:
... ... @@ -29,4 +29,4 @@ validate:
- 获取用户信息
- eq:
- content.data.user.permissionTaskPublish
- 1
\ No newline at end of file
- $permissionTaskPublish
\ No newline at end of file
... ...
... ... @@ -2,7 +2,7 @@ name: 企业平台账号登录
base_url: ${ENV(base_business_url)}
verify: False
variables:
username: ${ENV(wpftwphone)}
# username: ${ENV(wpftwphone)}
password: 7c4a8d09ca3762af61e59520943dc26494f8941b
teardown_hooks:
- ${teardown_hook_get_Authorization($response)}
... ...
... ... @@ -7,7 +7,7 @@ variables:
description: 测试抢单任务的任务描述${get_nowtime()}
msg: ok
teardown_hooks:
- ${teardown_hook_get_task_id($response)}
- ${teardown_hook_get_loot_task_id($response)}
request:
headers:
Content-Type: application/json; charset=UTF-8
... ...
eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpc3MiOiJodHRwOlwvXC9zdXBsdXMtYnVzaW5lc3MtYWRtaW4tZ2F0ZXdheS10ZXN0LmZqbWFpbWFpbWFpLmNvbVwvYXV0aFwvcHd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MfIW1wXs4FT26bEnmQQ5XrCkc_R-SGXSr8Se8u7rUs
\ No newline at end of file
... ...
vvbrpohynp
\ No newline at end of file
0gy2cs6cda6v
\ No newline at end of file
... ...
32cd0b3cfed084c5c03f6aafa0bb8d139a9f9afbc9c5c2f6797070996fec5261676d9ae2
\ No newline at end of file
39473d256dac69edb6b33e1f44ae8fb6c58bddcd28d4ff06df3c6fb79c28bcaaede33bfd
\ No newline at end of file
... ...
3679205383782400
\ No newline at end of file
3679205371953152
\ No newline at end of file
... ...
l/IZP20/bKBXz7raHnr8qrzxrZ51EujRxYtcliJMjktjDihUrsg/9yYanpmKnShHfVTU/Y3Hf2+MmnGK3yTz+jHU9BstE9DVdtl5D6gxlIanNzD9NMvXQfAdKcVT/uHSP3X4OldWrpAa7lhkgx6h5SNqmZvHk56Jjeh+7kSNr2I=
\ No newline at end of file
SqNBzgfLy7Kav5Tzcw2rhFGptCB9jhmBuVesg1XnJp/YEVvs/+Re5wFIDBPWrH+iWnqn2RZWZSGykpOkL5yRPeHVuDSKnwBBbAdgFITWwaorhijMMxUV+rxNrS7DwMo5bfcEArAAXjYLGJgBe60u5gS4YSk2CSN17XnDR7UY7pA=
\ No newline at end of file
... ...
3039395831662248960
\ No newline at end of file
3047073807191245824
\ No newline at end of file
... ...
3248817613892608
\ No newline at end of file
3248817613779968
\ No newline at end of file
... ...
мֵ47
\ No newline at end of file
мֵ46
\ No newline at end of file
... ...
3275709332285696
\ No newline at end of file
3275893656719616
\ No newline at end of file
... ...
мֵ47
\ No newline at end of file
мֵ46
\ No newline at end of file
... ...
11067
\ No newline at end of file
11083
\ No newline at end of file
... ...
0
\ No newline at end of file
... ...
eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpc3MiOiJodHRwOlwvXC9zdXBsdXMtd29ydGgtd2ViLWdhdGV3YXktdGVzdC5mam1haW1haW1haS5jb21cL2F1dGhcL2xvZ2luIiwiaWF0IjoxNTk5NDY3NDQ5LCJleHAiOjE1OTk0NzgyNDksIm5iZiI6MTU5OTQ2NzQ0OSwianRpIjoiR3ZNcExYaFFtenhXMkhVYSIsInN1YiI6MzI0ODgxNzYxMzY4MTY2NCwicHJ2IjoiODdlMGFmMWVmOWZkMTU4MTJmZGVjOTcxNTNhMTRlMGIwNDc1NDZhYSIsImNvbXBhbnlJZCI6MzY2LCJuaWNrbmFtZSI6Ilx1OGM3OVx1NWI1MFx1NTkzNCIsInBob25lIjoiMTk5OTAwMDAwMDgiLCJ1aWQiOjMyNDg4MTc2MTM2ODE2NjQsImFkbWluVHlwZSI6Mn0.HEtAZ9Yr8r9ky7ZrnUcfZLCtATJdcLzlgL5Ywi_TRP0
\ No newline at end of file
eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpc3MiOiJodHRwOlwvXC9zdXBsdXMtd29ydGgtd2ViLWdhdGV3YXktdGVzdC5mam1haW1haW1haS5jb21cL2F1dGhcL2xvZ2luIiwiaWF0IjoxNTk5NTU3NDUxLCJleHAiOjE1OTk1NjgyNTEsIm5iZiI6MTU5OTU1NzQ1MSwianRpIjoiZnBhMnZJS0tuVWlrYndTdyIsInN1YiI6MzI0ODgxNzYxMzg2MzkzNiwicHJ2IjoiODdlMGFmMWVmOWZkMTU4MTJmZGVjOTcxNTNhMTRlMGIwNDc1NDZhYSIsImNvbXBhbnlJZCI6MzY2LCJuaWNrbmFtZSI6Ilx1Njc2OFx1NWZkNzE0IiwicGhvbmUiOiIxOTk5MDAwMDAxNCIsInVpZCI6MzI0ODgxNzYxMzg2MzkzNiwiYWRtaW5UeXBlIjoyfQ.123jUWTcy9syl37gvKZ_a5NdvPUKxg28RogIta_gOUg
\ No newline at end of file
... ...
Smsdz8c7shbF5rPkMXG5CFzcSfNeSE4z
\ No newline at end of file
JJcmb7MTBTXMxZDWk3aD5Gh3RJfQNHxi
\ No newline at end of file
... ...
km8vot90cs9
\ No newline at end of file
vxvm6pua4xa
\ No newline at end of file
... ...
... ... @@ -51,5 +51,3 @@ def get_today1():
td = datetime.timedelta(days=0)
tomorrow = (datetime.datetime.utcnow() + td).strftime("%Y-%m-%dT%H:%M:%SZ")
return tomorrow
# print(get_today1())
\ No newline at end of file
... ...
... ... @@ -132,6 +132,53 @@ def teardown_hook_get_appoint_task_id(response):
except Exception as e:
print('写入失败', e)
return task_id
#第一次写入进行中的数据
def teardown_hook_get_task_3_1_total(response):
if response.status_code == 200:
jsondata = json.loads(response.text)
task_total =str(len(jsondata['data']['tasks']))
try:
with open(path + 'config/task_3_total.txt','w+') as f:
f.write(task_total)
print('写入成功,task_total:{}'.format(task_total))
f.close()
except Exception as e:
print('写入失败', e)
return task_total
#第二次写入进行中的数据
def teardown_hook_get_task_3_2_total(response):
if response.status_code == 200:
jsondata = json.loads(response.text)
task_total =str(len(jsondata['data']['tasks']))
try:
with open(path + 'config/task_3_2_total.txt','w+') as f:
f.write(task_total)
print('写入成功,task_total:{}'.format(task_total))
f.close()
except Exception as e:
print('写入失败', e)
return task_total
#第一次获取进行中的数据
def get_task_3_total():
try:
# 保存token到文件
with open(path + "config/task_3_total.txt", 'r') as f:
task_total = f.read()
print('读取成功,task_total:{}'.format(task_total))
except Exception as e:
print('读取失败', e)
return task_total
#第二次获取进行中的数据
def get_task_3_2_total():
try:
# 保存token到文件
with open(path + "config/task_3_2_total.txt", 'r') as f:
task_total = f.read()
print('读取成功,task_total:{}'.format(task_total))
except Exception as e:
print('读取失败', e)
return task_total
#获取指派任务id
def get_appoint_task_id():
try:
... ...
... ... @@ -118,6 +118,7 @@ def get_task_status_3_from_database():
print(err)
db.rollback()
db.close()
# #获取抢单任务单的状态:待确认
def get_task_status_7_from_database():
db = GetConnect()
... ...
... ... @@ -5,8 +5,8 @@ config:
teststeps:
- name: 登录企业平台
api: api/m_api/login_api/auth/pwdLogin_api.yml
variables:
phone: ${ENV(wpftwphone)}
# variables:
# username: ${ENV(wpftwphone)}
teardown_hooks:
- ${teardown_hook_get_Authorization($response)}
varidate:
... ...
... ... @@ -10,7 +10,7 @@ teststeps:
variables:
phone: ${ENV(wpftwphone)}
testcase: testcases/common/COM002_m_login_testcases.yml
#
- name: 引用资源
api: api/m_api/task_resource_api.yml
teardown_hooks:
... ... @@ -22,7 +22,7 @@ teststeps:
- eq:
- content.msg
- ok
#
- name: 保存任务
api: api/m_api/loot/loot_update_true_api.yml
teardown_hooks:
... ...
... ... @@ -7,8 +7,8 @@ teststeps:
testcase: testcases/permission/ques_pf_permission/QX001_pf_permission.yml
- name: 登录系统
variables:
phone: ${ENV(wpftwphone)}
# variables:
# username: ${ENV(wpftwphone)}
testcase: testcases/common/COM002_m_login_testcases.yml
- name: 引用资源
... ...
config:
name: APP端首页-公司悬赏任务
base_url: ${ENV(base_url)}
teststeps:
- name: 用户新增抢单任务-公司重要悬赏
testcase: testcases/common/COM004_loot_update_testcase.yml
- name: 登录系统
testcase: testcases/common/login_testcases.yml
- name: 登录价值系统
testcase: testcases/common/COM001_task_login_testcases.yml
- name: 查看公司悬赏任务
api: api/app_api/task_rewards_api.yml
variables:
id: ${get_loot_task_id()}
varidate:
validate:
- eq:
- content.code
- 0
- eq:
- content.data.tasks.0.id
- $id
- eq:
- content.msg
- 获取成功
\ No newline at end of file
... ...
config:
name: APP端首页-进行中数量统计-待发布状态不统计
base_url: ${ENV(base_url)}
teststeps:
- name: 第一次登录系统
testcase: testcases/common/login_testcases.yml
- name: 第一次登录价值系统
testcase: testcases/common/COM001_task_login_testcases.yml
- name: 第一次查看公司任务(进行中)
api: api/app_api/task_currentTasks_1_api.yml
variables:
task_total1: ${get_task_3_total()}
teardown_hooks:
- ${teardown_hook_get_task_3_1_total($response)}
varidate:
validate:
- eq:
- content.msg
- 获取成功
- name: B用户登录管理后台,新增一个待发布的任务
variables:
username: ${ENV(appphone1)}
testcase: testcases/common/COM007_loot_update_status_1_testcase.yml
#- name: 第二次登录系统
# testcase: testcases/common/login_testcases.yml
#
#- name: 第二次登录价值系统
# testcase: testcases/common/COM001_task_login_testcases.yml
- name: 第二次查看公司任务(进行中)
api: api/app_api/task_currentTasks_2_api.yml
variables:
task_total2: ${get_task_3_2_total()}
teardown_hooks:
- ${teardown_hook_get_task_3_2_total($response)}
varidate:
validate:
- eq:
- content.msg
- 获取成功
- eq:
# - $task_total1
# - $task_total2
\ No newline at end of file
... ...
... ... @@ -3,18 +3,19 @@ config:
base_url: ${ENV(base_url)}
teststeps:
- name: 价值系统-拥有发布任务权限登录价值系统
variables:
phone: ${ENV(appphone)}
testcase: testcases/common/login_testcases.yml
testcase: testcases/common/COM001_task_login_testcases.yml
- name: 获取用户信息
api: api/app_api/user_api/userInfo_api.yml
variables:
permissionTaskPublish: 1
varidate:
validate:
- eq:
- content.data.user.permissionTaskPublish
- 1
- $permissionTaskPublish
- eq:
- content.data.msg
- 获取用户信息
... ...
config:
name: PF002价值系统-无任务管理权限的人员登录系统
base_url: ${ENV(base_url)}
teststeps:
- name: 价值系统-无任务管理权限的人员登录系统
variables:
phone: ${ENV(wtaskphone)}
testcase: testcases/common/login_testcases.yml
- name: 获取用户信息
api: api/app_api/user_api/userInfo_api.yml
variables:
permissionTaskPublish: 0
varidate:
validate:
- eq:
- content.data.user.permissionTaskPublish
- $permissionTaskPublish
- eq:
- content.data.msg
- 获取用户信息
... ...
... ... @@ -14,4 +14,4 @@ testcases:
# testcase: testcases/task/member/member_set_permission_testcases.yml
- name: 测试流程
testcase: testcases/userInfo/PF001.yml
\ No newline at end of file
testcase: testcases/firstpage/FS002.yml
\ No newline at end of file
... ...