提交 34f8058a authored 作者: 陈泽健's avatar 陈泽健

refactor(预定系统): 调整定时任务

- 删除了展厅巡检相关的测试用例文件:  - 01服务器状态监测.py
  - __st__.py
- 更新了定时任务配置:  - 修正了兰州中石化项目的报告URL
  - 注释掉了展厅巡检的定时任务
上级 4cf9118d
import sys
import os
sys.path.append(os.path.abspath(os.path.join(os.path.dirname(__file__), '..', '..', '..', '..')))
from 预定系统.Base.app_base import *
class Server_monitoring_0001:
"""
执行指令:
1.cd 预定系统
2.hytest --report_title 会议预约测试报告 --report_url_prefix http://nat.ubainsyun.com:31133 --test 展厅补充会议创建_001
"""
tags = ['展厅巡检','服务器状态巡检']
def teststeps(self):
i = 0
# 使用示例
url = "http://192.168.5.200:8081/media/cmdb/service_info/check.txt"
save_path = "check.txt"
extract_info = ['[m]ysql', '[r]edis', '[f]dfs_storaged', '[f]dfs_tracker', '[e]mqx',
'ubains-meeting-api-1.0-SNAPSHOT.jar', 'ubains-meeting-inner-api-1.0-SNAPSHOT.jar', 'uwsgi']
info = fetch_and_parse_check_txt(url, save_path, extract_info)
if info:
for key, value in info.items():
STEP(++i, f"服务器{key} 服务状态巡检")
INFO(f"监测到{key} 服务的状态:{value}")
CHECK_POINT(f"{key} 服务状态是否正常", value == '服务正常')
else:
INFO("无法获取或解析文件内容")
\ No newline at end of file
import sys
import os
from hytest import *
sys.path.append(os.path.abspath(os.path.join(os.path.dirname(__file__), '..', '..', '..', '..')))
from 预定系统.Base.app_base import *
from 预定系统.Base.base import *
def suite_setup():
STEP(1, "初始化浏览器")
# 传入系统类型,展厅预定巡检 == 192.168.5.200
browser_init("展厅预定巡检")
wd = GSTORE['wd']
user_login("Test02", "ubains@123")
def suite_teardown():
browser_quit()
\ No newline at end of file
......@@ -97,7 +97,7 @@ start_workers(3)
# 定时执行预定系统测试任务
schedule.every().day.at("10:00").do(run_task, run_automation_test, report_title="预定系统测试报告", report_url_prefix="http://nat.ubainsyun.com:31133", test_case="JSON测试", ding_type="标准版巡检")
schedule.every().day.at("07:00").do(run_task, run_automation_test, report_title="兰州中石化项目测试报告", report_url_prefix="http://nat.ubainsyun.com:31135", test_case="兰州中石化项目", ding_type="标准版巡检")
schedule.every().day.at("07:00").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:31136", test_case="展厅巡检", ding_type="展厅巡检")
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论