作者 bianxinhua

add README

@@ -34,6 +34,3 @@ validate: @@ -34,6 +34,3 @@ validate:
34 - eq: 34 - eq:
35 - content.msg 35 - content.msg
36 - 获取成功 36 - 获取成功
37 -# - eq:  
38 -# - $task_total1  
39 -# - $task_total2  
  1 +name: 公司任务(进行中)
  2 +base_url: ${ENV(base_url)}
  3 +verify: False
  4 +variables:
  5 + currtime: ${make_time()}
  6 + uuid: ${make_uuid()}
  7 + access_token: ${get_task_accesstoken()}
  8 + sign: ${make_sign($currtime, $uuid, $access_token)}
  9 +teardown_hooks:
  10 + - ${teardown_hook_get_task_3_2_total($response)}
  11 +request:
  12 + headers:
  13 + Content-Type: application/json;charset=utf-8
  14 + User-Agent: okhttp/3.12.3
  15 + X-MMM-AccessToken: $access_token
  16 + X-MMM-AppName: com.mmm.ability
  17 + X-MMM-AppProject: ability
  18 + X-MMM-DeviceType: '0'
  19 + X-MMM-Sign: $sign
  20 + X-MMM-Timestamp: $currtime
  21 + X-MMM-Uuid: $uuid
  22 + X-MMM-Version: 1.0.0
  23 + json:
  24 + action: 0
  25 + newest: 0
  26 + pageIndex: 0
  27 + pageSize: 20
  28 + method: POST
  29 + url: v1/task/currentTasks
  30 +validate:
  31 + - eq:
  32 + - content.code
  33 + - 0
  34 + - eq:
  35 + - content.msg
  36 + - 获取成功
  37 + - eq:
  38 + - $task_total1
  39 + - $task_total2
1 -eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpc3MiOiJodHRwOlwvXC9zdXBsdXMtYnVzaW5lc3MtYWRtaW4tZ2F0ZXdheS10ZXN0LmZqbWFpbWFpbWFpLmNvbVwvYXV0aFwvcHdkTG9naW4iLCJpYXQiOjE1OTk1NTc0NTEsImV4cCI6MTU5OTU2ODI1MSwibmJmIjoxNTk5NTU3NDUxLCJqdGkiOiI3QU8zdGpRVXpsZFdtcEwyIiwic3ViIjozMjQ4ODE3NjEzODYzOTM2LCJwcnYiOiI4N2UwYWYxZWY5ZmQxNTgxMmZkZ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kav5Tzcw2rhFGptCB9jhmBuVesg1XnJp/YEVvs/+Re5wFIDBPWrH+iWnqn2RZWZSGykpOkL5yRPeHVuDSKnwBBbAdgFITWwaorhijMMxUV+rxNrS7DwMo5bfcEArAAXjYLGJgBe60u5gS4YSk2CSN17XnDR7UY7pA=  
  1 +oLomjQURsdLc5GLZ65cY3GzBiKpPaDPBzc9cXQrhF/NWjMEP+t5AwqFuQMh7MopRpV7dL88+eLH9pO4UkgsDiUBbk4rIRXkZOHXelDUj0NqfHBcvB9tQDjwJHTsca90JXg7owrE69AlJzmNHpOQiBC4llbqqfj3c9S0Q4LulyxE=
1 -3047073807191245824  
  1 +3048401168629236736
1 -3248817613779968  
  1 +3248817613892608
1 -3275893656719616  
  1 +3276055687934208
1 -eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpc3MiOiJodHRwOlwvXC9zdXBsdXMtd29ydGgtd2ViLWdhdGV3YXktdGVzdC5mam1haW1haW1haS5jb21cL2F1dGhcL2xvZ2luIiwiaWF0IjoxNTk5NTU3NDUxLCJleHAiOjE1OTk1NjgyNTEsIm5iZiI6MTU5OTU1NzQ1MSwianRpIjoiZnBhMnZJS0tuVWlrYndTdyIsInN1YiI6MzI0ODgxNzYxMzg2MzkzNiwicHJ2IjoiODdlMGFmMWVmOWZkMTU4MTJmZGVjOTcxNTNhMTRlMGIwNDc1NDZhYSIsImNvbXBhbnlJZCI6MzY2LCJuaWNrbmFtZSI6Ilx1Njc2OFx1NWZkNzE0IiwicGhvbmUiOiIxOTk5MDAwMDAxNCIsInVpZCI6MzI0ODgxNzYxMzg2MzkzNiwiYWRtaW5UeXBlIjoyfQ.123jUWTcy9syl37gvKZ_a5NdvPUKxg28RogIta_gOUg  
  1 +eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpc3MiOiJodHRwOlwvXC9zdXBsdXMtd29ydGgtd2ViLWdhdGV3YXktdGVzdC5mam1haW1haW1haS5jb21cL2F1dGhcL2xvZ2luIiwiaWF0IjoxNTk5NjM2NTY4LCJleHAiOjE1OTk2NDczNjgsIm5iZiI6MTU5OTYzNjU2OCwianRpIjoiMVVrWnJLeXlmdmV1Y0twRyIsInN1YiI6MzI0ODgxNzYxMzg2MzkzNiwicHJ2IjoiODdlMGFmMWVmOWZkMTU4MTJmZGVjOTcxNTNhMTRlMGIwNDc1NDZhYSIsImNvbXBhbnlJZCI6MzY2LCJuaWNrbmFtZSI6Ilx1Njc2OFx1NWZkNzE0IiwicGhvbmUiOiIxOTk5MDAwMDAxNCIsInVpZCI6MzI0ODgxNzYxMzg2MzkzNiwiYWRtaW5UeXBlIjoyfQ.uFsD_IpmZkYZ7g-t5A18l4SgR-M7YnP81toDMqdbemM
1 -JJcmb7MTBTXMxZDWk3aD5Gh3RJfQNHxi  
  1 +t2YH6FmzZPZQQnCniiSFndfRQxA77Fic
1 -vxvm6pua4xa  
  1 +7dugs1atnus
@@ -47,7 +47,12 @@ def get_tomorrow(): @@ -47,7 +47,12 @@ def get_tomorrow():
47 td = datetime.timedelta(days=1) 47 td = datetime.timedelta(days=1)
48 tomorrow = (datetime.datetime.utcnow() + td).strftime("%Y-%m-%dT%H:%M:%SZ") 48 tomorrow = (datetime.datetime.utcnow() + td).strftime("%Y-%m-%dT%H:%M:%SZ")
49 return tomorrow 49 return tomorrow
  50 +
50 def get_today1(): 51 def get_today1():
51 td = datetime.timedelta(days=0) 52 td = datetime.timedelta(days=0)
52 tomorrow = (datetime.datetime.utcnow() + td).strftime("%Y-%m-%dT%H:%M:%SZ") 53 tomorrow = (datetime.datetime.utcnow() + td).strftime("%Y-%m-%dT%H:%M:%SZ")
53 return tomorrow 54 return tomorrow
  55 +
  56 +def add(x, y):
  57 + return str(int(x)+y)
  58 +
1 # @Time :2019/11/26 11:25 1 # @Time :2019/11/26 11:25
2 # @Author :dengyuting 2 # @Author :dengyuting
3 # @File :db_func.py 3 # @File :db_func.py
4 -import pymysql 4 +import psycopg2
5 5
6 -db_config ={"host": "115.29.205.99",  
7 - "port": 3306,  
8 - "user": "shiqiurong",  
9 - "password": "QGaBlwXT123dfvc7ip",  
10 - "db": "ability_display",  
11 - "charset": 'utf8'} 6 +def GetConnect():
  7 + conn = False
  8 + try:
  9 + conn = psycopg2.connect(database="mmmworthtest",
  10 + user="bianxinhua",
  11 + password="bianxinhua_123",
  12 + host="114.55.200.59",
  13 + port="31543")
  14 + except Exception as err:
  15 + print("连接数据库失败,%s" % err)
  16 + return conn
12 17
13 def setup_hook_clean_db(): 18 def setup_hook_clean_db():
14 """ 19 """
15 初始化时清理数据库中的历史数据 20 初始化时清理数据库中的历史数据
16 :return: 21 :return:
17 """ 22 """
18 - db = pymysql.connect(**db_config) 23 + db = GetConnect()
19 cursor = db.cursor() 24 cursor = db.cursor()
20 try: 25 try:
21 #删除评论 26 #删除评论
22 cursor.execute("delete d from comment d LEFT JOIN comment a on d.id=a.cid LEFT JOIN question b on a.id = b.id LEFT JOIN departments c on b.relevantDepartmentId =c.id where c.company_id =42 and c.enabled = 1") 27 cursor.execute("delete d from comment d LEFT JOIN comment a on d.id=a.cid LEFT JOIN question b on a.id = b.id LEFT JOIN departments c on b.relevantDepartmentId =c.id where c.company_id =42 and c.enabled = 1")
23 - cursor.execute("delete d from comment d LEFT JOIN solution a on d.id=a.id LEFT JOIN question b on a.qid = b.id LEFT JOIN departments c on b.relevantDepartmentId =c.id where c.company_id =42 and c.enabled = 1")  
24 - cursor.execute("delete d from comment d LEFT JOIN question a on d.id =a.id LEFT JOIN departments b on a.relevantDepartmentId =b.id where b.company_id =42 and b.enabled = 1")  
25 - #删除解决方案  
26 - cursor.execute("delete a from solution a LEFT JOIN question b on a.qid=b.id LEFT JOIN departments c on b.relevantDepartmentId=c.id where c.company_id =42 and c.enabled = 1")  
27 - #删除问题  
28 - cursor.execute("delete a from question a LEFT JOIN departments b on a.relevantDepartmentId=b.id where b.company_id =42 and b.enabled = 1")  
29 - #删除用户消息表  
30 - cursor.execute("delete a from user_msg a LEFT JOIN user_info b on a.uid=b.uid where b.company_id=42")  
31 - # 删除用户星数变动表  
32 - cursor.execute("delete a from user_score_change a LEFT JOIN user_info b on a.uid=b.uid where b.company_id=42")  
33 - # 删除用户解决申请表  
34 - cursor.execute("delete from user_question_solve where uid in (select uid from user_info where company_id=42)")  
35 - # 删除质疑表  
36 - cursor.execute("delete from doubt where company_id=42")  
37 - # 删除额外加分表  
38 - cursor.execute("delete from bonus_point where company_id=42")  
39 - # 删除公告表  
40 - cursor.execute("delete from bulletin where company_id=42")  
41 - # 删除表彰管理表  
42 - cursor.execute("delete from commend where company_id=42")  
43 - # 删除用户消息表  
44 - cursor.execute("delete from user_msg where uid in (select uid from user_info where company_id=42)")  
45 - # 删除用户同感表  
46 - cursor.execute("delete from user_sympathy where uid in (select uid from user_info where company_id=42)")  
47 - # 删除问题标记表  
48 - cursor.execute("delete from question_marks where uid in (select uid from user_info where company_id=42)")  
49 - # 删除问题标记结果表  
50 - cursor.execute("delete from question_marks_result where uid in (select uid from user_info where company_id=42)")  
51 - # 删除用户提交表  
52 - cursor.execute("delete from user_commit where uid in (select uid from user_info where company_id=42)")  
53 - # 删除问题提交表  
54 - cursor.execute("delete a from question_commit a LEFT JOIN user_commit b on a.commitId =b.id LEFT JOIN user_info c on b.uid =c.uid where c.company_id =42") 28 + '''
  29 + --任务列表
  30 + DELETE from tasks t where t.company_id =366;
  31 +-- 获得素币
  32 +DELETE FROM su_money_transaction_records smrt
  33 +WHERE ( smrt.employee @> '{"uid":3248817613863936 }' or smrt.employee @> '{"uid":3247366011913216 }' or smrt.employee @> '{"uid":3248817613835264 }'or smrt.employee @> '{"uid":3248817613892608 }');
  34 +--发送推送
  35 +DELETE FROM sent_notifications sn
  36 +WHERE ( sn.receiver @> '{"uid":3248817613863936 }' OR sn.receiver @> '{"uid":3247366011913216 }' OR sn.receiver @> '{"uid":3248817613835264 }' OR sn.receiver @> '{"uid":3248817613892608 }' );
  37 +--任务接收者
  38 +DELETE FROM rob_infos ri WHERE ri.task_id IN ( SELECT ID FROM tasks T WHERE T.company_id = 366 );
  39 +--驳回任务
  40 +DELETE FROM reject_task_records rtr WHERE rtr.task_id IN ( SELECT ID FROM tasks T WHERE T.company_id = 366 );
  41 +-- --关闭任务
  42 +DELETE FROM off_task_records otr WHERE otr.task_id IN ( SELECT ID FROM tasks T WHERE T.company_id = 366 );
  43 +--通知
  44 +DELETE FROM notifications n WHERE n.external_resource IN ( SELECT ID FROM tasks T WHERE T.company_id = 366 );
  45 +--参与竞标
  46 +DELETE FROM bid_infos bi WHERE bi.task_id IN ( SELECT ID FROM tasks T WHERE T.company_id = 366 );
  47 +--中标
  48 +DELETE FROM bidder_infos bin WHERE bin.task_id IN ( SELECT ID FROM tasks T WHERE T.company_id = 366 );
  49 + '''
55 db.commit() 50 db.commit()
56 print("delete OK") 51 print("delete OK")
57 except: 52 except:
58 # 发生错误时回滚 53 # 发生错误时回滚
59 db.rollback() 54 db.rollback()
60 db.close() 55 db.close()
61 -  
62 -def get_solveid(qid):  
63 - #根据问题id,查询相应的解决申请表id  
64 - db = pymysql.connect(**db_config)  
65 - cursor = db.cursor()  
66 - try:  
67 - cursor.execute('select id from user_question_solve where qid = %s',qid)  
68 - result = cursor.fetchone()  
69 - id = result[0]  
70 - return id  
71 - except:  
72 - # 发生错误时回滚  
73 - db.rollback()  
74 - db.close()  
@@ -9,11 +9,9 @@ teststeps: @@ -9,11 +9,9 @@ teststeps:
9 9
10 - name: 第一次登录价值系统 10 - name: 第一次登录价值系统
11 testcase: testcases/common/COM001_task_login_testcases.yml 11 testcase: testcases/common/COM001_task_login_testcases.yml
12 - 12 +#
13 - name: 第一次查看公司任务(进行中) 13 - name: 第一次查看公司任务(进行中)
14 api: api/app_api/task_currentTasks_1_api.yml 14 api: api/app_api/task_currentTasks_1_api.yml
15 - variables:  
16 - task_total1: ${get_task_3_total()}  
17 teardown_hooks: 15 teardown_hooks:
18 - ${teardown_hook_get_task_3_1_total($response)} 16 - ${teardown_hook_get_task_3_1_total($response)}
19 varidate: 17 varidate:
@@ -21,22 +19,15 @@ teststeps: @@ -21,22 +19,15 @@ teststeps:
21 - eq: 19 - eq:
22 - content.msg 20 - content.msg
23 - 获取成功 21 - 获取成功
24 - 22 +#
25 - name: B用户登录管理后台,新增一个待发布的任务 23 - name: B用户登录管理后台,新增一个待发布的任务
26 variables: 24 variables:
27 username: ${ENV(appphone1)} 25 username: ${ENV(appphone1)}
28 testcase: testcases/common/COM007_loot_update_status_1_testcase.yml 26 testcase: testcases/common/COM007_loot_update_status_1_testcase.yml
29 27
30 -#- name: 第二次登录系统  
31 -# testcase: testcases/common/login_testcases.yml  
32 -#  
33 -#- name: 第二次登录价值系统  
34 -# testcase: testcases/common/COM001_task_login_testcases.yml  
35 28
36 - name: 第二次查看公司任务(进行中) 29 - name: 第二次查看公司任务(进行中)
37 api: api/app_api/task_currentTasks_2_api.yml 30 api: api/app_api/task_currentTasks_2_api.yml
38 - variables:  
39 - task_total2: ${get_task_3_2_total()}  
40 teardown_hooks: 31 teardown_hooks:
41 - ${teardown_hook_get_task_3_2_total($response)} 32 - ${teardown_hook_get_task_3_2_total($response)}
42 varidate: 33 varidate:
@@ -44,6 +35,18 @@ teststeps: @@ -44,6 +35,18 @@ teststeps:
44 - eq: 35 - eq:
45 - content.msg 36 - content.msg
46 - 获取成功 37 - 获取成功
  38 +
  39 +
  40 +- name: 第三次查看公司任务(进行中)
  41 + api: api/app_api/task_currentTasks_3_api.yml
  42 + variables:
  43 + task_total1: ${get_task_3_total()}
  44 + task_total2: ${get_task_3_2_total()}
  45 + varidate:
  46 + validate:
  47 + - eq:
  48 + - content.msg
  49 + - 获取成功
47 - eq: 50 - eq:
48 -# - $task_total1  
49 -# - $task_total2  
  51 + - $task_total1
  52 + - $task_total2
  1 +config:
  2 + name: APP端首页-进行中数量统计-已发布,待领取状态不统计
  3 + base_url: ${ENV(base_url)}
  4 +
  5 +teststeps:
  6 +
  7 +- name: 第一次登录系统
  8 + testcase: testcases/common/login_testcases.yml
  9 +
  10 +- name: 第一次登录价值系统
  11 + testcase: testcases/common/COM001_task_login_testcases.yml
  12 +#
  13 +- name: 第一次查看公司任务(进行中)
  14 + api: api/app_api/task_currentTasks_1_api.yml
  15 + teardown_hooks:
  16 + - ${teardown_hook_get_task_3_1_total($response)}
  17 + varidate:
  18 + validate:
  19 + - eq:
  20 + - content.msg
  21 + - 获取成功
  22 +#
  23 +- name: B用户登录管理后台,新增一个已发布,待领取的任务
  24 + variables:
  25 + username: ${ENV(appphone1)}
  26 + testcase: testcases/common/COM008_loot_open_status_2_testcase.yml
  27 +
  28 +
  29 +- name: 第二次查看公司任务(进行中)
  30 + api: api/app_api/task_currentTasks_2_api.yml
  31 + teardown_hooks:
  32 + - ${teardown_hook_get_task_3_2_total($response)}
  33 + varidate:
  34 + validate:
  35 + - eq:
  36 + - content.msg
  37 + - 获取成功
  38 +
  39 +- name: 第三次查看公司任务(进行中)
  40 + api: api/app_api/task_currentTasks_3_api.yml
  41 + variables:
  42 + task_total1: ${get_task_3_total()}
  43 + task_total2: ${get_task_3_2_total()}
  44 + varidate:
  45 + validate:
  46 + - eq:
  47 + - content.msg
  48 + - 获取成功
  49 + - eq:
  50 + - $task_total1
  51 + - $task_total2
  1 +config:
  2 + name: APP端首页-进行中数量统计-进行中状态统计
  3 + base_url: ${ENV(base_url)}
  4 +
  5 +teststeps:
  6 +
  7 +- name: 第一次登录系统
  8 + testcase: testcases/common/login_testcases.yml
  9 +
  10 +- name: 第一次登录价值系统
  11 + testcase: testcases/common/COM001_task_login_testcases.yml
  12 +##
  13 +- name: 第一次查看公司任务(进行中)
  14 + api: api/app_api/task_currentTasks_1_api.yml
  15 + teardown_hooks:
  16 + - ${teardown_hook_get_task_3_1_total($response)}
  17 + varidate:
  18 + validate:
  19 + - eq:
  20 + - content.msg
  21 + - 获取成功
  22 +#
  23 +- name: B用户登录管理后台,新增一个进行中的任务
  24 + variables:
  25 + username: ${ENV(appphone1)}
  26 + testcase: testcases/common/COM010_loot_open_status_3_testcase.yml
  27 +##
  28 +- name: 第二次查看公司任务(进行中)
  29 + api: api/app_api/task_currentTasks_2_api.yml
  30 + teardown_hooks:
  31 + - ${teardown_hook_get_task_3_2_total($response)}
  32 + varidate:
  33 + validate:
  34 + - eq:
  35 + - content.msg
  36 + - 获取成功
  37 +
  38 +- name: 第三次查看公司任务(进行中)
  39 + api: api/app_api/task_currentTasks_3_api.yml
  40 + variables:
  41 + task_total: ${get_task_3_total()}
  42 + task_total1: ${add($task_total,1)}
  43 + task_total2: ${get_task_3_2_total()}
  44 + varidate:
  45 + validate:
  46 + - eq:
  47 + - content.msg
  48 + - 获取成功
  49 + - eq:
  50 + - $task_total1
  51 + - $task_total2
  1 +config:
  2 + name: APP端首页-进行中数量统计-已完成,待验收状态统计
  3 + base_url: ${ENV(base_url)}
  4 +
  5 +teststeps:
  6 +
  7 +- name: 第一次登录系统
  8 + testcase: testcases/common/login_testcases.yml
  9 +
  10 +- name: 第一次登录价值系统
  11 + testcase: testcases/common/COM001_task_login_testcases.yml
  12 +##
  13 +- name: 第一次查看公司任务(进行中)
  14 + api: api/app_api/task_currentTasks_1_api.yml
  15 + teardown_hooks:
  16 + - ${teardown_hook_get_task_3_1_total($response)}
  17 + varidate:
  18 + validate:
  19 + - eq:
  20 + - content.msg
  21 + - 获取成功
  22 +#
  23 +- name: B用户登录管理后台,新增一个已完成,待验收的任务
  24 + variables:
  25 + username: ${ENV(appphone1)}
  26 + testcase: testcases/common/COM011_loot_open_status_4_testcase.yml
  27 +##
  28 +- name: 第二次查看公司任务(进行中)
  29 + api: api/app_api/task_currentTasks_2_api.yml
  30 + teardown_hooks:
  31 + - ${teardown_hook_get_task_3_2_total($response)}
  32 + varidate:
  33 + validate:
  34 + - eq:
  35 + - content.msg
  36 + - 获取成功
  37 +
  38 +- name: 第三次查看公司任务(进行中)
  39 + api: api/app_api/task_currentTasks_3_api.yml
  40 + variables:
  41 + task_total1: ${get_task_3_total()}
  42 + task_total2: ${get_task_3_2_total()}
  43 + varidate:
  44 + validate:
  45 + - eq:
  46 + - content.msg
  47 + - 获取成功
  48 + - eq:
  49 + - $task_total1
  50 + - $task_total2
  1 +config:
  2 + name: APP端首页-进行中数量统计-已完成状态统计
  3 + base_url: ${ENV(base_url)}
  4 +
  5 +teststeps:
  6 +
  7 +- name: 第一次登录系统
  8 + testcase: testcases/common/login_testcases.yml
  9 +
  10 +- name: 第一次登录价值系统
  11 + testcase: testcases/common/COM001_task_login_testcases.yml
  12 +##
  13 +- name: 第一次查看公司任务(进行中)
  14 + api: api/app_api/task_currentTasks_1_api.yml
  15 + teardown_hooks:
  16 + - ${teardown_hook_get_task_3_1_total($response)}
  17 + varidate:
  18 + validate:
  19 + - eq:
  20 + - content.msg
  21 + - 获取成功
  22 +#
  23 +- name: B用户登录管理后台,新增一个已完成的任务
  24 + variables:
  25 + username: ${ENV(appphone1)}
  26 + testcase: testcases/common/COM012_loot_open_status_5_testcase.yml
  27 +##
  28 +- name: 第二次查看公司任务(进行中)
  29 + api: api/app_api/task_currentTasks_2_api.yml
  30 + teardown_hooks:
  31 + - ${teardown_hook_get_task_3_2_total($response)}
  32 + varidate:
  33 + validate:
  34 + - eq:
  35 + - content.msg
  36 + - 获取成功
  37 +
  38 +- name: 第三次查看公司任务(进行中)
  39 + api: api/app_api/task_currentTasks_3_api.yml
  40 + variables:
  41 + task_total1: ${get_task_3_total()}
  42 + task_total2: ${get_task_3_2_total()}
  43 + varidate:
  44 + validate:
  45 + - eq:
  46 + - content.msg
  47 + - 获取成功
  48 + - eq:
  49 + - $task_total1
  50 + - $task_total2
  1 +config:
  2 + name: APP端首页-进行中数量统计-已关闭状态统计
  3 + base_url: ${ENV(base_url)}
  4 +
  5 +teststeps:
  6 +
  7 +- name: 第一次登录系统
  8 + testcase: testcases/common/login_testcases.yml
  9 +
  10 +- name: 第一次登录价值系统
  11 + testcase: testcases/common/COM001_task_login_testcases.yml
  12 +##
  13 +- name: 第一次查看公司任务(进行中)
  14 + api: api/app_api/task_currentTasks_1_api.yml
  15 + teardown_hooks:
  16 + - ${teardown_hook_get_task_3_1_total($response)}
  17 + varidate:
  18 + validate:
  19 + - eq:
  20 + - content.msg
  21 + - 获取成功
  22 +#
  23 +- name: B用户登录管理后台,新增一个已关闭的任务
  24 + variables:
  25 + username: ${ENV(appphone1)}
  26 + testcase: testcases/common/COM013_loot_open_status_6_testcase.yml
  27 +##
  28 +- name: 第二次查看公司任务(进行中)
  29 + api: api/app_api/task_currentTasks_2_api.yml
  30 + teardown_hooks:
  31 + - ${teardown_hook_get_task_3_2_total($response)}
  32 + varidate:
  33 + validate:
  34 + - eq:
  35 + - content.msg
  36 + - 获取成功
  37 +
  38 +- name: 第三次查看公司任务(进行中)
  39 + api: api/app_api/task_currentTasks_3_api.yml
  40 + variables:
  41 + task_total1: ${get_task_3_total()}
  42 + task_total2: ${get_task_3_2_total()}
  43 + varidate:
  44 + validate:
  45 + - eq:
  46 + - content.msg
  47 + - 获取成功
  48 + - eq:
  49 + - $task_total1
  50 + - $task_total2
  1 +config:
  2 + name: APP端首页-进行中数量统计-已领取,待确认状态统计
  3 + base_url: ${ENV(base_url)}
  4 +
  5 +teststeps:
  6 +
  7 +- name: 第一次登录系统
  8 + testcase: testcases/common/login_testcases.yml
  9 +
  10 +- name: 第一次登录价值系统
  11 + testcase: testcases/common/COM001_task_login_testcases.yml
  12 +##
  13 +- name: 第一次查看公司任务(进行中)
  14 + api: api/app_api/task_currentTasks_1_api.yml
  15 + teardown_hooks:
  16 + - ${teardown_hook_get_task_3_1_total($response)}
  17 + varidate:
  18 + validate:
  19 + - eq:
  20 + - content.msg
  21 + - 获取成功
  22 +#
  23 +- name: B用户登录管理后台,新增一个已领取,待确认的任务
  24 + variables:
  25 + username: ${ENV(appphone1)}
  26 + testcase: testcases/common/COM009_loot_open_status_7_testcase.yml
  27 +##
  28 +- name: 第二次查看公司任务(进行中)
  29 + api: api/app_api/task_currentTasks_2_api.yml
  30 + teardown_hooks:
  31 + - ${teardown_hook_get_task_3_2_total($response)}
  32 + varidate:
  33 + validate:
  34 + - eq:
  35 + - content.msg
  36 + - 获取成功
  37 +
  38 +- name: 第三次查看公司任务(进行中)
  39 + api: api/app_api/task_currentTasks_3_api.yml
  40 + variables:
  41 + task_total1: ${get_task_3_total()}
  42 + task_total2: ${get_task_3_2_total()}
  43 + varidate:
  44 + validate:
  45 + - eq:
  46 + - content.msg
  47 + - 获取成功
  48 + - eq:
  49 + - $task_total1
  50 + - $task_total2
@@ -2,10 +2,6 @@ config: @@ -2,10 +2,6 @@ config:
2 name: start_testcases 2 name: start_testcases
3 #清理数据 3 #清理数据
4 setup_hooks: 4 setup_hooks:
5 - - ${setup_hook_clean_db()}  
6 -  
7 -#teststeps:  
8 -#- name: start_testcases  
9 -# api: api/app_api/login_api/auth/8_gettimestamp_api.yml  
10 -  
11 -E:\mmm_auto\ability_api\testcases  
  5 + - ${setup_hook_clean_db(214)}
  6 + teardown_hooks:
  7 + - ${sleep(2)}
@@ -4,14 +4,14 @@ config: @@ -4,14 +4,14 @@ config:
4 4
5 testcases: 5 testcases:
6 6
7 -#- name: start....初始化数据库  
8 -# testcase: testcases/start_testcases.yml 7 +- name: start....初始化数据库
  8 + testcase: testcases/start_testcases.yml
9 9
10 -#- name: member_list 成员管理搜索  
11 -# testcase: testcases/task/member/member_list_testcases.yml 10 +- name: member_list 成员管理搜索
  11 + testcase: testcases/task/member/member_list_testcases.yml
12 12
13 -#- name: member_set_permission 成员管理设置权限  
14 -# testcase: testcases/task/member/member_set_permission_testcases.yml 13 +- name: member_set_permission 成员管理设置权限
  14 + testcase: testcases/task/member/member_set_permission_testcases.yml
15 15
16 - name: 测试流程 16 - name: 测试流程
17 - testcase: testcases/firstpage/FS002.yml  
  17 + testcase: testcases/firstpage/FS008.yml