Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
Menu
Open sidebar
test
autotest-airtest-web-spd
Commits
eba1f972
Commit
eba1f972
authored
Sep 14, 2023
by
liguangyu06
Browse files
Merge remote-tracking branch 'origin/master'
parents
ff9577e0
a0b1303f
Changes
27
Hide whitespace changes
Inline
Side-by-side
air_case/mdm3-ea/注册企业锁定认领审核流程.air/注册企业锁定认领审核流程.py
View file @
eba1f972
...
@@ -3,7 +3,7 @@
...
@@ -3,7 +3,7 @@
__author__
=
"xiaohesheng"
__author__
=
"xiaohesheng"
"""
"""
case_tag:api,mdm-web企业审核,id2248,sit,on
case_tag:api,mdm-web企业审核,id2248,
id2248-1,
sit,on
主数据平台:注册企业审核认领流程
主数据平台:注册企业审核认领流程
"""
"""
...
@@ -32,7 +32,7 @@ username = commonFuc().get_business_data(module, "username")
...
@@ -32,7 +32,7 @@ username = commonFuc().get_business_data(module, "username")
password
=
commonFuc
().
get_business_data
(
module
,
"password"
)
password
=
commonFuc
().
get_business_data
(
module
,
"password"
)
print
(
username
,
password
)
print
(
username
,
password
)
# 获取token和projectCode
# 获取token和projectCode
token
,
projectCode
,
uxid
,
corpId
=
login_system
(
username
,
password
).
get_token
()
token
,
projectCode
,
uxid
,
corpId
,
info
=
login_system
(
username
,
password
).
get_token
()
#获取请求头信息
#获取请求头信息
headers
=
commonFuc
().
get_business_data
(
module
,
"json_headers2"
,
headers
=
commonFuc
().
get_business_data
(
module
,
"json_headers2"
,
commonFuc
().
get_business_data
(
module
,
"json_contentType"
),
token
,
commonFuc
().
get_business_data
(
module
,
"json_contentType"
),
token
,
...
...
air_case/mdm3-ea/注册企业锁定认领审核驳回流程.air/注册企业锁定认领审核驳回流程.py
View file @
eba1f972
...
@@ -3,7 +3,7 @@
...
@@ -3,7 +3,7 @@
__author__
=
"xiaohesheng"
__author__
=
"xiaohesheng"
"""
"""
case_tag:api,mdm-web企业审核,id2248,sit,on
case_tag:api,mdm-web企业审核,id2248,
id2248-2,
sit,on
主数据平台:注册企业审核驳回认领流程
主数据平台:注册企业审核驳回认领流程
"""
"""
...
@@ -32,7 +32,7 @@ username = commonFuc().get_business_data(module, "username")
...
@@ -32,7 +32,7 @@ username = commonFuc().get_business_data(module, "username")
password
=
commonFuc
().
get_business_data
(
module
,
"password"
)
password
=
commonFuc
().
get_business_data
(
module
,
"password"
)
print
(
username
,
password
)
print
(
username
,
password
)
# 获取token和projectCode
# 获取token和projectCode
token
,
projectCode
,
uxid
,
corpId
=
login_system
(
username
,
password
).
get_token
()
token
,
projectCode
,
uxid
,
corpId
,
info
=
login_system
(
username
,
password
).
get_token
()
#获取请求头信息
#获取请求头信息
headers
=
commonFuc
().
get_business_data
(
module
,
"json_headers2"
,
headers
=
commonFuc
().
get_business_data
(
module
,
"json_headers2"
,
commonFuc
().
get_business_data
(
module
,
"json_contentType"
),
token
,
commonFuc
().
get_business_data
(
module
,
"json_contentType"
),
token
,
...
...
air_case/mdm3-es/器械注册人_企业注册提交_正常注册_境内.air/器械注册人_企业注册提交_正常注册_境内.py
View file @
eba1f972
...
@@ -2,7 +2,7 @@
...
@@ -2,7 +2,7 @@
__author__
=
"xiaohesheng"
__author__
=
"xiaohesheng"
"""
"""
case_tag:api,mdm-web境内,id2232,sit,on
case_tag:api,mdm-web境内,id2232,
id2232-1,
sit,on
主数据平台:注册企业接口
主数据平台:注册企业接口
"""
"""
...
...
air_case/mdm3-es/外网企业注册-器械注册人-所有输入项填写.air/外网企业注册-器械注册人-所有输入项填写.py
View file @
eba1f972
...
@@ -2,7 +2,7 @@
...
@@ -2,7 +2,7 @@
__author__
=
"xiaohesheng"
__author__
=
"xiaohesheng"
"""
"""
case_tag:api,mdm-web2,id2232,sit,on
case_tag:api,mdm-web2,id2232,
id2232-3,
sit,on
主数据平台:注册企业接口_注册时_有附件
主数据平台:注册企业接口_注册时_有附件
"""
"""
...
...
air_case/mdm3-es/外网企业注册-器械注册人-有附件.air/外网企业注册-器械注册人-有附件.py
View file @
eba1f972
...
@@ -2,7 +2,7 @@
...
@@ -2,7 +2,7 @@
__author__
=
"xiaohesheng"
__author__
=
"xiaohesheng"
"""
"""
case_tag:api,mdm-web1,id2232,
s
it,on
case_tag:api,mdm-web1,id2232,
id2232-4,
it,on
主数据平台:注册企业接口_注册时_有附件
主数据平台:注册企业接口_注册时_有附件
"""
"""
...
...
air_case/mdm3-es/外网企业注册-器械注册人.air/外网企业注册-器械注册人.py
View file @
eba1f972
...
@@ -2,7 +2,7 @@
...
@@ -2,7 +2,7 @@
__author__
=
"xiaohesheng"
__author__
=
"xiaohesheng"
"""
"""
case_tag:api,mdm-web,id2232,sit,on
case_tag:api,mdm-web,id2232,
id2232-2,
sit,on
主数据平台:注册企业接口
主数据平台:注册企业接口
"""
"""
...
...
air_case/mdm3-es/外网企业注册提交接口_正常注册.air/外网企业注册提交接口_正常注册.py
View file @
eba1f972
...
@@ -2,7 +2,7 @@
...
@@ -2,7 +2,7 @@
__author__
=
"xiaohesheng"
__author__
=
"xiaohesheng"
"""
"""
case_tag:api,mdm-web正常注册,id2232,sit,on
case_tag:api,mdm-web正常注册,id2232,
id2232-5,
sit,on
主数据平台:注册企业接口
主数据平台:注册企业接口
"""
"""
...
...
air_case/mdm3-es/外网企业注册提交接口_注册企业已存在.air/外网企业注册提交接口_注册企业已存在.py
View file @
eba1f972
...
@@ -2,7 +2,7 @@
...
@@ -2,7 +2,7 @@
__author__
=
"xiaohesheng"
__author__
=
"xiaohesheng"
"""
"""
case_tag:api,mdm-web注册企业已存在,id2232,sit,on
case_tag:api,mdm-web注册企业已存在,id2232,
id2232-6,
sit,on
主数据平台:注册企业接口
主数据平台:注册企业接口
"""
"""
...
...
air_case/mdm3-es/生产厂商_企业注册提交_正常注册.air/生产厂商_企业注册提交_正常注册.py
View file @
eba1f972
...
@@ -2,7 +2,7 @@
...
@@ -2,7 +2,7 @@
__author__
=
"xiaohesheng"
__author__
=
"xiaohesheng"
"""
"""
case_tag:api,mdm-web生产厂商正常注册,id2232,sit,on
case_tag:api,mdm-web生产厂商正常注册,id2232,
id2232-7,
sit,on
主数据平台:生产厂商_企业注册提交_正常注册
主数据平台:生产厂商_企业注册提交_正常注册
"""
"""
...
...
air_case/mdm3-es/经销商_企业注册提交_正常注册.air/经销商_企业注册提交_正常注册.py
View file @
eba1f972
...
@@ -2,7 +2,7 @@
...
@@ -2,7 +2,7 @@
__author__
=
"xiaohesheng"
__author__
=
"xiaohesheng"
"""
"""
case_tag:api,mdm-web经销商正常注册,id2232,sit,on
case_tag:api,mdm-web经销商正常注册,id2232,
id2232-8,
sit,on
主数据平台:经销商_企业注册提交_正常注册
主数据平台:经销商_企业注册提交_正常注册
"""
"""
...
...
air_case/mdm3-hs/医院注册_正常注册_公立医院.air/医院注册_正常注册_公立医院.py
View file @
eba1f972
...
@@ -3,7 +3,7 @@
...
@@ -3,7 +3,7 @@
__author__
=
"xiaohesheng"
__author__
=
"xiaohesheng"
"""
"""
case_tag:api,mdm-web,公立医院注册,id2249,sit,on,10086
case_tag:api,mdm-web,公立医院注册,id2249,
id2249-1,
sit,on,10086
主数据平台:公立医院注册
主数据平台:公立医院注册
"""
"""
from
common.common_func
import
commonFuc
from
common.common_func
import
commonFuc
...
...
air_case/mdm3-hs/医院注册_正常注册_私立医院.air/医院注册_正常注册_私立医院.py
View file @
eba1f972
...
@@ -4,7 +4,7 @@ __author__ = "xiaohesheng"
...
@@ -4,7 +4,7 @@ __author__ = "xiaohesheng"
"""
"""
暂未调试脚本
暂未调试脚本
case_tag:api,mdm-web私立医院注册,id2249,sit,on,10086
case_tag:api,mdm-web私立医院注册,id2249,
id2249-2,
sit,on,10086
主数据平台:私立医院注册
主数据平台:私立医院注册
"""
"""
from
common.common_func
import
commonFuc
from
common.common_func
import
commonFuc
...
...
air_case/mdm3-hs/医院注册_注册时医院已存在.air/医院注册_注册时医院已存在.py
0 → 100644
View file @
eba1f972
# -*- encoding=utf8 -*-
__author__
=
"xiaohesheng"
"""
case_tag:api,mdm-web,医院注册时医院已存在,id2249,id2249-3,sit,on,10086
主数据平台:医院注册时医院已存在
"""
from
common.common_func
import
commonFuc
module
=
"mdm3-hs"
# 注册企业
url
=
commonFuc
().
get_api_url
()
+
commonFuc
().
get_business_data
(
module
,
"insertHosRegistInfo_url"
)
# #获取请求头信息
headers
=
commonFuc
().
get_business_data
(
module
,
"json_headers"
,
commonFuc
().
get_business_data
(
module
,
"json_contentType"
))
h_name
=
commonFuc
().
get_business_data
(
module
,
"name1"
)
# 获取前缀name
h_name
=
h_name
+
commonFuc
().
randomString
(
5
)
# 随机数生成拼接企业名称
request_body
=
commonFuc
().
get_business_data
(
module
,
"payload"
,
h_name
,
h_name
,
h_name
,
h_name
,
h_name
,
h_name
,
h_name
,
h_name
)
# 发送请求
result
=
commonFuc
().
http_post
(
url
,
request_body
,
headers
)
# 发送请求
result1
=
commonFuc
().
http_post
(
url
,
request_body
,
headers
)
#获取接口返回数据
check_dict
=
commonFuc
().
get_business_data
(
module
,
"checkDict1"
)
#断言实际结果中是否包含预期结果的内容
commonFuc
().
check_result
(
check_dict
,
result1
)
air_case/mdm3-hs/注册医院审核通过.air/注册医院审核通过.py
View file @
eba1f972
...
@@ -5,7 +5,7 @@ from common.timeUtils import timeUtils
...
@@ -5,7 +5,7 @@ from common.timeUtils import timeUtils
__author__
=
"xiaohesheng"
__author__
=
"xiaohesheng"
"""
"""
case_tag:api,mdm-web,注册医院审核通过,id2249,sit,on,20230907
case_tag:api,mdm-web,注册医院审核通过,id2249,
id2249-4,
sit,on,20230907
主数据平台:注册医院审核通过
主数据平台:注册医院审核通过
"""
"""
from
common.common_func
import
commonFuc
from
common.common_func
import
commonFuc
...
@@ -33,7 +33,7 @@ username = commonFuc().get_business_data(module, "username")
...
@@ -33,7 +33,7 @@ username = commonFuc().get_business_data(module, "username")
password
=
commonFuc
().
get_business_data
(
module
,
"password"
)
password
=
commonFuc
().
get_business_data
(
module
,
"password"
)
print
(
username
,
password
)
print
(
username
,
password
)
# 获取token和projectCode
# 获取token和projectCode
token
,
projectCode
,
uxid
,
corpId
=
login_system
(
username
,
password
).
get_token
()
token
,
projectCode
,
uxid
,
corpId
,
info
=
login_system
(
username
,
password
).
get_token
()
url
=
commonFuc
().
get_api_url
()
+
commonFuc
().
get_business_data
(
module
,
"queryListPage_url"
)
url
=
commonFuc
().
get_api_url
()
+
commonFuc
().
get_business_data
(
module
,
"queryListPage_url"
)
# 获取请求头信息
# 获取请求头信息
headers
=
commonFuc
().
get_business_data
(
module
,
"json_headers2"
,
headers
=
commonFuc
().
get_business_data
(
module
,
"json_headers2"
,
...
...
air_case/mdm3-hs/注册医院审核驳回.air/注册医院审核驳回.py
View file @
eba1f972
...
@@ -5,7 +5,7 @@ from common.timeUtils import timeUtils
...
@@ -5,7 +5,7 @@ from common.timeUtils import timeUtils
__author__
=
"xiaohesheng"
__author__
=
"xiaohesheng"
"""
"""
case_tag:api,mdm-web,注册医院审核驳回,id2249,sit,on,202309072
case_tag:api,mdm-web,注册医院审核驳回,id2249,
id2249-5,
sit,on,202309072
主数据平台:注册医院审核驳回
主数据平台:注册医院审核驳回
"""
"""
from
common.common_func
import
commonFuc
from
common.common_func
import
commonFuc
...
@@ -33,7 +33,7 @@ username = commonFuc().get_business_data(module, "username")
...
@@ -33,7 +33,7 @@ username = commonFuc().get_business_data(module, "username")
password
=
commonFuc
().
get_business_data
(
module
,
"password"
)
password
=
commonFuc
().
get_business_data
(
module
,
"password"
)
print
(
username
,
password
)
print
(
username
,
password
)
# 获取token和projectCode
# 获取token和projectCode
token
,
projectCode
,
uxid
,
corpId
=
login_system
(
username
,
password
).
get_token
()
token
,
projectCode
,
uxid
,
corpId
,
info
=
login_system
(
username
,
password
).
get_token
()
url
=
commonFuc
().
get_api_url
()
+
commonFuc
().
get_business_data
(
module
,
"queryListPage_url"
)
url
=
commonFuc
().
get_api_url
()
+
commonFuc
().
get_business_data
(
module
,
"queryListPage_url"
)
# 获取请求头信息
# 获取请求头信息
headers
=
commonFuc
().
get_business_data
(
module
,
"json_headers2"
,
headers
=
commonFuc
().
get_business_data
(
module
,
"json_headers2"
,
...
...
air_case/mdm3-pim/产品新增和审核通过.air/产品新增和审核通过.py
View file @
eba1f972
# -*- encoding=utf8 -*-
# -*- encoding=utf8 -*-
from
common.timeUtils
import
timeUtils
from
common.timeUtils
import
timeUtils
from
common.fileUtls
import
FileUtils
__author__
=
"xiaohesheng"
__author__
=
"xiaohesheng"
"""
"""
case_tag:api,mdm-web
企业
审核,id22
48
,sit,on,202309
0802
case_tag:api,mdm-web
产品新增和
审核,id22
51,id2251-1
,sit,on,202309
1201
主数据平台:产品新增和审核通过
主数据平台:产品新增和审核通过
"""
"""
...
@@ -35,7 +35,7 @@ def Enterprise_audit():
...
@@ -35,7 +35,7 @@ def Enterprise_audit():
password
=
commonFuc
().
get_business_data
(
module
,
"password"
)
password
=
commonFuc
().
get_business_data
(
module
,
"password"
)
print
(
username
,
password
)
print
(
username
,
password
)
# 获取token和projectCode
# 获取token和projectCode
token
,
projectCode
,
uxid
,
corpId
=
login_system
(
username
,
password
).
get_token
()
token
,
projectCode
,
uxid
,
corpId
,
info
=
login_system
(
username
,
password
).
get_token
()
# 获取请求头信息
# 获取请求头信息
headers
=
commonFuc
().
get_business_data
(
module
,
"json_headers2"
,
headers
=
commonFuc
().
get_business_data
(
module
,
"json_headers2"
,
commonFuc
().
get_business_data
(
module
,
"json_contentType"
),
token
,
commonFuc
().
get_business_data
(
module
,
"json_contentType"
),
token
,
...
@@ -108,7 +108,7 @@ def p_m_a():
...
@@ -108,7 +108,7 @@ def p_m_a():
password
=
commonFuc
().
get_business_data
(
module
,
"password"
)
password
=
commonFuc
().
get_business_data
(
module
,
"password"
)
print
(
username
,
password
)
print
(
username
,
password
)
# 获取token和projectCode
# 获取token和projectCode
token
,
projectCode
,
uxid
,
corpId
=
login_system
(
username
,
password
).
get_token
()
token
,
projectCode
,
uxid
,
corpId
,
info
=
login_system
(
username
,
password
).
get_token
()
# 分页查询供应商产品数据接口
# 分页查询供应商产品数据接口
url
=
commonFuc
().
get_api_url
()
+
commonFuc
().
get_business_data
(
module
,
"listVoPage_url"
)
url
=
commonFuc
().
get_api_url
()
+
commonFuc
().
get_business_data
(
module
,
"listVoPage_url"
)
...
@@ -222,8 +222,6 @@ def p_m_a():
...
@@ -222,8 +222,6 @@ def p_m_a():
# print('code',code)
# print('code',code)
commonFuc
().
check_text_exist
(
code
,
result
)
commonFuc
().
check_text_exist
(
code
,
result
)
print
(
'username'
,
username
)
print
(
'username'
,
username
)
return
username
return
username
,
goodsName
,
module
# p_m_a()
# p_m_a()
from
common.timeUtils
import
timeUtils
FileUtils
().
w_info
(
p_m_a
(),
'产品新增'
)
from
common.rw
import
Rw
Rw
().
w_info
(
p_m_a
())
air_case/mdm3-pim/产品规格新增和审核通过.air/产品规格新增和审核通过.py
deleted
100644 → 0
View file @
ff9577e0
# -*- encoding=utf8 -*-
import
sys
from
common.timeUtils
import
timeUtils
__author__
=
"xiaohesheng"
"""
case_tag:api,mdm-web企业审核,id2248,sit,on,2023090802
主数据平台:产品新增和审核通过
"""
from
common.common_func
import
commonFuc
pro_path
=
commonFuc
().
get_pro_path
()
from
airtest.core.api
import
using
# sys.path.append(pro_path+'\\air_case\\mdm3-pim\\产品新增和审核通过.air')
sys
.
path
.
append
(
r
'D:\PycharmProjects\autotest-airtest-web\\air_case\\mdm3-pim2\\产品新增和审核通过.air'
)
using
(
"产品新增和审核通过.air"
)
air_case/mdm3-pim/产品规格申报.air/产品规格申报.py
0 → 100644
View file @
eba1f972
# -*- encoding=utf8 -*-
import
sys
from
air_case.mdm_login.登录外网系统.登录外网系统
import
login_system
from
common.timeUtils
import
timeUtils
from
common.common_func
import
commonFuc
from
common.fileUtls
import
*
__author__
=
"xiaohesheng"
"""
case_tag:api,mdm-web产品规格新增,id2251,id2251-2,sit,on,2023091202
主数据平台:web产品规格新增
"""
module
=
"mdm3-pim"
# 登录
info
=
FileUtils
().
r_info
(
module
,
'产品新增'
)
username
=
info
[
'username'
]
goodsname
=
info
[
'goodsname'
]
password
=
commonFuc
().
get_business_data
(
module
,
"password"
)
print
(
username
,
password
)
# 获取token和projectCode
token
,
projectCode
,
uxid
,
corpId
,
info
=
login_system
(
username
,
password
).
get_token
()
# 查询已添加产品数据
url
=
commonFuc
().
get_api_url
()
+
commonFuc
().
get_business_data
(
module
,
"listVoPage_url"
)
#
# # 获取请求头信息
headers
=
commonFuc
().
get_business_data
(
module
,
"json_headers2"
,
commonFuc
().
get_business_data
(
module
,
"json_contentType"
),
token
,
projectCode
)
request_body
=
commonFuc
().
get_business_data
(
module
,
"payload10"
,
corpId
,
goodsname
)
# 发送请求
result
=
commonFuc
().
http_post
(
url
,
request_body
,
headers
)
print
(
'查询已添加产品信息'
,
result
)
MGID
=
commonFuc
().
analysis_json
(
'id'
,
commonFuc
().
analysis_json
(
'data'
,
result
))
#产品规格申报===============================================
url
=
commonFuc
().
get_api_url
()
+
commonFuc
().
get_business_data
(
module
,
"submitGoodsSpecsRegist_url"
)
#
# # 获取请求头信息
headers
=
commonFuc
().
get_business_data
(
module
,
"json_headers2"
,
commonFuc
().
get_business_data
(
module
,
"json_contentType"
),
token
,
projectCode
)
request_body
=
commonFuc
().
get_business_data
(
module
,
"payload11"
,
MGID
,
goodsname
)
print
(
'request_body'
,
request_body
)
# 发送请求
result
=
commonFuc
().
http_post
(
url
,
request_body
,
headers
)
print
(
'产品规格申报'
,
result
)
code
=
commonFuc
().
analysis_json
(
'code'
,
result
)
goodsname1
=
commonFuc
().
analysis_json
(
'goodsName'
,
commonFuc
().
analysis_json
(
'goodsRegistVO'
,
commonFuc
().
analysis_json
(
'data'
,
result
)))
# print("goodsname1",goodsname1)
commonFuc
().
check_text_exist
(
code
,
result
)
commonFuc
().
check_text_exist
(
goodsname1
,
result
)
air_case/mdm_login/登录外网系统/登录外网系统.py
View file @
eba1f972
...
@@ -67,7 +67,8 @@ class login_system():
...
@@ -67,7 +67,8 @@ class login_system():
# 断言实际结果中是否不包含预期的文本
# 断言实际结果中是否不包含预期的文本
commonFuc
().
check_text_exist
(
uxid
,
result
)
commonFuc
().
check_text_exist
(
uxid
,
result
)
corpId
=
commonFuc
().
analysis_json
(
'corpId'
,
result
)
corpId
=
commonFuc
().
analysis_json
(
'corpId'
,
result
)
return
token
,
projectCode
,
uxid
,
corpId
info
=
(
token
,
projectCode
,
uxid
,
corpId
)
return
token
,
projectCode
,
uxid
,
corpId
,
info
# login_system('test001', 'a123456!').get_token()
# login_system('test001', 'a123456!').get_token()
...
...
common/common_func.py
View file @
eba1f972
...
@@ -535,6 +535,6 @@ class commonFuc(object):
...
@@ -535,6 +535,6 @@ class commonFuc(object):
def
get_pro_path
(
self
):
def
get_pro_path
(
self
):
import
os
import
os
curPath
=
os
.
path
.
abspath
(
os
.
path
.
dirname
(
__file__
))
# 获取当前文件的所在目录的绝对路径
curPath
=
os
.
path
.
abspath
(
os
.
path
.
dirname
(
__file__
))
# 获取当前文件的所在目录的绝对路径
print
(
os
.
path
.
split
(
curPath
))
#
print(os.path.split(curPath))
rootPath
=
os
.
path
.
split
(
curPath
)[
0
]
rootPath
=
os
.
path
.
split
(
curPath
)[
0
]
return
rootPath
return
rootPath
\ No newline at end of file
Prev
1
2
Next
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment