作者 dengyuting

add taskrewark

... ... @@ -16,6 +16,7 @@ variables:
title: 'APP提交任务标题'
content: 'APP提交任务内容'
acceptability: 'APP提交验收标准'
isReward: False
teardown_hooks:
- ${sleep(1)}
request:
... ... @@ -56,7 +57,7 @@ request:
serialNo:
title:
content:
isReward:
isReward: $isReward
attribute:
id: 17
name: '项目归属1'
... ...
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
\ No newline at end of file
... ...
config:
name: RED001-保存抢单悬赏任务-悬赏任务列表无数据
base_url: ${ENV(base_url)}
variables:
phone: ${ENV(phone2)}
title: '抢单悬赏任务标题${get_nowtime()}'
content: '抢单悬赏任务内容${get_nowtime()}'
acceptability: '抢单悬赏任务验收标准${get_nowtime()}'
teststeps:
- name: $phone 登录系统
testcase: testcases/common/COM001_task_login_testcases.yml
- name: 保存抢单悬赏任务
variables:
action: 0
type: 0
isReward: True
api: api/app_api/task_api/taskPublish_api.yml
- name: 查看悬赏任务列表
api: api/app_api/task_api/taskrewards_api.yml
validate:
- not_equals:
- content.data.tasks.0.title
- $title
... ...
config:
name: RED002-发布抢单悬赏任务-悬赏任务列表有数据
base_url: ${ENV(base_url)}
variables:
phone: ${ENV(phone2)}
title: '抢单悬赏任务标题${get_nowtime()}'
content: '抢单悬赏任务内容${get_nowtime()}'
acceptability: '抢单悬赏任务验收标准${get_nowtime()}'
teststeps:
- name: $phone 登录系统
testcase: testcases/common/COM001_task_login_testcases.yml
- name: 保存抢单悬赏任务
variables:
action: 1
type: 0
isReward: True
api: api/app_api/task_api/taskPublish_api.yml
- name: 查看悬赏任务列表
api: api/app_api/task_api/taskrewards_api.yml
validate:
- equals:
- content.data.tasks.0.title
- $title
- equals:
- content.data.tasks.0.inBid
- 0
\ No newline at end of file
... ...
config:
name: RED003-抢单悬赏任务被领取-悬赏任务列表无数据
base_url: ${ENV(base_url)}
variables:
title: '抢单悬赏任务标题${get_nowtime()}'
content: '抢单悬赏任务内容${get_nowtime()}'
acceptability: '抢单悬赏任务验收标准${get_nowtime()}'
teststeps:
- name: $phone 登录系统
variables:
phone: ${ENV(phone2)}
testcase: testcases/common/COM001_task_login_testcases.yml
- name: 保存抢单悬赏任务
variables:
action: 1
type: 0
isReward: True
api: api/app_api/task_api/taskPublish_api.yml
- name: 查看悬赏任务列表
api: api/app_api/task_api/taskrewards_api.yml
validate:
- equals:
- content.data.tasks.0.title
- $title
- equals:
- content.data.tasks.0.inBid
- 0
- name: $phone 登录系统
variables:
phone: ${ENV(phone1)}
testcase: testcases/common/COM001_task_login_testcases.yml
- name: 查看抢单任务列表
variables:
action: 0
newest: 1
api: api/app_api/task_api/contendTasks_api.yml
extract:
- tasks_id: content.data.tasks.0.id
validate:
- eq:
- content.data.tasks.0.title
- $title
- name: 领取任务
variables:
action: 0
id: $tasks_id
api: api/app_api/task_api/submitCompete_api.yml
- name: $phone 登录系统
variables:
phone: ${ENV(phone2)}
testcase: testcases/common/COM001_task_login_testcases.yml
- name: 查看悬赏任务列表
api: api/app_api/task_api/taskrewards_api.yml
validate:
- not_equals:
- content.data.tasks.0.title
- $title
\ No newline at end of file
... ...
config:
name: RED004-保存竞标悬赏任务-悬赏任务列表无数据
base_url: ${ENV(base_url)}
variables:
phone: ${ENV(phone2)}
title: '竞标悬赏任务标题${get_nowtime()}'
content: '竞标悬赏任务内容${get_nowtime()}'
acceptability: '竞标悬赏任务验收标准${get_nowtime()}'
teststeps:
- name: $phone 登录系统
testcase: testcases/common/COM001_task_login_testcases.yml
- name: 保存竞标任务
variables:
action: 0
type: 1
bidStartTime: ${get_starttime()}
bidEndTime: ${get_endtime()}
isReward: True
api: api/app_api/task_api/taskPublish_api.yml
- name: 查看悬赏任务列表
api: api/app_api/task_api/taskrewards_api.yml
validate:
- not_equals:
- content.data.tasks.0.title
- $title
\ No newline at end of file
... ...
config:
name: RED005-发布竞标悬赏任务-悬赏任务列表有数据
base_url: ${ENV(base_url)}
variables:
phone: ${ENV(phone2)}
title: '竞标悬赏任务标题${get_nowtime()}'
content: '竞标悬赏任务内容${get_nowtime()}'
acceptability: '竞标悬赏任务验收标准${get_nowtime()}'
teststeps:
- name: $phone 登录系统
testcase: testcases/common/COM001_task_login_testcases.yml
- name: 发布竞标任务
variables:
action: 1
type: 1
bidStartTime: ${get_starttime()}
bidEndTime: ${get_endtime()}
isReward: True
api: api/app_api/task_api/taskPublish_api.yml
- name: 查看悬赏任务列表
api: api/app_api/task_api/taskrewards_api.yml
validate:
- equals:
- content.data.tasks.0.title
- $title
- equals:
- content.data.tasks.0.inBid
- 0
\ No newline at end of file
... ...
config:
name: RED006-竞标悬赏任务参与竞标且未确认-悬赏任务列表有数据,参与竞标状态正确
base_url: ${ENV(base_url)}
variables:
title: '竞标悬赏任务标题${get_nowtime()}'
content: '竞标悬赏任务内容${get_nowtime()}'
acceptability: '竞标悬赏任务验收标准${get_nowtime()}'
teststeps:
- name: $phone 登录系统
variables:
phone: ${ENV(phone2)}
testcase: testcases/common/COM001_task_login_testcases.yml
- name: 发布竞标任务
variables:
action: 1
type: 1
bidStartTime: ${get_starttime()}
bidEndTime: ${get_endtime()}
isReward: True
api: api/app_api/task_api/taskPublish_api.yml
- name: 查看悬赏任务列表
api: api/app_api/task_api/taskrewards_api.yml
validate:
- equals:
- content.data.tasks.0.title
- $title
- equals:
- content.data.tasks.0.inBid
- 0
- name: $phone 登录系统
variables:
phone: ${ENV(phone1)}
testcase: testcases/common/COM001_task_login_testcases.yml
- name: 查看竞标任务列表
variables:
action: 1
newest: 1
api: api/app_api/task_api/contendTasks_api.yml
extract:
- tasks_id: content.data.tasks.0.id
validate:
- eq:
- content.data.tasks.0.title
- $title
- name: 领取竞标任务
variables:
action: 1
id: $tasks_id
api: api/app_api/task_api/submitCompete_api.yml
- name: 查看悬赏任务列表
api: api/app_api/task_api/taskrewards_api.yml
validate:
- equals:
- content.data.tasks.0.title
- $title
- equals:
- content.data.tasks.0.inBid
- 1
- name: $phone 登录系统
variables:
phone: ${ENV(phone2)}
testcase: testcases/common/COM001_task_login_testcases.yml
- name: 查看悬赏任务列表
api: api/app_api/task_api/taskrewards_api.yml
validate:
- equals:
- content.data.tasks.0.title
- $title
- equals:
- content.data.tasks.0.inBid
- 0
\ No newline at end of file
... ...
config:
name: RED007-竞标悬赏任务参与竞标且确认-悬赏任务列表无数据,参与竞标状态正确
base_url: ${ENV(base_url)}
variables:
title: '竞标悬赏任务标题${get_nowtime()}'
content: '竞标悬赏任务内容${get_nowtime()}'
acceptability: '竞标悬赏任务验收标准${get_nowtime()}'
teststeps:
- name: $phone 登录系统
variables:
phone: ${ENV(phone2)}
testcase: testcases/common/COM001_task_login_testcases.yml
- name: 发布竞标任务
variables:
action: 1
type: 1
bidStartTime: ${get_starttime()}
bidEndTime: ${get_endtime()}
isReward: True
api: api/app_api/task_api/taskPublish_api.yml
- name: 查看悬赏任务列表
api: api/app_api/task_api/taskrewards_api.yml
validate:
- equals:
- content.data.tasks.0.title
- $title
- equals:
- content.data.tasks.0.inBid
- 0
- name: $phone 登录系统
variables:
phone: ${ENV(phone1)}
testcase: testcases/common/COM001_task_login_testcases.yml
- name: 查看竞标任务列表
variables:
action: 1
newest: 1
api: api/app_api/task_api/contendTasks_api.yml
extract:
- tasks_id: content.data.tasks.0.id
validate:
- eq:
- content.data.tasks.0.title
- $title
- name: 领取竞标任务
variables:
action: 1
id: $tasks_id
api: api/app_api/task_api/submitCompete_api.yml
- name: 查看悬赏任务列表
api: api/app_api/task_api/taskrewards_api.yml
validate:
- equals:
- content.data.tasks.0.title
- $title
- equals:
- content.data.tasks.0.inBid
- 1
- name: $phone 登录系统
variables:
phone: ${ENV(phone2)}
testcase: testcases/common/COM001_task_login_testcases.yml
- name: 查看悬赏任务列表
api: api/app_api/task_api/taskrewards_api.yml
validate:
- equals:
- content.data.tasks.0.title
- $title
- equals:
- content.data.tasks.0.inBid
- 0
- name: 查看我发布的-待领取
variables:
action: 1
api: api/app_api/task_api/iPublishedTasks_api.yml
validate:
- eq:
- content.data.tasks.0.title
- $title
- eq:
- content.data.tasks.0.id
- $tasks_id
- name: 查看任务详情
variables:
id: $tasks_id
api: api/app_api/task_api/taskDetails_api.yml
extract:
- bidders: content.data.task.bidders.0.uid
validate:
- eq:
- content.msg
- 获取详情成功
- eq:
- content.data.task.title
- $title
- name: 竞标人中标确认
variables:
id: $tasks_id
uid: $bidders
planFinishDate: ${get_endtime()}
api: api/app_api/task_api/bidTask_api.yml
validate:
- eq:
- content.msg
- 中标成功
- name: 查看悬赏任务列表
api: api/app_api/task_api/taskrewards_api.yml
validate:
- not_equals:
- content.data.tasks.0.title
- $title
... ...
... ... @@ -88,4 +88,30 @@ testcases:
testcase: testcases/app/taskStatistics/ME023-taskStatistics-rejectReceiver-iget-bid.yml
- name: ME024-竞标任务被驳回-我领取的、我参与的统计校验
testcase: testcases/app/taskStatistics/ME024-taskStatistics-rejectReceiver-iParticipation-iGet-bid.yml
\ No newline at end of file
testcase: testcases/app/taskStatistics/ME024-taskStatistics-rejectReceiver-iParticipation-iGet-bid.yml
##############################################个人中心数量统计用例结束###################################
##############################################悬赏任务列表用例开始###################################
- name: RED001-保存抢单悬赏任务-悬赏任务列表无数据
testcase: testcases/app/taskrewards/RED001-taskrewards-lootsave.yml
- name: RED002-发布抢单悬赏任务-悬赏任务列表有数据
testcase: testcases/app/taskrewards/RED002-taskrewards-lootpublish.yml
- name: RED003-抢单悬赏任务被领取-悬赏任务列表无数据
testcase: testcases/app/taskrewards/RED003-taskrewards-lootreceive.yml
- name: RED004-保存竞标悬赏任务-悬赏任务列表无数据
testcase: testcases/app/taskrewards/RED004-taskrewards-bidsave.yml
- name: RED005-发布竞标悬赏任务-悬赏任务列表有数据
testcase: testcases/app/taskrewards/RED005-taskrewards-bidpublish.yml
- name: RED006-竞标悬赏任务参与竞标且未确认-悬赏任务列表有数据,参与竞标状态正确
testcase: testcases/app/taskrewards/RED006-taskrewards-bidreceive.yml
- name: RED007-竞标悬赏任务参与竞标且确认-悬赏任务列表无数据,参与竞标状态正确
testcase: testcases/app/taskrewards/RED007-taskrewards-bidVerify.yml
##############################################悬赏任务列表用例结束###################################
\ No newline at end of file
... ...