初始化
0 parents
Showing
114 changed files
with
7112 additions
and
0 deletions
.DS_Store
0 → 100644
No preview for this file type
.gitignore
0 → 100644
| 1 | # Created by .ignore support plugin (hsz.mobi) | ||
| 2 | ### Python template | ||
| 3 | # Byte-compiled / optimized / DLL files | ||
| 4 | __pycache__/ | ||
| 5 | *.py[cod] | ||
| 6 | *$py.class | ||
| 7 | |||
| 8 | # C extensions | ||
| 9 | *.so | ||
| 10 | |||
| 11 | # Distribution / packaging | ||
| 12 | .Python | ||
| 13 | build/ | ||
| 14 | develop-eggs/ | ||
| 15 | dist/ | ||
| 16 | downloads/ | ||
| 17 | eggs/ | ||
| 18 | .eggs/ | ||
| 19 | lib/ | ||
| 20 | lib64/ | ||
| 21 | parts/ | ||
| 22 | sdist/ | ||
| 23 | var/ | ||
| 24 | wheels/ | ||
| 25 | .idea | ||
| 26 | pip-wheel-metadata/ | ||
| 27 | share/python-wheels/ | ||
| 28 | *.egg-info/ | ||
| 29 | .installed.cfg | ||
| 30 | *.egg | ||
| 31 | MANIFEST | ||
| 32 | |||
| 33 | # PyInstaller | ||
| 34 | # Usually these files are written by a python script from a template | ||
| 35 | # before PyInstaller builds the exe, so as to inject date/other infos into it. | ||
| 36 | *.manifest | ||
| 37 | *.spec | ||
| 38 | |||
| 39 | # Installer logs | ||
| 40 | pip-log.txt | ||
| 41 | pip-delete-this-directory.txt | ||
| 42 | |||
| 43 | # Unit test / coverage reports | ||
| 44 | htmlcov/ | ||
| 45 | .tox/ | ||
| 46 | .nox/ | ||
| 47 | .coverage | ||
| 48 | .coverage.* | ||
| 49 | .cache | ||
| 50 | nosetests.xml | ||
| 51 | coverage.xml | ||
| 52 | *.cover | ||
| 53 | .hypothesis/ | ||
| 54 | .pytest_cache/ | ||
| 55 | |||
| 56 | # Translations | ||
| 57 | *.mo | ||
| 58 | *.pot | ||
| 59 | |||
| 60 | # Django stuff: | ||
| 61 | *.log | ||
| 62 | local_settings.py | ||
| 63 | db.sqlite3 | ||
| 64 | |||
| 65 | # Flask stuff: | ||
| 66 | instance/ | ||
| 67 | .webassets-cache | ||
| 68 | |||
| 69 | # Scrapy stuff: | ||
| 70 | .scrapy | ||
| 71 | |||
| 72 | # Sphinx documentation | ||
| 73 | docs/_build/ | ||
| 74 | |||
| 75 | # PyBuilder | ||
| 76 | target/ | ||
| 77 | |||
| 78 | # Jupyter Notebook | ||
| 79 | .ipynb_checkpoints | ||
| 80 | |||
| 81 | # IPython | ||
| 82 | profile_default/ | ||
| 83 | ipython_config.py | ||
| 84 | |||
| 85 | # pyenv | ||
| 86 | .python-version | ||
| 87 | |||
| 88 | # pipenv | ||
| 89 | # According to pypa/pipenv#598, it is recommended to include Pipfile.lock in version control. | ||
| 90 | # However, in case of collaboration, if having platform-specific dependencies or dependencies | ||
| 91 | # having no cross-platform support, pipenv may install dependencies that don't work, or not | ||
| 92 | # install all needed dependencies. | ||
| 93 | #Pipfile.lock | ||
| 94 | |||
| 95 | # celery beat schedule file | ||
| 96 | celerybeat-schedule | ||
| 97 | |||
| 98 | # SageMath parsed files | ||
| 99 | *.sage.py | ||
| 100 | |||
| 101 | # Environments | ||
| 102 | .env | ||
| 103 | .venv | ||
| 104 | env/ | ||
| 105 | venv/ | ||
| 106 | ENV/ | ||
| 107 | env.bak/ | ||
| 108 | venv.bak/ | ||
| 109 | |||
| 110 | # Spyder project settings | ||
| 111 | .spyderproject | ||
| 112 | .spyproject | ||
| 113 | |||
| 114 | # Rope project settings | ||
| 115 | .ropeproject | ||
| 116 | |||
| 117 | # mkdocs documentation | ||
| 118 | /site | ||
| 119 | |||
| 120 | # mypy | ||
| 121 | .mypy_cache/ | ||
| 122 | .dmypy.json | ||
| 123 | dmypy.json | ||
| 124 | |||
| 125 | # Pyre type checker | ||
| 126 | .pyre/ | ||
| 127 |
README.txt
0 → 100644
| 1 | 1、设置运行环境,util/HandleJenkins.py | ||
| 2 | 2、设置项目数据库,util/HandleDB.py | ||
| 3 | 3、设置redis连接db,config/vendorList.py | ||
| 4 | 4、设置APP登陆方式(统一登录、无统一登陆),config/vendorList.py | ||
| 5 | 5、新增有统一登陆项目,需要在excel中添加该项目的可登录账号信息,A_api_case.xlsx里的app登录sheet | ||
| 6 | 6、新增保全项目,需要在excel里添加订单号(找保司要,订单不定期更新),A_api_case.xlsx里的查询保司订单sheet | ||
| ... | \ No newline at end of file | ... | \ No newline at end of file |
all_run.py
0 → 100644
| 1 | #!/usr/bin/env python | ||
| 2 | # -*- coding: utf-8 -*- | ||
| 3 | # @Time : 2021/7/16 下午4:58 | ||
| 4 | # @Author : 付孟奇 | ||
| 5 | |||
| 6 | import unittest | ||
| 7 | |||
| 8 | from unittestreport import TestRunner | ||
| 9 | from util.HandleJenkins import config | ||
| 10 | from util.swaggerApi import swaggerApi | ||
| 11 | from config.vendorPath import case_path | ||
| 12 | from util.getSuitCase import get_suit | ||
| 13 | |||
| 14 | |||
| 15 | # 执行的项目文件目录 | ||
| 16 | pro = config['pro'] | ||
| 17 | email_data = config['email'] | ||
| 18 | email = str(email_data).split(',') | ||
| 19 | if len(email) > 1: | ||
| 20 | email = list(email) | ||
| 21 | title = config['title'] | ||
| 22 | env = config['env'] | ||
| 23 | |||
| 24 | # 获取swagger返回的api信息并保存到swaggerApi.json | ||
| 25 | swaggerApi | ||
| 26 | |||
| 27 | # 执行文件地址 | ||
| 28 | suite_case = get_suit() | ||
| 29 | |||
| 30 | runner = TestRunner(suite_case, | ||
| 31 | filename="report.html", | ||
| 32 | report_dir='./report', | ||
| 33 | title=title, | ||
| 34 | tester='测试组', | ||
| 35 | desc='接口自动化测试报告', | ||
| 36 | templates=1, | ||
| 37 | pro=pro, | ||
| 38 | env=env | ||
| 39 | ) | ||
| 40 | runner.run() | ||
| 41 | runner.send_email(host="smtp.exmail.qq.com", | ||
| 42 | port=465, | ||
| 43 | user="fumengqi@situdata.com", | ||
| 44 | password="Fz315824", | ||
| 45 | to_addrs=email) |
case/AppAuthLogin.py
0 → 100644
| 1 | #!/usr/bin/env python | ||
| 2 | # -*- coding: utf-8 -*- | ||
| 3 | # @Time : 2021/7/16 下午5:36 | ||
| 4 | # @Author : 付孟奇 | ||
| 5 | |||
| 6 | import unittest, requests | ||
| 7 | from config.vendorHost import vendor_host | ||
| 8 | from config import vendorList | ||
| 9 | from util.log import logger | ||
| 10 | from util.generate import getTestCase | ||
| 11 | from util.HandleJson import file_readAPI | ||
| 12 | from util.HandleJson import file_updata_global | ||
| 13 | from util.HandleJenkins import config | ||
| 14 | |||
| 15 | |||
| 16 | class AppAuthLogin(unittest.TestCase): | ||
| 17 | |||
| 18 | def testFunc(self): | ||
| 19 | '''app登录''' | ||
| 20 | data_list = getTestCase('A_api_case.xlsx', 'app登录') | ||
| 21 | for j in range(len(data_list)): | ||
| 22 | if data_list[j]['vendor'] == config['pro']: # 处理统一登录和无统一登陆参数问题 | ||
| 23 | self.getTest(data_list[j]) | ||
| 24 | else: | ||
| 25 | logger.info('该case忽略') | ||
| 26 | |||
| 27 | def getTest(self, data): | ||
| 28 | tcname = data['tc_name'] | ||
| 29 | code = int(data['code']) | ||
| 30 | password = data['password'] | ||
| 31 | username = data['username'] | ||
| 32 | |||
| 33 | api_type = 'cl' | ||
| 34 | |||
| 35 | logger.info('********************【' + tcname + '】接口测试开始!' + '********************') | ||
| 36 | |||
| 37 | headers = { | ||
| 38 | 'Content-Type': 'application/json', | ||
| 39 | } | ||
| 40 | |||
| 41 | payload = { | ||
| 42 | "username": username, | ||
| 43 | "password": password, | ||
| 44 | "deviceNum": "078424F3-26DE-4A76-BC66-E4CD2C55BB0A" | ||
| 45 | } | ||
| 46 | logger.info('【' + tcname + '】的接口入参为:' + str(payload)) | ||
| 47 | |||
| 48 | url = vendor_host + api_type + file_readAPI(api_type, 'loginUsingPOST') | ||
| 49 | response = requests.request('POST', url, headers=headers, json=payload) | ||
| 50 | |||
| 51 | if response.status_code is 200: | ||
| 52 | res = response.json() | ||
| 53 | self.assertEqual(res['code'], code, msg=str(res)) | ||
| 54 | if res['code'] == 0: | ||
| 55 | file_updata_global('app_login', 'token', res['result']['token']) | ||
| 56 | file_updata_global('app_login', 'directlyAgencyName', res['result']['directlyAgencyName']) | ||
| 57 | logger.info('【' + tcname + '】的接口返回参数为:' + str(res)) | ||
| 58 | else: | ||
| 59 | logger.info('【' + tcname + '】的接口返回参数为:' + str(res)) | ||
| 60 | else: | ||
| 61 | logger.error(response.text) | ||
| 62 | |||
| 63 | |||
| 64 | if __name__ == '__main__': | ||
| 65 | unittest.main() |
case/AppAuthSts.py
0 → 100644
| 1 | #!/usr/bin/env python | ||
| 2 | # -*- coding: utf-8 -*- | ||
| 3 | # @Time : 2021/7/16 下午5:36 | ||
| 4 | # @Author : 付孟奇 | ||
| 5 | |||
| 6 | import unittest, requests | ||
| 7 | from config.vendorHost import vendor_host | ||
| 8 | from config.vendorPath import global_path | ||
| 9 | from util.generate import getTestCase | ||
| 10 | from util.log import logger | ||
| 11 | from util.HandleJson import file_readAPI, file_read_global | ||
| 12 | |||
| 13 | |||
| 14 | class AppAuthSts(unittest.TestCase): | ||
| 15 | |||
| 16 | def testFunc(self): | ||
| 17 | '''获取鉴权''' | ||
| 18 | data_list = getTestCase('A_api_case.xlsx', '获取鉴权') | ||
| 19 | for i in range(len(data_list)): | ||
| 20 | self.getTest(data_list[i]) | ||
| 21 | |||
| 22 | def getTest(self, data): | ||
| 23 | tcname = data['tc_name'] | ||
| 24 | code = int(data['code']) | ||
| 25 | videoUrlNums = data['videoUrlNums'] | ||
| 26 | |||
| 27 | api_type = 'cl' | ||
| 28 | |||
| 29 | logger.info('********************【' + tcname + '】接口测试开始!' + '********************') | ||
| 30 | |||
| 31 | headers = { | ||
| 32 | 'Content-Type': 'application/json', | ||
| 33 | 'X-Auth-Token': file_read_global('app_login', 'token') | ||
| 34 | } | ||
| 35 | payload = { | ||
| 36 | "videoUrlNums": videoUrlNums | ||
| 37 | } | ||
| 38 | logger.info('【' + tcname + '】的接口入参为:' + str(payload)) | ||
| 39 | |||
| 40 | url = vendor_host + api_type + file_readAPI(api_type, 'ossStsUsingPOST') | ||
| 41 | response = requests.request('POST', url, headers=headers, json=payload) | ||
| 42 | if response.status_code is 200: | ||
| 43 | res = response.json() | ||
| 44 | self.assertEqual(res['code'], code, msg=str(res)) | ||
| 45 | logger.info('【' + tcname + '】的接口返回参数为:' + str(res)) | ||
| 46 | else: | ||
| 47 | logger.info(response.text) |
case/AppFileList.py
0 → 100644
| 1 | #!/usr/bin/env python | ||
| 2 | # -*- coding: utf-8 -*- | ||
| 3 | # @Time : 2021/7/16 下午5:36 | ||
| 4 | # @Author : 付孟奇 | ||
| 5 | |||
| 6 | import unittest, requests | ||
| 7 | from config.vendorHost import vendor_host | ||
| 8 | from config.vendorPath import global_path | ||
| 9 | from util.generate import getTestCase | ||
| 10 | from util.log import logger | ||
| 11 | from util.HandleJson import file_readAPI, file_read_global | ||
| 12 | |||
| 13 | |||
| 14 | class AppFileList(unittest.TestCase): | ||
| 15 | |||
| 16 | def testFunc(self): | ||
| 17 | '''A端文件列表''' | ||
| 18 | data_list = getTestCase('A_api_case.xlsx', '文件列表') | ||
| 19 | for i in range(len(data_list)): | ||
| 20 | self.getTest(data_list[i]) | ||
| 21 | |||
| 22 | def getTest(self, data): | ||
| 23 | tcname = data['tc_name'] | ||
| 24 | code = int(data['code']) | ||
| 25 | |||
| 26 | api_type = 'cl' | ||
| 27 | |||
| 28 | logger.info('********************【' + tcname + '】接口测试开始!' + '********************') | ||
| 29 | |||
| 30 | headers = { | ||
| 31 | 'Content-Type': 'application/json', | ||
| 32 | 'X-Auth-Token': file_read_global('app_login', 'token') | ||
| 33 | } | ||
| 34 | payload = { | ||
| 35 | "orderRecordId": file_read_global('order', 'orderRecordId') | ||
| 36 | } | ||
| 37 | logger.info('【' + tcname + '】的接口入参为:' + str(payload)) | ||
| 38 | |||
| 39 | url = vendor_host + api_type + file_readAPI(api_type, 'agentFileListUsingPOST') | ||
| 40 | response = requests.request('POST', url, headers=headers, json=payload) | ||
| 41 | if response.status_code is 200: | ||
| 42 | res = response.json() | ||
| 43 | self.assertEqual(res['code'], code, msg=str(res)) | ||
| 44 | logger.info('【' + tcname + '】的接口返回参数为:' + str(res)) | ||
| 45 | else: | ||
| 46 | logger.info(response.text) |
case/AppHomeList.py
0 → 100644
| 1 | #!/usr/bin/env python | ||
| 2 | # -*- coding: utf-8 -*- | ||
| 3 | # @Time : 2021/8/12 下午5:35 | ||
| 4 | # @Author : 付孟奇 | ||
| 5 | |||
| 6 | # !/usr/bin/env python | ||
| 7 | # -*- coding: utf-8 -*- | ||
| 8 | # @Time : 2021/7/16 下午5:36 | ||
| 9 | # @Author : 付孟奇 | ||
| 10 | |||
| 11 | import unittest, requests | ||
| 12 | from util.generate import getTestCase | ||
| 13 | from util.log import logger | ||
| 14 | from util.HandleJson import file_read_global | ||
| 15 | from config.vendorHost import vendor_host | ||
| 16 | from config.vendorPath import global_path | ||
| 17 | from util.HandleJson import file_readAPI | ||
| 18 | |||
| 19 | |||
| 20 | class AppHomeList(unittest.TestCase): | ||
| 21 | |||
| 22 | def testFunc(self): | ||
| 23 | '''app首页展示''' | ||
| 24 | data_list = getTestCase('A_api_case.xlsx', 'app首页展示') | ||
| 25 | for i in range(len(data_list)): | ||
| 26 | self.getTest(data_list[i]) | ||
| 27 | |||
| 28 | def getTest(self, data): | ||
| 29 | tcname = data['tc_name'] | ||
| 30 | code = int(data['code']) | ||
| 31 | |||
| 32 | api_type = 'cl' | ||
| 33 | |||
| 34 | logger.info('********************【' + tcname + '】接口测试开始!' + '********************') | ||
| 35 | |||
| 36 | headers = { | ||
| 37 | 'Content-Type': 'application/json', | ||
| 38 | 'X-Auth-Token': file_read_global('app_login', 'token') | ||
| 39 | } | ||
| 40 | payload = { | ||
| 41 | "wait2UploadOrderList": [ | ||
| 42 | 0 | ||
| 43 | ] | ||
| 44 | } | ||
| 45 | logger.info('【' + tcname + '】的接口入参为:' + str(payload)) | ||
| 46 | |||
| 47 | url = vendor_host + api_type + file_readAPI(api_type, 'listCountUsingPOST') | ||
| 48 | response = requests.request('POST', url, headers=headers, json=payload) | ||
| 49 | if response.status_code is 200: | ||
| 50 | res = response.json() | ||
| 51 | self.assertEqual(res['code'], code, msg=str(res)) | ||
| 52 | logger.info('【' + tcname + '】的接口返回参数为:' + str(res)) | ||
| 53 | else: | ||
| 54 | logger.info(response.text) |
case/AppListCount.py
0 → 100644
| 1 | #!/usr/bin/env python | ||
| 2 | # -*- coding: utf-8 -*- | ||
| 3 | # @Time : 2021/8/12 下午5:35 | ||
| 4 | # @Author : 付孟奇 | ||
| 5 | |||
| 6 | # !/usr/bin/env python | ||
| 7 | # -*- coding: utf-8 -*- | ||
| 8 | # @Time : 2021/7/16 下午5:36 | ||
| 9 | # @Author : 付孟奇 | ||
| 10 | |||
| 11 | import unittest, requests | ||
| 12 | from util.generate import getTestCase | ||
| 13 | from util.log import logger | ||
| 14 | from util.HandleJson import file_read_global | ||
| 15 | from config.vendorHost import vendor_host | ||
| 16 | from config.vendorPath import global_path | ||
| 17 | from util.HandleJson import file_readAPI | ||
| 18 | |||
| 19 | |||
| 20 | class AppListCount(unittest.TestCase): | ||
| 21 | |||
| 22 | def testFunc(self): | ||
| 23 | '''app订单列表''' | ||
| 24 | data_list = getTestCase('A_api_case.xlsx', 'app订单列表') | ||
| 25 | for i in range(len(data_list)): | ||
| 26 | self.getTest(data_list[i]) | ||
| 27 | |||
| 28 | def getTest(self, data): | ||
| 29 | tcname = data['tc_name'] | ||
| 30 | code = int(data['code']) | ||
| 31 | listType = data['listType'] | ||
| 32 | |||
| 33 | api_type = 'cl' | ||
| 34 | |||
| 35 | logger.info('********************【' + tcname + '】接口测试开始!' + '********************') | ||
| 36 | |||
| 37 | headers = { | ||
| 38 | 'Content-Type': 'application/json', | ||
| 39 | 'X-Auth-Token': file_read_global('app_login', 'token') | ||
| 40 | } | ||
| 41 | payload = { | ||
| 42 | "wait2UploadOrderList": [ | ||
| 43 | |||
| 44 | ], | ||
| 45 | "listType": listType, | ||
| 46 | "name": "", | ||
| 47 | "perPage": "10", | ||
| 48 | "page": "1" | ||
| 49 | } | ||
| 50 | logger.info('【' + tcname + '】的接口入参为:' + str(payload)) | ||
| 51 | |||
| 52 | url = vendor_host + api_type + file_readAPI(api_type, 'listUsingPOST') | ||
| 53 | response = requests.request('POST', url, headers=headers, json=payload) | ||
| 54 | if response.status_code is 200: | ||
| 55 | res = response.json() | ||
| 56 | self.assertEqual(res['code'], code, msg=str(res)) | ||
| 57 | logger.info('【' + tcname + '】的接口返回参数为:' + str(res)) | ||
| 58 | else: | ||
| 59 | logger.info(response.text) | ||
| 60 | |||
| 61 | |||
| 62 | if __name__ == '__main__': | ||
| 63 | unittest.main() |
case/AppOrderAdd.py
0 → 100644
| 1 | #!/usr/bin/env python | ||
| 2 | # -*- coding: utf-8 -*- | ||
| 3 | # @Time : 2021/8/12 下午5:35 | ||
| 4 | # @Author : 付孟奇 | ||
| 5 | |||
| 6 | import unittest, requests | ||
| 7 | from config.vendorHost import vendor_host | ||
| 8 | from config.vendorPath import add_order_type_1_path | ||
| 9 | from config import vendorList | ||
| 10 | from util.generate import getTestCase | ||
| 11 | from util.log import logger | ||
| 12 | from util.HandleJson import file_read_global, file_read, file_readAPI, file_updata_global | ||
| 13 | from util.HandleTime import handle_time | ||
| 14 | from util.HandleJenkins import config | ||
| 15 | |||
| 16 | |||
| 17 | class AppOrderAdd(unittest.TestCase): | ||
| 18 | def testFunc(self): | ||
| 19 | '''创建纸质新契约订单''' | ||
| 20 | data_list = getTestCase('A_api_case.xlsx', '创建订单') | ||
| 21 | for i in range(len(data_list)): | ||
| 22 | if config['pro'] in vendorList.add_order_type_2: | ||
| 23 | self.getTest(data_list[i]) | ||
| 24 | else: | ||
| 25 | logger.info('掠过此条case') | ||
| 26 | |||
| 27 | def getTest(self, data): | ||
| 28 | tcname = data['tc_name'] | ||
| 29 | code = int(data['code']) | ||
| 30 | |||
| 31 | api_type = 'cl' | ||
| 32 | |||
| 33 | logger.info('********************【' + tcname + '】接口测试开始!' + '********************') | ||
| 34 | |||
| 35 | headers = { | ||
| 36 | 'Content-Type': 'application/json', | ||
| 37 | 'X-Auth-Token': file_read_global('app_login', 'token') | ||
| 38 | } | ||
| 39 | |||
| 40 | payload = file_read(add_order_type_1_path) | ||
| 41 | payload['订单基本信息']['销售渠道'] = file_read_global('channel', 'channel_name') | ||
| 42 | payload['订单基本信息']['双录创建日期'] = handle_time.timeTimeYMD() | ||
| 43 | payload['订单基本信息']['机构名称'] = file_read_global('app_login', 'directlyAgencyName') | ||
| 44 | payload['订单基本信息']['投保单号'] = 'api' + handle_time.timeStamp_10() | ||
| 45 | payload['主险信息'][0]['产品类型'] = file_read_global('product', 'productTypeName') | ||
| 46 | payload['主险信息'][0]['产品名称'] = file_read_global('product', 'product_name') | ||
| 47 | payload['主险信息'][0]['产品代码'] = file_read_global('product', 'product_code') | ||
| 48 | payload['附加险信息'][0]['产品类型'] = file_read_global('product', 'productTypeName') | ||
| 49 | payload['附加险信息'][0]['产品名称'] = file_read_global('product', 'product_name_att') | ||
| 50 | payload['附加险信息'][0]['产品代码'] = file_read_global('product', 'product_code_att') | ||
| 51 | |||
| 52 | |||
| 53 | logger.info('【' + tcname + '】的接口入参为:' + str(payload)) | ||
| 54 | |||
| 55 | url = vendor_host + api_type + file_readAPI(api_type, 'handAddOrderUsingPOST') | ||
| 56 | response = requests.request('POST', url, headers=headers, json=payload) | ||
| 57 | if response.status_code is 200: | ||
| 58 | res = response.json() | ||
| 59 | self.assertEqual(res['code'], code, msg=str(res)) | ||
| 60 | if res['code'] == 0: | ||
| 61 | file_updata_global('order', 'orderRecordId', res['result']['orderRecordId']) | ||
| 62 | file_updata_global('order', 'orderId', res['result']['orderId']) | ||
| 63 | logger.info('【' + tcname + '】的接口返回参数为:' + str(res)) | ||
| 64 | else: | ||
| 65 | logger.info('【' + tcname + '】的接口返回参数为:' + str(res)) | ||
| 66 | else: | ||
| 67 | logger.info(response.text) |
case/AppOrderAddQuota.py
0 → 100644
| 1 | #!/usr/bin/env python | ||
| 2 | # -*- coding: utf-8 -*- | ||
| 3 | # @Time : 2021/8/12 下午5:35 | ||
| 4 | # @Author : 付孟奇 | ||
| 5 | |||
| 6 | import unittest, requests | ||
| 7 | from config.vendorHost import vendor_host | ||
| 8 | from config.vendorPath import add_order_type_2_path | ||
| 9 | from config import vendorList | ||
| 10 | from util.generate import getTestCase | ||
| 11 | from util.log import logger | ||
| 12 | from util.HandleJson import file_read_global, file_read, file_readAPI, file_updata_global | ||
| 13 | from util.HandleTime import handle_time | ||
| 14 | from util.HandleJenkins import config | ||
| 15 | |||
| 16 | |||
| 17 | class AppOrderAddQuota(unittest.TestCase): | ||
| 18 | def testFunc(self): | ||
| 19 | '''创建纸质保全订单''' | ||
| 20 | data_list = getTestCase('A_api_case.xlsx', '创建订单') | ||
| 21 | for i in range(len(data_list)): | ||
| 22 | if config['pro'] in vendorList.add_order_type_2: | ||
| 23 | self.getTest(data_list[i]) | ||
| 24 | else: | ||
| 25 | logger.info('掠过此条case') | ||
| 26 | |||
| 27 | def getTest(self, data): | ||
| 28 | tcname = data['tc_name'] | ||
| 29 | code = int(data['code']) | ||
| 30 | |||
| 31 | api_type = 'cl' | ||
| 32 | |||
| 33 | logger.info('********************【' + tcname + '】接口测试开始!' + '********************') | ||
| 34 | |||
| 35 | headers = { | ||
| 36 | 'Content-Type': 'application/json', | ||
| 37 | 'X-Auth-Token': file_read_global('app_login', 'token') | ||
| 38 | } | ||
| 39 | |||
| 40 | payload = file_read(add_order_type_2_path) | ||
| 41 | pay_list = [] | ||
| 42 | pa_dic = {} | ||
| 43 | payload['订单基本信息']['保全项'] = '新增附加险' | ||
| 44 | payload['订单基本信息']['保全日期'] = handle_time.timeTimeYMD() | ||
| 45 | payload['新增附加险'] = pay_list | ||
| 46 | pa_dic['每期缴费金额'] = '5' | ||
| 47 | pa_dic['被保人'] = payload['保险信息'][0]['被保人'] | ||
| 48 | pa_dic['产品种类'] = '附加险' | ||
| 49 | pa_dic['缴费期限'] = '1年' | ||
| 50 | pa_dic['产品类型'] = file_read_global('product', 'productTypeName') | ||
| 51 | pa_dic['缴费方式'] = '趸缴' | ||
| 52 | pa_dic['产品代码'] = file_read_global('product', 'product_code') | ||
| 53 | pa_dic['保险期限'] = '1年' | ||
| 54 | pa_dic['监护人名称'] = 'apitest' | ||
| 55 | pa_dic['附加险名称'] = file_read_global('product', 'product_name_att') | ||
| 56 | pay_list.append(pa_dic) | ||
| 57 | |||
| 58 | logger.info('【' + tcname + '】的接口入参为:' + str(payload)) | ||
| 59 | |||
| 60 | url = vendor_host + api_type + file_readAPI(api_type, 'addQuotaUsingPOST') | ||
| 61 | response = requests.request('POST', url, headers=headers, json=payload) | ||
| 62 | if response.status_code is 200: | ||
| 63 | res = response.json() | ||
| 64 | self.assertEqual(res['code'], code, msg=str(res)) | ||
| 65 | logger.info('【' + tcname + '】的接口返回参数为:' + str(res)) | ||
| 66 | if res['code'] == 0: | ||
| 67 | file_updata_global('order', 'policyId', res['result']['orderRecordId']) | ||
| 68 | file_updata_global('order', 'policyNo', res['result']['policyNo']) | ||
| 69 | file_updata_global('order', 'selfNo', res['result']['selfNo']) | ||
| 70 | else: | ||
| 71 | logger.info(response.text) |
case/AppOrderDetail.py
0 → 100644
| 1 | #!/usr/bin/env python | ||
| 2 | # -*- coding: utf-8 -*- | ||
| 3 | # @Time : 2021/7/16 下午5:36 | ||
| 4 | # @Author : 付孟奇 | ||
| 5 | |||
| 6 | import unittest, requests | ||
| 7 | from config.vendorHost import vendor_host | ||
| 8 | from config.vendorPath import global_path | ||
| 9 | from util.generate import getTestCase | ||
| 10 | from util.log import logger | ||
| 11 | from util.HandleJson import file_readAPI, file_read_global | ||
| 12 | |||
| 13 | |||
| 14 | class AppOrderDetail(unittest.TestCase): | ||
| 15 | |||
| 16 | def testFunc(self): | ||
| 17 | '''订单详情接口''' | ||
| 18 | data_list = getTestCase('A_api_case.xlsx', '订单详情') | ||
| 19 | for i in range(len(data_list)): | ||
| 20 | self.getTest(data_list[i]) | ||
| 21 | |||
| 22 | def getTest(self, data): | ||
| 23 | tcname = data['tc_name'] | ||
| 24 | code = int(data['code']) | ||
| 25 | |||
| 26 | api_type = 'cl' | ||
| 27 | |||
| 28 | logger.info('********************【' + tcname + '】接口测试开始!' + '********************') | ||
| 29 | |||
| 30 | headers = { | ||
| 31 | 'Content-Type': 'application/json', | ||
| 32 | 'X-Auth-Token': file_read_global('app_login', 'token') | ||
| 33 | } | ||
| 34 | payload = { | ||
| 35 | "orderRecordId": file_read_global('order', 'orderRecordId') | ||
| 36 | } | ||
| 37 | logger.info('【' + tcname + '】的接口入参为:' + str(payload)) | ||
| 38 | |||
| 39 | url = vendor_host + api_type + file_readAPI(api_type, 'detailUsingPOST') | ||
| 40 | response = requests.request('POST', url, headers=headers, json=payload) | ||
| 41 | if response.status_code is 200: | ||
| 42 | res = response.json() | ||
| 43 | self.assertEqual(res['code'], code, msg=str(res)) | ||
| 44 | logger.info('【' + tcname + '】的接口返回参数为:' + str(res)) | ||
| 45 | else: | ||
| 46 | logger.info(response.text) |
case/AppOrderFace.py
0 → 100644
| 1 | #!/usr/bin/env python | ||
| 2 | # -*- coding: utf-8 -*- | ||
| 3 | # @Time : 2021/7/16 下午5:36 | ||
| 4 | # @Author : 付孟奇 | ||
| 5 | |||
| 6 | import unittest, requests | ||
| 7 | from config.vendorHost import vendor_host | ||
| 8 | from config.vendorPath import global_path, order_idCard_path | ||
| 9 | from util.generate import getTestCase | ||
| 10 | from util.log import logger | ||
| 11 | from util.HandleJson import file_readAPI, file_read_global, file_base_64 | ||
| 12 | |||
| 13 | |||
| 14 | class AppOrderFace(unittest.TestCase): | ||
| 15 | |||
| 16 | def testFunc(self): | ||
| 17 | '''人脸比对''' | ||
| 18 | data_list = getTestCase('A_api_case.xlsx', '人脸比对') | ||
| 19 | for i in range(len(data_list)): | ||
| 20 | self.getTest(data_list[i]) | ||
| 21 | |||
| 22 | def getTest(self, data): | ||
| 23 | tcname = data['tc_name'] | ||
| 24 | code = int(data['code']) | ||
| 25 | |||
| 26 | api_type = 'cl' | ||
| 27 | |||
| 28 | logger.info('********************【' + tcname + '】接口测试开始!' + '********************') | ||
| 29 | |||
| 30 | headers = { | ||
| 31 | 'Content-Type': 'application/json', | ||
| 32 | 'X-Auth-Token': file_read_global('app_login', 'token') | ||
| 33 | } | ||
| 34 | payload = { | ||
| 35 | "faceImageBase64": file_base_64(order_idCard_path), | ||
| 36 | "idCardImageBase64": file_base_64(order_idCard_path), | ||
| 37 | "orderRecordId": file_read_global('order', 'orderRecordId') | ||
| 38 | } | ||
| 39 | # logger.info('【' + tcname + '】的接口入参为:' + str(payload)) | ||
| 40 | |||
| 41 | url = vendor_host + api_type + file_readAPI(api_type, 'facePairUsingPOST') | ||
| 42 | response = requests.request('POST', url, headers=headers, json=payload) | ||
| 43 | if response.status_code is 200: | ||
| 44 | res = response.json() | ||
| 45 | self.assertEqual(res['code'], code, msg=str(res)) | ||
| 46 | logger.info('【' + tcname + '】的接口返回参数为:' + str(res)) | ||
| 47 | else: | ||
| 48 | logger.info(response.text) |
case/AppOrderQuotaDetail.py
0 → 100644
| 1 | #!/usr/bin/env python | ||
| 2 | # -*- coding: utf-8 -*- | ||
| 3 | # @Time : 2021/8/12 下午5:35 | ||
| 4 | # @Author : 付孟奇 | ||
| 5 | |||
| 6 | import unittest, requests | ||
| 7 | from util import HandleJson | ||
| 8 | from util.generate import getTestCase | ||
| 9 | from util.log import logger | ||
| 10 | from config.vendorHost import vendor_host | ||
| 11 | from config.vendorPath import add_order_type_2_path | ||
| 12 | |||
| 13 | |||
| 14 | class AppOrderQuotaDetail(unittest.TestCase): | ||
| 15 | |||
| 16 | def testFunc(self): | ||
| 17 | '''查询订单在保司是否存在''' | ||
| 18 | data_list = getTestCase('A_api_case.xlsx', '查询保司订单') | ||
| 19 | for i in range(len(data_list)): | ||
| 20 | self.getTest(data_list[i]) | ||
| 21 | |||
| 22 | def getTest(self, data): | ||
| 23 | tcname = data['tc_name'] | ||
| 24 | code = int(data['code']) | ||
| 25 | identifier = data['identifier'] | ||
| 26 | |||
| 27 | api_type = 'cl' | ||
| 28 | |||
| 29 | logger.info('********************【' + tcname + '】接口测试开始!' + '********************') | ||
| 30 | |||
| 31 | headers = { | ||
| 32 | 'Content-Type': 'application/json', | ||
| 33 | 'X-Auth-Token': HandleJson.file_read_global('app_login', 'token') | ||
| 34 | } | ||
| 35 | payload = { | ||
| 36 | "businessType": 1, | ||
| 37 | "identifier": identifier | ||
| 38 | } | ||
| 39 | logger.info('【' + tcname + '】的接口入参为:' + str(payload)) | ||
| 40 | |||
| 41 | url = vendor_host + api_type + HandleJson.file_readAPI(api_type, 'quotaDetailUsingPOST') | ||
| 42 | response = requests.request('POST', url, headers=headers, json=payload) | ||
| 43 | if response.status_code is 200: | ||
| 44 | res = response.json() | ||
| 45 | self.assertEqual(res['code'], code, msg=str(res)) | ||
| 46 | logger.info('【' + tcname + '】的接口返回参数为:' + str(res)) | ||
| 47 | HandleJson.file_write(add_order_type_2_path, res['result']) | ||
| 48 | HandleJson.file_updata_global('order', 'policy_no', identifier) | ||
| 49 | else: | ||
| 50 | logger.info(response.text) | ||
| 51 | |||
| 52 | |||
| 53 | if __name__ == '__main__': | ||
| 54 | unittest.main() |
case/AppOrderSubmit.py
0 → 100644
| 1 | #!/usr/bin/env python | ||
| 2 | # -*- coding: utf-8 -*- | ||
| 3 | # @Time : 2021/8/12 下午5:35 | ||
| 4 | # @Author : 付孟奇 | ||
| 5 | |||
| 6 | import unittest, requests | ||
| 7 | from config.vendorHost import vendor_host | ||
| 8 | from config.vendorPath import order_mp4_path, order_zip_path | ||
| 9 | from util.generate import getTestCase | ||
| 10 | from util.log import logger | ||
| 11 | from util.HandleJson import file_read_global, file_readAPI | ||
| 12 | import warnings | ||
| 13 | |||
| 14 | |||
| 15 | class AppOrderSubmit(unittest.TestCase): | ||
| 16 | def testFunc(self): | ||
| 17 | '''订单视频提交''' | ||
| 18 | warnings.simplefilter('ignore', ResourceWarning) | ||
| 19 | data_list = getTestCase('A_api_case.xlsx', '视频上传') | ||
| 20 | for i in range(len(data_list)): | ||
| 21 | self.getTest(data_list[i]) | ||
| 22 | |||
| 23 | def getTest(self, data): | ||
| 24 | tcname = data['tc_name'] | ||
| 25 | code = int(data['code']) | ||
| 26 | |||
| 27 | api_type = 're' | ||
| 28 | |||
| 29 | logger.info('********************【' + tcname + '】接口测试开始!' + '********************') | ||
| 30 | |||
| 31 | headers = { | ||
| 32 | 'X-Auth-Token': file_read_global('app_login', 'token'), | ||
| 33 | } | ||
| 34 | |||
| 35 | # multipart_encoder = MultipartEncoder( | ||
| 36 | # fields={ | ||
| 37 | # "videoUrl": "public-staging-bucket/metlife/video/20210818/12a3cbc1f9d44f269bb9421bb2076a3e.mp4", | ||
| 38 | # "jsonData": ("json.txt", open(order_mp4_path, 'rb'), "video/mp4"), | ||
| 39 | # 'imageData': ("images.zip", open(order_zip_path, 'rb'), "application/zip") | ||
| 40 | # }, | ||
| 41 | # # 自定义分隔符 | ||
| 42 | # boundary='wfWiEWrgEFA9A78512weF7106A' | ||
| 43 | # ) | ||
| 44 | # | ||
| 45 | # # 后给Content-Type加入属性 | ||
| 46 | # headers['Content-Type'] = multipart_encoder.content_type | ||
| 47 | |||
| 48 | payload = {'videoUrl': 'public-staging-bucket/metlife/video/20210818/12a3cbc1f9d44f269bb9421bb2076a3e.mp4'} | ||
| 49 | files = [ | ||
| 50 | ('jsonData', ('json.txt', | ||
| 51 | open(order_mp4_path, 'rb'), "video/mp4")), | ||
| 52 | ('imageData', ('images.zip', | ||
| 53 | open(order_zip_path, 'rb'), "application/zip")), | ||
| 54 | ] | ||
| 55 | |||
| 56 | url = vendor_host + api_type + file_readAPI(api_type, 'orderSubmitUsingPOST') | ||
| 57 | # url = r'http://192.168.10.190:9000/re' + file_readAPI(api_type, 'orderSubmitUsingPOST') | ||
| 58 | # response = requests.post(url=url, data=multipart_encoder, headers=headers) | ||
| 59 | response = requests.post(url, headers=headers, data=payload, files=files) | ||
| 60 | if response.status_code is 200: | ||
| 61 | res = response.json() | ||
| 62 | self.assertEqual(res['code'], code, msg=str(res)) | ||
| 63 | logger.info('【' + tcname + '】的接口返回参数为:' + str(res)) | ||
| 64 | else: | ||
| 65 | logger.info(response.text) |
case/AppPhaseV3.py
0 → 100644
| 1 | #!/usr/bin/env python | ||
| 2 | # -*- coding: utf-8 -*- | ||
| 3 | # @Time : 2021/7/16 下午5:36 | ||
| 4 | # @Author : 付孟奇 | ||
| 5 | |||
| 6 | import unittest, requests | ||
| 7 | from config.vendorHost import vendor_host | ||
| 8 | from config.vendorPath import global_path | ||
| 9 | from util.generate import getTestCase | ||
| 10 | from util.log import logger | ||
| 11 | from util.HandleJson import file_readAPI, file_read_global | ||
| 12 | from util.HandleTime import handle_time | ||
| 13 | |||
| 14 | |||
| 15 | class AppPhaseV3(unittest.TestCase): | ||
| 16 | |||
| 17 | def testFunc(self): | ||
| 18 | '''话术3.0获取话术内容''' | ||
| 19 | data_list = getTestCase('A_api_case.xlsx', '获取话术内容') | ||
| 20 | for i in range(len(data_list)): | ||
| 21 | self.getTest(data_list[i]) | ||
| 22 | |||
| 23 | def getTest(self, data): | ||
| 24 | tcname = data['tc_name'] | ||
| 25 | code = int(data['code']) | ||
| 26 | |||
| 27 | api_type = 'cl' | ||
| 28 | |||
| 29 | logger.info('********************【' + tcname + '】接口测试开始!' + '********************') | ||
| 30 | |||
| 31 | headers = { | ||
| 32 | 'Content-Type': 'application/json', | ||
| 33 | 'X-Auth-Token': file_read_global('app_login', 'token') | ||
| 34 | } | ||
| 35 | payload = { | ||
| 36 | "orderRecordId": file_read_global('order', 'orderRecordId'), | ||
| 37 | "recordingBeginTime": handle_time.timeStamp_13() | ||
| 38 | } | ||
| 39 | logger.info('【' + tcname + '】的接口入参为:' + str(payload)) | ||
| 40 | |||
| 41 | url = vendor_host + api_type + file_readAPI(api_type, 'phaseContentV3UsingPOST') | ||
| 42 | response = requests.request('POST', url, headers=headers, json=payload) | ||
| 43 | if response.status_code is 200: | ||
| 44 | res = response.json() | ||
| 45 | self.assertEqual(res['code'], code, msg=str(res)) | ||
| 46 | logger.info('【' + tcname + '】的接口返回参数为:' + str(res)) | ||
| 47 | else: | ||
| 48 | logger.info(response.text) |
case/AppProductList.py
0 → 100644
| 1 | #!/usr/bin/env python | ||
| 2 | # -*- coding: utf-8 -*- | ||
| 3 | # @Time : 2021/8/12 下午5:35 | ||
| 4 | # @Author : 付孟奇 | ||
| 5 | |||
| 6 | # !/usr/bin/env python | ||
| 7 | # -*- coding: utf-8 -*- | ||
| 8 | # @Time : 2021/7/16 下午5:36 | ||
| 9 | # @Author : 付孟奇 | ||
| 10 | |||
| 11 | import unittest, requests | ||
| 12 | from util.generate import getTestCase | ||
| 13 | from util.log import logger | ||
| 14 | from util.HandleJson import file_read_global | ||
| 15 | from util.HandleJson import file_readAPI | ||
| 16 | from config.vendorHost import vendor_host | ||
| 17 | from config.vendorPath import global_path | ||
| 18 | |||
| 19 | |||
| 20 | class AppProductList(unittest.TestCase): | ||
| 21 | |||
| 22 | def testFunc(self): | ||
| 23 | '''产品信息''' | ||
| 24 | data_list = getTestCase('A_api_case.xlsx', '产品信息') | ||
| 25 | for i in range(len(data_list)): | ||
| 26 | self.getTest(data_list[i]) | ||
| 27 | |||
| 28 | def getTest(self, data): | ||
| 29 | tcname = data['tc_name'] | ||
| 30 | code = int(data['code']) | ||
| 31 | riskType = int(data['riskType']) | ||
| 32 | |||
| 33 | api_type = 'cl' | ||
| 34 | |||
| 35 | logger.info('********************【' + tcname + '】接口测试开始!' + '********************') | ||
| 36 | |||
| 37 | headers = { | ||
| 38 | 'Content-Type': 'application/json', | ||
| 39 | 'X-Auth-Token': file_read_global('app_login', 'token') | ||
| 40 | } | ||
| 41 | payload = { | ||
| 42 | "productType": "0", | ||
| 43 | "page": 1, | ||
| 44 | "perpage": 15, | ||
| 45 | "insureType": 2, | ||
| 46 | "riskType": riskType | ||
| 47 | } | ||
| 48 | logger.info('【' + tcname + '】的接口入参为:' + str(payload)) | ||
| 49 | |||
| 50 | url = vendor_host + api_type + file_readAPI(api_type, 'productNameSelectV2UsingPOST') | ||
| 51 | response = requests.request('POST', url, headers=headers, json=payload) | ||
| 52 | |||
| 53 | if response.status_code is 200: | ||
| 54 | res = response.json() | ||
| 55 | self.assertEqual(res['code'], code, msg=str(res)) | ||
| 56 | logger.info('【' + tcname + '】的接口返回参数为:' + str(res)) | ||
| 57 | else: | ||
| 58 | logger.info(response.text) | ||
| 59 | |||
| 60 | |||
| 61 | if __name__ == '__main__': | ||
| 62 | unittest.main() |
case/AppQualityAuditRejectedDetail.py
0 → 100644
| 1 | #!/usr/bin/env python | ||
| 2 | # -*- coding: utf-8 -*- | ||
| 3 | # @Time : 2021/7/16 下午5:36 | ||
| 4 | # @Author : 付孟奇 | ||
| 5 | |||
| 6 | import unittest, requests | ||
| 7 | from config.vendorHost import vendor_host | ||
| 8 | from config.vendorPath import global_path | ||
| 9 | from util.generate import getTestCase | ||
| 10 | from util.log import logger | ||
| 11 | from util.HandleJson import file_readAPI, file_read_global | ||
| 12 | |||
| 13 | |||
| 14 | class AppQualityAuditRejectedDetail(unittest.TestCase): | ||
| 15 | |||
| 16 | def testFunc(self): | ||
| 17 | '''app的拒绝详情''' | ||
| 18 | data_list = getTestCase('A_api_case.xlsx', 'app的拒绝详情') | ||
| 19 | for i in range(len(data_list)): | ||
| 20 | self.getTest(data_list[i]) | ||
| 21 | |||
| 22 | def getTest(self, data): | ||
| 23 | tcname = data['tc_name'] | ||
| 24 | code = int(data['code']) | ||
| 25 | |||
| 26 | api_type = 'cl' | ||
| 27 | |||
| 28 | logger.info('********************【' + tcname + '】接口测试开始!' + '********************') | ||
| 29 | |||
| 30 | headers = { | ||
| 31 | 'Content-Type': 'application/json', | ||
| 32 | 'X-Auth-Token': file_read_global('app_login', 'token') | ||
| 33 | } | ||
| 34 | payload = { | ||
| 35 | "orderRecordId": file_read_global('order', 'orderRecordId') | ||
| 36 | } | ||
| 37 | logger.info('【' + tcname + '】的接口入参为:' + str(payload)) | ||
| 38 | |||
| 39 | url = vendor_host + api_type + file_readAPI(api_type, 'rejectedDetailUsingPOST') | ||
| 40 | response = requests.request('POST', url, headers=headers, json=payload) | ||
| 41 | if response.status_code is 200: | ||
| 42 | res = response.json() | ||
| 43 | self.assertEqual(res['code'], code, msg=str(res)) | ||
| 44 | logger.info('【' + tcname + '】的接口返回参数为:' + str(res)) | ||
| 45 | else: | ||
| 46 | logger.info(response.text) |
case/AppTtsV3.py
0 → 100644
| 1 | #!/usr/bin/env python | ||
| 2 | # -*- coding: utf-8 -*- | ||
| 3 | # @Time : 2021/7/16 下午5:36 | ||
| 4 | # @Author : 付孟奇 | ||
| 5 | |||
| 6 | import unittest, requests | ||
| 7 | from config.vendorHost import vendor_host | ||
| 8 | from config.vendorPath import global_path | ||
| 9 | from util.generate import getTestCase | ||
| 10 | from util.log import logger | ||
| 11 | from util.HandleJson import file_readAPI, file_read_global | ||
| 12 | from util.HandleTime import handle_time | ||
| 13 | |||
| 14 | |||
| 15 | class AppTtsV3(unittest.TestCase): | ||
| 16 | |||
| 17 | def testFunc(self): | ||
| 18 | '''话术3.0获取话术音频''' | ||
| 19 | data_list = getTestCase('A_api_case.xlsx', '获取话术音频') | ||
| 20 | for i in range(len(data_list)): | ||
| 21 | self.getTest(data_list[i]) | ||
| 22 | |||
| 23 | def getTest(self, data): | ||
| 24 | tcname = data['tc_name'] | ||
| 25 | code = int(data['code']) | ||
| 26 | rate = data['rate'] | ||
| 27 | |||
| 28 | api_type = 'cl' | ||
| 29 | |||
| 30 | logger.info('********************【' + tcname + '】接口测试开始!' + '********************') | ||
| 31 | |||
| 32 | headers = { | ||
| 33 | 'Content-Type': 'application/json', | ||
| 34 | 'X-Auth-Token': file_read_global('app_login', 'token') | ||
| 35 | } | ||
| 36 | payload = { | ||
| 37 | "orderRecordId": file_read_global('order', 'orderRecordId'), | ||
| 38 | "recordingBeginTime": handle_time.timeStamp_13(), | ||
| 39 | "rate": rate | ||
| 40 | } | ||
| 41 | logger.info('【' + tcname + '】的接口入参为:' + str(payload)) | ||
| 42 | |||
| 43 | url = vendor_host + api_type + file_readAPI(api_type, 'synthesizerZipV3UsingPOST') | ||
| 44 | response = requests.request('POST', url, headers=headers, json=payload) | ||
| 45 | self.assertEqual(response.status_code, code, msg='接口调用失败!') |
case/AppVersionUpdate.py
0 → 100644
| 1 | #!/usr/bin/env python | ||
| 2 | # -*- coding: utf-8 -*- | ||
| 3 | # @Time : 2021/7/16 下午5:36 | ||
| 4 | # @Author : 付孟奇 | ||
| 5 | |||
| 6 | import unittest, requests | ||
| 7 | from util.generate import getTestCase | ||
| 8 | from util.log import logger | ||
| 9 | from config.vendorHost import vendor_host | ||
| 10 | from util.HandleJson import file_readAPI | ||
| 11 | |||
| 12 | |||
| 13 | class AppVersionUpdate(unittest.TestCase): | ||
| 14 | |||
| 15 | def testFunc(self): | ||
| 16 | '''A端版本更新''' | ||
| 17 | data_list = getTestCase('A_api_case.xlsx', 'A端版本更新') | ||
| 18 | for i in range(len(data_list)): | ||
| 19 | self.getTest(data_list[i]) | ||
| 20 | |||
| 21 | def getTest(self, data): | ||
| 22 | tcname = data['tc_name'] | ||
| 23 | code = int(data['code']) | ||
| 24 | |||
| 25 | api_type = 'cl' | ||
| 26 | |||
| 27 | logger.info('********************【' + tcname + '】接口测试开始!' + '********************') | ||
| 28 | |||
| 29 | headers = { | ||
| 30 | 'Content-Type': 'application/json' | ||
| 31 | } | ||
| 32 | payload = { | ||
| 33 | "deviceType": "ANDROID", | ||
| 34 | "deviceId": "c4fc83d1-fba3-3593-ba84-a26ee9bcc818" | ||
| 35 | } | ||
| 36 | logger.info('【' + tcname + '】的接口入参为:' + str(payload)) | ||
| 37 | url = vendor_host + api_type + file_readAPI(api_type, 'appUpdateUsingPOST') | ||
| 38 | print(url) | ||
| 39 | response = requests.request('POST', url, headers=headers, json=payload) | ||
| 40 | if response.status_code is 200: | ||
| 41 | res = response.json() | ||
| 42 | self.assertEqual(res['code'], code, msg=str(res)) | ||
| 43 | logger.info('【' + tcname + '】的接口返回参数为:' + str(res)) | ||
| 44 | else: | ||
| 45 | logger.info(response.text) |
case/SystemResetPassword.py
0 → 100644
| 1 | #!/usr/bin/env python | ||
| 2 | # -*- coding: utf-8 -*- | ||
| 3 | # @Time : 2021/7/16 下午5:36 | ||
| 4 | # @Author : 付孟奇 | ||
| 5 | |||
| 6 | import unittest, requests | ||
| 7 | from config.vendorHost import vendor_host | ||
| 8 | from config import vendorList | ||
| 9 | from util.log import logger | ||
| 10 | from util.generate import getTestCase | ||
| 11 | from util.HandleJson import file_readAPI | ||
| 12 | from util.HandleJson import file_read_global | ||
| 13 | from util.HandleJenkins import config | ||
| 14 | from util.HandleRedis import handle_redis | ||
| 15 | |||
| 16 | |||
| 17 | class SystemResetPassword(unittest.TestCase): | ||
| 18 | |||
| 19 | def testFunc(self): | ||
| 20 | '''重置密码''' | ||
| 21 | data_list = getTestCase('A_api_case.xlsx', '重置密码') | ||
| 22 | for i in range(len(data_list)): | ||
| 23 | self.getTest(data_list[i]) | ||
| 24 | |||
| 25 | def getTest(self, data): | ||
| 26 | tcname = data['tc_name'] | ||
| 27 | code = int(data['code']) | ||
| 28 | password = data['password'] | ||
| 29 | username = data['username'] | ||
| 30 | validateCode = handle_redis.get_value('loginservice_forget_password_string_'+config['phone']) | ||
| 31 | |||
| 32 | api_type = 'cl' | ||
| 33 | |||
| 34 | logger.info('********************【' + tcname + '】接口测试开始!' + '********************') | ||
| 35 | |||
| 36 | headers = { | ||
| 37 | 'Content-Type': 'application/json', | ||
| 38 | } | ||
| 39 | if config['pro'] in vendorList.app_login_type_3: | ||
| 40 | payload = { | ||
| 41 | "username": file_read_global('account', 'app_user'), | ||
| 42 | "password": password, | ||
| 43 | "validateCode": validateCode, | ||
| 44 | "phoneNum": config['phone'], | ||
| 45 | "deviceNum": "078424F3-26DE-4A76-BC66-E4CD2C55BB0A" | ||
| 46 | } | ||
| 47 | logger.info('【' + tcname + '】的接口入参为:' + str(payload)) | ||
| 48 | |||
| 49 | url = vendor_host + api_type + file_readAPI(api_type, 'forgPasswordUsingPOST') | ||
| 50 | response = requests.request('POST', url, headers=headers, json=payload) | ||
| 51 | |||
| 52 | if response.status_code is 200: | ||
| 53 | res = response.json() | ||
| 54 | self.assertEqual(res['code'], code, msg=str(res)) | ||
| 55 | logger.info('【' + tcname + '】的接口返回参数为:' + str(res)) | ||
| 56 | else: | ||
| 57 | logger.error(response.text) | ||
| 58 | |||
| 59 | |||
| 60 | if __name__ == '__main__': | ||
| 61 | unittest.main() |
case/SystemSendSms.py
0 → 100644
| 1 | #!/usr/bin/env python | ||
| 2 | # -*- coding: utf-8 -*- | ||
| 3 | # @Time : 2021/7/16 下午5:36 | ||
| 4 | # @Author : 付孟奇 | ||
| 5 | |||
| 6 | import unittest, requests | ||
| 7 | from config.vendorHost import vendor_host | ||
| 8 | from config import vendorList | ||
| 9 | from util.log import logger | ||
| 10 | from util.generate import getTestCase | ||
| 11 | from util.HandleJson import file_readAPI | ||
| 12 | from util.HandleJson import file_updata_global | ||
| 13 | from util.HandleJenkins import config | ||
| 14 | |||
| 15 | |||
| 16 | class SystemSendSms(unittest.TestCase): | ||
| 17 | |||
| 18 | def testFunc(self): | ||
| 19 | '''发送短信''' | ||
| 20 | data_list = getTestCase('A_api_case.xlsx', '发送短信') | ||
| 21 | for i in range(len(data_list)): | ||
| 22 | self.getTest(data_list[i]) | ||
| 23 | |||
| 24 | def getTest(self, data): | ||
| 25 | tcname = data['tc_name'] | ||
| 26 | code = int(data['code']) | ||
| 27 | |||
| 28 | api_type = 'cl' | ||
| 29 | |||
| 30 | logger.info('********************【' + tcname + '】接口测试开始!' + '********************') | ||
| 31 | |||
| 32 | headers = { | ||
| 33 | 'Content-Type': 'application/json', | ||
| 34 | } | ||
| 35 | payload = { | ||
| 36 | "phoneNum": config['phone'], | ||
| 37 | "type": 2 | ||
| 38 | } | ||
| 39 | logger.info('【' + tcname + '】的接口入参为:' + str(payload)) | ||
| 40 | |||
| 41 | url = vendor_host + api_type + file_readAPI(api_type, 'sendSmsUsingPOST') | ||
| 42 | response = requests.request('POST', url, headers=headers, json=payload) | ||
| 43 | |||
| 44 | if response.status_code is 200: | ||
| 45 | res = response.json() | ||
| 46 | self.assertEqual(res['code'], code, msg=str(res)) | ||
| 47 | logger.info('【' + tcname + '】的接口返回参数为:' + str(res)) | ||
| 48 | else: | ||
| 49 | logger.error(response.text) | ||
| 50 | |||
| 51 | |||
| 52 | if __name__ == '__main__': | ||
| 53 | unittest.main() |
case/WebAccountAddAPPUser.py
0 → 100644
| 1 | #!/usr/bin/env python | ||
| 2 | # -*- coding: utf-8 -*- | ||
| 3 | # @Time : 2021/8/13 下午3:55 | ||
| 4 | # @Author : 付孟奇 | ||
| 5 | |||
| 6 | import unittest, requests | ||
| 7 | from config.vendorHost import vendor_host | ||
| 8 | from util.generate import getTestCase | ||
| 9 | from util.log import logger | ||
| 10 | from util.firstLogin import FirstLogin | ||
| 11 | from util.HandleJson import file_readAPI | ||
| 12 | from util.HandleJson import file_read_global, file_updata_global | ||
| 13 | from util.HandleJenkins import config | ||
| 14 | |||
| 15 | |||
| 16 | class WebAccountAddAPPUser(unittest.TestCase): | ||
| 17 | |||
| 18 | def testFunc(self): | ||
| 19 | '''增加app账号''' | ||
| 20 | data_list = getTestCase('WEB_api_case.xlsx', '增加app账号') | ||
| 21 | for i in range(len(data_list)): | ||
| 22 | self.getTest(data_list[i]) | ||
| 23 | |||
| 24 | def getTest(self, data): | ||
| 25 | tcname = data['tc_name'] | ||
| 26 | code = int(data['code']) | ||
| 27 | |||
| 28 | name = data['name'] | ||
| 29 | username = data['username'] | ||
| 30 | phoneNum = int(config['phone']) | ||
| 31 | branchId = file_read_global('organization', 'branchId') | ||
| 32 | subBranchId = file_read_global('organization', 'subBranchId') | ||
| 33 | channel = file_read_global('channel', 'channel_name') | ||
| 34 | |||
| 35 | api_type = 'sys' | ||
| 36 | |||
| 37 | logger.info('********************【' + tcname + '】接口测试开始!' + '********************') | ||
| 38 | |||
| 39 | headers = { | ||
| 40 | 'Content-Type': 'application/json', | ||
| 41 | 'X-Auth-Token': FirstLogin() | ||
| 42 | } | ||
| 43 | # if config['pro'] =='中美大都会' | ||
| 44 | # 之后如果角色可以从接口获取,这里再从接口获取并进行项目判断 | ||
| 45 | payload = { | ||
| 46 | "name": name, | ||
| 47 | "username": username, | ||
| 48 | "phoneNum": phoneNum, | ||
| 49 | "branchId": branchId, | ||
| 50 | "subBranchId": subBranchId, | ||
| 51 | "channelCode": channel, | ||
| 52 | "marketingChannel": channel | ||
| 53 | } | ||
| 54 | |||
| 55 | logger.info('【' + tcname + '】的接口入参为:' + str(payload)) | ||
| 56 | |||
| 57 | url = vendor_host + api_type + file_readAPI(api_type, 'addAppUserUsingPOST') | ||
| 58 | response = requests.request('POST', url, headers=headers, json=payload) | ||
| 59 | |||
| 60 | if response.status_code is 200: | ||
| 61 | res = response.json() | ||
| 62 | self.assertEqual(res['code'], code, msg=str(res)) | ||
| 63 | file_updata_global('account', 'app_user', username) | ||
| 64 | logger.info('【' + tcname + '】的接口返回参数为:' + str(res)) | ||
| 65 | else: | ||
| 66 | logger.info(response.text) |
case/WebAccountAddWebUser.py
0 → 100644
| 1 | #!/usr/bin/env python | ||
| 2 | # -*- coding: utf-8 -*- | ||
| 3 | # @Time : 2021/8/13 下午3:55 | ||
| 4 | # @Author : 付孟奇 | ||
| 5 | |||
| 6 | import unittest, requests | ||
| 7 | from config.vendorHost import vendor_host | ||
| 8 | from config.vendorPath import global_path | ||
| 9 | from util.generate import getTestCase | ||
| 10 | from util.log import logger | ||
| 11 | from util.firstLogin import FirstLogin | ||
| 12 | from util.HandleJson import file_readAPI | ||
| 13 | from util.HandleJson import file_read_global, file_updata_global | ||
| 14 | |||
| 15 | |||
| 16 | class WebAccountAddWebUser(unittest.TestCase): | ||
| 17 | |||
| 18 | def testFunc(self): | ||
| 19 | '''添加web账号''' | ||
| 20 | data_list = getTestCase('WEB_api_case.xlsx', '添加web账号') | ||
| 21 | for i in range(len(data_list)): | ||
| 22 | self.getTest(data_list[i]) | ||
| 23 | |||
| 24 | def getTest(self, data): | ||
| 25 | tcname = data['tc_name'] | ||
| 26 | code = int(data['code']) | ||
| 27 | username = data['username'] | ||
| 28 | email = data['email'] | ||
| 29 | employeeId = data['employeeId'] | ||
| 30 | name = data['name'] | ||
| 31 | staffNo = data['staffNo'] | ||
| 32 | role = data['role'] | ||
| 33 | |||
| 34 | api_type = 'sys' | ||
| 35 | |||
| 36 | logger.info('********************【' + tcname + '】接口测试开始!' + '********************') | ||
| 37 | |||
| 38 | headers = { | ||
| 39 | 'Content-Type': 'application/json', | ||
| 40 | 'X-Auth-Token': FirstLogin() | ||
| 41 | } | ||
| 42 | # if config['pro'] =='中美大都会' | ||
| 43 | # 之后如果角色可以从接口获取,这里再从接口获取并进行项目判断 | ||
| 44 | payload = { | ||
| 45 | "id": '', | ||
| 46 | "username": username, | ||
| 47 | "email": email, | ||
| 48 | "employeeId": employeeId, | ||
| 49 | "name": name, | ||
| 50 | "roleId": role, | ||
| 51 | "orgId": file_read_global('organization', 'subBranchId'), | ||
| 52 | "orgIdList": [int(role)], | ||
| 53 | "groupId": '', | ||
| 54 | "auditScopeList": [], | ||
| 55 | "staffNo": staffNo, | ||
| 56 | "role": role | ||
| 57 | } | ||
| 58 | |||
| 59 | logger.info('【' + tcname + '】的接口入参为:' + str(payload)) | ||
| 60 | |||
| 61 | url = vendor_host + api_type + file_readAPI(api_type, 'addUserUsingPOST') | ||
| 62 | response = requests.request('POST', url, headers=headers, json=payload) | ||
| 63 | |||
| 64 | if response.status_code is 200: | ||
| 65 | res = response.json() | ||
| 66 | self.assertEqual(res['code'], code, msg=str(res)) | ||
| 67 | file_updata_global('account', 'web_user', name) | ||
| 68 | file_updata_global('account', 'web_email', email) | ||
| 69 | logger.info('【' + tcname + '】的接口返回参数为:' + str(res)) | ||
| 70 | else: | ||
| 71 | logger.info(response.text) |
case/WebAccountAppManage.py
0 → 100644
| 1 | #!/usr/bin/env python | ||
| 2 | # -*- coding: utf-8 -*- | ||
| 3 | # @Time : 2021/8/13 下午3:55 | ||
| 4 | # @Author : 付孟奇 | ||
| 5 | |||
| 6 | import unittest, requests | ||
| 7 | from config.vendorHost import vendor_host | ||
| 8 | from config.vendorPath import global_path | ||
| 9 | from util.generate import getTestCase | ||
| 10 | from util.log import logger | ||
| 11 | from util.HandleJson import file_readAPI, file_read_global | ||
| 12 | |||
| 13 | |||
| 14 | class WebAccountAppManage(unittest.TestCase): | ||
| 15 | |||
| 16 | def testFunc(self): | ||
| 17 | '''app账户信息查询''' | ||
| 18 | data_list = getTestCase('WEB_api_case.xlsx', 'app账户信息查询') | ||
| 19 | for i in range(len(data_list)): | ||
| 20 | self.getTest(data_list[i]) | ||
| 21 | |||
| 22 | def getTest(self, data): | ||
| 23 | tcname = data['tc_name'] | ||
| 24 | code = int(data['code']) | ||
| 25 | userType = data['userType'] | ||
| 26 | name = file_read_global('account', 'app_user') | ||
| 27 | |||
| 28 | api_type = 'sys' | ||
| 29 | |||
| 30 | logger.info('********************【' + tcname + '】接口测试开始!' + '********************') | ||
| 31 | |||
| 32 | headers = { | ||
| 33 | 'Content-Type': 'application/json', | ||
| 34 | 'X-Auth-Token': file_read_global('web_login', 'token') | ||
| 35 | } | ||
| 36 | payload = { | ||
| 37 | "page": 1, | ||
| 38 | "perPage": 10, | ||
| 39 | "userType": userType, | ||
| 40 | "name":name | ||
| 41 | } | ||
| 42 | logger.info('【' + tcname + '】的接口入参为:' + str(payload)) | ||
| 43 | |||
| 44 | url = vendor_host + api_type + file_readAPI(api_type, 'appManageUsingPOST') | ||
| 45 | response = requests.request('POST', url, headers=headers, json=payload) | ||
| 46 | |||
| 47 | if response.status_code is 200: | ||
| 48 | res = response.json() | ||
| 49 | self.assertEqual(res['code'], code, msg=str(res)) | ||
| 50 | logger.info('【' + tcname + '】的接口返回参数为:' + str(res)) | ||
| 51 | else: | ||
| 52 | logger.info(response.text) |
case/WebAccountGetUserInfo.py
0 → 100644
| 1 | #!/usr/bin/env python | ||
| 2 | # -*- coding: utf-8 -*- | ||
| 3 | # @Time : 2021/8/13 下午3:55 | ||
| 4 | # @Author : 付孟奇 | ||
| 5 | |||
| 6 | import unittest, requests,time | ||
| 7 | from config.vendorHost import vendor_host | ||
| 8 | from util.generate import getTestCase | ||
| 9 | from util.log import logger | ||
| 10 | from util.HandleJson import file_readAPI, file_read_global, file_updata_global | ||
| 11 | |||
| 12 | |||
| 13 | class WebAccountGetUserInfo(unittest.TestCase): | ||
| 14 | |||
| 15 | def testFunc(self): | ||
| 16 | '''根据用户名获取用户信息''' | ||
| 17 | data_list = getTestCase('WEB_api_case.xlsx', '获取用户信息') | ||
| 18 | for i in range(len(data_list)): | ||
| 19 | self.getTest(data_list[i]) | ||
| 20 | time.sleep(2) | ||
| 21 | |||
| 22 | def getTest(self, data): | ||
| 23 | tcname = data['tc_name'] | ||
| 24 | code = int(data['code']) | ||
| 25 | |||
| 26 | api_type = 'sys' | ||
| 27 | |||
| 28 | logger.info('********************【' + tcname + '】接口测试开始!' + '********************') | ||
| 29 | |||
| 30 | headers = { | ||
| 31 | 'Content-Type': 'application/json', | ||
| 32 | 'X-Auth-Token': file_read_global('web_login', 'token') | ||
| 33 | } | ||
| 34 | payload = { | ||
| 35 | "username": file_read_global('account', 'web_user') | ||
| 36 | } | ||
| 37 | logger.info('【' + tcname + '】的接口入参为:' + str(payload)) | ||
| 38 | |||
| 39 | url = vendor_host + api_type + file_readAPI(api_type, 'getUserInfoUsingPOST') | ||
| 40 | response = requests.request('POST', url, headers=headers, json=payload) | ||
| 41 | |||
| 42 | if response.status_code is 200: | ||
| 43 | res = response.json() | ||
| 44 | self.assertEqual(res['code'], code, msg=str(res)) | ||
| 45 | logger.info('【' + tcname + '】的接口返回参数为:' + str(res)) | ||
| 46 | else: | ||
| 47 | logger.info(response.text) |
case/WebAccountImportAppUser.py
0 → 100644
| 1 | #!/usr/bin/env python | ||
| 2 | # -*- coding: utf-8 -*- | ||
| 3 | # @Time : 2021/8/12 下午5:35 | ||
| 4 | # @Author : 付孟奇 | ||
| 5 | |||
| 6 | import unittest, requests | ||
| 7 | from config.vendorHost import vendor_host | ||
| 8 | from config.vendorPath import excel_path | ||
| 9 | from util.generate import getTestCase | ||
| 10 | from util.log import logger | ||
| 11 | from util.HandleJson import file_read_global, file_readAPI | ||
| 12 | import warnings | ||
| 13 | |||
| 14 | |||
| 15 | class WebAccountImportAppUser(unittest.TestCase): | ||
| 16 | def testFunc(self): | ||
| 17 | '''导入app账号''' | ||
| 18 | warnings.simplefilter('ignore', ResourceWarning) | ||
| 19 | data_list = getTestCase('WEB_api_case.xlsx', '导入app账号') | ||
| 20 | for i in range(len(data_list)): | ||
| 21 | self.getTest(data_list[i]) | ||
| 22 | |||
| 23 | def getTest(self, data): | ||
| 24 | tcname = data['tc_name'] | ||
| 25 | code = int(data['code']) | ||
| 26 | |||
| 27 | api_type = 'sys' | ||
| 28 | |||
| 29 | logger.info('********************【' + tcname + '】接口测试开始!' + '********************') | ||
| 30 | |||
| 31 | headers = { | ||
| 32 | 'X-Auth-Token': file_read_global('web_login', 'token') | ||
| 33 | } | ||
| 34 | |||
| 35 | files = [ | ||
| 36 | ('file', ('A_api_case.xlsx', | ||
| 37 | open(excel_path + '/A_api_case.xlsx', 'rb'), | ||
| 38 | "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet")) | ||
| 39 | ] | ||
| 40 | |||
| 41 | url = vendor_host + api_type + file_readAPI(api_type, 'importAppUserUsingPOST') | ||
| 42 | response = requests.post(url, headers=headers, files=files) | ||
| 43 | |||
| 44 | if response.status_code is 200: | ||
| 45 | logger.info('接口可以调通!') | ||
| 46 | else: | ||
| 47 | logger.error('接口异常') |
case/WebAccountManage.py
0 → 100644
| 1 | #!/usr/bin/env python | ||
| 2 | # -*- coding: utf-8 -*- | ||
| 3 | # @Time : 2021/8/13 下午3:55 | ||
| 4 | # @Author : 付孟奇 | ||
| 5 | |||
| 6 | import unittest, requests | ||
| 7 | from config.vendorHost import vendor_host | ||
| 8 | from util.generate import getTestCase | ||
| 9 | from util.log import logger | ||
| 10 | from util.HandleJson import file_readAPI, file_read_global,file_updata_global | ||
| 11 | from util.HandleSql import db_sql | ||
| 12 | |||
| 13 | |||
| 14 | class WebAccountManage(unittest.TestCase): | ||
| 15 | |||
| 16 | def testFunc(self): | ||
| 17 | '''web账户信息查询''' | ||
| 18 | data_list = getTestCase('WEB_api_case.xlsx', 'web账户信息查询') | ||
| 19 | for i in range(len(data_list)): | ||
| 20 | self.getTest(data_list[i]) | ||
| 21 | |||
| 22 | def getTest(self, data): | ||
| 23 | tcname = data['tc_name'] | ||
| 24 | code = int(data['code']) | ||
| 25 | userType = data['userType'] | ||
| 26 | name = file_read_global('account', 'web_user') | ||
| 27 | |||
| 28 | api_type = 'sys' | ||
| 29 | |||
| 30 | logger.info('********************【' + tcname + '】接口测试开始!' + '********************') | ||
| 31 | |||
| 32 | headers = { | ||
| 33 | 'Content-Type': 'application/json', | ||
| 34 | 'X-Auth-Token': file_read_global('web_login', 'token') | ||
| 35 | } | ||
| 36 | payload = { | ||
| 37 | "name": name, | ||
| 38 | "page": 1, | ||
| 39 | "perPage": 10, | ||
| 40 | "userType": userType | ||
| 41 | } | ||
| 42 | logger.info('【' + tcname + '】的接口入参为:' + str(payload)) | ||
| 43 | |||
| 44 | url = vendor_host + api_type + file_readAPI(api_type, 'webManageUsingPOST') | ||
| 45 | response = requests.request('POST', url, headers=headers, json=payload) | ||
| 46 | |||
| 47 | if response.status_code is 200: | ||
| 48 | res = response.json() | ||
| 49 | self.assertEqual(res['code'], code, msg=str(res)) | ||
| 50 | logger.info('【' + tcname + '】的接口返回参数为:' + str(res)) | ||
| 51 | if res['code'] == 0: | ||
| 52 | file_updata_global('account', 'web_user_id', db_sql.select_user_id(name)) | ||
| 53 | else: | ||
| 54 | logger.info(response.text) |
case/WebAccountModifyPassword.py
0 → 100644
| 1 | #!/usr/bin/env python | ||
| 2 | # -*- coding: utf-8 -*- | ||
| 3 | # @Time : 2021/8/13 下午3:55 | ||
| 4 | # @Author : 付孟奇 | ||
| 5 | |||
| 6 | import unittest, requests | ||
| 7 | from config.vendorHost import vendor_host | ||
| 8 | from util.generate import getTestCase | ||
| 9 | from util.log import logger | ||
| 10 | from util.HandleJson import file_readAPI | ||
| 11 | |||
| 12 | |||
| 13 | class WebAccountModifyPassword(unittest.TestCase): | ||
| 14 | |||
| 15 | def testFunc(self): | ||
| 16 | '''Web端强制修改密码''' | ||
| 17 | data_list = getTestCase('WEB_api_case.xlsx', '强制修改密码') | ||
| 18 | for i in range(len(data_list)): | ||
| 19 | self.getTest(data_list[i]) | ||
| 20 | |||
| 21 | def getTest(self, data): | ||
| 22 | tcname = data['tc_name'] | ||
| 23 | code = int(data['code']) | ||
| 24 | username = data['username'] | ||
| 25 | currentPassword = data['currentPassword'] | ||
| 26 | newPassword = data['newPassword'] | ||
| 27 | |||
| 28 | api_type = 'sys' | ||
| 29 | |||
| 30 | logger.info('********************【' + tcname + '】接口测试开始!' + '********************') | ||
| 31 | |||
| 32 | headers = { | ||
| 33 | 'Content-Type': 'application/json', | ||
| 34 | } | ||
| 35 | payload = {"username": username, "currentPassword": currentPassword, "newPassword": newPassword} | ||
| 36 | logger.info('【' + tcname + '】的接口入参为:' + str(payload)) | ||
| 37 | |||
| 38 | url = vendor_host + api_type + file_readAPI(api_type, 'webModifyUsernameUsingPOST') | ||
| 39 | response = requests.request('POST', url, headers=headers, json=payload) | ||
| 40 | |||
| 41 | if response.status_code is 200: | ||
| 42 | res = response.json() | ||
| 43 | self.assertEqual(res['code'], code, msg=str(res)) | ||
| 44 | logger.info('【' + tcname + '】的接口返回参数为:' + str(res)) | ||
| 45 | else: | ||
| 46 | logger.info(response.text) |
case/WebAccountModifyUser.py
0 → 100644
| 1 | #!/usr/bin/env python | ||
| 2 | # -*- coding: utf-8 -*- | ||
| 3 | # @Time : 2021/8/13 下午3:55 | ||
| 4 | # @Author : 付孟奇 | ||
| 5 | |||
| 6 | import unittest, requests | ||
| 7 | from config.vendorHost import vendor_host | ||
| 8 | from config.vendorPath import global_path | ||
| 9 | from util.generate import getTestCase | ||
| 10 | from util.log import logger | ||
| 11 | from util.HandleJson import file_readAPI, file_read_global | ||
| 12 | |||
| 13 | |||
| 14 | class WebAccountModifyUser(unittest.TestCase): | ||
| 15 | |||
| 16 | def testFunc(self): | ||
| 17 | '''web端修改账号''' | ||
| 18 | data_list = getTestCase('WEB_api_case.xlsx', 'web端修改账号') | ||
| 19 | for i in range(len(data_list)): | ||
| 20 | self.getTest(data_list[i]) | ||
| 21 | |||
| 22 | def getTest(self, data): | ||
| 23 | tcname = data['tc_name'] | ||
| 24 | code = int(data['code']) | ||
| 25 | web_name = file_read_global('account', 'web_user') | ||
| 26 | email = file_read_global('account', 'web_email') | ||
| 27 | id = file_read_global('account', 'web_user_id') | ||
| 28 | |||
| 29 | api_type = 'sys' | ||
| 30 | |||
| 31 | logger.info('********************【' + tcname + '】接口测试开始!' + '********************') | ||
| 32 | |||
| 33 | headers = { | ||
| 34 | 'Content-Type': 'application/json', | ||
| 35 | 'X-Auth-Token': file_read_global('web_login', 'token') | ||
| 36 | } | ||
| 37 | payload = { | ||
| 38 | "id": id, | ||
| 39 | "username": web_name, | ||
| 40 | "email": email, | ||
| 41 | "employeeId": web_name, | ||
| 42 | "name": web_name, | ||
| 43 | "roleId": 1, | ||
| 44 | "orgId": file_read_global('organization', 'subBranchId'), | ||
| 45 | "orgIdList": [1], | ||
| 46 | "groupId": '', | ||
| 47 | "auditScopeList": [], | ||
| 48 | "staffNo": web_name, | ||
| 49 | "role": 1 | ||
| 50 | } | ||
| 51 | logger.info('【' + tcname + '】的接口入参为:' + str(payload)) | ||
| 52 | |||
| 53 | url = vendor_host + api_type + file_readAPI(api_type, 'modifyUserUsingPOST') | ||
| 54 | response = requests.request('POST', url, headers=headers, json=payload) | ||
| 55 | |||
| 56 | if response.status_code is 200: | ||
| 57 | res = response.json() | ||
| 58 | self.assertEqual(res['code'], code, msg=str(res)) | ||
| 59 | logger.info('【' + tcname + '】的接口返回参数为:' + str(res)) | ||
| 60 | else: | ||
| 61 | logger.info(response.text) |
case/WebAccountUserEditState.py
0 → 100644
| 1 | #!/usr/bin/env python | ||
| 2 | # -*- coding: utf-8 -*- | ||
| 3 | # @Time : 2021/8/13 下午3:55 | ||
| 4 | # @Author : 付孟奇 | ||
| 5 | |||
| 6 | import unittest, requests, time | ||
| 7 | from config.vendorHost import vendor_host | ||
| 8 | from util.generate import getTestCase | ||
| 9 | from util.log import logger | ||
| 10 | from util.HandleJson import file_readAPI | ||
| 11 | from util.HandleJson import file_read_global | ||
| 12 | |||
| 13 | |||
| 14 | class WebAccountUserEditState(unittest.TestCase): | ||
| 15 | |||
| 16 | def testFunc(self): | ||
| 17 | '''更新web账号启用/禁用状态''' | ||
| 18 | data_list = getTestCase('WEB_api_case.xlsx', 'web账号启用禁用') | ||
| 19 | for i in range(len(data_list)): | ||
| 20 | self.getTest(data_list[i]) | ||
| 21 | time.sleep(2) | ||
| 22 | |||
| 23 | def getTest(self, data): | ||
| 24 | tcname = data['tc_name'] | ||
| 25 | code = int(data['code']) | ||
| 26 | departed = int(data['departed']) | ||
| 27 | username = file_read_global('account', 'web_user') | ||
| 28 | |||
| 29 | api_type = 'sys' | ||
| 30 | |||
| 31 | logger.info('********************【' + tcname + '】接口测试开始!' + '********************') | ||
| 32 | |||
| 33 | headers = { | ||
| 34 | 'Content-Type': 'application/json', | ||
| 35 | 'X-Auth-Token': file_read_global('web_login', 'token') | ||
| 36 | } | ||
| 37 | payload = { | ||
| 38 | "departed": departed, | ||
| 39 | "userId": file_read_global('account', 'web_user_id') | ||
| 40 | } | ||
| 41 | logger.info('【' + tcname + '】的接口入参为:' + str(payload)) | ||
| 42 | |||
| 43 | url = vendor_host + api_type + file_readAPI(api_type, 'editStateUsingPOST') | ||
| 44 | response = requests.request('POST', url, headers=headers, json=payload) | ||
| 45 | |||
| 46 | if response.status_code is 200: | ||
| 47 | res = response.json() | ||
| 48 | self.assertEqual(res['code'], code, msg=str(res)) | ||
| 49 | logger.info('【' + tcname + '】的接口返回参数为:' + str(res)) | ||
| 50 | else: | ||
| 51 | logger.info(response.text) |
case/WebAdditionalDel.py
0 → 100644
| 1 | #!/usr/bin/env python | ||
| 2 | # -*- coding: utf-8 -*- | ||
| 3 | # @Time : 2021/8/13 下午3:55 | ||
| 4 | # @Author : 付孟奇 | ||
| 5 | |||
| 6 | import unittest, requests | ||
| 7 | from config.vendorHost import vendor_host | ||
| 8 | from config.vendorPath import global_path | ||
| 9 | from util.generate import getTestCase | ||
| 10 | from util.log import logger | ||
| 11 | from util.HandleJson import file_readAPI | ||
| 12 | from util.HandleJson import file_read_global | ||
| 13 | |||
| 14 | |||
| 15 | class WebAdditionalDel(unittest.TestCase): | ||
| 16 | |||
| 17 | def testFunc(self): | ||
| 18 | '''删除附加属性模版''' | ||
| 19 | data_list = getTestCase('WEB_api_case.xlsx', '删除附加属性模版') | ||
| 20 | for i in range(len(data_list)): | ||
| 21 | self.getTest(data_list[i]) | ||
| 22 | |||
| 23 | def getTest(self, data): | ||
| 24 | tcname = data['tc_name'] | ||
| 25 | code = int(data['code']) | ||
| 26 | |||
| 27 | api_type = 're' | ||
| 28 | |||
| 29 | logger.info('********************【' + tcname + '】接口测试开始!' + '********************') | ||
| 30 | |||
| 31 | headers = { | ||
| 32 | 'Content-Type': 'application/json', | ||
| 33 | 'X-Auth-Token': file_read_global('web_login', 'token') | ||
| 34 | } | ||
| 35 | payload = { | ||
| 36 | "akId": file_read_global('product', 'akId') | ||
| 37 | } | ||
| 38 | logger.info('【' + tcname + '】的接口入参为:' + str(payload)) | ||
| 39 | |||
| 40 | url = vendor_host + api_type + file_readAPI(api_type, 'delAdditionalTemplateUsingPOST') | ||
| 41 | response = requests.request('POST', url, headers=headers, json=payload) | ||
| 42 | |||
| 43 | if response.status_code is 200: | ||
| 44 | res = response.json() | ||
| 45 | self.assertEqual(res['code'], code, msg=str(res)) | ||
| 46 | logger.info('【' + tcname + '】的接口返回参数为:' + str(res)) | ||
| 47 | else: | ||
| 48 | logger.info(response.text) |
case/WebAdditionalEdit.py
0 → 100644
| 1 | #!/usr/bin/env python | ||
| 2 | # -*- coding: utf-8 -*- | ||
| 3 | # @Time : 2021/8/13 下午3:55 | ||
| 4 | # @Author : 付孟奇 | ||
| 5 | |||
| 6 | import unittest, requests | ||
| 7 | from config.vendorHost import vendor_host | ||
| 8 | from config.vendorPath import global_path | ||
| 9 | from util.generate import getTestCase | ||
| 10 | from util.log import logger | ||
| 11 | from util.HandleJson import file_readAPI | ||
| 12 | from util.HandleJson import file_read_global | ||
| 13 | from util.HandleSql import db_sql | ||
| 14 | |||
| 15 | |||
| 16 | class WebAdditionalEdit(unittest.TestCase): | ||
| 17 | |||
| 18 | def testFunc(self): | ||
| 19 | '''编辑附加属性''' | ||
| 20 | data_list = getTestCase('WEB_api_case.xlsx', '编辑附加属性') | ||
| 21 | for i in range(len(data_list)): | ||
| 22 | self.getTest(data_list[i]) | ||
| 23 | |||
| 24 | def getTest(self, data): | ||
| 25 | tcname = data['tc_name'] | ||
| 26 | code = int(data['code']) | ||
| 27 | productCode = data['productCode'] | ||
| 28 | productName = data['productName'] | ||
| 29 | keyValue = data['keyValue'] | ||
| 30 | avId = data['avId'] | ||
| 31 | |||
| 32 | api_type = 're' | ||
| 33 | |||
| 34 | logger.info('********************【' + tcname + '】接口测试开始!' + '********************') | ||
| 35 | |||
| 36 | headers = { | ||
| 37 | 'Content-Type': 'application/json', | ||
| 38 | 'X-Auth-Token': file_read_global('web_login', 'token') | ||
| 39 | } | ||
| 40 | payload = { | ||
| 41 | "plId": db_sql.select_product(productName), | ||
| 42 | "akId": file_read_global('product', 'akId'), | ||
| 43 | "avId": avId, | ||
| 44 | "productCode": productCode, | ||
| 45 | "productName": productName, | ||
| 46 | "keyValue": keyValue | ||
| 47 | } | ||
| 48 | logger.info('【' + tcname + '】的接口入参为:' + str(payload)) | ||
| 49 | |||
| 50 | url = vendor_host + api_type + file_readAPI(api_type, 'editsAdditionalValueUsingPOST') | ||
| 51 | response = requests.request('POST', url, headers=headers, json=payload) | ||
| 52 | |||
| 53 | if response.status_code is 200: | ||
| 54 | res = response.json() | ||
| 55 | self.assertEqual(res['code'], code, msg=str(res)) | ||
| 56 | logger.info('【' + tcname + '】的接口返回参数为:' + str(res)) | ||
| 57 | else: | ||
| 58 | logger.info(response.text) |
case/WebAdditionalGet.py
0 → 100644
| 1 | #!/usr/bin/env python | ||
| 2 | # -*- coding: utf-8 -*- | ||
| 3 | # @Time : 2021/8/13 下午3:55 | ||
| 4 | # @Author : 付孟奇 | ||
| 5 | |||
| 6 | import unittest, requests | ||
| 7 | from config.vendorHost import vendor_host | ||
| 8 | from config.vendorPath import global_path | ||
| 9 | from util.generate import getTestCase | ||
| 10 | from util.log import logger | ||
| 11 | from util.HandleJson import file_readAPI | ||
| 12 | from util.HandleJson import file_read_global | ||
| 13 | |||
| 14 | |||
| 15 | class WebAdditionalGet(unittest.TestCase): | ||
| 16 | |||
| 17 | def testFunc(self): | ||
| 18 | '''获取附加属性信息''' | ||
| 19 | data_list = getTestCase('WEB_api_case.xlsx', '获取附加属性信息') | ||
| 20 | for i in range(len(data_list)): | ||
| 21 | self.getTest(data_list[i]) | ||
| 22 | |||
| 23 | def getTest(self, data): | ||
| 24 | tcname = data['tc_name'] | ||
| 25 | code = int(data['code']) | ||
| 26 | |||
| 27 | api_type = 're' | ||
| 28 | |||
| 29 | logger.info('********************【' + tcname + '】接口测试开始!' + '********************') | ||
| 30 | |||
| 31 | headers = { | ||
| 32 | 'Content-Type': 'application/json', | ||
| 33 | 'X-Auth-Token': file_read_global('web_login', 'token') | ||
| 34 | } | ||
| 35 | payload = { | ||
| 36 | "akId": file_read_global('product', 'akId'), | ||
| 37 | "page": 1, | ||
| 38 | "perPage": 10 | ||
| 39 | } | ||
| 40 | logger.info('【' + tcname + '】的接口入参为:' + str(payload)) | ||
| 41 | |||
| 42 | url = vendor_host + api_type + file_readAPI(api_type, 'getAdditionalAllValueUsingPOST') | ||
| 43 | response = requests.request('POST', url, headers=headers, json=payload) | ||
| 44 | |||
| 45 | if response.status_code is 200: | ||
| 46 | res = response.json() | ||
| 47 | self.assertEqual(res['code'], code, msg=str(res)) | ||
| 48 | logger.info('【' + tcname + '】的接口返回参数为:' + str(res)) | ||
| 49 | else: | ||
| 50 | logger.info(response.text) |
case/WebAdditionalList.py
0 → 100644
| 1 | #!/usr/bin/env python | ||
| 2 | # -*- coding: utf-8 -*- | ||
| 3 | # @Time : 2021/8/13 下午3:55 | ||
| 4 | # @Author : 付孟奇 | ||
| 5 | |||
| 6 | import unittest, requests | ||
| 7 | from config.vendorHost import vendor_host | ||
| 8 | from config.vendorPath import global_path | ||
| 9 | from util.generate import getTestCase | ||
| 10 | from util.log import logger | ||
| 11 | from util.HandleJson import file_readAPI | ||
| 12 | from util.HandleJson import file_read_global, file_updata_global | ||
| 13 | |||
| 14 | |||
| 15 | class WebAdditionalList(unittest.TestCase): | ||
| 16 | |||
| 17 | def testFunc(self): | ||
| 18 | '''查询所有附加属性列表''' | ||
| 19 | data_list = getTestCase('WEB_api_case.xlsx', '查询所有附加属性列表') | ||
| 20 | for i in range(len(data_list)): | ||
| 21 | self.getTest(data_list[i]) | ||
| 22 | |||
| 23 | def getTest(self, data): | ||
| 24 | tcname = data['tc_name'] | ||
| 25 | code = int(data['code']) | ||
| 26 | |||
| 27 | api_type = 're' | ||
| 28 | |||
| 29 | logger.info('********************【' + tcname + '】接口测试开始!' + '********************') | ||
| 30 | |||
| 31 | headers = { | ||
| 32 | 'Content-Type': 'application/json', | ||
| 33 | 'X-Auth-Token': file_read_global('web_login', 'token') | ||
| 34 | } | ||
| 35 | |||
| 36 | url = vendor_host + api_type + file_readAPI(api_type, 'queryProductAttributesListUsingPOST') | ||
| 37 | response = requests.request('POST', url, headers=headers) | ||
| 38 | |||
| 39 | if response.status_code is 200: | ||
| 40 | res = response.json() | ||
| 41 | self.assertEqual(res['code'], code, msg=str(res)) | ||
| 42 | logger.info('【' + tcname + '】的接口返回参数为:' + str(res)) | ||
| 43 | else: | ||
| 44 | logger.info(response.text) |
case/WebAdditionalTemplate.py
0 → 100644
| 1 | #!/usr/bin/env python | ||
| 2 | # -*- coding: utf-8 -*- | ||
| 3 | # @Time : 2021/8/13 下午3:55 | ||
| 4 | # @Author : 付孟奇 | ||
| 5 | |||
| 6 | import unittest, requests | ||
| 7 | from config.vendorHost import vendor_host | ||
| 8 | from config.vendorPath import global_path | ||
| 9 | from util.generate import getTestCase | ||
| 10 | from util.log import logger | ||
| 11 | from util.HandleJson import file_readAPI | ||
| 12 | from util.HandleJson import file_read_global, file_updata_global | ||
| 13 | from util.HandleSql import db_sql | ||
| 14 | |||
| 15 | |||
| 16 | class WebAdditionalTemplate(unittest.TestCase): | ||
| 17 | |||
| 18 | def testFunc(self): | ||
| 19 | '''创建附加属性模版''' | ||
| 20 | data_list = getTestCase('WEB_api_case.xlsx', '创建附加属性模版') | ||
| 21 | for i in range(len(data_list)): | ||
| 22 | additional = data_list[i]['additional'] | ||
| 23 | additional_id = db_sql.select_attributes(additional) | ||
| 24 | if additional_id is not None: | ||
| 25 | db_sql.delete_attributes(additional) | ||
| 26 | self.getTest(data_list[i]) | ||
| 27 | |||
| 28 | def getTest(self, data): | ||
| 29 | tcname = data['tc_name'] | ||
| 30 | code = int(data['code']) | ||
| 31 | additional = data['additional'] | ||
| 32 | |||
| 33 | api_type = 're' | ||
| 34 | |||
| 35 | logger.info('********************【' + tcname + '】接口测试开始!' + '********************') | ||
| 36 | |||
| 37 | headers = { | ||
| 38 | 'Content-Type': 'application/json', | ||
| 39 | 'X-Auth-Token': file_read_global('web_login', 'token') | ||
| 40 | } | ||
| 41 | payload = {"additionalTemplates": [{"keyword": additional}]} | ||
| 42 | logger.info('【' + tcname + '】的接口入参为:' + str(payload)) | ||
| 43 | |||
| 44 | url = vendor_host + api_type + file_readAPI(api_type, 'createAdditionalTemplateUsingPOST') | ||
| 45 | response = requests.request('POST', url, headers=headers, json=payload) | ||
| 46 | |||
| 47 | if response.status_code is 200: | ||
| 48 | res = response.json() | ||
| 49 | self.assertEqual(res['code'], code, msg=str(res)) | ||
| 50 | if res['code'] == 0: | ||
| 51 | file_updata_global('product', 'akId', res['result'][0]['akId']) | ||
| 52 | logger.info('【' + tcname + '】的接口返回参数为:' + str(res)) | ||
| 53 | else: | ||
| 54 | logger.info('【' + tcname + '】的接口返回参数为:' + str(res)) | ||
| 55 | else: | ||
| 56 | logger.info(response.text) |
case/WebAllDelete.py
0 → 100644
| 1 | #!/usr/bin/env python | ||
| 2 | # -*- coding: utf-8 -*- | ||
| 3 | # @Time : 2021/8/13 下午3:55 | ||
| 4 | # @Author : 付孟奇 | ||
| 5 | |||
| 6 | import unittest | ||
| 7 | from util.HandleSql import db_sql | ||
| 8 | from util.HandleJson import file_read_global | ||
| 9 | |||
| 10 | |||
| 11 | class WebAllDelete(unittest.TestCase): | ||
| 12 | |||
| 13 | def testFunc(self): | ||
| 14 | '''删除所有测试数据''' | ||
| 15 | # 删除账号 | ||
| 16 | db_sql.delete_user('apiappuser') | ||
| 17 | db_sql.delete_user('apiwebuser') | ||
| 18 | |||
| 19 | # 删除话术 | ||
| 20 | stlId = file_read_global('speech', 'stlId') | ||
| 21 | db_sql.delete_phase(stlId) | ||
| 22 | |||
| 23 | speech_name_copy = file_read_global('speech', 'speechName') + '-副本' | ||
| 24 | phase_copy_id = db_sql.select_pahse(speech_name_copy) | ||
| 25 | db_sql.delete_phase(phase_copy_id) |
case/WebChannelList.py
0 → 100644
| 1 | #!/usr/bin/env python | ||
| 2 | # -*- coding: utf-8 -*- | ||
| 3 | # @Time : 2021/8/13 下午3:55 | ||
| 4 | # @Author : 付孟奇 | ||
| 5 | |||
| 6 | import unittest, requests | ||
| 7 | from config.vendorHost import vendor_host | ||
| 8 | from config.vendorPath import global_path | ||
| 9 | from util.generate import getTestCase | ||
| 10 | from util.log import logger | ||
| 11 | from util.HandleJson import file_readAPI | ||
| 12 | from util.HandleJson import file_read_global,file_updata_global | ||
| 13 | |||
| 14 | |||
| 15 | class WebChannelList(unittest.TestCase): | ||
| 16 | |||
| 17 | def testFunc(self): | ||
| 18 | '''查询所有的渠道''' | ||
| 19 | data_list = getTestCase('WEB_api_case.xlsx', '查询所有的渠道') | ||
| 20 | for i in range(len(data_list)): | ||
| 21 | self.getTest(data_list[i]) | ||
| 22 | |||
| 23 | def getTest(self, data): | ||
| 24 | tcname = data['tc_name'] | ||
| 25 | code = int(data['code']) | ||
| 26 | |||
| 27 | api_type = 'sys' | ||
| 28 | |||
| 29 | logger.info('********************【' + tcname + '】接口测试开始!' + '********************') | ||
| 30 | |||
| 31 | headers = { | ||
| 32 | 'Content-Type': 'application/json', | ||
| 33 | 'X-Auth-Token': file_read_global('web_login', 'token') | ||
| 34 | } | ||
| 35 | |||
| 36 | url = vendor_host + api_type + file_readAPI(api_type, 'queryAllChannelUsingPOST') | ||
| 37 | response = requests.request('POST', url, headers=headers) | ||
| 38 | |||
| 39 | if response.status_code is 200: | ||
| 40 | res = response.json() | ||
| 41 | self.assertEqual(res['code'], code, msg=str(res)) | ||
| 42 | if res['code'] == 0: | ||
| 43 | file_updata_global('channel', 'channel_name', res['result'][0]['label']) | ||
| 44 | file_updata_global('channel', 'channel_code', res['result'][0]['value']) | ||
| 45 | logger.info('【' + tcname + '】的接口返回参数为:' + str(res)) | ||
| 46 | else: | ||
| 47 | logger.info('【' + tcname + '】的接口返回参数为:' + str(res)) | ||
| 48 | else: | ||
| 49 | logger.info(response.text) |
case/WebEmailSend.py
0 → 100644
| 1 | #!/usr/bin/env python | ||
| 2 | # -*- coding: utf-8 -*- | ||
| 3 | # @Time : 2021/8/13 下午3:55 | ||
| 4 | # @Author : 付孟奇 | ||
| 5 | |||
| 6 | import unittest, requests | ||
| 7 | from config.vendorHost import vendor_host | ||
| 8 | from config import vendorList | ||
| 9 | from util.generate import getTestCase | ||
| 10 | from util.log import logger | ||
| 11 | from util.HandleJenkins import config | ||
| 12 | from util.HandleJson import file_readAPI, file_read_global | ||
| 13 | |||
| 14 | |||
| 15 | class WebEmailSend(unittest.TestCase): | ||
| 16 | |||
| 17 | def testFunc(self): | ||
| 18 | '''发送验证码''' | ||
| 19 | data_list = getTestCase('WEB_api_case.xlsx', '发送验证码') | ||
| 20 | for i in range(len(data_list)): | ||
| 21 | self.getTest(data_list[i]) | ||
| 22 | |||
| 23 | def getTest(self, data): | ||
| 24 | tcname = data['tc_name'] | ||
| 25 | code = int(data['code']) | ||
| 26 | bizType = data['bizType'] | ||
| 27 | toEmail = file_read_global('account', 'web_email') | ||
| 28 | |||
| 29 | api_type = 'sys' | ||
| 30 | |||
| 31 | logger.info('********************【' + tcname + '】接口测试开始!' + '********************') | ||
| 32 | |||
| 33 | headers = { | ||
| 34 | 'Content-Type': 'application/json' | ||
| 35 | } | ||
| 36 | if config['pro'] in vendorList.web_login_forget_pwd: | ||
| 37 | payload = { | ||
| 38 | "bizType": bizType, | ||
| 39 | "toEmail": toEmail | ||
| 40 | } | ||
| 41 | logger.info('【' + tcname + '】的接口入参为:' + str(payload)) | ||
| 42 | |||
| 43 | url = vendor_host + api_type + file_readAPI(api_type, 'sendValidCodeEmailUsingPOST') | ||
| 44 | response = requests.request('POST', url, headers=headers, json=payload) | ||
| 45 | |||
| 46 | if response.status_code is 200: | ||
| 47 | res = response.json() | ||
| 48 | self.assertEqual(res['code'], code, msg=str(res)) | ||
| 49 | logger.info('【' + tcname + '】的接口返回参数为:' + str(res)) | ||
| 50 | else: | ||
| 51 | logger.info(response.text) |
case/WebEmailValidCode.py
0 → 100644
| 1 | #!/usr/bin/env python | ||
| 2 | # -*- coding: utf-8 -*- | ||
| 3 | # @Time : 2021/8/13 下午3:55 | ||
| 4 | # @Author : 付孟奇 | ||
| 5 | |||
| 6 | import unittest, requests | ||
| 7 | from config.vendorHost import vendor_host | ||
| 8 | from util.generate import getTestCase | ||
| 9 | from util.log import logger | ||
| 10 | from util.HandleJson import file_readAPI, file_read_global, file_updata_global | ||
| 11 | from util.HandleRedis import handle_redis | ||
| 12 | |||
| 13 | |||
| 14 | class WebEmailValidCode(unittest.TestCase): | ||
| 15 | |||
| 16 | def testFunc(self): | ||
| 17 | '''验证邮箱验证码''' | ||
| 18 | data_list = getTestCase('WEB_api_case.xlsx', '验证邮箱验证码') | ||
| 19 | for i in range(len(data_list)): | ||
| 20 | self.getTest(data_list[i]) | ||
| 21 | |||
| 22 | def getTest(self, data): | ||
| 23 | tcname = data['tc_name'] | ||
| 24 | code = int(data['code']) | ||
| 25 | bizType = data['bizType'] | ||
| 26 | email = file_read_global('account', 'web_email') | ||
| 27 | username = file_read_global('account', 'web_user') | ||
| 28 | validCode = handle_redis.get_string_value('email_forget_password_' + email) | ||
| 29 | |||
| 30 | api_type = 'sys' | ||
| 31 | |||
| 32 | logger.info('********************【' + tcname + '】接口测试开始!' + '********************') | ||
| 33 | |||
| 34 | headers = { | ||
| 35 | 'Content-Type': 'application/json' | ||
| 36 | } | ||
| 37 | payload = { | ||
| 38 | "bizType": bizType, | ||
| 39 | "email": email, | ||
| 40 | "username": username, | ||
| 41 | "validCode": validCode | ||
| 42 | } | ||
| 43 | logger.info('【' + tcname + '】的接口入参为:' + str(payload)) | ||
| 44 | |||
| 45 | url = vendor_host + api_type + file_readAPI(api_type, 'validEmailCodeUsingPOST') | ||
| 46 | response = requests.request('POST', url, headers=headers, json=payload) | ||
| 47 | |||
| 48 | if response.status_code is 200: | ||
| 49 | res = response.json() | ||
| 50 | self.assertEqual(res['code'], code, msg=str(res)) | ||
| 51 | file_updata_global('account', 'web_valid_code', res['result']) | ||
| 52 | logger.info('【' + tcname + '】的接口返回参数为:' + str(res)) | ||
| 53 | else: | ||
| 54 | logger.info(response.text) |
case/WebFileDelete.py
0 → 100644
| 1 | #!/usr/bin/env python | ||
| 2 | # -*- coding: utf-8 -*- | ||
| 3 | # @Time : 2021/8/13 下午3:55 | ||
| 4 | # @Author : 付孟奇 | ||
| 5 | |||
| 6 | import unittest, requests | ||
| 7 | from config.vendorHost import vendor_host | ||
| 8 | from config.vendorPath import global_path | ||
| 9 | from util.generate import getTestCase | ||
| 10 | from util.log import logger | ||
| 11 | from util.HandleJson import file_readAPI | ||
| 12 | from util.HandleJson import file_read_global | ||
| 13 | from util.HandleSql import db_sql | ||
| 14 | |||
| 15 | |||
| 16 | class WebFileDelete(unittest.TestCase): | ||
| 17 | |||
| 18 | def testFunc(self): | ||
| 19 | '''删除文件''' | ||
| 20 | data_list = getTestCase('WEB_api_case.xlsx', '删除文件') | ||
| 21 | for i in range(len(data_list)): | ||
| 22 | self.getTest(data_list[i]) | ||
| 23 | |||
| 24 | def getTest(self, data): | ||
| 25 | tcname = data['tc_name'] | ||
| 26 | code = int(data['code']) | ||
| 27 | fileName = data['fileName'] | ||
| 28 | |||
| 29 | api_type = 're' | ||
| 30 | |||
| 31 | logger.info('********************【' + tcname + '】接口测试开始!' + '********************') | ||
| 32 | |||
| 33 | headers = { | ||
| 34 | 'Content-Type': 'application/json', | ||
| 35 | 'X-Auth-Token': file_read_global('web_login', 'token') | ||
| 36 | } | ||
| 37 | payload = { | ||
| 38 | "id": db_sql.select_file(fileName) | ||
| 39 | } | ||
| 40 | logger.info('【' + tcname + '】的接口入参为:' + str(payload)) | ||
| 41 | |||
| 42 | url = vendor_host + api_type + file_readAPI(api_type, 'deleteFileDetailUsingPOST') | ||
| 43 | response = requests.request('POST', url, headers=headers, json=payload) | ||
| 44 | |||
| 45 | if response.status_code is 200: | ||
| 46 | res = response.json() | ||
| 47 | self.assertEqual(res['code'], code, msg=str(res)) | ||
| 48 | logger.info('【' + tcname + '】的接口返回参数为:' + str(res)) | ||
| 49 | else: | ||
| 50 | logger.info(response.text) |
case/WebFileDetail.py
0 → 100644
| 1 | #!/usr/bin/env python | ||
| 2 | # -*- coding: utf-8 -*- | ||
| 3 | # @Time : 2021/8/13 下午3:55 | ||
| 4 | # @Author : 付孟奇 | ||
| 5 | |||
| 6 | import unittest, requests | ||
| 7 | from config.vendorHost import vendor_host | ||
| 8 | from config.vendorPath import global_path | ||
| 9 | from util.generate import getTestCase | ||
| 10 | from util.log import logger | ||
| 11 | from util.HandleJson import file_readAPI | ||
| 12 | from util.HandleJson import file_read_global | ||
| 13 | from util.HandleSql import db_sql | ||
| 14 | |||
| 15 | |||
| 16 | class WebFileDetail(unittest.TestCase): | ||
| 17 | |||
| 18 | def testFunc(self): | ||
| 19 | '''查看文件详情''' | ||
| 20 | data_list = getTestCase('WEB_api_case.xlsx', '查看文件详情') | ||
| 21 | for i in range(len(data_list)): | ||
| 22 | self.getTest(data_list[i]) | ||
| 23 | |||
| 24 | def getTest(self, data): | ||
| 25 | tcname = data['tc_name'] | ||
| 26 | code = int(data['code']) | ||
| 27 | fileName = data['fileName'] | ||
| 28 | |||
| 29 | api_type = 're' | ||
| 30 | |||
| 31 | logger.info('********************【' + tcname + '】接口测试开始!' + '********************') | ||
| 32 | |||
| 33 | headers = { | ||
| 34 | 'Content-Type': 'application/json', | ||
| 35 | 'X-Auth-Token': file_read_global('web_login', 'token') | ||
| 36 | } | ||
| 37 | payload = { | ||
| 38 | "id": db_sql.select_file(fileName) | ||
| 39 | } | ||
| 40 | logger.info('【' + tcname + '】的接口入参为:' + str(payload)) | ||
| 41 | |||
| 42 | url = vendor_host + api_type + file_readAPI(api_type, 'getFileDetailUsingPOST') | ||
| 43 | response = requests.request('POST', url, headers=headers, json=payload) | ||
| 44 | |||
| 45 | if response.status_code is 200: | ||
| 46 | res = response.json() | ||
| 47 | self.assertEqual(res['code'], code, msg=str(res)) | ||
| 48 | logger.info('【' + tcname + '】的接口返回参数为:' + str(res)) | ||
| 49 | else: | ||
| 50 | logger.info(response.text) |
case/WebFileList.py
0 → 100644
| 1 | #!/usr/bin/env python | ||
| 2 | # -*- coding: utf-8 -*- | ||
| 3 | # @Time : 2021/8/13 下午3:55 | ||
| 4 | # @Author : 付孟奇 | ||
| 5 | |||
| 6 | import unittest, requests | ||
| 7 | from config.vendorHost import vendor_host | ||
| 8 | from config.vendorPath import global_path | ||
| 9 | from util.generate import getTestCase | ||
| 10 | from util.log import logger | ||
| 11 | from util.HandleJson import file_readAPI | ||
| 12 | from util.HandleJson import file_read_global,file_updata_global | ||
| 13 | |||
| 14 | |||
| 15 | class WebFileList(unittest.TestCase): | ||
| 16 | |||
| 17 | def testFunc(self): | ||
| 18 | '''文件管理列表''' | ||
| 19 | data_list = getTestCase('WEB_api_case.xlsx', '文件管理列表') | ||
| 20 | for i in range(len(data_list)): | ||
| 21 | self.getTest(data_list[i]) | ||
| 22 | |||
| 23 | def getTest(self, data): | ||
| 24 | tcname = data['tc_name'] | ||
| 25 | code = int(data['code']) | ||
| 26 | docName = data['docName'] | ||
| 27 | product = data['product'] | ||
| 28 | |||
| 29 | api_type = 're' | ||
| 30 | |||
| 31 | logger.info('********************【' + tcname + '】接口测试开始!' + '********************') | ||
| 32 | |||
| 33 | headers = { | ||
| 34 | 'Content-Type': 'application/json', | ||
| 35 | 'X-Auth-Token': file_read_global('web_login', 'token') | ||
| 36 | } | ||
| 37 | payload = { | ||
| 38 | "docName": docName, | ||
| 39 | "docType": file_read_global('fileList', 'docType'), | ||
| 40 | "product": product, | ||
| 41 | "page": 1, | ||
| 42 | "perPage": 10 | ||
| 43 | } | ||
| 44 | logger.info('【' + tcname + '】的接口入参为:' + str(payload)) | ||
| 45 | |||
| 46 | url = vendor_host + api_type + file_readAPI(api_type, 'deleteFileDetailUsingPOST_1') | ||
| 47 | response = requests.request('POST', url, headers=headers, json=payload) | ||
| 48 | |||
| 49 | if response.status_code is 200: | ||
| 50 | res = response.json() | ||
| 51 | self.assertEqual(res['code'], code, msg=str(res)) | ||
| 52 | logger.info('【' + tcname + '】的接口返回参数为:' + str(res)) | ||
| 53 | else: | ||
| 54 | logger.info(response.text) |
case/WebFileProductFuzzy.py
0 → 100644
| 1 | #!/usr/bin/env python | ||
| 2 | # -*- coding: utf-8 -*- | ||
| 3 | # @Time : 2021/8/13 下午3:55 | ||
| 4 | # @Author : 付孟奇 | ||
| 5 | |||
| 6 | import unittest, requests | ||
| 7 | from config.vendorHost import vendor_host | ||
| 8 | from config.vendorPath import global_path | ||
| 9 | from util.generate import getTestCase | ||
| 10 | from util.log import logger | ||
| 11 | from util.HandleJson import file_readAPI | ||
| 12 | from util.HandleJson import file_read_global | ||
| 13 | |||
| 14 | |||
| 15 | class WebFileProductFuzzy(unittest.TestCase): | ||
| 16 | |||
| 17 | def testFunc(self): | ||
| 18 | '''查询产品关联信息''' | ||
| 19 | data_list = getTestCase('WEB_api_case.xlsx', '查询关联产品') | ||
| 20 | for i in range(len(data_list)): | ||
| 21 | self.getTest(data_list[i]) | ||
| 22 | |||
| 23 | def getTest(self, data): | ||
| 24 | tcname = data['tc_name'] | ||
| 25 | code = int(data['code']) | ||
| 26 | |||
| 27 | api_type = 're' | ||
| 28 | |||
| 29 | logger.info('********************【' + tcname + '】接口测试开始!' + '********************') | ||
| 30 | |||
| 31 | headers = { | ||
| 32 | 'Content-Type': 'application/json', | ||
| 33 | 'X-Auth-Token': file_read_global('web_login', 'token') | ||
| 34 | } | ||
| 35 | |||
| 36 | url = vendor_host + api_type + file_readAPI(api_type, 'getProductUsingGET') | ||
| 37 | response = requests.request('GET', url, headers=headers) | ||
| 38 | |||
| 39 | if response.status_code is 200: | ||
| 40 | res = response.json() | ||
| 41 | self.assertEqual(res['code'], code, msg=str(res)) | ||
| 42 | logger.info('【' + tcname + '】的接口返回参数为:' + str(res)) | ||
| 43 | else: | ||
| 44 | logger.info(response.text) |
case/WebFileUpdate.py
0 → 100644
| 1 | #!/usr/bin/env python | ||
| 2 | # -*- coding: utf-8 -*- | ||
| 3 | # @Time : 2021/8/13 下午3:55 | ||
| 4 | # @Author : 付孟奇 | ||
| 5 | |||
| 6 | import unittest, requests | ||
| 7 | from config.vendorHost import vendor_host | ||
| 8 | from config.vendorPath import global_path | ||
| 9 | from util.generate import getTestCase | ||
| 10 | from util.log import logger | ||
| 11 | from util.HandleJson import file_readAPI | ||
| 12 | from util.HandleJson import file_read_global | ||
| 13 | from util.HandleSql import db_sql | ||
| 14 | |||
| 15 | |||
| 16 | class WebFileUpdate(unittest.TestCase): | ||
| 17 | |||
| 18 | def testFunc(self): | ||
| 19 | '''更新文件信息''' | ||
| 20 | data_list = getTestCase('WEB_api_case.xlsx', '更新文件信息') | ||
| 21 | for i in range(len(data_list)): | ||
| 22 | self.getTest(data_list[i]) | ||
| 23 | |||
| 24 | def getTest(self, data): | ||
| 25 | tcname = data['tc_name'] | ||
| 26 | code = int(data['code']) | ||
| 27 | docName = data['docName'] | ||
| 28 | productCode = data['productCode'] | ||
| 29 | |||
| 30 | api_type = 're' | ||
| 31 | |||
| 32 | logger.info('********************【' + tcname + '】接口测试开始!' + '********************') | ||
| 33 | |||
| 34 | headers = { | ||
| 35 | 'Content-Type': 'application/json', | ||
| 36 | 'X-Auth-Token': file_read_global('web_login', 'token') | ||
| 37 | } | ||
| 38 | payload = { | ||
| 39 | 'id': db_sql.select_file(docName), | ||
| 40 | 'docName': docName, | ||
| 41 | 'docType': file_read_global('fileList', 'docType'), | ||
| 42 | 'productCode': productCode, | ||
| 43 | 'checkedCityArr': [file_read_global('organization', 'branchId')], | ||
| 44 | 'checkedChannelArr': [file_read_global('channel', 'channel_name')] | ||
| 45 | } | ||
| 46 | logger.info('【' + tcname + '】的接口入参为:' + str(payload)) | ||
| 47 | |||
| 48 | url = vendor_host + api_type + file_readAPI(api_type, 'updateFileUsingPOST') | ||
| 49 | response = requests.request('POST', url, headers=headers, json=payload) | ||
| 50 | |||
| 51 | if response.status_code is 200: | ||
| 52 | res = response.json() | ||
| 53 | self.assertEqual(res['code'], code, msg=str(res)) | ||
| 54 | logger.info('【' + tcname + '】的接口返回参数为:' + str(res)) | ||
| 55 | else: | ||
| 56 | logger.info(response.text) |
case/WebFileUpload.py
0 → 100644
| 1 | #!/usr/bin/env python | ||
| 2 | # -*- coding: utf-8 -*- | ||
| 3 | # @Time : 2021/8/12 下午5:35 | ||
| 4 | # @Author : 付孟奇 | ||
| 5 | |||
| 6 | import unittest, requests | ||
| 7 | from config.vendorHost import vendor_host | ||
| 8 | from config.vendorPath import global_path, file_pdf_path | ||
| 9 | from util.generate import getTestCase | ||
| 10 | from util.log import logger | ||
| 11 | from util.HandleJson import file_read_global, file_readAPI | ||
| 12 | import warnings | ||
| 13 | |||
| 14 | |||
| 15 | class WebFileUpload(unittest.TestCase): | ||
| 16 | def testFunc(self): | ||
| 17 | '''Web端上传文件''' | ||
| 18 | warnings.simplefilter('ignore', ResourceWarning) | ||
| 19 | data_list = getTestCase('WEB_api_case.xlsx', 'Web端上传文件') | ||
| 20 | for i in range(len(data_list)): | ||
| 21 | self.getTest(data_list[i]) | ||
| 22 | |||
| 23 | def getTest(self, data): | ||
| 24 | tcname = data['tc_name'] | ||
| 25 | code = int(data['code']) | ||
| 26 | productCode = data['productCode'] | ||
| 27 | |||
| 28 | api_type = 're' | ||
| 29 | |||
| 30 | logger.info('********************【' + tcname + '】接口测试开始!' + '********************') | ||
| 31 | |||
| 32 | headers = { | ||
| 33 | 'X-Auth-Token': file_read_global('web_login', 'token') | ||
| 34 | } | ||
| 35 | |||
| 36 | payload = { | ||
| 37 | # 'docName': 'apitest.pdf', | ||
| 38 | 'docType': file_read_global('fileList', 'docType'), | ||
| 39 | 'productCode': productCode, | ||
| 40 | 'checkedChannelArr': file_read_global('channel', 'channel_name'), | ||
| 41 | 'checkedCityArr': file_read_global('organization', 'subBranchId'), | ||
| 42 | 'checkedProvinceArr': file_read_global('organization', 'branchId'), | ||
| 43 | } | ||
| 44 | files = [ | ||
| 45 | ('file', ('apitest.pdf', | ||
| 46 | open(file_pdf_path, 'rb'), "application/pdf")) | ||
| 47 | ] | ||
| 48 | |||
| 49 | url = vendor_host + api_type + file_readAPI(api_type, 'uploadFileUsingPOST') | ||
| 50 | response = requests.post(url, headers=headers, data=payload, files=files) | ||
| 51 | |||
| 52 | logger.info(response.text) |
case/WebForgetPassword.py
0 → 100644
| 1 | #!/usr/bin/env python | ||
| 2 | # -*- coding: utf-8 -*- | ||
| 3 | # @Time : 2021/8/13 下午3:55 | ||
| 4 | # @Author : 付孟奇 | ||
| 5 | |||
| 6 | import unittest, requests | ||
| 7 | from config.vendorHost import vendor_host | ||
| 8 | from util.generate import getTestCase | ||
| 9 | from util.log import logger | ||
| 10 | from util.HandleJson import file_readAPI, file_read_global | ||
| 11 | from util.HandleRedis import handle_redis | ||
| 12 | |||
| 13 | |||
| 14 | class WebForgetPassword(unittest.TestCase): | ||
| 15 | |||
| 16 | def testFunc(self): | ||
| 17 | '''web端忘记密码''' | ||
| 18 | data_list = getTestCase('WEB_api_case.xlsx', '忘记密码修改') | ||
| 19 | for i in range(len(data_list)): | ||
| 20 | self.getTest(data_list[i]) | ||
| 21 | |||
| 22 | def getTest(self, data): | ||
| 23 | tcname = data['tc_name'] | ||
| 24 | code = int(data['code']) | ||
| 25 | password = data['password'] | ||
| 26 | username = file_read_global('account', 'web_user') | ||
| 27 | validCode = file_read_global('account','web_valid_code') | ||
| 28 | |||
| 29 | api_type = 'sys' | ||
| 30 | |||
| 31 | logger.info('********************【' + tcname + '】接口测试开始!' + '********************') | ||
| 32 | |||
| 33 | headers = { | ||
| 34 | 'Content-Type': 'application/json' | ||
| 35 | } | ||
| 36 | payload = { | ||
| 37 | "password": password, | ||
| 38 | "username": username, | ||
| 39 | "validNum": validCode | ||
| 40 | } | ||
| 41 | logger.info('【' + tcname + '】的接口入参为:' + str(payload)) | ||
| 42 | |||
| 43 | url = vendor_host + api_type + file_readAPI(api_type, 'forgetPassword2UsingPOST') | ||
| 44 | response = requests.request('POST', url, headers=headers, json=payload) | ||
| 45 | |||
| 46 | if response.status_code is 200: | ||
| 47 | res = response.json() | ||
| 48 | self.assertEqual(res['code'], code, msg=str(res)) | ||
| 49 | logger.info('【' + tcname + '】的接口返回参数为:' + str(res)) | ||
| 50 | else: | ||
| 51 | logger.info(response.text) |
case/WebLogin.py
0 → 100644
| 1 | #!/usr/bin/env python | ||
| 2 | # -*- coding: utf-8 -*- | ||
| 3 | # @Time : 2021/8/13 下午3:55 | ||
| 4 | # @Author : 付孟奇 | ||
| 5 | |||
| 6 | import unittest, requests | ||
| 7 | from config.vendorHost import vendor_host | ||
| 8 | from config import vendorList | ||
| 9 | from util.generate import getTestCase | ||
| 10 | from util.log import logger | ||
| 11 | from util.HandleJenkins import config | ||
| 12 | from util.HandleJson import file_readAPI | ||
| 13 | from util.HandleJson import file_updata_global | ||
| 14 | |||
| 15 | |||
| 16 | class WebLogin(unittest.TestCase): | ||
| 17 | |||
| 18 | def testFunc(self): | ||
| 19 | '''web登陆''' | ||
| 20 | data_list = getTestCase('WEB_api_case.xlsx', 'web登陆') | ||
| 21 | for i in range(len(data_list)): | ||
| 22 | self.getTest(data_list[i]) | ||
| 23 | |||
| 24 | def getTest(self, data): | ||
| 25 | tcname = data['tc_name'] | ||
| 26 | code = int(data['code']) | ||
| 27 | password = data['password'] | ||
| 28 | username = data['username'] | ||
| 29 | |||
| 30 | api_type = 'sys' | ||
| 31 | |||
| 32 | logger.info('********************【' + tcname + '】接口测试开始!' + '********************') | ||
| 33 | |||
| 34 | headers = { | ||
| 35 | 'Content-Type': 'application/json' | ||
| 36 | } | ||
| 37 | if config['pro'] in vendorList.web_login_1: | ||
| 38 | payload = {"username": username, "password": password} | ||
| 39 | logger.info('【' + tcname + '】的接口入参为:' + str(payload)) | ||
| 40 | |||
| 41 | url = vendor_host + api_type + file_readAPI(api_type, 'webLoginUsingPOST') | ||
| 42 | response = requests.request('POST', url, headers=headers, json=payload) | ||
| 43 | |||
| 44 | if response.status_code is 200: | ||
| 45 | res = response.json() | ||
| 46 | self.assertEqual(res['code'], code, msg=str(res)) | ||
| 47 | file_updata_global('web_login', 'token', res['result']['token']) | ||
| 48 | logger.info('【' + tcname + '】的接口返回参数为:' + str(res)) | ||
| 49 | else: | ||
| 50 | logger.info(response.text) |
case/WebOrderPhaseValidateV3.py
0 → 100644
| 1 | #!/usr/bin/env python | ||
| 2 | # -*- coding: utf-8 -*- | ||
| 3 | # @Time : 2021/8/13 下午3:55 | ||
| 4 | # @Author : 付孟奇 | ||
| 5 | |||
| 6 | import unittest, requests | ||
| 7 | from config.vendorHost import vendor_host | ||
| 8 | from util.generate import getTestCase | ||
| 9 | from util.log import logger | ||
| 10 | from util.HandleJson import file_readAPI | ||
| 11 | from util.HandleJson import file_read_global | ||
| 12 | from util.HandleSql import db_sql | ||
| 13 | |||
| 14 | |||
| 15 | class WebOrderPhaseValidateV3(unittest.TestCase): | ||
| 16 | |||
| 17 | def testFunc(self): | ||
| 18 | '''话术验证生成话术''' | ||
| 19 | data_list = getTestCase('WEB_api_case.xlsx', '话术验证生成话术') | ||
| 20 | for i in range(len(data_list)): | ||
| 21 | self.getTest(data_list[i]) | ||
| 22 | |||
| 23 | def getTest(self, data): | ||
| 24 | tcname = data['tc_name'] | ||
| 25 | code = int(data['code']) | ||
| 26 | |||
| 27 | orderInfo =db_sql.select_extra_info(file_read_global('order','orderRecordId')) | ||
| 28 | stlId = file_read_global('speech', 'stlId') | ||
| 29 | |||
| 30 | api_type = 're' | ||
| 31 | |||
| 32 | logger.info('********************【' + tcname + '】接口测试开始!' + '********************') | ||
| 33 | |||
| 34 | headers = { | ||
| 35 | 'Content-Type': 'application/json', | ||
| 36 | 'X-Auth-Token': file_read_global('web_login', 'token') | ||
| 37 | } | ||
| 38 | payload = { | ||
| 39 | "orderInfo": orderInfo, | ||
| 40 | "stlId": stlId | ||
| 41 | } | ||
| 42 | logger.info('【' + tcname + '】的接口入参为:' + str(payload)) | ||
| 43 | |||
| 44 | url = vendor_host + api_type + file_readAPI(api_type, 'getOrderPhaseV3UsingPOST') | ||
| 45 | response = requests.request('POST', url, headers=headers, json=payload) | ||
| 46 | |||
| 47 | if response.status_code is 200: | ||
| 48 | res = response.json() | ||
| 49 | self.assertEqual(res['code'], code, msg=str(res)) | ||
| 50 | logger.info('【' + tcname + '】的接口返回参数为:' + str(res)) | ||
| 51 | else: | ||
| 52 | logger.error(response.text) |
case/WebOrderReportDown.py
0 → 100644
| 1 | #!/usr/bin/env python | ||
| 2 | # -*- coding: utf-8 -*- | ||
| 3 | # @Time : 2021/8/13 下午3:55 | ||
| 4 | # @Author : 付孟奇 | ||
| 5 | |||
| 6 | import unittest, requests | ||
| 7 | from config.vendorHost import vendor_host | ||
| 8 | from config.vendorPath import global_path | ||
| 9 | from util.generate import getTestCase | ||
| 10 | from util.log import logger | ||
| 11 | from util.HandleJson import file_readAPI,file_read_global | ||
| 12 | from util.HandleTime import handle_time | ||
| 13 | |||
| 14 | |||
| 15 | |||
| 16 | class WebOrderReportDown(unittest.TestCase): | ||
| 17 | |||
| 18 | def testFunc(self): | ||
| 19 | '''报表下载''' | ||
| 20 | data_list = getTestCase('WEB_api_case.xlsx', '报表下载') | ||
| 21 | for i in range(len(data_list)): | ||
| 22 | self.getTest(data_list[i]) | ||
| 23 | |||
| 24 | def getTest(self, data): | ||
| 25 | tcname = data['tc_name'] | ||
| 26 | |||
| 27 | api_type = 'cl' | ||
| 28 | |||
| 29 | logger.info('********************【' + tcname + '】接口测试开始!' + '********************') | ||
| 30 | |||
| 31 | headers = { | ||
| 32 | 'Content-Type': 'application/json', | ||
| 33 | 'X-Auth-Token': file_read_global('web_login', 'token') | ||
| 34 | } | ||
| 35 | payload = { | ||
| 36 | "beginTime": handle_time.timeTimeYMD(), | ||
| 37 | "endTime": handle_time.timeTimeYMD() | ||
| 38 | } | ||
| 39 | logger.info('【' + tcname + '】的接口入参为:' + str(payload)) | ||
| 40 | |||
| 41 | url = vendor_host + api_type + file_readAPI(api_type, 'orderReport3UsingGET') | ||
| 42 | response = requests.request('GET', url, headers=headers, params=payload) | ||
| 43 | |||
| 44 | if response.status_code is 200: | ||
| 45 | logger.info('报表下载成功') | ||
| 46 | else: | ||
| 47 | logger.error('报表下载失败') |
case/WebOrganizationGetTree.py
0 → 100644
| 1 | #!/usr/bin/env python | ||
| 2 | # -*- coding: utf-8 -*- | ||
| 3 | # @Time : 2021/8/13 下午3:55 | ||
| 4 | # @Author : 付孟奇 | ||
| 5 | |||
| 6 | import unittest, requests | ||
| 7 | from config.vendorHost import vendor_host | ||
| 8 | from util.generate import getTestCase | ||
| 9 | from util.log import logger | ||
| 10 | from util.firstLogin import FirstLogin | ||
| 11 | from util.HandleJson import file_readAPI | ||
| 12 | from util.HandleJson import file_updata_global | ||
| 13 | |||
| 14 | |||
| 15 | class WebOrganizationGetTree(unittest.TestCase): | ||
| 16 | |||
| 17 | def testFunc(self): | ||
| 18 | '''查询机构结构''' | ||
| 19 | data_list = getTestCase('WEB_api_case.xlsx', '查询机构结构') | ||
| 20 | for i in range(len(data_list)): | ||
| 21 | self.getTest(data_list[i]) | ||
| 22 | |||
| 23 | def getTest(self, data): | ||
| 24 | tcname = data['tc_name'] | ||
| 25 | code = int(data['code']) | ||
| 26 | |||
| 27 | api_type = 'sys' | ||
| 28 | |||
| 29 | logger.info('********************【' + tcname + '】接口测试开始!' + '********************') | ||
| 30 | |||
| 31 | headers = { | ||
| 32 | 'Content-Type': 'application/json', | ||
| 33 | 'X-Auth-Token': FirstLogin() | ||
| 34 | } | ||
| 35 | url = vendor_host + api_type + file_readAPI(api_type, 'getOrgTreeUsingPOST') | ||
| 36 | response = requests.request('POST', url, headers=headers) | ||
| 37 | |||
| 38 | if response.status_code is 200: | ||
| 39 | res = response.json() | ||
| 40 | self.assertEqual(res['code'], code, msg=str(res)) | ||
| 41 | if res['code'] == 0: | ||
| 42 | file_updata_global('organization', 'branchId', res['result'][0]['id']) | ||
| 43 | file_updata_global('organization', 'subBranchId', res['result'][0]['orgs'][0]['id']) | ||
| 44 | logger.info('【' + tcname + '】的接口返回参数为:' + str(res)) | ||
| 45 | else: | ||
| 46 | logger.info('【' + tcname + '】的接口返回参数为:' + str(res)) | ||
| 47 | else: | ||
| 48 | logger.info(response.text) |
case/WebOrganizationList.py
0 → 100644
| 1 | #!/usr/bin/env python | ||
| 2 | # -*- coding: utf-8 -*- | ||
| 3 | # @Time : 2021/8/13 下午3:55 | ||
| 4 | # @Author : 付孟奇 | ||
| 5 | |||
| 6 | import unittest, requests | ||
| 7 | from config.vendorHost import vendor_host | ||
| 8 | from config.vendorPath import global_path | ||
| 9 | from util.generate import getTestCase | ||
| 10 | from util.log import logger | ||
| 11 | from util.HandleJson import file_readAPI | ||
| 12 | from util.HandleJson import file_read_global, file_updata_global | ||
| 13 | |||
| 14 | |||
| 15 | class WebOrganizationList(unittest.TestCase): | ||
| 16 | |||
| 17 | def testFunc(self): | ||
| 18 | '''机构列表''' | ||
| 19 | data_list = getTestCase('WEB_api_case.xlsx', '机构列表') | ||
| 20 | for i in range(len(data_list)): | ||
| 21 | self.getTest(data_list[i]) | ||
| 22 | |||
| 23 | def getTest(self, data): | ||
| 24 | tcname = data['tc_name'] | ||
| 25 | code = int(data['code']) | ||
| 26 | branchId = data['branchId'] | ||
| 27 | if branchId != '': | ||
| 28 | branchId = file_read_global('organization', 'branchId') | ||
| 29 | subBranchId = data['subBranchId'] | ||
| 30 | if subBranchId != '': | ||
| 31 | subBranchId = file_read_global('organization', 'subBranchId') | ||
| 32 | |||
| 33 | api_type = 'sys' | ||
| 34 | |||
| 35 | logger.info('********************【' + tcname + '】接口测试开始!' + '********************') | ||
| 36 | |||
| 37 | headers = { | ||
| 38 | 'Content-Type': 'application/json', | ||
| 39 | 'X-Auth-Token': file_read_global('web_login', 'token') | ||
| 40 | } | ||
| 41 | payload = { | ||
| 42 | "branchId": branchId, | ||
| 43 | "subBranchId": subBranchId, | ||
| 44 | "page": 1, | ||
| 45 | "perPage": 10 | ||
| 46 | } | ||
| 47 | logger.info('【' + tcname + '】的接口入参为:' + str(payload)) | ||
| 48 | |||
| 49 | url = vendor_host + api_type + file_readAPI(api_type, 'organizationListUsingPOST') | ||
| 50 | response = requests.request('POST', url, headers=headers, json=payload) | ||
| 51 | |||
| 52 | if response.status_code is 200: | ||
| 53 | res = response.json() | ||
| 54 | self.assertEqual(res['code'], code, msg=str(res)) | ||
| 55 | logger.info('【' + tcname + '】的接口返回参数为:' + str(res)) | ||
| 56 | else: | ||
| 57 | logger.info(response.text) |
case/WebOrganizationPositingSwitcher.py
0 → 100644
| 1 | #!/usr/bin/env python | ||
| 2 | # -*- coding: utf-8 -*- | ||
| 3 | # @Time : 2021/8/13 下午3:55 | ||
| 4 | # @Author : 付孟奇 | ||
| 5 | |||
| 6 | import unittest, requests | ||
| 7 | from config.vendorHost import vendor_host | ||
| 8 | from config.vendorPath import global_path | ||
| 9 | from util.generate import getTestCase | ||
| 10 | from util.log import logger | ||
| 11 | from util.HandleJson import file_readAPI | ||
| 12 | from util.HandleJson import file_read_global, file_updata_global | ||
| 13 | |||
| 14 | |||
| 15 | class WebOrganizationPositingSwitcher(unittest.TestCase): | ||
| 16 | |||
| 17 | def testFunc(self): | ||
| 18 | '''地理位置水印开关''' | ||
| 19 | data_list = getTestCase('WEB_api_case.xlsx', '地理位置水印开关') | ||
| 20 | for i in range(len(data_list)): | ||
| 21 | self.getTest(data_list[i]) | ||
| 22 | |||
| 23 | def getTest(self, data): | ||
| 24 | tcname = data['tc_name'] | ||
| 25 | code = int(data['code']) | ||
| 26 | positioning = data['positioning'] | ||
| 27 | |||
| 28 | api_type = 'sys' | ||
| 29 | |||
| 30 | logger.info('********************【' + tcname + '】接口测试开始!' + '********************') | ||
| 31 | |||
| 32 | headers = { | ||
| 33 | 'Content-Type': 'application/json', | ||
| 34 | 'X-Auth-Token': file_read_global('web_login', 'token') | ||
| 35 | } | ||
| 36 | payload = { | ||
| 37 | "branchId": file_read_global('organization', 'branchId'), | ||
| 38 | "positioning": positioning | ||
| 39 | } | ||
| 40 | logger.info('【' + tcname + '】的接口入参为:' + str(payload)) | ||
| 41 | |||
| 42 | url = vendor_host + api_type + file_readAPI(api_type, 'switcherPositioningUsingPOST') | ||
| 43 | response = requests.request('POST', url, headers=headers, json=payload) | ||
| 44 | |||
| 45 | if response.status_code is 200: | ||
| 46 | res = response.json() | ||
| 47 | self.assertEqual(res['code'], code, msg=str(res)) | ||
| 48 | logger.info('【' + tcname + '】的接口返回参数为:' + str(res)) | ||
| 49 | else: | ||
| 50 | logger.info(response.text) |
case/WebOrganizationQuery.py
0 → 100644
| 1 | #!/usr/bin/env python | ||
| 2 | # -*- coding: utf-8 -*- | ||
| 3 | # @Time : 2021/8/13 下午3:55 | ||
| 4 | # @Author : 付孟奇 | ||
| 5 | |||
| 6 | import unittest, requests | ||
| 7 | from config.vendorHost import vendor_host | ||
| 8 | from util.generate import getTestCase | ||
| 9 | from util.log import logger | ||
| 10 | from util.HandleJson import file_readAPI | ||
| 11 | from util.HandleJson import file_read_global | ||
| 12 | |||
| 13 | |||
| 14 | class WebOrganizationQuery(unittest.TestCase): | ||
| 15 | |||
| 16 | def testFunc(self): | ||
| 17 | '''查询机构''' | ||
| 18 | data_list = getTestCase('WEB_api_case.xlsx', '查询机构') | ||
| 19 | for i in range(len(data_list)): | ||
| 20 | self.getTest(data_list[i]) | ||
| 21 | |||
| 22 | def getTest(self, data): | ||
| 23 | tcname = data['tc_name'] | ||
| 24 | code = int(data['code']) | ||
| 25 | |||
| 26 | api_type = 'sys' | ||
| 27 | |||
| 28 | logger.info('********************【' + tcname + '】接口测试开始!' + '********************') | ||
| 29 | |||
| 30 | headers = { | ||
| 31 | 'Content-Type': 'application/json', | ||
| 32 | 'X-Auth-Token': file_read_global('web_login', 'token') | ||
| 33 | } | ||
| 34 | payload = { | ||
| 35 | "verifyPermissions": 2 | ||
| 36 | } | ||
| 37 | logger.info('【' + tcname + '】的接口入参为:' + str(payload)) | ||
| 38 | |||
| 39 | url = vendor_host + api_type + file_readAPI(api_type, 'querySpeechTakeEffectConditionUsingPOST') | ||
| 40 | response = requests.request('POST', url, headers=headers, json=payload) | ||
| 41 | |||
| 42 | if response.status_code is 200: | ||
| 43 | res = response.json() | ||
| 44 | self.assertEqual(res['code'], code, msg=str(res)) | ||
| 45 | logger.info('【' + tcname + '】的接口返回参数为:' + str(res)) | ||
| 46 | else: | ||
| 47 | logger.info(response.text) |
case/WebOrganizationQueryBranch.py
0 → 100644
| 1 | #!/usr/bin/env python | ||
| 2 | # -*- coding: utf-8 -*- | ||
| 3 | # @Time : 2021/8/13 下午3:55 | ||
| 4 | # @Author : 付孟奇 | ||
| 5 | |||
| 6 | import unittest, requests | ||
| 7 | from config.vendorHost import vendor_host | ||
| 8 | from config.vendorPath import global_path | ||
| 9 | from util.generate import getTestCase | ||
| 10 | from util.log import logger | ||
| 11 | from util.HandleJson import file_readAPI | ||
| 12 | from util.HandleJson import file_read_global, file_updata_global | ||
| 13 | |||
| 14 | |||
| 15 | class WebOrganizationQueryBranch(unittest.TestCase): | ||
| 16 | |||
| 17 | def testFunc(self): | ||
| 18 | '''查询全部分公司''' | ||
| 19 | data_list = getTestCase('WEB_api_case.xlsx', '查询全部分公司') | ||
| 20 | for i in range(len(data_list)): | ||
| 21 | self.getTest(data_list[i]) | ||
| 22 | |||
| 23 | def getTest(self, data): | ||
| 24 | tcname = data['tc_name'] | ||
| 25 | code = int(data['code']) | ||
| 26 | |||
| 27 | api_type = 'sys' | ||
| 28 | |||
| 29 | logger.info('********************【' + tcname + '】接口测试开始!' + '********************') | ||
| 30 | |||
| 31 | headers = { | ||
| 32 | 'Content-Type': 'application/json', | ||
| 33 | 'X-Auth-Token': file_read_global('web_login', 'token') | ||
| 34 | } | ||
| 35 | payload = { | ||
| 36 | "type": '', | ||
| 37 | "verifyPermissions": 2 | ||
| 38 | } | ||
| 39 | logger.info('【' + tcname + '】的接口入参为:' + str(payload)) | ||
| 40 | |||
| 41 | url = vendor_host + api_type + file_readAPI(api_type, 'queryBranchUsingPOST') | ||
| 42 | response = requests.request('POST', url, headers=headers, json=payload) | ||
| 43 | |||
| 44 | if response.status_code is 200: | ||
| 45 | res = response.json() | ||
| 46 | self.assertEqual(res['code'], code, msg=str(res)) | ||
| 47 | logger.info('【' + tcname + '】的接口返回参数为:' + str(res)) | ||
| 48 | else: | ||
| 49 | logger.info(response.text) |
case/WebOrganizationQuerySubBranch.py
0 → 100644
| 1 | #!/usr/bin/env python | ||
| 2 | # -*- coding: utf-8 -*- | ||
| 3 | # @Time : 2021/8/13 下午3:55 | ||
| 4 | # @Author : 付孟奇 | ||
| 5 | |||
| 6 | import unittest, requests | ||
| 7 | from config.vendorHost import vendor_host | ||
| 8 | from config.vendorPath import global_path | ||
| 9 | from util.generate import getTestCase | ||
| 10 | from util.log import logger | ||
| 11 | from util.HandleJson import file_readAPI | ||
| 12 | from util.HandleJson import file_read_global, file_updata_global | ||
| 13 | |||
| 14 | |||
| 15 | class WebOrganizationQuerySubBranch(unittest.TestCase): | ||
| 16 | |||
| 17 | def testFunc(self): | ||
| 18 | '''查询属于某个分公司的全部支公司''' | ||
| 19 | data_list = getTestCase('WEB_api_case.xlsx', '查询分公司的子公司') | ||
| 20 | for i in range(len(data_list)): | ||
| 21 | self.getTest(data_list[i]) | ||
| 22 | |||
| 23 | def getTest(self, data): | ||
| 24 | tcname = data['tc_name'] | ||
| 25 | code = int(data['code']) | ||
| 26 | |||
| 27 | api_type = 'sys' | ||
| 28 | |||
| 29 | logger.info('********************【' + tcname + '】接口测试开始!' + '********************') | ||
| 30 | |||
| 31 | headers = { | ||
| 32 | 'Content-Type': 'application/json', | ||
| 33 | 'X-Auth-Token': file_read_global('web_login', 'token') | ||
| 34 | } | ||
| 35 | payload = { | ||
| 36 | "branchId": file_read_global('organization', 'branchId'), | ||
| 37 | "type": '', | ||
| 38 | "verifyPermissions": 2 | ||
| 39 | } | ||
| 40 | logger.info('【' + tcname + '】的接口入参为:' + str(payload)) | ||
| 41 | |||
| 42 | url = vendor_host + api_type + file_readAPI(api_type, 'querySubBranchUsingPOST') | ||
| 43 | response = requests.request('POST', url, headers=headers, json=payload) | ||
| 44 | |||
| 45 | if response.status_code is 200: | ||
| 46 | res = response.json() | ||
| 47 | self.assertEqual(res['code'], code, msg=str(res)) | ||
| 48 | logger.info('【' + tcname + '】的接口返回参数为:' + str(res)) | ||
| 49 | else: | ||
| 50 | logger.info(response.text) |
case/WebPopupFileList.py
0 → 100644
| 1 | #!/usr/bin/env python | ||
| 2 | # -*- coding: utf-8 -*- | ||
| 3 | # @Time : 2021/8/13 下午3:55 | ||
| 4 | # @Author : 付孟奇 | ||
| 5 | |||
| 6 | import unittest, requests | ||
| 7 | from config.vendorHost import vendor_host | ||
| 8 | from config.vendorPath import global_path | ||
| 9 | from util.generate import getTestCase | ||
| 10 | from util.log import logger | ||
| 11 | from util.HandleJson import file_readAPI | ||
| 12 | from util.HandleJson import file_read_global,file_updata_global | ||
| 13 | |||
| 14 | |||
| 15 | class WebPopupFileList(unittest.TestCase): | ||
| 16 | |||
| 17 | def testFunc(self): | ||
| 18 | '''查询文件类型''' | ||
| 19 | data_list = getTestCase('WEB_api_case.xlsx', '查询文件类型') | ||
| 20 | for i in range(len(data_list)): | ||
| 21 | self.getTest(data_list[i]) | ||
| 22 | |||
| 23 | def getTest(self, data): | ||
| 24 | tcname = data['tc_name'] | ||
| 25 | code = int(data['code']) | ||
| 26 | |||
| 27 | api_type = 're' | ||
| 28 | |||
| 29 | logger.info('********************【' + tcname + '】接口测试开始!' + '********************') | ||
| 30 | |||
| 31 | headers = { | ||
| 32 | 'Content-Type': 'application/json', | ||
| 33 | 'X-Auth-Token': file_read_global('web_login', 'token') | ||
| 34 | } | ||
| 35 | |||
| 36 | url = vendor_host + api_type + file_readAPI(api_type, 'getPoupFilesUsingPOST') | ||
| 37 | response = requests.request('POST', url, headers=headers) | ||
| 38 | |||
| 39 | if response.status_code is 200: | ||
| 40 | res = response.json() | ||
| 41 | self.assertEqual(res['code'], code, msg=str(res)) | ||
| 42 | if res['code'] == 0: | ||
| 43 | file_updata_global('fileList', 'docType', res['result'][0]['value']) | ||
| 44 | logger.info('【' + tcname + '】的接口返回参数为:' + str(res)) | ||
| 45 | else: | ||
| 46 | logger.info('【' + tcname + '】的接口返回参数为:' + str(res)) | ||
| 47 | else: | ||
| 48 | logger.info(response.text) |
case/WebProductCreat.py
0 → 100644
| 1 | #!/usr/bin/env python | ||
| 2 | # -*- coding: utf-8 -*- | ||
| 3 | # @Time : 2021/8/13 下午3:55 | ||
| 4 | # @Author : 付孟奇 | ||
| 5 | |||
| 6 | import unittest, requests | ||
| 7 | from config.vendorHost import vendor_host | ||
| 8 | from util.generate import getTestCase | ||
| 9 | from util.log import logger | ||
| 10 | from util.HandleJson import file_readAPI | ||
| 11 | from util.HandleJson import file_read_global, file_updata_global | ||
| 12 | from util.HandleSql import db_sql | ||
| 13 | |||
| 14 | |||
| 15 | class WebProductCreat(unittest.TestCase): | ||
| 16 | |||
| 17 | def testFunc(self): | ||
| 18 | '''创建产品''' | ||
| 19 | data_list = getTestCase('WEB_api_case.xlsx', '创建产品') | ||
| 20 | for i in range(len(data_list)): | ||
| 21 | product_name = data_list[i]['productName'] | ||
| 22 | product_id = db_sql.select_product(product_name) | ||
| 23 | if product_id is not None: | ||
| 24 | db_sql.delete_product(product_name) | ||
| 25 | self.getTest(data_list[i]) | ||
| 26 | |||
| 27 | def getTest(self, data): | ||
| 28 | tc_ame = data['tc_name'] | ||
| 29 | code = int(data['code']) | ||
| 30 | productName = data['productName'] | ||
| 31 | productCode = data['productCode'] | ||
| 32 | insuranceType = data['insuranceType'] | ||
| 33 | |||
| 34 | api_type = 're' | ||
| 35 | |||
| 36 | logger.info('********************【' + tc_ame + '】接口测试开始!' + '********************') | ||
| 37 | |||
| 38 | headers = { | ||
| 39 | 'Content-Type': 'application/json', | ||
| 40 | 'X-Auth-Token': file_read_global('web_login', 'token') | ||
| 41 | } | ||
| 42 | payload = {"productName": productName, | ||
| 43 | "productTypeId": file_read_global('product', 'productTypeId'), | ||
| 44 | "productCode": productCode, | ||
| 45 | "insuranceType": insuranceType, | ||
| 46 | "additionalAttributes": [], | ||
| 47 | "checkedChannelArr": [file_read_global('channel', 'channel_code')]} | ||
| 48 | logger.info('【' + tc_ame + '】的接口入参为:' + str(payload)) | ||
| 49 | |||
| 50 | url = vendor_host + api_type + file_readAPI(api_type, 'createProductUsingPOST') | ||
| 51 | response = requests.request('POST', url, headers=headers, json=payload) | ||
| 52 | |||
| 53 | if response.status_code is 200: | ||
| 54 | res = response.json() | ||
| 55 | self.assertEqual(res['code'], code, msg=str(res)) | ||
| 56 | logger.info('【' + tc_ame + '】的接口返回参数为:' + str(res)) | ||
| 57 | if insuranceType == '1': | ||
| 58 | file_updata_global('product', 'product_name', productName) | ||
| 59 | file_updata_global('product', 'product_code', productCode) | ||
| 60 | elif insuranceType == '2': | ||
| 61 | file_updata_global('product', 'product_name_att', productName) | ||
| 62 | file_updata_global('product', 'product_code_att', productCode) | ||
| 63 | else: | ||
| 64 | logger.info(response.text) |
case/WebProductList.py
0 → 100644
| 1 | #!/usr/bin/env python | ||
| 2 | # -*- coding: utf-8 -*- | ||
| 3 | # @Time : 2021/8/13 下午3:55 | ||
| 4 | # @Author : 付孟奇 | ||
| 5 | |||
| 6 | import unittest, requests | ||
| 7 | from config.vendorHost import vendor_host | ||
| 8 | from config.vendorPath import global_path | ||
| 9 | from util.generate import getTestCase | ||
| 10 | from util.log import logger | ||
| 11 | from util.HandleJson import file_readAPI | ||
| 12 | from util.HandleJson import file_read_global, file_updata_global | ||
| 13 | |||
| 14 | |||
| 15 | class WebProductList(unittest.TestCase): | ||
| 16 | |||
| 17 | def testFunc(self): | ||
| 18 | '''查询产品库列表''' | ||
| 19 | data_list = getTestCase('WEB_api_case.xlsx', '查询产品库列表') | ||
| 20 | for i in range(len(data_list)): | ||
| 21 | self.getTest(data_list[i]) | ||
| 22 | |||
| 23 | def getTest(self, data): | ||
| 24 | tcname = data['tc_name'] | ||
| 25 | code = int(data['code']) | ||
| 26 | productStatus = data['productStatus'] | ||
| 27 | productTypeId = data['productTypeId'] | ||
| 28 | productNameCode = data['productNameCode'] | ||
| 29 | insuranceType = data['insuranceType'] | ||
| 30 | marketingChannel = data['marketingChannel'] | ||
| 31 | |||
| 32 | api_type = 're' | ||
| 33 | |||
| 34 | logger.info('********************【' + tcname + '】接口测试开始!' + '********************') | ||
| 35 | |||
| 36 | headers = { | ||
| 37 | 'Content-Type': 'application/json', | ||
| 38 | 'X-Auth-Token': file_read_global('web_login', 'token') | ||
| 39 | } | ||
| 40 | payload = {"productStatus": productStatus, | ||
| 41 | "productTypeId": productTypeId, | ||
| 42 | "productNameCode": productNameCode, | ||
| 43 | "insuranceType": insuranceType, | ||
| 44 | "marketingChannel": marketingChannel, | ||
| 45 | "page": 1, | ||
| 46 | "perPage": 10} | ||
| 47 | logger.info('【' + tcname + '】的接口入参为:' + str(payload)) | ||
| 48 | |||
| 49 | url = vendor_host + api_type + file_readAPI(api_type, 'queryProductLibraryListUsingPOST') | ||
| 50 | response = requests.request('POST', url, headers=headers, json=payload) | ||
| 51 | |||
| 52 | if response.status_code is 200: | ||
| 53 | res = response.json() | ||
| 54 | self.assertEqual(res['code'], code, msg=str(res)) | ||
| 55 | logger.info('【' + tcname + '】的接口返回参数为:' + str(res)) | ||
| 56 | if productNameCode == file_read_global('product','product_code'): | ||
| 57 | file_updata_global('product', 'plId', res['result']['productLibraryList'][0]['id']) | ||
| 58 | elif productNameCode == file_read_global('product','product_code_att'): | ||
| 59 | file_updata_global('product', 'plId_att', res['result']['productLibraryList'][0]['id']) | ||
| 60 | |||
| 61 | else: | ||
| 62 | logger.info(response.text) |
case/WebProductTypeList.py
0 → 100644
| 1 | #!/usr/bin/env python | ||
| 2 | # -*- coding: utf-8 -*- | ||
| 3 | # @Time : 2021/8/13 下午3:55 | ||
| 4 | # @Author : 付孟奇 | ||
| 5 | |||
| 6 | import unittest, requests | ||
| 7 | from config.vendorHost import vendor_host | ||
| 8 | from config.vendorPath import global_path | ||
| 9 | from util.generate import getTestCase | ||
| 10 | from util.log import logger | ||
| 11 | from util.HandleJson import file_readAPI | ||
| 12 | from util.HandleJson import file_read_global,file_updata_global | ||
| 13 | |||
| 14 | |||
| 15 | class WebProductTypeList(unittest.TestCase): | ||
| 16 | |||
| 17 | def testFunc(self): | ||
| 18 | '''产品类型列表''' | ||
| 19 | data_list = getTestCase('WEB_api_case.xlsx', '产品类型列表') | ||
| 20 | for i in range(len(data_list)): | ||
| 21 | self.getTest(data_list[i]) | ||
| 22 | |||
| 23 | def getTest(self, data): | ||
| 24 | tcname = data['tc_name'] | ||
| 25 | code = int(data['code']) | ||
| 26 | |||
| 27 | api_type = 're' | ||
| 28 | |||
| 29 | logger.info('********************【' + tcname + '】接口测试开始!' + '********************') | ||
| 30 | |||
| 31 | headers = { | ||
| 32 | 'Content-Type': 'application/json', | ||
| 33 | 'X-Auth-Token': file_read_global('web_login', 'token') | ||
| 34 | } | ||
| 35 | |||
| 36 | url = vendor_host + api_type + file_readAPI(api_type, 'templateListUsingPOST') | ||
| 37 | response = requests.request('POST', url, headers=headers) | ||
| 38 | |||
| 39 | if response.status_code is 200: | ||
| 40 | res = response.json() | ||
| 41 | self.assertEqual(res['code'], code, msg=str(res)) | ||
| 42 | if res['code'] == 0: | ||
| 43 | file_updata_global('product', 'productTypeName', res['result'][0]['productTypeName']) | ||
| 44 | file_updata_global('product', 'productTypeId', res['result'][0]['productTypeId']) | ||
| 45 | logger.info('【' + tcname + '】的接口返回参数为:' + str(res)) | ||
| 46 | else: | ||
| 47 | logger.info('【' + tcname + '】的接口返回参数为:' + str(res)) | ||
| 48 | else: | ||
| 49 | logger.info(response.text) |
case/WebProductUpdate.py
0 → 100644
| 1 | #!/usr/bin/env python | ||
| 2 | # -*- coding: utf-8 -*- | ||
| 3 | # @Time : 2021/8/13 下午3:55 | ||
| 4 | # @Author : 付孟奇 | ||
| 5 | |||
| 6 | import unittest, requests | ||
| 7 | from config.vendorHost import vendor_host | ||
| 8 | from config.vendorPath import global_path | ||
| 9 | from util.generate import getTestCase | ||
| 10 | from util.log import logger | ||
| 11 | from util.HandleJson import file_readAPI | ||
| 12 | from util.HandleJson import file_read_global | ||
| 13 | |||
| 14 | |||
| 15 | class WebProductUpdate(unittest.TestCase): | ||
| 16 | |||
| 17 | def testFunc(self): | ||
| 18 | '''更新产品上下架状态''' | ||
| 19 | data_list = getTestCase('WEB_api_case.xlsx', '更新产品上下架状态') | ||
| 20 | for i in range(len(data_list)): | ||
| 21 | self.getTest(data_list[i]) | ||
| 22 | |||
| 23 | def getTest(self, data): | ||
| 24 | tcname = data['tc_name'] | ||
| 25 | code = int(data['code']) | ||
| 26 | productStatus = data['productStatus'] | ||
| 27 | |||
| 28 | api_type = 're' | ||
| 29 | |||
| 30 | logger.info('********************【' + tcname + '】接口测试开始!' + '********************') | ||
| 31 | |||
| 32 | headers = { | ||
| 33 | 'Content-Type': 'application/json', | ||
| 34 | 'X-Auth-Token': file_read_global('web_login', 'token') | ||
| 35 | } | ||
| 36 | product_list = [] | ||
| 37 | product_list.append(file_read_global('product', 'plId')) | ||
| 38 | product_list.append(file_read_global('product', 'plId_att')) | ||
| 39 | for i in product_list: | ||
| 40 | payload = { | ||
| 41 | "plId": i, | ||
| 42 | "productStatus": productStatus | ||
| 43 | } | ||
| 44 | logger.info('【' + tcname + '】的接口入参为:' + str(payload)) | ||
| 45 | |||
| 46 | url = vendor_host + api_type + file_readAPI(api_type, 'updateProductStatusUsingPOST') | ||
| 47 | response = requests.request('POST', url, headers=headers, json=payload) | ||
| 48 | |||
| 49 | if response.status_code is 200: | ||
| 50 | res = response.json() | ||
| 51 | self.assertEqual(res['code'], code, msg=str(res)) | ||
| 52 | logger.info('【' + tcname + '】的接口返回参数为:' + str(res)) | ||
| 53 | else: | ||
| 54 | logger.info(response.text) |
case/WebQualityAuditCanList.py
0 → 100644
| 1 | #!/usr/bin/env python | ||
| 2 | # -*- coding: utf-8 -*- | ||
| 3 | # @Time : 2021/8/13 下午3:55 | ||
| 4 | # @Author : 付孟奇 | ||
| 5 | |||
| 6 | import unittest, requests | ||
| 7 | from config.vendorHost import vendor_host | ||
| 8 | from config.vendorPath import global_path | ||
| 9 | from util.generate import getTestCase | ||
| 10 | from util.log import logger | ||
| 11 | from util.HandleJson import file_readAPI | ||
| 12 | from util.HandleJson import file_read_global, file_updata_global | ||
| 13 | |||
| 14 | |||
| 15 | class WebQualityAuditCanList(unittest.TestCase): | ||
| 16 | |||
| 17 | def testFunc(self): | ||
| 18 | '''可质检列表''' | ||
| 19 | data_list = getTestCase('WEB_api_case.xlsx', '可质检列表') | ||
| 20 | for i in range(len(data_list)): | ||
| 21 | self.getTest(data_list[i]) | ||
| 22 | |||
| 23 | def getTest(self, data): | ||
| 24 | tcname = data['tc_name'] | ||
| 25 | code = int(data['code']) | ||
| 26 | order_id = file_read_global('order', 'orderId') | ||
| 27 | |||
| 28 | api_type = 'qa' | ||
| 29 | |||
| 30 | logger.info('********************【' + tcname + '】接口测试开始!' + '********************') | ||
| 31 | |||
| 32 | headers = { | ||
| 33 | 'Content-Type': 'application/json', | ||
| 34 | 'X-Auth-Token': file_read_global('web_login', 'token') | ||
| 35 | } | ||
| 36 | payload = { | ||
| 37 | "orderId": order_id, | ||
| 38 | "page": 1, | ||
| 39 | "perPage": 10 | ||
| 40 | } | ||
| 41 | logger.info('【' + tcname + '】的接口入参为:' + str(payload)) | ||
| 42 | |||
| 43 | url = vendor_host + api_type + file_readAPI(api_type, 'getAuditCanListUsingPOST') | ||
| 44 | response = requests.request('POST', url, headers=headers, json=payload) | ||
| 45 | |||
| 46 | if response.status_code is 200: | ||
| 47 | res = response.json() | ||
| 48 | self.assertEqual(res['code'], code, msg=str(res)) | ||
| 49 | logger.info('【' + tcname + '】的接口返回参数为:' + str(res)) | ||
| 50 | else: | ||
| 51 | logger.info(response.text) |
case/WebQualityAuditDetail.py
0 → 100644
| 1 | #!/usr/bin/env python | ||
| 2 | # -*- coding: utf-8 -*- | ||
| 3 | # @Time : 2021/8/13 下午3:55 | ||
| 4 | # @Author : 付孟奇 | ||
| 5 | |||
| 6 | import unittest, requests | ||
| 7 | from config.vendorHost import vendor_host | ||
| 8 | from util.generate import getTestCase | ||
| 9 | from util.log import logger | ||
| 10 | from util.HandleJson import file_readAPI | ||
| 11 | from util.HandleJson import file_read_global, file_updata_global | ||
| 12 | from util.HandleSql import db_sql | ||
| 13 | import time | ||
| 14 | |||
| 15 | |||
| 16 | class WebQualityAuditDetail(unittest.TestCase): | ||
| 17 | |||
| 18 | def testFunc(self): | ||
| 19 | '''订单详情''' | ||
| 20 | data_list = getTestCase('WEB_api_case.xlsx', '订单详情') | ||
| 21 | for i in range(len(data_list)): | ||
| 22 | self.getTest(data_list[i]) | ||
| 23 | |||
| 24 | def getTest(self, data): | ||
| 25 | tcname = data['tc_name'] | ||
| 26 | code = int(data['code']) | ||
| 27 | orderSource = int(data['orderSource']) | ||
| 28 | orderRecordId = file_read_global('order', 'orderRecordId') | ||
| 29 | |||
| 30 | api_type = 'qa' | ||
| 31 | |||
| 32 | logger.info('********************【' + tcname + '】接口测试开始!' + '********************') | ||
| 33 | |||
| 34 | headers = { | ||
| 35 | 'Content-Type': 'application/json', | ||
| 36 | 'X-Auth-Token': file_read_global('web_login', 'token') | ||
| 37 | } | ||
| 38 | payload = { | ||
| 39 | "orderRecordId": orderRecordId, | ||
| 40 | "orderSource": orderSource | ||
| 41 | } | ||
| 42 | logger.info('【' + tcname + '】的接口入参为:' + str(payload)) | ||
| 43 | |||
| 44 | url = vendor_host + api_type + file_readAPI(api_type, 'infoDetailUsingPOST') | ||
| 45 | response = requests.request('POST', url, headers=headers, json=payload) | ||
| 46 | |||
| 47 | if response.status_code is 200: | ||
| 48 | res = response.json() | ||
| 49 | self.assertEqual(res['code'], code, msg=str(res)) | ||
| 50 | logger.info('【' + tcname + '】的接口返回参数为:' + str(res)) | ||
| 51 | file_updata_global('order', 'submitRecordId', res['result']['videoInfo'][0]['submitInfoId']) | ||
| 52 | file_updata_global('order', 'phaseId', | ||
| 53 | res['result']['videoInfo'][0]['phase'][0]['orderPhaseId']) | ||
| 54 | file_updata_global('order', 'phaseNum', res['result']['videoInfo'][0]['phase'][0]['phaseNum']) | ||
| 55 | file_updata_global('order', 'hintId', res['result']['videoInfo'][0]['phase'][0]['hint'][0]['hintId']) | ||
| 56 | file_updata_global('order', 'hintNum', res['result']['videoInfo'][0]['phase'][0]['hint'][0]['hintNum']) | ||
| 57 | else: | ||
| 58 | logger.info(response.text) | ||
| 59 | db_sql.update_order_status(orderRecordId) | ||
| ... | \ No newline at end of file | ... | \ No newline at end of file |
| 1 | #!/usr/bin/env python | ||
| 2 | # -*- coding: utf-8 -*- | ||
| 3 | # @Time : 2021/8/13 下午3:55 | ||
| 4 | # @Author : 付孟奇 | ||
| 5 | |||
| 6 | import unittest, requests | ||
| 7 | from config.vendorHost import vendor_host | ||
| 8 | from config.vendorPath import global_path | ||
| 9 | from util.generate import getTestCase | ||
| 10 | from util.log import logger | ||
| 11 | from util.HandleJson import file_readAPI | ||
| 12 | from util.HandleJson import file_read_global, file_updata_global | ||
| 13 | |||
| 14 | |||
| 15 | class WebQualityAuditProportionConfigDetail(unittest.TestCase): | ||
| 16 | |||
| 17 | def testFunc(self): | ||
| 18 | '''提供质检比例规则详情''' | ||
| 19 | data_list = getTestCase('WEB_api_case.xlsx', '提供质检比例规则详情') | ||
| 20 | for i in range(len(data_list)): | ||
| 21 | self.getTest(data_list[i]) | ||
| 22 | |||
| 23 | def getTest(self, data): | ||
| 24 | tcname = data['tc_name'] | ||
| 25 | code = int(data['code']) | ||
| 26 | role_id = file_read_global('proportion', 'role_id') | ||
| 27 | |||
| 28 | api_type = 'qa' | ||
| 29 | |||
| 30 | logger.info('********************【' + tcname + '】接口测试开始!' + '********************') | ||
| 31 | |||
| 32 | headers = { | ||
| 33 | 'Content-Type': 'application/json', | ||
| 34 | 'X-Auth-Token': file_read_global('web_login', 'token') | ||
| 35 | } | ||
| 36 | payload = { | ||
| 37 | "id": role_id | ||
| 38 | } | ||
| 39 | logger.info('【' + tcname + '】的接口入参为:' + str(payload)) | ||
| 40 | |||
| 41 | url = vendor_host + api_type + file_readAPI(api_type, 'getProportionRuleDetailUsingPOST') | ||
| 42 | response = requests.request('POST', url, headers=headers, json=payload) | ||
| 43 | |||
| 44 | if response.status_code is 200: | ||
| 45 | res = response.json() | ||
| 46 | self.assertEqual(res['code'], code, msg=str(res)) | ||
| 47 | logger.info('【' + tcname + '】的接口返回参数为:' + str(res)) | ||
| 48 | else: | ||
| 49 | logger.info(response.text) |
case/WebQualityAuditProportionConfigList.py
0 → 100644
| 1 | #!/usr/bin/env python | ||
| 2 | # -*- coding: utf-8 -*- | ||
| 3 | # @Time : 2021/8/13 下午3:55 | ||
| 4 | # @Author : 付孟奇 | ||
| 5 | |||
| 6 | import unittest, requests | ||
| 7 | from config.vendorHost import vendor_host | ||
| 8 | from config.vendorPath import global_path | ||
| 9 | from util.generate import getTestCase | ||
| 10 | from util.log import logger | ||
| 11 | from util.HandleJson import file_readAPI | ||
| 12 | from util.HandleJson import file_read_global, file_updata_global | ||
| 13 | |||
| 14 | |||
| 15 | class WebQualityAuditProportionConfigList(unittest.TestCase): | ||
| 16 | |||
| 17 | def testFunc(self): | ||
| 18 | '''提供质检比例规则列表''' | ||
| 19 | data_list = getTestCase('WEB_api_case.xlsx', '提供质检比例规则列表') | ||
| 20 | for i in range(len(data_list)): | ||
| 21 | self.getTest(data_list[i]) | ||
| 22 | |||
| 23 | def getTest(self, data): | ||
| 24 | tcname = data['tc_name'] | ||
| 25 | code = int(data['code']) | ||
| 26 | ruleName = file_read_global('proportion', 'role_name') | ||
| 27 | |||
| 28 | api_type = 'qa' | ||
| 29 | |||
| 30 | logger.info('********************【' + tcname + '】接口测试开始!' + '********************') | ||
| 31 | |||
| 32 | headers = { | ||
| 33 | 'Content-Type': 'application/json', | ||
| 34 | 'X-Auth-Token': file_read_global('web_login', 'token') | ||
| 35 | } | ||
| 36 | payload = { | ||
| 37 | "ruleName": ruleName, | ||
| 38 | "page": 1, | ||
| 39 | "perPage": 10 | ||
| 40 | } | ||
| 41 | logger.info('【' + tcname + '】的接口入参为:' + str(payload)) | ||
| 42 | |||
| 43 | url = vendor_host + api_type + file_readAPI(api_type, 'proportionListUsingPOST') | ||
| 44 | response = requests.request('POST', url, headers=headers, json=payload) | ||
| 45 | |||
| 46 | if response.status_code is 200: | ||
| 47 | res = response.json() | ||
| 48 | self.assertEqual(res['code'], code, msg=str(res)) | ||
| 49 | file_updata_global('proportion','role_id',res['result']['proportionList'][0]['id']) | ||
| 50 | logger.info('【' + tcname + '】的接口返回参数为:' + str(res)) | ||
| 51 | else: | ||
| 52 | logger.info(response.text) |
| 1 | #!/usr/bin/env python | ||
| 2 | # -*- coding: utf-8 -*- | ||
| 3 | # @Time : 2021/8/13 下午3:55 | ||
| 4 | # @Author : 付孟奇 | ||
| 5 | |||
| 6 | import unittest, requests | ||
| 7 | from config.vendorHost import vendor_host | ||
| 8 | from util.generate import getTestCase | ||
| 9 | from util.log import logger | ||
| 10 | from util.HandleJson import file_readAPI | ||
| 11 | from util.HandleJson import file_read_global, file_updata_global | ||
| 12 | from util.HandleSql import db_sql | ||
| 13 | |||
| 14 | |||
| 15 | class WebQualityAuditProportionConfigRuleAdd(unittest.TestCase): | ||
| 16 | |||
| 17 | def testFunc(self): | ||
| 18 | '''质检比列列表:新增规则''' | ||
| 19 | data_list = getTestCase('WEB_api_case.xlsx', '新增质检比例') | ||
| 20 | for i in range(len(data_list)): | ||
| 21 | self.getTest(data_list[i]) | ||
| 22 | |||
| 23 | def getTest(self, data): | ||
| 24 | tcname = data['tc_name'] | ||
| 25 | code = int(data['code']) | ||
| 26 | ruleName = data['ruleName'] | ||
| 27 | proportion = int(data['proportion']) | ||
| 28 | channle = file_read_global('channel', 'channel_name') | ||
| 29 | age_id = file_read_global('age', '60岁以下') | ||
| 30 | age = db_sql.select_age_value(age_id) | ||
| 31 | productType = file_read_global('product', 'productTypeId') | ||
| 32 | branchId = file_read_global('organization', 'branchId') | ||
| 33 | subBranchId = file_read_global('organization', 'subBranchId') | ||
| 34 | |||
| 35 | api_type = 'qa' | ||
| 36 | |||
| 37 | logger.info('********************【' + tcname + '】接口测试开始!' + '********************') | ||
| 38 | |||
| 39 | headers = { | ||
| 40 | 'Content-Type': 'application/json', | ||
| 41 | 'X-Auth-Token': file_read_global('web_login', 'token') | ||
| 42 | } | ||
| 43 | payload = { | ||
| 44 | "ruleName": ruleName, | ||
| 45 | "proportion": proportion, | ||
| 46 | "checkedChannelArr": [channle], | ||
| 47 | "checkedAgeArr": [age], | ||
| 48 | "checkedProductTypeArr": [productType], | ||
| 49 | "ai": [], | ||
| 50 | "reviewProportion": 100, | ||
| 51 | "checkedProvinceArr": [branchId], | ||
| 52 | "checkedCityArr": [subBranchId], | ||
| 53 | "checkedPeriodArr": [], | ||
| 54 | "checkedSystemTypeArr": [], | ||
| 55 | "checkedOrderTypeArr": [], | ||
| 56 | "samplingPeriod": "0", | ||
| 57 | "checkedSubCompanyArr": [subBranchId] | ||
| 58 | } | ||
| 59 | logger.info('【' + tcname + '】的接口入参为:' + str(payload)) | ||
| 60 | |||
| 61 | url = vendor_host + api_type + file_readAPI(api_type, 'addProportionRuleUsingPOST') | ||
| 62 | response = requests.request('POST', url, headers=headers, json=payload) | ||
| 63 | |||
| 64 | if response.status_code is 200: | ||
| 65 | res = response.json() | ||
| 66 | self.assertEqual(res['code'], code, msg=str(res)) | ||
| 67 | file_updata_global('proportion', 'role_name', ruleName) | ||
| 68 | logger.info('【' + tcname + '】的接口返回参数为:' + str(res)) | ||
| 69 | else: | ||
| 70 | logger.info(response.text) |
| 1 | #!/usr/bin/env python | ||
| 2 | # -*- coding: utf-8 -*- | ||
| 3 | # @Time : 2021/8/13 下午3:55 | ||
| 4 | # @Author : 付孟奇 | ||
| 5 | |||
| 6 | import unittest, requests | ||
| 7 | from config.vendorHost import vendor_host | ||
| 8 | from config.vendorPath import global_path | ||
| 9 | from util.generate import getTestCase | ||
| 10 | from util.log import logger | ||
| 11 | from util.HandleJson import file_readAPI | ||
| 12 | from util.HandleJson import file_read_global, file_updata_global | ||
| 13 | |||
| 14 | |||
| 15 | class WebQualityAuditProportionConfigRuleDelete(unittest.TestCase): | ||
| 16 | |||
| 17 | def testFunc(self): | ||
| 18 | '''质检比列列表:删除规则''' | ||
| 19 | data_list = getTestCase('WEB_api_case.xlsx', '删除质检比例') | ||
| 20 | for i in range(len(data_list)): | ||
| 21 | self.getTest(data_list[i]) | ||
| 22 | |||
| 23 | def getTest(self, data): | ||
| 24 | tcname = data['tc_name'] | ||
| 25 | code = int(data['code']) | ||
| 26 | role_id = file_read_global('proportion', 'role_id') | ||
| 27 | |||
| 28 | api_type = 'qa' | ||
| 29 | |||
| 30 | logger.info('********************【' + tcname + '】接口测试开始!' + '********************') | ||
| 31 | |||
| 32 | headers = { | ||
| 33 | 'Content-Type': 'application/json', | ||
| 34 | 'X-Auth-Token': file_read_global('web_login', 'token') | ||
| 35 | } | ||
| 36 | payload = { | ||
| 37 | "id": role_id | ||
| 38 | } | ||
| 39 | logger.info('【' + tcname + '】的接口入参为:' + str(payload)) | ||
| 40 | |||
| 41 | url = vendor_host + api_type + file_readAPI(api_type, 'deleteProportionRuleUsingPOST') | ||
| 42 | response = requests.request('POST', url, headers=headers, json=payload) | ||
| 43 | |||
| 44 | if response.status_code is 200: | ||
| 45 | res = response.json() | ||
| 46 | self.assertEqual(res['code'], code, msg=str(res)) | ||
| 47 | logger.info('【' + tcname + '】的接口返回参数为:' + str(res)) | ||
| 48 | else: | ||
| 49 | logger.info(response.text) |
| 1 | #!/usr/bin/env python | ||
| 2 | # -*- coding: utf-8 -*- | ||
| 3 | # @Time : 2021/8/13 下午3:55 | ||
| 4 | # @Author : 付孟奇 | ||
| 5 | |||
| 6 | import unittest, requests | ||
| 7 | from config.vendorHost import vendor_host | ||
| 8 | from util.generate import getTestCase | ||
| 9 | from util.log import logger | ||
| 10 | from util.HandleJson import file_readAPI | ||
| 11 | from util.HandleJson import file_read_global, file_updata_global | ||
| 12 | from util.HandleSql import db_sql | ||
| 13 | |||
| 14 | |||
| 15 | class WebQualityAuditProportionConfigRuleModify(unittest.TestCase): | ||
| 16 | |||
| 17 | def testFunc(self): | ||
| 18 | '''质检比列列表:修改规则''' | ||
| 19 | data_list = getTestCase('WEB_api_case.xlsx', '修改质检比例') | ||
| 20 | for i in range(len(data_list)): | ||
| 21 | self.getTest(data_list[i]) | ||
| 22 | |||
| 23 | def getTest(self, data): | ||
| 24 | tcname = data['tc_name'] | ||
| 25 | code = int(data['code']) | ||
| 26 | proportion = int(data['proportion']) | ||
| 27 | ruleName = file_read_global('proportion', 'role_name') | ||
| 28 | channle = file_read_global('channel', 'channel_name') | ||
| 29 | age_id = file_read_global('age', '60岁以下') | ||
| 30 | age = db_sql.select_age_value(age_id) | ||
| 31 | productType = file_read_global('product', 'productTypeId') | ||
| 32 | branchId = file_read_global('organization', 'branchId') | ||
| 33 | subBranchId = file_read_global('organization', 'subBranchId') | ||
| 34 | role_id = file_read_global('proportion', 'role_id') | ||
| 35 | |||
| 36 | api_type = 'qa' | ||
| 37 | |||
| 38 | logger.info('********************【' + tcname + '】接口测试开始!' + '********************') | ||
| 39 | |||
| 40 | headers = { | ||
| 41 | 'Content-Type': 'application/json', | ||
| 42 | 'X-Auth-Token': file_read_global('web_login', 'token') | ||
| 43 | } | ||
| 44 | payload = { | ||
| 45 | "id": role_id, | ||
| 46 | "ruleName": ruleName, | ||
| 47 | "proportion": proportion, | ||
| 48 | "checkedChannelArr": [channle], | ||
| 49 | "checkedAgeArr": [age], | ||
| 50 | "checkedProductTypeArr": [productType], | ||
| 51 | "ai": [], | ||
| 52 | "checkedProvinceArr": [branchId], | ||
| 53 | "checkedCityArr": [subBranchId], | ||
| 54 | "checkedPeriodArr": [], | ||
| 55 | "checkedSystemTypeArr": [], | ||
| 56 | "checkedOrderTypeArr": [], | ||
| 57 | "samplingPeriod": "0", | ||
| 58 | } | ||
| 59 | logger.info('【' + tcname + '】的接口入参为:' + str(payload)) | ||
| 60 | |||
| 61 | url = vendor_host + api_type + file_readAPI(api_type, 'modifyProportionRuleUsingPOST') | ||
| 62 | response = requests.request('POST', url, headers=headers, json=payload) | ||
| 63 | |||
| 64 | if response.status_code is 200: | ||
| 65 | res = response.json() | ||
| 66 | self.assertEqual(res['code'], code, msg=str(res)) | ||
| 67 | file_updata_global('proportion', 'role_name', ruleName) | ||
| 68 | logger.info('【' + tcname + '】的接口返回参数为:' + str(res)) | ||
| 69 | else: | ||
| 70 | logger.info(response.text) |
case/WebQualityAuditRecordHistory.py
0 → 100644
| 1 | #!/usr/bin/env python | ||
| 2 | # -*- coding: utf-8 -*- | ||
| 3 | # @Time : 2021/8/13 下午3:55 | ||
| 4 | # @Author : 付孟奇 | ||
| 5 | |||
| 6 | import unittest, requests | ||
| 7 | from config.vendorHost import vendor_host | ||
| 8 | from config.vendorPath import global_path | ||
| 9 | from util.generate import getTestCase | ||
| 10 | from util.log import logger | ||
| 11 | from util.HandleJson import file_readAPI | ||
| 12 | from util.HandleJson import file_read_global, file_updata_global | ||
| 13 | |||
| 14 | |||
| 15 | class WebQualityAuditRecordHistory(unittest.TestCase): | ||
| 16 | |||
| 17 | def testFunc(self): | ||
| 18 | '''审核历史记录''' | ||
| 19 | data_list = getTestCase('WEB_api_case.xlsx', '审核历史记录') | ||
| 20 | for i in range(len(data_list)): | ||
| 21 | self.getTest(data_list[i]) | ||
| 22 | |||
| 23 | def getTest(self, data): | ||
| 24 | tcname = data['tc_name'] | ||
| 25 | code = int(data['code']) | ||
| 26 | orderRecordId = file_read_global('order', 'orderRecordId') | ||
| 27 | |||
| 28 | api_type = 'qa' | ||
| 29 | |||
| 30 | logger.info('********************【' + tcname + '】接口测试开始!' + '********************') | ||
| 31 | |||
| 32 | headers = { | ||
| 33 | 'Content-Type': 'application/json', | ||
| 34 | 'X-Auth-Token': file_read_global('web_login', 'token') | ||
| 35 | } | ||
| 36 | payload = { | ||
| 37 | "orderRecordId": orderRecordId, | ||
| 38 | "page": 1, | ||
| 39 | "perPage": 10000 | ||
| 40 | } | ||
| 41 | logger.info('【' + tcname + '】的接口入参为:' + str(payload)) | ||
| 42 | |||
| 43 | url = vendor_host + api_type + file_readAPI(api_type, 'getAuditHistoriesUsingPOST') | ||
| 44 | response = requests.request('POST', url, headers=headers, json=payload) | ||
| 45 | |||
| 46 | if response.status_code is 200: | ||
| 47 | res = response.json() | ||
| 48 | self.assertEqual(res['code'], code, msg=str(res)) | ||
| 49 | logger.info('【' + tcname + '】的接口返回参数为:' + str(res)) | ||
| 50 | else: | ||
| 51 | logger.info(response.text) |
case/WebQualityAuditSubmit.py
0 → 100644
| 1 | #!/usr/bin/env python | ||
| 2 | # -*- coding: utf-8 -*- | ||
| 3 | # @Time : 2021/8/13 下午3:55 | ||
| 4 | # @Author : 付孟奇 | ||
| 5 | |||
| 6 | import unittest, requests | ||
| 7 | from config.vendorHost import vendor_host | ||
| 8 | from config.vendorPath import global_path | ||
| 9 | from util.generate import getTestCase | ||
| 10 | from util.log import logger | ||
| 11 | from util.HandleJson import file_readAPI | ||
| 12 | from util.HandleJson import file_read_global, file_updata_global | ||
| 13 | |||
| 14 | |||
| 15 | class WebQualityAuditSubmit(unittest.TestCase): | ||
| 16 | |||
| 17 | def testFunc(self): | ||
| 18 | '''审核结论提交''' | ||
| 19 | data_list = getTestCase('WEB_api_case.xlsx', '审核结论提交') | ||
| 20 | for i in range(len(data_list)): | ||
| 21 | self.getTest(data_list[i]) | ||
| 22 | |||
| 23 | def getTest(self, data): | ||
| 24 | tcname = data['tc_name'] | ||
| 25 | code = int(data['code']) | ||
| 26 | manualConclusion = data['manualConclusion'] | ||
| 27 | orderSource = int(data['orderSource']) | ||
| 28 | orderRecordId = file_read_global('order', 'orderRecordId') | ||
| 29 | submitRecordId = file_read_global('order', 'submitRecordId') | ||
| 30 | phaseId = file_read_global('order', 'phaseId') | ||
| 31 | phaseNum = file_read_global('order', 'phaseNum') | ||
| 32 | hintId = file_read_global('order', 'hintId') | ||
| 33 | hintNum = file_read_global('order', 'hintNum') | ||
| 34 | |||
| 35 | api_type = 'qa' | ||
| 36 | |||
| 37 | logger.info('********************【' + tcname + '】接口测试开始!' + '********************') | ||
| 38 | |||
| 39 | headers = { | ||
| 40 | 'Content-Type': 'application/json', | ||
| 41 | 'X-Auth-Token': file_read_global('web_login', 'token') | ||
| 42 | } | ||
| 43 | payload = { | ||
| 44 | "qualityAuditAdvice": 3, | ||
| 45 | "orderRecordId": orderRecordId, | ||
| 46 | "submitRecordId": submitRecordId, | ||
| 47 | "submitDetailId": "", | ||
| 48 | "auditResult": [ | ||
| 49 | { | ||
| 50 | "phaseId": phaseId, | ||
| 51 | "phaseNum": phaseNum, | ||
| 52 | "hint": [ | ||
| 53 | { | ||
| 54 | "manualConclusion": manualConclusion, | ||
| 55 | "auditConclusion": [ | ||
| 56 | { | ||
| 57 | "label": "客户离席", | ||
| 58 | "value": "0.1", | ||
| 59 | "checked": 1 | ||
| 60 | } | ||
| 61 | ], | ||
| 62 | "hintId": hintId, | ||
| 63 | "hintNum": hintNum | ||
| 64 | } | ||
| 65 | ] | ||
| 66 | } | ||
| 67 | ], | ||
| 68 | "changed": 0, | ||
| 69 | "remark": "", | ||
| 70 | "orderSource": orderSource, | ||
| 71 | "tag": "", | ||
| 72 | "modifyTag": "", | ||
| 73 | "comparisonResult": 2, | ||
| 74 | "rerecord": "" | ||
| 75 | } | ||
| 76 | logger.info('【' + tcname + '】的接口入参为:' + str(payload)) | ||
| 77 | |||
| 78 | url = vendor_host + api_type + file_readAPI(api_type, 'submitAuditUsingPOST') | ||
| 79 | response = requests.request('POST', url, headers=headers, json=payload) | ||
| 80 | |||
| 81 | if response.status_code is 200: | ||
| 82 | res = response.json() | ||
| 83 | self.assertEqual(res['code'], code, msg=str(res)) | ||
| 84 | logger.info('【' + tcname + '】的接口返回参数为:' + str(res)) | ||
| 85 | else: | ||
| 86 | logger.info(response.text) |
case/WebSpeechTemplateConditionList.py
0 → 100644
| 1 | #!/usr/bin/env python | ||
| 2 | # -*- coding: utf-8 -*- | ||
| 3 | # @Time : 2021/8/13 下午3:55 | ||
| 4 | # @Author : 付孟奇 | ||
| 5 | |||
| 6 | import unittest, requests | ||
| 7 | from config.vendorHost import vendor_host | ||
| 8 | from config.vendorPath import global_path | ||
| 9 | from util.generate import getTestCase | ||
| 10 | from util.log import logger | ||
| 11 | from util.HandleJson import file_readAPI | ||
| 12 | from util.HandleJson import file_read_global, file_updata_global | ||
| 13 | |||
| 14 | |||
| 15 | class WebSpeechTemplateConditionList(unittest.TestCase): | ||
| 16 | |||
| 17 | def testFunc(self): | ||
| 18 | '''获取话术生效条件''' | ||
| 19 | data_list = getTestCase('WEB_api_case.xlsx', '获取话术生效条件') | ||
| 20 | for i in range(len(data_list)): | ||
| 21 | self.getTest(data_list[i]) | ||
| 22 | |||
| 23 | def getTest(self, data): | ||
| 24 | tcname = data['tc_name'] | ||
| 25 | code = int(data['code']) | ||
| 26 | |||
| 27 | api_type = 're' | ||
| 28 | |||
| 29 | logger.info('********************【' + tcname + '】接口测试开始!' + '********************') | ||
| 30 | |||
| 31 | headers = { | ||
| 32 | 'Content-Type': 'application/json', | ||
| 33 | 'X-Auth-Token': file_read_global('web_login', 'token') | ||
| 34 | } | ||
| 35 | payload = { | ||
| 36 | "insuranceType": "sx", | ||
| 37 | "stlId": "" | ||
| 38 | } | ||
| 39 | logger.info('【' + tcname + '】的接口入参为:' + str(payload)) | ||
| 40 | |||
| 41 | url = vendor_host + api_type + file_readAPI(api_type, 'querySpeechTakeEffectConditionUsingPOST') | ||
| 42 | response = requests.request('POST', url, headers=headers, json=payload) | ||
| 43 | |||
| 44 | if response.status_code is 200: | ||
| 45 | res = response.json() | ||
| 46 | self.assertEqual(res['code'], code, msg=str(res)) | ||
| 47 | file_updata_global('age', res['result']['takeEffectAge'][0]['ageDescribe'], | ||
| 48 | res['result']['takeEffectAge'][0]['ageId']) | ||
| 49 | file_updata_global('age', res['result']['takeEffectAge'][1]['ageDescribe'], | ||
| 50 | res['result']['takeEffectAge'][1]['ageId'] | ||
| 51 | ) | ||
| 52 | file_updata_global('channel', 'channel_id', | ||
| 53 | res['result']['takeEffectChannel'][0]['channelId'] | ||
| 54 | ) | ||
| 55 | logger.info('【' + tcname + '】的接口返回参数为:' + str(res)) | ||
| 56 | else: | ||
| 57 | logger.info(response.text) |
case/WebSpeechTemplateCopySpeech.py
0 → 100644
| 1 | #!/usr/bin/env python | ||
| 2 | # -*- coding: utf-8 -*- | ||
| 3 | # @Time : 2021/8/13 下午3:55 | ||
| 4 | # @Author : 付孟奇 | ||
| 5 | |||
| 6 | import unittest, requests | ||
| 7 | from config.vendorHost import vendor_host | ||
| 8 | from config.vendorPath import global_path | ||
| 9 | from util.generate import getTestCase | ||
| 10 | from util.log import logger | ||
| 11 | from util.HandleJson import file_readAPI | ||
| 12 | from util.HandleJson import file_read_global, file_updata_global | ||
| 13 | |||
| 14 | |||
| 15 | class WebSpeechTemplateCopySpeech(unittest.TestCase): | ||
| 16 | |||
| 17 | def testFunc(self): | ||
| 18 | '''复制话术模版''' | ||
| 19 | data_list = getTestCase('WEB_api_case.xlsx', '复制话术模版') | ||
| 20 | for i in range(len(data_list)): | ||
| 21 | self.getTest(data_list[i]) | ||
| 22 | |||
| 23 | def getTest(self, data): | ||
| 24 | tcname = data['tc_name'] | ||
| 25 | code = int(data['code']) | ||
| 26 | stlId = file_read_global('speech', 'stlId') | ||
| 27 | |||
| 28 | api_type = 're' | ||
| 29 | |||
| 30 | logger.info('********************【' + tcname + '】接口测试开始!' + '********************') | ||
| 31 | |||
| 32 | headers = { | ||
| 33 | 'Content-Type': 'application/json', | ||
| 34 | 'X-Auth-Token': file_read_global('web_login', 'token') | ||
| 35 | } | ||
| 36 | payload = { | ||
| 37 | "stlId": stlId | ||
| 38 | } | ||
| 39 | logger.info('【' + tcname + '】的接口入参为:' + str(payload)) | ||
| 40 | |||
| 41 | url = vendor_host + api_type + file_readAPI(api_type, 'copySpeechTemplateUsingPOST') | ||
| 42 | response = requests.request('POST', url, headers=headers, json=payload) | ||
| 43 | |||
| 44 | if response.status_code is 200: | ||
| 45 | res = response.json() | ||
| 46 | self.assertEqual(res['code'], code, msg=str(res)) | ||
| 47 | logger.info('【' + tcname + '】的接口返回参数为:' + str(res)) | ||
| 48 | else: | ||
| 49 | logger.info(response.text) |
case/WebSpeechTemplateCreatRule.py
0 → 100644
| 1 | #!/usr/bin/env python | ||
| 2 | # -*- coding: utf-8 -*- | ||
| 3 | # @Time : 2021/8/13 下午3:55 | ||
| 4 | # @Author : 付孟奇 | ||
| 5 | |||
| 6 | import unittest, requests | ||
| 7 | from config.vendorHost import vendor_host | ||
| 8 | from config.vendorPath import global_path | ||
| 9 | from util.generate import getTestCase | ||
| 10 | from util.log import logger | ||
| 11 | from util.HandleJson import file_readAPI | ||
| 12 | from util.HandleJson import file_read_global, file_updata_global | ||
| 13 | |||
| 14 | |||
| 15 | class WebSpeechTemplateCreatRule(unittest.TestCase): | ||
| 16 | |||
| 17 | def testFunc(self): | ||
| 18 | '''创建话术模板''' | ||
| 19 | data_list = getTestCase('WEB_api_case.xlsx', '创建话术模板') | ||
| 20 | for i in range(len(data_list)): | ||
| 21 | self.getTest(data_list[i]) | ||
| 22 | |||
| 23 | def getTest(self, data): | ||
| 24 | tcname = data['tc_name'] | ||
| 25 | code = int(data['code']) | ||
| 26 | speechName = data['speechName'] | ||
| 27 | channelIds = file_read_global('channel', 'channel_id') | ||
| 28 | provinceIds = file_read_global('organization', 'branchId') | ||
| 29 | cityIds = file_read_global('organization', 'subBranchId') | ||
| 30 | ageIds = file_read_global('age', '60岁以下') | ||
| 31 | # 是否自保件 | ||
| 32 | insuranceSelf = int(data['insuranceSelf']) | ||
| 33 | # | ||
| 34 | systemType = int(data['systemType']) | ||
| 35 | |||
| 36 | api_type = 're' | ||
| 37 | |||
| 38 | logger.info('********************【' + tcname + '】接口测试开始!' + '********************') | ||
| 39 | |||
| 40 | headers = { | ||
| 41 | 'Content-Type': 'application/json', | ||
| 42 | 'X-Auth-Token': file_read_global('web_login', 'token') | ||
| 43 | } | ||
| 44 | payload = { | ||
| 45 | "speechName": speechName, | ||
| 46 | "channelIds": [channelIds], | ||
| 47 | "provinceIds": [provinceIds, provinceIds], | ||
| 48 | "cityIds": [cityIds], | ||
| 49 | "ageIds": [ageIds], | ||
| 50 | "insuranceSelf": insuranceSelf, | ||
| 51 | "insuranceType": "sx", | ||
| 52 | "systemType": systemType | ||
| 53 | } | ||
| 54 | logger.info('【' + tcname + '】的接口入参为:' + str(payload)) | ||
| 55 | |||
| 56 | url = vendor_host + api_type + file_readAPI(api_type, 'createSpeechRuleUsingPOST') | ||
| 57 | response = requests.request('POST', url, headers=headers, json=payload) | ||
| 58 | |||
| 59 | if response.status_code is 200: | ||
| 60 | res = response.json() | ||
| 61 | self.assertEqual(res['code'], code, msg=str(res)) | ||
| 62 | file_updata_global('speech', 'speechName', speechName) | ||
| 63 | logger.info('【' + tcname + '】的接口返回参数为:' + str(res)) | ||
| 64 | else: | ||
| 65 | logger.info(response.text) |
case/WebSpeechTemplateGetSpeech.py
0 → 100644
| 1 | #!/usr/bin/env python | ||
| 2 | # -*- coding: utf-8 -*- | ||
| 3 | # @Time : 2021/8/13 下午3:55 | ||
| 4 | # @Author : 付孟奇 | ||
| 5 | |||
| 6 | import unittest, requests | ||
| 7 | from config.vendorHost import vendor_host | ||
| 8 | from config.vendorPath import global_path | ||
| 9 | from util.generate import getTestCase | ||
| 10 | from util.log import logger | ||
| 11 | from util.HandleJson import file_readAPI | ||
| 12 | from util.HandleJson import file_read_global, file_updata_global | ||
| 13 | |||
| 14 | |||
| 15 | class WebSpeechTemplateGetSpeech(unittest.TestCase): | ||
| 16 | |||
| 17 | def testFunc(self): | ||
| 18 | '''话术预览/话术编辑 (获取话术)''' | ||
| 19 | data_list = getTestCase('WEB_api_case.xlsx', '话术预览编辑') | ||
| 20 | for i in range(len(data_list)): | ||
| 21 | self.getTest(data_list[i]) | ||
| 22 | |||
| 23 | def getTest(self, data): | ||
| 24 | tcname = data['tc_name'] | ||
| 25 | code = int(data['code']) | ||
| 26 | stlId = file_read_global('speech','stlId') | ||
| 27 | |||
| 28 | api_type = 're' | ||
| 29 | |||
| 30 | logger.info('********************【' + tcname + '】接口测试开始!' + '********************') | ||
| 31 | |||
| 32 | headers = { | ||
| 33 | 'Content-Type': 'application/json', | ||
| 34 | 'X-Auth-Token': file_read_global('web_login', 'token') | ||
| 35 | } | ||
| 36 | payload = { | ||
| 37 | "stlId": stlId | ||
| 38 | } | ||
| 39 | logger.info('【' + tcname + '】的接口入参为:' + str(payload)) | ||
| 40 | |||
| 41 | url = vendor_host + api_type + file_readAPI(api_type, 'getSpeechTemplateUsingPOST') | ||
| 42 | response = requests.request('POST', url, headers=headers, json=payload) | ||
| 43 | |||
| 44 | if response.status_code is 200: | ||
| 45 | res = response.json() | ||
| 46 | self.assertEqual(res['code'], code, msg=str(res)) | ||
| 47 | logger.info('【' + tcname + '】的接口返回参数为:' + str(res)) | ||
| 48 | else: | ||
| 49 | logger.info(response.text) |
case/WebSpeechTemplateOperators.py
0 → 100644
| 1 | #!/usr/bin/env python | ||
| 2 | # -*- coding: utf-8 -*- | ||
| 3 | # @Time : 2021/8/13 下午3:55 | ||
| 4 | # @Author : 付孟奇 | ||
| 5 | |||
| 6 | import unittest, requests | ||
| 7 | from config.vendorHost import vendor_host | ||
| 8 | from config.vendorPath import global_path | ||
| 9 | from util.generate import getTestCase | ||
| 10 | from util.log import logger | ||
| 11 | from util.HandleJson import file_readAPI | ||
| 12 | from util.HandleJson import file_read_global, file_updata_global | ||
| 13 | |||
| 14 | |||
| 15 | class WebSpeechTemplateOperators(unittest.TestCase): | ||
| 16 | |||
| 17 | def testFunc(self): | ||
| 18 | '''话术获取运算符''' | ||
| 19 | data_list = getTestCase('WEB_api_case.xlsx', '话术获取运算符') | ||
| 20 | for i in range(len(data_list)): | ||
| 21 | self.getTest(data_list[i]) | ||
| 22 | |||
| 23 | def getTest(self, data): | ||
| 24 | tcname = data['tc_name'] | ||
| 25 | code = int(data['code']) | ||
| 26 | |||
| 27 | api_type = 're' | ||
| 28 | |||
| 29 | logger.info('********************【' + tcname + '】接口测试开始!' + '********************') | ||
| 30 | |||
| 31 | headers = { | ||
| 32 | 'Content-Type': 'application/json', | ||
| 33 | 'X-Auth-Token': file_read_global('web_login', 'token') | ||
| 34 | } | ||
| 35 | |||
| 36 | url = vendor_host + api_type + file_readAPI(api_type, 'getOperatorsUsingGET') | ||
| 37 | response = requests.request('GET', url, headers=headers) | ||
| 38 | |||
| 39 | if response.status_code is 200: | ||
| 40 | res = response.json() | ||
| 41 | self.assertEqual(res['code'], code, msg=str(res)) | ||
| 42 | logger.info('【' + tcname + '】的接口返回参数为:' + str(res)) | ||
| 43 | else: | ||
| 44 | logger.info(response.text) |
case/WebSpeechTemplatePhaseCreat.py
0 → 100644
| 1 | #!/usr/bin/env python | ||
| 2 | # -*- coding: utf-8 -*- | ||
| 3 | # @Time : 2021/8/13 下午3:55 | ||
| 4 | # @Author : 付孟奇 | ||
| 5 | |||
| 6 | import unittest, requests | ||
| 7 | from config.vendorHost import vendor_host | ||
| 8 | from config.vendorPath import global_path | ||
| 9 | from util.generate import getTestCase | ||
| 10 | from util.log import logger | ||
| 11 | from util.HandleJson import file_readAPI | ||
| 12 | from util.HandleJson import file_read_global, file_updata_global | ||
| 13 | |||
| 14 | |||
| 15 | class WebSpeechTemplatePhaseCreat(unittest.TestCase): | ||
| 16 | |||
| 17 | def testFunc(self): | ||
| 18 | '''创建话术模板环节(话术大环节、小环节)''' | ||
| 19 | data_list = getTestCase('WEB_api_case.xlsx', '创建话术') | ||
| 20 | for i in range(len(data_list)): | ||
| 21 | self.getTest(data_list[i]) | ||
| 22 | |||
| 23 | def getTest(self, data): | ||
| 24 | tcname = data['tc_name'] | ||
| 25 | code = int(data['code']) | ||
| 26 | speechName = file_read_global('speech', 'speechName') | ||
| 27 | stlId = file_read_global('speech', 'stlId') | ||
| 28 | |||
| 29 | api_type = 're' | ||
| 30 | |||
| 31 | logger.info('********************【' + tcname + '】接口测试开始!' + '********************') | ||
| 32 | |||
| 33 | headers = { | ||
| 34 | 'Content-Type': 'application/json', | ||
| 35 | 'X-Auth-Token': file_read_global('web_login', 'token') | ||
| 36 | } | ||
| 37 | payload = { | ||
| 38 | "speechName": speechName, | ||
| 39 | "stlId": stlId, | ||
| 40 | "phaseList": [ | ||
| 41 | { | ||
| 42 | "phaseTitle": "大环节名称", | ||
| 43 | "phaseNum": 1, | ||
| 44 | "showPhaseTitle": "大环节名称", | ||
| 45 | "hintsList": [ | ||
| 46 | { | ||
| 47 | "hintName": "apitest", | ||
| 48 | "hintTitle": "apitest", | ||
| 49 | "showHintName": "小环节名称", | ||
| 50 | "tts": "接口自动话测试", | ||
| 51 | "hintNum": 1, | ||
| 52 | "conditions": [], | ||
| 53 | "conditionType": 1, | ||
| 54 | "hintType": { | ||
| 55 | "hintType": 2, | ||
| 56 | "sure": "", | ||
| 57 | "no": "", | ||
| 58 | "docType": 100, | ||
| 59 | "certificateType": "", | ||
| 60 | "ocr": "", | ||
| 61 | "docPrdCode": "" | ||
| 62 | }, | ||
| 63 | "bindBefore": 0, | ||
| 64 | "bindAfter": 0, | ||
| 65 | "bindBeforeChosed": 1, | ||
| 66 | "bindUnique": "f2f3eb26-856b-8fd1-e916-e761f8739d9d", | ||
| 67 | "classIndex": 0, | ||
| 68 | "userRole": 1 | ||
| 69 | } | ||
| 70 | ] | ||
| 71 | } | ||
| 72 | ] | ||
| 73 | } | ||
| 74 | logger.info('【' + tcname + '】的接口入参为:' + str(payload)) | ||
| 75 | |||
| 76 | url = vendor_host + api_type + file_readAPI(api_type, 'createSpeechPhaseUsingPOST') | ||
| 77 | response = requests.request('POST', url, headers=headers, json=payload) | ||
| 78 | |||
| 79 | if response.status_code is 200: | ||
| 80 | res = response.json() | ||
| 81 | self.assertEqual(res['code'], code, msg=str(res)) | ||
| 82 | logger.info('【' + tcname + '】的接口返回参数为:' + str(res)) | ||
| 83 | else: | ||
| 84 | logger.info(response.text) |
case/WebSpeechTemplateQueryList.py
0 → 100644
| 1 | #!/usr/bin/env python | ||
| 2 | # -*- coding: utf-8 -*- | ||
| 3 | # @Time : 2021/8/13 下午3:55 | ||
| 4 | # @Author : 付孟奇 | ||
| 5 | |||
| 6 | import unittest, requests | ||
| 7 | from config.vendorHost import vendor_host | ||
| 8 | from config.vendorPath import global_path | ||
| 9 | from util.generate import getTestCase | ||
| 10 | from util.log import logger | ||
| 11 | from util.HandleJson import file_readAPI | ||
| 12 | from util.HandleJson import file_read_global, file_updata_global | ||
| 13 | |||
| 14 | |||
| 15 | class WebSpeechTemplateQueryList(unittest.TestCase): | ||
| 16 | |||
| 17 | def testFunc(self): | ||
| 18 | '''话术模版库列表''' | ||
| 19 | data_list = getTestCase('WEB_api_case.xlsx', '话术模版库列表') | ||
| 20 | for i in range(len(data_list)): | ||
| 21 | self.getTest(data_list[i]) | ||
| 22 | |||
| 23 | def getTest(self, data): | ||
| 24 | tcname = data['tc_name'] | ||
| 25 | code = int(data['code']) | ||
| 26 | speechName = file_read_global('speech', 'speechName') | ||
| 27 | |||
| 28 | api_type = 're' | ||
| 29 | |||
| 30 | logger.info('********************【' + tcname + '】接口测试开始!' + '********************') | ||
| 31 | |||
| 32 | headers = { | ||
| 33 | 'Content-Type': 'application/json', | ||
| 34 | 'X-Auth-Token': file_read_global('web_login', 'token') | ||
| 35 | } | ||
| 36 | payload = { | ||
| 37 | "speechName": speechName, | ||
| 38 | "page": 1, | ||
| 39 | "perPage": 10, | ||
| 40 | } | ||
| 41 | logger.info('【' + tcname + '】的接口入参为:' + str(payload)) | ||
| 42 | |||
| 43 | url = vendor_host + api_type + file_readAPI(api_type, 'querySpeechTemplateListUsingPOST') | ||
| 44 | response = requests.request('POST', url, headers=headers, json=payload) | ||
| 45 | |||
| 46 | if response.status_code is 200: | ||
| 47 | res = response.json() | ||
| 48 | self.assertEqual(res['code'], code, msg=str(res)) | ||
| 49 | file_updata_global('speech', 'stlId', res['result']['speechList'][0]['stlId']) | ||
| 50 | logger.info('【' + tcname + '】的接口返回参数为:' + str(res)) | ||
| 51 | else: | ||
| 52 | logger.info(response.text) |
case/WebSpeechTemplateUpdateStatus.py
0 → 100644
| 1 | #!/usr/bin/env python | ||
| 2 | # -*- coding: utf-8 -*- | ||
| 3 | # @Time : 2021/8/13 下午3:55 | ||
| 4 | # @Author : 付孟奇 | ||
| 5 | |||
| 6 | import unittest, requests | ||
| 7 | from config.vendorHost import vendor_host | ||
| 8 | from config.vendorPath import global_path | ||
| 9 | from util.generate import getTestCase | ||
| 10 | from util.log import logger | ||
| 11 | from util.HandleJson import file_readAPI | ||
| 12 | from util.HandleJson import file_read_global, file_updata_global | ||
| 13 | |||
| 14 | |||
| 15 | class WebSpeechTemplateUpdateStatus(unittest.TestCase): | ||
| 16 | |||
| 17 | def testFunc(self): | ||
| 18 | '''更新话术状态: 上架、下架''' | ||
| 19 | data_list = getTestCase('WEB_api_case.xlsx', '更新话术状态') | ||
| 20 | for i in range(len(data_list)): | ||
| 21 | self.getTest(data_list[i]) | ||
| 22 | |||
| 23 | def getTest(self, data): | ||
| 24 | tcname = data['tc_name'] | ||
| 25 | code = int(data['code']) | ||
| 26 | speechStatus = int(data['speechStatus']) | ||
| 27 | stlId = file_read_global('speech', 'stlId') | ||
| 28 | |||
| 29 | api_type = 're' | ||
| 30 | |||
| 31 | logger.info('********************【' + tcname + '】接口测试开始!' + '********************') | ||
| 32 | |||
| 33 | headers = { | ||
| 34 | 'Content-Type': 'application/json', | ||
| 35 | 'X-Auth-Token': file_read_global('web_login', 'token') | ||
| 36 | } | ||
| 37 | payload = { | ||
| 38 | "speechStatus": speechStatus, | ||
| 39 | "stlId": stlId | ||
| 40 | } | ||
| 41 | logger.info('【' + tcname + '】的接口入参为:' + str(payload)) | ||
| 42 | |||
| 43 | url = vendor_host + api_type + file_readAPI(api_type, 'updateSpeechStatusUsingPOST') | ||
| 44 | response = requests.request('POST', url, headers=headers, json=payload) | ||
| 45 | |||
| 46 | if response.status_code is 200: | ||
| 47 | res = response.json() | ||
| 48 | self.assertEqual(res['code'], code, msg=str(res)) | ||
| 49 | logger.info('【' + tcname + '】的接口返回参数为:' + str(res)) | ||
| 50 | else: | ||
| 51 | logger.info(response.text) |
case/WebSpeechTemplateVariables.py
0 → 100644
| 1 | #!/usr/bin/env python | ||
| 2 | # -*- coding: utf-8 -*- | ||
| 3 | # @Time : 2021/8/13 下午3:55 | ||
| 4 | # @Author : 付孟奇 | ||
| 5 | |||
| 6 | import unittest, requests | ||
| 7 | from config.vendorHost import vendor_host | ||
| 8 | from config.vendorPath import global_path | ||
| 9 | from util.generate import getTestCase | ||
| 10 | from util.log import logger | ||
| 11 | from util.HandleJson import file_readAPI | ||
| 12 | from util.HandleJson import file_read_global, file_updata_global | ||
| 13 | |||
| 14 | |||
| 15 | class WebSpeechTemplateVariables(unittest.TestCase): | ||
| 16 | |||
| 17 | def testFunc(self): | ||
| 18 | '''话术获取生效条件''' | ||
| 19 | data_list = getTestCase('WEB_api_case.xlsx', '话术获取生效条件') | ||
| 20 | for i in range(len(data_list)): | ||
| 21 | self.getTest(data_list[i]) | ||
| 22 | |||
| 23 | def getTest(self, data): | ||
| 24 | tcname = data['tc_name'] | ||
| 25 | code = int(data['code']) | ||
| 26 | |||
| 27 | api_type = 're' | ||
| 28 | |||
| 29 | logger.info('********************【' + tcname + '】接口测试开始!' + '********************') | ||
| 30 | |||
| 31 | headers = { | ||
| 32 | 'Content-Type': 'application/json', | ||
| 33 | 'X-Auth-Token': file_read_global('web_login', 'token') | ||
| 34 | } | ||
| 35 | |||
| 36 | url = vendor_host + api_type + file_readAPI(api_type, 'getVariablesUsingGET') | ||
| 37 | response = requests.request('GET', url, headers=headers) | ||
| 38 | |||
| 39 | if response.status_code is 200: | ||
| 40 | res = response.json() | ||
| 41 | self.assertEqual(res['code'], code, msg=str(res)) | ||
| 42 | logger.info('【' + tcname + '】的接口返回参数为:' + str(res)) | ||
| 43 | else: | ||
| 44 | logger.info(response.text) |
config/global_param.json
0 → 100644
| 1 | { | ||
| 2 | "app_login": { | ||
| 3 | "token": "d301462b474643f483d1a4353495b5c4", | ||
| 4 | "directlyAgencyName": "济南本部" | ||
| 5 | }, | ||
| 6 | "web_login": { | ||
| 7 | "token": "34bbb95137264d03b252a0082ef6f742" | ||
| 8 | }, | ||
| 9 | "order": { | ||
| 10 | "orderRecordId": 167, | ||
| 11 | "orderId": "", | ||
| 12 | "submitRecordId": 7914, | ||
| 13 | "phaseId": 184605, | ||
| 14 | "phaseNum": 1, | ||
| 15 | "hintId": 368568, | ||
| 16 | "hintNum": 1, | ||
| 17 | "policyId": 169, | ||
| 18 | "policyNo": "202106002448538", | ||
| 19 | "selfNo": "202106002448538_8" | ||
| 20 | }, | ||
| 21 | "product": { | ||
| 22 | "productTypeName": "分红险", | ||
| 23 | "productTypeId": 13, | ||
| 24 | "akId": 129, | ||
| 25 | "product_name": "apitest", | ||
| 26 | "product_code": "apitest", | ||
| 27 | "plId": 435, | ||
| 28 | "product_name_att": "apitest2", | ||
| 29 | "product_code_att": "apitest2", | ||
| 30 | "plId_att": 436 | ||
| 31 | }, | ||
| 32 | "fileList": { | ||
| 33 | "docType": 3 | ||
| 34 | }, | ||
| 35 | "account": { | ||
| 36 | "desc": "账号信息", | ||
| 37 | "app_user": "apiappuser", | ||
| 38 | "web_user": "apiwebuser", | ||
| 39 | "web_email": "fumengqi@situdata.com", | ||
| 40 | "web_user_id": 2188, | ||
| 41 | "web_valid_code": "163245" | ||
| 42 | }, | ||
| 43 | "organization": { | ||
| 44 | "branchId": 1, | ||
| 45 | "subBranchId": 5 | ||
| 46 | }, | ||
| 47 | "channel": { | ||
| 48 | "desc": "渠道信息", | ||
| 49 | "channel_name": "个人营销", | ||
| 50 | "channel_code": "个人营销", | ||
| 51 | "channel_id": 9 | ||
| 52 | }, | ||
| 53 | "age": { | ||
| 54 | "60岁以上": 3, | ||
| 55 | "60岁以下": 4 | ||
| 56 | }, | ||
| 57 | "speech": { | ||
| 58 | "desc": "话术模版信息", | ||
| 59 | "stlId": 85, | ||
| 60 | "speechName": "接口自动化话术(勿动)" | ||
| 61 | }, | ||
| 62 | "proportion": { | ||
| 63 | "desc": "质检比例信息", | ||
| 64 | "role_name": "接口自动化质检比例(勿动)", | ||
| 65 | "role_id": 7 | ||
| 66 | }, | ||
| 67 | "订单基本信息": { | ||
| 68 | "保单号": "202106002448538", | ||
| 69 | "保单类型": "非自保件" | ||
| 70 | }, | ||
| 71 | "被保人信息": [ | ||
| 72 | { | ||
| 73 | "姓名": "哦哦", | ||
| 74 | "监护人姓名": "", | ||
| 75 | "证件号码": "110101200803071616", | ||
| 76 | "出生日期": "2008-03-07", | ||
| 77 | "证件类型": "身份证", | ||
| 78 | "性别": "男" | ||
| 79 | } | ||
| 80 | ], | ||
| 81 | "投保人信息": { | ||
| 82 | "姓名": "韩超", | ||
| 83 | "证件号码": "110101199003077694", | ||
| 84 | "出生日期": "1990-03-07", | ||
| 85 | "证件类型": "身份证", | ||
| 86 | "性别": "男", | ||
| 87 | "投保人是被保人的": "父亲" | ||
| 88 | }, | ||
| 89 | "保险信息": [ | ||
| 90 | { | ||
| 91 | "保险期限": "1年", | ||
| 92 | "被保人": [ | ||
| 93 | "哦哦" | ||
| 94 | ], | ||
| 95 | "附加险": [], | ||
| 96 | "产品名称": "德华安顾奥特保重大疾病保险(2021版)", | ||
| 97 | "每期缴费金额": 3.4, | ||
| 98 | "缴费期限": "1年", | ||
| 99 | "缴费方式": "年缴" | ||
| 100 | } | ||
| 101 | ] | ||
| 102 | } | ||
| ... | \ No newline at end of file | ... | \ No newline at end of file |
config/swaggerApi.json
0 → 100644
| 1 | { | ||
| 2 | "re": { | ||
| 3 | "ossStsUsingPOST": { | ||
| 4 | "des": "获取鉴权", | ||
| 5 | "value": "/auth/sts" | ||
| 6 | }, | ||
| 7 | "deleteFileDetailUsingPOST": { | ||
| 8 | "des": "deleteFileDetail", | ||
| 9 | "value": "/files/delete" | ||
| 10 | }, | ||
| 11 | "getFileDetailUsingPOST": { | ||
| 12 | "des": "查看文件详情", | ||
| 13 | "value": "/files/detail" | ||
| 14 | }, | ||
| 15 | "deleteFileDetailUsingPOST_1": { | ||
| 16 | "des": "deleteFileDetail", | ||
| 17 | "value": "/files/list" | ||
| 18 | }, | ||
| 19 | "updateFileUsingPOST": { | ||
| 20 | "des": "updateFile", | ||
| 21 | "value": "/files/update" | ||
| 22 | }, | ||
| 23 | "uploadFileUsingPOST": { | ||
| 24 | "des": "Web端上传文件", | ||
| 25 | "value": "/files/upload" | ||
| 26 | }, | ||
| 27 | "fetchByAgeRangeUsingPOST": { | ||
| 28 | "des": "fetchByAgeRange", | ||
| 29 | "value": "/inner/ageTplFetchByProductCode" | ||
| 30 | }, | ||
| 31 | "appOrderListUsingPOST": { | ||
| 32 | "des": "appOrderList", | ||
| 33 | "value": "/inner/appOrderList" | ||
| 34 | }, | ||
| 35 | "appOrderListCountUsingPOST": { | ||
| 36 | "des": "appOrderListCount", | ||
| 37 | "value": "/inner/appOrderListCount" | ||
| 38 | }, | ||
| 39 | "generateAuditReportExcelUsingPOST": { | ||
| 40 | "des": "generateAuditReportExcel", | ||
| 41 | "value": "/inner/create/auditReport" | ||
| 42 | }, | ||
| 43 | "createOperationRecordsDOUsingPOST": { | ||
| 44 | "des": "createOperationRecordsDO", | ||
| 45 | "value": "/inner/createOperationRecordsDO" | ||
| 46 | }, | ||
| 47 | "createOrderUsingPOST": { | ||
| 48 | "des": "createOrder", | ||
| 49 | "value": "/inner/createOrder" | ||
| 50 | }, | ||
| 51 | "createOrderAuditDOUsingPOST": { | ||
| 52 | "des": "createOrderAuditDO", | ||
| 53 | "value": "/inner/createOrderAuditDO" | ||
| 54 | }, | ||
| 55 | "createOrderPhaseV3UsingPOST": { | ||
| 56 | "des": "createOrderPhaseV3", | ||
| 57 | "value": "/inner/createOrderPhaseV3" | ||
| 58 | }, | ||
| 59 | "facePairUsingPOST": { | ||
| 60 | "des": "facePair", | ||
| 61 | "value": "/inner/face-pair" | ||
| 62 | }, | ||
| 63 | "fetchByIdUsingPOST": { | ||
| 64 | "des": "fetchById", | ||
| 65 | "value": "/inner/fetchById" | ||
| 66 | }, | ||
| 67 | "fetchByObiIdUsingPOST": { | ||
| 68 | "des": "fetchByObiId", | ||
| 69 | "value": "/inner/fetchByObiId" | ||
| 70 | }, | ||
| 71 | "fetchByOrderIdUsingPOST": { | ||
| 72 | "des": "fetchByOrderId", | ||
| 73 | "value": "/inner/fetchByOrderId" | ||
| 74 | }, | ||
| 75 | "fetchByOrderIdOrSerialNoUsingPOST": { | ||
| 76 | "des": "fetchByOrderIdOrSerialNo", | ||
| 77 | "value": "/inner/fetchByOrderIdOrSerialNo" | ||
| 78 | }, | ||
| 79 | "fetchByOrderNumAndFlagUsingPOST": { | ||
| 80 | "des": "fetchByOrderNumAndFlag", | ||
| 81 | "value": "/inner/fetchByOrderNumAndFlag" | ||
| 82 | }, | ||
| 83 | "fetchCountBySelfNoAndRecordTypeUsingPOST": { | ||
| 84 | "des": "fetchCountBySelfNoAndRecordType", | ||
| 85 | "value": "/inner/fetchCountBySelfNoAndRecordType" | ||
| 86 | }, | ||
| 87 | "fetchOrderBaseInfoUsingPOST": { | ||
| 88 | "des": "fetchOrderBaseInfo", | ||
| 89 | "value": "/inner/fetchOrder" | ||
| 90 | }, | ||
| 91 | "fetchUsingPOST": { | ||
| 92 | "des": "fetch", | ||
| 93 | "value": "/inner/fetchOrderBaseInfoDo" | ||
| 94 | }, | ||
| 95 | "findByOrderRecordIdUsingPOST": { | ||
| 96 | "des": "findByOrderRecordId", | ||
| 97 | "value": "/inner/findByOrderRecordId" | ||
| 98 | }, | ||
| 99 | "findByProductTypeUsingPOST": { | ||
| 100 | "des": "findByProductType", | ||
| 101 | "value": "/inner/findByProductType" | ||
| 102 | }, | ||
| 103 | "getAllVariablesForPaperUsingGET": { | ||
| 104 | "des": "getAllVariablesForPaper", | ||
| 105 | "value": "/inner/getAllVariablesForPaper" | ||
| 106 | }, | ||
| 107 | "getVariablesWithoutProductAttrsUsingGET": { | ||
| 108 | "des": "getVariablesWithoutProductAttrs", | ||
| 109 | "value": "/inner/getAllVariablesWithoutProductAttrs" | ||
| 110 | }, | ||
| 111 | "getByOrderIdAndLifeUsingPOST": { | ||
| 112 | "des": "getByOrderIdAndLife", | ||
| 113 | "value": "/inner/getByOrderIdAndLife" | ||
| 114 | }, | ||
| 115 | "getByOrderIdAndLifeCycleBiggerThanUsingPOST": { | ||
| 116 | "des": "getByOrderIdAndLifeCycleBiggerThan", | ||
| 117 | "value": "/inner/getByOrderIdAndLifeCycleBiggerThan" | ||
| 118 | }, | ||
| 119 | "getOrderGateWayByTaskIdUsingPOST": { | ||
| 120 | "des": "getOrderGateWayByTaskId", | ||
| 121 | "value": "/inner/getOrderGateWayByTaskId" | ||
| 122 | }, | ||
| 123 | "getOrderIdNameUsingGET": { | ||
| 124 | "des": "getOrderIdName", | ||
| 125 | "value": "/inner/getOrderIdName" | ||
| 126 | }, | ||
| 127 | "listUsingPOST_1": { | ||
| 128 | "des": "list", | ||
| 129 | "value": "/inner/market/channel" | ||
| 130 | }, | ||
| 131 | "marketChannelByChannelNameUsingPOST": { | ||
| 132 | "des": "marketChannelByChannelName", | ||
| 133 | "value": "/inner/marketChannelByChannelName" | ||
| 134 | }, | ||
| 135 | "notifyRemoteUsingPOST": { | ||
| 136 | "des": "notifyRemote", | ||
| 137 | "value": "/inner/notifyRemote" | ||
| 138 | }, | ||
| 139 | "getAsrTxtInfosUsingPOST": { | ||
| 140 | "des": "getAsrTxtInfos", | ||
| 141 | "value": "/inner/order/asrTxtInfos" | ||
| 142 | }, | ||
| 143 | "getOrderSpeechBigPhaseListUsingPOST": { | ||
| 144 | "des": "getOrderSpeechBigPhaseList", | ||
| 145 | "value": "/inner/order/orderSpeechBigPhaseList" | ||
| 146 | }, | ||
| 147 | "orderSpeechLittlePhaseListIgnoreStatusUsingPOST": { | ||
| 148 | "des": "orderSpeechLittlePhaseListIgnoreStatus", | ||
| 149 | "value": "/inner/order/orderSpeechLittlePhaseList" | ||
| 150 | }, | ||
| 151 | "getOrderSpeechLittlePhaseListUsingPOST": { | ||
| 152 | "des": "getOrderSpeechLittlePhaseList", | ||
| 153 | "value": "/inner/order/submitLittlePhaseDetailsIgnoreStatus" | ||
| 154 | }, | ||
| 155 | "orderCancelUsingPOST": { | ||
| 156 | "des": "orderCancel", | ||
| 157 | "value": "/inner/orderCancel" | ||
| 158 | }, | ||
| 159 | "orderCodeFileCreateUsingPOST": { | ||
| 160 | "des": "orderCodeFileCreate", | ||
| 161 | "value": "/inner/orderCodeFileCreate" | ||
| 162 | }, | ||
| 163 | "orderCodeFileFetchByProductCodeUsingPOST": { | ||
| 164 | "des": "orderCodeFileFetchByProductCode", | ||
| 165 | "value": "/inner/orderCodeFileFetchByProductCode" | ||
| 166 | }, | ||
| 167 | "orderCodeFileGetRemoteFileListUsingPOST": { | ||
| 168 | "des": "orderCodeFileGetRemoteFileList", | ||
| 169 | "value": "/inner/orderCodeFileGetRemoteFileList" | ||
| 170 | }, | ||
| 171 | "orderCodeFileRemoveByProductCodeUsingPOST": { | ||
| 172 | "des": "orderCodeFileRemoveByProductCode", | ||
| 173 | "value": "/inner/orderCodeFileRemoveByProductCode" | ||
| 174 | }, | ||
| 175 | "orderCreateConfirmUsingPOST": { | ||
| 176 | "des": "orderCreateConfirm", | ||
| 177 | "value": "/inner/orderCreateConfirm" | ||
| 178 | }, | ||
| 179 | "orderCreateInfoCreateUsingPOST": { | ||
| 180 | "des": "orderCreateInfoCreate", | ||
| 181 | "value": "/inner/orderCreateInfoCreate" | ||
| 182 | }, | ||
| 183 | "orderCreateInfoFetchByTaskIdUsingPOST": { | ||
| 184 | "des": "orderCreateInfoFetchByTaskId", | ||
| 185 | "value": "/inner/orderCreateInfoFetchByTaskId" | ||
| 186 | }, | ||
| 187 | "orderDeleteUsingPOST": { | ||
| 188 | "des": "orderDelete", | ||
| 189 | "value": "/inner/orderDelete" | ||
| 190 | }, | ||
| 191 | "orderFileCreateUsingPOST": { | ||
| 192 | "des": "orderFileCreate", | ||
| 193 | "value": "/inner/orderFileCreate" | ||
| 194 | }, | ||
| 195 | "orderFileFetchByIdUsingPOST": { | ||
| 196 | "des": "orderFileFetchById", | ||
| 197 | "value": "/inner/orderFileFetchById" | ||
| 198 | }, | ||
| 199 | "orderFileFetchByIdAndMd5AndNameUsingPOST": { | ||
| 200 | "des": "orderFileFetchByIdAndMd5AndName", | ||
| 201 | "value": "/inner/orderFileFetchByIdAndMd5AndName" | ||
| 202 | }, | ||
| 203 | "orderFileFetchOssUrlByIdUsingPOST": { | ||
| 204 | "des": "orderFileFetchOssUrlById", | ||
| 205 | "value": "/inner/orderFileFetchOssUrlById" | ||
| 206 | }, | ||
| 207 | "orderFileGetFilePathConfigDOUsingPOST": { | ||
| 208 | "des": "orderFileGetFilePathConfigDO", | ||
| 209 | "value": "/inner/orderFileGetFilePathConfigDO" | ||
| 210 | }, | ||
| 211 | "orderFileQueryRemoteFileListUsingPOST": { | ||
| 212 | "des": "orderFileQueryRemoteFileList", | ||
| 213 | "value": "/inner/orderFileQueryRemoteFileList" | ||
| 214 | }, | ||
| 215 | "orderFileRemoveByObiIdAndNameUsingPOST": { | ||
| 216 | "des": "orderFileRemoveByObiIdAndName", | ||
| 217 | "value": "/inner/orderFileRemoveByObiIdAndName" | ||
| 218 | }, | ||
| 219 | "orderFileremoveByIdUsingPOST": { | ||
| 220 | "des": "orderFileremoveById", | ||
| 221 | "value": "/inner/orderFileremoveById" | ||
| 222 | }, | ||
| 223 | "orderGatewayCreateUsingPOST": { | ||
| 224 | "des": "orderGatewayCreate", | ||
| 225 | "value": "/inner/orderGatewayCreate" | ||
| 226 | }, | ||
| 227 | "orderStatusInsertSelectiveUsingPOST": { | ||
| 228 | "des": "orderStatusInsertSelective", | ||
| 229 | "value": "/inner/orderStatusInsertSelective" | ||
| 230 | }, | ||
| 231 | "orderStatusSelectWaittingStatusByIdentifierUsingPOST": { | ||
| 232 | "des": "orderStatusSelectWaittingStatusByIdentifier", | ||
| 233 | "value": "/inner/orderStatusSelectWaittingStatusByIdentifier" | ||
| 234 | }, | ||
| 235 | "orderStatusUpdateByPrimaryKeySelectiveUsingPOST": { | ||
| 236 | "des": "orderStatusUpdateByPrimaryKeySelective", | ||
| 237 | "value": "/inner/orderStatusUpdateByPrimaryKeySelective" | ||
| 238 | }, | ||
| 239 | "orderSubmitWithCheckOrderUsingPOST_1": { | ||
| 240 | "des": "orderSubmitWithCheckOrder", | ||
| 241 | "value": "/inner/orderSubmitWithCheckOrder" | ||
| 242 | }, | ||
| 243 | "orderUploadFileRemoveByObiIdAndMD5AndNameUsingPOST": { | ||
| 244 | "des": "orderUploadFileRemoveByObiIdAndMD5AndName", | ||
| 245 | "value": "/inner/orderUploadFileRemoveByObiIdAndMD5AndName" | ||
| 246 | }, | ||
| 247 | "fetchByProductCodeUsingPOST": { | ||
| 248 | "des": "fetchByProductCode", | ||
| 249 | "value": "/inner/pLibraryFetchByProductCode" | ||
| 250 | }, | ||
| 251 | "phaseContentV3UsingPOST": { | ||
| 252 | "des": "phaseContentV3", | ||
| 253 | "value": "/inner/phaseContentV3" | ||
| 254 | }, | ||
| 255 | "productNameSelectUsingPOST_1": { | ||
| 256 | "des": "productNameSelect", | ||
| 257 | "value": "/inner/productNameSelect" | ||
| 258 | }, | ||
| 259 | "productNameSelectV2UsingPOST": { | ||
| 260 | "des": "productNameSelectV2", | ||
| 261 | "value": "/inner/productNameSelectV2" | ||
| 262 | }, | ||
| 263 | "queryByIdToOrderSpeechBigPhaseDOUsingPOST": { | ||
| 264 | "des": "queryByIdToOrderSpeechBigPhaseDO", | ||
| 265 | "value": "/inner/queryByIdToOrderSpeechBigPhaseDO" | ||
| 266 | }, | ||
| 267 | "queryByObiIdUsingPOST": { | ||
| 268 | "des": "queryByObiId", | ||
| 269 | "value": "/inner/queryByObiIdBigPhaseDetailDo" | ||
| 270 | }, | ||
| 271 | "queryIdAndNameByIdListUsingPOST": { | ||
| 272 | "des": "queryIdAndNameByIdList", | ||
| 273 | "value": "/inner/queryIdAndNameByIdList" | ||
| 274 | }, | ||
| 275 | "queryOrderByIdAndLifeCycleUsingPOST": { | ||
| 276 | "des": "queryOrderByIdAndLifeCycle", | ||
| 277 | "value": "/inner/queryOrderByIdAndLifeCycle" | ||
| 278 | }, | ||
| 279 | "queryReportOrderBaseListUsingPOST": { | ||
| 280 | "des": "queryReportOrderBaseList", | ||
| 281 | "value": "/inner/queryReportOrderBaseList" | ||
| 282 | }, | ||
| 283 | "queryReportVOByOrderRecordIdOrderByNumUsingPOST": { | ||
| 284 | "des": "queryReportVOByOrderRecordIdOrderByNum", | ||
| 285 | "value": "/inner/queryReportVOByOrderRecordIdOrderByNum" | ||
| 286 | }, | ||
| 287 | "queryTtsContentOsbpIdByObiIdUsingPOST": { | ||
| 288 | "des": "queryTtsContentOsbpIdByObiId", | ||
| 289 | "value": "/inner/queryTtsContentOsbpIdByObiId" | ||
| 290 | }, | ||
| 291 | "matchRemoteCommunicationIdUsingPOST": { | ||
| 292 | "des": "matchRemoteCommunicationId", | ||
| 293 | "value": "/inner/remote/match/communicationId" | ||
| 294 | }, | ||
| 295 | "remoteCreateUsingPOST": { | ||
| 296 | "des": "remoteCreate", | ||
| 297 | "value": "/inner/remote/remoteCreate" | ||
| 298 | }, | ||
| 299 | "remoteFetchByAgentChannelIdUsingPOST": { | ||
| 300 | "des": "remoteFetchByAgentChannelId", | ||
| 301 | "value": "/inner/remote/remoteFetchByAgentChannelId" | ||
| 302 | }, | ||
| 303 | "remoteFetchByCustomerChannelIdUsingPOST": { | ||
| 304 | "des": "remoteFetchByCustomerChannelId", | ||
| 305 | "value": "/inner/remote/remoteFetchByCustomerChannelId" | ||
| 306 | }, | ||
| 307 | "remoteFetchByIdUsingPOST": { | ||
| 308 | "des": "remoteFetchById", | ||
| 309 | "value": "/inner/remote/remoteFetchById" | ||
| 310 | }, | ||
| 311 | "remoteFetchByObiIdUsingPOST": { | ||
| 312 | "des": "remoteFetchByObiId", | ||
| 313 | "value": "/inner/remote/remoteFetchByObiId" | ||
| 314 | }, | ||
| 315 | "remoteRemoveDiscardAgentRecordUsingPOST": { | ||
| 316 | "des": "remoteRemoveDiscardAgentRecord", | ||
| 317 | "value": "/inner/remote/remoteRemoveDiscardAgentRecord" | ||
| 318 | }, | ||
| 319 | "remoteUpdateUsingPOST": { | ||
| 320 | "des": "remoteUpdate", | ||
| 321 | "value": "/inner/remote/remoteUpdate" | ||
| 322 | }, | ||
| 323 | "remoteUpdateAgentVideoUrlUsingPOST": { | ||
| 324 | "des": "remoteUpdateAgentVideoUrl", | ||
| 325 | "value": "/inner/remote/remoteUpdateAgentVideoUrl" | ||
| 326 | }, | ||
| 327 | "remoteUpdateCustomerCommunicationInfoUsingPOST": { | ||
| 328 | "des": "remoteUpdateCustomerCommunicationInfo", | ||
| 329 | "value": "/inner/remote/remoteUpdateCustomerCommunicationInfo" | ||
| 330 | }, | ||
| 331 | "remoteUpdateCustomerVideoUrlUsingPOST": { | ||
| 332 | "des": "remoteUpdateCustomerVideoUrl", | ||
| 333 | "value": "/inner/remote/remoteUpdateCustomerVideoUrl" | ||
| 334 | }, | ||
| 335 | "updateMixedFlowCompletedUsingPOST": { | ||
| 336 | "des": "updateMixedFlowCompleted", | ||
| 337 | "value": "/inner/remote/updateMixedFlowCompleted" | ||
| 338 | }, | ||
| 339 | "remoteOrderListUsingPOST": { | ||
| 340 | "des": "remoteOrderList", | ||
| 341 | "value": "/inner/remoteOrderList" | ||
| 342 | }, | ||
| 343 | "remoteOrderSubmitUsingPOST": { | ||
| 344 | "des": "remoteOrderSubmit", | ||
| 345 | "value": "/inner/remoteOrderSubmit" | ||
| 346 | }, | ||
| 347 | "remoteOrderSubmitWithCheckOrderUsingPOST": { | ||
| 348 | "des": "remoteOrderSubmitWithCheckOrder", | ||
| 349 | "value": "/inner/remoteOrderSubmitWithCheckOrder" | ||
| 350 | }, | ||
| 351 | "remotePhaseContentV3UsingPOST": { | ||
| 352 | "des": "remotePhaseContentV3", | ||
| 353 | "value": "/inner/remotePhaseContentV3" | ||
| 354 | }, | ||
| 355 | "selectForcePassSpeechCountUsingPOST": { | ||
| 356 | "des": "selectForcePassSpeechCount", | ||
| 357 | "value": "/inner/selectForcePassSpeechCount" | ||
| 358 | }, | ||
| 359 | "getSignaturePictureUsingGET": { | ||
| 360 | "des": "saveSignaturePicture", | ||
| 361 | "value": "/inner/signature/picture" | ||
| 362 | }, | ||
| 363 | "saveSignaturePictureUsingPOST": { | ||
| 364 | "des": "saveSignaturePicture", | ||
| 365 | "value": "/inner/signature/picture" | ||
| 366 | }, | ||
| 367 | "orderSubmitUsingPOST_1": { | ||
| 368 | "des": "orderSubmit", | ||
| 369 | "value": "/inner/submitOrder" | ||
| 370 | }, | ||
| 371 | "synthesizerZipV3UsingPOST": { | ||
| 372 | "des": "synthesizerZipV3", | ||
| 373 | "value": "/inner/synthesizerZipV3" | ||
| 374 | }, | ||
| 375 | "updateAuditLifeCycleAndCountByIdUsingPOST": { | ||
| 376 | "des": "updateAuditLifeCycleAndCountById", | ||
| 377 | "value": "/inner/updateAuditLifeCycleAndCountById" | ||
| 378 | }, | ||
| 379 | "updateAuditSourceUsingPOST": { | ||
| 380 | "des": "updateAuditSource", | ||
| 381 | "value": "/inner/updateAuditSource" | ||
| 382 | }, | ||
| 383 | "updateLifeCycleUsingPOST": { | ||
| 384 | "des": "updateLifeCycle", | ||
| 385 | "value": "/inner/updateLifeCycle" | ||
| 386 | }, | ||
| 387 | "updateLockOrder1ByIdLifeCycle21LockOrder1UsingPOST": { | ||
| 388 | "des": "updateLockOrder1ByIdLifeCycle21LockOrder1", | ||
| 389 | "value": "/inner/updateLockOrder1ByIdLifeCycle21LockOrder1" | ||
| 390 | }, | ||
| 391 | "updateLockOrder1ByIdModifyLockOrder1UsingPOST": { | ||
| 392 | "des": "updateLockOrder1ByIdModifyLockOrder1", | ||
| 393 | "value": "/inner/updateLockOrder1ByIdModifyLockOrder1" | ||
| 394 | }, | ||
| 395 | "updateLockOrder2ByIdUsingPOST": { | ||
| 396 | "des": "updateLockOrder2ById", | ||
| 397 | "value": "/inner/updateLockOrder2ById" | ||
| 398 | }, | ||
| 399 | "updateOrderBaseInfoDOUsingPOST": { | ||
| 400 | "des": "updateOrderBaseInfoDO", | ||
| 401 | "value": "/inner/updateOrderBaseInfoDO" | ||
| 402 | }, | ||
| 403 | "orderSubmitWithCheckOrderUsingPOST": { | ||
| 404 | "des": "orderSubmitWithCheckOrder", | ||
| 405 | "value": "/order/check-submit" | ||
| 406 | }, | ||
| 407 | "uploadFileUsingPOST_1": { | ||
| 408 | "des": "uploadFile", | ||
| 409 | "value": "/order/file/upload" | ||
| 410 | }, | ||
| 411 | "orderSubmitUsingPOST": { | ||
| 412 | "des": "orderSubmit", | ||
| 413 | "value": "/order/submit" | ||
| 414 | }, | ||
| 415 | "resourcesUsingGET": { | ||
| 416 | "des": "resources", | ||
| 417 | "value": "/ossResourcesGain/resources" | ||
| 418 | }, | ||
| 419 | "resourcesUsingHEAD": { | ||
| 420 | "des": "resources", | ||
| 421 | "value": "/ossResourcesGain/resources" | ||
| 422 | }, | ||
| 423 | "resourcesUsingPOST": { | ||
| 424 | "des": "resources", | ||
| 425 | "value": "/ossResourcesGain/resources" | ||
| 426 | }, | ||
| 427 | "resourcesUsingPUT": { | ||
| 428 | "des": "resources", | ||
| 429 | "value": "/ossResourcesGain/resources" | ||
| 430 | }, | ||
| 431 | "resourcesUsingDELETE": { | ||
| 432 | "des": "resources", | ||
| 433 | "value": "/ossResourcesGain/resources" | ||
| 434 | }, | ||
| 435 | "resourcesUsingOPTIONS": { | ||
| 436 | "des": "resources", | ||
| 437 | "value": "/ossResourcesGain/resources" | ||
| 438 | }, | ||
| 439 | "resourcesUsingPATCH": { | ||
| 440 | "des": "resources", | ||
| 441 | "value": "/ossResourcesGain/resources" | ||
| 442 | }, | ||
| 443 | "commonListUsingPOST": { | ||
| 444 | "des": "commonList", | ||
| 445 | "value": "/product/common/list" | ||
| 446 | }, | ||
| 447 | "createAdditionalTemplateUsingPOST": { | ||
| 448 | "des": "创建附加属性模版", | ||
| 449 | "value": "/product/library/create/additional/template" | ||
| 450 | }, | ||
| 451 | "createProductUsingPOST": { | ||
| 452 | "des": "创建产品", | ||
| 453 | "value": "/product/library/create/product" | ||
| 454 | }, | ||
| 455 | "delAdditionalTemplateUsingPOST": { | ||
| 456 | "des": "删除某个附加属性的模版,以及所有产品的此附加属性值", | ||
| 457 | "value": "/product/library/del/additional/template" | ||
| 458 | }, | ||
| 459 | "editsAdditionalValueUsingPOST": { | ||
| 460 | "des": "编辑某个产品的某个附加属性值", | ||
| 461 | "value": "/product/library/edits/additional/value" | ||
| 462 | }, | ||
| 463 | "editsProductUsingPOST": { | ||
| 464 | "des": "编辑产品以及产品的附加属性值", | ||
| 465 | "value": "/product/library/edits/product" | ||
| 466 | }, | ||
| 467 | "getProductUsingGET": { | ||
| 468 | "des": "getProduct", | ||
| 469 | "value": "/product/library/fuzzy" | ||
| 470 | }, | ||
| 471 | "getAdditionalAllValueUsingPOST": { | ||
| 472 | "des": "获取某个附加属性的所有产品的所有附加属性值", | ||
| 473 | "value": "/product/library/get/additional/all/value" | ||
| 474 | }, | ||
| 475 | "getProductUsingPOST": { | ||
| 476 | "des": "获取某个产品详情", | ||
| 477 | "value": "/product/library/get/product" | ||
| 478 | }, | ||
| 479 | "importExcelUsingPOST": { | ||
| 480 | "des": "importExcel", | ||
| 481 | "value": "/product/library/import/excel" | ||
| 482 | }, | ||
| 483 | "queryConditionUsingPOST": { | ||
| 484 | "des": "查询产品库列表下拉框选择条件", | ||
| 485 | "value": "/product/library/query/condition/list" | ||
| 486 | }, | ||
| 487 | "queryProductLibraryListUsingPOST": { | ||
| 488 | "des": "查询产品库列表", | ||
| 489 | "value": "/product/library/query/list" | ||
| 490 | }, | ||
| 491 | "queryProductAttributesListUsingPOST": { | ||
| 492 | "des": "查询所有附加属性列表", | ||
| 493 | "value": "/product/library/query/product/attributes/list" | ||
| 494 | }, | ||
| 495 | "updateProductStatusUsingPOST": { | ||
| 496 | "des": "更新产品上下架状态", | ||
| 497 | "value": "/product/library/update/product/status" | ||
| 498 | }, | ||
| 499 | "listUsingPOST": { | ||
| 500 | "des": "list", | ||
| 501 | "value": "/product/list" | ||
| 502 | }, | ||
| 503 | "productNameSelectUsingPOST": { | ||
| 504 | "des": "productNameSelect", | ||
| 505 | "value": "/product/name/select" | ||
| 506 | }, | ||
| 507 | "phaseEditUsingPOST": { | ||
| 508 | "des": "phaseEdit", | ||
| 509 | "value": "/product/phase/get" | ||
| 510 | }, | ||
| 511 | "phaseTransferUsingPOST": { | ||
| 512 | "des": "phaseTransfer", | ||
| 513 | "value": "/product/phase/transfer" | ||
| 514 | }, | ||
| 515 | "phaseUpdateUsingPOST": { | ||
| 516 | "des": "phaseUpdate", | ||
| 517 | "value": "/product/phase/update" | ||
| 518 | }, | ||
| 519 | "upOrdownUsingPOST": { | ||
| 520 | "des": "upOrdown", | ||
| 521 | "value": "/product/store/{action}" | ||
| 522 | }, | ||
| 523 | "templateListUsingPOST": { | ||
| 524 | "des": "产品类型列表", | ||
| 525 | "value": "/product/type/select/list" | ||
| 526 | }, | ||
| 527 | "getAllProductTypesUsingGET": { | ||
| 528 | "des": "getAllProductTypes", | ||
| 529 | "value": "/product/types" | ||
| 530 | }, | ||
| 531 | "copySpeechTemplateUsingPOST": { | ||
| 532 | "des": "复制话术模版", | ||
| 533 | "value": "/speech/template/copy/speech" | ||
| 534 | }, | ||
| 535 | "createSpeechRuleUsingPOST": { | ||
| 536 | "des": "创建话术模板", | ||
| 537 | "value": "/speech/template/create/rule" | ||
| 538 | }, | ||
| 539 | "getPoupFilesUsingPOST": { | ||
| 540 | "des": "getPoupFiles", | ||
| 541 | "value": "/speech/template/get/popupfilelist" | ||
| 542 | }, | ||
| 543 | "getSignatureObjsUsingPOST": { | ||
| 544 | "des": "getSignatureObjs", | ||
| 545 | "value": "/speech/template/get/signatureObjs" | ||
| 546 | }, | ||
| 547 | "getSpeechTemplateUsingPOST": { | ||
| 548 | "des": "话术预览/话术编辑 (获取话术)", | ||
| 549 | "value": "/speech/template/get/speech" | ||
| 550 | }, | ||
| 551 | "getVerificationMethodsUsingPOST": { | ||
| 552 | "des": "getVerificationMethods", | ||
| 553 | "value": "/speech/template/get/verificationMethods" | ||
| 554 | }, | ||
| 555 | "getOperatorsUsingGET": { | ||
| 556 | "des": "getOperators", | ||
| 557 | "value": "/speech/template/operators" | ||
| 558 | }, | ||
| 559 | "createSpeechPhaseUsingPOST": { | ||
| 560 | "des": "创建话术模板环节(话术大环节、小环节)", | ||
| 561 | "value": "/speech/template/phase/create" | ||
| 562 | }, | ||
| 563 | "querySpeechTakeEffectConditionUsingPOST": { | ||
| 564 | "des": "获取话术生效条件", | ||
| 565 | "value": "/speech/template/query/condition/list" | ||
| 566 | }, | ||
| 567 | "querySpeechTemplateListUsingPOST": { | ||
| 568 | "des": "话术模版库列表", | ||
| 569 | "value": "/speech/template/query/list" | ||
| 570 | }, | ||
| 571 | "getVariablesUsingGET": { | ||
| 572 | "des": "getVariables", | ||
| 573 | "value": "/speech/template/speech/variables" | ||
| 574 | }, | ||
| 575 | "updateSpeechStatusUsingPOST": { | ||
| 576 | "des": "更新话术状态: 上架、下架", | ||
| 577 | "value": "/speech/template/update/speech/status" | ||
| 578 | } | ||
| 579 | }, | ||
| 580 | "cl": { | ||
| 581 | "appUpdateUsingPOST": { | ||
| 582 | "des": "A端版本更新", | ||
| 583 | "value": "/app/version/update" | ||
| 584 | }, | ||
| 585 | "accountActivateUsingPOST": { | ||
| 586 | "des": "新建账号且激活", | ||
| 587 | "value": "/auth/account/activate" | ||
| 588 | }, | ||
| 589 | "loginUsingPOST": { | ||
| 590 | "des": "app登录", | ||
| 591 | "value": "/auth/login" | ||
| 592 | }, | ||
| 593 | "logoutUsingPOST": { | ||
| 594 | "des": "统一退出登录", | ||
| 595 | "value": "/auth/logout" | ||
| 596 | }, | ||
| 597 | "loginUsingPOST_1": { | ||
| 598 | "des": "app-B端登录", | ||
| 599 | "value": "/auth/remote/login" | ||
| 600 | }, | ||
| 601 | "ossStsUsingPOST": { | ||
| 602 | "des": "获取鉴权", | ||
| 603 | "value": "/auth/sts" | ||
| 604 | }, | ||
| 605 | "addOrderUsingPOST": { | ||
| 606 | "des": "创建订单接口", | ||
| 607 | "value": "/order/add" | ||
| 608 | }, | ||
| 609 | "orderCreateConfirmUsingPOST": { | ||
| 610 | "des": "orderCreateConfirm", | ||
| 611 | "value": "/order/add/confirm" | ||
| 612 | }, | ||
| 613 | "addQuotaUsingPOST": { | ||
| 614 | "des": "创建保全订单接口", | ||
| 615 | "value": "/order/addQuota" | ||
| 616 | }, | ||
| 617 | "agentFileListUsingPOST": { | ||
| 618 | "des": "A端文件列表", | ||
| 619 | "value": "/order/agent/file/list" | ||
| 620 | }, | ||
| 621 | "customerFileListUsingPOST": { | ||
| 622 | "des": "B端文件列表", | ||
| 623 | "value": "/order/customer/file/list" | ||
| 624 | }, | ||
| 625 | "deleteOrderUsingPOST": { | ||
| 626 | "des": "删除订单", | ||
| 627 | "value": "/order/delete" | ||
| 628 | }, | ||
| 629 | "deleteFileUsingPOST": { | ||
| 630 | "des": "删除文件", | ||
| 631 | "value": "/order/delete/file" | ||
| 632 | }, | ||
| 633 | "detailUsingPOST": { | ||
| 634 | "des": "订单详情接口", | ||
| 635 | "value": "/order/detail" | ||
| 636 | }, | ||
| 637 | "downloadFileUsingPOST": { | ||
| 638 | "des": "下载文件", | ||
| 639 | "value": "/order/download/file" | ||
| 640 | }, | ||
| 641 | "facePairUsingPOST": { | ||
| 642 | "des": "人脸比对", | ||
| 643 | "value": "/order/face-pair" | ||
| 644 | }, | ||
| 645 | "handAddOrderUsingPOST": { | ||
| 646 | "des": "handAddOrder", | ||
| 647 | "value": "/order/hand/add" | ||
| 648 | }, | ||
| 649 | "listUsingPOST": { | ||
| 650 | "des": "app订单列表", | ||
| 651 | "value": "/order/list" | ||
| 652 | }, | ||
| 653 | "listCountUsingPOST": { | ||
| 654 | "des": "app首页展示数量", | ||
| 655 | "value": "/order/list/count" | ||
| 656 | }, | ||
| 657 | "orCodeUsingPOST": { | ||
| 658 | "des": "二维码扫码接口", | ||
| 659 | "value": "/order/or/code" | ||
| 660 | }, | ||
| 661 | "phaseContentV3UsingPOST": { | ||
| 662 | "des": "话术3.0获取话术内容", | ||
| 663 | "value": "/order/phase/content/v3" | ||
| 664 | }, | ||
| 665 | "phaseContentAllV3UsingPOST": { | ||
| 666 | "des": "phaseContentAllV3", | ||
| 667 | "value": "/order/phase/fileAndContent/all" | ||
| 668 | }, | ||
| 669 | "quotaDetailUsingPOST": { | ||
| 670 | "des": "quotaDetail", | ||
| 671 | "value": "/order/quotaDetail" | ||
| 672 | }, | ||
| 673 | "orderReport3UsingGET": { | ||
| 674 | "des": "报表下载", | ||
| 675 | "value": "/order/report3" | ||
| 676 | }, | ||
| 677 | "orderCancelUsingPOST": { | ||
| 678 | "des": "撤单", | ||
| 679 | "value": "/order/status" | ||
| 680 | }, | ||
| 681 | "orderCancelUsingPUT": { | ||
| 682 | "des": "撤单", | ||
| 683 | "value": "/order/status" | ||
| 684 | }, | ||
| 685 | "orderSubmitUsingPOST": { | ||
| 686 | "des": "订单录制完成提交接口", | ||
| 687 | "value": "/order/submit" | ||
| 688 | }, | ||
| 689 | "synthesizerZipV3UsingPOST": { | ||
| 690 | "des": "话术3.0获取话术音频", | ||
| 691 | "value": "/order/tts/v3" | ||
| 692 | }, | ||
| 693 | "productNameSelectUsingPOST": { | ||
| 694 | "des": "productNameSelect", | ||
| 695 | "value": "/product/hand/list" | ||
| 696 | }, | ||
| 697 | "productNameSelectV2UsingPOST": { | ||
| 698 | "des": "productNameSelectV2", | ||
| 699 | "value": "/product/hand/list/v2" | ||
| 700 | }, | ||
| 701 | "rejectedDetailUsingPOST": { | ||
| 702 | "des": "app的拒绝详情", | ||
| 703 | "value": "/quality/audit/rejected/detail" | ||
| 704 | }, | ||
| 705 | "agentAliveUsingPOST": { | ||
| 706 | "des": "agentAlive", | ||
| 707 | "value": "/remote/agent/alive" | ||
| 708 | }, | ||
| 709 | "agentGetRoomInfoUsingPOST": { | ||
| 710 | "des": "agentGetRoomInfo", | ||
| 711 | "value": "/remote/agent/get/room-info" | ||
| 712 | }, | ||
| 713 | "agentJoinRoomSuccUsingPOST": { | ||
| 714 | "des": "agentJoinRoomSucc", | ||
| 715 | "value": "/remote/agent/join-room/success" | ||
| 716 | }, | ||
| 717 | "agentLeaveRoomUsingPOST": { | ||
| 718 | "des": "agentLeaveRoom", | ||
| 719 | "value": "/remote/agent/leave-room" | ||
| 720 | }, | ||
| 721 | "selectSceneUsingPOST": { | ||
| 722 | "des": "selectScene", | ||
| 723 | "value": "/remote/app/selectScene" | ||
| 724 | }, | ||
| 725 | "remoteAppUpdateUsingPOST": { | ||
| 726 | "des": "B端版本更新", | ||
| 727 | "value": "/remote/app/version/update" | ||
| 728 | }, | ||
| 729 | "callbackUsingPOST": { | ||
| 730 | "des": "callback", | ||
| 731 | "value": "/remote/callback" | ||
| 732 | }, | ||
| 733 | "customerGetRoomInfoUsingPOST": { | ||
| 734 | "des": "customerGetRoomInfo", | ||
| 735 | "value": "/remote/customer/get/room-info" | ||
| 736 | }, | ||
| 737 | "getUserSigUsingPOST": { | ||
| 738 | "des": "getUserSig", | ||
| 739 | "value": "/remote/getUserSig" | ||
| 740 | }, | ||
| 741 | "notifyRemoteUsingPOST": { | ||
| 742 | "des": "A端邀请B端短信", | ||
| 743 | "value": "/remote/notify/remote" | ||
| 744 | }, | ||
| 745 | "recordBeginUsingPOST": { | ||
| 746 | "des": "recordBegin", | ||
| 747 | "value": "/remote/record/begin" | ||
| 748 | }, | ||
| 749 | "recordFinishUsingPOST": { | ||
| 750 | "des": "recordFinish", | ||
| 751 | "value": "/remote/record/finish" | ||
| 752 | }, | ||
| 753 | "remoteOrderListUsingPOST": { | ||
| 754 | "des": "远程端双录app订单列表", | ||
| 755 | "value": "/remote/remote/list" | ||
| 756 | }, | ||
| 757 | "remotePhaseContentV3UsingPOST": { | ||
| 758 | "des": "远程app话术获取", | ||
| 759 | "value": "/remote/remote/phase/content/v3" | ||
| 760 | }, | ||
| 761 | "uploadFileUsingPOST": { | ||
| 762 | "des": "uploadFile", | ||
| 763 | "value": "/remote/upload/file" | ||
| 764 | }, | ||
| 765 | "validOrderUsingPOST": { | ||
| 766 | "des": "validOrder", | ||
| 767 | "value": "/remote/verifyLinkValidity" | ||
| 768 | }, | ||
| 769 | "saveSignatureFacePictureUsingPOST": { | ||
| 770 | "des": "saveSignatureFacePicture", | ||
| 771 | "value": "/signature/saveSignatureFacePicture" | ||
| 772 | }, | ||
| 773 | "signUsingPOST": { | ||
| 774 | "des": "sign", | ||
| 775 | "value": "/signature/sign" | ||
| 776 | }, | ||
| 777 | "statusUsingPOST": { | ||
| 778 | "des": "status", | ||
| 779 | "value": "/signature/status" | ||
| 780 | }, | ||
| 781 | "appUpdateNewUsingPOST": { | ||
| 782 | "des": "A端版本更新", | ||
| 783 | "value": "/system/app/version/update" | ||
| 784 | }, | ||
| 785 | "queryProfessionListUsingPOST": { | ||
| 786 | "des": "职业信息集合查询", | ||
| 787 | "value": "/system/profession/list" | ||
| 788 | }, | ||
| 789 | "remoteAppUpdateNewUsingPOST": { | ||
| 790 | "des": "B端版本更新", | ||
| 791 | "value": "/system/remote/app/version/update" | ||
| 792 | }, | ||
| 793 | "forgPasswordUsingPOST": { | ||
| 794 | "des": "重置密码", | ||
| 795 | "value": "/system/reset/password" | ||
| 796 | }, | ||
| 797 | "sendSmsUsingPOST": { | ||
| 798 | "des": "发送短信", | ||
| 799 | "value": "/system/send/sms" | ||
| 800 | }, | ||
| 801 | "uploadProductCodeFileUsingPOST": { | ||
| 802 | "des": "根据产品编号配置文件", | ||
| 803 | "value": "/upload/product-code-file" | ||
| 804 | } | ||
| 805 | }, | ||
| 806 | "qa": { | ||
| 807 | "submitAuditUsingPOST_1": { | ||
| 808 | "des": "submitAudit", | ||
| 809 | "value": "/inner/createSubmitQualityAuditInfo" | ||
| 810 | }, | ||
| 811 | "getRecordByOrderRecordIdOrderByCreateTimeUsingPOST": { | ||
| 812 | "des": "getRecordByOrderRecordIdOrderByCreateTime", | ||
| 813 | "value": "/inner/getRecordByOrderRecordIdOrderByCreateTime" | ||
| 814 | }, | ||
| 815 | "matchRuleUsingPOST": { | ||
| 816 | "des": "matchRule", | ||
| 817 | "value": "/inner/matchRule" | ||
| 818 | }, | ||
| 819 | "getRectPointsUsingPOST": { | ||
| 820 | "des": "getRectPoints", | ||
| 821 | "value": "/inner/qualityQueryByOrderRecordId" | ||
| 822 | }, | ||
| 823 | "getRejectedDetailUsingPOST": { | ||
| 824 | "des": "getRejectedDetail", | ||
| 825 | "value": "/inner/qualityRejectedDetail" | ||
| 826 | }, | ||
| 827 | "queryByOrderRecordIdUsingPOST": { | ||
| 828 | "des": "queryByOrderRecordId", | ||
| 829 | "value": "/inner/queryByOrderRecordId" | ||
| 830 | }, | ||
| 831 | "getAuditAllListUsingPOST": { | ||
| 832 | "des": "全部订单列表", | ||
| 833 | "value": "/quality/audit/all/list" | ||
| 834 | }, | ||
| 835 | "getAuditCanListUsingPOST": { | ||
| 836 | "des": "可质检列表", | ||
| 837 | "value": "/quality/audit/can/list" | ||
| 838 | }, | ||
| 839 | "comparisonConclusionUsingPOST": { | ||
| 840 | "des": "comparisonConclusion", | ||
| 841 | "value": "/quality/audit/compare" | ||
| 842 | }, | ||
| 843 | "confirmAuditUsingPOST": { | ||
| 844 | "des": "复核质检同意接口", | ||
| 845 | "value": "/quality/audit/confirm" | ||
| 846 | }, | ||
| 847 | "resetUsingGET": { | ||
| 848 | "des": "reset", | ||
| 849 | "value": "/quality/audit/dataTrans/reset" | ||
| 850 | }, | ||
| 851 | "transRulesUsingGET": { | ||
| 852 | "des": "transRules", | ||
| 853 | "value": "/quality/audit/dataTrans/transRules" | ||
| 854 | }, | ||
| 855 | "transStatisticsUsingGET": { | ||
| 856 | "des": "transStatistics", | ||
| 857 | "value": "/quality/audit/dataTrans/transStatistics" | ||
| 858 | }, | ||
| 859 | "infoDetailUsingPOST": { | ||
| 860 | "des": "获取质检详情", | ||
| 861 | "value": "/quality/audit/detail" | ||
| 862 | }, | ||
| 863 | "addProportionRuleUsingPOST": { | ||
| 864 | "des": "质检比列列表:新增规则", | ||
| 865 | "value": "/quality/audit/proportion/config/add/rule" | ||
| 866 | }, | ||
| 867 | "deleteProportionRuleUsingPOST": { | ||
| 868 | "des": "质检比列列表:删除规则", | ||
| 869 | "value": "/quality/audit/proportion/config/delete/rule" | ||
| 870 | }, | ||
| 871 | "getProportionRuleDetailUsingPOST": { | ||
| 872 | "des": "提供质检比例规则详情", | ||
| 873 | "value": "/quality/audit/proportion/config/detail" | ||
| 874 | }, | ||
| 875 | "proportionListUsingPOST": { | ||
| 876 | "des": "提供质检比例规则列表", | ||
| 877 | "value": "/quality/audit/proportion/config/list" | ||
| 878 | }, | ||
| 879 | "modifyProportionRuleUsingPOST": { | ||
| 880 | "des": "质检比列列表:修改规则", | ||
| 881 | "value": "/quality/audit/proportion/config/modify/rule" | ||
| 882 | }, | ||
| 883 | "getAuditHistoriesUsingPOST": { | ||
| 884 | "des": "审核历史记录", | ||
| 885 | "value": "/quality/audit/record/history" | ||
| 886 | }, | ||
| 887 | "submitAuditUsingPOST": { | ||
| 888 | "des": "待整改点提交", | ||
| 889 | "value": "/quality/audit/submit" | ||
| 890 | }, | ||
| 891 | "addRuleUsingPOST": { | ||
| 892 | "des": "新增规则", | ||
| 893 | "value": "/quality/audit/v2/proportion/config/add/rule" | ||
| 894 | }, | ||
| 895 | "deleteRuleUsingPOST": { | ||
| 896 | "des": "删除规则", | ||
| 897 | "value": "/quality/audit/v2/proportion/config/delete/rule" | ||
| 898 | }, | ||
| 899 | "getConfigDetailV2UsingGET": { | ||
| 900 | "des": "根据当前规则,获取规则详情(编辑/查看时)", | ||
| 901 | "value": "/quality/audit/v2/proportion/config/detail/{ruleId}" | ||
| 902 | }, | ||
| 903 | "getRuleListUsingPOST": { | ||
| 904 | "des": "提供质检比例规则列表", | ||
| 905 | "value": "/quality/audit/v2/proportion/config/list" | ||
| 906 | }, | ||
| 907 | "modifyRuleUsingPOST": { | ||
| 908 | "des": "修改规则", | ||
| 909 | "value": "/quality/audit/v2/proportion/config/modify/rule" | ||
| 910 | }, | ||
| 911 | "createSubmitQualityAuditInfoUnloginUsingPOST": { | ||
| 912 | "des": "createSubmitQualityAuditInfoUnlogin", | ||
| 913 | "value": "/quality/audit/v2/quality/audit/record-unlogin" | ||
| 914 | } | ||
| 915 | }, | ||
| 916 | "sys": { | ||
| 917 | "addAppUserUsingPOST": { | ||
| 918 | "des": "增加app账号", | ||
| 919 | "value": "/account/add/app/user" | ||
| 920 | }, | ||
| 921 | "addUserUsingPOST": { | ||
| 922 | "des": "添加web账号", | ||
| 923 | "value": "/account/addUser" | ||
| 924 | }, | ||
| 925 | "getUserInfoUsingPOST": { | ||
| 926 | "des": "根据用户名获取用户信息", | ||
| 927 | "value": "/account/getUserInfo" | ||
| 928 | }, | ||
| 929 | "importAppUserUsingPOST": { | ||
| 930 | "des": "导入app账号", | ||
| 931 | "value": "/account/import/app/user" | ||
| 932 | }, | ||
| 933 | "modifyUserUsingPOST": { | ||
| 934 | "des": "web端修改账号", | ||
| 935 | "value": "/account/modifyUser" | ||
| 936 | }, | ||
| 937 | "appManageUsingPOST": { | ||
| 938 | "des": "app账户信息查询", | ||
| 939 | "value": "/app/account/manage" | ||
| 940 | }, | ||
| 941 | "checkValidateCodeUsingPOST": { | ||
| 942 | "des": "校验验证码", | ||
| 943 | "value": "/checkValidateCode" | ||
| 944 | }, | ||
| 945 | "codeLoginUsingPOST": { | ||
| 946 | "des": "手机验证码登录", | ||
| 947 | "value": "/codeLogin" | ||
| 948 | }, | ||
| 949 | "sendValidCodeEmailUsingPOST": { | ||
| 950 | "des": "发送邮箱验证码", | ||
| 951 | "value": "/email/sendValidCode" | ||
| 952 | }, | ||
| 953 | "validEmailCodeUsingPOST": { | ||
| 954 | "des": "验证邮箱验证码", | ||
| 955 | "value": "/email/validEmailCode" | ||
| 956 | }, | ||
| 957 | "accountActivateUsingPOST": { | ||
| 958 | "des": "accountActivate", | ||
| 959 | "value": "/inner/account/activate" | ||
| 960 | }, | ||
| 961 | "appUpdateUsingPOST": { | ||
| 962 | "des": "appUpdate", | ||
| 963 | "value": "/inner/app/version/update" | ||
| 964 | }, | ||
| 965 | "createUserUsingPOST": { | ||
| 966 | "des": "createUser", | ||
| 967 | "value": "/inner/createUser" | ||
| 968 | }, | ||
| 969 | "loginUsingPOST": { | ||
| 970 | "des": "login", | ||
| 971 | "value": "/inner/login" | ||
| 972 | }, | ||
| 973 | "logoutUsingPOST": { | ||
| 974 | "des": "logout", | ||
| 975 | "value": "/inner/logout" | ||
| 976 | }, | ||
| 977 | "getLeafOrgesUsingPOST": { | ||
| 978 | "des": "getLeafOrges", | ||
| 979 | "value": "/inner/org/getLeafOrgs" | ||
| 980 | }, | ||
| 981 | "getOrgListUsingPOST": { | ||
| 982 | "des": "getOrgList", | ||
| 983 | "value": "/inner/org/getList" | ||
| 984 | }, | ||
| 985 | "getOrgTreeUsingPOST": { | ||
| 986 | "des": "getOrgTree", | ||
| 987 | "value": "/inner/org/getTree" | ||
| 988 | }, | ||
| 989 | "getOrgTreeRootUsingPOST": { | ||
| 990 | "des": "getOrgTreeRoot", | ||
| 991 | "value": "/inner/org/getTreeRoot" | ||
| 992 | }, | ||
| 993 | "queryOrganizationLevelVOUsingPOST": { | ||
| 994 | "des": "queryOrganizationLevelVO", | ||
| 995 | "value": "/inner/organization/all" | ||
| 996 | }, | ||
| 997 | "getAllOrgIdsUsingPOST": { | ||
| 998 | "des": "getAllOrgIds", | ||
| 999 | "value": "/inner/organization/allorg/ids" | ||
| 1000 | }, | ||
| 1001 | "getAllOrganizationOrderLevelUsingPOST": { | ||
| 1002 | "des": "getAllOrganizationOrderLevel", | ||
| 1003 | "value": "/inner/organization/allorg/orderlevel" | ||
| 1004 | }, | ||
| 1005 | "queryOrganizationLevelVOUsingPOST_1": { | ||
| 1006 | "des": "queryOrganizationLevelVO", | ||
| 1007 | "value": "/inner/organization/bybranchId" | ||
| 1008 | }, | ||
| 1009 | "queryOrganizationByCodeUsingPOST": { | ||
| 1010 | "des": "queryOrganizationByCode", | ||
| 1011 | "value": "/inner/organization/bycode" | ||
| 1012 | }, | ||
| 1013 | "queryOrganizationByNameUsingPOST": { | ||
| 1014 | "des": "queryOrganizationByName", | ||
| 1015 | "value": "/inner/organization/byname" | ||
| 1016 | }, | ||
| 1017 | "queryOrganizationByIdUsingPOST": { | ||
| 1018 | "des": "queryOrganizationById", | ||
| 1019 | "value": "/inner/organization/byoid" | ||
| 1020 | }, | ||
| 1021 | "getChildrenOrgIdsUsingPOST": { | ||
| 1022 | "des": "getChildrenOrgIds", | ||
| 1023 | "value": "/inner/organization/children/orgids" | ||
| 1024 | }, | ||
| 1025 | "fetchByOrgListUsingPOST": { | ||
| 1026 | "des": "fetchByOrgList", | ||
| 1027 | "value": "/inner/organization/orglist" | ||
| 1028 | }, | ||
| 1029 | "queryOrgIdAndOrgCodeMapUsingPOST": { | ||
| 1030 | "des": "queryOrgIdAndOrgCodeMap", | ||
| 1031 | "value": "/inner/organization/queryOrgIdAndOrgCodeMap" | ||
| 1032 | }, | ||
| 1033 | "getSubOrgIdsByBranchIdListUsingPOST": { | ||
| 1034 | "des": "getSubOrgIdsByBranchIdList", | ||
| 1035 | "value": "/inner/organization/sub/orglist" | ||
| 1036 | }, | ||
| 1037 | "updateStandardNumByAddCommonProductUsingPOST": { | ||
| 1038 | "des": "updateStandardNumByAddCommonProduct", | ||
| 1039 | "value": "/inner/organization/update/num" | ||
| 1040 | }, | ||
| 1041 | "updateStandardNumByCommonProductPhaseChangeUsingPOST": { | ||
| 1042 | "des": "updateStandardNumByCommonProductPhaseChange", | ||
| 1043 | "value": "/inner/organization/update/num/marketid" | ||
| 1044 | }, | ||
| 1045 | "updateNotStandardNumByProductPhaseChangeUsingPOST": { | ||
| 1046 | "des": "updateNotStandardNumByProductPhaseChange", | ||
| 1047 | "value": "/inner/organization/update/num/marketid/list" | ||
| 1048 | }, | ||
| 1049 | "queryProfessionListUsingPOST": { | ||
| 1050 | "des": "职业信息集合查询", | ||
| 1051 | "value": "/inner/profession/list" | ||
| 1052 | }, | ||
| 1053 | "queryOrganizationsByIdsUsingPOST": { | ||
| 1054 | "des": "queryOrganizationsByIds", | ||
| 1055 | "value": "/inner/queryOrganizationsByIds" | ||
| 1056 | }, | ||
| 1057 | "queryUserDoByNameUsingPOST": { | ||
| 1058 | "des": "queryUserDoByName", | ||
| 1059 | "value": "/inner/queryUserDoByName" | ||
| 1060 | }, | ||
| 1061 | "queryUserDoBySingleNameUsingPOST": { | ||
| 1062 | "des": "queryUserDoBySingleName", | ||
| 1063 | "value": "/inner/queryUserDoBySingleName" | ||
| 1064 | }, | ||
| 1065 | "remoteAppUpdateUsingPOST": { | ||
| 1066 | "des": "remoteAppUpdate", | ||
| 1067 | "value": "/inner/remote/app/version/update" | ||
| 1068 | }, | ||
| 1069 | "loginUsingPOST_1": { | ||
| 1070 | "des": "login", | ||
| 1071 | "value": "/inner/remote/login" | ||
| 1072 | }, | ||
| 1073 | "forgPasswordUsingPOST": { | ||
| 1074 | "des": "forgPassword", | ||
| 1075 | "value": "/inner/reset/password" | ||
| 1076 | }, | ||
| 1077 | "sendSmsUsingPOST": { | ||
| 1078 | "des": "sendSms", | ||
| 1079 | "value": "/inner/send/sms" | ||
| 1080 | }, | ||
| 1081 | "queryUserDoByIdUsingPOST": { | ||
| 1082 | "des": "queryUserDoById", | ||
| 1083 | "value": "/inner/user" | ||
| 1084 | }, | ||
| 1085 | "fetchReportAcDataVOUsingPOST": { | ||
| 1086 | "des": "fetchReportAcDataVO", | ||
| 1087 | "value": "/inner/user/fetchReportAcDataVO" | ||
| 1088 | }, | ||
| 1089 | "queryStateByUserIdUsingPOST": { | ||
| 1090 | "des": "queryStateByUserId", | ||
| 1091 | "value": "/inner/user/sate" | ||
| 1092 | }, | ||
| 1093 | "userAuditScopeListByIdUsingPOST": { | ||
| 1094 | "des": "userAuditScopeListById", | ||
| 1095 | "value": "/inner/userAuditScopeListById" | ||
| 1096 | }, | ||
| 1097 | "validateSmsUsingPOST": { | ||
| 1098 | "des": "validateSms", | ||
| 1099 | "value": "/inner/validate/sms" | ||
| 1100 | }, | ||
| 1101 | "addNewCityForTeamUsingPOST": { | ||
| 1102 | "des": "addNewCityForTeam", | ||
| 1103 | "value": "/org/addNewCityForTeam" | ||
| 1104 | }, | ||
| 1105 | "createOrUpdateQualityTeamUsingPOST": { | ||
| 1106 | "des": "createOrUpdateQualityTeam", | ||
| 1107 | "value": "/org/createOrUpdateQualityTeam" | ||
| 1108 | }, | ||
| 1109 | "getQualityDetailByIdUsingPOST": { | ||
| 1110 | "des": "getQualityDetailById", | ||
| 1111 | "value": "/org/getQualityDetailById" | ||
| 1112 | }, | ||
| 1113 | "getQualityTeamListUsingPOST": { | ||
| 1114 | "des": "getQualityTeamList", | ||
| 1115 | "value": "/org/getQualityTeamList" | ||
| 1116 | }, | ||
| 1117 | "getQualityTeamOrgUsingPOST": { | ||
| 1118 | "des": "getQualityTeamOrg", | ||
| 1119 | "value": "/org/getQualityTeamOrg" | ||
| 1120 | }, | ||
| 1121 | "getTeamOrgByTeamIdUsingPOST": { | ||
| 1122 | "des": "getTeamOrgByTeamId", | ||
| 1123 | "value": "/org/getTeamOrgByTeamId" | ||
| 1124 | }, | ||
| 1125 | "switcherAreaUsingPOST": { | ||
| 1126 | "des": "switcherArea", | ||
| 1127 | "value": "/organization/area/switcher" | ||
| 1128 | }, | ||
| 1129 | "queryAllChannelUsingPOST": { | ||
| 1130 | "des": "查询所有的渠道", | ||
| 1131 | "value": "/organization/channel" | ||
| 1132 | }, | ||
| 1133 | "organizationListUsingPOST": { | ||
| 1134 | "des": "机构列表", | ||
| 1135 | "value": "/organization/list" | ||
| 1136 | }, | ||
| 1137 | "switcherPositioningUsingPOST": { | ||
| 1138 | "des": "switcherPositioning", | ||
| 1139 | "value": "/organization/positioning/switcher" | ||
| 1140 | }, | ||
| 1141 | "querySpeechTakeEffectConditionUsingPOST": { | ||
| 1142 | "des": "querySpeechTakeEffectCondition", | ||
| 1143 | "value": "/organization/query" | ||
| 1144 | }, | ||
| 1145 | "queryBranchUsingPOST": { | ||
| 1146 | "des": "查询全部分公司", | ||
| 1147 | "value": "/organization/query/branch" | ||
| 1148 | }, | ||
| 1149 | "querySubBranchUsingPOST": { | ||
| 1150 | "des": "查询属于某个分公司的全部支公司", | ||
| 1151 | "value": "/organization/query/sub/branch" | ||
| 1152 | }, | ||
| 1153 | "switcherRemoteUsingPOST": { | ||
| 1154 | "des": "机构是否支持远程-状态更改", | ||
| 1155 | "value": "/organization/remote/switcher" | ||
| 1156 | }, | ||
| 1157 | "switcherSpeechUsingPOST": { | ||
| 1158 | "des": "切换语音播报开关", | ||
| 1159 | "value": "/organization/speech/switcher" | ||
| 1160 | }, | ||
| 1161 | "categoryListUsingPOST": { | ||
| 1162 | "des": "categoryList", | ||
| 1163 | "value": "/organization/superior/list" | ||
| 1164 | }, | ||
| 1165 | "orderCancelUsingPOST": { | ||
| 1166 | "des": "组织机构树", | ||
| 1167 | "value": "/organization/tree" | ||
| 1168 | }, | ||
| 1169 | "queryUserUsingPOST": { | ||
| 1170 | "des": "queryUser", | ||
| 1171 | "value": "/query/user" | ||
| 1172 | }, | ||
| 1173 | "sendEmailUsingPOST": { | ||
| 1174 | "des": "发送邮件", | ||
| 1175 | "value": "/send/email" | ||
| 1176 | }, | ||
| 1177 | "unbindUsingPOST": { | ||
| 1178 | "des": "unbind", | ||
| 1179 | "value": "/unbind" | ||
| 1180 | }, | ||
| 1181 | "updateUserUsingPOST": { | ||
| 1182 | "des": "updateUser", | ||
| 1183 | "value": "/update/user" | ||
| 1184 | }, | ||
| 1185 | "editHasScopeUsingPOST": { | ||
| 1186 | "des": "editHasScope", | ||
| 1187 | "value": "/user/edit" | ||
| 1188 | }, | ||
| 1189 | "editDetailUsingPOST": { | ||
| 1190 | "des": "editDetail", | ||
| 1191 | "value": "/user/edit/detail" | ||
| 1192 | }, | ||
| 1193 | "editRoleUsingPOST": { | ||
| 1194 | "des": "editRole", | ||
| 1195 | "value": "/user/edit/role" | ||
| 1196 | }, | ||
| 1197 | "editStateUsingPOST": { | ||
| 1198 | "des": "editState", | ||
| 1199 | "value": "/user/edit/state" | ||
| 1200 | }, | ||
| 1201 | "webManageUsingPOST": { | ||
| 1202 | "des": "web账户信息查询", | ||
| 1203 | "value": "/web/account/manage" | ||
| 1204 | }, | ||
| 1205 | "forgetPassword2UsingPOST": { | ||
| 1206 | "des": "web端忘记密码", | ||
| 1207 | "value": "/web/forgetPassword" | ||
| 1208 | }, | ||
| 1209 | "webLoginUsingPOST": { | ||
| 1210 | "des": "web登录", | ||
| 1211 | "value": "/web/login" | ||
| 1212 | }, | ||
| 1213 | "getWebLoginCommandUsingPOST": { | ||
| 1214 | "des": "getWebLoginCommand", | ||
| 1215 | "value": "/web/login/command" | ||
| 1216 | }, | ||
| 1217 | "webModifyUsernameUsingPOST": { | ||
| 1218 | "des": "Web端修改密码", | ||
| 1219 | "value": "/web/modify/username" | ||
| 1220 | } | ||
| 1221 | } | ||
| 1222 | } | ||
| ... | \ No newline at end of file | ... | \ No newline at end of file |
config/temp.json
0 → 100644
File mode changed
config/vendorHost.py
0 → 100644
| 1 | #!/usr/bin/env python | ||
| 2 | # -*- coding: utf-8 -*- | ||
| 3 | # @Time : 2021/7/16 下午5:05 | ||
| 4 | # @Author : 付孟奇 | ||
| 5 | |||
| 6 | from util.HandleJenkins import config | ||
| 7 | from util.log import logger | ||
| 8 | |||
| 9 | ''' | ||
| 10 | 根据项目参数获取对应域名 | ||
| 11 | 1、环境 | ||
| 12 | 2、项目名称 | ||
| 13 | ''' | ||
| 14 | |||
| 15 | |||
| 16 | class VendorHost: | ||
| 17 | def __init__(self): | ||
| 18 | self.env = config['env'] | ||
| 19 | self.vendor = config['pro'] | ||
| 20 | |||
| 21 | # 获取项目域名 | ||
| 22 | def get_api_url(self): | ||
| 23 | logger.info(str(self.vendor) + '的' + str(self.env) + '环境域名为:' + str(self.vendorHostList[self.vendor][self.env])) | ||
| 24 | return self.vendorHostList[self.vendor][self.env] | ||
| 25 | |||
| 26 | # 项目域名 | ||
| 27 | vendorHostList = { | ||
| 28 | '中美大都会': {'staging': '1234', 'beta': '1234', 'vdr': 'https://vdr-staging.situdata.com/'}, | ||
| 29 | '瑞泰': {'staging': 'https://staging-oldmutual-life-video.situdata.com/'}, | ||
| 30 | '德华安顾': {'staging': '1234', 'beta': '1234', 'vdr': 'https://vdr-ergolife-staging.situdata.com/'} | ||
| 31 | } | ||
| 32 | |||
| 33 | |||
| 34 | vendor_host = VendorHost().get_api_url() |
config/vendorList.py
0 → 100644
| 1 | #!/usr/bin/env python | ||
| 2 | # -*- coding: utf-8 -*- | ||
| 3 | # @Time : 2021/8/17 下午5:19 | ||
| 4 | # @Author : 付孟奇 | ||
| 5 | |||
| 6 | # app登陆方式区别,1无统一登陆,2统一登陆 | ||
| 7 | app_login_1 = ['中美大都会', '瑞泰'] | ||
| 8 | app_login_2 = ['德华安顾', 'other'] | ||
| 9 | |||
| 10 | # web登陆方式区分 | ||
| 11 | web_login_1 = ['中美大都会', '瑞泰', '德华安顾'] | ||
| 12 | |||
| 13 | # web登陆是否有忘记密码 | ||
| 14 | web_login_forget_pwd = ['中美大都会', '瑞泰', '德华安顾'] | ||
| 15 | |||
| 16 | # 生成订单,1新契约纸质入件,2保全纸质入件 | ||
| 17 | add_order_type_1 = ['中美大都会', '瑞泰', '德华安顾'] | ||
| 18 | add_order_type_2 = ['德华安顾'] | ||
| 19 | |||
| 20 | # redis连接方式区分 | ||
| 21 | db_40 = ['中美大都会'] | ||
| 22 | db_45 = ['瑞泰', '德华安顾'] |
config/vendorPath.py
0 → 100644
| 1 | #!/usr/bin/env python | ||
| 2 | # -*- coding: utf-8 -*- | ||
| 3 | # @Time : 2021/7/16 下午5:06 | ||
| 4 | # @Author : 付孟奇 | ||
| 5 | |||
| 6 | import os | ||
| 7 | from util.HandleJenkins import config | ||
| 8 | |||
| 9 | ''' | ||
| 10 | 记录项目所有文件路径 | ||
| 11 | ''' | ||
| 12 | |||
| 13 | # 项目根路径 | ||
| 14 | base_path = os.path.dirname(os.path.dirname(os.path.abspath(__file__))) | ||
| 15 | |||
| 16 | # case保存地址 | ||
| 17 | case_path = os.path.join(base_path, 'case') | ||
| 18 | |||
| 19 | # 公共参数文件 | ||
| 20 | global_path = os.path.join(base_path, 'config/global_param.json') | ||
| 21 | |||
| 22 | # 公共临时文件 | ||
| 23 | temp_path = os.path.join(base_path, 'config/temp.json') | ||
| 24 | |||
| 25 | # API接口存储路径 | ||
| 26 | api_path = os.path.join(base_path, 'config/swaggerApi.json') | ||
| 27 | |||
| 28 | # case执行顺序说明文件 | ||
| 29 | case_list_path = os.path.join(base_path, 'config/' + config['pro'] + '-config.json') | ||
| 30 | |||
| 31 | # 订单生成参数文件 | ||
| 32 | add_order_type_1_path = os.path.join(base_path, 'data/order/add_order_type_1.json') | ||
| 33 | add_order_type_2_path = os.path.join(base_path, 'data/order/add_order_type_2.json') | ||
| 34 | order_mp4_path = os.path.join(base_path, 'data/order/' + config['pro'] + '-mp4.json') | ||
| 35 | order_zip_path = os.path.join(base_path, 'data/order/' + config['pro'] + '.zip') | ||
| 36 | order_idCard_path = os.path.join(base_path, 'data/order/身份证正面.jpg') | ||
| 37 | |||
| 38 | # 文件参数 | ||
| 39 | file_pdf_path = os.path.join(base_path, 'data/file/apitest.pdf') | ||
| 40 | |||
| 41 | # 数据源Excel存储路径 | ||
| 42 | excel_path = os.path.join(base_path, 'data/excel') | ||
| 43 | |||
| 44 | # 日志路径 | ||
| 45 | # log_path = os.path.join(base_path, 'log/{}.log'.format(time.strftime('%Y-%m-%s'))) | ||
| 46 | log_path = os.path.join(base_path, 'log/api.log') | ||
| 47 | |||
| 48 | # 生成报告文件路径 | ||
| 49 | report_path = os.path.join(base_path, 'report/report.html') |
config/中美大都会-config.json
0 → 100644
| 1 | { | ||
| 2 | "WebOrganizationGetTree": "True", | ||
| 3 | "WebAccountAddWebUser": "True", | ||
| 4 | "WebAccountManage": "True", | ||
| 5 | "WebAccountGetUserInfo": "True", | ||
| 6 | "WebAccountModifyUser": "True", | ||
| 7 | "WebAccountUserEditState": "True", | ||
| 8 | "WebAccountModifyPassword": "True", | ||
| 9 | "WebEmailSend": "True", | ||
| 10 | "WebEmailValidCode": "True", | ||
| 11 | "WebForgetPassword": "True", | ||
| 12 | "WebLogin": "True", | ||
| 13 | "WebProductTypeList": "True", | ||
| 14 | "WebChannelList": "True", | ||
| 15 | "WebProductCreat": "True", | ||
| 16 | "WebProductList": "True", | ||
| 17 | "WebProductUpdate": "True", | ||
| 18 | "WebAdditionalTemplate": "True", | ||
| 19 | "WebAdditionalList": "True", | ||
| 20 | "WebAdditionalGet": "True", | ||
| 21 | "WebAdditionalEdit": "True", | ||
| 22 | "WebAdditionalDel": "True", | ||
| 23 | "WebOrganizationQuery": "True", | ||
| 24 | "WebOrganizationList": "True", | ||
| 25 | "WebOrganizationQueryBranch": "True", | ||
| 26 | "WebOrganizationQuerySubBranch": "True", | ||
| 27 | "WebPopupFileList": "True", | ||
| 28 | "WebFileProductFuzzy": "True", | ||
| 29 | "WebFileUpload": "True", | ||
| 30 | "WebFileList": "True", | ||
| 31 | "WebFileDetail": "True", | ||
| 32 | "WebFileUpdate": "True", | ||
| 33 | "WebFileDelete": "True", | ||
| 34 | "WebAccountAddAPPUser": "True", | ||
| 35 | "WebAccountAppManage": "True", | ||
| 36 | "WebAccountImportAppUser": "True", | ||
| 37 | "WebSpeechTemplateConditionList": "True", | ||
| 38 | "WebSpeechTemplateCreatRule": "True", | ||
| 39 | "WebSpeechTemplateQueryList": "True", | ||
| 40 | "WebSpeechTemplateVariables": "True", | ||
| 41 | "WebSpeechTemplateOperators":"True", | ||
| 42 | "WebSpeechTemplateGetSpeech": "True", | ||
| 43 | "WebSpeechTemplatePhaseCreat": "True", | ||
| 44 | "WebSpeechTemplateUpdateStatus": "True", | ||
| 45 | "WebSpeechTemplateCopySpeech": "True", | ||
| 46 | "WebQualityAuditProportionConfigRuleAdd": "True", | ||
| 47 | "WebQualityAuditProportionConfigList": "True", | ||
| 48 | "WebQualityAuditProportionConfigDetail":"True", | ||
| 49 | "WebQualityAuditProportionConfigRuleModify": "True", | ||
| 50 | "SystemSendSms": "True", | ||
| 51 | "SystemResetPassword": "True", | ||
| 52 | "AppAuthLogin": "True", | ||
| 53 | "AppVersionUpdate": "True", | ||
| 54 | "AppHomeList": "True", | ||
| 55 | "AppListCount": "True", | ||
| 56 | "AppProductList": "True", | ||
| 57 | "AppOrderAdd": "True", | ||
| 58 | "AppOrderDetail": "True", | ||
| 59 | "AppFileList": "True", | ||
| 60 | "AppPhaseV3": "True", | ||
| 61 | "AppTtsV3": "True", | ||
| 62 | "AppOrderFace": "True", | ||
| 63 | "AppAuthSts": "True", | ||
| 64 | "AppOrderSubmit": "True", | ||
| 65 | "WebQualityAuditCanList": "True", | ||
| 66 | "WebQualityAuditDetail":"True", | ||
| 67 | "WebQualityAuditSubmit": "True", | ||
| 68 | "WebQualityAuditRecordHistory": "True", | ||
| 69 | "AppQualityAuditRejectedDetail": "True", | ||
| 70 | "WebOrderPhaseValidateV3": "False", | ||
| 71 | "WebOrderReportDown": "True", | ||
| 72 | "WebQualityAuditProportionConfigRuleDelete": "True", | ||
| 73 | "WebAllDelete": "False" | ||
| 74 | } | ||
| ... | \ No newline at end of file | ... | \ No newline at end of file |
config/德华安顾-config.json
0 → 100644
| 1 | { | ||
| 2 | "WebOrganizationGetTree": "True", | ||
| 3 | "WebAccountAddWebUser": "True", | ||
| 4 | "WebAccountManage": "True", | ||
| 5 | "WebAccountGetUserInfo": "True", | ||
| 6 | "WebAccountModifyUser": "True", | ||
| 7 | "WebAccountUserEditState": "True", | ||
| 8 | "WebAccountModifyPassword": "True", | ||
| 9 | "WebEmailSend": "True", | ||
| 10 | "WebEmailValidCode": "True", | ||
| 11 | "WebForgetPassword": "True", | ||
| 12 | "WebLogin": "True", | ||
| 13 | "WebProductTypeList": "True", | ||
| 14 | "WebChannelList": "True", | ||
| 15 | "WebProductCreat": "True", | ||
| 16 | "WebProductList": "True", | ||
| 17 | "WebProductUpdate": "True", | ||
| 18 | "WebAdditionalTemplate": "True", | ||
| 19 | "WebAdditionalList": "True", | ||
| 20 | "WebAdditionalGet": "True", | ||
| 21 | "WebAdditionalEdit": "True", | ||
| 22 | "WebAdditionalDel": "True", | ||
| 23 | "WebOrganizationQuery": "True", | ||
| 24 | "WebOrganizationList": "True", | ||
| 25 | "WebOrganizationQueryBranch": "True", | ||
| 26 | "WebOrganizationQuerySubBranch": "True", | ||
| 27 | "WebOrganizationPositingSwitcher": "True", | ||
| 28 | "WebPopupFileList": "True", | ||
| 29 | "WebFileProductFuzzy": "False", | ||
| 30 | "WebFileUpload": "False", | ||
| 31 | "WebFileList": "False", | ||
| 32 | "WebFileDetail": "False", | ||
| 33 | "WebFileUpdate": "False", | ||
| 34 | "WebFileDelete": "False", | ||
| 35 | "WebAccountAddAPPUser": "False", | ||
| 36 | "WebAccountAppManage": "True", | ||
| 37 | "WebAccountImportAppUser": "True", | ||
| 38 | "WebSpeechTemplateConditionList": "True", | ||
| 39 | "WebSpeechTemplateCreatRule": "True", | ||
| 40 | "WebSpeechTemplateQueryList": "True", | ||
| 41 | "WebSpeechTemplateVariables": "True", | ||
| 42 | "WebSpeechTemplateOperators":"True", | ||
| 43 | "WebSpeechTemplateGetSpeech": "True", | ||
| 44 | "WebSpeechTemplatePhaseCreat": "True", | ||
| 45 | "WebSpeechTemplateUpdateStatus": "True", | ||
| 46 | "WebSpeechTemplateCopySpeech": "True", | ||
| 47 | "WebQualityAuditProportionConfigRuleAdd": "True", | ||
| 48 | "WebQualityAuditProportionConfigList": "True", | ||
| 49 | "WebQualityAuditProportionConfigDetail":"True", | ||
| 50 | "WebQualityAuditProportionConfigRuleModify": "True", | ||
| 51 | "SystemSendSms": "False", | ||
| 52 | "SystemResetPassword": "False", | ||
| 53 | "AppAuthLogin": "True", | ||
| 54 | "AppVersionUpdate": "True", | ||
| 55 | "AppHomeList": "True", | ||
| 56 | "AppListCount": "True", | ||
| 57 | "AppOrderQuotaDetail": "True", | ||
| 58 | "AppProductList": "True", | ||
| 59 | "AppOrderAdd": "True", | ||
| 60 | "AppOrderAddQuota": "True", | ||
| 61 | "AppOrderDetail": "True", | ||
| 62 | "AppFileList": "True", | ||
| 63 | "AppPhaseV3": "True", | ||
| 64 | "AppTtsV3": "True", | ||
| 65 | "AppOrderFace": "True", | ||
| 66 | "AppAuthSts": "True", | ||
| 67 | "AppOrderSubmit": "True", | ||
| 68 | "WebQualityAuditCanList": "True", | ||
| 69 | "WebQualityAuditDetail":"True", | ||
| 70 | "WebQualityAuditSubmit": "True", | ||
| 71 | "WebQualityAuditRecordHistory": "True", | ||
| 72 | "AppQualityAuditRejectedDetail": "True", | ||
| 73 | "WebOrderPhaseValidateV3": "False", | ||
| 74 | "WebOrderReportDown": "True", | ||
| 75 | "WebQualityAuditProportionConfigRuleDelete": "True", | ||
| 76 | "WebAllDelete": "False" | ||
| 77 | } | ||
| ... | \ No newline at end of file | ... | \ No newline at end of file |
config/瑞泰-config.json
0 → 100644
| 1 | { | ||
| 2 | "WebOrganizationGetTree": "True", | ||
| 3 | "WebAccountAddWebUser": "True", | ||
| 4 | "WebAccountManage": "True", | ||
| 5 | "WebAccountGetUserInfo": "True", | ||
| 6 | "WebAccountModifyUser": "True", | ||
| 7 | "WebAccountUserEditState": "True", | ||
| 8 | "WebAccountModifyPassword": "True", | ||
| 9 | "WebEmailSend": "True", | ||
| 10 | "WebEmailValidCode": "True", | ||
| 11 | "WebForgetPassword": "True", | ||
| 12 | "WebLogin": "True", | ||
| 13 | "WebProductTypeList": "True", | ||
| 14 | "WebChannelList": "True", | ||
| 15 | "WebProductCreat": "True", | ||
| 16 | "WebProductList": "True", | ||
| 17 | "WebProductUpdate": "True", | ||
| 18 | "WebAdditionalTemplate": "True", | ||
| 19 | "WebAdditionalList": "True", | ||
| 20 | "WebAdditionalGet": "True", | ||
| 21 | "WebAdditionalEdit": "True", | ||
| 22 | "WebAdditionalDel": "True", | ||
| 23 | "WebOrganizationQuery": "True", | ||
| 24 | "WebOrganizationList": "True", | ||
| 25 | "WebOrganizationQueryBranch": "True", | ||
| 26 | "WebOrganizationQuerySubBranch": "True", | ||
| 27 | "WebPopupFileList": "True", | ||
| 28 | "WebFileProductFuzzy": "True", | ||
| 29 | "WebFileUpload": "True", | ||
| 30 | "WebFileList": "True", | ||
| 31 | "WebFileDetail": "True", | ||
| 32 | "WebFileUpdate": "True", | ||
| 33 | "WebFileDelete": "True", | ||
| 34 | "WebAccountAddAPPUser": "True", | ||
| 35 | "WebAccountAppManage": "True", | ||
| 36 | "WebAccountImportAppUser": "True", | ||
| 37 | "WebSpeechTemplateConditionList": "True", | ||
| 38 | "WebSpeechTemplateCreatRule": "True", | ||
| 39 | "WebSpeechTemplateQueryList": "True", | ||
| 40 | "WebSpeechTemplateVariables": "True", | ||
| 41 | "WebSpeechTemplateOperators":"True", | ||
| 42 | "WebSpeechTemplateGetSpeech": "True", | ||
| 43 | "WebSpeechTemplatePhaseCreat": "True", | ||
| 44 | "WebSpeechTemplateUpdateStatus": "True", | ||
| 45 | "WebSpeechTemplateCopySpeech": "True", | ||
| 46 | "WebQualityAuditProportionConfigRuleAdd": "True", | ||
| 47 | "WebQualityAuditProportionConfigList": "True", | ||
| 48 | "WebQualityAuditProportionConfigDetail":"True", | ||
| 49 | "WebQualityAuditProportionConfigRuleModify": "True", | ||
| 50 | "SystemSendSms": "True", | ||
| 51 | "SystemResetPassword": "True", | ||
| 52 | "AppAuthLogin": "True", | ||
| 53 | "AppVersionUpdate": "True", | ||
| 54 | "AppHomeList": "True", | ||
| 55 | "AppListCount": "True", | ||
| 56 | "AppProductList": "True", | ||
| 57 | "AppOrderAdd": "True", | ||
| 58 | "AppOrderDetail": "True", | ||
| 59 | "AppFileList": "True", | ||
| 60 | "AppPhaseV3": "True", | ||
| 61 | "AppTtsV3": "True", | ||
| 62 | "AppOrderFace": "True", | ||
| 63 | "AppAuthSts": "True", | ||
| 64 | "AppOrderSubmit": "True", | ||
| 65 | "WebQualityAuditCanList": "True", | ||
| 66 | "WebQualityAuditDetail":"True", | ||
| 67 | "WebQualityAuditSubmit": "True", | ||
| 68 | "WebQualityAuditRecordHistory": "True", | ||
| 69 | "AppQualityAuditRejectedDetail": "True", | ||
| 70 | "WebOrderPhaseValidateV3": "False", | ||
| 71 | "WebOrderReportDown": "True", | ||
| 72 | "WebQualityAuditProportionConfigRuleDelete": "True", | ||
| 73 | "WebAllDelete": "True" | ||
| 74 | } | ||
| ... | \ No newline at end of file | ... | \ No newline at end of file |
data/.DS_Store
0 → 100644
No preview for this file type
data/excel/A_api_case.xlsx
0 → 100644
No preview for this file type
data/excel/B_api_case.xlsx
0 → 100644
No preview for this file type
data/excel/WEB_api_case.xlsx
0 → 100644
No preview for this file type
data/file/apitest.pdf
0 → 100644
No preview for this file type
data/order/add_order_type_1.json
0 → 100644
| 1 | { | ||
| 2 | "订单基本信息": { | ||
| 3 | "销售渠道": "顾销渠道", | ||
| 4 | "双录创建日期": "2021-08-18", | ||
| 5 | "保单类型": "非自保件", | ||
| 6 | "机构名称": "北京", | ||
| 7 | "投保单号": "apitest" | ||
| 8 | }, | ||
| 9 | "主险信息": [{ | ||
| 10 | "首期缴费金额": "12343", | ||
| 11 | "产品种类": "主险", | ||
| 12 | "缴费期限": "1年", | ||
| 13 | "产品类型": "分红险", | ||
| 14 | "产品名称": "都会传家 非吸烟体(2018)终身寿险(分红型)", | ||
| 15 | "缴费方式": "月缴", | ||
| 16 | "产品代码": "PWL04AQ", | ||
| 17 | "保险期限": "1年", | ||
| 18 | "被保人": [ | ||
| 19 | "自动化测试"] | ||
| 20 | }], | ||
| 21 | "被保人信息": [{ | ||
| 22 | "姓名": "自动化测试", | ||
| 23 | "证件类型": "护照", | ||
| 24 | "证件号码": "123456", | ||
| 25 | "职业": "内勤人员", | ||
| 26 | "居住地址": "地球", | ||
| 27 | "性别": "男", | ||
| 28 | "出生日期": "2000-01-01", | ||
| 29 | "被保人是投保人的": "本人", | ||
| 30 | "手机号码": "12345678901" | ||
| 31 | }], | ||
| 32 | "投保人信息": { | ||
| 33 | "姓名": "自动化测试", | ||
| 34 | "证件类型": "护照", | ||
| 35 | "证件号码": "123456", | ||
| 36 | "职业": "内勤人员", | ||
| 37 | "居住地址": "地球", | ||
| 38 | "性别": "男", | ||
| 39 | "出生日期": "2000-01-01", | ||
| 40 | "手机号码": "12345678901" | ||
| 41 | }, | ||
| 42 | "附加险信息": [{ | ||
| 43 | "首期缴费金额": "12345", | ||
| 44 | "产品种类": "附加险", | ||
| 45 | "缴费期限": "1年", | ||
| 46 | "产品类型": "人寿保险", | ||
| 47 | "产品名称": "附加都会卫士(2019)定期寿险", | ||
| 48 | "缴费方式": "月缴", | ||
| 49 | "产品代码": "FIR04AA", | ||
| 50 | "保险期限": "1年", | ||
| 51 | "被保人": [ | ||
| 52 | "自动化测试"] | ||
| 53 | }] | ||
| 54 | } | ||
| ... | \ No newline at end of file | ... | \ No newline at end of file |
data/order/add_order_type_2.json
0 → 100644
| 1 | { | ||
| 2 | "订单基本信息": { | ||
| 3 | "保单号": "202106002448538", | ||
| 4 | "保单类型": "非自保件" | ||
| 5 | }, | ||
| 6 | "投保人信息": { | ||
| 7 | "姓名": "韩超", | ||
| 8 | "证件号码": "110101199003077694", | ||
| 9 | "出生日期": "1990-03-07", | ||
| 10 | "证件类型": "身份证", | ||
| 11 | "性别": "男", | ||
| 12 | "投保人是被保人的": "父亲" | ||
| 13 | }, | ||
| 14 | "被保人信息": [ | ||
| 15 | { | ||
| 16 | "姓名": "哦哦", | ||
| 17 | "监护人姓名": "", | ||
| 18 | "证件号码": "110101200803071616", | ||
| 19 | "出生日期": "2008-03-07", | ||
| 20 | "证件类型": "身份证", | ||
| 21 | "性别": "男" | ||
| 22 | } | ||
| 23 | ], | ||
| 24 | "保险信息": [ | ||
| 25 | { | ||
| 26 | "保险期限": "1年", | ||
| 27 | "被保人": [ | ||
| 28 | "哦哦" | ||
| 29 | ], | ||
| 30 | "附加险": [], | ||
| 31 | "产品名称": "德华安顾奥特保重大疾病保险(2021版)", | ||
| 32 | "每期缴费金额": 3.4, | ||
| 33 | "缴费期限": "1年", | ||
| 34 | "缴费方式": "年缴" | ||
| 35 | } | ||
| 36 | ], | ||
| 37 | "taskId": "a1956529bc9d4f60bf0af257a9076444" | ||
| 38 | } | ||
| ... | \ No newline at end of file | ... | \ No newline at end of file |
data/order/中美大都会-mp4.json
0 → 100644
| 1 | { | ||
| 2 | "code": 0, | ||
| 3 | "msg": "OK", | ||
| 4 | "success": true, | ||
| 5 | "result": { | ||
| 6 | "recordBeginTime": "", | ||
| 7 | "needTts": 1, | ||
| 8 | "orderRecordId": 11546, | ||
| 9 | "recordingTime": 0, | ||
| 10 | "bigPhaseList": [ | ||
| 11 | { | ||
| 12 | "bigPhaseBeginTime": 0, | ||
| 13 | "bigPhaseEndTime": 0, | ||
| 14 | "osbpId": 184588, | ||
| 15 | "bigPhaseNum": 1, | ||
| 16 | "bigPhaseName": "大环节", | ||
| 17 | "littlePhaseList": [ | ||
| 18 | { | ||
| 19 | "oslpId": 368539, | ||
| 20 | "osbpId": 184588, | ||
| 21 | "littlePhaseMp3Name": "368539", | ||
| 22 | "littlePhaseNum": 1, | ||
| 23 | "littlePhaseType": 2, | ||
| 24 | "littlePhaseFileType": 0, | ||
| 25 | "littlePhaseIdCardType": 0, | ||
| 26 | "littlePhaseIdCardOcrSwitch": 0, | ||
| 27 | "littlePhaseTitle": "陈述环节标题", | ||
| 28 | "littlePhaseTtsContent": "陈述", | ||
| 29 | "littlePhaseAnswer": "", | ||
| 30 | "littlePhaseImageNameArray": "", | ||
| 31 | "littlePhaseResultCode": 0, | ||
| 32 | "littlePhaseResultMsg": "", | ||
| 33 | "littlePhaseBeginTime": 0, | ||
| 34 | "littlePhaseEndTime": 0, | ||
| 35 | "productCode": "PWL04AQ", | ||
| 36 | "insureSelf": 0, | ||
| 37 | "littlePhaseTTsFinishTime": 0, | ||
| 38 | "passedByMachine": 0, | ||
| 39 | "pdfFileName": "", | ||
| 40 | "docPrdCode": "", | ||
| 41 | "filePopup": 0, | ||
| 42 | "userRole": 0, | ||
| 43 | "littlePhaseFileInfo": null, | ||
| 44 | "name": "", | ||
| 45 | "idCard": "", | ||
| 46 | "idCardType": "", | ||
| 47 | "ipno": "", | ||
| 48 | "remoteSignatureMethod": 0, | ||
| 49 | "offlineSignatureMethod": 0, | ||
| 50 | "remoteSignatureType": 0, | ||
| 51 | "remoteSignaturePrompt": "", | ||
| 52 | "remoteSignatureObject": 0, | ||
| 53 | "remoteSignatureRiskPrompt": "", | ||
| 54 | "offlineSignatureType": 0, | ||
| 55 | "offlineSignaturePrompt": "", | ||
| 56 | "offlineSignatureObject": 0, | ||
| 57 | "offlineSignatureRiskPrompt": "", | ||
| 58 | "remoteVerificationMethod": 0, | ||
| 59 | "offlineVerificationMethod": 0 | ||
| 60 | }, | ||
| 61 | { | ||
| 62 | "oslpId": 368540, | ||
| 63 | "osbpId": 184588, | ||
| 64 | "littlePhaseMp3Name": "368540", | ||
| 65 | "littlePhaseNum": 2, | ||
| 66 | "littlePhaseType": 3, | ||
| 67 | "littlePhaseFileType": 3, | ||
| 68 | "littlePhaseIdCardType": 0, | ||
| 69 | "littlePhaseIdCardOcrSwitch": 0, | ||
| 70 | "littlePhaseTitle": "文件出示", | ||
| 71 | "littlePhaseTtsContent": "文件出示", | ||
| 72 | "littlePhaseAnswer": "", | ||
| 73 | "littlePhaseImageNameArray": "", | ||
| 74 | "littlePhaseResultCode": 0, | ||
| 75 | "littlePhaseResultMsg": "", | ||
| 76 | "littlePhaseBeginTime": 0, | ||
| 77 | "littlePhaseEndTime": 0, | ||
| 78 | "productCode": "PWL04AQ", | ||
| 79 | "insureSelf": 0, | ||
| 80 | "littlePhaseTTsFinishTime": 0, | ||
| 81 | "passedByMachine": 0, | ||
| 82 | "pdfFileName": "基于深度学习的图像服务系统接口文档基础版(1).pdf", | ||
| 83 | "docPrdCode": "PWL04AQ", | ||
| 84 | "filePopup": 1, | ||
| 85 | "userRole": 0, | ||
| 86 | "littlePhaseFileInfo": null, | ||
| 87 | "name": "", | ||
| 88 | "idCard": "", | ||
| 89 | "idCardType": "", | ||
| 90 | "ipno": "", | ||
| 91 | "remoteSignatureMethod": 0, | ||
| 92 | "offlineSignatureMethod": 0, | ||
| 93 | "remoteSignatureType": 0, | ||
| 94 | "remoteSignaturePrompt": "", | ||
| 95 | "remoteSignatureObject": 0, | ||
| 96 | "remoteSignatureRiskPrompt": "", | ||
| 97 | "offlineSignatureType": 0, | ||
| 98 | "offlineSignaturePrompt": "", | ||
| 99 | "offlineSignatureObject": 0, | ||
| 100 | "offlineSignatureRiskPrompt": "", | ||
| 101 | "remoteVerificationMethod": 0, | ||
| 102 | "offlineVerificationMethod": 0 | ||
| 103 | }, | ||
| 104 | { | ||
| 105 | "oslpId": 368541, | ||
| 106 | "osbpId": 184588, | ||
| 107 | "littlePhaseMp3Name": "368541", | ||
| 108 | "littlePhaseNum": 3, | ||
| 109 | "littlePhaseType": 4, | ||
| 110 | "littlePhaseFileType": 0, | ||
| 111 | "littlePhaseIdCardType": 1, | ||
| 112 | "littlePhaseIdCardOcrSwitch": 2, | ||
| 113 | "littlePhaseTitle": "证件出示", | ||
| 114 | "littlePhaseTtsContent": "证件出示", | ||
| 115 | "littlePhaseAnswer": "", | ||
| 116 | "littlePhaseImageNameArray": "", | ||
| 117 | "littlePhaseResultCode": 0, | ||
| 118 | "littlePhaseResultMsg": "", | ||
| 119 | "littlePhaseBeginTime": 0, | ||
| 120 | "littlePhaseEndTime": 0, | ||
| 121 | "productCode": "PWL04AQ", | ||
| 122 | "insureSelf": 0, | ||
| 123 | "littlePhaseTTsFinishTime": 0, | ||
| 124 | "passedByMachine": 0, | ||
| 125 | "pdfFileName": "", | ||
| 126 | "docPrdCode": "", | ||
| 127 | "filePopup": 0, | ||
| 128 | "userRole": 0, | ||
| 129 | "littlePhaseFileInfo": null, | ||
| 130 | "name": "", | ||
| 131 | "idCard": "", | ||
| 132 | "idCardType": "", | ||
| 133 | "ipno": "", | ||
| 134 | "remoteSignatureMethod": 0, | ||
| 135 | "offlineSignatureMethod": 0, | ||
| 136 | "remoteSignatureType": 0, | ||
| 137 | "remoteSignaturePrompt": "", | ||
| 138 | "remoteSignatureObject": 0, | ||
| 139 | "remoteSignatureRiskPrompt": "", | ||
| 140 | "offlineSignatureType": 0, | ||
| 141 | "offlineSignaturePrompt": "", | ||
| 142 | "offlineSignatureObject": 0, | ||
| 143 | "offlineSignatureRiskPrompt": "", | ||
| 144 | "remoteVerificationMethod": 0, | ||
| 145 | "offlineVerificationMethod": 0 | ||
| 146 | }, | ||
| 147 | { | ||
| 148 | "oslpId": 368542, | ||
| 149 | "osbpId": 184588, | ||
| 150 | "littlePhaseMp3Name": "368542", | ||
| 151 | "littlePhaseNum": 4, | ||
| 152 | "littlePhaseType": 8, | ||
| 153 | "littlePhaseFileType": 0, | ||
| 154 | "littlePhaseIdCardType": 0, | ||
| 155 | "littlePhaseIdCardOcrSwitch": 0, | ||
| 156 | "littlePhaseTitle": "签字环节", | ||
| 157 | "littlePhaseTtsContent": "签字环节", | ||
| 158 | "littlePhaseAnswer": "", | ||
| 159 | "littlePhaseImageNameArray": "", | ||
| 160 | "littlePhaseResultCode": 0, | ||
| 161 | "littlePhaseResultMsg": "", | ||
| 162 | "littlePhaseBeginTime": 0, | ||
| 163 | "littlePhaseEndTime": 0, | ||
| 164 | "productCode": "PWL04AQ", | ||
| 165 | "insureSelf": 0, | ||
| 166 | "littlePhaseTTsFinishTime": 0, | ||
| 167 | "passedByMachine": 0, | ||
| 168 | "pdfFileName": "", | ||
| 169 | "docPrdCode": "", | ||
| 170 | "filePopup": 0, | ||
| 171 | "userRole": 0, | ||
| 172 | "littlePhaseFileInfo": null, | ||
| 173 | "name": "", | ||
| 174 | "idCard": "", | ||
| 175 | "idCardType": "", | ||
| 176 | "ipno": "", | ||
| 177 | "remoteSignatureMethod": 0, | ||
| 178 | "offlineSignatureMethod": 0, | ||
| 179 | "remoteSignatureType": 0, | ||
| 180 | "remoteSignaturePrompt": "", | ||
| 181 | "remoteSignatureObject": 0, | ||
| 182 | "remoteSignatureRiskPrompt": "", | ||
| 183 | "offlineSignatureType": 0, | ||
| 184 | "offlineSignaturePrompt": "", | ||
| 185 | "offlineSignatureObject": 0, | ||
| 186 | "offlineSignatureRiskPrompt": "", | ||
| 187 | "remoteVerificationMethod": 0, | ||
| 188 | "offlineVerificationMethod": 0 | ||
| 189 | }, | ||
| 190 | { | ||
| 191 | "oslpId": 368543, | ||
| 192 | "osbpId": 184588, | ||
| 193 | "littlePhaseMp3Name": "368543", | ||
| 194 | "littlePhaseNum": 5, | ||
| 195 | "littlePhaseType": 6, | ||
| 196 | "littlePhaseFileType": 0, | ||
| 197 | "littlePhaseIdCardType": 0, | ||
| 198 | "littlePhaseIdCardOcrSwitch": 0, | ||
| 199 | "littlePhaseTitle": "人脸识别环节", | ||
| 200 | "littlePhaseTtsContent": "人脸识别环节", | ||
| 201 | "littlePhaseAnswer": "", | ||
| 202 | "littlePhaseImageNameArray": "", | ||
| 203 | "littlePhaseResultCode": 0, | ||
| 204 | "littlePhaseResultMsg": "", | ||
| 205 | "littlePhaseBeginTime": 0, | ||
| 206 | "littlePhaseEndTime": 0, | ||
| 207 | "productCode": "PWL04AQ", | ||
| 208 | "insureSelf": 0, | ||
| 209 | "littlePhaseTTsFinishTime": 0, | ||
| 210 | "passedByMachine": 0, | ||
| 211 | "pdfFileName": "", | ||
| 212 | "docPrdCode": "", | ||
| 213 | "filePopup": 0, | ||
| 214 | "userRole": 0, | ||
| 215 | "littlePhaseFileInfo": null, | ||
| 216 | "name": "", | ||
| 217 | "idCard": "", | ||
| 218 | "idCardType": "", | ||
| 219 | "ipno": "", | ||
| 220 | "remoteSignatureMethod": 0, | ||
| 221 | "offlineSignatureMethod": 0, | ||
| 222 | "remoteSignatureType": 0, | ||
| 223 | "remoteSignaturePrompt": "", | ||
| 224 | "remoteSignatureObject": 0, | ||
| 225 | "remoteSignatureRiskPrompt": "", | ||
| 226 | "offlineSignatureType": 0, | ||
| 227 | "offlineSignaturePrompt": "", | ||
| 228 | "offlineSignatureObject": 0, | ||
| 229 | "offlineSignatureRiskPrompt": "", | ||
| 230 | "remoteVerificationMethod": 0, | ||
| 231 | "offlineVerificationMethod": 0 | ||
| 232 | } | ||
| 233 | ] | ||
| 234 | } | ||
| 235 | ], | ||
| 236 | "twoPersonDetectList": [], | ||
| 237 | "insureSelf": 2 | ||
| 238 | } | ||
| 239 | } | ||
| ... | \ No newline at end of file | ... | \ No newline at end of file |
data/order/中美大都会.zip
0 → 100644
No preview for this file type
data/order/瑞泰-mp4.json
0 → 100644
| 1 | { | ||
| 2 | "code": 0, | ||
| 3 | "msg": "OK", | ||
| 4 | "success": true, | ||
| 5 | "result": { | ||
| 6 | "recordBeginTime": "", | ||
| 7 | "needTts": 1, | ||
| 8 | "orderRecordId": 11546, | ||
| 9 | "recordingTime": 0, | ||
| 10 | "bigPhaseList": [ | ||
| 11 | { | ||
| 12 | "bigPhaseBeginTime": 0, | ||
| 13 | "bigPhaseEndTime": 0, | ||
| 14 | "osbpId": 184588, | ||
| 15 | "bigPhaseNum": 1, | ||
| 16 | "bigPhaseName": "大环节", | ||
| 17 | "littlePhaseList": [ | ||
| 18 | { | ||
| 19 | "oslpId": 368539, | ||
| 20 | "osbpId": 184588, | ||
| 21 | "littlePhaseMp3Name": "368539", | ||
| 22 | "littlePhaseNum": 1, | ||
| 23 | "littlePhaseType": 2, | ||
| 24 | "littlePhaseFileType": 0, | ||
| 25 | "littlePhaseIdCardType": 0, | ||
| 26 | "littlePhaseIdCardOcrSwitch": 0, | ||
| 27 | "littlePhaseTitle": "陈述环节标题", | ||
| 28 | "littlePhaseTtsContent": "陈述", | ||
| 29 | "littlePhaseAnswer": "", | ||
| 30 | "littlePhaseImageNameArray": "", | ||
| 31 | "littlePhaseResultCode": 0, | ||
| 32 | "littlePhaseResultMsg": "", | ||
| 33 | "littlePhaseBeginTime": 0, | ||
| 34 | "littlePhaseEndTime": 0, | ||
| 35 | "productCode": "PWL04AQ", | ||
| 36 | "insureSelf": 0, | ||
| 37 | "littlePhaseTTsFinishTime": 0, | ||
| 38 | "passedByMachine": 0, | ||
| 39 | "pdfFileName": "", | ||
| 40 | "docPrdCode": "", | ||
| 41 | "filePopup": 0, | ||
| 42 | "userRole": 0, | ||
| 43 | "littlePhaseFileInfo": null, | ||
| 44 | "name": "", | ||
| 45 | "idCard": "", | ||
| 46 | "idCardType": "", | ||
| 47 | "ipno": "", | ||
| 48 | "remoteSignatureMethod": 0, | ||
| 49 | "offlineSignatureMethod": 0, | ||
| 50 | "remoteSignatureType": 0, | ||
| 51 | "remoteSignaturePrompt": "", | ||
| 52 | "remoteSignatureObject": 0, | ||
| 53 | "remoteSignatureRiskPrompt": "", | ||
| 54 | "offlineSignatureType": 0, | ||
| 55 | "offlineSignaturePrompt": "", | ||
| 56 | "offlineSignatureObject": 0, | ||
| 57 | "offlineSignatureRiskPrompt": "", | ||
| 58 | "remoteVerificationMethod": 0, | ||
| 59 | "offlineVerificationMethod": 0 | ||
| 60 | }, | ||
| 61 | { | ||
| 62 | "oslpId": 368540, | ||
| 63 | "osbpId": 184588, | ||
| 64 | "littlePhaseMp3Name": "368540", | ||
| 65 | "littlePhaseNum": 2, | ||
| 66 | "littlePhaseType": 3, | ||
| 67 | "littlePhaseFileType": 3, | ||
| 68 | "littlePhaseIdCardType": 0, | ||
| 69 | "littlePhaseIdCardOcrSwitch": 0, | ||
| 70 | "littlePhaseTitle": "文件出示", | ||
| 71 | "littlePhaseTtsContent": "文件出示", | ||
| 72 | "littlePhaseAnswer": "", | ||
| 73 | "littlePhaseImageNameArray": "", | ||
| 74 | "littlePhaseResultCode": 0, | ||
| 75 | "littlePhaseResultMsg": "", | ||
| 76 | "littlePhaseBeginTime": 0, | ||
| 77 | "littlePhaseEndTime": 0, | ||
| 78 | "productCode": "PWL04AQ", | ||
| 79 | "insureSelf": 0, | ||
| 80 | "littlePhaseTTsFinishTime": 0, | ||
| 81 | "passedByMachine": 0, | ||
| 82 | "pdfFileName": "基于深度学习的图像服务系统接口文档基础版(1).pdf", | ||
| 83 | "docPrdCode": "PWL04AQ", | ||
| 84 | "filePopup": 1, | ||
| 85 | "userRole": 0, | ||
| 86 | "littlePhaseFileInfo": null, | ||
| 87 | "name": "", | ||
| 88 | "idCard": "", | ||
| 89 | "idCardType": "", | ||
| 90 | "ipno": "", | ||
| 91 | "remoteSignatureMethod": 0, | ||
| 92 | "offlineSignatureMethod": 0, | ||
| 93 | "remoteSignatureType": 0, | ||
| 94 | "remoteSignaturePrompt": "", | ||
| 95 | "remoteSignatureObject": 0, | ||
| 96 | "remoteSignatureRiskPrompt": "", | ||
| 97 | "offlineSignatureType": 0, | ||
| 98 | "offlineSignaturePrompt": "", | ||
| 99 | "offlineSignatureObject": 0, | ||
| 100 | "offlineSignatureRiskPrompt": "", | ||
| 101 | "remoteVerificationMethod": 0, | ||
| 102 | "offlineVerificationMethod": 0 | ||
| 103 | }, | ||
| 104 | { | ||
| 105 | "oslpId": 368541, | ||
| 106 | "osbpId": 184588, | ||
| 107 | "littlePhaseMp3Name": "368541", | ||
| 108 | "littlePhaseNum": 3, | ||
| 109 | "littlePhaseType": 4, | ||
| 110 | "littlePhaseFileType": 0, | ||
| 111 | "littlePhaseIdCardType": 1, | ||
| 112 | "littlePhaseIdCardOcrSwitch": 2, | ||
| 113 | "littlePhaseTitle": "证件出示", | ||
| 114 | "littlePhaseTtsContent": "证件出示", | ||
| 115 | "littlePhaseAnswer": "", | ||
| 116 | "littlePhaseImageNameArray": "", | ||
| 117 | "littlePhaseResultCode": 0, | ||
| 118 | "littlePhaseResultMsg": "", | ||
| 119 | "littlePhaseBeginTime": 0, | ||
| 120 | "littlePhaseEndTime": 0, | ||
| 121 | "productCode": "PWL04AQ", | ||
| 122 | "insureSelf": 0, | ||
| 123 | "littlePhaseTTsFinishTime": 0, | ||
| 124 | "passedByMachine": 0, | ||
| 125 | "pdfFileName": "", | ||
| 126 | "docPrdCode": "", | ||
| 127 | "filePopup": 0, | ||
| 128 | "userRole": 0, | ||
| 129 | "littlePhaseFileInfo": null, | ||
| 130 | "name": "", | ||
| 131 | "idCard": "", | ||
| 132 | "idCardType": "", | ||
| 133 | "ipno": "", | ||
| 134 | "remoteSignatureMethod": 0, | ||
| 135 | "offlineSignatureMethod": 0, | ||
| 136 | "remoteSignatureType": 0, | ||
| 137 | "remoteSignaturePrompt": "", | ||
| 138 | "remoteSignatureObject": 0, | ||
| 139 | "remoteSignatureRiskPrompt": "", | ||
| 140 | "offlineSignatureType": 0, | ||
| 141 | "offlineSignaturePrompt": "", | ||
| 142 | "offlineSignatureObject": 0, | ||
| 143 | "offlineSignatureRiskPrompt": "", | ||
| 144 | "remoteVerificationMethod": 0, | ||
| 145 | "offlineVerificationMethod": 0 | ||
| 146 | }, | ||
| 147 | { | ||
| 148 | "oslpId": 368542, | ||
| 149 | "osbpId": 184588, | ||
| 150 | "littlePhaseMp3Name": "368542", | ||
| 151 | "littlePhaseNum": 4, | ||
| 152 | "littlePhaseType": 8, | ||
| 153 | "littlePhaseFileType": 0, | ||
| 154 | "littlePhaseIdCardType": 0, | ||
| 155 | "littlePhaseIdCardOcrSwitch": 0, | ||
| 156 | "littlePhaseTitle": "签字环节", | ||
| 157 | "littlePhaseTtsContent": "签字环节", | ||
| 158 | "littlePhaseAnswer": "", | ||
| 159 | "littlePhaseImageNameArray": "", | ||
| 160 | "littlePhaseResultCode": 0, | ||
| 161 | "littlePhaseResultMsg": "", | ||
| 162 | "littlePhaseBeginTime": 0, | ||
| 163 | "littlePhaseEndTime": 0, | ||
| 164 | "productCode": "PWL04AQ", | ||
| 165 | "insureSelf": 0, | ||
| 166 | "littlePhaseTTsFinishTime": 0, | ||
| 167 | "passedByMachine": 0, | ||
| 168 | "pdfFileName": "", | ||
| 169 | "docPrdCode": "", | ||
| 170 | "filePopup": 0, | ||
| 171 | "userRole": 0, | ||
| 172 | "littlePhaseFileInfo": null, | ||
| 173 | "name": "", | ||
| 174 | "idCard": "", | ||
| 175 | "idCardType": "", | ||
| 176 | "ipno": "", | ||
| 177 | "remoteSignatureMethod": 0, | ||
| 178 | "offlineSignatureMethod": 0, | ||
| 179 | "remoteSignatureType": 0, | ||
| 180 | "remoteSignaturePrompt": "", | ||
| 181 | "remoteSignatureObject": 0, | ||
| 182 | "remoteSignatureRiskPrompt": "", | ||
| 183 | "offlineSignatureType": 0, | ||
| 184 | "offlineSignaturePrompt": "", | ||
| 185 | "offlineSignatureObject": 0, | ||
| 186 | "offlineSignatureRiskPrompt": "", | ||
| 187 | "remoteVerificationMethod": 0, | ||
| 188 | "offlineVerificationMethod": 0 | ||
| 189 | }, | ||
| 190 | { | ||
| 191 | "oslpId": 368543, | ||
| 192 | "osbpId": 184588, | ||
| 193 | "littlePhaseMp3Name": "368543", | ||
| 194 | "littlePhaseNum": 5, | ||
| 195 | "littlePhaseType": 6, | ||
| 196 | "littlePhaseFileType": 0, | ||
| 197 | "littlePhaseIdCardType": 0, | ||
| 198 | "littlePhaseIdCardOcrSwitch": 0, | ||
| 199 | "littlePhaseTitle": "人脸识别环节", | ||
| 200 | "littlePhaseTtsContent": "人脸识别环节", | ||
| 201 | "littlePhaseAnswer": "", | ||
| 202 | "littlePhaseImageNameArray": "", | ||
| 203 | "littlePhaseResultCode": 0, | ||
| 204 | "littlePhaseResultMsg": "", | ||
| 205 | "littlePhaseBeginTime": 0, | ||
| 206 | "littlePhaseEndTime": 0, | ||
| 207 | "productCode": "PWL04AQ", | ||
| 208 | "insureSelf": 0, | ||
| 209 | "littlePhaseTTsFinishTime": 0, | ||
| 210 | "passedByMachine": 0, | ||
| 211 | "pdfFileName": "", | ||
| 212 | "docPrdCode": "", | ||
| 213 | "filePopup": 0, | ||
| 214 | "userRole": 0, | ||
| 215 | "littlePhaseFileInfo": null, | ||
| 216 | "name": "", | ||
| 217 | "idCard": "", | ||
| 218 | "idCardType": "", | ||
| 219 | "ipno": "", | ||
| 220 | "remoteSignatureMethod": 0, | ||
| 221 | "offlineSignatureMethod": 0, | ||
| 222 | "remoteSignatureType": 0, | ||
| 223 | "remoteSignaturePrompt": "", | ||
| 224 | "remoteSignatureObject": 0, | ||
| 225 | "remoteSignatureRiskPrompt": "", | ||
| 226 | "offlineSignatureType": 0, | ||
| 227 | "offlineSignaturePrompt": "", | ||
| 228 | "offlineSignatureObject": 0, | ||
| 229 | "offlineSignatureRiskPrompt": "", | ||
| 230 | "remoteVerificationMethod": 0, | ||
| 231 | "offlineVerificationMethod": 0 | ||
| 232 | } | ||
| 233 | ] | ||
| 234 | } | ||
| 235 | ], | ||
| 236 | "twoPersonDetectList": [], | ||
| 237 | "insureSelf": 2 | ||
| 238 | } | ||
| 239 | } | ||
| ... | \ No newline at end of file | ... | \ No newline at end of file |
data/order/瑞泰.zip
0 → 100644
No preview for this file type
data/order/身份证正面.jpg
0 → 100644
174 KB
report/report.html
0 → 100644
This diff could not be displayed because it is too large.
util/HandleDB.py
0 → 100644
| 1 | #!/usr/bin/env python | ||
| 2 | # -*- coding: utf-8 -*- | ||
| 3 | # @Time : 2021/8/19 上午10:18 | ||
| 4 | # @Author : 付孟奇 | ||
| 5 | |||
| 6 | # 记录所有的数据库信息 | ||
| 7 | '''所有线上数据信息以线上实际为准,本地只维护一个key''' | ||
| 8 | |||
| 9 | |||
| 10 | def dataBaseList(dbName): | ||
| 11 | databaseList = { | ||
| 12 | '中德安联-vdr': {"host": "rm-2zen60zh797n662w4lo.mysql.rds.aliyuncs.com", | ||
| 13 | "port": 3306, | ||
| 14 | "user": "vdr_allianz", | ||
| 15 | "password": "is611Z14$coBWPUyKR12_0d", | ||
| 16 | "db": "vdr_staging_allianz" | ||
| 17 | }, | ||
| 18 | '中美大都会-vdr': {"host": "rm-2zen60zh797n662w4lo.mysql.rds.aliyuncs.com", | ||
| 19 | "port": 3306, | ||
| 20 | "user": "vdr_staging", | ||
| 21 | "password": "5HGKEm!15$_%yYod8wtPC", | ||
| 22 | "db": "vdr_staging" | ||
| 23 | }, | ||
| 24 | '瑞泰-staging': {"host": "rm-2zen60zh797n662w4lo.mysql.rds.aliyuncs.com", | ||
| 25 | "port": 3306, | ||
| 26 | "user": "oldmutuallife_st", | ||
| 27 | "password": "EkKL#qX7j4M110!c17%15Qn", | ||
| 28 | "db": "oldmutuallife_staging" | ||
| 29 | }, | ||
| 30 | '德华安顾-vdr': {"host": "rm-2zen60zh797n662w4lo.mysql.rds.aliyuncs.com", | ||
| 31 | "port": 3306, | ||
| 32 | "user": "vdr_ergolife", | ||
| 33 | "password": "MO19vuPr!15$_%yYe16ohpd12kUJQ518", | ||
| 34 | "db": "vdr-ergolife" | ||
| 35 | }, | ||
| 36 | } | ||
| 37 | # 判断dbName是否存在该环境 | ||
| 38 | if databaseList.get(dbName, 0) != 0: | ||
| 39 | data_base = databaseList[dbName] | ||
| 40 | return data_base | ||
| 41 | else: | ||
| 42 | return None |
util/HandleExcel.py
0 → 100644
| 1 | #!/usr/bin/env python | ||
| 2 | # -*- coding: utf-8 -*- | ||
| 3 | # @Time : 2021/7/16 下午5:38 | ||
| 4 | # @Author : 付孟奇 | ||
| 5 | import xlrd | ||
| 6 | |||
| 7 | ''' | ||
| 8 | Created on 2017-4-26 | ||
| 9 | 读取excel文件,将excle文件里面对应的sheet of addbook数据转换为python 列表对象,其中列表中每一个元素为一个字典 | ||
| 10 | ''' | ||
| 11 | |||
| 12 | |||
| 13 | def excel_to_list(file, tag): | ||
| 14 | """将excel表中数据转换成python对象""" | ||
| 15 | data_list = [] | ||
| 16 | """打开excel文件""" | ||
| 17 | book = xlrd.open_workbook(file) | ||
| 18 | """选择读取sheet工作表""" | ||
| 19 | tag = book.sheet_by_name(tag) | ||
| 20 | """获取行数""" | ||
| 21 | row_num = tag.nrows | ||
| 22 | header = tag.row_values(0) | ||
| 23 | for i in range(1, row_num): | ||
| 24 | """读取行""" | ||
| 25 | row_data = tag.row_values(i) | ||
| 26 | """读取行中的每一列的值""" | ||
| 27 | d = dict(zip(header, row_data)) | ||
| 28 | data_list.append(d) | ||
| 29 | return data_list | ||
| 30 | |||
| 31 | |||
| 32 | """获取测试数据,判断传入的test_name 是否存在,存在则返回一个列表中对应的字典数据""" | ||
| 33 | |||
| 34 | |||
| 35 | # 无效方法 | ||
| 36 | def get_test_data(test_name, test_list): | ||
| 37 | for test_dict in test_list: | ||
| 38 | if test_name == test_dict['test_name']: | ||
| 39 | return test_dict | ||
| 40 | |||
| 41 | |||
| 42 | if __name__ == '__main__': | ||
| 43 | excel_to_list(1, 1) |
util/HandleJenkins.py
0 → 100644
| 1 | #!/usr/bin/env python | ||
| 2 | # -*- coding: utf-8 -*- | ||
| 3 | # @Time : 2021/7/16 下午4:58 | ||
| 4 | # @Author : 付孟奇 | ||
| 5 | |||
| 6 | import sys | ||
| 7 | |||
| 8 | |||
| 9 | def get_config(): | ||
| 10 | config_info = {} | ||
| 11 | # Jenkins参数 | ||
| 12 | if len(sys.argv) > 1: | ||
| 13 | config_info['pro'] = sys.argv[1] | ||
| 14 | config_info['env'] = sys.argv[2] | ||
| 15 | config_info['email'] = sys.argv[3] | ||
| 16 | config_info['title'] = sys.argv[4] | ||
| 17 | else: | ||
| 18 | # 本地兼容 | ||
| 19 | config_info['pro'] = '德华安顾' | ||
| 20 | config_info['env'] = 'vdr' | ||
| 21 | config_info['email'] = 'fumengqi@situdata.com' | ||
| 22 | config_info['title'] = '本地调试' | ||
| 23 | config_info['phone'] = '15737319294' | ||
| 24 | return config_info | ||
| 25 | |||
| 26 | |||
| 27 | config = get_config() |
util/HandleJson.py
0 → 100644
| 1 | #!/usr/bin/env python | ||
| 2 | # -*- coding: utf-8 -*- | ||
| 3 | # @Time : 2021/7/19 下午5:26 | ||
| 4 | # @Author : 付孟奇 | ||
| 5 | |||
| 6 | import json | ||
| 7 | import base64 | ||
| 8 | from config.vendorPath import api_path, global_path | ||
| 9 | |||
| 10 | |||
| 11 | # 格式化存储文件 | ||
| 12 | def file_write(path, data): | ||
| 13 | with open(path, 'w') as f: | ||
| 14 | ev_data = eval(str(data)) | ||
| 15 | json.dump(ev_data, f, indent=4, ensure_ascii=False) | ||
| 16 | |||
| 17 | |||
| 18 | # 读文件内容 | ||
| 19 | # params:文件路径 | ||
| 20 | def file_read(path): | ||
| 21 | with open(path, 'rb') as f: | ||
| 22 | file_data = json.load(f) | ||
| 23 | return file_data | ||
| 24 | |||
| 25 | |||
| 26 | # 从swaggerAPI文件获取接口 | ||
| 27 | # params:接口所属模块,接口描述 | ||
| 28 | def file_readAPI(type, api_id): | ||
| 29 | with open(api_path, 'r') as f: | ||
| 30 | api_data = json.load(f) | ||
| 31 | return api_data[type][api_id]['value'] | ||
| 32 | |||
| 33 | |||
| 34 | # 更新公共参数文件信息 | ||
| 35 | # params:更新字段1[更新字段2],更新值 | ||
| 36 | def file_updata_global(args1, args2, args3): | ||
| 37 | with open(global_path, 'r+') as f: | ||
| 38 | file_data = json.load(f) | ||
| 39 | file_data[args1][args2] = args3 | ||
| 40 | f.seek(0) | ||
| 41 | f.truncate() | ||
| 42 | json.dump(file_data, f, indent=4, ensure_ascii=False) | ||
| 43 | |||
| 44 | |||
| 45 | def file_updata(args1, args2): | ||
| 46 | with open(global_path, 'r+') as f: | ||
| 47 | file_data = json.load(f) | ||
| 48 | file_data[args1] = args2 | ||
| 49 | f.seek(0) | ||
| 50 | f.truncate() | ||
| 51 | json.dump(file_data, f, indent=4, ensure_ascii=False) | ||
| 52 | |||
| 53 | |||
| 54 | # 读取公共参数文件指定内容 | ||
| 55 | # params:文件路径,字段 | ||
| 56 | def file_read_global(args1, args2): | ||
| 57 | with open(global_path, 'r') as f: | ||
| 58 | file_data = json.load(f) | ||
| 59 | datas = file_data[args1][args2] | ||
| 60 | return datas | ||
| 61 | |||
| 62 | |||
| 63 | # 图片转换64 | ||
| 64 | def file_base_64(path): | ||
| 65 | with open(path, 'rb') as f: | ||
| 66 | base64_data = base64.b64encode(f.read()) | ||
| 67 | data = base64_data.decode() | ||
| 68 | return data |
util/HandleRedis.py
0 → 100644
| 1 | #!/usr/bin/env python | ||
| 2 | # -*- coding: utf-8 -*- | ||
| 3 | # @Time : 2021/8/20 下午5:43 | ||
| 4 | # @Author : 付孟奇 | ||
| 5 | |||
| 6 | import redis | ||
| 7 | import json | ||
| 8 | from util.log import logger | ||
| 9 | from util.HandleJenkins import config | ||
| 10 | from config.vendorList import db_40, db_45 | ||
| 11 | |||
| 12 | |||
| 13 | class HandleRedis: | ||
| 14 | def __init__(self): | ||
| 15 | if config['pro'] in db_40: | ||
| 16 | self.db = 40 | ||
| 17 | elif config['pro'] in db_45: | ||
| 18 | self.db = 45 | ||
| 19 | try: | ||
| 20 | self.r = redis.Redis(host='r-2ze79mcysjugilpdskpd.redis.rds.aliyuncs.com', port=6379, db=self.db, | ||
| 21 | password='$ecur1ty', decode_responses=True) | ||
| 22 | except: | ||
| 23 | logger.info('redis连接失败!') | ||
| 24 | |||
| 25 | # 存储为字符串 | ||
| 26 | def set_string(self, k, v): | ||
| 27 | self.r.set(k, json.dumps(v, ensure_ascii=False), ex=8640000) | ||
| 28 | |||
| 29 | def get_string_value(self, k): | ||
| 30 | redis_v = self.r.get(k) | ||
| 31 | return redis_v | ||
| 32 | |||
| 33 | def get_value(self, k): | ||
| 34 | redis_v = json.loads(self.r.get(k)) | ||
| 35 | return redis_v | ||
| 36 | |||
| 37 | |||
| 38 | handle_redis = HandleRedis() | ||
| 39 | |||
| 40 | if __name__ == '__main__': | ||
| 41 | HandleRedis |
util/HandleSql.py
0 → 100644
| 1 | #!/usr/bin/env python | ||
| 2 | # -*- coding: utf-8 -*- | ||
| 3 | # @Time : 2021/8/19 上午10:23 | ||
| 4 | # @Author : 付孟奇 | ||
| 5 | |||
| 6 | from util.HandleJenkins import config | ||
| 7 | from util.HandleDB import dataBaseList | ||
| 8 | from util.log import logger | ||
| 9 | import pymysql | ||
| 10 | |||
| 11 | |||
| 12 | class DBSql: | ||
| 13 | def data_base(self, sqls, fe): | ||
| 14 | env = config['env'] | ||
| 15 | pro = config['pro'] | ||
| 16 | da_list = dataBaseList(pro + '-' + env) | ||
| 17 | try: | ||
| 18 | conn = pymysql.connect(host=da_list['host'], | ||
| 19 | port=da_list['port'], | ||
| 20 | user=da_list['user'], | ||
| 21 | passwd=da_list['password'], | ||
| 22 | db=da_list['db'], | ||
| 23 | cursorclass=pymysql.cursors.DictCursor) | ||
| 24 | with conn.cursor() as cur: | ||
| 25 | logger.info(sqls) | ||
| 26 | cur.execute(sqls) | ||
| 27 | if fe == 'SELECT': | ||
| 28 | result = cur.fetchall() | ||
| 29 | return result | ||
| 30 | elif fe == 'DELETE' or fe == 'UPDATE': | ||
| 31 | conn.commit() | ||
| 32 | cur.close() | ||
| 33 | conn.close() | ||
| 34 | except pymysql.MySQLError as e: | ||
| 35 | logger.error(str(e)) | ||
| 36 | |||
| 37 | # 查询产品ID | ||
| 38 | def select_product(self, args): | ||
| 39 | fe = 'SELECT' | ||
| 40 | sql = '''SELECT * FROM product_library where product_code='%s';''' % (args) | ||
| 41 | result = self.data_base(sql, fe) | ||
| 42 | logger.info(result) | ||
| 43 | if result == (): | ||
| 44 | return None | ||
| 45 | else: | ||
| 46 | productId = result[0]['id'] | ||
| 47 | return productId | ||
| 48 | |||
| 49 | # 删除产品 | ||
| 50 | def delete_product(self, args): | ||
| 51 | fe = 'DELETE' | ||
| 52 | sql = '''DELETE from product_library where product_code='%s';''' % (args) | ||
| 53 | self.data_base(sql, fe) | ||
| 54 | |||
| 55 | # 查询产品附加属性Id | ||
| 56 | def select_attributes(self, args): | ||
| 57 | fe = 'SELECT' | ||
| 58 | sql = '''SELECT * FROM product_additional_attributes_key where keyword='%s';''' % (args) | ||
| 59 | result = self.data_base(sql, fe) | ||
| 60 | logger.info(result) | ||
| 61 | if result == (): | ||
| 62 | return None | ||
| 63 | else: | ||
| 64 | attributes_id = result[0]['id'] | ||
| 65 | return attributes_id | ||
| 66 | |||
| 67 | # 删除产品附加属性 | ||
| 68 | def delete_attributes(self, args): | ||
| 69 | fe = 'DELETE' | ||
| 70 | sql = '''DELETE from product_additional_attributes_key where keyword='%s';''' % (args) | ||
| 71 | self.data_base(sql, fe) | ||
| 72 | |||
| 73 | # 查询上传文件Id | ||
| 74 | def select_file(self, args): | ||
| 75 | fe = 'SELECT' | ||
| 76 | sql = '''select * from order_product_code_file where deleted=0 and file_name='%s';''' % (args) | ||
| 77 | result = self.data_base(sql, fe) | ||
| 78 | logger.info(result) | ||
| 79 | if result == (): | ||
| 80 | return None | ||
| 81 | else: | ||
| 82 | file_id = result[0]['id'] | ||
| 83 | return file_id | ||
| 84 | |||
| 85 | # 查询年龄值 | ||
| 86 | def select_age_value(self, args): | ||
| 87 | fe = 'SELECT' | ||
| 88 | sql = '''select * from quanlity_audit_proportion_conf where id=%s;''' % (args) | ||
| 89 | result = self.data_base(sql, fe) | ||
| 90 | logger.info(result) | ||
| 91 | if result == (): | ||
| 92 | return None | ||
| 93 | else: | ||
| 94 | file_id = result[0]['option_value'] | ||
| 95 | return file_id | ||
| 96 | |||
| 97 | # 查询账号ID | ||
| 98 | def select_user_id(self, args): | ||
| 99 | fe = 'SELECT' | ||
| 100 | sql = '''select * from citic_user where username='%s';''' % (args) | ||
| 101 | result = self.data_base(sql, fe) | ||
| 102 | logger.info(result) | ||
| 103 | if result == (): | ||
| 104 | return None | ||
| 105 | else: | ||
| 106 | file_id = result[0]['id'] | ||
| 107 | return file_id | ||
| 108 | |||
| 109 | # 查询账号绑定角色ID | ||
| 110 | def select_user_role_id(self, args): | ||
| 111 | fe = 'SELECT' | ||
| 112 | sql = '''select * from citic_user_role where user_id=%s;''' % (args) | ||
| 113 | result = self.data_base(sql, fe) | ||
| 114 | logger.info(result) | ||
| 115 | if result == (): | ||
| 116 | return None | ||
| 117 | else: | ||
| 118 | file_id = result[0]['id'] | ||
| 119 | return file_id | ||
| 120 | |||
| 121 | # 删除账号 | ||
| 122 | def delete_user(self, args): | ||
| 123 | fe = 'DELETE' | ||
| 124 | account_id = self.select_user_id(args) | ||
| 125 | user_sql = '''DELETE from citic_user where id=%s;''' % (account_id) | ||
| 126 | user_role_sql = '''DELETE from citic_user_role where user_id=%s;''' % (account_id) | ||
| 127 | self.data_base(user_sql, fe) | ||
| 128 | self.data_base(user_role_sql, fe) | ||
| 129 | |||
| 130 | # 查询话术ID | ||
| 131 | def select_pahse(self, args): | ||
| 132 | fe = 'SELECT' | ||
| 133 | sql = '''SELECT * FROM speech_template_library WHERE speech_name='%s';''' % (args) | ||
| 134 | result = self.data_base(sql, fe) | ||
| 135 | logger.info(result) | ||
| 136 | if result == (): | ||
| 137 | return None | ||
| 138 | else: | ||
| 139 | file_id = result[0]['id'] | ||
| 140 | return file_id | ||
| 141 | |||
| 142 | # 删除话术内容 | ||
| 143 | def delete_phase(self, args): | ||
| 144 | fe = 'DELETE' | ||
| 145 | sql_1 = '''DELETE FROM speech_template_library where id=%s;''' % (args) | ||
| 146 | sql_2 = '''DELETE FROM speech_big_phase where stl_id=%s;''' % (args) | ||
| 147 | sql_3 = '''DELETE FROM speech_little_phase where stl_id=%s;''' % (args) | ||
| 148 | sql_4 = '''DELETE FROM speech_take_effect_rule where stl_id=%s;''' % (args) | ||
| 149 | sql_5 = '''DELETE FROM speech_take_effect_age_condition where stl_id=%s;''' % (args) | ||
| 150 | sql_6 = '''DELETE FROM speech_take_effect_channel_condition where stl_id=%s;''' % (args) | ||
| 151 | sql_7 = '''DELETE FROM speech_take_effect_organization_condition where stl_id=%s;''' % (args) | ||
| 152 | self.data_base(sql_1, fe) | ||
| 153 | self.data_base(sql_2, fe) | ||
| 154 | self.data_base(sql_3, fe) | ||
| 155 | self.data_base(sql_4, fe) | ||
| 156 | self.data_base(sql_5, fe) | ||
| 157 | self.data_base(sql_6, fe) | ||
| 158 | self.data_base(sql_7, fe) | ||
| 159 | |||
| 160 | # 更新订单锁状态 | ||
| 161 | def update_order_status(self, args): | ||
| 162 | fe = 'UPDATE' | ||
| 163 | sql = '''update order_base_info set lock_order=2 where id='%s';''' % (args) | ||
| 164 | self.data_base(sql, fe) | ||
| 165 | |||
| 166 | # 查询订单入件信息 | ||
| 167 | def select_extra_info(self, args): | ||
| 168 | fe = 'SELECT' | ||
| 169 | sql = '''SELECT * FROM order_base_info WHERE id=%s;''' % (args) | ||
| 170 | result = self.data_base(sql, fe) | ||
| 171 | if result == (): | ||
| 172 | return None | ||
| 173 | else: | ||
| 174 | res = result[0]['extra_info'] | ||
| 175 | return res | ||
| 176 | |||
| 177 | |||
| 178 | db_sql = DBSql() | ||
| 179 | |||
| 180 | if __name__ == '__main__': | ||
| 181 | # db_sql.delete_user('apiappuser') | ||
| 182 | # db_sql.delete_user('apiwebuser') | ||
| 183 | # db_sql.delete_phase(1030) | ||
| 184 | # db_sql.select_user_id('apiwebuser') | ||
| 185 | db_sql.delete_product('apitest') |
util/HandleTime.py
0 → 100644
| 1 | #!/usr/bin/env python | ||
| 2 | # -*- coding: utf-8 -*- | ||
| 3 | # @Time : 2021/8/18 上午10:59 | ||
| 4 | # @Author : 付孟奇 | ||
| 5 | import time | ||
| 6 | import uuid | ||
| 7 | from datetime import datetime | ||
| 8 | |||
| 9 | |||
| 10 | class HandleTime: | ||
| 11 | # 时间戳 | ||
| 12 | def timeStamp_10(self): | ||
| 13 | timeArray = int(time.time()) | ||
| 14 | return str(timeArray) | ||
| 15 | |||
| 16 | def timeStamp_13(self): | ||
| 17 | timeArray = int(time.time() * 1000) | ||
| 18 | return str(timeArray) | ||
| 19 | |||
| 20 | def timeTime(self): | ||
| 21 | dt = datetime.now() | ||
| 22 | times = dt.strftime("%Y-%m-%d %H:%M:%S") | ||
| 23 | return times | ||
| 24 | |||
| 25 | def timeTimeYMD(self): | ||
| 26 | dt = datetime.now() | ||
| 27 | times = dt.strftime("%Y-%m-%d") | ||
| 28 | return times | ||
| 29 | |||
| 30 | def taskId(self): | ||
| 31 | uid = str(uuid.uuid4()) | ||
| 32 | suid = ''.join(uid.split('-')) | ||
| 33 | return suid | ||
| 34 | |||
| 35 | |||
| 36 | handle_time = HandleTime() | ||
| 37 | |||
| 38 | if __name__ == '__main__': | ||
| 39 | a = handle_time.taskId() | ||
| 40 | print(a) | ||
| 41 | print(type(a)) |
util/com_list.py
0 → 100644
| 1 | #!/usr/bin/env python | ||
| 2 | # -*- coding: utf-8 -*- | ||
| 3 | # @Time : 2021/8/12 下午4:59 | ||
| 4 | # @Author : 付孟奇 | ||
| 5 | '''一些小公共方法的集合''' | ||
| 6 | |||
| 7 | from util.HandleJenkins import config | ||
| 8 | |||
| 9 | |||
| 10 | def login_type_choose(): | ||
| 11 | typq_1 = ['德华安顾'] | ||
| 12 | typq_2 = ['瑞泰'] | ||
| 13 | typq_3 = ['中美大都会'] | ||
| 14 | if config['pro'] in typq_1: | ||
| 15 | login_type = 1 | ||
| 16 | elif config['pro'] in typq_2: | ||
| 17 | login_type = 2 | ||
| 18 | else: | ||
| 19 | login_type = 3 | ||
| 20 | return login_type | ||
| 21 | |||
| 22 | |||
| 23 | if __name__ == '__main__': | ||
| 24 | print(login_type_choose()) |
util/firstLogin.py
0 → 100644
| 1 | #!/usr/bin/env python | ||
| 2 | # -*- coding: utf-8 -*- | ||
| 3 | # @Time : 2021/8/20 下午2:38 | ||
| 4 | # @Author : 付孟奇 | ||
| 5 | |||
| 6 | from config.vendorHost import vendor_host | ||
| 7 | from config import vendorList | ||
| 8 | from util.HandleJson import file_readAPI, file_updata_global | ||
| 9 | from util.HandleJenkins import config | ||
| 10 | from util.log import logger | ||
| 11 | import requests | ||
| 12 | |||
| 13 | |||
| 14 | def FirstLogin(): | ||
| 15 | api_type = 'sys' | ||
| 16 | headers = { | ||
| 17 | 'Content-Type': 'application/json' | ||
| 18 | } | ||
| 19 | if config['pro'] in vendorList.web_login_1: | ||
| 20 | payload = {"username": 'cs01', "password": 'situ1234'} | ||
| 21 | |||
| 22 | url = vendor_host + api_type + file_readAPI(api_type, 'webLoginUsingPOST') | ||
| 23 | response = requests.request('POST', url, headers=headers, json=payload) | ||
| 24 | |||
| 25 | if response.status_code is 200: | ||
| 26 | res = response.json() | ||
| 27 | logger.info(str(res)) | ||
| 28 | login_token = res['result']['token'] | ||
| 29 | file_updata_global('web_login', 'token', login_token) | ||
| 30 | else: | ||
| 31 | login_token = None | ||
| 32 | logger.error(str(response.text)) | ||
| 33 | return login_token | ||
| 34 | |||
| 35 | |||
| 36 | if __name__ == '__main__': | ||
| 37 | FirstLogin() |
util/generate.py
0 → 100644
| 1 | #!/usr/bin/env python | ||
| 2 | # -*- coding: utf-8 -*- | ||
| 3 | # @Time : 2021/7/16 下午5:37 | ||
| 4 | # @Author : 付孟奇 | ||
| 5 | |||
| 6 | import os | ||
| 7 | from util import HandleExcel | ||
| 8 | from config.vendorPath import excel_path | ||
| 9 | |||
| 10 | |||
| 11 | # 类的实例、被测试的接口名称、测试数据文件名、测试数据表单名称 | ||
| 12 | def generateTestCases(instanse, inerfaceName, tesDataName, sheetName): | ||
| 13 | # 合成Excel文件路径 | ||
| 14 | file_path = os.path.join(excel_path, tesDataName) | ||
| 15 | # 读取Excel指定接口的执行case | ||
| 16 | data_list = HandleExcel.excel_to_list(file_path, sheetName) | ||
| 17 | |||
| 18 | for i in range(len(data_list)): | ||
| 19 | setattr(instanse, 'test_' + inerfaceName + '_%s' % (str(data_list[i]["tc_num"])), | ||
| 20 | instanse.getTestFunc(data_list[i])) | ||
| 21 | func_name = 'test_' + inerfaceName + '_%s' % (str(data_list[i]["tc_num"])) | ||
| 22 | func_attr = getattr(instanse, func_name) | ||
| 23 | func_attr.__doc__ = str(data_list[i]["tc_name"]) | ||
| 24 | |||
| 25 | |||
| 26 | def getTestCase(tesDataName, sheetName): | ||
| 27 | # 合成Excel文件路径 | ||
| 28 | file_path = os.path.join(excel_path, tesDataName) | ||
| 29 | # 读取Excel指定接口的执行case | ||
| 30 | data_list = HandleExcel.excel_to_list(file_path, sheetName) | ||
| 31 | |||
| 32 | return data_list |
util/getSuitCase.py
0 → 100644
| 1 | #!/usr/bin/env python | ||
| 2 | # -*- coding: utf-8 -*- | ||
| 3 | # @Time : 2021/7/26 下午7:05 | ||
| 4 | # @Author : 付孟奇 | ||
| 5 | |||
| 6 | '''自动导入类,暂时放弃''' | ||
| 7 | |||
| 8 | from util.HandleJson import file_read | ||
| 9 | from util.log import logger | ||
| 10 | from config.vendorPath import case_list_path | ||
| 11 | import unittest, os | ||
| 12 | |||
| 13 | |||
| 14 | def find_class(): | ||
| 15 | # 1、获取项目可执行case | ||
| 16 | result = file_read(case_list_path) | ||
| 17 | caseTrue_list = [] | ||
| 18 | case_list = [] | ||
| 19 | for k, v in result.items(): | ||
| 20 | if v == 'True': | ||
| 21 | caseTrue_list.append(k + '.py') | ||
| 22 | logger.info('所有可执行的case文件名为:' + str(caseTrue_list)) | ||
| 23 | # 2、动态导入所有case | ||
| 24 | for case in caseTrue_list: | ||
| 25 | testScript = os.path.join('./SITUAPIAutomation/case/', case) | ||
| 26 | srcript_dir = os.path.dirname(testScript) | ||
| 27 | srcrpit_path = ".".join(srcript_dir.split("/")[2:]) | ||
| 28 | path = "from " + srcrpit_path + " import " | ||
| 29 | exec_str = path + case[:-3] | ||
| 30 | exec(exec_str, globals()) | ||
| 31 | case = "%s.%s('%s')" % (case[:-3], case[:-3], "testFunc") | ||
| 32 | case_list.append(case) | ||
| 33 | return case_list | ||
| 34 | |||
| 35 | |||
| 36 | def get_suit(): | ||
| 37 | cases = find_class() | ||
| 38 | suite = unittest.TestSuite() | ||
| 39 | for case in cases: | ||
| 40 | suite.addTest(eval(case)) | ||
| 41 | return suite | ||
| 42 | |||
| 43 | |||
| 44 | if __name__ == '__main__': | ||
| 45 | find_class() |
util/log.py
0 → 100755
| 1 | #!/usr/bin/env python | ||
| 2 | # -*- coding: utf-8 -*- | ||
| 3 | # @Time : 2021/7/16 下午4:38 | ||
| 4 | # @Author : 付孟奇 | ||
| 5 | |||
| 6 | import logging | ||
| 7 | from config.vendorPath import log_path | ||
| 8 | |||
| 9 | |||
| 10 | class Log: | ||
| 11 | def __printconsole(self, level, message): | ||
| 12 | # 创建一个logger | ||
| 13 | logger = logging.getLogger() | ||
| 14 | logger.setLevel(logging.DEBUG) | ||
| 15 | # 创建一个handler,用于写入日志文件 | ||
| 16 | fh = logging.FileHandler(log_path, 'a', encoding='utf-8') | ||
| 17 | fh.setLevel(logging.DEBUG) | ||
| 18 | # 再创建一个handler,用于输出到控制台 | ||
| 19 | ch = logging.StreamHandler() | ||
| 20 | ch.setLevel(logging.DEBUG) | ||
| 21 | # 定义handler的输出格式 | ||
| 22 | formatter = logging.Formatter('%(asctime)s - %(name)s - %(levelname)s - %(message)s') | ||
| 23 | fh.setFormatter(formatter) | ||
| 24 | ch.setFormatter(formatter) | ||
| 25 | # 给logger添加handler | ||
| 26 | logger.addHandler(fh) | ||
| 27 | logger.addHandler(ch) | ||
| 28 | # 记录一条日志 | ||
| 29 | if level == 'info': | ||
| 30 | logger.info(message) | ||
| 31 | elif level == 'debug': | ||
| 32 | logger.debug(message) | ||
| 33 | elif level == 'warning': | ||
| 34 | logger.warning(message) | ||
| 35 | elif level == 'error': | ||
| 36 | logger.error(message) | ||
| 37 | logger.removeHandler(ch) | ||
| 38 | logger.removeHandler(fh) | ||
| 39 | # 关闭打开的文件 | ||
| 40 | fh.close() | ||
| 41 | |||
| 42 | def debug(self, message): | ||
| 43 | self.__printconsole('debug', message) | ||
| 44 | |||
| 45 | def info(self, message): | ||
| 46 | self.__printconsole('info', message) | ||
| 47 | |||
| 48 | def warning(self, message): | ||
| 49 | self.__printconsole('warning', message) | ||
| 50 | |||
| 51 | def error(self, message): | ||
| 52 | self.__printconsole('error', message) | ||
| 53 | |||
| 54 | |||
| 55 | logger = Log() | ||
| 56 | |||
| 57 | if __name__ == '__main__': | ||
| 58 | logger.info('11111') |
util/swaggerApi.py
0 → 100644
| 1 | #!/usr/bin/env python | ||
| 2 | # -*- coding: utf-8 -*- | ||
| 3 | # @Time : 2021/7/19 下午2:45 | ||
| 4 | # @Author : 付孟奇 | ||
| 5 | |||
| 6 | import os | ||
| 7 | import requests | ||
| 8 | from util.HandleJson import file_write | ||
| 9 | from config.vendorPath import api_path | ||
| 10 | from config.vendorHost import vendor_host | ||
| 11 | |||
| 12 | |||
| 13 | class SwaggerApi: | ||
| 14 | def __init__(self): | ||
| 15 | self.host = vendor_host | ||
| 16 | self.api_type = {} | ||
| 17 | url_type = ['re', 'cl', 'qa', 'sys'] | ||
| 18 | for i in url_type: | ||
| 19 | self.api_msg = {} | ||
| 20 | swagger_url = os.path.join(os.path.join(self.host, i), 'v2/api-docs') | ||
| 21 | res_api = requests.get(swagger_url).json() | ||
| 22 | data_paths = res_api['paths'] # 获取swagger中所有接口的信息 | ||
| 23 | self.api_type[i] = self.api_msg | ||
| 24 | for k, v in data_paths.items(): | ||
| 25 | self.api_msg_v = {} | ||
| 26 | for _k, _v in v.items(): | ||
| 27 | self.api_msg_v['des'] = _v['summary'] | ||
| 28 | self.api_msg_v['value'] = str(k) | ||
| 29 | self.api_msg[_v['operationId']] = self.api_msg_v | ||
| 30 | file_write(api_path, self.api_type) | ||
| 31 | |||
| 32 | |||
| 33 | swaggerApi = SwaggerApi() | ||
| 34 | if __name__ == '__main__': | ||
| 35 | swaggerApi |
-
Please register or sign in to post a comment