diff --git a/.DS_Store b/.DS_Store index a62dfd2..38d0b1d 100755 Binary files a/.DS_Store and b/.DS_Store differ diff --git a/Interface/__pycache__/testFengzhuang.cpython-38.pyc b/Interface/__pycache__/testFengzhuang.cpython-38.pyc index 8ce505d..9b22a01 100644 Binary files a/Interface/__pycache__/testFengzhuang.cpython-38.pyc and b/Interface/__pycache__/testFengzhuang.cpython-38.pyc differ diff --git a/Interface/dubbo_feng.py b/Interface/dubbo_feng.py index 75fa4f8..85da0a4 100755 --- a/Interface/dubbo_feng.py +++ b/Interface/dubbo_feng.py @@ -5,7 +5,7 @@ """ from pyhessian.client import HessianProxy from pyhessian import protocol -from Public.log import LOG, logger +from public.log import LOG, logger @logger('dubbo接口') diff --git a/Interface/testFengzhuang.py b/Interface/testFengzhuang.py index 901eff4..44fc4a5 100755 --- a/Interface/testFengzhuang.py +++ b/Interface/testFengzhuang.py @@ -3,7 +3,7 @@ # @Author : lileilei # @Site : # @File : testFengzhuang.py -from Public.test_requests import requ +from public.test_requests import requ class TestApi(object): diff --git a/Interface/test_requests.py b/Interface/test_requests.py index af8a606..ad824f0 100755 --- a/Interface/test_requests.py +++ b/Interface/test_requests.py @@ -1 +1 @@ -# -*- coding: utf-8 -*- # @Author : leizi import requests, json from Public.log import LOG, logger @logger('requests封装') class requ(): def __init__(self): self.headers = { "User-Agent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10.10; rv:51.0) Gecko/20100101 Firefox/51.0"} def get(self, url): # get消息 try: r = requests.get(url, headers=self.headers) r.encoding = 'UTF-8' json_response = json.loads(r.text) return json_response except Exception as e: LOG.info('get请求出错,出错原因:%s' % e) print('get请求出错,出错原因:%s' % e) return {} def post(self, url, params): # post消息 data = json.dumps(params) try: r = requests.post(url, params=params, headers=self.headers) json_response = json.loads(r.text) return json_response except Exception as e: LOG.info('post请求出错,出错原因:%s' % e) print('post请求出错,原因:%s' % e) def delfile(self, url, params): # 删除的请求 try: del_word = requests.delete(url, params, headers=self.headers) json_response = json.loads(del_word.text) return json_response except Exception as e: LOG.info('del请求出错,出错原因:%s' % e) print('del请求出错,原因:%s' % e) return {} def putfile(self, url, params): # put请求 try: data = json.dumps(params) me = requests.put(url, data) json_response = json.loads(me.text) return json_response except Exception as e: LOG.info('put请求出错,出错原因:%s' % e) print('put请求出错,原因:%s' % e) return json_response \ No newline at end of file +# -*- coding: utf-8 -*- # @Author : leizi import requests, json from public.log import LOG, logger @logger('requests封装') class requ(): def __init__(self): self.headers = { "User-Agent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10.10; rv:51.0) Gecko/20100101 Firefox/51.0"} def get(self, url): # get消息 try: r = requests.get(url, headers=self.headers) r.encoding = 'UTF-8' json_response = json.loads(r.text) return json_response except Exception as e: LOG.info('get请求出错,出错原因:%s' % e) print('get请求出错,出错原因:%s' % e) return {} def post(self, url, params): # post消息 data = json.dumps(params) try: r = requests.post(url, params=params, headers=self.headers) json_response = json.loads(r.text) return json_response except Exception as e: LOG.info('post请求出错,出错原因:%s' % e) print('post请求出错,原因:%s' % e) def delfile(self, url, params): # 删除的请求 try: del_word = requests.delete(url, params, headers=self.headers) json_response = json.loads(del_word.text) return json_response except Exception as e: LOG.info('del请求出错,出错原因:%s' % e) print('del请求出错,原因:%s' % e) return {} def putfile(self, url, params): # put请求 try: data = json.dumps(params) me = requests.put(url, data) json_response = json.loads(me.text) return json_response except Exception as e: LOG.info('put请求出错,出错原因:%s' % e) print('put请求出错,原因:%s' % e) return json_response \ No newline at end of file diff --git a/Public/__pycache__/BSTestRunner.cpython-38.pyc b/Public/__pycache__/BSTestRunner.cpython-38.pyc index 5f69e68..ad970fb 100644 Binary files a/Public/__pycache__/BSTestRunner.cpython-38.pyc and b/Public/__pycache__/BSTestRunner.cpython-38.pyc differ diff --git a/Public/__pycache__/emmail.cpython-38.pyc b/Public/__pycache__/emmail.cpython-38.pyc new file mode 100644 index 0000000..17d3c38 Binary files /dev/null and b/Public/__pycache__/emmail.cpython-38.pyc differ diff --git a/Public/__pycache__/get_excel.cpython-38.pyc b/Public/__pycache__/get_excel.cpython-38.pyc index bc27902..60b97fb 100644 Binary files a/Public/__pycache__/get_excel.cpython-38.pyc and b/Public/__pycache__/get_excel.cpython-38.pyc differ diff --git a/Public/__pycache__/log.cpython-38.pyc b/Public/__pycache__/log.cpython-38.pyc index a60351a..42472da 100644 Binary files a/Public/__pycache__/log.cpython-38.pyc and b/Public/__pycache__/log.cpython-38.pyc differ diff --git a/Public/__pycache__/panduan.cpython-38.pyc b/Public/__pycache__/panduan.cpython-38.pyc index 8b495e0..e9b891a 100644 Binary files a/Public/__pycache__/panduan.cpython-38.pyc and b/Public/__pycache__/panduan.cpython-38.pyc differ diff --git a/Public/__pycache__/pyreport_excel.cpython-38.pyc b/Public/__pycache__/pyreport_excel.cpython-38.pyc new file mode 100644 index 0000000..87fcfa8 Binary files /dev/null and b/Public/__pycache__/pyreport_excel.cpython-38.pyc differ diff --git a/Public/__pycache__/test_requests.cpython-38.pyc b/Public/__pycache__/test_requests.cpython-38.pyc index c7e0a5b..3113ed0 100644 Binary files a/Public/__pycache__/test_requests.cpython-38.pyc and b/Public/__pycache__/test_requests.cpython-38.pyc differ diff --git a/Public/create_report.py b/Public/create_report.py index 3ce4a54..6f3093d 100755 --- a/Public/create_report.py +++ b/Public/create_report.py @@ -4,7 +4,7 @@ @file: create_report.py @time: 2017/8/3 12:27 """ -from Public.log import LOG, logger +from public.log import LOG, logger @logger('保存测试结果') diff --git a/Public/get_excel.py b/Public/get_excel.py index 219fc3d..beb76be 100755 --- a/Public/get_excel.py +++ b/Public/get_excel.py @@ -3,7 +3,7 @@ # @Author : lileilei # @File : get_excel.py import xlrd, os -from Public.log import LOG, logger +from public.log import LOG, logger @logger('解析测试用例文件') @@ -42,8 +42,8 @@ def makedata(): make_data = [] for i in range(len(listid)): make_data.append({'url': listurl[i], 'key': listkey[i], - 'coneent': listconeent[i], 'fangshi': listmethod[i], - 'qiwang': listassert[i], + 'coneent': listconeent[i], 'method': listmethod[i], + 'assertconnect': listassert[i], 'id': listid[i]}, ) i += 1 diff --git a/Public/log.py b/Public/log.py index cda227c..66f999a 100755 --- a/Public/log.py +++ b/Public/log.py @@ -15,13 +15,13 @@ if not os.path.exists(LOG_DIR): file_stream = True -def get_logger(name='jiekou', file_log=file_stream, level=''): +def get_logger(name='interface_case_run', file_log=file_stream, level=''): """ get logger Factory function """ logbook.set_datetime_format('local') ColorizedStderrHandler(bubble=False, level=level).push_thread() logbook.TimedRotatingFileHandler( os.path.join(LOG_DIR, '%s.log' % name), - date_format='%Y-%m-%d-%H', bubble=True, encoding='utf-8').push_thread() + date_format='%Y_%m_%d_%H', bubble=True, encoding='utf-8').push_thread() return logbook.Logger(name) diff --git a/Public/panduan.py b/Public/panduan.py index dea8af7..c88e44e 100755 --- a/Public/panduan.py +++ b/Public/panduan.py @@ -1,7 +1,7 @@ # -*- coding: utf-8 -*- # @Date : 2017-08-02 21:54:08 # @Author : lileilei -from Public.fengzhuang_dict import res +from public.fengzhuang_dict import res from .log import LOG, logger diff --git a/README.md b/README.md index 4cc69f1..9ea4f5e 100755 --- a/README.md +++ b/README.md @@ -18,8 +18,9 @@ ### 4.Public 展示测试报告相关的脚本,这里可以自己封装,也可以使用现成的,我这里是基于我自己封装的,最后生成的测试报告更加易懂,出错可以尽快排查相关原因 ### 5.report 存放测试报告, ### 6.run_excel_re.py/run_html.py 主运行文件。运行后可以生成相应的测试报告 +### 7.run_new新版执行方式,重写了unittest方法,利用ddt驱动,生成漂亮的测试报告 ## -## 欢迎大家关注我的公众号 +## 除了在github的开源项目的分享,我也运营了自己的公众号,欢迎大家关注我的公众号  ## 产生的html测试报告如下  diff --git a/history/2022_04_22_21_06_05.txt b/history/2022_04_22_21_06_05.txt new file mode 100644 index 0000000..3ad8fe8 --- /dev/null +++ b/history/2022_04_22_21_06_05.txt @@ -0,0 +1 @@ +2_0_0 \ No newline at end of file diff --git a/history/2022_04_22_21_22_01.txt b/history/2022_04_22_21_22_01.txt new file mode 100644 index 0000000..3ad8fe8 --- /dev/null +++ b/history/2022_04_22_21_22_01.txt @@ -0,0 +1 @@ +2_0_0 \ No newline at end of file diff --git a/history/2022_04_22_21_29_08.txt b/history/2022_04_22_21_29_08.txt new file mode 100644 index 0000000..3ad8fe8 --- /dev/null +++ b/history/2022_04_22_21_29_08.txt @@ -0,0 +1 @@ +2_0_0 \ No newline at end of file diff --git a/history/2022_04_22_21_32_40.txt b/history/2022_04_22_21_32_40.txt new file mode 100644 index 0000000..3ad8fe8 --- /dev/null +++ b/history/2022_04_22_21_32_40.txt @@ -0,0 +1 @@ +2_0_0 \ No newline at end of file diff --git a/history/2023_02_19_18_06_29.txt b/history/2023_02_19_18_06_29.txt new file mode 100644 index 0000000..3ad8fe8 --- /dev/null +++ b/history/2023_02_19_18_06_29.txt @@ -0,0 +1 @@ +2_0_0 \ No newline at end of file diff --git a/history/2023_02_19_18_08_39.txt b/history/2023_02_19_18_08_39.txt new file mode 100644 index 0000000..3ad8fe8 --- /dev/null +++ b/history/2023_02_19_18_08_39.txt @@ -0,0 +1 @@ +2_0_0 \ No newline at end of file diff --git a/history/2023_02_19_18_10_30.txt b/history/2023_02_19_18_10_30.txt new file mode 100644 index 0000000..3ad8fe8 --- /dev/null +++ b/history/2023_02_19_18_10_30.txt @@ -0,0 +1 @@ +2_0_0 \ No newline at end of file diff --git a/history/2023_02_19_18_10_47.txt b/history/2023_02_19_18_10_47.txt new file mode 100644 index 0000000..3ad8fe8 --- /dev/null +++ b/history/2023_02_19_18_10_47.txt @@ -0,0 +1 @@ +2_0_0 \ No newline at end of file diff --git a/log/interface_case_run-2023_02_19_18.log b/log/interface_case_run-2023_02_19_18.log new file mode 100644 index 0000000..ff63548 --- /dev/null +++ b/log/interface_case_run-2023_02_19_18.log @@ -0,0 +1,48 @@ +[2023-02-19 18:10:29.859856] INFO: interface_case_run: 当前模块 生成数据驱动所用数据 +[2023-02-19 18:10:29.860589] INFO: interface_case_run: 全部args参数参数信息 , () +[2023-02-19 18:10:29.860726] INFO: interface_case_run: 全部kwargs参数信息 , {} +[2023-02-19 18:10:29.860902] INFO: interface_case_run: 当前模块 解析测试用例文件 +[2023-02-19 18:10:29.861022] INFO: interface_case_run: 全部args参数参数信息 , ('/Users/lileilei/Desktop/testplan/jiekou-python3/test_case_data/case.xlsx',) +[2023-02-19 18:10:29.861131] INFO: interface_case_run: 全部kwargs参数信息 , {} +[2023-02-19 18:10:29.890171] INFO: interface_case_run: 测试用例开始执行 +[2023-02-19 18:10:29.890499] INFO: interface_case_run: {'key': 'aaaa', 'info': {'password': '1222'}} +[2023-02-19 18:10:29.890675] INFO: interface_case_run: 输入参数:url:/openapi/api,key:aaaa,参数:{'password':'1222'},请求方式:POST +[2023-02-19 18:10:29.890808] INFO: interface_case_run: 输入参数:url:/openapi/api,key:aaaa,参数:{'password':'1222'},请求方式:None +[2023-02-19 18:10:29.963764] INFO: interface_case_run: 返回结果:{'code': 0, 'result': {'code': 40007, 'text': '您的请求内容为空。'}} +[2023-02-19 18:10:29.964209] INFO: interface_case_run: 当前模块 断言测试结果 +[2023-02-19 18:10:29.964440] INFO: interface_case_run: 全部args参数参数信息 , () +[2023-02-19 18:10:29.964621] INFO: interface_case_run: 全部kwargs参数信息 , {'asserassert': 'code=40001'} +[2023-02-19 18:10:29.964853] INFO: interface_case_run: 测试用例执行完毕 +[2023-02-19 18:10:29.965177] INFO: interface_case_run: 测试用例开始执行 +[2023-02-19 18:10:29.965522] INFO: interface_case_run: {'key': 'dfeb1cc8125943d29764a2f2f5c33739', 'info': {'password': '1222'}} +[2023-02-19 18:10:29.965771] INFO: interface_case_run: 输入参数:url:/openapi/api,key:dfeb1cc8125943d29764a2f2f5c33739,参数:{'password':'1222'},请求方式:POST +[2023-02-19 18:10:29.965956] INFO: interface_case_run: 输入参数:url:/openapi/api,key:dfeb1cc8125943d29764a2f2f5c33739,参数:{'password':'1222'},请求方式:None +[2023-02-19 18:10:30.008491] INFO: interface_case_run: 返回结果:{'code': 0, 'result': {'code': 40007, 'text': '您的请求内容为空。'}} +[2023-02-19 18:10:30.008802] INFO: interface_case_run: 当前模块 断言测试结果 +[2023-02-19 18:10:30.009003] INFO: interface_case_run: 全部args参数参数信息 , () +[2023-02-19 18:10:30.009179] INFO: interface_case_run: 全部kwargs参数信息 , {'asserassert': 'code=40002'} +[2023-02-19 18:10:30.009398] INFO: interface_case_run: 测试用例执行完毕 +[2023-02-19 18:10:47.409761] INFO: interface_case_run: 当前模块 生成数据驱动所用数据 +[2023-02-19 18:10:47.410094] INFO: interface_case_run: 全部args参数参数信息 , () +[2023-02-19 18:10:47.410218] INFO: interface_case_run: 全部kwargs参数信息 , {} +[2023-02-19 18:10:47.410376] INFO: interface_case_run: 当前模块 解析测试用例文件 +[2023-02-19 18:10:47.410492] INFO: interface_case_run: 全部args参数参数信息 , ('/Users/lileilei/Desktop/testplan/jiekou-python3/test_case_data/case.xlsx',) +[2023-02-19 18:10:47.410600] INFO: interface_case_run: 全部kwargs参数信息 , {} +[2023-02-19 18:10:47.430403] INFO: interface_case_run: 测试用例开始执行 +[2023-02-19 18:10:47.430650] INFO: interface_case_run: {'key': 'aaaa', 'info': {'password': '1222'}} +[2023-02-19 18:10:47.430796] INFO: interface_case_run: 输入参数:url:/openapi/api,key:aaaa,参数:{'password':'1222'},请求方式:POST +[2023-02-19 18:10:47.430936] INFO: interface_case_run: 输入参数:url:/openapi/api,key:aaaa,参数:{'password':'1222'},请求方式:None +[2023-02-19 18:10:47.481670] INFO: interface_case_run: 返回结果:{'code': 0, 'result': {'code': 40007, 'text': '您的请求内容为空。'}} +[2023-02-19 18:10:47.482034] INFO: interface_case_run: 当前模块 断言测试结果 +[2023-02-19 18:10:47.482468] INFO: interface_case_run: 全部args参数参数信息 , () +[2023-02-19 18:10:47.482886] INFO: interface_case_run: 全部kwargs参数信息 , {'asserassert': 'code=40001'} +[2023-02-19 18:10:47.483244] INFO: interface_case_run: 测试用例执行完毕 +[2023-02-19 18:10:47.483554] INFO: interface_case_run: 测试用例开始执行 +[2023-02-19 18:10:47.483789] INFO: interface_case_run: {'key': 'dfeb1cc8125943d29764a2f2f5c33739', 'info': {'password': '1222'}} +[2023-02-19 18:10:47.483958] INFO: interface_case_run: 输入参数:url:/openapi/api,key:dfeb1cc8125943d29764a2f2f5c33739,参数:{'password':'1222'},请求方式:POST +[2023-02-19 18:10:47.484095] INFO: interface_case_run: 输入参数:url:/openapi/api,key:dfeb1cc8125943d29764a2f2f5c33739,参数:{'password':'1222'},请求方式:None +[2023-02-19 18:10:47.527872] INFO: interface_case_run: 返回结果:{'code': 0, 'result': {'code': 40007, 'text': '您的请求内容为空。'}} +[2023-02-19 18:10:47.528236] INFO: interface_case_run: 当前模块 断言测试结果 +[2023-02-19 18:10:47.528482] INFO: interface_case_run: 全部args参数参数信息 , () +[2023-02-19 18:10:47.528716] INFO: interface_case_run: 全部kwargs参数信息 , {'asserassert': 'code=40002'} +[2023-02-19 18:10:47.528998] INFO: interface_case_run: 测试用例执行完毕 diff --git a/log/jiekou-2022-01-15-13.log b/log/jiekou-2022-01-15-13.log deleted file mode 100755 index e0a3194..0000000 --- a/log/jiekou-2022-01-15-13.log +++ /dev/null @@ -1,59 +0,0 @@ -[2022-01-15 13:43:00.869855] INFO: jiekou: 当前模块 解析测试用例文件 -[2022-01-15 13:43:00.870212] INFO: jiekou: 全部args参数参数信息 , ('/Users/lileilei/Desktop/testplan/jiekou-python3/test_case_data/case.xlsx',) -[2022-01-15 13:43:00.870308] INFO: jiekou: 全部kwargs参数信息 , {} -[2022-01-15 13:43:00.888534] INFO: jiekou: 当前模块 解析测试用例文件 -[2022-01-15 13:43:00.888674] INFO: jiekou: 全部args参数参数信息 , ('/Users/lileilei/Desktop/testplan/jiekou-python3/test_case_data/case.xlsx',) -[2022-01-15 13:43:00.888763] INFO: jiekou: 全部kwargs参数信息 , {} -[2022-01-15 13:43:00.890818] INFO: jiekou: 当前模块 测试 -[2022-01-15 13:43:00.890953] INFO: jiekou: 全部args参数参数信息 , () -[2022-01-15 13:43:00.891040] INFO: jiekou: 全部kwargs参数信息 , {} -[2022-01-15 13:43:01.349738] INFO: jiekou: inputdata> 参数:{'password':'1222'}, url:/openapi/api ,返回:{'code': 0, 'result': {'code': 40007, 'text': '您的请求内容为空。'}},预期:code=40001 -[2022-01-15 13:43:01.350070] INFO: jiekou: 当前模块 断言测试结果 -[2022-01-15 13:43:01.350269] INFO: jiekou: 全部args参数参数信息 , () -[2022-01-15 13:43:01.350445] INFO: jiekou: 全部kwargs参数信息 , {'asserqiwang': 'code=40001', 'fanhuijson': {'code': 0, 'result': {'code': 40007, 'text': '您的请求内容为空。'}}} -[2022-01-15 13:43:01.350619] INFO: jiekou: 失败重试中 -[2022-01-15 13:43:01.670766] INFO: jiekou: inputdata> 参数:{'password':'1222'}, url:/openapi/api ,返回:{'code': 0, 'result': {'code': 40007, 'text': '您的请求内容为空。'}},预期:code=40001 -[2022-01-15 13:43:01.670985] INFO: jiekou: 当前模块 断言测试结果 -[2022-01-15 13:43:01.671113] INFO: jiekou: 全部args参数参数信息 , () -[2022-01-15 13:43:01.671297] INFO: jiekou: 全部kwargs参数信息 , {'asserqiwang': 'code=40001', 'fanhuijson': {'code': 0, 'result': {'code': 40007, 'text': '您的请求内容为空。'}}} -[2022-01-15 13:43:01.671482] INFO: jiekou: 失败重试中 -[2022-01-15 13:43:01.968222] INFO: jiekou: inputdata> 参数:{'password':'1222'}, url:/openapi/api ,返回:{'code': 0, 'result': {'code': 40007, 'text': '您的请求内容为空。'}},预期:code=40001 -[2022-01-15 13:43:01.968487] INFO: jiekou: 当前模块 断言测试结果 -[2022-01-15 13:43:01.968615] INFO: jiekou: 全部args参数参数信息 , () -[2022-01-15 13:43:01.968731] INFO: jiekou: 全部kwargs参数信息 , {'asserqiwang': 'code=40001', 'fanhuijson': {'code': 0, 'result': {'code': 40007, 'text': '您的请求内容为空。'}}} -[2022-01-15 13:43:01.968834] INFO: jiekou: 失败重试中 -[2022-01-15 13:43:02.261136] INFO: jiekou: inputdata> 参数:{'password':'1222'}, url:/openapi/api ,返回:{'code': 0, 'result': {'code': 40007, 'text': '您的请求内容为空。'}},预期:code=40001 -[2022-01-15 13:43:02.261339] INFO: jiekou: 当前模块 断言测试结果 -[2022-01-15 13:43:02.261443] INFO: jiekou: 全部args参数参数信息 , () -[2022-01-15 13:43:02.261542] INFO: jiekou: 全部kwargs参数信息 , {'asserqiwang': 'code=40001', 'fanhuijson': {'code': 0, 'result': {'code': 40007, 'text': '您的请求内容为空。'}}} -[2022-01-15 13:43:02.261646] INFO: jiekou: 失败重试中 -[2022-01-15 13:43:02.444847] INFO: jiekou: inputdata> 参数:{'password':'1222'}, url:/openapi/api ,返回:{'code': 0, 'result': {'code': 40007, 'text': '您的请求内容为空。'}},预期:code=40001 -[2022-01-15 13:43:02.445028] INFO: jiekou: 当前模块 断言测试结果 -[2022-01-15 13:43:02.445125] INFO: jiekou: 全部args参数参数信息 , () -[2022-01-15 13:43:02.445217] INFO: jiekou: 全部kwargs参数信息 , {'asserqiwang': 'code=40001', 'fanhuijson': {'code': 0, 'result': {'code': 40007, 'text': '您的请求内容为空。'}}} -[2022-01-15 13:43:02.445313] INFO: jiekou: 失败重试中次数用完,最后结果 -[2022-01-15 13:43:02.657915] INFO: jiekou: inputdata> 参数:{'password':'1222'}, url:/openapi/api ,返回:{'code': 0, 'result': {'code': 40007, 'text': '您的请求内容为空。'}},预期:code=40002 -[2022-01-15 13:43:02.658132] INFO: jiekou: 当前模块 断言测试结果 -[2022-01-15 13:43:02.658329] INFO: jiekou: 全部args参数参数信息 , () -[2022-01-15 13:43:02.658436] INFO: jiekou: 全部kwargs参数信息 , {'asserqiwang': 'code=40002', 'fanhuijson': {'code': 0, 'result': {'code': 40007, 'text': '您的请求内容为空。'}}} -[2022-01-15 13:43:02.658538] INFO: jiekou: 失败重试中 -[2022-01-15 13:43:02.979989] INFO: jiekou: inputdata> 参数:{'password':'1222'}, url:/openapi/api ,返回:{'code': 0, 'result': {'code': 40007, 'text': '您的请求内容为空。'}},预期:code=40002 -[2022-01-15 13:43:02.980269] INFO: jiekou: 当前模块 断言测试结果 -[2022-01-15 13:43:02.980424] INFO: jiekou: 全部args参数参数信息 , () -[2022-01-15 13:43:02.980534] INFO: jiekou: 全部kwargs参数信息 , {'asserqiwang': 'code=40002', 'fanhuijson': {'code': 0, 'result': {'code': 40007, 'text': '您的请求内容为空。'}}} -[2022-01-15 13:43:02.980713] INFO: jiekou: 失败重试中 -[2022-01-15 13:43:03.317178] INFO: jiekou: inputdata> 参数:{'password':'1222'}, url:/openapi/api ,返回:{'code': 0, 'result': {'code': 40007, 'text': '您的请求内容为空。'}},预期:code=40002 -[2022-01-15 13:43:03.317475] INFO: jiekou: 当前模块 断言测试结果 -[2022-01-15 13:43:03.317650] INFO: jiekou: 全部args参数参数信息 , () -[2022-01-15 13:43:03.317816] INFO: jiekou: 全部kwargs参数信息 , {'asserqiwang': 'code=40002', 'fanhuijson': {'code': 0, 'result': {'code': 40007, 'text': '您的请求内容为空。'}}} -[2022-01-15 13:43:03.317991] INFO: jiekou: 失败重试中 -[2022-01-15 13:43:03.667303] INFO: jiekou: inputdata> 参数:{'password':'1222'}, url:/openapi/api ,返回:{'code': 0, 'result': {'code': 40007, 'text': '您的请求内容为空。'}},预期:code=40002 -[2022-01-15 13:43:03.667823] INFO: jiekou: 当前模块 断言测试结果 -[2022-01-15 13:43:03.668283] INFO: jiekou: 全部args参数参数信息 , () -[2022-01-15 13:43:03.668658] INFO: jiekou: 全部kwargs参数信息 , {'asserqiwang': 'code=40002', 'fanhuijson': {'code': 0, 'result': {'code': 40007, 'text': '您的请求内容为空。'}}} -[2022-01-15 13:43:03.668996] INFO: jiekou: 失败重试中 -[2022-01-15 13:43:04.019483] INFO: jiekou: inputdata> 参数:{'password':'1222'}, url:/openapi/api ,返回:{'code': 0, 'result': {'code': 40007, 'text': '您的请求内容为空。'}},预期:code=40002 -[2022-01-15 13:43:04.019934] INFO: jiekou: 当前模块 断言测试结果 -[2022-01-15 13:43:04.020250] INFO: jiekou: 全部args参数参数信息 , () -[2022-01-15 13:43:04.020570] INFO: jiekou: 全部kwargs参数信息 , {'asserqiwang': 'code=40002', 'fanhuijson': {'code': 0, 'result': {'code': 40007, 'text': '您的请求内容为空。'}}} -[2022-01-15 13:43:04.020928] INFO: jiekou: 失败重试中次数用完,最后结果 diff --git a/log/jiekou-2022-01-15-14.log b/log/jiekou-2022-01-15-14.log deleted file mode 100755 index d83554f..0000000 --- a/log/jiekou-2022-01-15-14.log +++ /dev/null @@ -1,22 +0,0 @@ -[2022-01-15 14:27:09.437035] INFO: jiekou: 当前模块 生成数据驱动所用数据 -[2022-01-15 14:27:09.437977] INFO: jiekou: 全部args参数参数信息 , () -[2022-01-15 14:27:09.438118] INFO: jiekou: 全部kwargs参数信息 , {} -[2022-01-15 14:27:09.438263] INFO: jiekou: 当前模块 解析测试用例文件 -[2022-01-15 14:27:09.438360] INFO: jiekou: 全部args参数参数信息 , ('/Users/lileilei/Desktop/testplan/jiekou-python3/test_case_data/case.xlsx',) -[2022-01-15 14:27:09.438552] INFO: jiekou: 全部kwargs参数信息 , {} -[2022-01-15 14:27:09.455070] INFO: jiekou: 测试用例开始执行 -[2022-01-15 14:27:09.455222] INFO: jiekou: 输入参数:url:/openapi/api,key:aaaa,参数:{'password':'1222'},请求方式:POST -[2022-01-15 14:27:09.455321] INFO: jiekou: 输入参数:url:/openapi/api,key:aaaa,参数:{'password':'1222'},请求方式:None -[2022-01-15 14:27:09.456489] INFO: jiekou: 返回结果:{'code': 1, 'result': "请求异常:Invalid URL '/openapi/api': No schema supplied. Perhaps you meant http:///openapi/api?"} -[2022-01-15 14:27:09.456612] INFO: jiekou: 当前模块 断言测试结果 -[2022-01-15 14:27:09.456709] INFO: jiekou: 全部args参数参数信息 , () -[2022-01-15 14:27:09.456797] INFO: jiekou: 全部kwargs参数信息 , {'asserqingwang': 'code=40001'} -[2022-01-15 14:27:09.456898] INFO: jiekou: 测试用例执行完毕 -[2022-01-15 14:27:09.457025] INFO: jiekou: 测试用例开始执行 -[2022-01-15 14:27:09.457124] INFO: jiekou: 输入参数:url:/openapi/api,key:dfeb1cc8125943d29764a2f2f5c33739,参数:{'password':'1222'},请求方式:POST -[2022-01-15 14:27:09.457211] INFO: jiekou: 输入参数:url:/openapi/api,key:dfeb1cc8125943d29764a2f2f5c33739,参数:{'password':'1222'},请求方式:None -[2022-01-15 14:27:09.457530] INFO: jiekou: 返回结果:{'code': 1, 'result': "请求异常:Invalid URL '/openapi/api': No schema supplied. Perhaps you meant http:///openapi/api?"} -[2022-01-15 14:27:09.457637] INFO: jiekou: 当前模块 断言测试结果 -[2022-01-15 14:27:09.457731] INFO: jiekou: 全部args参数参数信息 , () -[2022-01-15 14:27:09.457816] INFO: jiekou: 全部kwargs参数信息 , {'asserqingwang': 'code=40002'} -[2022-01-15 14:27:09.457914] INFO: jiekou: 测试用例执行完毕 diff --git a/log/jiekou-2022-01-15-17.log b/log/jiekou-2022-01-15-17.log deleted file mode 100755 index cb90a23..0000000 --- a/log/jiekou-2022-01-15-17.log +++ /dev/null @@ -1,22 +0,0 @@ -[2022-01-15 17:13:18.278787] INFO: jiekou: 当前模块 生成数据驱动所用数据 -[2022-01-15 17:13:18.279456] INFO: jiekou: 全部args参数参数信息 , () -[2022-01-15 17:13:18.279559] INFO: jiekou: 全部kwargs参数信息 , {} -[2022-01-15 17:13:18.279680] INFO: jiekou: 当前模块 解析测试用例文件 -[2022-01-15 17:13:18.279771] INFO: jiekou: 全部args参数参数信息 , ('/Users/lileilei/Desktop/testplan/jiekou-python3/test_case_data/case.xlsx',) -[2022-01-15 17:13:18.279854] INFO: jiekou: 全部kwargs参数信息 , {} -[2022-01-15 17:13:18.329953] INFO: jiekou: 测试用例开始执行 -[2022-01-15 17:13:18.330178] INFO: jiekou: 输入参数:url:/openapi/api,key:aaaa,参数:{'password':'1222'},请求方式:POST -[2022-01-15 17:13:18.330315] INFO: jiekou: 输入参数:url:/openapi/api,key:aaaa,参数:{'password':'1222'},请求方式:None -[2022-01-15 17:13:18.332452] INFO: jiekou: 返回结果:{'code': 1, 'result': "请求异常:Invalid URL '/openapi/api': No schema supplied. Perhaps you meant http:///openapi/api?"} -[2022-01-15 17:13:18.332630] INFO: jiekou: 当前模块 断言测试结果 -[2022-01-15 17:13:18.332736] INFO: jiekou: 全部args参数参数信息 , () -[2022-01-15 17:13:18.332829] INFO: jiekou: 全部kwargs参数信息 , {'asserqingwang': 'code=40001'} -[2022-01-15 17:13:18.332943] INFO: jiekou: 测试用例执行完毕 -[2022-01-15 17:13:18.333088] INFO: jiekou: 测试用例开始执行 -[2022-01-15 17:13:18.333234] INFO: jiekou: 输入参数:url:/openapi/api,key:dfeb1cc8125943d29764a2f2f5c33739,参数:{'password':'1222'},请求方式:POST -[2022-01-15 17:13:18.333332] INFO: jiekou: 输入参数:url:/openapi/api,key:dfeb1cc8125943d29764a2f2f5c33739,参数:{'password':'1222'},请求方式:None -[2022-01-15 17:13:18.333739] INFO: jiekou: 返回结果:{'code': 1, 'result': "请求异常:Invalid URL '/openapi/api': No schema supplied. Perhaps you meant http:///openapi/api?"} -[2022-01-15 17:13:18.334014] INFO: jiekou: 当前模块 断言测试结果 -[2022-01-15 17:13:18.334274] INFO: jiekou: 全部args参数参数信息 , () -[2022-01-15 17:13:18.334553] INFO: jiekou: 全部kwargs参数信息 , {'asserqingwang': 'code=40002'} -[2022-01-15 17:13:18.334695] INFO: jiekou: 测试用例执行完毕 diff --git a/log/jiekou-2022-01-16-09.log b/log/jiekou-2022-01-16-09.log deleted file mode 100755 index 08508c9..0000000 --- a/log/jiekou-2022-01-16-09.log +++ /dev/null @@ -1,22 +0,0 @@ -[2022-01-16 09:46:33.662871] INFO: jiekou: 当前模块 生成数据驱动所用数据 -[2022-01-16 09:46:33.664217] INFO: jiekou: 全部args参数参数信息 , () -[2022-01-16 09:46:33.664333] INFO: jiekou: 全部kwargs参数信息 , {} -[2022-01-16 09:46:33.664468] INFO: jiekou: 当前模块 解析测试用例文件 -[2022-01-16 09:46:33.664560] INFO: jiekou: 全部args参数参数信息 , ('/Users/lileilei/Desktop/testplan/jiekou-python3/test_case_data/case.xlsx',) -[2022-01-16 09:46:33.664642] INFO: jiekou: 全部kwargs参数信息 , {} -[2022-01-16 09:46:33.685922] INFO: jiekou: 测试用例开始执行 -[2022-01-16 09:46:33.686171] INFO: jiekou: 输入参数:url:/openapi/api,key:aaaa,参数:{'password':'1222'},请求方式:POST -[2022-01-16 09:46:33.686288] INFO: jiekou: 输入参数:url:/openapi/api,key:aaaa,参数:{'password':'1222'},请求方式:None -[2022-01-16 09:46:33.750325] INFO: jiekou: 返回结果:{'code': 0, 'result': {'code': 40007, 'text': '您的请求内容为空。'}} -[2022-01-16 09:46:33.750550] INFO: jiekou: 当前模块 断言测试结果 -[2022-01-16 09:46:33.750662] INFO: jiekou: 全部args参数参数信息 , () -[2022-01-16 09:46:33.750769] INFO: jiekou: 全部kwargs参数信息 , {'asserqingwang': 'code=40001'} -[2022-01-16 09:46:33.750898] INFO: jiekou: 测试用例执行完毕 -[2022-01-16 09:46:33.751105] INFO: jiekou: 测试用例开始执行 -[2022-01-16 09:46:33.751315] INFO: jiekou: 输入参数:url:/openapi/api,key:dfeb1cc8125943d29764a2f2f5c33739,参数:{'password':'1222'},请求方式:POST -[2022-01-16 09:46:33.751432] INFO: jiekou: 输入参数:url:/openapi/api,key:dfeb1cc8125943d29764a2f2f5c33739,参数:{'password':'1222'},请求方式:None -[2022-01-16 09:46:33.782704] INFO: jiekou: 返回结果:{'code': 0, 'result': {'code': 40007, 'text': '您的请求内容为空。'}} -[2022-01-16 09:46:33.782947] INFO: jiekou: 当前模块 断言测试结果 -[2022-01-16 09:46:33.783049] INFO: jiekou: 全部args参数参数信息 , () -[2022-01-16 09:46:33.783166] INFO: jiekou: 全部kwargs参数信息 , {'asserqingwang': 'code=40002'} -[2022-01-16 09:46:33.783281] INFO: jiekou: 测试用例执行完毕 diff --git a/log/jiekou-2022-02-20-12.log b/log/jiekou-2022-02-20-12.log deleted file mode 100755 index f21e48a..0000000 --- a/log/jiekou-2022-02-20-12.log +++ /dev/null @@ -1,6 +0,0 @@ -[2022-02-20 12:44:50.852541] INFO: jiekou: 当前模块 生成数据驱动所用数据 -[2022-02-20 12:44:50.853016] INFO: jiekou: 全部args参数参数信息 , () -[2022-02-20 12:44:50.853153] INFO: jiekou: 全部kwargs参数信息 , {} -[2022-02-20 12:44:50.853307] INFO: jiekou: 当前模块 解析测试用例文件 -[2022-02-20 12:44:50.853429] INFO: jiekou: 全部args参数参数信息 , ('/Users/lileilei/Desktop/testplan/jiekou-python3/test_case_data/case.xlsx',) -[2022-02-20 12:44:50.853548] INFO: jiekou: 全部kwargs参数信息 , {} diff --git a/log/jiekou-2022-04-22-17.log b/log/jiekou-2022-04-22-17.log deleted file mode 100644 index cce9ba8..0000000 --- a/log/jiekou-2022-04-22-17.log +++ /dev/null @@ -1,202 +0,0 @@ -[2022-04-22 17:22:26.778477] INFO: jiekou: 当前模块 解析测试用例文件 -[2022-04-22 17:22:26.779237] INFO: jiekou: 全部args参数参数信息 , ('/Users/lileilei/Desktop/testplan/jiekou-python3/test_case_data/case.xlsx',) -[2022-04-22 17:22:26.779387] INFO: jiekou: 全部kwargs参数信息 , {} -[2022-04-22 17:22:26.808260] INFO: jiekou: 当前模块 解析测试用例文件 -[2022-04-22 17:22:26.808395] INFO: jiekou: 全部args参数参数信息 , ('/Users/lileilei/Desktop/testplan/jiekou-python3/test_case_data/case.xlsx',) -[2022-04-22 17:22:26.808481] INFO: jiekou: 全部kwargs参数信息 , {} -[2022-04-22 17:22:26.810404] INFO: jiekou: 当前模块 测试 -[2022-04-22 17:22:26.810539] INFO: jiekou: 全部args参数参数信息 , () -[2022-04-22 17:22:26.810632] INFO: jiekou: 全部kwargs参数信息 , {} -[2022-04-22 17:22:27.978962] INFO: jiekou: inputdata> 参数:{'password':'1222'}, url:/openapi/api ,返回:{'code': 0, 'result': {'code': 40007, 'text': '您的请求内容为空。'}},预期:code=40001 -[2022-04-22 17:22:27.979365] INFO: jiekou: 当前模块 断言测试结果 -[2022-04-22 17:22:27.979631] INFO: jiekou: 全部args参数参数信息 , () -[2022-04-22 17:22:27.979823] INFO: jiekou: 全部kwargs参数信息 , {'asserqiwang': 'code=40001', 'fanhuijson': {'code': 0, 'result': {'code': 40007, 'text': '您的请求内容为空。'}}} -[2022-04-22 17:22:27.980186] INFO: jiekou: 失败重试中 -[2022-04-22 17:22:29.027990] INFO: jiekou: inputdata> 参数:{'password':'1222'}, url:/openapi/api ,返回:{'code': 0, 'result': {'code': 40007, 'text': '您的请求内容为空。'}},预期:code=40001 -[2022-04-22 17:22:29.028269] INFO: jiekou: 当前模块 断言测试结果 -[2022-04-22 17:22:29.028377] INFO: jiekou: 全部args参数参数信息 , () -[2022-04-22 17:22:29.028485] INFO: jiekou: 全部kwargs参数信息 , {'asserqiwang': 'code=40001', 'fanhuijson': {'code': 0, 'result': {'code': 40007, 'text': '您的请求内容为空。'}}} -[2022-04-22 17:22:29.028589] INFO: jiekou: 失败重试中 -[2022-04-22 17:22:29.517642] INFO: jiekou: inputdata> 参数:{'password':'1222'}, url:/openapi/api ,返回:{'code': 0, 'result': {'code': 40007, 'text': '您的请求内容为空。'}},预期:code=40001 -[2022-04-22 17:22:29.517913] INFO: jiekou: 当前模块 断言测试结果 -[2022-04-22 17:22:29.518078] INFO: jiekou: 全部args参数参数信息 , () -[2022-04-22 17:22:29.518180] INFO: jiekou: 全部kwargs参数信息 , {'asserqiwang': 'code=40001', 'fanhuijson': {'code': 0, 'result': {'code': 40007, 'text': '您的请求内容为空。'}}} -[2022-04-22 17:22:29.518281] INFO: jiekou: 失败重试中 -[2022-04-22 17:22:29.565773] INFO: jiekou: inputdata> 参数:{'password':'1222'}, url:/openapi/api ,返回:{'code': 0, 'result': {'code': 40007, 'text': '您的请求内容为空。'}},预期:code=40001 -[2022-04-22 17:22:29.566054] INFO: jiekou: 当前模块 断言测试结果 -[2022-04-22 17:22:29.566236] INFO: jiekou: 全部args参数参数信息 , () -[2022-04-22 17:22:29.566417] INFO: jiekou: 全部kwargs参数信息 , {'asserqiwang': 'code=40001', 'fanhuijson': {'code': 0, 'result': {'code': 40007, 'text': '您的请求内容为空。'}}} -[2022-04-22 17:22:29.566569] INFO: jiekou: 失败重试中 -[2022-04-22 17:22:29.617091] INFO: jiekou: inputdata> 参数:{'password':'1222'}, url:/openapi/api ,返回:{'code': 0, 'result': {'code': 40007, 'text': '您的请求内容为空。'}},预期:code=40001 -[2022-04-22 17:22:29.617275] INFO: jiekou: 当前模块 断言测试结果 -[2022-04-22 17:22:29.617365] INFO: jiekou: 全部args参数参数信息 , () -[2022-04-22 17:22:29.617448] INFO: jiekou: 全部kwargs参数信息 , {'asserqiwang': 'code=40001', 'fanhuijson': {'code': 0, 'result': {'code': 40007, 'text': '您的请求内容为空。'}}} -[2022-04-22 17:22:29.617572] INFO: jiekou: 失败重试中次数用完,最后结果 -[2022-04-22 17:22:29.658466] INFO: jiekou: inputdata> 参数:{'password':'1222'}, url:/openapi/api ,返回:{'code': 0, 'result': {'code': 40007, 'text': '您的请求内容为空。'}},预期:code=40002 -[2022-04-22 17:22:29.658649] INFO: jiekou: 当前模块 断言测试结果 -[2022-04-22 17:22:29.658794] INFO: jiekou: 全部args参数参数信息 , () -[2022-04-22 17:22:29.658921] INFO: jiekou: 全部kwargs参数信息 , {'asserqiwang': 'code=40002', 'fanhuijson': {'code': 0, 'result': {'code': 40007, 'text': '您的请求内容为空。'}}} -[2022-04-22 17:22:29.659075] INFO: jiekou: 失败重试中 -[2022-04-22 17:22:29.718410] INFO: jiekou: inputdata> 参数:{'password':'1222'}, url:/openapi/api ,返回:{'code': 0, 'result': {'code': 40007, 'text': '您的请求内容为空。'}},预期:code=40002 -[2022-04-22 17:22:29.718615] INFO: jiekou: 当前模块 断言测试结果 -[2022-04-22 17:22:29.718748] INFO: jiekou: 全部args参数参数信息 , () -[2022-04-22 17:22:29.718871] INFO: jiekou: 全部kwargs参数信息 , {'asserqiwang': 'code=40002', 'fanhuijson': {'code': 0, 'result': {'code': 40007, 'text': '您的请求内容为空。'}}} -[2022-04-22 17:22:29.719069] INFO: jiekou: 失败重试中 -[2022-04-22 17:22:29.764296] INFO: jiekou: inputdata> 参数:{'password':'1222'}, url:/openapi/api ,返回:{'code': 0, 'result': {'code': 40007, 'text': '您的请求内容为空。'}},预期:code=40002 -[2022-04-22 17:22:29.764482] INFO: jiekou: 当前模块 断言测试结果 -[2022-04-22 17:22:29.764568] INFO: jiekou: 全部args参数参数信息 , () -[2022-04-22 17:22:29.764668] INFO: jiekou: 全部kwargs参数信息 , {'asserqiwang': 'code=40002', 'fanhuijson': {'code': 0, 'result': {'code': 40007, 'text': '您的请求内容为空。'}}} -[2022-04-22 17:22:29.764762] INFO: jiekou: 失败重试中 -[2022-04-22 17:22:30.043375] INFO: jiekou: inputdata> 参数:{'password':'1222'}, url:/openapi/api ,返回:{'code': 0, 'result': {'code': 40007, 'text': '您的请求内容为空。'}},预期:code=40002 -[2022-04-22 17:22:30.043620] INFO: jiekou: 当前模块 断言测试结果 -[2022-04-22 17:22:30.043769] INFO: jiekou: 全部args参数参数信息 , () -[2022-04-22 17:22:30.043919] INFO: jiekou: 全部kwargs参数信息 , {'asserqiwang': 'code=40002', 'fanhuijson': {'code': 0, 'result': {'code': 40007, 'text': '您的请求内容为空。'}}} -[2022-04-22 17:22:30.044074] INFO: jiekou: 失败重试中 -[2022-04-22 17:22:30.084180] INFO: jiekou: inputdata> 参数:{'password':'1222'}, url:/openapi/api ,返回:{'code': 0, 'result': {'code': 40007, 'text': '您的请求内容为空。'}},预期:code=40002 -[2022-04-22 17:22:30.084505] INFO: jiekou: 当前模块 断言测试结果 -[2022-04-22 17:22:30.084735] INFO: jiekou: 全部args参数参数信息 , () -[2022-04-22 17:22:30.085204] INFO: jiekou: 全部kwargs参数信息 , {'asserqiwang': 'code=40002', 'fanhuijson': {'code': 0, 'result': {'code': 40007, 'text': '您的请求内容为空。'}}} -[2022-04-22 17:22:30.085420] INFO: jiekou: 失败重试中次数用完,最后结果 -[2022-04-22 17:22:30.121341] INFO: jiekou: 当前模块 保存测试结果 -[2022-04-22 17:22:30.121531] INFO: jiekou: 全部args参数参数信息 , (datetime.datetime(2022, 4, 22, 17, 22, 26, 808171), 2, 0, 2) -[2022-04-22 17:22:30.121620] INFO: jiekou: 全部kwargs参数信息 , {} -[2022-04-22 17:22:39.860783] INFO: jiekou: 当前模块 解析测试用例文件 -[2022-04-22 17:22:39.861259] INFO: jiekou: 全部args参数参数信息 , ('/Users/lileilei/Desktop/testplan/jiekou-python3/test_case_data/case.xlsx',) -[2022-04-22 17:22:39.861564] INFO: jiekou: 全部kwargs参数信息 , {} -[2022-04-22 17:22:39.905848] INFO: jiekou: 当前模块 解析测试用例文件 -[2022-04-22 17:22:39.905982] INFO: jiekou: 全部args参数参数信息 , ('/Users/lileilei/Desktop/testplan/jiekou-python3/test_case_data/case.xlsx',) -[2022-04-22 17:22:39.906066] INFO: jiekou: 全部kwargs参数信息 , {} -[2022-04-22 17:22:39.909608] INFO: jiekou: 当前模块 测试 -[2022-04-22 17:22:39.909832] INFO: jiekou: 全部args参数参数信息 , () -[2022-04-22 17:22:39.910029] INFO: jiekou: 全部kwargs参数信息 , {} -[2022-04-22 17:22:41.004003] INFO: jiekou: inputdata> 参数:{'password':'1222'}, url:/openapi/api ,返回:{'code': 0, 'result': {'code': 40007, 'text': '您的请求内容为空。'}},预期:code=40001 -[2022-04-22 17:22:41.004618] INFO: jiekou: 当前模块 断言测试结果 -[2022-04-22 17:22:41.004731] INFO: jiekou: 全部args参数参数信息 , () -[2022-04-22 17:22:41.005038] INFO: jiekou: 全部kwargs参数信息 , {'asserqiwang': 'code=40001', 'fanhuijson': {'code': 0, 'result': {'code': 40007, 'text': '您的请求内容为空。'}}} -[2022-04-22 17:22:41.005245] INFO: jiekou: 失败重试中 -[2022-04-22 17:22:41.051783] INFO: jiekou: inputdata> 参数:{'password':'1222'}, url:/openapi/api ,返回:{'code': 0, 'result': {'code': 40007, 'text': '您的请求内容为空。'}},预期:code=40001 -[2022-04-22 17:22:41.052116] INFO: jiekou: 当前模块 断言测试结果 -[2022-04-22 17:22:41.052288] INFO: jiekou: 全部args参数参数信息 , () -[2022-04-22 17:22:41.052487] INFO: jiekou: 全部kwargs参数信息 , {'asserqiwang': 'code=40001', 'fanhuijson': {'code': 0, 'result': {'code': 40007, 'text': '您的请求内容为空。'}}} -[2022-04-22 17:22:41.052711] INFO: jiekou: 失败重试中 -[2022-04-22 17:22:41.130454] INFO: jiekou: inputdata> 参数:{'password':'1222'}, url:/openapi/api ,返回:{'code': 0, 'result': {'code': 40007, 'text': '您的请求内容为空。'}},预期:code=40001 -[2022-04-22 17:22:41.130701] INFO: jiekou: 当前模块 断言测试结果 -[2022-04-22 17:22:41.130830] INFO: jiekou: 全部args参数参数信息 , () -[2022-04-22 17:22:41.130956] INFO: jiekou: 全部kwargs参数信息 , {'asserqiwang': 'code=40001', 'fanhuijson': {'code': 0, 'result': {'code': 40007, 'text': '您的请求内容为空。'}}} -[2022-04-22 17:22:41.131090] INFO: jiekou: 失败重试中 -[2022-04-22 17:22:41.186415] INFO: jiekou: inputdata> 参数:{'password':'1222'}, url:/openapi/api ,返回:{'code': 0, 'result': {'code': 40007, 'text': '您的请求内容为空。'}},预期:code=40001 -[2022-04-22 17:22:41.186592] INFO: jiekou: 当前模块 断言测试结果 -[2022-04-22 17:22:41.186722] INFO: jiekou: 全部args参数参数信息 , () -[2022-04-22 17:22:41.186853] INFO: jiekou: 全部kwargs参数信息 , {'asserqiwang': 'code=40001', 'fanhuijson': {'code': 0, 'result': {'code': 40007, 'text': '您的请求内容为空。'}}} -[2022-04-22 17:22:41.186999] INFO: jiekou: 失败重试中 -[2022-04-22 17:22:41.233924] INFO: jiekou: inputdata> 参数:{'password':'1222'}, url:/openapi/api ,返回:{'code': 0, 'result': {'code': 40007, 'text': '您的请求内容为空。'}},预期:code=40001 -[2022-04-22 17:22:41.234352] INFO: jiekou: 当前模块 断言测试结果 -[2022-04-22 17:22:41.234507] INFO: jiekou: 全部args参数参数信息 , () -[2022-04-22 17:22:41.234719] INFO: jiekou: 全部kwargs参数信息 , {'asserqiwang': 'code=40001', 'fanhuijson': {'code': 0, 'result': {'code': 40007, 'text': '您的请求内容为空。'}}} -[2022-04-22 17:22:41.234871] INFO: jiekou: 失败重试中次数用完,最后结果 -[2022-04-22 17:22:41.272654] INFO: jiekou: inputdata> 参数:{'password':'1222'}, url:/openapi/api ,返回:{'code': 0, 'result': {'code': 40007, 'text': '您的请求内容为空。'}},预期:code=40002 -[2022-04-22 17:22:41.272862] INFO: jiekou: 当前模块 断言测试结果 -[2022-04-22 17:22:41.272952] INFO: jiekou: 全部args参数参数信息 , () -[2022-04-22 17:22:41.273059] INFO: jiekou: 全部kwargs参数信息 , {'asserqiwang': 'code=40002', 'fanhuijson': {'code': 0, 'result': {'code': 40007, 'text': '您的请求内容为空。'}}} -[2022-04-22 17:22:41.273154] INFO: jiekou: 失败重试中 -[2022-04-22 17:22:41.526629] INFO: jiekou: inputdata> 参数:{'password':'1222'}, url:/openapi/api ,返回:{'code': 0, 'result': {'code': 40007, 'text': '您的请求内容为空。'}},预期:code=40002 -[2022-04-22 17:22:41.526898] INFO: jiekou: 当前模块 断言测试结果 -[2022-04-22 17:22:41.527091] INFO: jiekou: 全部args参数参数信息 , () -[2022-04-22 17:22:41.527286] INFO: jiekou: 全部kwargs参数信息 , {'asserqiwang': 'code=40002', 'fanhuijson': {'code': 0, 'result': {'code': 40007, 'text': '您的请求内容为空。'}}} -[2022-04-22 17:22:41.527400] INFO: jiekou: 失败重试中 -[2022-04-22 17:22:41.569143] INFO: jiekou: inputdata> 参数:{'password':'1222'}, url:/openapi/api ,返回:{'code': 0, 'result': {'code': 40007, 'text': '您的请求内容为空。'}},预期:code=40002 -[2022-04-22 17:22:41.569320] INFO: jiekou: 当前模块 断言测试结果 -[2022-04-22 17:22:41.569405] INFO: jiekou: 全部args参数参数信息 , () -[2022-04-22 17:22:41.569489] INFO: jiekou: 全部kwargs参数信息 , {'asserqiwang': 'code=40002', 'fanhuijson': {'code': 0, 'result': {'code': 40007, 'text': '您的请求内容为空。'}}} -[2022-04-22 17:22:41.569577] INFO: jiekou: 失败重试中 -[2022-04-22 17:22:41.874665] INFO: jiekou: inputdata> 参数:{'password':'1222'}, url:/openapi/api ,返回:{'code': 0, 'result': {'code': 40007, 'text': '您的请求内容为空。'}},预期:code=40002 -[2022-04-22 17:22:41.874856] INFO: jiekou: 当前模块 断言测试结果 -[2022-04-22 17:22:41.874956] INFO: jiekou: 全部args参数参数信息 , () -[2022-04-22 17:22:41.875056] INFO: jiekou: 全部kwargs参数信息 , {'asserqiwang': 'code=40002', 'fanhuijson': {'code': 0, 'result': {'code': 40007, 'text': '您的请求内容为空。'}}} -[2022-04-22 17:22:41.875163] INFO: jiekou: 失败重试中 -[2022-04-22 17:22:41.927251] INFO: jiekou: inputdata> 参数:{'password':'1222'}, url:/openapi/api ,返回:{'code': 0, 'result': {'code': 40007, 'text': '您的请求内容为空。'}},预期:code=40002 -[2022-04-22 17:22:41.927429] INFO: jiekou: 当前模块 断言测试结果 -[2022-04-22 17:22:41.927514] INFO: jiekou: 全部args参数参数信息 , () -[2022-04-22 17:22:41.927658] INFO: jiekou: 全部kwargs参数信息 , {'asserqiwang': 'code=40002', 'fanhuijson': {'code': 0, 'result': {'code': 40007, 'text': '您的请求内容为空。'}}} -[2022-04-22 17:22:41.927899] INFO: jiekou: 失败重试中次数用完,最后结果 -[2022-04-22 17:22:51.360831] INFO: jiekou: 当前模块 生成数据驱动所用数据 -[2022-04-22 17:22:51.361251] INFO: jiekou: 全部args参数参数信息 , () -[2022-04-22 17:22:51.361493] INFO: jiekou: 全部kwargs参数信息 , {} -[2022-04-22 17:22:51.361759] INFO: jiekou: 当前模块 解析测试用例文件 -[2022-04-22 17:22:51.361910] INFO: jiekou: 全部args参数参数信息 , ('/Users/lileilei/Desktop/testplan/jiekou-python3/test_case_data/case.xlsx',) -[2022-04-22 17:22:51.362018] INFO: jiekou: 全部kwargs参数信息 , {} -[2022-04-22 17:22:51.394227] INFO: jiekou: 测试用例开始执行 -[2022-04-22 17:22:51.394482] INFO: jiekou: 输入参数:url:/openapi/api,key:aaaa,参数:{'password':'1222'},请求方式:POST -[2022-04-22 17:22:51.394603] INFO: jiekou: 输入参数:url:/openapi/api,key:aaaa,参数:{'password':'1222'},请求方式:None -[2022-04-22 17:22:51.468211] INFO: jiekou: 返回结果:{'code': 0, 'result': {'code': 40007, 'text': '您的请求内容为空。'}} -[2022-04-22 17:22:51.469211] INFO: jiekou: 当前模块 断言测试结果 -[2022-04-22 17:22:51.469445] INFO: jiekou: 全部args参数参数信息 , () -[2022-04-22 17:22:51.469881] INFO: jiekou: 全部kwargs参数信息 , {'asserqingwang': 'code=40001'} -[2022-04-22 17:22:51.470383] INFO: jiekou: 测试用例执行完毕 -[2022-04-22 17:22:51.470590] INFO: jiekou: 测试用例开始执行 -[2022-04-22 17:22:51.470859] INFO: jiekou: 输入参数:url:/openapi/api,key:dfeb1cc8125943d29764a2f2f5c33739,参数:{'password':'1222'},请求方式:POST -[2022-04-22 17:22:51.471181] INFO: jiekou: 输入参数:url:/openapi/api,key:dfeb1cc8125943d29764a2f2f5c33739,参数:{'password':'1222'},请求方式:None -[2022-04-22 17:22:51.740290] INFO: jiekou: 返回结果:{'code': 0, 'result': {'code': 40007, 'text': '您的请求内容为空。'}} -[2022-04-22 17:22:51.740483] INFO: jiekou: 当前模块 断言测试结果 -[2022-04-22 17:22:51.740633] INFO: jiekou: 全部args参数参数信息 , () -[2022-04-22 17:22:51.740823] INFO: jiekou: 全部kwargs参数信息 , {'asserqingwang': 'code=40002'} -[2022-04-22 17:22:51.741116] INFO: jiekou: 测试用例执行完毕 -[2022-04-22 17:23:10.825644] INFO: jiekou: 当前模块 解析测试用例文件 -[2022-04-22 17:23:10.826130] INFO: jiekou: 全部args参数参数信息 , ('/Users/lileilei/Desktop/testplan/jiekou-python3/test_case_data/case.xlsx',) -[2022-04-22 17:23:10.826281] INFO: jiekou: 全部kwargs参数信息 , {} -[2022-04-22 17:23:10.844207] INFO: jiekou: 当前模块 解析测试用例文件 -[2022-04-22 17:23:10.844426] INFO: jiekou: 全部args参数参数信息 , ('/Users/lileilei/Desktop/testplan/jiekou-python3/test_case_data/case.xlsx',) -[2022-04-22 17:23:10.844568] INFO: jiekou: 全部kwargs参数信息 , {} -[2022-04-22 17:23:10.848621] INFO: jiekou: 当前模块 测试 -[2022-04-22 17:23:10.848959] INFO: jiekou: 全部args参数参数信息 , () -[2022-04-22 17:23:10.849201] INFO: jiekou: 全部kwargs参数信息 , {} -[2022-04-22 17:23:10.908771] INFO: jiekou: inputdata> 参数:{'password':'1222'}, url:/openapi/api ,返回:{'code': 0, 'result': {'code': 40007, 'text': '您的请求内容为空。'}},预期:code=40001 -[2022-04-22 17:23:10.909005] INFO: jiekou: 当前模块 断言测试结果 -[2022-04-22 17:23:10.909138] INFO: jiekou: 全部args参数参数信息 , () -[2022-04-22 17:23:10.909263] INFO: jiekou: 全部kwargs参数信息 , {'asserqiwang': 'code=40001', 'fanhuijson': {'code': 0, 'result': {'code': 40007, 'text': '您的请求内容为空。'}}} -[2022-04-22 17:23:10.909399] INFO: jiekou: 失败重试中 -[2022-04-22 17:23:10.953665] INFO: jiekou: inputdata> 参数:{'password':'1222'}, url:/openapi/api ,返回:{'code': 0, 'result': {'code': 40007, 'text': '您的请求内容为空。'}},预期:code=40001 -[2022-04-22 17:23:10.953987] INFO: jiekou: 当前模块 断言测试结果 -[2022-04-22 17:23:10.954213] INFO: jiekou: 全部args参数参数信息 , () -[2022-04-22 17:23:10.954469] INFO: jiekou: 全部kwargs参数信息 , {'asserqiwang': 'code=40001', 'fanhuijson': {'code': 0, 'result': {'code': 40007, 'text': '您的请求内容为空。'}}} -[2022-04-22 17:23:10.954692] INFO: jiekou: 失败重试中 -[2022-04-22 17:23:12.007731] INFO: jiekou: inputdata> 参数:{'password':'1222'}, url:/openapi/api ,返回:{'code': 0, 'result': {'code': 40007, 'text': '您的请求内容为空。'}},预期:code=40001 -[2022-04-22 17:23:12.007973] INFO: jiekou: 当前模块 断言测试结果 -[2022-04-22 17:23:12.008097] INFO: jiekou: 全部args参数参数信息 , () -[2022-04-22 17:23:12.008217] INFO: jiekou: 全部kwargs参数信息 , {'asserqiwang': 'code=40001', 'fanhuijson': {'code': 0, 'result': {'code': 40007, 'text': '您的请求内容为空。'}}} -[2022-04-22 17:23:12.008345] INFO: jiekou: 失败重试中 -[2022-04-22 17:23:14.132112] INFO: jiekou: inputdata> 参数:{'password':'1222'}, url:/openapi/api ,返回:{'code': 0, 'result': {'code': 40007, 'text': '您的请求内容为空。'}},预期:code=40001 -[2022-04-22 17:23:14.132436] INFO: jiekou: 当前模块 断言测试结果 -[2022-04-22 17:23:14.132636] INFO: jiekou: 全部args参数参数信息 , () -[2022-04-22 17:23:14.132843] INFO: jiekou: 全部kwargs参数信息 , {'asserqiwang': 'code=40001', 'fanhuijson': {'code': 0, 'result': {'code': 40007, 'text': '您的请求内容为空。'}}} -[2022-04-22 17:23:14.133061] INFO: jiekou: 失败重试中 -[2022-04-22 17:23:14.185738] INFO: jiekou: inputdata> 参数:{'password':'1222'}, url:/openapi/api ,返回:{'code': 0, 'result': {'code': 40007, 'text': '您的请求内容为空。'}},预期:code=40001 -[2022-04-22 17:23:14.186162] INFO: jiekou: 当前模块 断言测试结果 -[2022-04-22 17:23:14.186387] INFO: jiekou: 全部args参数参数信息 , () -[2022-04-22 17:23:14.186584] INFO: jiekou: 全部kwargs参数信息 , {'asserqiwang': 'code=40001', 'fanhuijson': {'code': 0, 'result': {'code': 40007, 'text': '您的请求内容为空。'}}} -[2022-04-22 17:23:14.186800] INFO: jiekou: 失败重试中次数用完,最后结果 -[2022-04-22 17:23:14.230780] INFO: jiekou: inputdata> 参数:{'password':'1222'}, url:/openapi/api ,返回:{'code': 0, 'result': {'code': 40007, 'text': '您的请求内容为空。'}},预期:code=40002 -[2022-04-22 17:23:14.231898] INFO: jiekou: 当前模块 断言测试结果 -[2022-04-22 17:23:14.232281] INFO: jiekou: 全部args参数参数信息 , () -[2022-04-22 17:23:14.232543] INFO: jiekou: 全部kwargs参数信息 , {'asserqiwang': 'code=40002', 'fanhuijson': {'code': 0, 'result': {'code': 40007, 'text': '您的请求内容为空。'}}} -[2022-04-22 17:23:14.232718] INFO: jiekou: 失败重试中 -[2022-04-22 17:23:14.282157] INFO: jiekou: inputdata> 参数:{'password':'1222'}, url:/openapi/api ,返回:{'code': 0, 'result': {'code': 40007, 'text': '您的请求内容为空。'}},预期:code=40002 -[2022-04-22 17:23:14.282379] INFO: jiekou: 当前模块 断言测试结果 -[2022-04-22 17:23:14.282497] INFO: jiekou: 全部args参数参数信息 , () -[2022-04-22 17:23:14.282610] INFO: jiekou: 全部kwargs参数信息 , {'asserqiwang': 'code=40002', 'fanhuijson': {'code': 0, 'result': {'code': 40007, 'text': '您的请求内容为空。'}}} -[2022-04-22 17:23:14.282731] INFO: jiekou: 失败重试中 -[2022-04-22 17:23:14.323761] INFO: jiekou: inputdata> 参数:{'password':'1222'}, url:/openapi/api ,返回:{'code': 0, 'result': {'code': 40007, 'text': '您的请求内容为空。'}},预期:code=40002 -[2022-04-22 17:23:14.324123] INFO: jiekou: 当前模块 断言测试结果 -[2022-04-22 17:23:14.324292] INFO: jiekou: 全部args参数参数信息 , () -[2022-04-22 17:23:14.324428] INFO: jiekou: 全部kwargs参数信息 , {'asserqiwang': 'code=40002', 'fanhuijson': {'code': 0, 'result': {'code': 40007, 'text': '您的请求内容为空。'}}} -[2022-04-22 17:23:14.324564] INFO: jiekou: 失败重试中 -[2022-04-22 17:23:14.374812] INFO: jiekou: inputdata> 参数:{'password':'1222'}, url:/openapi/api ,返回:{'code': 0, 'result': {'code': 40007, 'text': '您的请求内容为空。'}},预期:code=40002 -[2022-04-22 17:23:14.375129] INFO: jiekou: 当前模块 断言测试结果 -[2022-04-22 17:23:14.376257] INFO: jiekou: 全部args参数参数信息 , () -[2022-04-22 17:23:14.376474] INFO: jiekou: 全部kwargs参数信息 , {'asserqiwang': 'code=40002', 'fanhuijson': {'code': 0, 'result': {'code': 40007, 'text': '您的请求内容为空。'}}} -[2022-04-22 17:23:14.376783] INFO: jiekou: 失败重试中 -[2022-04-22 17:23:15.423984] INFO: jiekou: inputdata> 参数:{'password':'1222'}, url:/openapi/api ,返回:{'code': 0, 'result': {'code': 40007, 'text': '您的请求内容为空。'}},预期:code=40002 -[2022-04-22 17:23:15.424470] INFO: jiekou: 当前模块 断言测试结果 -[2022-04-22 17:23:15.424739] INFO: jiekou: 全部args参数参数信息 , () -[2022-04-22 17:23:15.425322] INFO: jiekou: 全部kwargs参数信息 , {'asserqiwang': 'code=40002', 'fanhuijson': {'code': 0, 'result': {'code': 40007, 'text': '您的请求内容为空。'}}} -[2022-04-22 17:23:15.425623] INFO: jiekou: 失败重试中次数用完,最后结果 diff --git a/result.txt b/result.txt index 3a58e6e..a37ba90 100755 --- a/result.txt +++ b/result.txt @@ -12,3 +12,5 @@ 2022-01-15 13:39:51.378087=2=0=2 2022-01-15 13:40:33.036679=2=0=2 2022-04-22 17:22:26.808171=2=0=2 +2023-02-19 18:06:12.486185=2=0=2 +2023-02-19 18:06:17.821946=2=0=2 diff --git a/run_excel_re.py b/run_excel_re.py index f3ffaf1..b19a399 100755 --- a/run_excel_re.py +++ b/run_excel_re.py @@ -4,11 +4,11 @@ @file: run_excel_re.py @time: 2017/6/9 12:45 """ -from Public.pyreport_excel import create +from public.pyreport_excel import create import os, threading, datetime from testCase.case import testinterface -from Public.get_excel import datacel -from Public.create_report import save_result +from public.get_excel import datacel +from public.create_report import save_result def start(): diff --git a/run_html.py b/run_html.py index c60581b..4af426b 100755 --- a/run_html.py +++ b/run_html.py @@ -2,9 +2,9 @@ # @Author : leizi import os, datetime, time from testCase.case import testinterface -from Public.py_Html import createHtml -from Public.get_excel import datacel -from Public.create_report import save_result +from public.py_Html import createHtml +from public.get_excel import datacel +from public.create_report import save_result import threading diff --git a/run_http_html.py b/run_http_html.py index 29492da..7659219 100755 --- a/run_http_html.py +++ b/run_http_html.py @@ -2,10 +2,10 @@ # @Author : leizi import os, datetime, time from testCase.case import testinterface -from Public.py_Html import createHtml -from Public.get_excel import datacel +from public.py_Html import createHtml +from public.get_excel import datacel -from Public.Dingtalk import send_ding +from public.Dingtalk import send_ding '''执行测试的主要文件''' diff --git a/run_new.py b/run_new.py index dffcd1a..7cab23e 100755 --- a/run_new.py +++ b/run_new.py @@ -2,7 +2,7 @@ # @Author : leizi from testCase.ddt_case import MyTest import unittest, time, os -from Public import BSTestRunner +from public import BSTestRunner BASH_DIR = "history" if __name__ == '__main__': diff --git a/testCase/__pycache__/case.cpython-38.pyc b/testCase/__pycache__/case.cpython-38.pyc index 8da6c21..f27471e 100644 Binary files a/testCase/__pycache__/case.cpython-38.pyc and b/testCase/__pycache__/case.cpython-38.pyc differ diff --git a/testCase/__pycache__/ddt_case.cpython-38.pyc b/testCase/__pycache__/ddt_case.cpython-38.pyc index f56f095..7a8d191 100644 Binary files a/testCase/__pycache__/ddt_case.cpython-38.pyc and b/testCase/__pycache__/ddt_case.cpython-38.pyc differ diff --git a/testCase/case.py b/testCase/case.py index a2ee96f..90b6203 100755 --- a/testCase/case.py +++ b/testCase/case.py @@ -3,15 +3,15 @@ # @Author : lileilei # @File : case.py from Interface.testFengzhuang import TestApi -from Public.get_excel import datacel -from Public.log import LOG, logger +from public.get_excel import datacel +from public.log import LOG, logger import os from config.config import Config_Try_Num, TestPlanUrl path = os.path.join(os.path.join(os.getcwd(), 'test_case_data'), 'case.xlsx') listid, listkey, listconeent, listurl, listfangshi, listqiwang, listname = datacel(path) -from Public.panduan import assert_in +from public.panduan import assert_in @logger('测试') diff --git a/testCase/ddt_case.py b/testCase/ddt_case.py index 8c4c466..ffaf560 100755 --- a/testCase/ddt_case.py +++ b/testCase/ddt_case.py @@ -1,8 +1,8 @@ import ddt, unittest, os, yaml from Interface.testFengzhuang import TestApi -from Public.get_excel import makedata -from Public.log import LOG -from Public.panduan import assertre +from public.get_excel import makedata +from public.log import LOG +from public.panduan import assertre from config.config import TestPlanUrl file_dir = os.path.join(os.getcwd(), 'test_Report') @@ -62,18 +62,18 @@ class MyTest(unittest.TestCase): parem.update({'info': parem_dict}) except: self.assertTrue(False, msg="参数格式不对") - + LOG.info(parem) api = TestApi(url=TestPlanUrl + data_test['url'], parame=parem, - method=data_test['fangshi']) - LOG.info('输入参数:url:%s,key:%s,参数:%s,请求方式:%s' % (data_test['url'], data_test['key'], data_test['coneent'], + method=data_test['method']) + LOG.info('输入参数:url:%s,key:%s,参数:%s,请求方式:%s' % (data_test['url'], data_test['key'], data_test['assertconnect'], LOG.info('输入参数:url:%s,key:%s,参数:%s,请求方式:%s' % ( - data_test['url'], data_test['key'], data_test['coneent'], - data_test['fangshi'])))) + data_test['url'], data_test['key'], data_test['assertconnect'], + data_test['method'])))) apijson = api.getJson() reslut = {} reslut[data_test['id']] = apijson write(reslut) LOG.info('返回结果:%s' % apijson) - assertall = assertre(asserassert=data_test['qiwang']) + assertall = assertre(asserassert=data_test['assertconnect']) self.assertNotEqual(dict(assertall), dict(apijson), msg='预期和返回不一致') diff --git a/testCase/dubbocase.py b/testCase/dubbocase.py index c478eae..eb91ee1 100755 --- a/testCase/dubbocase.py +++ b/testCase/dubbocase.py @@ -4,9 +4,9 @@ @time: 2018/3/29 12:47 """ from Interface.dubbo_feng import DubboInterface -from Public.log import LOG, logger -from Public.panduan import assert_in -from Public.get_excel import datacel +from public.log import LOG, logger +from public.panduan import assert_in +from public.get_excel import datacel import os path = os.path.join(os.path.join(os.getcwd(), 'test_case_data'), 'dubbocase.xlsx') diff --git a/testCase/log/jiekou-2022-02-19-14.log b/testCase/log/jiekou-2022-02-19-14.log deleted file mode 100755 index ad1ba2e..0000000 --- a/testCase/log/jiekou-2022-02-19-14.log +++ /dev/null @@ -1,7 +0,0 @@ -[2022-02-19 14:48:50.453153] INFO: jiekou: 当前模块 生成数据驱动所用数据 -[2022-02-19 14:48:50.454468] INFO: jiekou: 全部args参数参数信息 , () -[2022-02-19 14:48:50.454722] INFO: jiekou: 全部kwargs参数信息 , {} -[2022-02-19 14:48:50.454956] INFO: jiekou: 当前模块 解析测试用例文件 -[2022-02-19 14:48:50.455119] INFO: jiekou: 全部args参数参数信息 , ('/Users/lileilei/Desktop/testplan/jiekou-python3/testCase/test_case_data/case.xlsx',) -[2022-02-19 14:48:50.455266] INFO: jiekou: 全部kwargs参数信息 , {} -[2022-02-19 14:48:50.455514] INFO: jiekou: 打开测试用例失败,原因是:[Errno 2] No such file or directory: '/Users/lileilei/Desktop/testplan/jiekou-python3/testCase/test_case_data/case.xlsx' diff --git a/testCase/pytestCasetest.py b/testCase/pytestCasetest.py index e452d6c..e07d16f 100755 --- a/testCase/pytestCasetest.py +++ b/testCase/pytestCasetest.py @@ -3,13 +3,13 @@ @auther leizi ''' from Interface.testFengzhuang import TestApi -from Public.log import LOG -from Public.panduan import assertre +from public.log import LOG +from public.panduan import assertre from config.config import TestPlanUrl import pytest import os import yaml -from Public.get_excel import makedata +from public.get_excel import makedata file_dir = os.path.join(os.getcwd(), 'test_Report') file_reslut = os.path.join(file_dir, 'caseresult.yaml') diff --git a/test_Report/2022-0116.html b/test_Report/2022-0116.html deleted file mode 100755 index 50b4fb1..0000000 --- a/test_Report/2022-0116.html +++ /dev/null @@ -1,264 +0,0 @@ - - -
- - - - -开始时间: 2022-01-16 09:46:33
-持续时间: 0:00:00.097623
-状态: 通过 2
- -测试报告
--公用 -失败 -所有 -
-| 测试组/测试用例 - | 数量 - | 失败 - | 通过 - | 错误 - | 查看 - |
|---|---|---|---|---|---|
| testCase.ddt_case.MyTest | -2 | -2 | -0 | -0 | -详情 | -
test_api_1: 1.处理参数 |
- 通过 | -||||
test_api_2: 1.处理参数 |
- 通过 | -||||
| 总计 | -2 | -2 | -0 | -0 | -- |
开始时间: 2022-04-22 21:32:40
-持续时间: 0:00:00.111331
+开始时间: 2023-02-19 18:10:47
+持续时间: 0:00:00.099009
状态: 通过 2
测试报告
@@ -154,7 +154,7 @@ optionsone = { xAxis: { type: 'category', boundaryGap: false, - data: ['2022_04_22_21_06_05', '2022_01_16_09_43_50', '2022_04_22_21_22_01', '2022_04_22_21_29_08', '2022_01_16_09_43_56', '2022_01_16_09_41_37', '2022_04_22_17_22_51', '2022_01_16_09_39_12', '2022_01_15_14_26_21', '2022_01_16_09_41_00', '2022_01_16_09_39_32', '2022_01_16_09_44_26', '2022_04_22_21_32_40', '2022_01_16_09_46_33', '2022_01_16_09_43_15', '2022_01_16_09_44_35', '2022_01_16_09_45_12', '2022_01_16_09_39_51', '2022_01_16_09_42_37', '2022_01_16_09_38_16', '2022_01_16_09_36_13'] + data: ['2022_04_22_21_06_05', '2022_01_16_09_43_50', '2023_02_19_18_10_30', '2022_04_22_21_22_01', '2022_04_22_21_29_08', '2022_01_16_09_43_56', '2022_01_16_09_41_37', '2022_04_22_17_22_51', '2022_01_16_09_39_12', '2022_01_15_14_26_21', '2023_02_19_18_10_47', '2022_01_16_09_41_00', '2022_01_16_09_39_32', '2022_01_16_09_44_26', '2022_04_22_21_32_40', '2022_01_16_09_46_33', '2022_01_16_09_43_15', '2023_02_19_18_06_29', '2023_02_19_18_08_39', '2022_01_16_09_44_35', '2022_01_16_09_45_12', '2022_01_16_09_39_51', '2022_01_16_09_42_37', '2022_01_16_09_38_16', '2022_01_16_09_36_13'] }, yAxis: { type: 'value' @@ -164,19 +164,19 @@ optionsone = { name: '成功', type: 'line', stack: '总量', - data: ['2', '2', '2', '2', '2', '2', '2', '0', '2', '0', '0', '2', '2', '2', '2', '2', '2', '0', '2', '0', '0'] + data: ['2', '2', '2', '2', '2', '2', '2', '2', '0', '2', '2', '0', '0', '2', '2', '2', '2', '2', '2', '2', '2', '0', '2', '0', '0'] }, { name: '失败', type: 'line', stack: '总量', - data: ['0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0'] + data: ['0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0'] }, { name: '错误', type: 'line', stack: '总量', - data: ['0', '0', '0', '0', '0', '0', '0', '2', '0', '2', '2', '0', '0', '0', '0', '0', '0', '2', '0', '2', '2'] + data: ['0', '0', '0', '0', '0', '0', '0', '0', '2', '0', '0', '2', '2', '0', '0', '0', '0', '0', '0', '0', '0', '2', '0', '2', '2'] } ] diff --git a/test_Report/20220115-result.xls b/test_Report/20230219-result.xls old mode 100755 new mode 100644 similarity index 100% rename from test_Report/20220115-result.xls rename to test_Report/20230219-result.xls diff --git a/test_Report/202302191806-result.html b/test_Report/202302191806-result.html new file mode 100644 index 0000000..cd896e2 --- /dev/null +++ b/test_Report/202302191806-result.html @@ -0,0 +1,117 @@ + + + +| 开始时间: 2023-02-19 18:06:22.576639 | +结束时间: 2023-02-19 18:06:23.111143 | +耗时: 0:00:00.534504 | +结果: + Pass: 0 + Fail: 2 + exception: 0 + weizhicuowu : 0 | + +
| 用例ID | +用例名字 | +key | +请求内容 | +url | +请求方式 | +预期 | +实际返回 | +结果 | +
| 1.0 | +图灵api接口 | +aaaa | +{'password':'1222'} | +/openapi/api | +POST | +code=40001 | +{'code': 40007, 'text': '您的请求内容为空。'} | +fail | +
| 2.0 | +图灵api接口 | +dfeb1cc8125943d29764a2f2f5c33739 | +{'password':'1222'} | +/openapi/api | +POST | +code=40002 | +{'code': 40007, 'text': '您的请求内容为空。'} | +fail | +