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
0441d068
Commit
0441d068
authored
Jun 25, 2024
by
xiao-hesheng
Browse files
流程十四脚本编写
parent
f4f68943
Changes
4
Hide whitespace changes
Inline
Side-by-side
air_case/b5_spd3_core_business_flow/a_b7流程十四退库业务_消耗退库.air/a_b7流程十四退库业务_消耗退库.py
View file @
0441d068
...
...
@@ -467,7 +467,7 @@ def second_dept_consume_in_Stock(type=1):
# 消耗退回 == == == == == == == == == == == == == == == ==
url
=
commonFuc
().
get_api_add_port_url
()
+
commonFuc
().
get_business_data
(
module
,
"dept_stock_rtn_submit_url"
)
print
(
'消耗退回,url'
,
url
)
print
(
'
高值
消耗退回,url'
,
url
)
billMode
=
'20'
deptid2
=
FileUtils
().
r_info8
(
'b2_herp3_bs'
,
'所有科室id'
,
'message6'
)[
"deptid2"
]
request_body
=
commonFuc
().
get_business_data
(
module
,
"payload35"
,
viewId2
,
hosGoodsId
,
DRh_id
,
...
...
air_case/demo/产品检查.air/产品检查.py
View file @
0441d068
...
...
@@ -17,34 +17,38 @@ from air_case.mdm_login.登录外网系统.登录外网系统 import login_syste
from
airtest.core.api
import
using
import
sys
# 第一种方式
# hos_goods_id = FileUtils().r_info8('b5_spd3_core_business_flow', '产品审核信息', 'message2')["hosGoodsId"]
# actual_value=delData().check_goods_info(hos_goods_id)
# print('actual_value',actual_value)
# expected_value=commonFuc().get_business_data('b5_spd3_core_business_flow','expected_value')
# print('expected_value',expected_value)
# if actual_value==expected_value:
# print('ok')
# commonFuc().check_text_exist_result_text('succees', 'succees')
# else:
# print('error')
# commonFuc().check_text_exist_result_text('error', 'succees')
# 第二种方式
# 第一种方式===========================
hos_goods_id
=
FileUtils
().
r_info8
(
'b5_spd3_core_business_flow'
,
'产品审核信息'
,
'message2'
)[
"hosGoodsId"
]
actual_value1
=
main2
(
hos_goods_id
)
print
(
actual_value1
)
# print('actual_value2',actual_value1)
actual_value2
=
get_process_list2
(
actual_value1
)
print
(
'actual_value2'
,
actual_value2
,
type
(
actual_value2
))
prov_hos_goods_id
=
'8d6273b7bca84dd8aace12b9422d7fd6'
expected_value2
=
commonFuc
().
get_business_data
(
'b5_spd3_core_business_flow'
,
'expected_value2'
,
prov_hos_goods_id
)
print
(
'expected_value2'
,
expected_value2
,
type
(
expected_value2
))
actual_value2
=
actual_value2
.
replace
(
" "
,
""
)
expected_value2
=
expected_value2
.
replace
(
" "
,
""
)
print
(
actual_value2
==
expected_value2
)
if
actual_value2
==
expected_value2
:
actual_value
=
delData
().
check_goods_info
(
hos_goods_id
)
print
(
'actual_value'
,
actual_value
)
expected_value
=
commonFuc
().
get_business_data
(
'b5_spd3_core_business_flow'
,
'expected_value'
)
print
(
'expected_value'
,
expected_value
)
if
actual_value
==
expected_value
:
print
(
'ok'
)
commonFuc
().
check_text_exist_result_text
(
'succees'
,
'succees'
)
else
:
print
(
'error'
)
commonFuc
().
check_text_exist_result_text
(
'error'
,
'succees'
)
# 第一种方式===========================
# 第二种方式=================================
# hos_goods_id = FileUtils().r_info8('b5_spd3_core_business_flow', '产品审核信息', 'message2')["hosGoodsId"]
# actual_value1 = main2(hos_goods_id)
# print(actual_value1)
# # print('actual_value2',actual_value1)
# actual_value2 = get_process_list2(actual_value1)
# print('actual_value2', actual_value2, type(actual_value2))
# prov_hos_goods_id = '8d6273b7bca84dd8aace12b9422d7fd6'
# expected_value2 = commonFuc().get_business_data('b5_spd3_core_business_flow', 'expected_value2', prov_hos_goods_id)
# print('expected_value2', expected_value2, type(expected_value2))
# actual_value2 = actual_value2.replace(" ", "")
# expected_value2 = expected_value2.replace(" ", "")
# print(actual_value2 == expected_value2)
# if actual_value2 == expected_value2:
# print('ok')
# commonFuc().check_text_exist_result_text('succees', 'succees')
# else:
# print('error')
# commonFuc().check_text_exist_result_text('error', 'succees')
# 第二种方式=================================
\ No newline at end of file
data/b5_spd3_core_business_flow/data
View file @
0441d068
...
...
@@ -444,5 +444,5 @@ json_headers2: {
"pickType": "TH"
}
"expected_value": "('000042
20
', 'h0347', 'p1e2
ba
', '
22f19044b8ae40f0
8aa
5
e1
70dcedc66e
', None, '116611
68
', '116611
68
', '116611
68
', '一次性注射器_低值
2^p7l
', '一次性注射器', 'mfrs-11229', '德国歌德公司 Geuder AG', '', None, '', 'ycxzsq_dz
2^p7l
', None, '支', 'G-31891', Decimal('1.000000'), 2, '3', 10, None, None, '', None, Decimal('99.9999'), None, '德国', None, None, '', 1, None, 0, None, 0, '', '', None, None, 1, 0, 1, 'p1e2
ba
:UID-0519
33
', datetime.datetime(2024, 6, 2
3
, 7,
0
,
59
), 'p1e2
ba
:UID-0519
33
', 0, 0, 1, None)"
"expected_value": "('000042
49
', 'h0347', 'p1e2
c6
', '
8d6273b7bca84dd
8aa
c
e1
2b9422d7fd6
', None, '116611
97
', '116611
97
', '116611
97
', '一次性注射器_低值
qPW6a
', '一次性注射器', 'mfrs-11229', '德国歌德公司 Geuder AG', '', None, '', 'ycxzsq_dz
qPW6a
', None, '支', 'G-31891', Decimal('1.000000'), 2, '3', 10, None, None, '', None, Decimal('99.9999'), None, '德国', None, None, '', 1, None, 0, None, 0, '', '', None, None, 1, 0, 1, 'p1e2
c6
:UID-0519
46
', datetime.datetime(2024, 6, 2
5
, 7,
1
,
34
), 'p1e2
c6
:UID-0519
46
', 0, 0, 1, None)"
"expected_value2": '{"hos_goods_code": "00004249","hos_id": "h0347","prov_id": "p1e2c6","prov_hos_goods_id": "%s","srv_id": null,"mdm_goods_code": "11661197","mdm_goods_spec_code": "11661197","spd_goods_code": "11661197","goods_name": "一次性注射器_低值qPW6a","goods_general_name": "一次性注射器","goods_mfrs_id": "mfrs-11229","goods_mfrs_name": "德国歌德公司 Geuder AG","goods_reg_cert": "","goods_agent_mfrs_id": null,"brand": "","short_pinyin": "ycxzsq_dzqPW6a","kind_sixtyeight_code": null,"unit": "支","goods_spec": "G-31891","goods_package": Decimal("1.000000"),"bar_code_mng": 2,"unique_code_strategy": "3","pur_mode": 10,"sub_pur_mode": null,"erp_code": null,"herp_code": "","hrp": null,"price": Decimal("99.9999"),"abroad_flag": null,"made": "德国","property": null,"mgr_level": null,"goods_desc": "","charge_flag": 1,"focus_control_type": null,"temp_flag": 0,"official_status": null,"focus_control": 0,"storage_conditions": "","transport_conditions": "","into_cost_flag": null,"rfid_flag": null,"purchase_flag": 1,"tb_status": 0,"version": 1,"create_user": "p1e2c6:UID-051946","create_time": datetime.datetime(2024,6,25,7,1,34),"last_modified_user": "p1e2c6:UID-051946","sterilize_flag": 0,"multi_charge_flag": 0,"use_frequency": 1,"charge_unit": null}'
report/summary.html
View file @
0441d068
...
...
@@ -95,7 +95,7 @@ setInterval(updateTime, 1000); // 每秒更新一次时间
<tr
width=
"600"
>
<td
class=
"details-col-elapsed"
><a
href=
'../log/产品检查/log.html'
target=
'_blank'
>
产品检查
</a></td>
<td
class=
"success"
>
成功
</td>
<td
class=
"details-col-elapsed"
>
0.3
52
</td>
<td
class=
"details-col-elapsed"
>
0.3
47
</td>
<td
class=
"details-col-elapsed"
>
xiaohesheng
</td>
</tr>
...
...
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