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
af536952
Commit
af536952
authored
Sep 13, 2023
by
xiao-hesheng
Browse files
优化脚本
parent
b2b9fe2c
Changes
9
Hide whitespace changes
Inline
Side-by-side
air_case/mdm3-ea/注册企业锁定认领审核流程.air/注册企业锁定认领审核流程.py
View file @
af536952
...
@@ -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 @
af536952
...
@@ -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-hs/注册医院审核通过.air/注册医院审核通过.py
View file @
af536952
...
@@ -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 @
af536952
...
@@ -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 @
af536952
...
@@ -4,7 +4,7 @@ from common.timeUtils import timeUtils
...
@@ -4,7 +4,7 @@ from common.timeUtils import timeUtils
__author__
=
"xiaohesheng"
__author__
=
"xiaohesheng"
"""
"""
case_tag:api,mdm-web
企业
审核,id22
48
,id22
48
-1,sit,on,2023091201
case_tag:api,mdm-web
产品新增和
审核,id22
51
,id22
51
-1,sit,on,2023091201
主数据平台:产品新增和审核通过
主数据平台:产品新增和审核通过
"""
"""
...
...
air_case/mdm3-pim/产品规格新增和审核通过.air/产品规格新增和审核通过.py
View file @
af536952
# -*- encoding=utf8 -*-
# -*- encoding=utf8 -*-
import
sys
import
sys
from
air_case.mdm_login.登录外网系统.登录外网系统
import
login_system
from
common.timeUtils
import
timeUtils
from
common.timeUtils
import
timeUtils
from
common.common_func
import
commonFuc
from
common.fileUtls
import
*
__author__
=
"xiaohesheng"
__author__
=
"xiaohesheng"
"""
"""
case_tag:api,mdm-web
企业审核
,id22
48
,id22
48
-2,sit,on,2023091202
case_tag:api,mdm-web
产品规格新增
,id22
51
,id22
51
-2,sit,on,2023091202
主数据平台:
产品新增和审核通过
主数据平台:
web产品规格新增
"""
"""
from
common.common_func
import
commonFuc
module
=
"mdm3-pim"
pro_path
=
commonFuc
().
get_pro_path
()
# 登录
from
airtest.core.api
import
using
info
=
FileUtils
().
r_info
(
module
,
'产品新增'
)
username
=
info
[
'username'
]
password
=
commonFuc
().
get_business_data
(
module
,
"password"
)
print
(
username
,
password
)
# 获取token和projectCode
token
,
projectCode
,
uxid
,
corpId
=
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, "payload", corpId)
#
# # 发送请求
# result = commonFuc().http_post(url, request_body, headers)
# 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/mdm_login/登录外网系统/登录外网系统.py
View file @
af536952
...
@@ -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/fileUtls.py
View file @
af536952
...
@@ -40,7 +40,7 @@ if __name__ == '__main__':
...
@@ -40,7 +40,7 @@ if __name__ == '__main__':
# info=("aaaa","bbbbbb","mdm3-pim")
# info=("aaaa","bbbbbb","mdm3-pim")
# FileUtils().w_info(info,"产品新增")
# FileUtils().w_info(info,"产品新增")
aa
=
FileUtils
().
r_info
(
"mdm3-pim"
,
"产品新增"
)
aa
=
FileUtils
().
r_info
(
"mdm3-pim"
,
"产品新增"
)
print
(
aa
)
print
(
aa
[
'username'
]
)
...
...
report/summary.html
View file @
af536952
...
@@ -56,7 +56,7 @@
...
@@ -56,7 +56,7 @@
<tr
width=
"600"
>
<tr
width=
"600"
>
<td
class=
'details-col-elapsed'
>
1
</td>
<td
class=
'details-col-elapsed'
>
1
</td>
<td
class=
'details-col-elapsed'
>
1
</td>
<td
class=
'details-col-elapsed'
>
1
</td>
<td
class=
'details-col-elapsed'
>
0分
2
秒
</td>
<td
class=
'details-col-elapsed'
>
0分
1
秒
</td>
<td
class=
"details-col-elapsed"
>
100.0%
</td>
<td
class=
"details-col-elapsed"
>
100.0%
</td>
</tr>
</tr>
</table>
</table>
...
@@ -72,9 +72,9 @@
...
@@ -72,9 +72,9 @@
</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"
>
2.531
</td>
<td
class=
"details-col-elapsed"
>
1.268
</td>
<td
class=
"details-col-elapsed"
>
xiaohesheng
</td>
<td
class=
"details-col-elapsed"
>
xiaohesheng
</td>
</tr>
</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