Skip to content
GitLab
Explore
Projects
Groups
Snippets
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
c52cb4c6
Commit
c52cb4c6
authored
1 year ago
by
xiao-hesheng
Browse files
Options
Download
Email Patches
Plain Diff
优化脚本
parent
2c6f67aa
master
core_flow
No related merge requests found
Changes
12
Hide whitespace changes
Inline
Side-by-side
Showing
12 changed files
air_case/b2_herp3_bs/g2_10批量导入_导入一个产品_消耗结算.air/g2_10批量导入_导入一个产品_消耗结算.py
+2
-2
...rp3_bs/g2_10批量导入_导入一个产品_消耗结算.air/g2_10批量导入_导入一个产品_消耗结算.py
air_case/b2_herp3_bs/g2_11批量导入_导入一个产品_中心库出库结算.air/g2_11批量导入_导入一个产品_中心库出库结算.py
+2
-2
.../g2_11批量导入_导入一个产品_中心库出库结算.air/g2_11批量导入_导入一个产品_中心库出库结算.py
air_case/b2_herp3_bs/g2_12调价管理列表_查询.air/g2_12调价管理列表_查询.py
+0
-0
air_case/b2_herp3_bs/g2_12调价管理列表_查询.air/g2_12调价管理列表_查询.py
air_case/b2_herp3_bs/g2_13添加产品列表_查询.air/g2_13添加产品列表_查询.py
+0
-0
air_case/b2_herp3_bs/g2_13添加产品列表_查询.air/g2_13添加产品列表_查询.py
air_case/b2_herp3_bs/g2_14添加产品列表_确定添加产品.air/g2_14添加产品列表_确定添加产品.py
+2
-2
.../b2_herp3_bs/g2_14添加产品列表_确定添加产品.air/g2_14添加产品列表_确定添加产品.py
air_case/b2_herp3_bs/g2_15修改产品价格_暂存.air/g2_15修改产品价格_暂存.py
+2
-2
air_case/b2_herp3_bs/g2_15修改产品价格_暂存.air/g2_15修改产品价格_暂存.py
air_case/b2_herp3_bs/g2_16调价管理列表_查询_暂存状态数据.air/g2_16调价管理列表_查询_暂存状态数据.py
+3
-2
...rp3_bs/g2_16调价管理列表_查询_暂存状态数据.air/g2_16调价管理列表_查询_暂存状态数据.py
air_case/b2_herp3_bs/g2_17修改产品价格_提交.air/g2_17修改产品价格_提交.py
+5
-5
air_case/b2_herp3_bs/g2_17修改产品价格_提交.air/g2_17修改产品价格_提交.py
air_case/b2_herp3_bs/g2_18审批中心_列表查询.air/g2_18审批中心_列表查询.py
+77
-0
air_case/b2_herp3_bs/g2_18审批中心_列表查询.air/g2_18审批中心_列表查询.py
air_case/b2_herp3_bs/g2_7批量导入_查询产品信息.air/g2_7批量导入_查询产品信息.py
+0
-0
air_case/b2_herp3_bs/g2_7批量导入_查询产品信息.air/g2_7批量导入_查询产品信息.py
air_case/b2_herp3_bs/g2_8批量导入_导入一个产品_中心库结算.air/g2_8批量导入_导入一个产品_中心库结算.py
+7
-7
...rp3_bs/g2_8批量导入_导入一个产品_中心库结算.air/g2_8批量导入_导入一个产品_中心库结算.py
air_case/b2_herp3_bs/g2_9批量导入_导入一个产品_不结算.air/g2_9批量导入_导入一个产品_不结算.py
+2
-2
...2_herp3_bs/g2_9批量导入_导入一个产品_不结算.air/g2_9批量导入_导入一个产品_不结算.py
with
102 additions
and
24 deletions
+102
-24
air_case/b2_herp3_bs/g
8_3
批量导入_导入一个产品_消耗结算.air/g
8_3
批量导入_导入一个产品_消耗结算.py
→
air_case/b2_herp3_bs/g
2_10
批量导入_导入一个产品_消耗结算.air/g
2_10
批量导入_导入一个产品_消耗结算.py
+
2
-
2
View file @
c52cb4c6
...
...
@@ -43,8 +43,8 @@ def test1():
commonFuc
().
get_business_data
(
module
,
"X-APP-CODE"
))
# # 获取id
pro_path
=
commonFuc
().
get_pro_path
()
sys
.
path
.
append
(
pro_path
+
r
'\\air_case\\b2_herp3_bs\\g7
_
批量导入_查询产品信息.air'
)
using
(
pro_path
+
r
'\\air_case\\b2_herp3_bs\\g7
_
批量导入_查询产品信息.air'
)
sys
.
path
.
append
(
pro_path
+
r
'\\air_case\\b2_herp3_bs\\g
2_
7批量导入_查询产品信息.air'
)
using
(
pro_path
+
r
'\\air_case\\b2_herp3_bs\\g
2_
7批量导入_查询产品信息.air'
)
# from g7_批量导入_查询产品信息 import select1
# id1 = select1()
info
=
FileUtils
().
r_info6
(
"b2_herp3_bs"
,
"产品信息1"
,
'message2'
)
...
...
This diff is collapsed.
Click to expand it.
air_case/b2_herp3_bs/g
8_4
批量导入_导入一个产品_中心库出库结算.air/g
8_4
批量导入_导入一个产品_中心库出库结算.py
→
air_case/b2_herp3_bs/g
2_11
批量导入_导入一个产品_中心库出库结算.air/g
2_11
批量导入_导入一个产品_中心库出库结算.py
+
2
-
2
View file @
c52cb4c6
...
...
@@ -43,8 +43,8 @@ def test1():
commonFuc
().
get_business_data
(
module
,
"X-APP-CODE"
))
# # id
pro_path
=
commonFuc
().
get_pro_path
()
sys
.
path
.
append
(
pro_path
+
r
'\\air_case\\b2_herp3_bs\\g7
_
批量导入_查询产品信息.air'
)
using
(
pro_path
+
r
'\\air_case\\b2_herp3_bs\\g7
_
批量导入_查询产品信息.air'
)
sys
.
path
.
append
(
pro_path
+
r
'\\air_case\\b2_herp3_bs\\g
2_
7批量导入_查询产品信息.air'
)
using
(
pro_path
+
r
'\\air_case\\b2_herp3_bs\\g
2_
7批量导入_查询产品信息.air'
)
# from g7_批量导入_查询产品信息 import select1
# id1 = select1()
info
=
FileUtils
().
r_info6
(
"b2_herp3_bs"
,
"产品信息1"
,
'message2'
)
...
...
This diff is collapsed.
Click to expand it.
air_case/b2_herp3_bs/g
8_5
调价管理列表_查询.air/g
8_5
调价管理列表_查询.py
→
air_case/b2_herp3_bs/g
2_12
调价管理列表_查询.air/g
2_12
调价管理列表_查询.py
+
0
-
0
View file @
c52cb4c6
File moved
This diff is collapsed.
Click to expand it.
air_case/b2_herp3_bs/g
8_6
添加产品列表_查询.air/g
8_6
添加产品列表_查询.py
→
air_case/b2_herp3_bs/g
2_13
添加产品列表_查询.air/g
2_13
添加产品列表_查询.py
+
0
-
0
View file @
c52cb4c6
File moved
This diff is collapsed.
Click to expand it.
air_case/b2_herp3_bs/g
8_7
添加产品列表_确定添加产品.air/g
8_7
添加产品列表_确定添加产品.py
→
air_case/b2_herp3_bs/g
2_14
添加产品列表_确定添加产品.air/g
2_14
添加产品列表_确定添加产品.py
+
2
-
2
View file @
c52cb4c6
...
...
@@ -43,8 +43,8 @@ def test1():
commonFuc
().
get_business_data
(
module
,
"X-APP-CODE"
))
# # 获取hosGoodsId
pro_path
=
commonFuc
().
get_pro_path
()
sys
.
path
.
append
(
pro_path
+
r
'\\air_case\\b2_herp3_bs\\g
8_6
添加产品列表_查询.air'
)
using
(
pro_path
+
r
'\\air_case\\b2_herp3_bs\\g
8_6
添加产品列表_查询.air'
)
sys
.
path
.
append
(
pro_path
+
r
'\\air_case\\b2_herp3_bs\\g
2_13
添加产品列表_查询.air'
)
using
(
pro_path
+
r
'\\air_case\\b2_herp3_bs\\g
2_13
添加产品列表_查询.air'
)
from
g8_6添加产品列表_查询
import
select1
hosGoodsId
,
provGoodsId
=
select1
()
# #请求体
...
...
This diff is collapsed.
Click to expand it.
air_case/b2_herp3_bs/g
8_8
修改产品价格_暂存.air/g
8_8
修改产品价格_暂存.py
→
air_case/b2_herp3_bs/g
2_15
修改产品价格_暂存.air/g
2_15
修改产品价格_暂存.py
+
2
-
2
View file @
c52cb4c6
...
...
@@ -44,8 +44,8 @@ def test1():
commonFuc
().
get_business_data
(
module
,
"X-APP-CODE"
))
# # 获取hosGoodsId
pro_path
=
commonFuc
().
get_pro_path
()
sys
.
path
.
append
(
pro_path
+
r
'\\air_case\\b2_herp3_bs\\g
8_6
添加产品列表_查询.air'
)
using
(
pro_path
+
r
'\\air_case\\b2_herp3_bs\\g
8_6
添加产品列表_查询.air'
)
sys
.
path
.
append
(
pro_path
+
r
'\\air_case\\b2_herp3_bs\\g
2_13
添加产品列表_查询.air'
)
using
(
pro_path
+
r
'\\air_case\\b2_herp3_bs\\g
2_13
添加产品列表_查询.air'
)
from
g8_6添加产品列表_查询
import
select1
hosGoodsId
,
provGoodsId
=
select1
()
#获取日期
...
...
This diff is collapsed.
Click to expand it.
air_case/b2_herp3_bs/g
8_9
调价管理列表_查询_暂存状态数据.air/g
8_9
调价管理列表_查询_暂存状态数据.py
→
air_case/b2_herp3_bs/g
2_16
调价管理列表_查询_暂存状态数据.air/g
2_16
调价管理列表_查询_暂存状态数据.py
+
3
-
2
View file @
c52cb4c6
...
...
@@ -58,9 +58,10 @@ def test1():
if
code
>=
0
and
total
>=
0
:
# print(code)
GChid
=
commonFuc
().
analysis_json
(
'id'
,
data1
[
0
])
print
(
GChid
)
orderNo
=
commonFuc
().
analysis_json
(
'orderNo'
,
data1
[
0
])
print
(
GChid
,
orderNo
)
commonFuc
().
check_text_exist
(
0
,
result
)
return
GChid
return
GChid
,
orderNo
else
:
commonFuc
().
check_text_exist
(
'error'
,
result
)
test1
()
This diff is collapsed.
Click to expand it.
air_case/b2_herp3_bs/g
9
_1修改产品价格_提交.air/g
9
_1修改产品价格_提交.py
→
air_case/b2_herp3_bs/g
2
_1
7
修改产品价格_提交.air/g
2
_1
7
修改产品价格_提交.py
+
5
-
5
View file @
c52cb4c6
...
...
@@ -44,15 +44,15 @@ def test1():
commonFuc
().
get_business_data
(
module
,
"X-APP-CODE"
))
# # 获取hosGoodsId
pro_path
=
commonFuc
().
get_pro_path
()
sys
.
path
.
append
(
pro_path
+
r
'\\air_case\\b2_herp3_bs\\g
8_6
添加产品列表_查询.air'
)
using
(
pro_path
+
r
'\\air_case\\b2_herp3_bs\\g
8_6
添加产品列表_查询.air'
)
sys
.
path
.
append
(
pro_path
+
r
'\\air_case\\b2_herp3_bs\\g
2_13
添加产品列表_查询.air'
)
using
(
pro_path
+
r
'\\air_case\\b2_herp3_bs\\g
2_13
添加产品列表_查询.air'
)
from
g8_6添加产品列表_查询
import
select1
hosGoodsId
,
provGoodsId
=
select1
()
#获取GChid
sys
.
path
.
append
(
pro_path
+
r
'\\air_case\\b2_herp3_bs\\g
8_9
调价管理列表_查询_暂存状态数据.air'
)
using
(
pro_path
+
r
'\\air_case\\b2_herp3_bs\\g
8_9
调价管理列表_查询_暂存状态数据.air'
)
sys
.
path
.
append
(
pro_path
+
r
'\\air_case\\b2_herp3_bs\\g
2_16
调价管理列表_查询_暂存状态数据.air'
)
using
(
pro_path
+
r
'\\air_case\\b2_herp3_bs\\g
2_16
调价管理列表_查询_暂存状态数据.air'
)
from
g8_9调价管理列表_查询_暂存状态数据
import
test1
GChid
=
test1
()
GChid
,
orderNo
=
test1
()
#获取日期
currentdate
=
dateUtils
().
get_current_date
()
# print(currentdate)
...
...
This diff is collapsed.
Click to expand it.
air_case/b2_herp3_bs/g2_18审批中心_列表查询.air/g2_18审批中心_列表查询.py
0 → 100644
+
77
-
0
View file @
c52cb4c6
# -*- encoding=utf8 -*-
import
sys
from
airtest.core.helper
import
using
from
common.dateUtils
import
dateUtils
from
common.db.sql.sql_del_branch_info
import
delByBranchId
from
common.db.sql.sql_del_kind_goodsinfo
import
delKindGoodsinfo
from
common.db.sql.sql_del_notices_info
import
delByNoticeName
from
common.fileUtls
import
FileUtils
from
common.timeUtils
import
timeUtils
__author__
=
"xiaohesheng"
"""
case_tag:api,herp-web,g9_2审批中心_列表查询,id2263,id2263-78,sit,on
内网:g9_2审批中心_列表查询
"""
from
common.common_func
import
commonFuc
from
air_case.b1_herp3_login.登录内网系统.登录内网系统
import
login_system
module
=
"b2_herp3_bs"
def
test1
():
"""
场景:g8_8修改产品价格_暂存
用例名称:g8_8修改产品价格_暂存
输入:无
输出:"rtn_msg": {"code": 0, "msg": null, "data": 1}
"""
#内网登录
username
=
commonFuc
().
get_business_data
(
module
,
"username"
)
# # print('医院名称',username)
password
=
commonFuc
().
get_business_data
(
module
,
"password"
)
# print(username, password,'aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa')
# 获取token和projectCode
token
,
projectCode
,
uxid
,
corpId
,
info
=
login_system
(
username
,
password
).
get_token
()
# print( token,projectCode,uxid,corpId,info)
#g8_8修改产品价格_暂存
url
=
commonFuc
().
get_api_url
()
+
commonFuc
().
get_business_data
(
module
,
"goodsChgMain_insert_url"
)
# 获取请求头信息
headers
=
commonFuc
().
get_business_data
(
module
,
"json_headers2"
,
commonFuc
().
get_business_data
(
module
,
"json_contentType"
),
token
,
commonFuc
().
get_business_data
(
module
,
"X-APP-CODE"
))
# # 获取hosGoodsId
pro_path
=
commonFuc
().
get_pro_path
()
sys
.
path
.
append
(
pro_path
+
r
'\\air_case\\b2_herp3_bs\\g2_13添加产品列表_查询.air'
)
using
(
pro_path
+
r
'\\air_case\\b2_herp3_bs\\g2_13添加产品列表_查询.air'
)
from
g8_6添加产品列表_查询
import
select1
hosGoodsId
,
provGoodsId
=
select1
()
#获取GChid
sys
.
path
.
append
(
pro_path
+
r
'\\air_case\\b2_herp3_bs\\g2_16调价管理列表_查询_暂存状态数据.air'
)
using
(
pro_path
+
r
'\\air_case\\b2_herp3_bs\\g2_16调价管理列表_查询_暂存状态数据.air'
)
from
g8_9调价管理列表_查询_暂存状态数据
import
test1
GChid
,
orderNo
=
test1
()
#获取日期
currentdate
=
dateUtils
().
get_current_date
()
# print(currentdate)
#请求体
request_body
=
commonFuc
().
get_business_data
(
module
,
"payload50_5"
,
hosGoodsId
,
provGoodsId
,
currentdate
,
GChid
)
print
(
request_body
)
# # # 发送请求
result
=
commonFuc
().
http_post
(
url
,
request_body
,
headers
)
print
(
'resultaaaaaaaaaaaaaaaaaaaaaaaaaaa'
,
result
)
#断言
# checkDict=commonFuc().get_business_data(module,'checkDict10')
# commonFuc().check_result(checkDict,result)
code
=
commonFuc
().
analysis_json
(
'code'
,
result
)
data
=
commonFuc
().
analysis_json
(
'data'
,
result
)
checkDict
=
commonFuc
().
get_business_data
(
module
,
'checkDict10'
)
if
code
>=
0
:
print
(
code
)
commonFuc
().
check_text_exist
(
0
,
result
)
commonFuc
().
check_result
(
checkDict
,
result
)
else
:
commonFuc
().
check_text_exist
(
'error'
,
result
)
test1
()
This diff is collapsed.
Click to expand it.
air_case/b2_herp3_bs/g7
_
批量导入_查询产品信息.air/g7
_
批量导入_查询产品信息.py
→
air_case/b2_herp3_bs/g
2_
7批量导入_查询产品信息.air/g
2_
7批量导入_查询产品信息.py
+
0
-
0
View file @
c52cb4c6
File moved
This diff is collapsed.
Click to expand it.
air_case/b2_herp3_bs/g
8_1
批量导入_导入一个产品_中心库结算.air/g
8_1
批量导入_导入一个产品_中心库结算.py
→
air_case/b2_herp3_bs/g
2_8
批量导入_导入一个产品_中心库结算.air/g
2_8
批量导入_导入一个产品_中心库结算.py
+
7
-
7
View file @
c52cb4c6
...
...
@@ -12,8 +12,8 @@ from common.timeUtils import timeUtils
__author__
=
"xiaohesheng"
"""
case_tag:api,herp-web,g
8_
批量导入_
导入一个产品_中心库结算
,id2263,id2263-69,sit,on
内网:g
8_
批量导入_
导入一个产品_中心库结算
case_tag:api,herp-web,g
2_7
批量导入_
查询产品信息
,id2263,id2263-69,sit,on
内网:g
2_7
批量导入_
查询产品信息
"""
from
common.common_func
import
commonFuc
...
...
@@ -21,8 +21,8 @@ from air_case.b1_herp3_login.登录内网系统.登录内网系统 import login_
module
=
"b2_herp3_bs"
def
test1
():
"""
场景:g
8_
批量导入_
导入一个产品_中心库结算
用例名称:g
8_
批量导入_
导入一个产品_中心库结算
场景:g
2_7
批量导入_
查询产品信息
用例名称:g
2_7
批量导入_
查询产品信息
输入:无
输出:"rtn_msg": {"code": 0, "msg": null, "data": 1}
"""
...
...
@@ -34,7 +34,7 @@ def test1():
# 获取token和projectCode
token
,
projectCode
,
uxid
,
corpId
,
info
=
login_system
(
username
,
password
).
get_token
()
# print( token,projectCode,uxid,corpId,info)
#g
8_
批量导入_
导入一个产品_中心库结算
#g
2_7
批量导入_
查询产品信息
url
=
commonFuc
().
get_api_url
()
+
commonFuc
().
get_business_data
(
module
,
"updateSettleType_url1"
)
# 获取请求头信息
...
...
@@ -43,8 +43,8 @@ def test1():
commonFuc
().
get_business_data
(
module
,
"X-APP-CODE"
))
# # 获取id
pro_path
=
commonFuc
().
get_pro_path
()
sys
.
path
.
append
(
pro_path
+
r
'\\air_case\\b2_herp3_bs\\g7
_
批量导入_查询产品信息.air'
)
using
(
pro_path
+
r
'\\air_case\\b2_herp3_bs\\g7
_
批量导入_查询产品信息.air'
)
sys
.
path
.
append
(
pro_path
+
r
'\\air_case\\b2_herp3_bs\\g
2_
7批量导入_查询产品信息.air'
)
using
(
pro_path
+
r
'\\air_case\\b2_herp3_bs\\g
2_
7批量导入_查询产品信息.air'
)
# from g7_批量导入_查询产品信息 import select1
# id1 = select1()
info
=
FileUtils
().
r_info6
(
"b2_herp3_bs"
,
"产品信息1"
,
'message2'
)
...
...
This diff is collapsed.
Click to expand it.
air_case/b2_herp3_bs/g
8_2
批量导入_导入一个产品_不结算.air/g
8_2
批量导入_导入一个产品_不结算.py
→
air_case/b2_herp3_bs/g
2_9
批量导入_导入一个产品_不结算.air/g
2_9
批量导入_导入一个产品_不结算.py
+
2
-
2
View file @
c52cb4c6
...
...
@@ -43,8 +43,8 @@ def test1():
commonFuc
().
get_business_data
(
module
,
"X-APP-CODE"
))
# # 获取id
pro_path
=
commonFuc
().
get_pro_path
()
sys
.
path
.
append
(
pro_path
+
r
'\\air_case\\b2_herp3_bs\\g7
_
批量导入_查询产品信息.air'
)
using
(
pro_path
+
r
'\\air_case\\b2_herp3_bs\\g7
_
批量导入_查询产品信息.air'
)
sys
.
path
.
append
(
pro_path
+
r
'\\air_case\\b2_herp3_bs\\g
2_
7批量导入_查询产品信息.air'
)
using
(
pro_path
+
r
'\\air_case\\b2_herp3_bs\\g
2_
7批量导入_查询产品信息.air'
)
# from g7_批量导入_查询产品信息 import select1
# id1 = select1()
info
=
FileUtils
().
r_info6
(
"b2_herp3_bs"
,
"产品信息1"
,
'message2'
)
...
...
This diff is collapsed.
Click to expand it.
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
Menu
Explore
Projects
Groups
Snippets