Commit 0417f0bd authored by 周念东's avatar 周念东
Browse files

用例优化

parent b482b0b3
# -*- encoding=utf8 -*-
__author__ = "zhouniandong"
"""
case_tag:cmdc_api,cmdc上报植入后台获取范围数据,2293,2293-3,sit,bs
主数据平台:上报植入接口
"""
from common.common_func import commonFuc
from air_case.cmdc_login.后台管理系统登录.后台管理系统登录 import CmdcDoLogin
import requests
import json
module = "cmdc_reportbill"
url = commonFuc().get_api_url() + commonFuc().get_business_data(module, "url9")
print(url)
# 获取登录所需账号密码
username = commonFuc().get_business_data(module, "username")
password = commonFuc().get_business_data(module, "password")
# 获取登录后Cmdc_access_token
cmdc_access_token = CmdcDoLogin(username, password).get_token()
headers = commonFuc().get_business_data(module, "json_headers", cmdc_access_token)
request_body = commonFuc().get_business_data(module, "payload9")
"""
场景:上报植入()
用例名称:上报植入后台获取范围数据(上报植入)
输出:{"success":true,"code":"200","message":"OK"}
"""
# 发送请求
result = requests.post(url, json=request_body, headers=headers)
#print("\033[031mresult1============\033[0m",result)
result = json.loads(result.content)
#print("\033[031mresult2============\033[0m",result)
# 获取预期结果
check_dict = commonFuc().get_business_data(module, "checkDict9")
print("\033[031mcheck_dict============\033[0m",check_dict)
# 断言实际结果中是否包含预期结果的内容
commonFuc().check_result(check_dict, result)
# -*- encoding=utf8 -*-
__author__ = "zhouniandong"
"""
case_tag:cmdc_api,cmdc上报植入批量上报上报删除,2293,2293-3,sit,bs
主数据平台:上报植入接口
"""
from common.common_func import commonFuc
from air_case.cmdc_login.后台管理系统登录.后台管理系统登录 import CmdcDoLogin
import requests
import json
module = "cmdc_reportbill"
url = commonFuc().get_api_url() + commonFuc().get_business_data(module, "url13")
print(url)
# 获取登录所需账号密码
username = commonFuc().get_business_data(module, "username")
password = commonFuc().get_business_data(module, "password")
# 获取登录后Cmdc_access_token
cmdc_access_token = CmdcDoLogin(username, password).get_token()
headers = commonFuc().get_business_data(module, "json_headers", cmdc_access_token)
request_body = commonFuc().get_business_data(module, "payload13")
"""
场景:上报植入()
用例名称:上报植入批量上报上报删除(上报植入)
输出:{"success":true,"code":"200","message":"OK"}
"""
# 发送请求
result = requests.post(url, json=request_body, headers=headers)
#print("\033[031mresult1============\033[0m",result)
result = json.loads(result.content)
#print("\033[031mresult2============\033[0m",result)
# 获取预期结果
check_dict = commonFuc().get_business_data(module, "checkDict13")
print("\033[031mcheck_dict============\033[0m",check_dict)
# 断言实际结果中是否包含预期结果的内容
commonFuc().check_result(check_dict, result)
# -*- encoding=utf8 -*-
__author__ = "zhouniandong"
"""
case_tag:cmdc_api,cmdc上报植入批量上报厂家,2293,2293-3,sit,bs
主数据平台:上报植入接口
"""
from common.common_func import commonFuc
from air_case.cmdc_login.后台管理系统登录.后台管理系统登录 import CmdcDoLogin
import requests
import json
module = "cmdc_reportbill"
url = commonFuc().get_api_url() + commonFuc().get_business_data(module, "url12")
print(url)
# 获取登录所需账号密码
username = commonFuc().get_business_data(module, "username")
password = commonFuc().get_business_data(module, "password")
# 获取登录后Cmdc_access_token
cmdc_access_token = CmdcDoLogin(username, password).get_token()
headers = commonFuc().get_business_data(module, "json_headers", cmdc_access_token)
request_body = commonFuc().get_business_data(module, "payload12")
"""
场景:上报植入()
用例名称:上报植入批量上报厂家(上报植入)
输出:{"success":true,"code":"200","message":"OK"}
"""
# 发送请求
result = requests.post(url, json=request_body, headers=headers)
#print("\033[031mresult1============\033[0m",result)
result = json.loads(result.content)
#print("\033[031mresult2============\033[0m",result)
# 获取预期结果
check_dict = commonFuc().get_business_data(module, "checkDict12")
print("\033[031mcheck_dict============\033[0m",check_dict)
# 断言实际结果中是否包含预期结果的内容
commonFuc().check_result(check_dict, result)
# -*- encoding=utf8 -*-
__author__ = "zhouniandong"
"""
case_tag:cmdc_api,cmdc上报植入批量审核上报数据,2293,2293-3,sit,bs
主数据平台:上报植入接口
"""
from common.common_func import commonFuc
from air_case.cmdc_login.后台管理系统登录.后台管理系统登录 import CmdcDoLogin
import requests
import json
module = "cmdc_reportbill"
url = commonFuc().get_api_url() + commonFuc().get_business_data(module, "url11")
print(url)
# 获取登录所需账号密码
username = commonFuc().get_business_data(module, "username")
password = commonFuc().get_business_data(module, "password")
# 获取登录后Cmdc_access_token
cmdc_access_token = CmdcDoLogin(username, password).get_token()
headers = commonFuc().get_business_data(module, "json_headers", cmdc_access_token)
request_body = commonFuc().get_business_data(module, "payload11")
"""
场景:上报植入()
用例名称:上报植入批量审核上报数据(上报植入)
输出:{"success":true,"code":"200","message":"OK"}
"""
# 发送请求
result = requests.post(url, json=request_body, headers=headers)
#print("\033[031mresult1============\033[0m",result)
result = json.loads(result.content)
#print("\033[031mresult2============\033[0m",result)
# 获取预期结果
check_dict = commonFuc().get_business_data(module, "checkDict11")
print("\033[031mcheck_dict============\033[0m",check_dict)
# 断言实际结果中是否包含预期结果的内容
commonFuc().check_result(check_dict, result)
# -*- encoding=utf8 -*-
__author__ = "zhouniandong"
"""
case_tag:cmdc_api,cmdc上报植入批量新增数据植入生产批号,2293,2293-3,sit,bs
主数据平台:上报植入接口
"""
from common.common_func import commonFuc
from air_case.cmdc_login.后台管理系统登录.后台管理系统登录 import CmdcDoLogin
import requests
import json
module = "cmdc_reportbill"
url = commonFuc().get_api_url() + commonFuc().get_business_data(module, "url23")
print(url)
# 获取登录所需账号密码
username = commonFuc().get_business_data(module, "username")
password = commonFuc().get_business_data(module, "password")
# 获取登录后Cmdc_access_token
cmdc_access_token = CmdcDoLogin(username, password).get_token()
headers = commonFuc().get_business_data(module, "json_headers", cmdc_access_token)
request_body = commonFuc().get_business_data(module, "payload23")
"""
场景:上报植入()
用例名称:上报植入批量新增数据植入生产批号(上报植入)
输出:{"success":true,"code":"200","message":"OK"}
"""
# 发送请求
result = requests.post(url, json=request_body, headers=headers)
#print("\033[031mresult1============\033[0m",result)
result = json.loads(result.content)
#print("\033[031mresult2============\033[0m",result)
# 获取预期结果
check_dict = commonFuc().get_business_data(module, "checkDict23")
print("\033[031mcheck_dict============\033[0m",check_dict)
# 断言实际结果中是否包含预期结果的内容
commonFuc().check_result(check_dict, result)
# -*- encoding=utf8 -*-
__author__ = "zhouniandong"
"""
case_tag:cmdc_api,cmdc上报植入数据导出,2293,2293-3,sit,bs
主数据平台:上报植入接口
"""
from common.common_func import commonFuc
from air_case.cmdc_login.后台管理系统登录.后台管理系统登录 import CmdcDoLogin
import requests
import json
module = "cmdc_reportbill"
url = commonFuc().get_api_url() + commonFuc().get_business_data(module, "url16")
print(url)
# 获取登录所需账号密码
username = commonFuc().get_business_data(module, "username")
password = commonFuc().get_business_data(module, "password")
# 获取登录后Cmdc_access_token
cmdc_access_token = CmdcDoLogin(username, password).get_token()
headers = commonFuc().get_business_data(module, "json_headers", cmdc_access_token)
request_body = commonFuc().get_business_data(module, "payload16")
"""
场景:上报植入()
用例名称:上报植入数据导出(上报植入)
输出:{"success":true,"code":"200","message":"OK"}
"""
# 发送请求
result = requests.post(url, json=request_body, headers=headers)
#print("\033[031mresult1============\033[0m",result)
result = json.loads(result.content)
#print("\033[031mresult2============\033[0m",result)
# 获取预期结果
check_dict = commonFuc().get_business_data(module, "checkDict16")
print("\033[031mcheck_dict============\033[0m",check_dict)
# 断言实际结果中是否包含预期结果的内容
commonFuc().check_result(check_dict, result)
# -*- encoding=utf8 -*-
__author__ = "zhouniandong"
"""
case_tag:cmdc_api,cmdc上报植入生产批号列表,2293,2293-3,sit,bs
主数据平台:上报植入接口
"""
from common.common_func import commonFuc
from air_case.cmdc_login.后台管理系统登录.后台管理系统登录 import CmdcDoLogin
import requests
import json
module = "cmdc_reportbill"
url = commonFuc().get_api_url() + commonFuc().get_business_data(module, "url25")
print(url)
# 获取登录所需账号密码
username = commonFuc().get_business_data(module, "username")
password = commonFuc().get_business_data(module, "password")
# 获取登录后Cmdc_access_token
cmdc_access_token = CmdcDoLogin(username, password).get_token()
headers = commonFuc().get_business_data(module, "json_headers", cmdc_access_token)
request_body = commonFuc().get_business_data(module, "payload25")
"""
场景:上报植入()
用例名称:上报植入生产批号列表(上报植入)
输出:{"success":true,"code":"200","message":"OK"}
"""
# 发送请求
result = requests.post(url, json=request_body, headers=headers)
#print("\033[031mresult1============\033[0m",result)
result = json.loads(result.content)
#print("\033[031mresult2============\033[0m",result)
# 获取预期结果
check_dict = commonFuc().get_business_data(module, "checkDict25")
print("\033[031mcheck_dict============\033[0m",check_dict)
# 断言实际结果中是否包含预期结果的内容
commonFuc().check_result(check_dict, result)
# -*- encoding=utf8 -*-
__author__ = "zhouniandong"
"""
case_tag:cmdc_api,cmdc上报植入获取上报植入统计数量,2293,2293-3,sit,bs
主数据平台:上报植入接口
"""
from common.common_func import commonFuc
from air_case.cmdc_login.后台管理系统登录.后台管理系统登录 import CmdcDoLogin
import requests
import json
module = "cmdc_reportbill"
url = commonFuc().get_api_url() + commonFuc().get_business_data(module, "url14")
print(url)
# 获取登录所需账号密码
username = commonFuc().get_business_data(module, "username")
password = commonFuc().get_business_data(module, "password")
# 获取登录后Cmdc_access_token
cmdc_access_token = CmdcDoLogin(username, password).get_token()
headers = commonFuc().get_business_data(module, "json_headers", cmdc_access_token)
request_body = commonFuc().get_business_data(module, "payload14")
"""
场景:上报植入()
用例名称:上报植入获取上报植入统计数量(上报植入)
输出:{"success":true,"code":"200","message":"OK"}
"""
# 发送请求
result = requests.post(url, json=request_body, headers=headers)
#print("\033[031mresult1============\033[0m",result)
result = json.loads(result.content)
#print("\033[031mresult2============\033[0m",result)
# 获取预期结果
check_dict = commonFuc().get_business_data(module, "checkDict14")
print("\033[031mcheck_dict============\033[0m",check_dict)
# 断言实际结果中是否包含预期结果的内容
commonFuc().check_result(check_dict, result)
# -*- encoding=utf8 -*-
__author__ = "zhouniandong"
"""
case_tag:cmdc_api,cmdc上报植入获取单条范围数据,2293,2293-3,sit,bs
主数据平台:上报植入接口
"""
from common.common_func import commonFuc
from air_case.cmdc_login.后台管理系统登录.后台管理系统登录 import CmdcDoLogin
import requests
import json
module = "cmdc_reportbill"
url = commonFuc().get_api_url() + commonFuc().get_business_data(module, "url15")
print(url)
# 获取登录所需账号密码
username = commonFuc().get_business_data(module, "username")
password = commonFuc().get_business_data(module, "password")
# 获取登录后Cmdc_access_token
cmdc_access_token = CmdcDoLogin(username, password).get_token()
headers = commonFuc().get_business_data(module, "json_headers", cmdc_access_token)
request_body = commonFuc().get_business_data(module, "payload15")
"""
场景:上报植入()
用例名称:上报植入获取单条范围数据(上报植入)
输出:{"success":true,"code":"200","message":"OK"}
"""
# 发送请求
result = requests.post(url, json=request_body, headers=headers)
#print("\033[031mresult1============\033[0m",result)
result = json.loads(result.content)
#print("\033[031mresult2============\033[0m",result)
# 获取预期结果
check_dict = commonFuc().get_business_data(module, "checkDict15")
print("\033[031mcheck_dict============\033[0m",check_dict)
# 断言实际结果中是否包含预期结果的内容
commonFuc().check_result(check_dict, result)
# -*- encoding=utf8 -*-
__author__ = "zhouniandong"
"""
case_tag:cmdc_api,cmdc上报植入获取新增植入产品线下拉数据,2293,2293-3,sit,bs
主数据平台:上报植入接口
"""
from common.common_func import commonFuc
from air_case.cmdc_login.后台管理系统登录.后台管理系统登录 import CmdcDoLogin
import requests
import json
module = "cmdc_reportbill"
url = commonFuc().get_api_url() + commonFuc().get_business_data(module, "url18")
print(url)
# 获取登录所需账号密码
username = commonFuc().get_business_data(module, "username")
password = commonFuc().get_business_data(module, "password")
# 获取登录后Cmdc_access_token
cmdc_access_token = CmdcDoLogin(username, password).get_token()
headers = commonFuc().get_business_data(module, "json_headers", cmdc_access_token)
request_body = commonFuc().get_business_data(module, "payload18")
"""
场景:上报植入()
用例名称:上报植入获取新增植入产品线下拉数据(上报植入)
输出:{"success":true,"code":"200","message":"OK"}
"""
# 发送请求
result = requests.post(url, json=request_body, headers=headers)
#print("\033[031mresult1============\033[0m",result)
result = json.loads(result.content)
#print("\033[031mresult2============\033[0m",result)
# 获取预期结果
check_dict = commonFuc().get_business_data(module, "checkDict18")
print("\033[031mcheck_dict============\033[0m",check_dict)
# 断言实际结果中是否包含预期结果的内容
commonFuc().check_result(check_dict, result)
# -*- encoding=utf8 -*-
__author__ = "zhouniandong"
"""
case_tag:cmdc_api,cmdc上报植入获取植入列表产品线下拉列表数据,2293,2293-3,sit,bs
主数据平台:上报植入接口
"""
from common.common_func import commonFuc
from air_case.cmdc_login.后台管理系统登录.后台管理系统登录 import CmdcDoLogin
import requests
import json
module = "cmdc_reportbill"
url = commonFuc().get_api_url() + commonFuc().get_business_data(module, "url19")
print(url)
# 获取登录所需账号密码
username = commonFuc().get_business_data(module, "username")
password = commonFuc().get_business_data(module, "password")
# 获取登录后Cmdc_access_token
cmdc_access_token = CmdcDoLogin(username, password).get_token()
headers = commonFuc().get_business_data(module, "json_headers", cmdc_access_token)
request_body = commonFuc().get_business_data(module, "payload19")
"""
场景:上报植入()
用例名称:上报植入获取植入列表产品线下拉列表数据(上报植入)
输出:{"success":true,"code":"200","message":"OK"}
"""
# 发送请求
result = requests.get(url, json=request_body, headers=headers)
#print("\033[031mresult1============\033[0m",result)
result = json.loads(result.content)
#print("\033[031mresult2============\033[0m",result)
# 获取预期结果
check_dict = commonFuc().get_business_data(module, "checkDict19")
print("\033[031mcheck_dict============\033[0m",check_dict)
# 断言实际结果中是否包含预期结果的内容
commonFuc().check_result(check_dict, result)
# -*- encoding=utf8 -*-
__author__ = "zhouniandong"
"""
case_tag:cmdc_api,cmdc上报植入获取站点商品,2293,2293-3,sit,bs
主数据平台:上报植入接口
"""
from common.common_func import commonFuc
from air_case.cmdc_login.后台管理系统登录.后台管理系统登录 import CmdcDoLogin
import requests
import json
module = "cmdc_reportbill"
url = commonFuc().get_api_url() + commonFuc().get_business_data(module, "url22")
print(url)
# 获取登录所需账号密码
username = commonFuc().get_business_data(module, "username")
password = commonFuc().get_business_data(module, "password")
# 获取登录后Cmdc_access_token
cmdc_access_token = CmdcDoLogin(username, password).get_token()
headers = commonFuc().get_business_data(module, "json_headers", cmdc_access_token)
request_body = commonFuc().get_business_data(module, "payload22")
"""
场景:上报植入()
用例名称:上报植入获取站点商品(上报植入)
输出:{"success":true,"code":"200","message":"OK"}
"""
# 发送请求
result = requests.get(url, json=request_body, headers=headers)
#print("\033[031mresult1============\033[0m",result)
result = json.loads(result.content)
#print("\033[031mresult2============\033[0m",result)
# 获取预期结果
check_dict = commonFuc().get_business_data(module, "checkDict22")
print("\033[031mcheck_dict============\033[0m",check_dict)
# 断言实际结果中是否包含预期结果的内容
commonFuc().check_result(check_dict, result)
# -*- encoding=utf8 -*-
__author__ = "zhouniandong"
"""
case_tag:cmdc_api,cmdc上报植入行项修改,2293,2293-3,sit,bs
主数据平台:上报植入接口
"""
from common.common_func import commonFuc
from air_case.cmdc_login.后台管理系统登录.后台管理系统登录 import CmdcDoLogin
import requests
import json
module = "cmdc_reportbill"
url = commonFuc().get_api_url() + commonFuc().get_business_data(module, "url10")
print(url)
# 获取登录所需账号密码
username = commonFuc().get_business_data(module, "username")
password = commonFuc().get_business_data(module, "password")
# 获取登录后Cmdc_access_token
cmdc_access_token = CmdcDoLogin(username, password).get_token()
headers = commonFuc().get_business_data(module, "json_headers", cmdc_access_token)
request_body = commonFuc().get_business_data(module, "payload10")
"""
场景:上报植入()
用例名称:上报植入行项修改(上报植入)
输出:{"success":true,"code":"200","message":"OK"}
"""
# 发送请求
result = requests.post(url, json=request_body, headers=headers)
#print("\033[031mresult1============\033[0m",result)
result = json.loads(result.content)
#print("\033[031mresult2============\033[0m",result)
# 获取预期结果
check_dict = commonFuc().get_business_data(module, "checkDict10")
print("\033[031mcheck_dict============\033[0m",check_dict)
# 断言实际结果中是否包含预期结果的内容
commonFuc().check_result(check_dict, result)
# -*- encoding=utf8 -*-
__author__ = "zhouniandong"
"""
case_tag:cmdc_api,cmdc数据植入生产批号列表,2293,2293-3,sit,bs
主数据平台:上报植入接口
"""
from common.common_func import commonFuc
from air_case.cmdc_login.后台管理系统登录.后台管理系统登录 import CmdcDoLogin
import requests
import json
module = "cmdc_reportbill"
url = commonFuc().get_api_url() + commonFuc().get_business_data(module, "url17")
print(url)
# 获取登录所需账号密码
username = commonFuc().get_business_data(module, "username")
password = commonFuc().get_business_data(module, "password")
# 获取登录后Cmdc_access_token
cmdc_access_token = CmdcDoLogin(username, password).get_token()
headers = commonFuc().get_business_data(module, "json_headers", cmdc_access_token)
request_body = commonFuc().get_business_data(module, "payload17")
"""
场景:上报植入()
用例名称:数据植入生产批号列表(上报植入)
输出:{"success":true,"code":"200","message":"OK"}
"""
# 发送请求
result = requests.post(url, json=request_body, headers=headers)
#print("\033[031mresult1============\033[0m",result)
result = json.loads(result.content)
#print("\033[031mresult2============\033[0m",result)
# 获取预期结果
check_dict = commonFuc().get_business_data(module, "checkDict17")
print("\033[031mcheck_dict============\033[0m",check_dict)
# 断言实际结果中是否包含预期结果的内容
commonFuc().check_result(check_dict, result)
# -*- encoding=utf8 -*-
__author__ = "zhouniandong"
"""
case_tag:cmdc_api,cmdc上报植入获取首营客户,2293,2293-3,sit,bs
主数据平台:上报植入接口
"""
from common.common_func import commonFuc
from air_case.cmdc_login.后台管理系统登录.后台管理系统登录 import CmdcDoLogin
import requests
import json
module = "cmdc_reportbill"
url = commonFuc().get_api_url() + commonFuc().get_business_data(module, "url21")
print(url)
# 获取登录所需账号密码
username = commonFuc().get_business_data(module, "username")
password = commonFuc().get_business_data(module, "password")
# 获取登录后Cmdc_access_token
cmdc_access_token = CmdcDoLogin(username, password).get_token()
headers = commonFuc().get_business_data(module, "json_headers", cmdc_access_token)
request_body = commonFuc().get_business_data(module, "payload21")
"""
场景:上报植入()
用例名称:上报植入获取首营客户(上报植入)
输出:{"success":true,"code":"200","message":"OK"}
"""
# 发送请求
result = requests.get(url, json=request_body, headers=headers)
#print("\033[031mresult1============\033[0m",result)
result = json.loads(result.content)
#print("\033[031mresult2============\033[0m",result)
# 获取预期结果
check_dict = commonFuc().get_business_data(module, "checkDict21")
print("\033[031mcheck_dict============\033[0m",check_dict)
# 断言实际结果中是否包含预期结果的内容
commonFuc().check_result(check_dict, result)
...@@ -73,11 +73,11 @@ ...@@ -73,11 +73,11 @@
</tr> </tr>
<tr width="600"> <tr width="600">
<td class="details-col-elapsed"><a href='../log/医用耗材专区/log.html' target='_blank'>医用耗材专区</a></td> <td class="details-col-elapsed"><a href='../log/植入上报已上报列表/log.html' target='_blank'>植入上报已上报列表</a></td>
<td class="success">成功</td> <td class="success">成功</td>
<td class="details-col-elapsed">0.934</td> <td class="details-col-elapsed">0.875</td>
<td class="details-col-elapsed">zhouniandong</td> <td class="details-col-elapsed">zhouniandong</td>
<td class="details-col-elapsed"> 0.104854</td> <td class="details-col-elapsed"> 0.186572</td>
</tr> </tr>
</table> </table>
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment