提交 4a865320 authored 作者: 陈泽健's avatar 陈泽健

补充读取测试用例JSON数据安卓信息、系统管理和信息发布模块的部分功能测试。处理优化富创项目的新需求topic主题与MQTT消息体。

上级 7d49d20c
......@@ -395,7 +395,11 @@ class Mqtt:
"startTime": config['startTime'],
"endTime": config['endTime'],
"companyNumber": config['companyNumber'],
"participantList": ["JiaoJiao", "JiaYu", "DuiFangZhengZaiZhangTouFa", "DuoTangMaLaBan", "DaLi", "500mlLingDu", "tt.", "wilbur"]
"participantList": ["JiaoJiao", "JiaYu", "DuiFangZhengZaiZhangTouFa", "DuoTangMaLaBan", "DaLi", "500mlLingDu", "tt.", "wilbur", "q"],
"signInBeforeMinutes": config['signInBeforeMinutes'],
"enableSignOut": config['enableSignOut'],
"signOutMinutesAfterSignIn": config['signOutMinutesAfterSignIn'],
"signOutAfterEndMinutes": config['signOutAfterEndMinutes']
}]
})
......@@ -411,11 +415,7 @@ class Mqtt:
# 根据 updateMethod 设置不同的背景图片字段
if config.get('updateMethod') == 'restoreDefault':
message['data']['updateMethod'] = 'restoreDefault'
# 判断背景图的类型是Base64还是URL
if "backgroundImageType" == "backgroundImageBase64":
message['data']['backgroundImageBase64'] = config['backgroundImageValue']
elif 'backgroundImageType' == "backgroundImageURL":
message['data']['backgroundImageURL'] = config['backgroundImageValue']
elif config.get('updateMethod') == 'single':
message['data']['updateMethod'] = 'single'
# 判断背景图的类型是Base64还是URL
......
......@@ -254,4 +254,5 @@
67. 2025-03-12
- 实现读取测试用例JSON数据全局配置、账号管理以及信息统计的部分功能测试。优化get_notify_text传参。
- 补充读取测试用例JSON数据会议审批和会议室管理的部分功能测试。优化message_meeting函数传参。
- 补充读取测试用例JSON数据授权码管理的部分功能测试。
\ No newline at end of file
- 补充读取测试用例JSON数据授权码管理的部分功能测试。
- 补充读取测试用例JSON数据安卓信息、系统管理和信息发布模块的部分功能测试。处理优化富创项目的新需求topic主题与MQTT消息体。
\ No newline at end of file
......@@ -17,7 +17,7 @@ current_dir = os.path.dirname(os.path.abspath(__file__))
xlsx_file_path = os.path.join(current_dir, '..', '..', '测试数据', '会议预定测试用例.xlsx')
class SMCMeeting_00x:
tags = ['新-会控SMC测试']
tags = ['新-会控SMC测试', 'JSON测试']
"""
执行指令是:
1.cd 预定系统
......
......@@ -17,7 +17,7 @@ current_dir = os.path.dirname(os.path.abspath(__file__))
xlsx_file_path = os.path.join(current_dir, '..', '..', '测试数据', '会议预定测试用例.xlsx')
class TxcentMeeting_00x:
tags = ['新-会控腾讯测试']
tags = ['新-会控腾讯测试', 'JSON测试']
"""
执行指令是:
1.cd 预定系统
......
......@@ -17,7 +17,7 @@ current_dir = os.path.dirname(os.path.abspath(__file__))
xlsx_file_path = os.path.join(current_dir, '..', '..', '测试数据', '会议预定测试用例.xlsx')
class EditMessage_00x:
tags = ['新-会议修改测试']
tags = ['新-会议修改测试', 'JSON测试']
"""
执行指令是:
1.cd 预定系统
......
......@@ -17,7 +17,7 @@ current_dir = os.path.dirname(os.path.abspath(__file__))
xlsx_file_path = os.path.join(current_dir, '..', '..', '测试数据', '会议预定测试用例.xlsx')
class MeetingMessage_00x:
tags = ['新-会议创建测试']
tags = ['新-会议创建测试', 'JSON测试']
"""
执行指令是:
1.cd 预定系统
......
......@@ -17,7 +17,7 @@ current_dir = os.path.dirname(os.path.abspath(__file__))
xlsx_file_path = os.path.join(current_dir, '..', '..', '测试数据', '会议预定测试用例.xlsx')
class HistoryMessage_00x:
tags = ['新-会议历史记录测试']
tags = ['新-会议历史记录测试', 'JSON测试']
"""
执行指令是:
1.cd 预定系统
......
......@@ -17,7 +17,7 @@ current_dir = os.path.dirname(os.path.abspath(__file__))
xlsx_file_path = os.path.join(current_dir, '..', '..', '测试数据', '会议预定测试用例.xlsx')
class MessageApproval:
tags = ['新-会议审批测试']
tags = ['新-会议审批测试', 'JSON测试']
"""
执行指令是:
1.cd 预定系统
......
......@@ -18,7 +18,7 @@ xlsx_file_path = os.path.join(current_dir, '..', '..', '测试数据', '会议
class MeetingList_000x:
tags = ['新-会议室列表']
tags = ['新-会议室列表', 'JSON测试']
"""
执行指令是:
1.cd 预定系统
......
......@@ -17,7 +17,7 @@ current_dir = os.path.dirname(os.path.abspath(__file__))
xlsx_file_path = os.path.join(current_dir, '..', '..', '测试数据', '会议预定测试用例.xlsx')
class ConferenceStatistics:
tags = ['新-会议室管理测试']
tags = ['新-会议室管理测试', 'JSON测试']
"""
执行指令是:
1.cd 预定系统
......
......@@ -17,7 +17,7 @@ current_dir = os.path.dirname(os.path.abspath(__file__))
xlsx_file_path = os.path.join(current_dir, '..', '..', '测试数据', '会议预定测试用例.xlsx')
class MessageTemplate_00x:
tags = ['新-会议模板测试']
tags = ['新-会议模板测试', 'JSON测试']
"""
执行指令是:
1.cd 预定系统
......
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("标准版预定系统")
admin_login("admin@Test", "Ubains@4321")
sleep(2)
wd = GSTORE['wd']
# 进入后台模块
safe_click((By.XPATH, "//img[@title='后台系统']"),wd)
# 展开全局配置模块
safe_click((By.XPATH, "//span[contains(text(),'信息发布')]"), wd)
def suite_teardown():
wd = GSTORE['wd']
wd.quit()
\ No newline at end of file
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 *
# 获取当前脚本所在的目录
current_dir = os.path.dirname(os.path.abspath(__file__))
# 构建XLSX文件的绝对路径
xlsx_file_path = os.path.join(current_dir, '..', '..', '测试数据', '会议预定测试用例.xlsx')
class AndroidInformation:
tags = ['新-信息发布测试', 'JSON测试']
"""
执行指令是:
1.cd 预定系统
2.hytest --report_title 信息发布测试报告 --report_url_prefix http://nat.ubainsyun.com:31133 --tag 新-信息发布测试
"""
def teststeps(self):
"""
执行测试步骤函数,主要用于执行读取的测试用例并进行安卓信息模块功能测试操作
"""
# 从全局存储中获取webdriver对象
wd = GSTORE['wd']
# 读取Excel文件中的测试用例数据
ddt_cases = read_xlsx_data(xlsx_file_path, "信息发布")
# 遍历 ddt_cases 并获取每一个 JSON 对象
for case in ddt_cases:
for step in case:
print(f"当前步骤: {step}")
# 先赋值
locator_type = get_by_enum(step.get('locator_type'))
locator_value = step.get('locator_value')
element_type = step.get('element_type')
element_value = step.get('element_value')
expented_result = step.get('expented_result')
# 判断页面功能类型
if step.get("page") == "AndroidInformation":
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)
send_keyboard((locator_type, locator_value), wd)
sleep(2)
elif element_type == "getText":
notify_text = elment_get_text((locator_type,locator_value), wd)
INFO(f"获取的文本为:{notify_text}")
CHECK_POINT("判断当前界面是否正确", expented_result in notify_text)
\ No newline at end of file
......@@ -17,7 +17,7 @@ current_dir = os.path.dirname(os.path.abspath(__file__))
xlsx_file_path = os.path.join(current_dir, '..', '..', '测试数据', '会议预定测试用例.xlsx')
class ConferenceStatistics:
tags = ['新-信息统计测试']
tags = ['新-信息统计测试', 'JSON测试']
"""
执行指令是:
1.cd 预定系统
......
......@@ -17,7 +17,7 @@ current_dir = os.path.dirname(os.path.abspath(__file__))
xlsx_file_path = os.path.join(current_dir, '..', '..', '测试数据', '会议预定测试用例.xlsx')
class GlobalConfiguration:
tags = ['新-全局配置测试']
tags = ['新-全局配置测试', 'JSON测试']
"""
执行指令是:
1.cd 预定系统
......
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("标准版预定系统")
admin_login("admin@Test", "Ubains@4321")
sleep(2)
wd = GSTORE['wd']
# 进入后台模块
safe_click((By.XPATH, "//img[@title='后台系统']"),wd)
# 展开全局配置模块
safe_click((By.XPATH, "//span[contains(text(),'设备管理')]"), wd)
sleep(1)
# 进入全局配置界面
safe_click((By.XPATH, "//li[contains(text(),'安卓信息')]"), wd)
def suite_teardown():
wd = GSTORE['wd']
wd.quit()
\ No newline at end of file
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 *
# 获取当前脚本所在的目录
current_dir = os.path.dirname(os.path.abspath(__file__))
# 构建XLSX文件的绝对路径
xlsx_file_path = os.path.join(current_dir, '..', '..', '测试数据', '会议预定测试用例.xlsx')
class AndroidInformation:
tags = ['新-安卓信息测试', 'JSON测试']
"""
执行指令是:
1.cd 预定系统
2.hytest --report_title 安卓信息测试报告 --report_url_prefix http://nat.ubainsyun.com:31133 --tag 新-安卓信息测试
"""
def teststeps(self):
"""
执行测试步骤函数,主要用于执行读取的测试用例并进行安卓信息模块功能测试操作
"""
# 从全局存储中获取webdriver对象
wd = GSTORE['wd']
# 读取Excel文件中的测试用例数据
ddt_cases = read_xlsx_data(xlsx_file_path, "安卓信息")
# 遍历 ddt_cases 并获取每一个 JSON 对象
for case in ddt_cases:
for step in case:
print(f"当前步骤: {step}")
# 先赋值
locator_type = get_by_enum(step.get('locator_type'))
locator_value = step.get('locator_value')
element_type = step.get('element_type')
element_value = step.get('element_value')
expented_result = step.get('expented_result')
# 判断页面功能类型
if step.get("page") == "AndroidInformation":
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 == "getText":
notify_text = elment_get_text((locator_type,locator_value), wd)
INFO(f"获取的文本为:{notify_text}")
CHECK_POINT("判断当前界面是否正确", expented_result in notify_text)
\ No newline at end of file
......@@ -17,7 +17,7 @@ current_dir = os.path.dirname(os.path.abspath(__file__))
xlsx_file_path = os.path.join(current_dir, '..', '..', '测试数据', '会议预定测试用例.xlsx')
class TokenManage:
tags = ['新-授权码管理测试']
tags = ['新-授权码管理测试', 'JSON测试']
"""
执行指令是:
1.cd 预定系统
......
import sys
import os
from time import sleep
# 获取当前脚本的绝对路径
current_dir = os.path.dirname(os.path.abspath(__file__))
# 构建预定系统的绝对路径
预定系统_path = os.path.abspath(os.path.join(current_dir, '..','..'))
预定系统_path = os.path.abspath(os.path.join(current_dir, '..', '..'))
# 添加路径
sys.path.append(预定系统_path)
# 导入模块
from 预定系统.Base.base import *
def suite_setup():
STEP(1, "初始化浏览器")
# 初始化浏览器与系统地址
browser_init("标准版预定系统")
admin_login("admin@Test", "Ubains@4321")
sleep(2)
wd = GSTORE['wd']
admin_login("admin@ZDH", "Ubains@4321")
enter_the_backend()
INFO("打开系统管理下拉菜单")
# 进入后台模块
safe_click((By.XPATH, "//img[@title='后台系统']"), wd)
# 展开全局配置模块
safe_click((By.XPATH, "//span[contains(text(),'系统管理')]"), wd)
sleep(1)
INFO("进入系统设置模块")
safe_click((By.XPATH, "//li[contains(text(),'系统信息')]"), wd)
sleep(2)
\ No newline at end of file
def suite_teardown():
wd = GSTORE['wd']
wd.quit()
\ No newline at end of file
from time import sleep
from hytest import *
import sys
import os
# 获取当前脚本的绝对路径
current_dir = os.path.dirname(os.path.abspath(__file__))
# 构建预定系统的绝对路径
预定系统_path = os.path.abspath(os.path.join(current_dir, '..','..','..'))
预定系统_path = os.path.abspath(os.path.join(current_dir, '..', '..', '..'))
# 添加路径
sys.path.append(预定系统_path)
# 导入模块
try:
from 预定系统.Base.base import *
except ModuleNotFoundError as e:
print(f"ModuleNotFoundError: {e}")
print("尝试使用绝对路径导入")
from 预定系统.Base.base import *
from 预定系统.Base.base import *
# 获取当前脚本所在的目录
current_dir = os.path.dirname(os.path.abspath(__file__))
# 构建CSV文件的绝对路径
csv_file_path = os.path.join(current_dir, '../../测试数据/系统设置模块/系统设置.csv')
class System_Setting_000x:
tags = ['系统设置功能','预定系统功能']
# 构建XLSX文件的绝对路径
xlsx_file_path = os.path.join(current_dir, '..', '..', '测试数据', '会议预定测试用例.xlsx')
class SystemManage:
tags = ['新-系统管理测试', 'JSON测试']
"""
执行指令:
执行指令
1.cd 预定系统
2.hytest --report_title 系统设置测试报告 --test 系统设置_001
2.hytest --report_title 系统管理测试报告 --report_url_prefix http://nat.ubainsyun.com:31133 --tag 新-系统管理测试
"""
ddt_cases = read_csv_data(csv_file_path)
def teststeps(self):
"""
执行测试步骤以用户新增功能。
本函数根据参数输入账号、用户名、密码、确认密码、部门、性别、手机号和邮箱,并检查新增后的提示信息是否与预期相符。
执行测试步骤函数,主要用于执行读取的测试用例并进行系统管理模块功能测试操作
"""
# 初始化通知文本为空字符串
notify_fastdfs_text = ""
notify_mysql_text = ""
notify_redis_text = ""
version_qianduan_text = ""
version_houdaun_text = ""
# 从全局存储中获取webdriver实例
# 从全局存储中获取webdriver对象
wd = GSTORE['wd']
name = self.name
check_text = self.para
STEP(1, "检查fastDFS服务运行是否正常")
sleep(3)
notify_fastdfs_text = elment_get_text((By.XPATH,"(//div[@class='detail_content'][contains(text(),'正常启动')])[1]"), wd)
notify_mysql_text = elment_get_text((By.XPATH,"(//div[@class='detail_content'][contains(text(),'正常启动')])[2]"),wd)
notify_redis_text = elment_get_text((By.XPATH,"(//div[@class='detail_content'][contains(text(),'正常启动')])[3]"),wd)
INFO(f"fastDFS状态:{notify_fastdfs_text},mysql状态:{notify_mysql_text},redis状态:{notify_redis_text}")
# 读取Excel文件中的测试用例数据
ddt_cases = read_xlsx_data(xlsx_file_path, "系统管理")
# 遍历 ddt_cases 并获取每一个 JSON 对象
for case in ddt_cases:
for step in case:
print(f"当前步骤: {step}")
# 先赋值
locator_type = get_by_enum(step.get('locator_type'))
locator_value = step.get('locator_value')
element_type = step.get('element_type')
element_value = step.get('element_value')
expented_result = step.get('expented_result')
version_qianduan_text = elment_get_text((By.XPATH,"/html/body/div[1]/div/div[2]/div[2]/div/div/div[2]/div[4]/div[1]/div/div"), wd)
version_houdaun_text = elment_get_text((By.XPATH,"/html/body/div[1]/div/div[2]/div[2]/div/div/div[2]/div[5]/div[1]/div/div"), wd)
INFO(f"前端版本:{version_qianduan_text},后端版本:{version_houdaun_text}")
# 判断页面功能类型
if step.get("page") == "SystemLog":
# 判断page为系统日志界面,点击【系统日志】,进入系统日志模块
safe_click((By.XPATH, "//li[contains(text(),'系统日志')]"), wd)
sleep(1)
# CHECK_POINT("检查fastDFS服务运行", check_text in notify_fastdfs_text)
# CHECK_POINT("检查mysql服务运行", check_text in notify_mysql_text)
# CHECK_POINT("检查redis服务运行", check_text in notify_redis_text)
\ No newline at end of file
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 == "getText":
notify_text = elment_get_text((locator_type,locator_value), wd)
INFO(f"获取的文本为:{notify_text}")
CHECK_POINT("判断当前界面是否正确", expented_result in notify_text)
\ No newline at end of file
......@@ -17,7 +17,7 @@ current_dir = os.path.dirname(os.path.abspath(__file__))
xlsx_file_path = os.path.join(current_dir, '..', '..', '测试数据', '会议预定测试用例.xlsx')
class ConferenceStatistics:
tags = ['新-账号管理测试']
tags = ['新-账号管理测试', 'JSON测试']
"""
执行指令是:
1.cd 预定系统
......
执行 checkFirewalld:
防火墙状态:未启动
=============================================================================================
执行 checkService:
[m]ysql 服务正常
[r]edis 服务正常
[f]dfs_storaged 服务正常
[f]dfs_tracker 服务正常
[e]mqx 服务正常
ubains-meeting-api-1.0-SNAPSHOT.jar 服务正常
[u]bains-meeting-inner-api-1.0-SNAPSHOT.jar 服务正常
[u]wsgi 服务正常
=============================================================================================
执行 checkDockerPort:
upython :::8000->8000/tcp,
upython :::8002->8002/tcp,
upython :::8081->8081/tcp,
upython :::8443->8443/tcp,
upython :::9009->9009/tcp
uplayer :::18000->8000/tcp,
uplayer :::18002->8002/tcp,
uplayer :::18081->8081/tcp,
uplayer :::18082->8082/tcp
umysql2 :::8306->3306/tcp
ujava2 :::443->443/tcp,
ujava2 :::554->554/tcp,
ujava2 :::1935->1935/tcp,
ujava2 :::2333-2334->2333-2334/tcp,
ujava2 :::8079-8080->8079-8080/tcp,
ujava2 :::8085-8088->8085-8088/tcp,
ujava2 :::8889->8889/tcp,
ujava2 :::8996-8999->8996-8999/tcp,
ujava2 :::10000->10000/tcp,
uredis :::6379->6379/tcp
uemqx :::1883->1883/tcp,
uemqx :::8083-8084->8083-8084/tcp,
uemqx :::8883->8883/tcp,
uemqx :::18083->18083/tcp,
=============================================================================================
执行 serverDataRecorder:
2024-12-20 09:59:03 [INFO] docker服务正常
2024-12-20 09:59:03 [INFO] [m]ysql 服务正常
2024-12-20 09:59:03 [INFO] [r]edis 服务正常
2024-12-20 09:59:03 [INFO] [f]dfs_storaged 服务正常
2024-12-20 09:59:03 [INFO] [f]dfs_tracker 服务正常
2024-12-20 09:59:03 [INFO] [e]pmd 服务正常
2024-12-20 09:59:03 [INFO] [u]wsgi 服务正常
2024-12-20 09:59:03 [INFO] ubains-meeting-api-1.0-SNAPSHOT.jar 服务正常
2024-12-20 09:59:03 [INFO] [u]bains-meeting-inner-api-1.0-SNAPSHOT.jar 服务正常
=============================================================================================
执行 network_check:
Called network_check with parameters: network_check route
网络流量和连接信息 - 2024-12-20 09:59:03
路由配置表信息:
default via 192.168.5.1 dev enp4s1 proto static metric 100
172.17.0.0/16 dev docker0 proto kernel scope link src 172.17.0.1
192.168.5.0/24 dev enp4s1 proto kernel scope link src 192.168.5.218 metric 100
=============================================================================================
执行 network_check:
Called network_check with parameters: network_check interface
网络流量和连接信息 - 2024-12-20 09:59:03
网络接口状态、MAC 和 IPv4 地址:
RTNETLINK answers: No such device
Cannot send link get request: No such device
lo:
状态: UNKNOWN
MAC地址:
IPv4地址: 127.0.0.1/8
RTNETLINK answers: No such device
Cannot send link get request: No such device
enp4s1:
状态: UP
MAC地址:
IPv4地址: 192.168.5.218/24
RTNETLINK answers: No such device
Cannot send link get request: No such device
docker0:
状态: UP
MAC地址:
IPv4地址: 172.17.0.1/16
=============================================================================================
执行 network_check:
Called network_check with parameters: network_check connections
网络流量和连接信息 - 2024-12-20 09:59:03
网络连接和端口统计:
Netid State Local
tcp LISTEN 0.0.0.0:8085
tcp LISTEN 0.0.0.0:8086
tcp LISTEN 0.0.0.0:22
tcp LISTEN 0.0.0.0:8087
tcp LISTEN 0.0.0.0:8088
tcp LISTEN 0.0.0.0:23000
tcp LISTEN 0.0.0.0:8888
tcp LISTEN 0.0.0.0:8889
tcp LISTEN 0.0.0.0:8443
tcp LISTEN 0.0.0.0:443
tcp LISTEN 0.0.0.0:1883
tcp LISTEN 0.0.0.0:2333
tcp LISTEN 0.0.0.0:2334
tcp LISTEN 0.0.0.0:8000
tcp LISTEN 0.0.0.0:18081
tcp LISTEN 0.0.0.0:8002
tcp LISTEN 0.0.0.0:18082
tcp LISTEN 0.0.0.0:18083
tcp LISTEN 0.0.0.0:8996
tcp LISTEN 0.0.0.0:8997
tcp LISTEN 0.0.0.0:8998
tcp LISTEN 0.0.0.0:8999
tcp LISTEN 0.0.0.0:554
tcp LISTEN 0.0.0.0:22122
tcp LISTEN 0.0.0.0:6379
tcp LISTEN 0.0.0.0:1935
tcp LISTEN 0.0.0.0:8079
tcp LISTEN 0.0.0.0:111
tcp LISTEN 0.0.0.0:80
tcp LISTEN 0.0.0.0:8080
tcp LISTEN 0.0.0.0:10000
tcp LISTEN 0.0.0.0:18000
tcp LISTEN 0.0.0.0:8081
tcp LISTEN 0.0.0.0:9009
tcp LISTEN 0.0.0.0:8306
tcp LISTEN 0.0.0.0:18002
tcp LISTEN 0.0.0.0:8083
tcp LISTEN 0.0.0.0:8883
tcp LISTEN 0.0.0.0:8084
tcp LISTEN *:4443
tcp LISTEN *:8866
tcp LISTEN *:9090
tcp LISTEN *:8040
tcp LISTEN *:12371
tcp LISTEN *:11443
=============================================================================================
执行 network_check:
Called network_check with parameters: network_check firewall
网络流量和连接信息 - 2024-12-20 09:59:03
防火墙规则:
Chain INPUT (policy ACCEPT 1878K packets, 952M bytes)
pkts bytes target prot opt in out source destination
Chain FORWARD (policy DROP 0 packets, 0 bytes)
pkts bytes target prot opt in out source destination
22M 19G DOCKER-USER all -- * * 0.0.0.0/0 0.0.0.0/0
22M 19G DOCKER-ISOLATION-STAGE-1 all -- * * 0.0.0.0/0 0.0.0.0/0
11M 5221M ACCEPT all -- * docker0 0.0.0.0/0 0.0.0.0/0 ctstate RELATED,ESTABLISHED
137K 7342K DOCKER all -- * docker0 0.0.0.0/0 0.0.0.0/0
11M 14G ACCEPT all -- docker0 !docker0 0.0.0.0/0 0.0.0.0/0
0 0 ACCEPT all -- docker0 docker0 0.0.0.0/0 0.0.0.0/0
Chain OUTPUT (policy ACCEPT 1834K packets, 947M bytes)
pkts bytes target prot opt in out source destination
Chain DOCKER (1 references)
pkts bytes target prot opt in out source destination
85 4420 ACCEPT tcp -- !docker0 docker0 0.0.0.0/0 172.17.0.4 tcp dpt:6379
82 4264 ACCEPT tcp -- !docker0 docker0 0.0.0.0/0 172.17.0.6 tcp dpt:8082
0 0 ACCEPT tcp -- !docker0 docker0 0.0.0.0/0 172.17.0.6 tcp dpt:8081
0 0 ACCEPT tcp -- !docker0 docker0 0.0.0.0/0 172.17.0.6 tcp dpt:8002
0 0 ACCEPT tcp -- !docker0 docker0 0.0.0.0/0 172.17.0.6 tcp dpt:8000
0 0 ACCEPT tcp -- !docker0 docker0 0.0.0.0/0 172.17.0.2 tcp dpt:18083
0 0 ACCEPT tcp -- !docker0 docker0 0.0.0.0/0 172.17.0.2 tcp dpt:8883
0 0 ACCEPT tcp -- !docker0 docker0 0.0.0.0/0 172.17.0.2 tcp dpt:8084
0 0 ACCEPT tcp -- !docker0 docker0 0.0.0.0/0 172.17.0.2 tcp dpt:8083
105 5740 ACCEPT tcp -- !docker0 docker0 0.0.0.0/0 172.17.0.2 tcp dpt:1883
0 0 ACCEPT tcp -- !docker0 docker0 0.0.0.0/0 172.17.0.5 tcp dpt:10000
0 0 ACCEPT tcp -- !docker0 docker0 0.0.0.0/0 172.17.0.5 tcp dpt:8999
0 0 ACCEPT tcp -- !docker0 docker0 0.0.0.0/0 172.17.0.5 tcp dpt:8998
0 0 ACCEPT tcp -- !docker0 docker0 0.0.0.0/0 172.17.0.5 tcp dpt:8997
85 5100 ACCEPT tcp -- !docker0 docker0 0.0.0.0/0 172.17.0.5 tcp dpt:8996
0 0 ACCEPT tcp -- !docker0 docker0 0.0.0.0/0 172.17.0.5 tcp dpt:8889
0 0 ACCEPT tcp -- !docker0 docker0 0.0.0.0/0 172.17.0.5 tcp dpt:8088
0 0 ACCEPT tcp -- !docker0 docker0 0.0.0.0/0 172.17.0.5 tcp dpt:8087
0 0 ACCEPT tcp -- !docker0 docker0 0.0.0.0/0 172.17.0.5 tcp dpt:8086
0 0 ACCEPT tcp -- !docker0 docker0 0.0.0.0/0 172.17.0.5 tcp dpt:8085
7 364 ACCEPT tcp -- !docker0 docker0 0.0.0.0/0 172.17.0.5 tcp dpt:8080
0 0 ACCEPT tcp -- !docker0 docker0 0.0.0.0/0 172.17.0.5 tcp dpt:8079
0 0 ACCEPT tcp -- !docker0 docker0 0.0.0.0/0 172.17.0.5 tcp dpt:2334
0 0 ACCEPT tcp -- !docker0 docker0 0.0.0.0/0 172.17.0.5 tcp dpt:2333
0 0 ACCEPT tcp -- !docker0 docker0 0.0.0.0/0 172.17.0.5 tcp dpt:1935
0 0 ACCEPT tcp -- !docker0 docker0 0.0.0.0/0 172.17.0.5 tcp dpt:554
584 37534 ACCEPT tcp -- !docker0 docker0 0.0.0.0/0 172.17.0.5 tcp dpt:443
0 0 ACCEPT tcp -- !docker0 docker0 0.0.0.0/0 172.17.0.7 tcp dpt:9009
1593 82836 ACCEPT tcp -- !docker0 docker0 0.0.0.0/0 172.17.0.7 tcp dpt:8443
0 0 ACCEPT tcp -- !docker0 docker0 0.0.0.0/0 172.17.0.7 tcp dpt:8081
0 0 ACCEPT tcp -- !docker0 docker0 0.0.0.0/0 172.17.0.7 tcp dpt:8002
2036 106K ACCEPT tcp -- !docker0 docker0 0.0.0.0/0 172.17.0.7 tcp dpt:8000
0 0 ACCEPT tcp -- !docker0 docker0 0.0.0.0/0 172.17.0.3 tcp dpt:3306
Chain DOCKER-ISOLATION-STAGE-1 (1 references)
pkts bytes target prot opt in out source destination
11M 14G DOCKER-ISOLATION-STAGE-2 all -- docker0 !docker0 0.0.0.0/0 0.0.0.0/0
22M 19G RETURN all -- * * 0.0.0.0/0 0.0.0.0/0
Chain DOCKER-ISOLATION-STAGE-2 (1 references)
pkts bytes target prot opt in out source destination
0 0 DROP all -- * docker0 0.0.0.0/0 0.0.0.0/0
11M 14G RETURN all -- * * 0.0.0.0/0 0.0.0.0/0
Chain DOCKER-USER (1 references)
pkts bytes target prot opt in out source destination
22M 19G RETURN all -- * * 0.0.0.0/0 0.0.0.0/0
=============================================================================================
执行 network_check:
Called network_check with parameters: network_check docker
网络流量和连接信息 - 2024-12-20 09:59:03
docker网络规则与MAC地址:
[
{
"Name": "bridge",
"Id": "8a099c24b4ce2392ffc682dd9ac9335abb6b70662798a35743fbcc3fb7d79982",
"Created": "2024-11-04T18:00:09.914749565+08:00",
"Scope": "local",
"Driver": "bridge",
"EnableIPv6": false,
"IPAM": {
"Driver": "default",
"Options": null,
"Config": [
{
"Subnet": "172.17.0.0/16",
"Gateway": "172.17.0.1"
}
]
},
"Internal": false,
"Attachable": false,
"Ingress": false,
"ConfigFrom": {
"Network": ""
},
"ConfigOnly": false,
"Containers": {
"0349f1053421e48b415b0f4a6758df194a47616a309481fdfdae664c5e7bf1f3": {
"Name": "upython",
"EndpointID": "ea30a5f6b1bf305a3c10ac3a3d6c44503bb5c840c3aa1dbf49f30dc438125847",
"MacAddress": "02:42:ac:11:00:06",
"IPv4Address": "172.17.0.7/16",
"IPv6Address": ""
},
"23fbc1ed599f77c7562756d38d4e655d31a96a9a47978888629c50e556cc60ee": {
"Name": "umysql2",
"EndpointID": "4bb52b2d978dc90c57e0b5a89c623f6df8e4e844ac4bea45d385a9005386e72f",
"MacAddress": "02:42:ac:11:00:05",
"IPv4Address": "172.17.0.3/16",
"IPv6Address": ""
},
"8f87e78e4e9b419744799f32be396ebd55d0da21a7845d6854f3152cdd7e70da": {
"Name": "uemqx",
"EndpointID": "41cd86845237b7c2117b19b3cc28c9660fc5be6086e33562b2ce0c3d5de95793",
"MacAddress": "02:42:ac:12:00:06",
"IPv4Address": "172.17.0.2/16",
"IPv6Address": ""
},
"9672005cfb3ceb4b26f8b58c317e2068e4f8b5508d7980873de3e6c1d71eda58": {
"Name": "uplayer",
"EndpointID": "43f4647ffd479f2460af5e63780695d1646e30a4b171aaab4056a29c931345ee",
"MacAddress": "02:42:ac:11:00:06",
"IPv4Address": "172.17.0.6/16",
"IPv6Address": ""
},
"b67149b24bb5d2ad2bc0c74dde784958c98ae1f10b5c3dee4eadd00787951b50": {
"Name": "uredis",
"EndpointID": "c978bb8d32e421565522bd85d16834c774aa49409588cb58df9aaba91d70fd3a",
"MacAddress": "02:42:ac:11:00:04",
"IPv4Address": "172.17.0.4/16",
"IPv6Address": ""
},
"e960786c759c953ab039a7dd72c72e789f7dc479cd42fed0ba9e5b5e1016d0bd": {
"Name": "ujava2",
"EndpointID": "5a4d8667c5fe60eeebe2966731029c0d77e998cceba972c353e38884613dbde5",
"MacAddress": "02:42:ac:11:00:02",
"IPv4Address": "172.17.0.5/16",
"IPv6Address": ""
}
},
"Options": {
"com.docker.network.bridge.default_bridge": "true",
"com.docker.network.bridge.enable_icc": "true",
"com.docker.network.bridge.enable_ip_masquerade": "true",
"com.docker.network.bridge.host_binding_ipv4": "0.0.0.0",
"com.docker.network.bridge.name": "docker0",
"com.docker.network.driver.mtu": "1500"
},
"Labels": {}
}
]
=============================================================================================
执行 analyzePosition:
服务器状态分析 - getMysqlStatus
参数2: Ubains@123
Error response from daemon: Container 09e2052db0540c47415193204c94fa2c71c0676375476b349de862936bbe1901 is not running
执行SQL语句时发生错误:
创建表失败
Error response from daemon: Container 09e2052db0540c47415193204c94fa2c71c0676375476b349de862936bbe1901 is not running
执行SQL语句时发生错误:
插入记录失败
Error response from daemon: Container 09e2052db0540c47415193204c94fa2c71c0676375476b349de862936bbe1901 is not running
执行SQL语句时发生错误:
查询记录失败
Error response from daemon: Container 09e2052db0540c47415193204c94fa2c71c0676375476b349de862936bbe1901 is not running
执行SQL语句时发生错误:
更新记录失败
Error response from daemon: Container 09e2052db0540c47415193204c94fa2c71c0676375476b349de862936bbe1901 is not running
执行SQL语句时发生错误:
删除记录失败
=============================================================================================
执行 analyzePosition:
服务器状态分析 - getRedisStatus
参数2: Ubains@123
Warning: Using a password with '-a' or '-u' option on the command line interface may not be safe.
response 为: PONG
Redis 服务器连接成功
Warning: Using a password with '-a' or '-u' option on the command line interface may not be safe.
set_response 为: OK
Redis 服务器设置成功
Warning: Using a password with '-a' or '-u' option on the command line interface may not be safe.
get_response 为: test_value
Redis 服务器获取成功
Warning: Using a password with '-a' or '-u' option on the command line interface may not be safe.
del_response 为: 1
Redis 服务器删除成功
=============================================================================================
执行 analyzePosition:
服务器状态分析 - getFastdfsStatus
参数2: analyzePosition getFastdfsStatus
fastdfs文件上传成功
=============================================================================================
执行 analyzePosition:
服务器状态分析 - getNginxStatus
参数2: analyzePosition getNginxStatus
Nginx配置文件正确
HTTP 响应代码: 200
HTTP请求正常
=============================================================================================
topic,action,thirdPartyMeetingId,thirdPartyRoomId,conferenceName,messageName,startTime,endTime,companyNumber
/meeting/message/sync,mod,7565416702283087898,1,表处办公室1号会议室,富创预约,2025-03-09 16:31:00.0,2025-03-09 16:43:00.0,CN-JHP-UBAINS
\ No newline at end of file
topic,action,thirdPartyMeetingId,thirdPartyRoomId,conferenceName,messageName,startTime,endTime,companyNumber,signInBeforeMinutes,signEndTime,enableSignOut,signOutMinutesAfterSignIn,signOutAfterEndMinutes
/meeting/message/sync,mod,7565416702283087811,2,表处办公室2号会议室,富创预约,2025-03-12 17:15:00.0,2025-03-12 17:20:00.0,CN-E8V-UBAINS,5,1,1,2,1
\ No newline at end of file
topic,action,thirdPartyMeetingId,thirdPartyRoomId,conferenceName,messageName,startTime,endTime,companyNumber
/meeting/message/sync,add,7565416702283087899,1,表处办公室1号会议室,富创预约,2025-03-11 23:06:00.0,2025-03-11 23:10:00.0,CN-JHP-UBAINS
\ No newline at end of file
topic,action,thirdPartyMeetingId,thirdPartyRoomId,conferenceName,messageName,startTime,endTime,companyNumber,signInBeforeMinutes,signEndTime,enableSignOut,signOutMinutesAfterSignIn,signOutAfterEndMinutes
/meeting/message/sync,add,7565416702283087811,2,表处办公室2号会议室,第一场富创预约51分前可签退,2025-03-12 18:47:00.0,2025-03-12 18:50:00.0,CN-E8V-UBAINS,4,1,1,2,1
/meeting/message/sync,add,7565416702283087812,2,表处办公室2号会议室,第二场富创预约50分可签到,2025-03-12 18:53:00.0,2025-03-12 19:10:00.0,CN-E8V-UBAINS,3,1,1,2,1
\ No newline at end of file
......@@ -15,7 +15,7 @@ if __name__ == "__main__":
# 读取配置文件
configs = Mqtt.read_config_from_csv(csv_file_path)
broker_address = "192.168.5.218"
broker_address = "192.168.1.193"
port = 1883
num_repeats = 1000 # 重复执行的次数
interval_between_repeats = 0.2 # 每次重复之间的间隔时间(秒)
......
......@@ -16,7 +16,7 @@ def on_message(client, userdata, msg):
logging.info(f"接收到消息: 主题={msg.topic}, 消息体={msg.payload.decode()}")
if __name__ == "__main__":
broker_address = "192.168.5.218"
broker_address = "192.168.1.193"
port = 1883
username = "mqtt@cmdb"
password = "mqtt@webpassw0RD"
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论