Skip to content
项目
群组
代码片段
帮助
正在加载...
帮助
为 GitLab 提交贡献
登录
切换导航
U
ubains-module-test
项目
项目
详情
活动
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
分枝图
比较
统计图
议题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
计划
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
分枝图
统计图
创建新议题
作业
提交
议题看板
打开侧边栏
郑晓兵
ubains-module-test
Commits
ec611221
提交
ec611221
authored
4月 02, 2025
作者:
陈泽健
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
将ngrok.cfg配置文件本机IP改为127.0.0.1,避免本机IP变化后无法打开测试报告。
上级
05bc8fe3
隐藏空白字符变更
内嵌
并排
正在显示
13 个修改的文件
包含
117 行增加
和
8 行删除
+117
-8
config.json
config.json
+2
-1
README.md
预定系统/README.md
+6
-2
SMC会控.py
预定系统/cases/会控-SMC/SMC会控.py
+1
-0
SMC会控.cpython-310.pyc
预定系统/cases/会控-SMC/__pycache__/SMC会控.cpython-310.pyc
+0
-0
腾讯会控.cpython-310.pyc
预定系统/cases/会控-腾讯会议/__pycache__/腾讯会控.cpython-310.pyc
+0
-0
腾讯会控.py
预定系统/cases/会控-腾讯会议/腾讯会控.py
+1
-0
OA组织架构同步.py
预定系统/cases/项目定制/工商银行项目24-11-20/用户管理/OA组织架构同步.py
+67
-0
__st__.py
预定系统/cases/项目定制/工商银行项目24-11-20/用户管理/__st__.py
+30
-0
ngrok.cfg
预定系统/ngrok/ngrok-自动化运行虚拟机/ngrok.cfg
+2
-2
ngrok.cfg
预定系统/ngrok/ngrok-调试主机/ngrok.cfg
+1
-1
定时执行功能测试.py
预定系统/定时执行功能测试.py
+7
-2
会议预定测试用例.xlsx
预定系统/测试数据/会议预定测试用例.xlsx
+0
-0
长安大学测试用例.xlsx
预定系统/测试数据/长安大学测试用例.xlsx
+0
-0
没有找到文件。
config.json
浏览文件 @
ec611221
...
...
@@ -4,5 +4,6 @@
"展厅运维巡检"
:
"http://192.168.5.200:8081/#/login"
,
"展厅统一平台巡检"
:
"http://192.168.5.200:38083/#/login"
,
"展厅讯飞系统巡检"
:
"http://192.168.5.201:8080/#/login"
,
"长安大学预定测试环境"
:
"https://192.168.5.186/#/login/logindf"
"长安大学预定测试环境"
:
"https://192.168.5.186/#/login/logindf"
,
"工商银行项目生产环境"
:
"https://192.168.52.63:21443/#/login/logindf"
}
\ No newline at end of file
预定系统/README.md
浏览文件 @
ec611221
...
...
@@ -271,4 +271,8 @@
-
优化write_xlsx_data函数实现表格自动填充测试结果和日志截图功能。
-
处理会议测试用例所有模块的JSON数据格式以及代码处理,规范化类名。
73.
2025-03-25
-
处理展厅巡检会议文件空问题,排查展厅巡检的讯飞系统转录,调试没有问题,正常转录成功。
\ No newline at end of file
-
处理展厅巡检会议文件空问题,排查展厅巡检的讯飞系统转录,调试没有问题,正常转录成功。
74.
2025-04-01
-
补充工商银行项目的JSON数据自动化测试。
75.
2025-04-02
-
将ngrok.cfg配置文件本机IP改为127.0.0.1,避免本机IP变化后无法打开测试报告。
\ No newline at end of file
预定系统/cases/会控-SMC/SMC会控.py
浏览文件 @
ec611221
...
...
@@ -66,6 +66,7 @@ class SMCMeeting:
sleep
(
2
)
elif
element_type
==
"click"
:
safe_click
((
locator_type
,
locator_value
),
wd
)
safe_click
((
locator_type
,
locator_value
),
wd
)
sleep
(
2
)
...
...
预定系统/cases/会控-SMC/__pycache__/SMC会控.cpython-310.pyc
浏览文件 @
ec611221
No preview for this file type
预定系统/cases/会控-腾讯会议/__pycache__/腾讯会控.cpython-310.pyc
浏览文件 @
ec611221
No preview for this file type
预定系统/cases/会控-腾讯会议/腾讯会控.py
浏览文件 @
ec611221
...
...
@@ -71,6 +71,7 @@ class TxcentMeeting:
sleep
(
2
)
elif
element_type
==
"click"
:
safe_click
((
locator_type
,
locator_value
),
wd
)
safe_click
((
locator_type
,
locator_value
),
wd
)
sleep
(
2
)
...
...
预定系统/cases/项目定制/工商银行项目24-11-20/用户管理/OA组织架构同步.py
0 → 100644
浏览文件 @
ec611221
import
sys
import
os
# 获取当前脚本的绝对路径
current_dir
=
os
.
path
.
dirname
(
os
.
path
.
abspath
(
__file__
))
# 构建预定系统的绝对路径
预定系统
_path
=
os
.
path
.
abspath
(
os
.
path
.
join
(
current_dir
,
'..'
,
'..'
,
'..'
,
'..'
))
# 添加路径
sys
.
path
.
append
(
预定系统
_path
)
# 导入模块
from
预定系统
.
Base
.
base
import
*
# 构建XLSX文件的绝对路径
xlsx_file_path
=
os
.
path
.
join
(
预定系统
_path
,
'测试数据'
,
'会议预定测试用例.xlsx'
)
class
AccountManagement
:
tags
=
[
'工商银行OA组织架构同步'
]
"""
执行指令是:
1.cd 预定系统
2.hytest --report_title 工商银行项目测试报告 --report_url_prefix http://nat.ubainsyun.com:31133 --tag 工商银行OA组织架构同步
"""
ddt_cases
=
read_xlsx_data
(
xlsx_file_path
,
sheet_name
=
'账号管理'
)
# 测试开始前调用clear_columns_in_xlsx函数,将测试用例中的测试结果和日志截图置空
clear_columns_in_xlsx
(
xlsx_file_path
,
sheet_name
=
'账号管理'
,
columns_to_clear
=
[
'测试结果'
,
'测试频次'
,
'日志截图'
])
def
teststeps
(
self
):
"""
执行测试步骤函数,主要用于执行读取的测试用例并进行信息统计模块功能测试操作
"""
# 从全局存储中获取webdriver对象
wd
=
GSTORE
[
'wd'
]
name
=
self
.
name
for
step
in
self
.
para
:
# 赋值页面类型page
page_type
=
step
.
get
(
'page'
)
# 赋值元素定位类型,并将字符串转为Enum类型
locator_type
=
get_by_enum
(
step
.
get
(
'locator_type'
))
# 赋值元素值
locator_value
=
step
.
get
(
'locator_value'
)
# 赋值元素类型,例如:click点击、input输入框等
element_type
=
step
.
get
(
'element_type'
)
# 赋值元素值,例如输入框的输入值
element_value
=
step
.
get
(
'element_value'
)
# 赋值预期结果
expented_result
=
step
.
get
(
'expented_result'
)
if
element_type
==
"click"
:
safe_click
((
locator_type
,
locator_value
),
wd
)
sleep
(
2
)
elif
element_type
==
"input"
:
safe_send_keys
((
locator_type
,
locator_value
),
element_value
,
wd
)
sleep
(
2
)
elif
element_type
==
"getTips"
:
notify_text
=
get_notify_text
(
wd
,
(
locator_type
,
locator_value
))
INFO
(
f
"获取到的提示信息为:{notify_text}"
)
CHECK_POINT
(
f
"获取到的提示信息为:{notify_text}"
,
expented_result
in
notify_text
)
SELENIUM_LOG_SCREEN
(
wd
,
"50"
)
elif
element_type
==
"getText"
:
text
=
elment_get_text
((
locator_type
,
locator_value
),
wd
)
INFO
(
f
"获取到的文本信息为:{text}"
)
CHECK_POINT
(
f
"获取到的文本信息为:{text}"
,
expented_result
in
text
)
SELENIUM_LOG_SCREEN
(
wd
,
"50"
)
\ No newline at end of file
预定系统/cases/项目定制/工商银行项目24-11-20/用户管理/__st__.py
0 → 100644
浏览文件 @
ec611221
import
sys
import
os
# 获取当前脚本的绝对路径
current_dir
=
os
.
path
.
dirname
(
os
.
path
.
abspath
(
__file__
))
# 构建预定系统的绝对路径
预定系统
_path
=
os
.
path
.
abspath
(
os
.
path
.
join
(
current_dir
,
'..'
,
'..'
))
# 添加路径
sys
.
path
.
append
(
预定系统
_path
)
# 导入模块
from
预定系统
.
Base
.
base
import
*
def
suite_setup
():
STEP
(
1
,
"初始化浏览器"
)
# 初始化浏览器与系统地址
browser_init
(
"工商银行项目生产环境"
)
user_login
(
"admin"
,
"Admin@686868"
)
sleep
(
2
)
wd
=
GSTORE
[
'wd'
]
# 进入后台管理界面
safe_click
((
By
.
XPATH
,
"//img[@title='后台系统']"
),
wd
)
sleep
(
2
)
# 展开账号管理模块
safe_click
((
By
.
XPATH
,
"//span[contains(text(),'账号管理')]"
),
wd
)
def
suite_teardown
():
wd
=
GSTORE
[
'wd'
]
wd
.
quit
()
\ No newline at end of file
预定系统/ngrok/ngrok-自动化运行虚拟机/ngrok.cfg
浏览文件 @
ec611221
...
...
@@ -4,4 +4,4 @@ tunnels:
nat1:
remote_port: 31134
proto:
tcp: "192.168.5.88:81"
\ No newline at end of file
tcp: "127.0.0.1:81"
\ No newline at end of file
预定系统/ngrok/ngrok-调试主机/ngrok.cfg
浏览文件 @
ec611221
...
...
@@ -3,5 +3,5 @@ trust_host_root_certs: false
tunnels:
nat1:
proto:
tcp: 1
92.168.1.133
:80
tcp: 1
27.0.0.1
:80
remote_port: 31133
预定系统/定时执行功能测试.py
浏览文件 @
ec611221
...
...
@@ -84,8 +84,13 @@ start_workers(3)
# start_ngrok(ngrok_path, ngrok_config_path)
# 定时执行展厅巡检任务
schedule
.
every
()
.
day
.
at
(
"07:45"
)
.
do
(
run_task
,
run_automation_test
,
report_title
=
"展厅巡检测试报告"
,
report_url_prefix
=
"http://nat.ubainsyun.com:31133"
,
test_case
=
"展厅巡检"
,
ding_type
=
"展厅巡检"
)
# schedule.every().day.at("11:48").do(run_task, run_automation_test, report_title="钉钉报告发送调试", report_url_prefix="http://nat.ubainsyun.com:31133", test_case="新-登录测试", ding_type="展厅巡检")
# schedule.every().day.at("07:45").do(run_task, run_automation_test, report_title="展厅巡检测试报告", report_url_prefix="http://nat.ubainsyun.com:31133", test_case="展厅巡检", ding_type="展厅巡检")
schedule
.
every
()
.
monday
.
at
(
"07:45"
)
.
do
(
run_task
,
run_automation_test
,
report_title
=
"展厅巡检测试报告"
,
report_url_prefix
=
"http://nat.ubainsyun.com:31133"
,
test_case
=
"展厅巡检"
,
ding_type
=
"展厅巡检"
)
schedule
.
every
()
.
thursday
.
at
(
"07:45"
)
.
do
(
run_task
,
run_automation_test
,
report_title
=
"展厅巡检测试报告"
,
report_url_prefix
=
"http://nat.ubainsyun.com:31133"
,
test_case
=
"展厅巡检"
,
ding_type
=
"展厅巡检"
)
schedule
.
every
()
.
wednesday
.
at
(
"07:45"
)
.
do
(
run_task
,
run_automation_test
,
report_title
=
"展厅巡检测试报告"
,
report_url_prefix
=
"http://nat.ubainsyun.com:31133"
,
test_case
=
"展厅巡检"
,
ding_type
=
"展厅巡检"
)
schedule
.
every
()
.
tuesday
.
at
(
"07:45"
)
.
do
(
run_task
,
run_automation_test
,
report_title
=
"展厅巡检测试报告"
,
report_url_prefix
=
"http://nat.ubainsyun.com:31133"
,
test_case
=
"展厅巡检"
,
ding_type
=
"展厅巡检"
)
schedule
.
every
()
.
friday
.
at
(
"07:45"
)
.
do
(
run_task
,
run_automation_test
,
report_title
=
"展厅巡检测试报告"
,
report_url_prefix
=
"http://nat.ubainsyun.com:31133"
,
test_case
=
"展厅巡检"
,
ding_type
=
"展厅巡检"
)
# 调试使用
# schedule.every().day.at("08:44").do(run_task, run_automation_test, report_title="展厅调试", report_url_prefix="http://nat.ubainsyun.com:31133", test_case="腾讯会议", ding_type="展厅巡检")
...
...
预定系统/测试数据/会议预定测试用例.xlsx
浏览文件 @
ec611221
No preview for this file type
预定系统/测试数据/长安大学测试用例.xlsx
浏览文件 @
ec611221
No preview for this file type
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论