From 4768b0fa53043654c1c7139e32223ebe75fa7a30 Mon Sep 17 00:00:00 2001 From: xiao-hesheng Date: Wed, 28 Feb 2024 17:12:09 +0800 Subject: [PATCH] =?UTF-8?q?=E6=96=B0=E5=A2=9E=E8=A7=92=E8=89=B2=E7=AE=A1?= =?UTF-8?q?=E7=90=86=E8=84=9A=E6=9C=AC?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ...\222\350\211\262\345\220\215\347\247\260.py" | 17 +++++------------ report/summary.html | 8 ++++---- 2 files changed, 9 insertions(+), 16 deletions(-) diff --git "a/air_case/b2_herp3_bs/r_e5\347\224\250\346\210\267\347\256\241\347\220\206_\350\247\222\350\211\262\347\256\241\347\220\206_\347\274\226\350\276\221\350\247\222\350\211\262\345\220\215\347\247\260.air/r_e5\347\224\250\346\210\267\347\256\241\347\220\206_\350\247\222\350\211\262\347\256\241\347\220\206_\347\274\226\350\276\221\350\247\222\350\211\262\345\220\215\347\247\260.py" "b/air_case/b2_herp3_bs/r_e5\347\224\250\346\210\267\347\256\241\347\220\206_\350\247\222\350\211\262\347\256\241\347\220\206_\347\274\226\350\276\221\350\247\222\350\211\262\345\220\215\347\247\260.air/r_e5\347\224\250\346\210\267\347\256\241\347\220\206_\350\247\222\350\211\262\347\256\241\347\220\206_\347\274\226\350\276\221\350\247\222\350\211\262\345\220\215\347\247\260.py" index 1d2e0e69..f069810c 100644 --- "a/air_case/b2_herp3_bs/r_e5\347\224\250\346\210\267\347\256\241\347\220\206_\350\247\222\350\211\262\347\256\241\347\220\206_\347\274\226\350\276\221\350\247\222\350\211\262\345\220\215\347\247\260.air/r_e5\347\224\250\346\210\267\347\256\241\347\220\206_\350\247\222\350\211\262\347\256\241\347\220\206_\347\274\226\350\276\221\350\247\222\350\211\262\345\220\215\347\247\260.py" +++ "b/air_case/b2_herp3_bs/r_e5\347\224\250\346\210\267\347\256\241\347\220\206_\350\247\222\350\211\262\347\256\241\347\220\206_\347\274\226\350\276\221\350\247\222\350\211\262\345\220\215\347\247\260.air/r_e5\347\224\250\346\210\267\347\256\241\347\220\206_\350\247\222\350\211\262\347\256\241\347\220\206_\347\274\226\350\276\221\350\247\222\350\211\262\345\220\215\347\247\260.py" @@ -50,7 +50,7 @@ def test1(): print('request_body', request_body) # # # # 发送请求 result = commonFuc().http_post(url, request_body, headers) - print('resultccccccccccccccc', result) + print('resultaaaaaaaaaaaaaaaaaaa', result) # 断言 code = commonFuc().analysis_json('code', result) data = commonFuc().analysis_json('data', result) @@ -58,11 +58,11 @@ def test1(): if code == 0 and len(data) >= 1: for i in data: cname = commonFuc().analysis_json('cname', i) - if cname == '自动化测试': + if cname == '自动化测试'or cname=='自动化测试2': id1 = commonFuc().analysis_json('id', i) break commonFuc().check_text_exist(0, result) - print(id1) + print('id1',id1) #r_e5用户管理_角色管理_编辑角色名称 @@ -74,24 +74,17 @@ def test1(): commonFuc().get_business_data(module, "X-APP-CODE")) # # 请求体 request_body = commonFuc().get_business_data(module, 'payload63_4',id1) - # request_body=str(request_body) - new_request_body = request_body.replace("'", '"') - # new_request_body = new_request_body.replace("None", 'null') - # print(new_request_body) - import json - request_body_json = json.loads(new_request_body) - print('request_body_json',request_body_json) # print('request_body', request_body) # # # # # 发送请求 - result = commonFuc().http_post(url, request_body_json, headers) + result = commonFuc().http_post(url, request_body, headers) print('resultccccccccccccccc', result) # #断言 code = commonFuc().analysis_json('code', result) data = commonFuc().analysis_json('data', result) roleCode="" - if code == 0 and len(data) >= 1: + if code == 0 and data == 1: commonFuc().check_text_exist(0, result) diff --git a/report/summary.html b/report/summary.html index 6269accc..0595baa0 100644 --- a/report/summary.html +++ b/report/summary.html @@ -55,9 +55,9 @@ 1 - 0 + 1 0分2秒 - 0.0% + 100.0% @@ -73,8 +73,8 @@ r_e5用户管理_角色管理_编辑角色名称 - 失败 - 2.798 + 成功 + 2.839 xiaohesheng -- GitLab