提交 88762ce2 authored 作者: 陈泽健's avatar 陈泽健

调试定时任务执行后钉钉消息没有发送的问题。将定时任务与测试报告文件获取封装成函数进行调用,方便后续维护管理。目前调试发现定时任务执行别的脚本时会出现异常问题,需要进一步排查。

上级 9cdef635
This source diff could not be displayed because it is too large. You can view the blob instead.
import csv
import glob
import re
import time
from trio import current_time
from webdriver_manager.chrome import ChromeDriverManager
from selenium.webdriver.chrome.service import Service as ChromeService
import psutil
import logging
from hytest import *
from selenium import webdriver
from selenium.common import TimeoutException, NoSuchElementException, ElementNotInteractableException
......@@ -19,6 +19,33 @@ import hmac
import hashlib
import base64
from urllib.parse import urlencode
from datetime import datetime
import os
import sys
import schedule
import time
import subprocess
import logging
# 获取当前脚本的绝对路径
current_dir = os.path.dirname(os.path.abspath(__file__))
# 获取当前脚本的父目录
parent_dir = os.path.dirname(current_dir)
logging.info(parent_dir)
# 添加路径
sys.path.append(current_dir)
# 配置日志记录器
log_file = os.path.join(current_dir, 'automation_test.log')
logging.basicConfig(
level=logging.DEBUG,
format='%(asctime)s - %(levelname)s - %(message)s',
handlers=[
logging.FileHandler(log_file),
logging.StreamHandler()
]
)
# 配置日志
logging.basicConfig(level=logging.INFO, format='%(asctime)s - %(levelname)s - %(message)s')
......@@ -418,6 +445,68 @@ def browser_quit():
# 调用浏览器驱动实例的quit方法,关闭浏览器并释放资源
wd.quit()
def get_latest_report_file(report_dir, base_url):
"""
获取指定目录下最新的HTML报告文件,并返回带有基础URL的完整路径。
:param report_dir: 报告文件所在的目录
:param base_url: 基础URL
:return: 最新的HTML报告文件的完整URL,如果没有找到则返回None
"""
report_files = glob.glob(os.path.join(report_dir, '*.html'))
if not report_files:
logging.warning("No report files found in the directory.")
return None
latest_file = max(report_files, key=os.path.getmtime)
last_modified_time = datetime.fromtimestamp(os.path.getmtime(latest_file)).strftime('%Y-%m-%d %H:%M:%S')
logging.info(f"Latest report file: {latest_file}, Last modified: {last_modified_time}")
# 将文件路径转换为相对于基础URL的完整URL
relative_path = os.path.relpath(latest_file, report_dir)
full_url = f"{base_url}/{relative_path}".replace("\\", "/") # 确保路径分隔符一致
return full_url
def run_automation_test(report_title, report_url_prefix, test_case):
logging.info("Starting automation test...")
command = [
'hytest',
'--report_title', report_title,
'--report_url_prefix', report_url_prefix,
'--test', test_case
]
logging.info(f"Running command: {' '.join(command)}")
try:
result = subprocess.run(command, capture_output=True, text=True, check=True)
logging.debug(f"Command stdout: {result.stdout}")
logging.debug(f"Command stderr: {result.stderr}")
# 获取最新的报告文件
report_dir = os.path.join(parent_dir, 'reports')
base_url = report_url_prefix
latest_report = get_latest_report_file(report_dir, base_url)
if latest_report:
logging.info(f"Latest report file URL: {latest_report}")
# 调用钉钉发送消息接口进行推送测试报告链接
try:
logging.info("开始调用dingding消息通知函数")
dingding_send_message(latest_report, report_title, f"{report_title}定时任务执行完成", "13724387318")
logging.info("dingding_send_message function called successfully")
except Exception as e:
logging.error(f"dingding_send_message调用失败: {e}")
else:
logging.warning("No report files found to send.")
except subprocess.CalledProcessError as e:
logging.error(f"Command failed with return code {e.returncode}: {e.output}")
except OSError as e:
logging.error(f"OS error occurred: {e}")
finally:
logging.info("Automation test completed.")
def dingding_send_message(test_report_Url, title, text, mobile):
"""
发送钉钉机器人消息
......
......@@ -70,4 +70,5 @@
- 钉钉群消息提醒的param参数改为link链接形式,通过链接打开测试报告进行查看。
20. 2024-11-26
- 调试定时任务的问题,还需再进一步调试。
- 补充运维集控的MQTT底层方法与消息体构建。
\ No newline at end of file
- 补充运维集控的MQTT底层方法与消息体构建。
- 调试定时任务执行后钉钉消息没有发送的问题。将定时任务与测试报告文件获取封装成函数进行调用,方便后续维护管理。目前调试发现定时任务执行别的脚本时会出现异常问题,需要进一步排查。
\ No newline at end of file
......@@ -65,8 +65,9 @@ class Login_00x:
# 等待1秒以允许页面响应
sleep(2)
# 根据预期的检查文本类型,获取并记录提示信息
if check_text == "欢迎 预定标准版测试":
notify_text = elment_get_text((By.XPATH, '//*[@id="app"]/div/div[1]/div/span[1]'),wd)
if check_text == "admin@ZDH":
sleep(2)
notify_text = elment_get_text((By.XPATH, f"//span[normalize-space()='{username}']"),wd)
SELENIUM_LOG_SCREEN(wd, '50%', 'Login', 'Login_Pwd', f"{name}_检查登录成功提示信息")
INFO(f"Alert text: {notify_text}")
else:
......@@ -81,7 +82,7 @@ class Login_00x:
# 设置隐式等待时间
wd.implicitly_wait(DEFAULT_WAIT_TIME)
# 检查点:验证提示信息是否与预期相符
CHECK_POINT('弹出提示', notify_text == check_text)
CHECK_POINT('弹出提示', check_text in notify_text)
# 执行步骤 4:刷新页面,以确保下一个测试从一个干净的状态开始
STEP(4, "刷新页面")
......
<!DOCTYPE html>
<html>
<head>
<title>账号密码登录测试报告</title>
<meta charset="UTF-8">
<style>body {
font-family: consolas, Verdana, sans-serif;
font-size: .95em;
color: #696e71;
display: grid;
grid-template-columns: 1fr 5rem;
}
.main_section {
width: 90%;
margin: 0 auto;
}
#float_menu{
position:fixed;
top:0;
right:0;
text-align: center;
}
#float_menu .menu-item {
cursor: pointer;
padding: .5em;
margin: .5em 0;
color: #c08580;
background-color: #f8f0ef;
font-size: 1.2em;
}
.result{
display: flex;
}
.result_table{
border-collapse: collapse;
border: 1px solid #f0e0e5;
width: 30em;
text-align: center;
font-size: 1.0em;
}
.result_table td{
border: 1px solid #f0e0e5;
padding: .3em;
}
.result_barchart{
width: 30em;
margin: 0 5em 0 5em;
}
.barchar_item{
margin: 2.5rem 0;
}
.barchart_barbox {
margin: 0.5em 0;
width: 100%;
background-color: #fff;
border: 1px solid #86c2dd;
border-radius: .2em;
}
.barchart_bar {
text-align: right;
height: 1.2rem;
}
.h3_button {
margin: 1.5em;
cursor: pointer;
color: #03a9f4;
}
.info
{
white-space:pre-wrap;
margin: .8em 1.5em;
}
.error-info
{
color: #a64747
}
.suite_dir {
margin: 1em .2em;
padding: .3em;
/* background-color: #dfeff6; */
border: 1px solid #bcd8e4;
}
.suite_file {
margin: 1em .2em;
padding: .3em;
border: 1px solid #bcd8e4;
}
.case {
margin: 1em .2em;
/* padding: .3em; */
border: 1px solid #e7d4d4;
}
.case_class_path{
margin: 0em 1em;
}
.folder_header {
padding: .2em .7em;
background-color: #fffaf9;
cursor: pointer;
}
.setup{
margin: .2em;
/* padding: .3em; */
/* border: 1px solid #e7d4d4; */
}
.teardown{
margin: .2em;
/* padding: .3em;*/
/* border: 1px solid #e7d4d4; */
}
.test_steps{
margin: .2em;
padding: .3em;
/* border: 1px solid #e7d4d4; */
}
.label {
display: inline-block;
padding: .1em .5em;
font-size: .88em;
letter-spacing: 1px;
white-space: nowrap;
color: #0d6ebc;
border-radius: .2em;
min-width: 5em;
margin-right: 2em;
font-family: consolas;
}
/* .suite_setup .label{
color: #219e26 ;
}
.suite_teardown .label{
color: #219e26;
} */
/* .case.pass .casename{
color: #329132 ;
} */
.case.pass .caselabel{
color: white;
background-color: #3b9e3f;
}
/* .case.fail .casename{
color: #a64747;
} */
.case.fail .caselabel{
color: white;
background-color: #a64747;
}
/* .case.abort .casename{
color: #953ab7;
} */
.case.abort .caselabel{
color: white;
background-color: #9c27b0;
}
.case_step {
margin: .8em;
}
.checkpoint_pass {
margin: .8em;
}
.checkpoint_fail {
margin: .8em;
}
.case_step .tag{
color: #2196f3;;
margin: .3em 1em .3em 0;
padding: .1em .3em;
font-size: .92em;
}
.checkpoint_pass .tag{
color: #009806;
margin:.3em 1em .3em .5em;
padding: .1em .3em;
font-size: .92em;
}
.checkpoint_fail .tag{
color: #9c2020;
margin:.3em 1em .3em .5em;
padding: .1em .3em;
font-size: .92em;
}
.screenshot {
border: 1px solid #86c2dd;
}
.executetime {
float: right;
}</style>
<script type="text/javascript">var FOLDER_ALL_CASES = false //是否为精简模式的标记
var ERROR_INFOS = []; // 错误信息列表
var current_error_idx = -1;
// 页面加载后执行的函数
window.addEventListener("load", function(){
// 所有 .folder_header 添加点击事件处理
let folderHeaderEles = document.querySelectorAll(".folder_header");
folderHeaderEles.forEach(function(ele) {
ele.addEventListener("click", function(event) {
let fb = event.target.closest('.folder_header').nextElementSibling;
fb.style.display = fb.style.display === 'none' ? 'block' : 'none'
});
});
// 找到所有的错误信息对象
ERROR_INFOS = document.querySelectorAll(".error-info");
});
function toggle_folder_all_cases(){
let eles = document.querySelectorAll(".folder_body");
FOLDER_ALL_CASES = !FOLDER_ALL_CASES;
document.getElementById('display_mode').innerHTML = FOLDER_ALL_CASES? "Detail" : "Summary"
for (const ele of eles){
ele.style.display = FOLDER_ALL_CASES? "none": "block"
}
}
function previous_error(){
// 查找错误必须是详细模式
if (FOLDER_ALL_CASES)
toggle_folder_all_cases()
current_error_idx -= 1;
if (current_error_idx<0)
current_error_idx = 0
let error = ERROR_INFOS[current_error_idx];
error.scrollIntoView({behavior: "smooth", block: "center", inline: "start"});
}
function next_error(){
// 查找错误必须是详细模式
if (FOLDER_ALL_CASES)
toggle_folder_all_cases()
current_error_idx += 1;
if (current_error_idx > ERROR_INFOS.length-1)
current_error_idx = ERROR_INFOS.length-1
let error = ERROR_INFOS[current_error_idx];
error.scrollIntoView({behavior: "smooth", block: "center", inline: "start"});
}</script>
</head>
<body>
<div class="main_section">
<h1 style="font-family: auto">账号密码登录测试报告</h1>
<h3>统计结果</h3>
<div class="result">
<table class="result_table">
<tbody>
<tr>
<td>hytest 版本</td>
<td>0.8.12</td>
</tr>
<tr>
<td>开始时间</td>
<td>2024/11/25 17:40:00</td>
</tr>
<tr>
<td>结束时间</td>
<td>2024/11/25 17:41:11</td>
</tr>
<tr>
<td>耗时</td>
<td>70.368 秒</td>
</tr>
<tr>
<td>预备执行用例数量</td>
<td>10</td>
</tr>
<tr>
<td>实际执用例行数量</td>
<td>10</td>
</tr>
<tr>
<td>通过</td>
<td>6</td>
</tr>
<tr>
<td>失败</td>
<td style="color:red">4</td>
</tr>
<tr>
<td>异常</td>
<td style="">0</td>
</tr>
<tr>
<td>阻塞</td>
<td style="">0</td>
</tr>
<tr>
<td>套件初始化失败</td>
<td style="">0</td>
</tr>
<tr>
<td>套件清除 失败</td>
<td style="">0</td>
</tr>
<tr>
<td>用例初始化失败</td>
<td style="">0</td>
</tr>
<tr>
<td>用例清除 失败</td>
<td style="">0</td>
</tr>
</tbody>
</table>
<div class="result_barchart">
<div class="barchar_item">
<span>用例通过 60% : 6 个</span>
<div class="barchart_barbox">
<div class="barchart_bar" style="width: 60.0%; background-color: #04AA6D;"></div>
</div>
</div>
<div class="barchar_item">
<span>用例失败 40% : 4 个</span>
<div class="barchart_barbox">
<div class="barchart_bar" style="width: 40.0%; background-color: #bb4069;"></div>
</div>
</div>
<div class="barchar_item">
<span>用例异常 0% : 0 个</span>
<div class="barchart_barbox">
<div class="barchart_bar" style="width: 0.0%; background-color: #9c27b0;"></div>
</div>
</div>
<div class="barchar_item">
<span>用例阻塞 0% : 0 个</span>
<div class="barchart_barbox">
<div class="barchart_bar" style="width: 0.0%; background-color: #dcbdbd;"></div>
</div>
</div>
</div>
</div>
<div style="margin-top:2em">
<h3 style="display:inline">执行日志</h3>
</div>
<div class="exec_log">
<div class="suite_dir" id="suite_dir cases\">
<div>
<span class="label">进入目录</span>
<span>cases\</span>
</div>
<div class="suite_setup setup" id="suite_setup setup cases\">
<div class="folder_header">
<span class="label">套件初始化</span>
<span>cases\</span>
<span class="executetime">2024-11-25 17:40:00</span>
</div>
<div class="folder_body">
<div class="case_step">
<span class="tag">步骤 #1</span>
<span>初始化浏览器</span>
</div>
<div class="info">'----------' 正在初始化浏览器 '----------'</div>
<div class="info">'----------' 浏览器初始化完成 '----------'</div>
<div class="case_step">
<span class="tag">步骤 #2</span>
<span>处理SSL认证</span>
</div>
<div class="info">'----------' 正在处理SSL证书警告 '----------'</div>
<div class="info">'----------' SSL证书警告处理完成 '----------'</div>
</div>
</div>
</div>
<div class="suite_file" id="suite_file cases\登录模块\账号密码登录测试.py">
<div>
<span class="label">进入文件</span>
<span>cases\登录模块\账号密码登录测试.py</span>
</div>
<div class="case pass" id="case_00000001">
<div class="folder_header">
<span class="label caselabel">用例 PASS</span>
<span class="casename">登录_001</span>
<span class="executetime">2024-11-25 17:40:20</span>
</div>
<div class="folder_body">
<span class="case_class_path">cases\登录模块\账号密码登录测试.py::Login_00x</span>
<div class="test_steps" id="test_steps 登录_001">
<span class="label">测试步骤</span>
<div class="case_step">
<span class="tag">步骤 #1</span>
<span>输入账号: , 密码: Ubains@4321, 验证码: csba</span>
</div>
<div class="case_step">
<span class="tag">步骤 #2</span>
<span>点击登录按钮</span>
</div>
<div>
<img class="screenshot" src="imgs/Login/Login_Pwd/登录_001_检查登录失败提示信息20241125174023187205.png" width="50%">
</div>
<div class="info">Alert text: 请输入账号!</div>
<div class="case_step">
<span class="tag">步骤 #3</span>
<span>校验提示信息: 请输入账号!</span>
</div>
<div class="checkpoint_pass">
<span class="tag">检查点 PASS</span>
<span>弹出提示</span>
</div>
<div class="case_step">
<span class="tag">步骤 #4</span>
<span>刷新页面</span>
</div>
</div>
</div>
</div>
<div class="case pass" id="case_00000002">
<div class="folder_header">
<span class="label caselabel">用例 PASS</span>
<span class="casename">登录_002</span>
<span class="executetime">2024-11-25 17:40:23</span>
</div>
<div class="folder_body">
<span class="case_class_path">cases\登录模块\账号密码登录测试.py::Login_00x</span>
<div class="test_steps" id="test_steps 登录_002">
<span class="label">测试步骤</span>
<div class="case_step">
<span class="tag">步骤 #1</span>
<span>输入账号: admin@czj, 密码: , 验证码: csba</span>
</div>
<div class="case_step">
<span class="tag">步骤 #2</span>
<span>点击登录按钮</span>
</div>
<div>
<img class="screenshot" src="imgs/Login/Login_Pwd/登录_002_检查登录失败提示信息20241125174026122340.png" width="50%">
</div>
<div class="info">Alert text: 请输入密码!</div>
<div class="case_step">
<span class="tag">步骤 #3</span>
<span>校验提示信息: 请输入密码!</span>
</div>
<div class="checkpoint_pass">
<span class="tag">检查点 PASS</span>
<span>弹出提示</span>
</div>
<div class="case_step">
<span class="tag">步骤 #4</span>
<span>刷新页面</span>
</div>
</div>
</div>
</div>
<div class="case pass" id="case_00000003">
<div class="folder_header">
<span class="label caselabel">用例 PASS</span>
<span class="casename">登录_003</span>
<span class="executetime">2024-11-25 17:40:26</span>
</div>
<div class="folder_body">
<span class="case_class_path">cases\登录模块\账号密码登录测试.py::Login_00x</span>
<div class="test_steps" id="test_steps 登录_003">
<span class="label">测试步骤</span>
<div class="case_step">
<span class="tag">步骤 #1</span>
<span>输入账号: admin@czj, 密码: Ubains@4321, 验证码: </span>
</div>
<div class="case_step">
<span class="tag">步骤 #2</span>
<span>点击登录按钮</span>
</div>
<div>
<img class="screenshot" src="imgs/Login/Login_Pwd/登录_003_检查登录失败提示信息20241125174028919983.png" width="50%">
</div>
<div class="info">Alert text: 请输入验证码!</div>
<div class="case_step">
<span class="tag">步骤 #3</span>
<span>校验提示信息: 请输入验证码!</span>
</div>
<div class="checkpoint_pass">
<span class="tag">检查点 PASS</span>
<span>弹出提示</span>
</div>
<div class="case_step">
<span class="tag">步骤 #4</span>
<span>刷新页面</span>
</div>
</div>
</div>
</div>
<div class="case pass" id="case_00000004">
<div class="folder_header">
<span class="label caselabel">用例 PASS</span>
<span class="casename">登录_004</span>
<span class="executetime">2024-11-25 17:40:29</span>
</div>
<div class="folder_body">
<span class="case_class_path">cases\登录模块\账号密码登录测试.py::Login_00x</span>
<div class="test_steps" id="test_steps 登录_004">
<span class="label">测试步骤</span>
<div class="case_step">
<span class="tag">步骤 #1</span>
<span>输入账号: admin@czj112, 密码: Ubains@4321, 验证码: csba</span>
</div>
<div class="case_step">
<span class="tag">步骤 #2</span>
<span>点击登录按钮</span>
</div>
<div>
<img class="screenshot" src="imgs/Login/Login_Pwd/登录_004_检查登录失败提示信息20241125174031776011.png" width="50%">
</div>
<div class="info">Alert text: 账号或密码错误</div>
<div class="case_step">
<span class="tag">步骤 #3</span>
<span>校验提示信息: 账号或密码错误</span>
</div>
<div class="checkpoint_pass">
<span class="tag">检查点 PASS</span>
<span>弹出提示</span>
</div>
<div class="case_step">
<span class="tag">步骤 #4</span>
<span>刷新页面</span>
</div>
</div>
</div>
</div>
<div class="case pass" id="case_00000005">
<div class="folder_header">
<span class="label caselabel">用例 PASS</span>
<span class="casename">登录_005</span>
<span class="executetime">2024-11-25 17:40:32</span>
</div>
<div class="folder_body">
<span class="case_class_path">cases\登录模块\账号密码登录测试.py::Login_00x</span>
<div class="test_steps" id="test_steps 登录_005">
<span class="label">测试步骤</span>
<div class="case_step">
<span class="tag">步骤 #1</span>
<span>输入账号: adM 12in@czj, 密码: Ubains@4321, 验证码: csba</span>
</div>
<div class="case_step">
<span class="tag">步骤 #2</span>
<span>点击登录按钮</span>
</div>
<div>
<img class="screenshot" src="imgs/Login/Login_Pwd/登录_005_检查登录失败提示信息20241125174034744410.png" width="50%">
</div>
<div class="info">Alert text: 账号或密码错误</div>
<div class="case_step">
<span class="tag">步骤 #3</span>
<span>校验提示信息: 账号或密码错误</span>
</div>
<div class="checkpoint_pass">
<span class="tag">检查点 PASS</span>
<span>弹出提示</span>
</div>
<div class="case_step">
<span class="tag">步骤 #4</span>
<span>刷新页面</span>
</div>
</div>
</div>
</div>
<div class="case pass" id="case_00000006">
<div class="folder_header">
<span class="label caselabel">用例 PASS</span>
<span class="casename">登录_006</span>
<span class="executetime">2024-11-25 17:40:35</span>
</div>
<div class="folder_body">
<span class="case_class_path">cases\登录模块\账号密码登录测试.py::Login_00x</span>
<div class="test_steps" id="test_steps 登录_006">
<span class="label">测试步骤</span>
<div class="case_step">
<span class="tag">步骤 #1</span>
<span>输入账号: admin@czj, 密码: 12345, 验证码: csba</span>
</div>
<div class="case_step">
<span class="tag">步骤 #2</span>
<span>点击登录按钮</span>
</div>
<div>
<img class="screenshot" src="imgs/Login/Login_Pwd/登录_006_检查登录失败提示信息20241125174037576691.png" width="50%">
</div>
<div class="info">Alert text: 账号或密码错误</div>
<div class="case_step">
<span class="tag">步骤 #3</span>
<span>校验提示信息: 账号或密码错误</span>
</div>
<div class="checkpoint_pass">
<span class="tag">检查点 PASS</span>
<span>弹出提示</span>
</div>
<div class="case_step">
<span class="tag">步骤 #4</span>
<span>刷新页面</span>
</div>
</div>
</div>
</div>
<div class="case fail" id="case_00000007">
<div class="folder_header">
<span class="label caselabel">用例 FAIL</span>
<span class="casename">登录_007</span>
<span class="executetime">2024-11-25 17:40:38</span>
</div>
<div class="folder_body">
<span class="case_class_path">cases\登录模块\账号密码登录测试.py::Login_00x</span>
<div class="test_steps" id="test_steps 登录_007">
<span class="label">测试步骤</span>
<div class="case_step">
<span class="tag">步骤 #1</span>
<span>输入账号: admin@czj, 密码: U bains1s@432, 验证码: csba</span>
</div>
<div class="case_step">
<span class="tag">步骤 #2</span>
<span>点击登录按钮</span>
</div>
<div>
<img class="screenshot" src="imgs/Login/Login_Pwd/登录_007_检查登录失败提示信息20241125174040414494.png" width="50%">
</div>
<div class="info">Alert text: 超过限制登录次数,请10分钟以后再登录!</div>
<div class="case_step">
<span class="tag">步骤 #3</span>
<span>校验提示信息: 账号或密码错误</span>
</div>
<div class="checkpoint_fail">
<span class="tag">检查点 FAIL</span>
<span>弹出提示</span>
</div>
<div class="info error-info">
Traceback:
File &quot;D:\GithubData\自动化脚本-4\ubains-module-test\预定系统\cases\登录模块\账号密码登录测试.py&quot;, line 84, in teststeps
CHECK_POINT('弹出提示', notify_text == check_text)</div>
</div>
</div>
</div>
<div class="case fail" id="case_00000008">
<div class="folder_header">
<span class="label caselabel">用例 FAIL</span>
<span class="casename">登录_008</span>
<span class="executetime">2024-11-25 17:40:40</span>
</div>
<div class="folder_body">
<span class="case_class_path">cases\登录模块\账号密码登录测试.py::Login_00x</span>
<div class="test_steps" id="test_steps 登录_008">
<span class="label">测试步骤</span>
<div class="case_step">
<span class="tag">步骤 #1</span>
<span>输入账号: admin@czj, 密码: Ubains@4321, 验证码: 123</span>
</div>
<div class="case_step">
<span class="tag">步骤 #2</span>
<span>点击登录按钮</span>
</div>
<div>
<img class="screenshot" src="imgs/Login/Login_Pwd/登录_008_检查登录失败提示信息20241125174043161833.png" width="50%">
</div>
<div class="info">Alert text: 超过限制登录次数,请10分钟以后再登录!</div>
<div class="case_step">
<span class="tag">步骤 #3</span>
<span>校验提示信息: 验证码错误</span>
</div>
<div class="checkpoint_fail">
<span class="tag">检查点 FAIL</span>
<span>弹出提示</span>
</div>
<div class="info error-info">
Traceback:
File &quot;D:\GithubData\自动化脚本-4\ubains-module-test\预定系统\cases\登录模块\账号密码登录测试.py&quot;, line 84, in teststeps
CHECK_POINT('弹出提示', notify_text == check_text)</div>
</div>
</div>
</div>
<div class="case fail" id="case_00000009">
<div class="folder_header">
<span class="label caselabel">用例 FAIL</span>
<span class="casename">登录_009</span>
<span class="executetime">2024-11-25 17:40:43</span>
</div>
<div class="folder_body">
<span class="case_class_path">cases\登录模块\账号密码登录测试.py::Login_00x</span>
<div class="test_steps" id="test_steps 登录_009">
<span class="label">测试步骤</span>
<div class="case_step">
<span class="tag">步骤 #1</span>
<span>输入账号: admin@czj, 密码: Ubains@4321, 验证码: cs 12</span>
</div>
<div class="case_step">
<span class="tag">步骤 #2</span>
<span>点击登录按钮</span>
</div>
<div>
<img class="screenshot" src="imgs/Login/Login_Pwd/登录_009_检查登录失败提示信息20241125174045897333.png" width="50%">
</div>
<div class="info">Alert text: 超过限制登录次数,请10分钟以后再登录!</div>
<div class="case_step">
<span class="tag">步骤 #3</span>
<span>校验提示信息: 验证码错误</span>
</div>
<div class="checkpoint_fail">
<span class="tag">检查点 FAIL</span>
<span>弹出提示</span>
</div>
<div class="info error-info">
Traceback:
File &quot;D:\GithubData\自动化脚本-4\ubains-module-test\预定系统\cases\登录模块\账号密码登录测试.py&quot;, line 84, in teststeps
CHECK_POINT('弹出提示', notify_text == check_text)</div>
</div>
</div>
</div>
<div class="case fail" id="case_00000010">
<div class="folder_header">
<span class="label caselabel">用例 FAIL</span>
<span class="casename">登录_010</span>
<span class="executetime">2024-11-25 17:40:46</span>
</div>
<div class="folder_body">
<span class="case_class_path">cases\登录模块\账号密码登录测试.py::Login_00x</span>
<div class="test_steps" id="test_steps 登录_010">
<span class="label">测试步骤</span>
<div class="case_step">
<span class="tag">步骤 #1</span>
<span>输入账号: admin@czj, 密码: Ubains@4321, 验证码: csba</span>
</div>
<div class="case_step">
<span class="tag">步骤 #2</span>
<span>点击登录按钮</span>
</div>
<div>
<img class="screenshot" src="imgs/Login/Login_Pwd/登录_010_检查登录成功提示信息20241125174108630069.png" width="50%">
</div>
<div class="info">Alert text: None</div>
<div class="case_step">
<span class="tag">步骤 #3</span>
<span>校验提示信息: 欢迎 预定标准版测试</span>
</div>
<div class="checkpoint_fail">
<span class="tag">检查点 FAIL</span>
<span>弹出提示</span>
</div>
<div class="info error-info">
Traceback:
File &quot;D:\GithubData\自动化脚本-4\ubains-module-test\预定系统\cases\登录模块\账号密码登录测试.py&quot;, line 84, in teststeps
CHECK_POINT('弹出提示', notify_text == check_text)</div>
</div>
</div>
</div>
<div class="suite_teardown teardown" id="suite_teardown teardown cases\">
<div class="folder_header">
<span class="label">套件清除</span>
<span>cases\</span>
<span class="executetime">2024-11-25 17:41:09</span>
</div>
<div class="folder_body">
<div class="info">清除浏览器</div>
</div>
</div>
</div>
</div>
</div>
<div id="float_menu">
<div class="menu-item" onclick="document.querySelector(&quot;body&quot;).scrollIntoView()">页首</div>
<div class="menu-item" onclick="window.open(&quot;http://www.byhy.net/tut/auto/hytest/01&quot;, &quot;_blank&quot;); ">帮助</div>
<div class="menu-item" id="display_mode" onclick="toggle_folder_all_cases()">Summary</div>
<div class="error_jumper" display="block">
<div class="menu-item" onclick="previous_error()" title="上一个错误"></div>
<div class="menu-item" onclick="next_error()" title="下一个错误"></div>
</div>
</div>
</body>
</html>
\ No newline at end of file
=== [ 收集测试用例 ] ===
== cases\__st__.py
== cases\会议主流程\__st__.py
== cases\会议主流程\会议修改.py
CSV文件已读取
** no cases in this file , skip it.
== cases\会议主流程\会议预约.py
CSV文件已读取
** no cases in this file , skip it.
== cases\会议室管理\会议室管理\__st__.py
== cases\会议室管理\会议室管理\会议室删除.py
CSV文件已读取
** no cases in this file , skip it.
== cases\会议室管理\会议室管理\会议室新增.py
CSV文件已读取
** no cases in this file , skip it.
== cases\会议室管理\会议室管理\会议室查询.py
CSV文件已读取
** no cases in this file , skip it.
== cases\会议室管理\会议室管理\会议室编辑.py
CSV文件已读取
** no cases in this file , skip it.
== cases\会议室管理\功能管理\__st__.py
== cases\会议室管理\功能管理\功能删除.py
CSV文件已读取
** no cases in this file , skip it.
== cases\会议室管理\功能管理\功能新增.py
CSV文件已读取
** no cases in this file , skip it.
== cases\会议室管理\功能管理\功能查询.py
CSV文件已读取
** no cases in this file , skip it.
== cases\会议室管理\功能管理\功能编辑.py
CSV文件已读取
** no cases in this file , skip it.
== cases\会议室管理\区域管理\__st__.py
== cases\会议室管理\区域管理\区域删除.py
CSV文件已读取
** no cases in this file , skip it.
== cases\会议室管理\区域管理\区域新增.py
CSV文件已读取
** no cases in this file , skip it.
== cases\会议室管理\区域管理\区域编辑.py
CSV文件已读取
** no cases in this file , skip it.
== cases\登录模块\账号密码登录测试.py
CSV文件已读取
== cases\系统管理\__st__.py
== cases\系统管理\系统设置.py
** no cases in this file , skip it.
== cases\设备管理\安卓信息.py
** no cases in this file, skip it.
== cases\设备管理\毫米波雷达.py
** no cases in this file, skip it.
== cases\账号管理\用户管理\__st__.py
== cases\账号管理\用户管理\主流程.py
** no cases in this file , skip it.
== cases\账号管理\用户管理\用户修改密码.py
CSV文件已读取
** no cases in this file , skip it.
== cases\账号管理\用户管理\用户删除.py
CSV文件已读取
** no cases in this file , skip it.
== cases\账号管理\用户管理\用户新增.py
CSV文件已读取
** no cases in this file , skip it.
== cases\账号管理\用户管理\用户查询.py
CSV文件已读取
** no cases in this file , skip it.
== cases\账号管理\用户管理\用户状态设置.py
CSV文件已读取
** no cases in this file , skip it.
== cases\账号管理\用户管理\用户编辑.py
CSV文件已读取
** no cases in this file , skip it.
== cases\账号管理\部门管理\__st__.py
== cases\账号管理\部门管理\主流程.py
CSV文件已读取
** no cases in this file , skip it.
== cases\账号管理\部门管理\部门删除.py
CSV文件已读取
** no cases in this file , skip it.
== cases\账号管理\部门管理\部门新增.py
CSV文件已读取
** no cases in this file , skip it.
== cases\账号管理\部门管理\部门查询.py
CSV文件已读取
** no cases in this file , skip it.
== cases\账号管理\部门管理\部门编辑.py
CSV文件已读取
** no cases in this file , skip it.
=== [ 执行测试用例 ] ===
预备执行用例数量 : 10
========= 测试开始 : 20241126_161801 =========
>>> cases\
[ suite setup ] cases\
-- 第 1 步 -- 初始化浏览器
'----------' 正在初始化浏览器 '----------'
'----------' 浏览器初始化完成 '----------'
-- 第 2 步 -- 处理SSL认证
'----------' 正在处理SSL证书警告 '----------'
'----------' SSL证书警告处理完成 '----------'
>>> cases\登录模块\账号密码登录测试.py
* 登录_001 - 2024-11-26 16:18:45
[ case execution steps ]
-- 第 1 步 -- 输入账号: , 密码: Ubains@4321, 验证码: csba
-- 第 2 步 -- 点击登录按钮
TimeoutException: Element ('xpath', '//*[@id="app"]/div/div[3]/div[1]/div[2]/div/form/div[4]/input') not found or not clickable within 20 seconds.
Exception occurred: Message:
Stacktrace:
GetHandleVerifier [0x005933E3+25059]
(No symbol) [0x0051CDE4]
(No symbol) [0x003FBEC3]
(No symbol) [0x0043FD86]
(No symbol) [0x0043FFCB]
(No symbol) [0x0047D952]
(No symbol) [0x00461F44]
(No symbol) [0x0047B51E]
(No symbol) [0x00461C96]
(No symbol) [0x00433FAC]
(No symbol) [0x00434F3D]
GetHandleVerifier [0x00885543+3113795]
GetHandleVerifier [0x0089A20A+3198986]
GetHandleVerifier [0x008929E2+3168226]
GetHandleVerifier [0x00633250+680016]
(No symbol) [0x0052572D]
(No symbol) [0x005229D8]
(No symbol) [0x00522B75]
(No symbol) [0x005157D0]
BaseThreadInitThunk [0x75C47BA9+25]
RtlInitializeExceptionChain [0x77BBC0CB+107]
RtlClearBits [0x77BBC04F+191]
Alert text: None
-- 第 3 步 -- 校验提示信息: 请输入账号!
** 检查点 ** 弹出提示 ----> !! 不通过!!
FAIL
Traceback:
File "D:\GithubData\自动化脚本-4\ubains-module-test\预定系统\cases\登录模块\账号密码登录测试.py", line 84, in teststeps
CHECK_POINT('弹出提示', notify_text == check_text)
File "C:\Users\29194\AppData\Local\Programs\Python\Python310\lib\site-packages\hytest\common.py", line 76, in CHECK_POINT
raise AssertionError()
AssertionError
* 登录_002 - 2024-11-26 16:20:30
[ case execution steps ]
-- 第 1 步 -- 输入账号: admin@czj1, 密码: , 验证码: csba
-- 第 2 步 -- 点击登录按钮
TimeoutException: Element ('xpath', '//*[@id="app"]/div/div[3]/div[1]/div[2]/div/form/div[4]/input') not found or not clickable within 20 seconds.
Exception occurred: Message:
Stacktrace:
GetHandleVerifier [0x005933E3+25059]
(No symbol) [0x0051CDE4]
(No symbol) [0x003FBEC3]
(No symbol) [0x0043FD86]
(No symbol) [0x0043FFCB]
(No symbol) [0x0047D952]
(No symbol) [0x00461F44]
(No symbol) [0x0047B51E]
(No symbol) [0x00461C96]
(No symbol) [0x00433FAC]
(No symbol) [0x00434F3D]
GetHandleVerifier [0x00885543+3113795]
GetHandleVerifier [0x0089A20A+3198986]
GetHandleVerifier [0x008929E2+3168226]
GetHandleVerifier [0x00633250+680016]
(No symbol) [0x0052572D]
(No symbol) [0x005229D8]
(No symbol) [0x00522B75]
(No symbol) [0x005157D0]
BaseThreadInitThunk [0x75C47BA9+25]
RtlInitializeExceptionChain [0x77BBC0CB+107]
RtlClearBits [0x77BBC04F+191]
Alert text: None
-- 第 3 步 -- 校验提示信息: 请输入密码!
** 检查点 ** 弹出提示 ----> !! 不通过!!
FAIL
Traceback:
File "D:\GithubData\自动化脚本-4\ubains-module-test\预定系统\cases\登录模块\账号密码登录测试.py", line 84, in teststeps
CHECK_POINT('弹出提示', notify_text == check_text)
File "C:\Users\29194\AppData\Local\Programs\Python\Python310\lib\site-packages\hytest\common.py", line 76, in CHECK_POINT
raise AssertionError()
AssertionError
* 登录_003 - 2024-11-26 16:22:12
[ case execution steps ]
-- 第 1 步 -- 输入账号: admin@czj2, 密码: Ubains@4321, 验证码:
-- 第 2 步 -- 点击登录按钮
TimeoutException: Element ('xpath', '//*[@id="app"]/div/div[3]/div[1]/div[2]/div/form/div[4]/input') not found or not clickable within 20 seconds.
Exception occurred: Message:
Stacktrace:
GetHandleVerifier [0x005933E3+25059]
(No symbol) [0x0051CDE4]
(No symbol) [0x003FBEC3]
(No symbol) [0x0043FD86]
(No symbol) [0x0043FFCB]
(No symbol) [0x0047D952]
(No symbol) [0x00461F44]
(No symbol) [0x0047B51E]
(No symbol) [0x00461C96]
(No symbol) [0x00433FAC]
(No symbol) [0x00434F3D]
GetHandleVerifier [0x00885543+3113795]
GetHandleVerifier [0x0089A20A+3198986]
GetHandleVerifier [0x008929E2+3168226]
GetHandleVerifier [0x00633250+680016]
(No symbol) [0x0052572D]
(No symbol) [0x005229D8]
(No symbol) [0x00522B75]
(No symbol) [0x005157D0]
BaseThreadInitThunk [0x75C47BA9+25]
RtlInitializeExceptionChain [0x77BBC0CB+107]
RtlClearBits [0x77BBC04F+191]
Alert text: None
-- 第 3 步 -- 校验提示信息: 请输入验证码!
** 检查点 ** 弹出提示 ----> !! 不通过!!
FAIL
Traceback:
File "D:\GithubData\自动化脚本-4\ubains-module-test\预定系统\cases\登录模块\账号密码登录测试.py", line 84, in teststeps
CHECK_POINT('弹出提示', notify_text == check_text)
File "C:\Users\29194\AppData\Local\Programs\Python\Python310\lib\site-packages\hytest\common.py", line 76, in CHECK_POINT
raise AssertionError()
AssertionError
* 登录_004 - 2024-11-26 16:23:54
[ case execution steps ]
-- 第 1 步 -- 输入账号: admin@czj112, 密码: Ubains@4321, 验证码: csba
-- 第 2 步 -- 点击登录按钮
TimeoutException: Element ('xpath', '//*[@id="app"]/div/div[3]/div[1]/div[2]/div/form/div[4]/input') not found or not clickable within 20 seconds.
Exception occurred: Message:
Stacktrace:
GetHandleVerifier [0x005933E3+25059]
(No symbol) [0x0051CDE4]
(No symbol) [0x003FBEC3]
(No symbol) [0x0043FD86]
(No symbol) [0x0043FFCB]
(No symbol) [0x0047D952]
(No symbol) [0x00461F44]
(No symbol) [0x0047B51E]
(No symbol) [0x00461C96]
(No symbol) [0x00433FAC]
(No symbol) [0x00434F3D]
GetHandleVerifier [0x00885543+3113795]
GetHandleVerifier [0x0089A20A+3198986]
GetHandleVerifier [0x008929E2+3168226]
GetHandleVerifier [0x00633250+680016]
(No symbol) [0x0052572D]
(No symbol) [0x005229D8]
(No symbol) [0x00522B75]
(No symbol) [0x005157D0]
BaseThreadInitThunk [0x75C47BA9+25]
RtlInitializeExceptionChain [0x77BBC0CB+107]
RtlClearBits [0x77BBC04F+191]
Alert text: None
-- 第 3 步 -- 校验提示信息: 账号或密码错误
** 检查点 ** 弹出提示 ----> !! 不通过!!
FAIL
Traceback:
File "D:\GithubData\自动化脚本-4\ubains-module-test\预定系统\cases\登录模块\账号密码登录测试.py", line 84, in teststeps
CHECK_POINT('弹出提示', notify_text == check_text)
File "C:\Users\29194\AppData\Local\Programs\Python\Python310\lib\site-packages\hytest\common.py", line 76, in CHECK_POINT
raise AssertionError()
AssertionError
* 登录_005 - 2024-11-26 16:25:36
[ case execution steps ]
-- 第 1 步 -- 输入账号: adM 12in@czj, 密码: Ubains@4321, 验证码: csba
-- 第 2 步 -- 点击登录按钮
ABORT Message: disconnected: unable to send message to renderer
(failed to check if window was closed: disconnected: not connected to DevTools)
(Session info: chrome=131.0.6778.86)
Stacktrace:
GetHandleVerifier [0x005933E3+25059]
(No symbol) [0x0051CDE4]
(No symbol) [0x003FBEC3]
(No symbol) [0x003EC9DC]
(No symbol) [0x003EC966]
(No symbol) [0x003EB4C2]
(No symbol) [0x003EBF8D]
(No symbol) [0x003FF9AF]
(No symbol) [0x0040012D]
(No symbol) [0x004038EA]
(No symbol) [0x00403967]
(No symbol) [0x0043F999]
(No symbol) [0x0043FFCB]
(No symbol) [0x0047D952]
(No symbol) [0x00461F44]
(No symbol) [0x0047B51E]
(No symbol) [0x00461C96]
(No symbol) [0x00433FAC]
(No symbol) [0x00434F3D]
GetHandleVerifier [0x00885543+3113795]
GetHandleVerifier [0x0089A20A+3198986]
GetHandleVerifier [0x008929E2+3168226]
GetHandleVerifier [0x00633250+680016]
(No symbol) [0x0052572D]
(No symbol) [0x005229D8]
(No symbol) [0x00522B75]
(No symbol) [0x005157D0]
BaseThreadInitThunk [0x75C47BA9+25]
RtlInitializeExceptionChain [0x77BBC0CB+107]
RtlClearBits [0x77BBC04F+191]
Traceback:
File "D:\GithubData\自动化脚本-4\ubains-module-test\预定系统\cases\登录模块\账号密码登录测试.py", line 63, in teststeps
safe_click((By.XPATH, '//*[@id="app"]/div/div[3]/div[1]/div[2]/div/form/div[4]/input'),wd)
File "D:\GithubData\自动化脚本-4\ubains-module-test\预定系统\Base\base.py", line 181, in safe_click
element = WebDriverWait(wd, 20).until(EC.visibility_of_element_located(element_locator))
File "C:\Users\29194\AppData\Local\Programs\Python\Python310\lib\site-packages\selenium\webdriver\support\wait.py", line 96, in until
value = method(self._driver)
File "C:\Users\29194\AppData\Local\Programs\Python\Python310\lib\site-packages\selenium\webdriver\support\expected_conditions.py", line 156, in _predicate
return _element_if_visible(driver.find_element(*locator))
File "C:\Users\29194\AppData\Local\Programs\Python\Python310\lib\site-packages\selenium\webdriver\remote\webdriver.py", line 766, in find_element
return self.execute(Command.FIND_ELEMENT, {"using": by, "value": value})["value"]
File "C:\Users\29194\AppData\Local\Programs\Python\Python310\lib\site-packages\selenium\webdriver\remote\webdriver.py", line 380, in execute
self.error_handler.check_response(response)
File "C:\Users\29194\AppData\Local\Programs\Python\Python310\lib\site-packages\selenium\webdriver\remote\errorhandler.py", line 229, in check_response
raise exception_class(message, screen, stacktrace)
selenium.common.exceptions.WebDriverException: Message: disconnected: unable to send message to renderer
(failed to check if window was closed: disconnected: not connected to DevTools)
(Session info: chrome=131.0.6778.86)
Stacktrace:
GetHandleVerifier [0x005933E3+25059]
(No symbol) [0x0051CDE4]
(No symbol) [0x003FBEC3]
(No symbol) [0x003EC9DC]
(No symbol) [0x003EC966]
(No symbol) [0x003EB4C2]
(No symbol) [0x003EBF8D]
(No symbol) [0x003FF9AF]
(No symbol) [0x0040012D]
(No symbol) [0x004038EA]
(No symbol) [0x00403967]
(No symbol) [0x0043F999]
(No symbol) [0x0043FFCB]
(No symbol) [0x0047D952]
(No symbol) [0x00461F44]
(No symbol) [0x0047B51E]
(No symbol) [0x00461C96]
(No symbol) [0x00433FAC]
(No symbol) [0x00434F3D]
GetHandleVerifier [0x00885543+3113795]
GetHandleVerifier [0x0089A20A+3198986]
GetHandleVerifier [0x008929E2+3168226]
GetHandleVerifier [0x00633250+680016]
(No symbol) [0x0052572D]
(No symbol) [0x005229D8]
(No symbol) [0x00522B75]
(No symbol) [0x005157D0]
BaseThreadInitThunk [0x75C47BA9+25]
RtlInitializeExceptionChain [0x77BBC0CB+107]
RtlClearBits [0x77BBC04F+191]
* 登录_006 - 2024-11-26 16:26:54
[ case execution steps ]
-- 第 1 步 -- 输入账号: admin@czj3, 密码: 12345, 验证码: csba
ABORT Message: disconnected: not connected to DevTools
(failed to check if window was closed: disconnected: not connected to DevTools)
(Session info: chrome=131.0.6778.86)
Stacktrace:
GetHandleVerifier [0x005933E3+25059]
(No symbol) [0x0051CDE4]
(No symbol) [0x003FBEC3]
(No symbol) [0x003EC468]
(No symbol) [0x003EC389]
(No symbol) [0x003FE350]
(No symbol) [0x0047AE69]
(No symbol) [0x00461C96]
(No symbol) [0x00433FAC]
(No symbol) [0x00434F3D]
GetHandleVerifier [0x00885543+3113795]
GetHandleVerifier [0x0089A20A+3198986]
GetHandleVerifier [0x008929E2+3168226]
GetHandleVerifier [0x00633250+680016]
(No symbol) [0x0052572D]
(No symbol) [0x005229D8]
(No symbol) [0x00522B75]
(No symbol) [0x005157D0]
BaseThreadInitThunk [0x75C47BA9+25]
RtlInitializeExceptionChain [0x77BBC0CB+107]
RtlClearBits [0x77BBC04F+191]
Traceback:
File "D:\GithubData\自动化脚本-4\ubains-module-test\预定系统\cases\登录模块\账号密码登录测试.py", line 52, in teststeps
safe_send_keys((By.XPATH, '//*[@id="app"]/div/div[3]/div[1]/div[2]/div/form/div[1]/div/input'), username,wd)
File "D:\GithubData\自动化脚本-4\ubains-module-test\预定系统\Base\base.py", line 155, in safe_send_keys
element = WebDriverWait(wd, 20).until(EC.visibility_of_element_located(element_locator))
File "C:\Users\29194\AppData\Local\Programs\Python\Python310\lib\site-packages\selenium\webdriver\support\wait.py", line 96, in until
value = method(self._driver)
File "C:\Users\29194\AppData\Local\Programs\Python\Python310\lib\site-packages\selenium\webdriver\support\expected_conditions.py", line 156, in _predicate
return _element_if_visible(driver.find_element(*locator))
File "C:\Users\29194\AppData\Local\Programs\Python\Python310\lib\site-packages\selenium\webdriver\remote\webdriver.py", line 766, in find_element
return self.execute(Command.FIND_ELEMENT, {"using": by, "value": value})["value"]
File "C:\Users\29194\AppData\Local\Programs\Python\Python310\lib\site-packages\selenium\webdriver\remote\webdriver.py", line 380, in execute
self.error_handler.check_response(response)
File "C:\Users\29194\AppData\Local\Programs\Python\Python310\lib\site-packages\selenium\webdriver\remote\errorhandler.py", line 229, in check_response
raise exception_class(message, screen, stacktrace)
selenium.common.exceptions.WebDriverException: Message: disconnected: not connected to DevTools
(failed to check if window was closed: disconnected: not connected to DevTools)
(Session info: chrome=131.0.6778.86)
Stacktrace:
GetHandleVerifier [0x005933E3+25059]
(No symbol) [0x0051CDE4]
(No symbol) [0x003FBEC3]
(No symbol) [0x003EC468]
(No symbol) [0x003EC389]
(No symbol) [0x003FE350]
(No symbol) [0x0047AE69]
(No symbol) [0x00461C96]
(No symbol) [0x00433FAC]
(No symbol) [0x00434F3D]
GetHandleVerifier [0x00885543+3113795]
GetHandleVerifier [0x0089A20A+3198986]
GetHandleVerifier [0x008929E2+3168226]
GetHandleVerifier [0x00633250+680016]
(No symbol) [0x0052572D]
(No symbol) [0x005229D8]
(No symbol) [0x00522B75]
(No symbol) [0x005157D0]
BaseThreadInitThunk [0x75C47BA9+25]
RtlInitializeExceptionChain [0x77BBC0CB+107]
RtlClearBits [0x77BBC04F+191]
* 登录_007 - 2024-11-26 16:26:54
[ case execution steps ]
-- 第 1 步 -- 输入账号: admin@czj4, 密码: U bains1s@432, 验证码: csba
ABORT Message: disconnected: not connected to DevTools
(failed to check if window was closed: disconnected: not connected to DevTools)
(Session info: chrome=131.0.6778.86)
Stacktrace:
GetHandleVerifier [0x005933E3+25059]
(No symbol) [0x0051CDE4]
(No symbol) [0x003FBEC3]
(No symbol) [0x003EC468]
(No symbol) [0x003EC389]
(No symbol) [0x003FE350]
(No symbol) [0x0047AE69]
(No symbol) [0x00461C96]
(No symbol) [0x00433FAC]
(No symbol) [0x00434F3D]
GetHandleVerifier [0x00885543+3113795]
GetHandleVerifier [0x0089A20A+3198986]
GetHandleVerifier [0x008929E2+3168226]
GetHandleVerifier [0x00633250+680016]
(No symbol) [0x0052572D]
(No symbol) [0x005229D8]
(No symbol) [0x00522B75]
(No symbol) [0x005157D0]
BaseThreadInitThunk [0x75C47BA9+25]
RtlInitializeExceptionChain [0x77BBC0CB+107]
RtlClearBits [0x77BBC04F+191]
Traceback:
File "D:\GithubData\自动化脚本-4\ubains-module-test\预定系统\cases\登录模块\账号密码登录测试.py", line 52, in teststeps
safe_send_keys((By.XPATH, '//*[@id="app"]/div/div[3]/div[1]/div[2]/div/form/div[1]/div/input'), username,wd)
File "D:\GithubData\自动化脚本-4\ubains-module-test\预定系统\Base\base.py", line 155, in safe_send_keys
element = WebDriverWait(wd, 20).until(EC.visibility_of_element_located(element_locator))
File "C:\Users\29194\AppData\Local\Programs\Python\Python310\lib\site-packages\selenium\webdriver\support\wait.py", line 96, in until
value = method(self._driver)
File "C:\Users\29194\AppData\Local\Programs\Python\Python310\lib\site-packages\selenium\webdriver\support\expected_conditions.py", line 156, in _predicate
return _element_if_visible(driver.find_element(*locator))
File "C:\Users\29194\AppData\Local\Programs\Python\Python310\lib\site-packages\selenium\webdriver\remote\webdriver.py", line 766, in find_element
return self.execute(Command.FIND_ELEMENT, {"using": by, "value": value})["value"]
File "C:\Users\29194\AppData\Local\Programs\Python\Python310\lib\site-packages\selenium\webdriver\remote\webdriver.py", line 380, in execute
self.error_handler.check_response(response)
File "C:\Users\29194\AppData\Local\Programs\Python\Python310\lib\site-packages\selenium\webdriver\remote\errorhandler.py", line 229, in check_response
raise exception_class(message, screen, stacktrace)
selenium.common.exceptions.WebDriverException: Message: disconnected: not connected to DevTools
(failed to check if window was closed: disconnected: not connected to DevTools)
(Session info: chrome=131.0.6778.86)
Stacktrace:
GetHandleVerifier [0x005933E3+25059]
(No symbol) [0x0051CDE4]
(No symbol) [0x003FBEC3]
(No symbol) [0x003EC468]
(No symbol) [0x003EC389]
(No symbol) [0x003FE350]
(No symbol) [0x0047AE69]
(No symbol) [0x00461C96]
(No symbol) [0x00433FAC]
(No symbol) [0x00434F3D]
GetHandleVerifier [0x00885543+3113795]
GetHandleVerifier [0x0089A20A+3198986]
GetHandleVerifier [0x008929E2+3168226]
GetHandleVerifier [0x00633250+680016]
(No symbol) [0x0052572D]
(No symbol) [0x005229D8]
(No symbol) [0x00522B75]
(No symbol) [0x005157D0]
BaseThreadInitThunk [0x75C47BA9+25]
RtlInitializeExceptionChain [0x77BBC0CB+107]
RtlClearBits [0x77BBC04F+191]
* 登录_008 - 2024-11-26 16:26:54
[ case execution steps ]
-- 第 1 步 -- 输入账号: admin@czj5, 密码: Ubains@4321, 验证码: 123
ABORT Message: disconnected: not connected to DevTools
(failed to check if window was closed: disconnected: not connected to DevTools)
(Session info: chrome=131.0.6778.86)
Stacktrace:
GetHandleVerifier [0x005933E3+25059]
(No symbol) [0x0051CDE4]
(No symbol) [0x003FBEC3]
(No symbol) [0x003EC468]
(No symbol) [0x003EC389]
(No symbol) [0x003FE350]
(No symbol) [0x0047AE69]
(No symbol) [0x00461C96]
(No symbol) [0x00433FAC]
(No symbol) [0x00434F3D]
GetHandleVerifier [0x00885543+3113795]
GetHandleVerifier [0x0089A20A+3198986]
GetHandleVerifier [0x008929E2+3168226]
GetHandleVerifier [0x00633250+680016]
(No symbol) [0x0052572D]
(No symbol) [0x005229D8]
(No symbol) [0x00522B75]
(No symbol) [0x005157D0]
BaseThreadInitThunk [0x75C47BA9+25]
RtlInitializeExceptionChain [0x77BBC0CB+107]
RtlClearBits [0x77BBC04F+191]
Traceback:
File "D:\GithubData\自动化脚本-4\ubains-module-test\预定系统\cases\登录模块\账号密码登录测试.py", line 52, in teststeps
safe_send_keys((By.XPATH, '//*[@id="app"]/div/div[3]/div[1]/div[2]/div/form/div[1]/div/input'), username,wd)
File "D:\GithubData\自动化脚本-4\ubains-module-test\预定系统\Base\base.py", line 155, in safe_send_keys
element = WebDriverWait(wd, 20).until(EC.visibility_of_element_located(element_locator))
File "C:\Users\29194\AppData\Local\Programs\Python\Python310\lib\site-packages\selenium\webdriver\support\wait.py", line 96, in until
value = method(self._driver)
File "C:\Users\29194\AppData\Local\Programs\Python\Python310\lib\site-packages\selenium\webdriver\support\expected_conditions.py", line 156, in _predicate
return _element_if_visible(driver.find_element(*locator))
File "C:\Users\29194\AppData\Local\Programs\Python\Python310\lib\site-packages\selenium\webdriver\remote\webdriver.py", line 766, in find_element
return self.execute(Command.FIND_ELEMENT, {"using": by, "value": value})["value"]
File "C:\Users\29194\AppData\Local\Programs\Python\Python310\lib\site-packages\selenium\webdriver\remote\webdriver.py", line 380, in execute
self.error_handler.check_response(response)
File "C:\Users\29194\AppData\Local\Programs\Python\Python310\lib\site-packages\selenium\webdriver\remote\errorhandler.py", line 229, in check_response
raise exception_class(message, screen, stacktrace)
selenium.common.exceptions.WebDriverException: Message: disconnected: not connected to DevTools
(failed to check if window was closed: disconnected: not connected to DevTools)
(Session info: chrome=131.0.6778.86)
Stacktrace:
GetHandleVerifier [0x005933E3+25059]
(No symbol) [0x0051CDE4]
(No symbol) [0x003FBEC3]
(No symbol) [0x003EC468]
(No symbol) [0x003EC389]
(No symbol) [0x003FE350]
(No symbol) [0x0047AE69]
(No symbol) [0x00461C96]
(No symbol) [0x00433FAC]
(No symbol) [0x00434F3D]
GetHandleVerifier [0x00885543+3113795]
GetHandleVerifier [0x0089A20A+3198986]
GetHandleVerifier [0x008929E2+3168226]
GetHandleVerifier [0x00633250+680016]
(No symbol) [0x0052572D]
(No symbol) [0x005229D8]
(No symbol) [0x00522B75]
(No symbol) [0x005157D0]
BaseThreadInitThunk [0x75C47BA9+25]
RtlInitializeExceptionChain [0x77BBC0CB+107]
RtlClearBits [0x77BBC04F+191]
* 登录_009 - 2024-11-26 16:26:54
[ case execution steps ]
-- 第 1 步 -- 输入账号: admin@czj6, 密码: Ubains@4321, 验证码: cs 12
ABORT Message: disconnected: not connected to DevTools
(failed to check if window was closed: disconnected: not connected to DevTools)
(Session info: chrome=131.0.6778.86)
Stacktrace:
GetHandleVerifier [0x005933E3+25059]
(No symbol) [0x0051CDE4]
(No symbol) [0x003FBEC3]
(No symbol) [0x003EC468]
(No symbol) [0x003EC389]
(No symbol) [0x003FE350]
(No symbol) [0x0047AE69]
(No symbol) [0x00461C96]
(No symbol) [0x00433FAC]
(No symbol) [0x00434F3D]
GetHandleVerifier [0x00885543+3113795]
GetHandleVerifier [0x0089A20A+3198986]
GetHandleVerifier [0x008929E2+3168226]
GetHandleVerifier [0x00633250+680016]
(No symbol) [0x0052572D]
(No symbol) [0x005229D8]
(No symbol) [0x00522B75]
(No symbol) [0x005157D0]
BaseThreadInitThunk [0x75C47BA9+25]
RtlInitializeExceptionChain [0x77BBC0CB+107]
RtlClearBits [0x77BBC04F+191]
Traceback:
File "D:\GithubData\自动化脚本-4\ubains-module-test\预定系统\cases\登录模块\账号密码登录测试.py", line 52, in teststeps
safe_send_keys((By.XPATH, '//*[@id="app"]/div/div[3]/div[1]/div[2]/div/form/div[1]/div/input'), username,wd)
File "D:\GithubData\自动化脚本-4\ubains-module-test\预定系统\Base\base.py", line 155, in safe_send_keys
element = WebDriverWait(wd, 20).until(EC.visibility_of_element_located(element_locator))
File "C:\Users\29194\AppData\Local\Programs\Python\Python310\lib\site-packages\selenium\webdriver\support\wait.py", line 96, in until
value = method(self._driver)
File "C:\Users\29194\AppData\Local\Programs\Python\Python310\lib\site-packages\selenium\webdriver\support\expected_conditions.py", line 156, in _predicate
return _element_if_visible(driver.find_element(*locator))
File "C:\Users\29194\AppData\Local\Programs\Python\Python310\lib\site-packages\selenium\webdriver\remote\webdriver.py", line 766, in find_element
return self.execute(Command.FIND_ELEMENT, {"using": by, "value": value})["value"]
File "C:\Users\29194\AppData\Local\Programs\Python\Python310\lib\site-packages\selenium\webdriver\remote\webdriver.py", line 380, in execute
self.error_handler.check_response(response)
File "C:\Users\29194\AppData\Local\Programs\Python\Python310\lib\site-packages\selenium\webdriver\remote\errorhandler.py", line 229, in check_response
raise exception_class(message, screen, stacktrace)
selenium.common.exceptions.WebDriverException: Message: disconnected: not connected to DevTools
(failed to check if window was closed: disconnected: not connected to DevTools)
(Session info: chrome=131.0.6778.86)
Stacktrace:
GetHandleVerifier [0x005933E3+25059]
(No symbol) [0x0051CDE4]
(No symbol) [0x003FBEC3]
(No symbol) [0x003EC468]
(No symbol) [0x003EC389]
(No symbol) [0x003FE350]
(No symbol) [0x0047AE69]
(No symbol) [0x00461C96]
(No symbol) [0x00433FAC]
(No symbol) [0x00434F3D]
GetHandleVerifier [0x00885543+3113795]
GetHandleVerifier [0x0089A20A+3198986]
GetHandleVerifier [0x008929E2+3168226]
GetHandleVerifier [0x00633250+680016]
(No symbol) [0x0052572D]
(No symbol) [0x005229D8]
(No symbol) [0x00522B75]
(No symbol) [0x005157D0]
BaseThreadInitThunk [0x75C47BA9+25]
RtlInitializeExceptionChain [0x77BBC0CB+107]
RtlClearBits [0x77BBC04F+191]
* 登录_010 - 2024-11-26 16:26:54
[ case execution steps ]
-- 第 1 步 -- 输入账号: admin@ZDH, 密码: Ubains@4321, 验证码: csba
ABORT Message: disconnected: not connected to DevTools
(failed to check if window was closed: disconnected: not connected to DevTools)
(Session info: chrome=131.0.6778.86)
Stacktrace:
GetHandleVerifier [0x005933E3+25059]
(No symbol) [0x0051CDE4]
(No symbol) [0x003FBEC3]
(No symbol) [0x003EC468]
(No symbol) [0x003EC389]
(No symbol) [0x003FE350]
(No symbol) [0x0047AE69]
(No symbol) [0x00461C96]
(No symbol) [0x00433FAC]
(No symbol) [0x00434F3D]
GetHandleVerifier [0x00885543+3113795]
GetHandleVerifier [0x0089A20A+3198986]
GetHandleVerifier [0x008929E2+3168226]
GetHandleVerifier [0x00633250+680016]
(No symbol) [0x0052572D]
(No symbol) [0x005229D8]
(No symbol) [0x00522B75]
(No symbol) [0x005157D0]
BaseThreadInitThunk [0x75C47BA9+25]
RtlInitializeExceptionChain [0x77BBC0CB+107]
RtlClearBits [0x77BBC04F+191]
Traceback:
File "D:\GithubData\自动化脚本-4\ubains-module-test\预定系统\cases\登录模块\账号密码登录测试.py", line 52, in teststeps
safe_send_keys((By.XPATH, '//*[@id="app"]/div/div[3]/div[1]/div[2]/div/form/div[1]/div/input'), username,wd)
File "D:\GithubData\自动化脚本-4\ubains-module-test\预定系统\Base\base.py", line 155, in safe_send_keys
element = WebDriverWait(wd, 20).until(EC.visibility_of_element_located(element_locator))
File "C:\Users\29194\AppData\Local\Programs\Python\Python310\lib\site-packages\selenium\webdriver\support\wait.py", line 96, in until
value = method(self._driver)
File "C:\Users\29194\AppData\Local\Programs\Python\Python310\lib\site-packages\selenium\webdriver\support\expected_conditions.py", line 156, in _predicate
return _element_if_visible(driver.find_element(*locator))
File "C:\Users\29194\AppData\Local\Programs\Python\Python310\lib\site-packages\selenium\webdriver\remote\webdriver.py", line 766, in find_element
return self.execute(Command.FIND_ELEMENT, {"using": by, "value": value})["value"]
File "C:\Users\29194\AppData\Local\Programs\Python\Python310\lib\site-packages\selenium\webdriver\remote\webdriver.py", line 380, in execute
self.error_handler.check_response(response)
File "C:\Users\29194\AppData\Local\Programs\Python\Python310\lib\site-packages\selenium\webdriver\remote\errorhandler.py", line 229, in check_response
raise exception_class(message, screen, stacktrace)
selenium.common.exceptions.WebDriverException: Message: disconnected: not connected to DevTools
(failed to check if window was closed: disconnected: not connected to DevTools)
(Session info: chrome=131.0.6778.86)
Stacktrace:
GetHandleVerifier [0x005933E3+25059]
(No symbol) [0x0051CDE4]
(No symbol) [0x003FBEC3]
(No symbol) [0x003EC468]
(No symbol) [0x003EC389]
(No symbol) [0x003FE350]
(No symbol) [0x0047AE69]
(No symbol) [0x00461C96]
(No symbol) [0x00433FAC]
(No symbol) [0x00434F3D]
GetHandleVerifier [0x00885543+3113795]
GetHandleVerifier [0x0089A20A+3198986]
GetHandleVerifier [0x008929E2+3168226]
GetHandleVerifier [0x00633250+680016]
(No symbol) [0x0052572D]
(No symbol) [0x005229D8]
(No symbol) [0x00522B75]
(No symbol) [0x005157D0]
BaseThreadInitThunk [0x75C47BA9+25]
RtlInitializeExceptionChain [0x77BBC0CB+107]
RtlClearBits [0x77BBC04F+191]
[ suite teardown ] cases\
清除浏览器
=== [ 收集测试用例 ] ===
== cases\__st__.py
== cases\会议主流程\__st__.py
== cases\会议主流程\会议修改.py
CSV文件已读取
** no cases in this file , skip it.
== cases\会议主流程\会议预约.py
CSV文件已读取
** no cases in this file , skip it.
== cases\会议室管理\会议室管理\__st__.py
== cases\会议室管理\会议室管理\会议室删除.py
CSV文件已读取
** no cases in this file , skip it.
== cases\会议室管理\会议室管理\会议室新增.py
CSV文件已读取
** no cases in this file , skip it.
== cases\会议室管理\会议室管理\会议室查询.py
CSV文件已读取
** no cases in this file , skip it.
== cases\会议室管理\会议室管理\会议室编辑.py
CSV文件已读取
** no cases in this file , skip it.
== cases\会议室管理\功能管理\__st__.py
== cases\会议室管理\功能管理\功能删除.py
CSV文件已读取
** no cases in this file , skip it.
== cases\会议室管理\功能管理\功能新增.py
CSV文件已读取
** no cases in this file , skip it.
== cases\会议室管理\功能管理\功能查询.py
CSV文件已读取
** no cases in this file , skip it.
== cases\会议室管理\功能管理\功能编辑.py
CSV文件已读取
** no cases in this file , skip it.
== cases\会议室管理\区域管理\__st__.py
== cases\会议室管理\区域管理\区域删除.py
CSV文件已读取
** no cases in this file , skip it.
== cases\会议室管理\区域管理\区域新增.py
CSV文件已读取
** no cases in this file , skip it.
== cases\会议室管理\区域管理\区域编辑.py
CSV文件已读取
** no cases in this file , skip it.
== cases\登录模块\账号密码登录测试.py
CSV文件已读取
== cases\系统管理\__st__.py
== cases\系统管理\系统设置.py
** no cases in this file , skip it.
== cases\设备管理\安卓信息.py
** no cases in this file, skip it.
== cases\设备管理\毫米波雷达.py
** no cases in this file, skip it.
== cases\账号管理\用户管理\__st__.py
== cases\账号管理\用户管理\主流程.py
** no cases in this file , skip it.
== cases\账号管理\用户管理\用户修改密码.py
CSV文件已读取
** no cases in this file , skip it.
== cases\账号管理\用户管理\用户删除.py
CSV文件已读取
** no cases in this file , skip it.
== cases\账号管理\用户管理\用户新增.py
CSV文件已读取
** no cases in this file , skip it.
== cases\账号管理\用户管理\用户查询.py
CSV文件已读取
** no cases in this file , skip it.
== cases\账号管理\用户管理\用户状态设置.py
CSV文件已读取
** no cases in this file , skip it.
== cases\账号管理\用户管理\用户编辑.py
CSV文件已读取
** no cases in this file , skip it.
== cases\账号管理\部门管理\__st__.py
== cases\账号管理\部门管理\主流程.py
CSV文件已读取
** no cases in this file , skip it.
== cases\账号管理\部门管理\部门删除.py
CSV文件已读取
** no cases in this file , skip it.
== cases\账号管理\部门管理\部门新增.py
CSV文件已读取
** no cases in this file , skip it.
== cases\账号管理\部门管理\部门查询.py
CSV文件已读取
** no cases in this file , skip it.
== cases\账号管理\部门管理\部门编辑.py
CSV文件已读取
** no cases in this file , skip it.
=== [ 执行测试用例 ] ===
预备执行用例数量 : 10
========= 测试开始 : 20241125_175001 =========
>>> cases\
[ suite setup ] cases\
-- 第 1 步 -- 初始化浏览器
'----------' 正在初始化浏览器 '----------'
'----------' 浏览器初始化完成 '----------'
-- 第 2 步 -- 处理SSL认证
'----------' 正在处理SSL证书警告 '----------'
'----------' SSL证书警告处理完成 '----------'
>>> cases\登录模块\账号密码登录测试.py
* 登录_001 - 2024-11-25 17:50:16
[ case execution steps ]
-- 第 1 步 -- 输入账号: , 密码: Ubains@4321, 验证码: csba
-- 第 2 步 -- 点击登录按钮
picture imgs/Login/Login_Pwd/登录_001_检查登录失败提示信息20241125175018799640.png
Alert text: 请输入账号!
-- 第 3 步 -- 校验提示信息: 请输入账号!
** 检查点 ** 弹出提示 ----> 通过
-- 第 4 步 -- 刷新页面
PASS
* 登录_002 - 2024-11-25 17:50:19
[ case execution steps ]
-- 第 1 步 -- 输入账号: admin@czj1, 密码: , 验证码: csba
-- 第 2 步 -- 点击登录按钮
picture imgs/Login/Login_Pwd/登录_002_检查登录失败提示信息20241125175021814253.png
Alert text: 请输入密码!
-- 第 3 步 -- 校验提示信息: 请输入密码!
** 检查点 ** 弹出提示 ----> 通过
-- 第 4 步 -- 刷新页面
PASS
* 登录_003 - 2024-11-25 17:50:22
[ case execution steps ]
-- 第 1 步 -- 输入账号: admin@czj2, 密码: Ubains@4321, 验证码:
-- 第 2 步 -- 点击登录按钮
picture imgs/Login/Login_Pwd/登录_003_检查登录失败提示信息20241125175024843078.png
Alert text: 请输入验证码!
-- 第 3 步 -- 校验提示信息: 请输入验证码!
** 检查点 ** 弹出提示 ----> 通过
-- 第 4 步 -- 刷新页面
PASS
* 登录_004 - 2024-11-25 17:50:25
[ case execution steps ]
-- 第 1 步 -- 输入账号: admin@czj112, 密码: Ubains@4321, 验证码: csba
-- 第 2 步 -- 点击登录按钮
picture imgs/Login/Login_Pwd/登录_004_检查登录失败提示信息20241125175027757649.png
Alert text: 账号或密码错误
-- 第 3 步 -- 校验提示信息: 账号或密码错误
** 检查点 ** 弹出提示 ----> 通过
-- 第 4 步 -- 刷新页面
PASS
* 登录_005 - 2024-11-25 17:50:28
[ case execution steps ]
-- 第 1 步 -- 输入账号: adM 12in@czj, 密码: Ubains@4321, 验证码: csba
-- 第 2 步 -- 点击登录按钮
picture imgs/Login/Login_Pwd/登录_005_检查登录失败提示信息20241125175030707855.png
Alert text: 账号或密码错误
-- 第 3 步 -- 校验提示信息: 账号或密码错误
** 检查点 ** 弹出提示 ----> 通过
-- 第 4 步 -- 刷新页面
PASS
* 登录_006 - 2024-11-25 17:50:31
[ case execution steps ]
-- 第 1 步 -- 输入账号: admin@czj3, 密码: 12345, 验证码: csba
-- 第 2 步 -- 点击登录按钮
picture imgs/Login/Login_Pwd/登录_006_检查登录失败提示信息20241125175033655666.png
Alert text: 账号或密码错误
-- 第 3 步 -- 校验提示信息: 账号或密码错误
** 检查点 ** 弹出提示 ----> 通过
-- 第 4 步 -- 刷新页面
PASS
* 登录_007 - 2024-11-25 17:50:34
[ case execution steps ]
-- 第 1 步 -- 输入账号: admin@czj4, 密码: U bains1s@432, 验证码: csba
-- 第 2 步 -- 点击登录按钮
picture imgs/Login/Login_Pwd/登录_007_检查登录失败提示信息20241125175036568256.png
Alert text: 账号或密码错误
-- 第 3 步 -- 校验提示信息: 账号或密码错误
** 检查点 ** 弹出提示 ----> 通过
-- 第 4 步 -- 刷新页面
PASS
* 登录_008 - 2024-11-25 17:50:37
[ case execution steps ]
-- 第 1 步 -- 输入账号: admin@czj5, 密码: Ubains@4321, 验证码: 123
-- 第 2 步 -- 点击登录按钮
picture imgs/Login/Login_Pwd/登录_008_检查登录失败提示信息20241125175039445768.png
Alert text: 验证码错误
-- 第 3 步 -- 校验提示信息: 验证码错误
** 检查点 ** 弹出提示 ----> 通过
-- 第 4 步 -- 刷新页面
PASS
* 登录_009 - 2024-11-25 17:50:39
[ case execution steps ]
-- 第 1 步 -- 输入账号: admin@czj6, 密码: Ubains@4321, 验证码: cs 12
-- 第 2 步 -- 点击登录按钮
picture imgs/Login/Login_Pwd/登录_009_检查登录失败提示信息20241125175042356574.png
Alert text: 验证码错误
-- 第 3 步 -- 校验提示信息: 验证码错误
** 检查点 ** 弹出提示 ----> 通过
-- 第 4 步 -- 刷新页面
PASS
* 登录_010 - 2024-11-25 17:50:42
[ case execution steps ]
-- 第 1 步 -- 输入账号: admin@ZDH, 密码: Ubains@4321, 验证码: csba
-- 第 2 步 -- 点击登录按钮
picture imgs/Login/Login_Pwd/登录_010_检查登录成功提示信息20241125175045377467.png
=== [ 收集测试用例 ] ===
== cases\__st__.py
== cases\会议主流程\__st__.py
== cases\会议主流程\会议修改.py
CSV文件已读取
** no cases in this file , skip it.
== cases\会议主流程\会议预约.py
CSV文件已读取
** no cases in this file , skip it.
== cases\会议室管理\会议室管理\__st__.py
== cases\会议室管理\会议室管理\会议室删除.py
CSV文件已读取
** no cases in this file , skip it.
== cases\会议室管理\会议室管理\会议室新增.py
CSV文件已读取
** no cases in this file , skip it.
== cases\会议室管理\会议室管理\会议室查询.py
CSV文件已读取
** no cases in this file , skip it.
== cases\会议室管理\会议室管理\会议室编辑.py
CSV文件已读取
** no cases in this file , skip it.
== cases\会议室管理\功能管理\__st__.py
== cases\会议室管理\功能管理\功能删除.py
CSV文件已读取
** no cases in this file , skip it.
== cases\会议室管理\功能管理\功能新增.py
CSV文件已读取
** no cases in this file , skip it.
== cases\会议室管理\功能管理\功能查询.py
CSV文件已读取
** no cases in this file , skip it.
== cases\会议室管理\功能管理\功能编辑.py
CSV文件已读取
** no cases in this file , skip it.
== cases\会议室管理\区域管理\__st__.py
== cases\会议室管理\区域管理\区域删除.py
CSV文件已读取
** no cases in this file , skip it.
== cases\会议室管理\区域管理\区域新增.py
CSV文件已读取
** no cases in this file , skip it.
== cases\会议室管理\区域管理\区域编辑.py
CSV文件已读取
** no cases in this file , skip it.
== cases\登录模块\账号密码登录测试.py
CSV文件已读取
== cases\系统管理\__st__.py
== cases\系统管理\系统设置.py
** no cases in this file , skip it.
== cases\设备管理\安卓信息.py
** no cases in this file, skip it.
== cases\设备管理\毫米波雷达.py
** no cases in this file, skip it.
== cases\账号管理\用户管理\__st__.py
== cases\账号管理\用户管理\主流程.py
** no cases in this file , skip it.
== cases\账号管理\用户管理\用户修改密码.py
CSV文件已读取
** no cases in this file , skip it.
== cases\账号管理\用户管理\用户删除.py
CSV文件已读取
** no cases in this file , skip it.
== cases\账号管理\用户管理\用户新增.py
CSV文件已读取
** no cases in this file , skip it.
== cases\账号管理\用户管理\用户查询.py
CSV文件已读取
** no cases in this file , skip it.
== cases\账号管理\用户管理\用户状态设置.py
CSV文件已读取
** no cases in this file , skip it.
== cases\账号管理\用户管理\用户编辑.py
CSV文件已读取
** no cases in this file , skip it.
== cases\账号管理\部门管理\__st__.py
== cases\账号管理\部门管理\主流程.py
CSV文件已读取
** no cases in this file , skip it.
== cases\账号管理\部门管理\部门删除.py
CSV文件已读取
** no cases in this file , skip it.
== cases\账号管理\部门管理\部门新增.py
CSV文件已读取
** no cases in this file , skip it.
== cases\账号管理\部门管理\部门查询.py
CSV文件已读取
** no cases in this file , skip it.
== cases\账号管理\部门管理\部门编辑.py
CSV文件已读取
** no cases in this file , skip it.
=== [ 执行测试用例 ] ===
预备执行用例数量 : 10
========= 测试开始 : 20241125_174401 =========
>>> cases\
[ suite setup ] cases\
-- 第 1 步 -- 初始化浏览器
'----------' 正在初始化浏览器 '----------'
'----------' 浏览器初始化完成 '----------'
-- 第 2 步 -- 处理SSL认证
'----------' 正在处理SSL证书警告 '----------'
'----------' SSL证书警告处理完成 '----------'
>>> cases\登录模块\账号密码登录测试.py
* 登录_001 - 2024-11-25 17:44:04
[ case execution steps ]
-- 第 1 步 -- 输入账号: , 密码: Ubains@4321, 验证码: csba
-- 第 2 步 -- 点击登录按钮
picture imgs/Login/Login_Pwd/登录_001_检查登录失败提示信息20241125174407080171.png
Alert text: 请输入账号!
-- 第 3 步 -- 校验提示信息: 请输入账号!
** 检查点 ** 弹出提示 ----> 通过
-- 第 4 步 -- 刷新页面
PASS
* 登录_002 - 2024-11-25 17:44:07
[ case execution steps ]
-- 第 1 步 -- 输入账号: admin@czj1, 密码: , 验证码: csba
-- 第 2 步 -- 点击登录按钮
picture imgs/Login/Login_Pwd/登录_002_检查登录失败提示信息20241125174410069134.png
Alert text: 请输入密码!
-- 第 3 步 -- 校验提示信息: 请输入密码!
** 检查点 ** 弹出提示 ----> 通过
-- 第 4 步 -- 刷新页面
PASS
* 登录_003 - 2024-11-25 17:44:10
[ case execution steps ]
-- 第 1 步 -- 输入账号: admin@czj2, 密码: Ubains@4321, 验证码:
-- 第 2 步 -- 点击登录按钮
picture imgs/Login/Login_Pwd/登录_003_检查登录失败提示信息20241125174413028657.png
Alert text: 请输入验证码!
-- 第 3 步 -- 校验提示信息: 请输入验证码!
** 检查点 ** 弹出提示 ----> 通过
-- 第 4 步 -- 刷新页面
PASS
* 登录_004 - 2024-11-25 17:44:13
[ case execution steps ]
-- 第 1 步 -- 输入账号: admin@czj112, 密码: Ubains@4321, 验证码: csba
-- 第 2 步 -- 点击登录按钮
picture imgs/Login/Login_Pwd/登录_004_检查登录失败提示信息20241125174415937254.png
Alert text: 账号或密码错误
-- 第 3 步 -- 校验提示信息: 账号或密码错误
** 检查点 ** 弹出提示 ----> 通过
-- 第 4 步 -- 刷新页面
PASS
* 登录_005 - 2024-11-25 17:44:16
[ case execution steps ]
-- 第 1 步 -- 输入账号: adM 12in@czj, 密码: Ubains@4321, 验证码: csba
-- 第 2 步 -- 点击登录按钮
picture imgs/Login/Login_Pwd/登录_005_检查登录失败提示信息20241125174418832049.png
Alert text: 账号或密码错误
-- 第 3 步 -- 校验提示信息: 账号或密码错误
** 检查点 ** 弹出提示 ----> 通过
-- 第 4 步 -- 刷新页面
PASS
* 登录_006 - 2024-11-25 17:44:19
[ case execution steps ]
-- 第 1 步 -- 输入账号: admin@czj3, 密码: 12345, 验证码: csba
-- 第 2 步 -- 点击登录按钮
picture imgs/Login/Login_Pwd/登录_006_检查登录失败提示信息20241125174421880105.png
Alert text: 账号或密码错误
-- 第 3 步 -- 校验提示信息: 账号或密码错误
** 检查点 ** 弹出提示 ----> 通过
-- 第 4 步 -- 刷新页面
PASS
* 登录_007 - 2024-11-25 17:44:22
[ case execution steps ]
-- 第 1 步 -- 输入账号: admin@czj4, 密码: U bains1s@432, 验证码: csba
-- 第 2 步 -- 点击登录按钮
picture imgs/Login/Login_Pwd/登录_007_检查登录失败提示信息20241125174424902427.png
Alert text: 账号或密码错误
-- 第 3 步 -- 校验提示信息: 账号或密码错误
** 检查点 ** 弹出提示 ----> 通过
-- 第 4 步 -- 刷新页面
PASS
* 登录_008 - 2024-11-25 17:44:25
[ case execution steps ]
-- 第 1 步 -- 输入账号: admin@czj5, 密码: Ubains@4321, 验证码: 123
-- 第 2 步 -- 点击登录按钮
picture imgs/Login/Login_Pwd/登录_008_检查登录失败提示信息20241125174427870609.png
Alert text: 验证码错误
-- 第 3 步 -- 校验提示信息: 验证码错误
** 检查点 ** 弹出提示 ----> 通过
-- 第 4 步 -- 刷新页面
PASS
* 登录_009 - 2024-11-25 17:44:28
[ case execution steps ]
-- 第 1 步 -- 输入账号: admin@czj6, 密码: Ubains@4321, 验证码: cs 12
-- 第 2 步 -- 点击登录按钮
picture imgs/Login/Login_Pwd/登录_009_检查登录失败提示信息20241125174430794150.png
Alert text: 验证码错误
-- 第 3 步 -- 校验提示信息: 验证码错误
** 检查点 ** 弹出提示 ----> 通过
-- 第 4 步 -- 刷新页面
PASS
* 登录_010 - 2024-11-25 17:44:31
[ case execution steps ]
-- 第 1 步 -- 输入账号: admin@ZDH, 密码: Ubains@4321, 验证码: csba
-- 第 2 步 -- 点击登录按钮
picture imgs/Login/Login_Pwd/登录_010_检查登录成功提示信息20241125174433837258.png
<!DOCTYPE html>
<html>
<head>
<title>账号密码登录测试报告</title>
<meta charset="UTF-8">
<style>body {
font-family: consolas, Verdana, sans-serif;
font-size: .95em;
color: #696e71;
display: grid;
grid-template-columns: 1fr 5rem;
}
.main_section {
width: 90%;
margin: 0 auto;
}
#float_menu{
position:fixed;
top:0;
right:0;
text-align: center;
}
#float_menu .menu-item {
cursor: pointer;
padding: .5em;
margin: .5em 0;
color: #c08580;
background-color: #f8f0ef;
font-size: 1.2em;
}
.result{
display: flex;
}
.result_table{
border-collapse: collapse;
border: 1px solid #f0e0e5;
width: 30em;
text-align: center;
font-size: 1.0em;
}
.result_table td{
border: 1px solid #f0e0e5;
padding: .3em;
}
.result_barchart{
width: 30em;
margin: 0 5em 0 5em;
}
.barchar_item{
margin: 2.5rem 0;
}
.barchart_barbox {
margin: 0.5em 0;
width: 100%;
background-color: #fff;
border: 1px solid #86c2dd;
border-radius: .2em;
}
.barchart_bar {
text-align: right;
height: 1.2rem;
}
.h3_button {
margin: 1.5em;
cursor: pointer;
color: #03a9f4;
}
.info
{
white-space:pre-wrap;
margin: .8em 1.5em;
}
.error-info
{
color: #a64747
}
.suite_dir {
margin: 1em .2em;
padding: .3em;
/* background-color: #dfeff6; */
border: 1px solid #bcd8e4;
}
.suite_file {
margin: 1em .2em;
padding: .3em;
border: 1px solid #bcd8e4;
}
.case {
margin: 1em .2em;
/* padding: .3em; */
border: 1px solid #e7d4d4;
}
.case_class_path{
margin: 0em 1em;
}
.folder_header {
padding: .2em .7em;
background-color: #fffaf9;
cursor: pointer;
}
.setup{
margin: .2em;
/* padding: .3em; */
/* border: 1px solid #e7d4d4; */
}
.teardown{
margin: .2em;
/* padding: .3em;*/
/* border: 1px solid #e7d4d4; */
}
.test_steps{
margin: .2em;
padding: .3em;
/* border: 1px solid #e7d4d4; */
}
.label {
display: inline-block;
padding: .1em .5em;
font-size: .88em;
letter-spacing: 1px;
white-space: nowrap;
color: #0d6ebc;
border-radius: .2em;
min-width: 5em;
margin-right: 2em;
font-family: consolas;
}
/* .suite_setup .label{
color: #219e26 ;
}
.suite_teardown .label{
color: #219e26;
} */
/* .case.pass .casename{
color: #329132 ;
} */
.case.pass .caselabel{
color: white;
background-color: #3b9e3f;
}
/* .case.fail .casename{
color: #a64747;
} */
.case.fail .caselabel{
color: white;
background-color: #a64747;
}
/* .case.abort .casename{
color: #953ab7;
} */
.case.abort .caselabel{
color: white;
background-color: #9c27b0;
}
.case_step {
margin: .8em;
}
.checkpoint_pass {
margin: .8em;
}
.checkpoint_fail {
margin: .8em;
}
.case_step .tag{
color: #2196f3;;
margin: .3em 1em .3em 0;
padding: .1em .3em;
font-size: .92em;
}
.checkpoint_pass .tag{
color: #009806;
margin:.3em 1em .3em .5em;
padding: .1em .3em;
font-size: .92em;
}
.checkpoint_fail .tag{
color: #9c2020;
margin:.3em 1em .3em .5em;
padding: .1em .3em;
font-size: .92em;
}
.screenshot {
border: 1px solid #86c2dd;
}
.executetime {
float: right;
}</style>
<script type="text/javascript">var FOLDER_ALL_CASES = false //是否为精简模式的标记
var ERROR_INFOS = []; // 错误信息列表
var current_error_idx = -1;
// 页面加载后执行的函数
window.addEventListener("load", function(){
// 所有 .folder_header 添加点击事件处理
let folderHeaderEles = document.querySelectorAll(".folder_header");
folderHeaderEles.forEach(function(ele) {
ele.addEventListener("click", function(event) {
let fb = event.target.closest('.folder_header').nextElementSibling;
fb.style.display = fb.style.display === 'none' ? 'block' : 'none'
});
});
// 找到所有的错误信息对象
ERROR_INFOS = document.querySelectorAll(".error-info");
});
function toggle_folder_all_cases(){
let eles = document.querySelectorAll(".folder_body");
FOLDER_ALL_CASES = !FOLDER_ALL_CASES;
document.getElementById('display_mode').innerHTML = FOLDER_ALL_CASES? "Detail" : "Summary"
for (const ele of eles){
ele.style.display = FOLDER_ALL_CASES? "none": "block"
}
}
function previous_error(){
// 查找错误必须是详细模式
if (FOLDER_ALL_CASES)
toggle_folder_all_cases()
current_error_idx -= 1;
if (current_error_idx<0)
current_error_idx = 0
let error = ERROR_INFOS[current_error_idx];
error.scrollIntoView({behavior: "smooth", block: "center", inline: "start"});
}
function next_error(){
// 查找错误必须是详细模式
if (FOLDER_ALL_CASES)
toggle_folder_all_cases()
current_error_idx += 1;
if (current_error_idx > ERROR_INFOS.length-1)
current_error_idx = ERROR_INFOS.length-1
let error = ERROR_INFOS[current_error_idx];
error.scrollIntoView({behavior: "smooth", block: "center", inline: "start"});
}</script>
</head>
<body>
<div class="main_section">
<h1 style="font-family: auto">账号密码登录测试报告</h1>
<h3>统计结果</h3>
<div class="result">
<table class="result_table">
<tbody>
<tr>
<td>hytest 版本</td>
<td>0.8.12</td>
</tr>
<tr>
<td>开始时间</td>
<td>2024/11/25 17:40:00</td>
</tr>
<tr>
<td>结束时间</td>
<td>2024/11/25 17:41:11</td>
</tr>
<tr>
<td>耗时</td>
<td>70.368 秒</td>
</tr>
<tr>
<td>预备执行用例数量</td>
<td>10</td>
</tr>
<tr>
<td>实际执用例行数量</td>
<td>10</td>
</tr>
<tr>
<td>通过</td>
<td>6</td>
</tr>
<tr>
<td>失败</td>
<td style="color:red">4</td>
</tr>
<tr>
<td>异常</td>
<td style="">0</td>
</tr>
<tr>
<td>阻塞</td>
<td style="">0</td>
</tr>
<tr>
<td>套件初始化失败</td>
<td style="">0</td>
</tr>
<tr>
<td>套件清除 失败</td>
<td style="">0</td>
</tr>
<tr>
<td>用例初始化失败</td>
<td style="">0</td>
</tr>
<tr>
<td>用例清除 失败</td>
<td style="">0</td>
</tr>
</tbody>
</table>
<div class="result_barchart">
<div class="barchar_item">
<span>用例通过 60% : 6 个</span>
<div class="barchart_barbox">
<div class="barchart_bar" style="width: 60.0%; background-color: #04AA6D;"></div>
</div>
</div>
<div class="barchar_item">
<span>用例失败 40% : 4 个</span>
<div class="barchart_barbox">
<div class="barchart_bar" style="width: 40.0%; background-color: #bb4069;"></div>
</div>
</div>
<div class="barchar_item">
<span>用例异常 0% : 0 个</span>
<div class="barchart_barbox">
<div class="barchart_bar" style="width: 0.0%; background-color: #9c27b0;"></div>
</div>
</div>
<div class="barchar_item">
<span>用例阻塞 0% : 0 个</span>
<div class="barchart_barbox">
<div class="barchart_bar" style="width: 0.0%; background-color: #dcbdbd;"></div>
</div>
</div>
</div>
</div>
<div style="margin-top:2em">
<h3 style="display:inline">执行日志</h3>
</div>
<div class="exec_log">
<div class="suite_dir" id="suite_dir cases\">
<div>
<span class="label">进入目录</span>
<span>cases\</span>
</div>
<div class="suite_setup setup" id="suite_setup setup cases\">
<div class="folder_header">
<span class="label">套件初始化</span>
<span>cases\</span>
<span class="executetime">2024-11-25 17:40:00</span>
</div>
<div class="folder_body">
<div class="case_step">
<span class="tag">步骤 #1</span>
<span>初始化浏览器</span>
</div>
<div class="info">'----------' 正在初始化浏览器 '----------'</div>
<div class="info">'----------' 浏览器初始化完成 '----------'</div>
<div class="case_step">
<span class="tag">步骤 #2</span>
<span>处理SSL认证</span>
</div>
<div class="info">'----------' 正在处理SSL证书警告 '----------'</div>
<div class="info">'----------' SSL证书警告处理完成 '----------'</div>
</div>
</div>
</div>
<div class="suite_file" id="suite_file cases\登录模块\账号密码登录测试.py">
<div>
<span class="label">进入文件</span>
<span>cases\登录模块\账号密码登录测试.py</span>
</div>
<div class="case pass" id="case_00000001">
<div class="folder_header">
<span class="label caselabel">用例 PASS</span>
<span class="casename">登录_001</span>
<span class="executetime">2024-11-25 17:40:20</span>
</div>
<div class="folder_body">
<span class="case_class_path">cases\登录模块\账号密码登录测试.py::Login_00x</span>
<div class="test_steps" id="test_steps 登录_001">
<span class="label">测试步骤</span>
<div class="case_step">
<span class="tag">步骤 #1</span>
<span>输入账号: , 密码: Ubains@4321, 验证码: csba</span>
</div>
<div class="case_step">
<span class="tag">步骤 #2</span>
<span>点击登录按钮</span>
</div>
<div>
<img class="screenshot" src="imgs/Login/Login_Pwd/登录_001_检查登录失败提示信息20241125174023187205.png" width="50%">
</div>
<div class="info">Alert text: 请输入账号!</div>
<div class="case_step">
<span class="tag">步骤 #3</span>
<span>校验提示信息: 请输入账号!</span>
</div>
<div class="checkpoint_pass">
<span class="tag">检查点 PASS</span>
<span>弹出提示</span>
</div>
<div class="case_step">
<span class="tag">步骤 #4</span>
<span>刷新页面</span>
</div>
</div>
</div>
</div>
<div class="case pass" id="case_00000002">
<div class="folder_header">
<span class="label caselabel">用例 PASS</span>
<span class="casename">登录_002</span>
<span class="executetime">2024-11-25 17:40:23</span>
</div>
<div class="folder_body">
<span class="case_class_path">cases\登录模块\账号密码登录测试.py::Login_00x</span>
<div class="test_steps" id="test_steps 登录_002">
<span class="label">测试步骤</span>
<div class="case_step">
<span class="tag">步骤 #1</span>
<span>输入账号: admin@czj, 密码: , 验证码: csba</span>
</div>
<div class="case_step">
<span class="tag">步骤 #2</span>
<span>点击登录按钮</span>
</div>
<div>
<img class="screenshot" src="imgs/Login/Login_Pwd/登录_002_检查登录失败提示信息20241125174026122340.png" width="50%">
</div>
<div class="info">Alert text: 请输入密码!</div>
<div class="case_step">
<span class="tag">步骤 #3</span>
<span>校验提示信息: 请输入密码!</span>
</div>
<div class="checkpoint_pass">
<span class="tag">检查点 PASS</span>
<span>弹出提示</span>
</div>
<div class="case_step">
<span class="tag">步骤 #4</span>
<span>刷新页面</span>
</div>
</div>
</div>
</div>
<div class="case pass" id="case_00000003">
<div class="folder_header">
<span class="label caselabel">用例 PASS</span>
<span class="casename">登录_003</span>
<span class="executetime">2024-11-25 17:40:26</span>
</div>
<div class="folder_body">
<span class="case_class_path">cases\登录模块\账号密码登录测试.py::Login_00x</span>
<div class="test_steps" id="test_steps 登录_003">
<span class="label">测试步骤</span>
<div class="case_step">
<span class="tag">步骤 #1</span>
<span>输入账号: admin@czj, 密码: Ubains@4321, 验证码: </span>
</div>
<div class="case_step">
<span class="tag">步骤 #2</span>
<span>点击登录按钮</span>
</div>
<div>
<img class="screenshot" src="imgs/Login/Login_Pwd/登录_003_检查登录失败提示信息20241125174028919983.png" width="50%">
</div>
<div class="info">Alert text: 请输入验证码!</div>
<div class="case_step">
<span class="tag">步骤 #3</span>
<span>校验提示信息: 请输入验证码!</span>
</div>
<div class="checkpoint_pass">
<span class="tag">检查点 PASS</span>
<span>弹出提示</span>
</div>
<div class="case_step">
<span class="tag">步骤 #4</span>
<span>刷新页面</span>
</div>
</div>
</div>
</div>
<div class="case pass" id="case_00000004">
<div class="folder_header">
<span class="label caselabel">用例 PASS</span>
<span class="casename">登录_004</span>
<span class="executetime">2024-11-25 17:40:29</span>
</div>
<div class="folder_body">
<span class="case_class_path">cases\登录模块\账号密码登录测试.py::Login_00x</span>
<div class="test_steps" id="test_steps 登录_004">
<span class="label">测试步骤</span>
<div class="case_step">
<span class="tag">步骤 #1</span>
<span>输入账号: admin@czj112, 密码: Ubains@4321, 验证码: csba</span>
</div>
<div class="case_step">
<span class="tag">步骤 #2</span>
<span>点击登录按钮</span>
</div>
<div>
<img class="screenshot" src="imgs/Login/Login_Pwd/登录_004_检查登录失败提示信息20241125174031776011.png" width="50%">
</div>
<div class="info">Alert text: 账号或密码错误</div>
<div class="case_step">
<span class="tag">步骤 #3</span>
<span>校验提示信息: 账号或密码错误</span>
</div>
<div class="checkpoint_pass">
<span class="tag">检查点 PASS</span>
<span>弹出提示</span>
</div>
<div class="case_step">
<span class="tag">步骤 #4</span>
<span>刷新页面</span>
</div>
</div>
</div>
</div>
<div class="case pass" id="case_00000005">
<div class="folder_header">
<span class="label caselabel">用例 PASS</span>
<span class="casename">登录_005</span>
<span class="executetime">2024-11-25 17:40:32</span>
</div>
<div class="folder_body">
<span class="case_class_path">cases\登录模块\账号密码登录测试.py::Login_00x</span>
<div class="test_steps" id="test_steps 登录_005">
<span class="label">测试步骤</span>
<div class="case_step">
<span class="tag">步骤 #1</span>
<span>输入账号: adM 12in@czj, 密码: Ubains@4321, 验证码: csba</span>
</div>
<div class="case_step">
<span class="tag">步骤 #2</span>
<span>点击登录按钮</span>
</div>
<div>
<img class="screenshot" src="imgs/Login/Login_Pwd/登录_005_检查登录失败提示信息20241125174034744410.png" width="50%">
</div>
<div class="info">Alert text: 账号或密码错误</div>
<div class="case_step">
<span class="tag">步骤 #3</span>
<span>校验提示信息: 账号或密码错误</span>
</div>
<div class="checkpoint_pass">
<span class="tag">检查点 PASS</span>
<span>弹出提示</span>
</div>
<div class="case_step">
<span class="tag">步骤 #4</span>
<span>刷新页面</span>
</div>
</div>
</div>
</div>
<div class="case pass" id="case_00000006">
<div class="folder_header">
<span class="label caselabel">用例 PASS</span>
<span class="casename">登录_006</span>
<span class="executetime">2024-11-25 17:40:35</span>
</div>
<div class="folder_body">
<span class="case_class_path">cases\登录模块\账号密码登录测试.py::Login_00x</span>
<div class="test_steps" id="test_steps 登录_006">
<span class="label">测试步骤</span>
<div class="case_step">
<span class="tag">步骤 #1</span>
<span>输入账号: admin@czj, 密码: 12345, 验证码: csba</span>
</div>
<div class="case_step">
<span class="tag">步骤 #2</span>
<span>点击登录按钮</span>
</div>
<div>
<img class="screenshot" src="imgs/Login/Login_Pwd/登录_006_检查登录失败提示信息20241125174037576691.png" width="50%">
</div>
<div class="info">Alert text: 账号或密码错误</div>
<div class="case_step">
<span class="tag">步骤 #3</span>
<span>校验提示信息: 账号或密码错误</span>
</div>
<div class="checkpoint_pass">
<span class="tag">检查点 PASS</span>
<span>弹出提示</span>
</div>
<div class="case_step">
<span class="tag">步骤 #4</span>
<span>刷新页面</span>
</div>
</div>
</div>
</div>
<div class="case fail" id="case_00000007">
<div class="folder_header">
<span class="label caselabel">用例 FAIL</span>
<span class="casename">登录_007</span>
<span class="executetime">2024-11-25 17:40:38</span>
</div>
<div class="folder_body">
<span class="case_class_path">cases\登录模块\账号密码登录测试.py::Login_00x</span>
<div class="test_steps" id="test_steps 登录_007">
<span class="label">测试步骤</span>
<div class="case_step">
<span class="tag">步骤 #1</span>
<span>输入账号: admin@czj, 密码: U bains1s@432, 验证码: csba</span>
</div>
<div class="case_step">
<span class="tag">步骤 #2</span>
<span>点击登录按钮</span>
</div>
<div>
<img class="screenshot" src="imgs/Login/Login_Pwd/登录_007_检查登录失败提示信息20241125174040414494.png" width="50%">
</div>
<div class="info">Alert text: 超过限制登录次数,请10分钟以后再登录!</div>
<div class="case_step">
<span class="tag">步骤 #3</span>
<span>校验提示信息: 账号或密码错误</span>
</div>
<div class="checkpoint_fail">
<span class="tag">检查点 FAIL</span>
<span>弹出提示</span>
</div>
<div class="info error-info">
Traceback:
File &quot;D:\GithubData\自动化脚本-4\ubains-module-test\预定系统\cases\登录模块\账号密码登录测试.py&quot;, line 84, in teststeps
CHECK_POINT('弹出提示', notify_text == check_text)</div>
</div>
</div>
</div>
<div class="case fail" id="case_00000008">
<div class="folder_header">
<span class="label caselabel">用例 FAIL</span>
<span class="casename">登录_008</span>
<span class="executetime">2024-11-25 17:40:40</span>
</div>
<div class="folder_body">
<span class="case_class_path">cases\登录模块\账号密码登录测试.py::Login_00x</span>
<div class="test_steps" id="test_steps 登录_008">
<span class="label">测试步骤</span>
<div class="case_step">
<span class="tag">步骤 #1</span>
<span>输入账号: admin@czj, 密码: Ubains@4321, 验证码: 123</span>
</div>
<div class="case_step">
<span class="tag">步骤 #2</span>
<span>点击登录按钮</span>
</div>
<div>
<img class="screenshot" src="imgs/Login/Login_Pwd/登录_008_检查登录失败提示信息20241125174043161833.png" width="50%">
</div>
<div class="info">Alert text: 超过限制登录次数,请10分钟以后再登录!</div>
<div class="case_step">
<span class="tag">步骤 #3</span>
<span>校验提示信息: 验证码错误</span>
</div>
<div class="checkpoint_fail">
<span class="tag">检查点 FAIL</span>
<span>弹出提示</span>
</div>
<div class="info error-info">
Traceback:
File &quot;D:\GithubData\自动化脚本-4\ubains-module-test\预定系统\cases\登录模块\账号密码登录测试.py&quot;, line 84, in teststeps
CHECK_POINT('弹出提示', notify_text == check_text)</div>
</div>
</div>
</div>
<div class="case fail" id="case_00000009">
<div class="folder_header">
<span class="label caselabel">用例 FAIL</span>
<span class="casename">登录_009</span>
<span class="executetime">2024-11-25 17:40:43</span>
</div>
<div class="folder_body">
<span class="case_class_path">cases\登录模块\账号密码登录测试.py::Login_00x</span>
<div class="test_steps" id="test_steps 登录_009">
<span class="label">测试步骤</span>
<div class="case_step">
<span class="tag">步骤 #1</span>
<span>输入账号: admin@czj, 密码: Ubains@4321, 验证码: cs 12</span>
</div>
<div class="case_step">
<span class="tag">步骤 #2</span>
<span>点击登录按钮</span>
</div>
<div>
<img class="screenshot" src="imgs/Login/Login_Pwd/登录_009_检查登录失败提示信息20241125174045897333.png" width="50%">
</div>
<div class="info">Alert text: 超过限制登录次数,请10分钟以后再登录!</div>
<div class="case_step">
<span class="tag">步骤 #3</span>
<span>校验提示信息: 验证码错误</span>
</div>
<div class="checkpoint_fail">
<span class="tag">检查点 FAIL</span>
<span>弹出提示</span>
</div>
<div class="info error-info">
Traceback:
File &quot;D:\GithubData\自动化脚本-4\ubains-module-test\预定系统\cases\登录模块\账号密码登录测试.py&quot;, line 84, in teststeps
CHECK_POINT('弹出提示', notify_text == check_text)</div>
</div>
</div>
</div>
<div class="case fail" id="case_00000010">
<div class="folder_header">
<span class="label caselabel">用例 FAIL</span>
<span class="casename">登录_010</span>
<span class="executetime">2024-11-25 17:40:46</span>
</div>
<div class="folder_body">
<span class="case_class_path">cases\登录模块\账号密码登录测试.py::Login_00x</span>
<div class="test_steps" id="test_steps 登录_010">
<span class="label">测试步骤</span>
<div class="case_step">
<span class="tag">步骤 #1</span>
<span>输入账号: admin@czj, 密码: Ubains@4321, 验证码: csba</span>
</div>
<div class="case_step">
<span class="tag">步骤 #2</span>
<span>点击登录按钮</span>
</div>
<div>
<img class="screenshot" src="imgs/Login/Login_Pwd/登录_010_检查登录成功提示信息20241125174108630069.png" width="50%">
</div>
<div class="info">Alert text: None</div>
<div class="case_step">
<span class="tag">步骤 #3</span>
<span>校验提示信息: 欢迎 预定标准版测试</span>
</div>
<div class="checkpoint_fail">
<span class="tag">检查点 FAIL</span>
<span>弹出提示</span>
</div>
<div class="info error-info">
Traceback:
File &quot;D:\GithubData\自动化脚本-4\ubains-module-test\预定系统\cases\登录模块\账号密码登录测试.py&quot;, line 84, in teststeps
CHECK_POINT('弹出提示', notify_text == check_text)</div>
</div>
</div>
</div>
<div class="suite_teardown teardown" id="suite_teardown teardown cases\">
<div class="folder_header">
<span class="label">套件清除</span>
<span>cases\</span>
<span class="executetime">2024-11-25 17:41:09</span>
</div>
<div class="folder_body">
<div class="info">清除浏览器</div>
</div>
</div>
</div>
</div>
</div>
<div id="float_menu">
<div class="menu-item" onclick="document.querySelector(&quot;body&quot;).scrollIntoView()">页首</div>
<div class="menu-item" onclick="window.open(&quot;http://www.byhy.net/tut/auto/hytest/01&quot;, &quot;_blank&quot;); ">帮助</div>
<div class="menu-item" id="display_mode" onclick="toggle_folder_all_cases()">Summary</div>
<div class="error_jumper" display="block">
<div class="menu-item" onclick="previous_error()" title="上一个错误"></div>
<div class="menu-item" onclick="next_error()" title="下一个错误"></div>
</div>
</div>
</body>
</html>
\ No newline at end of file
import os
import sys
import schedule
import time
import subprocess
import logging
import re
# 获取当前脚本的绝对路径
current_dir = os.path.dirname(os.path.abspath(__file__))
# 添加路径
sys.path.append(current_dir)
from Base.base import dingding_send_message
# 配置日志记录器
logging.basicConfig(level=logging.DEBUG, format='%(asctime)s - %(levelname)s - %(message)s')
def run_automation_test():
command = [
'hytest',
'--report_title', '账号密码登录测试报告',
'--report_url_prefix', 'http://192.168.1.166',
'--test', '登录_0**'
]
print(command)
logging.info(command)
try:
logging.debug(f"Running command: {' '.join(command)}")
result = subprocess.run(command, capture_output=True, text=True, check=True)
print(command)
# 记录命令的完整输出
logging.debug(f"Command stdout: {result.stdout}")
logging.debug(f"Command stderr: {result.stderr}")
# 确保 result.stdout 和 result.stderr 是字符串类型
stdout = result.stdout
stderr = result.stderr
# 假设链接的格式是 http://192.168.1.166/report_*.html
link_pattern = re.compile(r'http://192.168.1.166/report_\d{8}_\d{6}\.html')
# 从标准输出中提取链接
report_link = link_pattern.search(stdout)
if report_link:
report_link = report_link.group(0)
logging.info(f"测试报告链接: {report_link}")
# 调用钉钉发送消息接口进行推送测试报告链接
try:
logging.info("开始调用dingding消息通知函数")
dingding_send_message(report_link, "预定系统账号密码测试", "定时任务执行完成", "13724387318")
logging.info("dingding_send_message function called successfully")
except Exception as e:
logging.error(f"dingding_send_message调用失败: {e}")
else:
logging.warning("No test report link found in stdout")
# 从标准错误中提取链接
error_report_link = link_pattern.search(stderr)
if error_report_link:
error_report_link = error_report_link.group(0)
logging.warning(f"Test report link in stderr: {error_report_link}")
else:
logging.warning("No test report link found in stderr")
if result.stdout:
logging.info(f"Command output: {result.stdout}")
if result.stderr:
logging.warning(f"Command error: {result.stderr}")
except subprocess.CalledProcessError as e:
logging.error(f"Command failed with return code {e.returncode}: {e.output}")
except OSError as e:
logging.error(f"OS error occurred: {e}")
from Base.base import *
# 每天凌晨 0 点执行任务
schedule.every().day.at("16:18").do(run_automation_test)
while True:
schedule.run_pending()
time.sleep(1)
\ No newline at end of file
schedule.every().day.at("21:18").do(run_automation_test, report_title="账号密码登录模块_测试报告", report_url_prefix="http://192.168.1.166", test_case="登录_0**")
# schedule.every().day.at("21:14").do(run_automation_test, report_title="用户管理模块_主流程_测试报告", report_url_prefix="http://192.168.1.166", test_case="Main_User_Manage_0001")
try:
while True:
schedule.run_pending()
time.sleep(5)
except KeyboardInterrupt:
logging.info("Scheduler interrupted by user.")
except Exception as e:
logging.error(f"Unexpected error: {e}")
\ No newline at end of file
name,account,expected
登录_001,,Ubains@4321,csba,请输入账号!
登录_002,admin@czj1,,csba,请输入密码!
登录_003,admin@czj2,Ubains@4321,,请输入验证码!
登录_004,admin@czj112,Ubains@4321,csba,账号或密码错误
登录_005,adM 12in@czj,Ubains@4321,csba,账号或密码错误
登录_006,admin@czj3,12345,csba,账号或密码错误
登录_007,admin@czj4,U bains1s@432,csba,账号或密码错误
登录_008,admin@czj5,Ubains@4321,123,验证码错误
登录_009,admin@czj6,Ubains@4321,cs 12,验证码错误
登录_010,admin@ZDH,Ubains@4321,csba,欢迎 预定标准版测试
\ No newline at end of file
登录_002,admin@czj,,csba,请输入密码!
登录_003,admin@czj,Ubains@4321,,请输入验证码!
登录_004,admin@czj003,Ubains@4321,csba,账号或密码错误
登录_005,adM 1221n@czj,Ubains@4321,csba,账号或密码错误
登录_006,admin@czj34,12345,csba,账号或密码错误
登录_007,admin@czj412,U bains1s@432,csba,账号或密码错误
登录_008,admin@czj012,Ubains@4321,123,验证码错误
登录_009,admin@czj1213,Ubains@4321,cs 12,验证码错误
登录_010,admin@ZDH,Ubains@4321,csba,admin@ZDH
\ No newline at end of file
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论