提交 9cdef635 authored 作者: 陈泽健's avatar 陈泽健

调试定时任务的问题,还需再进一步调试。补充运维集控的MQTT底层方法与消息体构建。

上级 ca7a79da
import json
import logging
import csv
import os
import re
import threading
import time
from time import sleep
from datetime import datetime
from zipfile import compressor_names
import paho.mqtt.client as mqtt
# 配置日志
logging.basicConfig(level=logging.INFO, format='%(asctime)s - %(levelname)s - %(message)s')
class Mqtt:
def __init__(self, broker_address, port):
"""
初始化 MQTT 客户端
:param broker_address: MQTT 代理地址
:param port: MQTT 代理端口
"""
self.lock = None
self.broker_address = broker_address
self.port = port
self.client = None
self._received_message_lock = threading.Lock()
self.received_message = None
self.message_type = None
def connect(self):
"""
连接到 MQTT 服务器
"""
try:
self.client = mqtt.Client()
self.client.on_connect = self.on_connect # 设置连接回调
self.client.on_message = self.on_message # 设置消息回调
self.client.connect(self.broker_address, self.port) # 连接到代理
self.client.loop_start() # 启动网络循环
except Exception as e:
logging.error(f"连接到MQTT服务器时发生错误: {e}")
raise
def disconnect(self):
"""
断开与 MQTT 服务器的连接
"""
if self.client:
try:
self.client.loop_stop() # 停止网络循环
self.client.disconnect() # 断开连接
logging.info("已断开与MQTT 服务器的连接")
except Exception as e:
logging.error(f"断开与MQTT 服务器的连接时发生错误: {e}")
finally:
self.client = None # 确保资源被完全释放
else:
logging.warning("尝试断开连接时,客户端已不存在")
def on_connect(self, client, userdata, flags, rc):
"""
连接成功或失败的回调函数
:param client: 客户端实例
:param userdata: 用户数据
:param flags: 连接标志
:param rc: 返回码
"""
try:
if rc == 0:
logging.info("连接成功")
else:
logging.error(f"连接失败,返回码: {rc}")
# 根据不同的返回码采取不同的措施
if rc == 1:
logging.error("错误:错误的协议版本")
elif rc == 2:
logging.error("错误:无效的客户端标识符")
elif rc == 3:
logging.error("错误:服务器不可用")
elif rc == 4:
logging.error("错误:错误的用户名或密码")
elif rc == 5:
logging.error("错误:未授权")
else:
logging.error("未知错误")
except Exception as e:
logging.exception(f"在处理连接结果时发生异常: {e}")
def on_message(self, client, userdata, msg):
"""
接收到消息的回调函数
:param client: 客户端实例
:param userdata: 用户数据
:param msg: 消息对象
"""
try:
payload = msg.payload.decode('utf-8', errors='replace') # 处理解码错误
logging.info(f"收到消息: {msg.topic} {payload[:50]}...") # 脱敏日志记录
except UnicodeDecodeError as e:
logging.error(f"解码错误: {e}")
payload = "无法解码的消息"
with self._received_message_lock:
self.received_message = payload # 线程安全地存储接收到的消息
def subscribe(self, topic):
"""
订阅指定的主题
:param topic: 主题名称
"""
if self.client is None:
logging.error("客户端未初始化,无法订阅主题")
raise ValueError("客户端未初始化,无法订阅主题")
# 输入验证
if not isinstance(topic, str) or not topic.strip():
logging.error("无效的主题名称")
raise ValueError("无效的主题名称")
try:
self.client.subscribe(topic)
logging.info(f"已订阅主题: {topic}")
except ConnectionError as ce:
logging.error(f"连接错误,无法订阅主题: {topic}, 错误信息: {str(ce)}")
raise
except TimeoutError as te:
logging.error(f"超时错误,无法订阅主题: {topic}, 错误信息: {str(te)}")
raise
except ValueError as ve:
logging.error(f"值错误,无法订阅主题: {topic}, 错误信息: {str(ve)}")
raise
except Exception as e:
logging.error(f"未知错误,无法订阅主题: {topic}, 错误信息: {str(e)}")
raise
def set_message_type(self, message_type):
"""
设置消息类型
此方法用于设置或更改消息类型属性,允许对象根据需要处理不同类型的消息
参数:
message_type: 要设置的消息类型,可以是任何数据类型,但通常应该是字符串、整数或枚举类型
返回:
"""
self.message_type = message_type
def publish(self, topic, message):
"""
发布消息到指定的主题
:param topic: 主题名称
:param message: 消息内容
"""
if self.client:
try:
# 将消息转换为JSON字符串
if self.message_type == dict and isinstance(message, dict):
message = json.dumps(message)
elif message is None:
message = ""
else:
message = str(message)
except (TypeError, ValueError) as e:
logging.error(f"{datetime.now()} - 消息转换失败: {e} - 调用者: {self.__class__.__name__}.publish")
raise
try:
self.client.publish(topic, message)
logging.info(f"{datetime.now()} - 已发布消息到主题: {topic} - 调用者: {self.__class__.__name__}.publish")
except Exception as e:
logging.error(f"{datetime.now()} - 消息发布失败: {e} - 失败的主题: {topic}, 消息: {message} - 调用者: {self.__class__.__name__}.publish")
raise
def wait_for_message(self, topic, timeout=5):
"""
等待指定主题的消息
:param topic: 主题名称
:param timeout: 超时时间(秒)
:return: 接收到的消息或 None
"""
if self.client is None:
logging.warning("Client is not initialized")
return None
if timeout < 0:
logging.warning("Timeout cannot be negative")
return None
start_time = time.monotonic()
while (time.monotonic() - start_time) < timeout:
try:
with self.lock:
if self.received_message is not None:
return self.received_message
except Exception as e:
logging.error(f"Error accessing received_message: {e}")
try:
time.sleep(0.1)
except Exception as e:
logging.error(f"Error in sleep: {e}")
return None
@staticmethod
def read_config_from_csv(file_path):
"""
从 CSV 文件读取配置
:param file_path: CSV 文件路径
:param allowed_directory: 允许访问的目录
:return: 配置列表
"""
try:
# 验证文件路径
if not os.path.isfile(file_path):
raise FileNotFoundError(f"文件 {file_path} 不存在")
with open(file_path, mode='r', encoding='utf-8') as file:
reader = csv.DictReader(file)
return [row for row in reader]
except FileNotFoundError as e:
print(f"错误: {e}")
return []
except PermissionError as e:
print(f"错误: {e}")
return []
except Exception as e:
print(f"未知错误: {e}")
return []
@staticmethod
def wait_for_message(self, topic, timeout=5):
"""
等待指定主题的消息
:param topic: 主题名称
:param timeout: 超时时间(秒)
:return: 接收到的消息或 None
"""
if not isinstance(topic, str) or not re.match(r'^[a-zA-Z0-9_\-]+$', topic):
raise ValueError("Invalid topic format")
if timeout < 0:
return None
try:
if self.client:
start_time = time.time()
while (time.time() - start_time) < timeout:
if self.has_received_message():
return self.received_message
sleep(0.1)
return None
except AttributeError:
return None
return None
def has_received_message(self):
return hasattr(self, 'received_message')
@staticmethod
def read_config_from_csv(file_path):
"""
从 CSV 文件读取配置
:param file_path: CSV 文件路径
:return: 配置列表
"""
if not os.path.exists(file_path):
raise FileNotFoundError(f"文件 {file_path} 不存在")
try:
with open(file_path, mode='r', encoding='utf-8') as file:
reader = csv.DictReader(file)
config_list = [row for row in reader]
if not config_list:
raise ValueError("CSV 文件内容为空或格式不正确")
logging.info(f"成功读取文件 {file_path}")
return config_list
except Exception as e:
logging.error(f"读取文件 {file_path} 时发生错误: {e}")
return []
@staticmethod
def build_message(config, current_time,topic):
"""
构建消息内容
:param config: 配置字典
:param current_time: 当前时间
:return: 消息字典
"""
#安卓信息设备上报
if config['action'] == "_updatemaster":
return {
"action": "_updatemaster",
"client_udid": config['client_udid'],
"result": json.dumps({
"data": [{
"item": "environmental",
"pm25": 20,
"co2": 2,
"temp": 20,
"tvoc": 20,
"humi": 20,
"hcho": 20
},
{
"item": "conference",
"power": config['power'],
"exist": config['exist'],
"run": config['run']
}]
})
}
elif config['action'] == "_updatestatus":
return {
"action": "_updatestatus",
"client_udid": config['client_udid'],
"result": json.dumps({
"data": [
{"device_udid": config['device_udid'],"power": config['power'],"online": config['online'],"watt":config['watt'],"run": config['run']
},
]
})
}
elif config['action'] == "_updateaudio":
return {
"action": "_updateaudio",
"client_udid": config['client_udid'],
"result": json.dumps({
"data":[
{
"address": config['address'],
"data_all": {
"volume": 100,"mute": 0
},
"data_channel": [
{
"lineType": config['lineType'],"num": config['num'],
"status": config['status'],"volume": config['volume'],
"mute": config['mute']}
],
"data_meter": [
{
"lineType": 1,"num": 1,"dbvalue": 70}
]
}
]
}
)
}
elif config['action'] == "_updatevideo":
return {
"action": "_updatevideo",
"client_udid": config['client_udid'],
"result": json.dumps({
"data": [{
"address": config['address'],
"data_channel": [{
"lineType": config['lineType'],
"num": config['num'],
"status": config['status']
}
]
}]
})
}
elif config['action'] == "_updatelight":
return {
"action": "_updatelight",
"client_udid": config['client_udid'],
"result": json.dumps({
"data": [{
"address": config['address'],
config['data_type']: [{
"lineType": config['lineType'],
"num": config['num'],
"status": config['status'],
"run": config['run']
}]
}]
})
}
elif config['action'] == "_updatenetwork":
return {
"action": "_updatenetwork",
"client_udid": config['client_udid'],
"result": json.dumps({
"data": [{
"address": config['address'],
"data_channel": [{
config['network_type']: config['network_value'],
"status": config['status'],
"run": config['run']
}
]
}]
})
}
elif config['action'] == "_updatepower":
return {
"action": "_updatepower",
"client_udid": config['client_udid'],
"result": json.dumps({
"data": [{
"address": config['address'],
"data_channel": [{
"innum": config['innum'],
"status": config['status'],
"power": config['power'],
"level": config['level']
}
]
}]
})
}
def send_and_receive_messages(self, topic: str, message: str, num_times: int = 1, timeout: int = 5,
interval: float = 0.2):
"""
发送并接收消息
:param topic: 主题名称
:param message: 消息内容
:param num_times: 发送次数,默认为1
:param timeout: 超时时间(秒),默认为5秒
:param interval: 每次发送之间的间隔时间(秒),默认为0.2秒
"""
if not isinstance(topic, str) or not isinstance(message, str):
raise ValueError("主题和消息必须是字符串类型")
for i in range(num_times):
try:
self.publish(topic, message)
received_message = self.wait_for_message(topic, timeout=timeout)
if received_message:
logging.info("消息接收成功!")
else:
logging.warning("超时时间内未接收到消息。")
sleep(interval)
except (ConnectionError, TimeoutError) as e:
logging.error(f"网络连接或超时错误: {e}")
except ValueError as e:
logging.error(f"值错误: {e}")
except Exception as e:
logging.error(f"未知错误: {e}")
\ No newline at end of file
......@@ -67,4 +67,7 @@
- 实现钉钉群消息提醒接口调用,后续切换到其他测试公司进行定时推送验证。
19. 2024-11-25
- 实现定时执行任务并调用钉钉群消息发送函数,但调试过程中存在一些没有调用的问题,待排查。
- 钉钉群消息提醒的param参数改为link链接形式,通过链接打开测试报告进行查看。
\ No newline at end of file
- 钉钉群消息提醒的param参数改为link链接形式,通过链接打开测试报告进行查看。
20. 2024-11-26
- 调试定时任务的问题,还需再进一步调试。
- 补充运维集控的MQTT底层方法与消息体构建。
\ No newline at end of file
<!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
......@@ -198,11 +198,11 @@ CSV文件已读取
=== [ 执行测试用例 ] ===
预备执行用例数量 : 9
预备执行用例数量 : 10
========= 测试开始 : 20241125_173400 =========
========= 测试开始 : 20241126_161801 =========
......@@ -223,7 +223,7 @@ CSV文件已读取
>>> cases\登录模块\账号密码登录测试.py
* 登录_001 - 2024-11-25 17:34:05
* 登录_001 - 2024-11-26 16:18:45
[ case execution steps ]
......@@ -232,64 +232,151 @@ CSV文件已读取
-- 第 2 步 -- 点击登录按钮
picture imgs/Login/Login_Pwd/登录_001_检查登录失败提示信息20241125173407851573.png
Alert text: 请输入账号!
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
-- 第 4 步 -- 刷新页面
PASS
* 登录_002 - 2024-11-25 17:34:08
* 登录_002 - 2024-11-26 16:20:30
[ case execution steps ]
-- 第 1 步 -- 输入账号: admin@czj, 密码: , 验证码: csba
-- 第 1 步 -- 输入账号: admin@czj1, 密码: , 验证码: csba
-- 第 2 步 -- 点击登录按钮
picture imgs/Login/Login_Pwd/登录_002_检查登录失败提示信息20241125173410832954.png
Alert text: 请输入密码!
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 步 -- 校验提示信息: 请输入密码!
** 检查点 ** 弹出提示 ----> 通过
** 检查点 ** 弹出提示 ----> !! 不通过!!
-- 第 4 步 -- 刷新页面
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
PASS
* 登录_003 - 2024-11-25 17:34:11
* 登录_003 - 2024-11-26 16:22:12
[ case execution steps ]
-- 第 1 步 -- 输入账号: admin@czj, 密码: Ubains@4321, 验证码:
-- 第 1 步 -- 输入账号: admin@czj2, 密码: Ubains@4321, 验证码:
-- 第 2 步 -- 点击登录按钮
picture imgs/Login/Login_Pwd/登录_003_检查登录失败提示信息20241125173413837085.png
Alert text: 请输入验证码!
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 步 -- 校验提示信息: 请输入验证码!
** 检查点 ** 弹出提示 ----> 通过
** 检查点 ** 弹出提示 ----> !! 不通过!!
-- 第 4 步 -- 刷新页面
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
PASS
* 登录_004 - 2024-11-25 17:34:14
* 登录_004 - 2024-11-26 16:23:54
[ case execution steps ]
......@@ -298,20 +385,49 @@ Alert text: 请输入验证码!
-- 第 2 步 -- 点击登录按钮
picture imgs/Login/Login_Pwd/登录_004_检查登录失败提示信息20241125173416736793.png
Alert text: 账号或密码错误
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
-- 第 4 步 -- 刷新页面
PASS
* 登录_005 - 2024-11-25 17:34:17
* 登录_005 - 2024-11-26 16:25:36
[ case execution steps ]
......@@ -320,131 +436,467 @@ Alert text: 账号或密码错误
-- 第 2 步 -- 点击登录按钮
picture imgs/Login/Login_Pwd/登录_005_检查登录失败提示信息20241125173419681083.png
Alert text: 账号或密码错误
-- 第 3 步 -- 校验提示信息: 账号或密码错误
** 检查点 ** 弹出提示 ----> 通过
-- 第 4 步 -- 刷新页面
PASS
* 登录_006 - 2024-11-25 17:34:20
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@czj, 密码: 12345, 验证码: csba
-- 第 2 步 -- 点击登录按钮
picture imgs/Login/Login_Pwd/登录_006_检查登录失败提示信息20241125173422949136.png
Alert text: 账号或密码错误
-- 第 3 步 -- 校验提示信息: 账号或密码错误
** 检查点 ** 弹出提示 ----> 通过
-- 第 4 步 -- 刷新页面
PASS
* 登录_007 - 2024-11-25 17:34:23
-- 第 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@czj, 密码: U bains1s@432, 验证码: csba
-- 第 2 步 -- 点击登录按钮
picture imgs/Login/Login_Pwd/登录_007_检查登录失败提示信息20241125173425849982.png
Alert text: 账号或密码错误
-- 第 3 步 -- 校验提示信息: 账号或密码错误
** 检查点 ** 弹出提示 ----> 通过
-- 第 4 步 -- 刷新页面
PASS
* 登录_008 - 2024-11-25 17:34:26
-- 第 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@czj, 密码: Ubains@4321, 验证码: 123
-- 第 2 步 -- 点击登录按钮
picture imgs/Login/Login_Pwd/登录_008_检查登录失败提示信息20241125173428775088.png
Alert text: 验证码错误
-- 第 3 步 -- 校验提示信息: 验证码错误
** 检查点 ** 弹出提示 ----> 通过
-- 第 4 步 -- 刷新页面
PASS
* 登录_009 - 2024-11-25 17:34:29
-- 第 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@czj, 密码: Ubains@4321, 验证码: cs 12
-- 第 2 步 -- 点击登录按钮
picture imgs/Login/Login_Pwd/登录_009_检查登录失败提示信息20241125173431696269.png
Alert text: 验证码错误
-- 第 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
-- 第 3 步 -- 校验提示信息: 验证码错误
** 检查点 ** 弹出提示 ----> 通过
[ 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]
-- 第 4 步 -- 刷新页面
PASS
[ suite teardown ] cases\
清除浏览器
========= 测试结束 : 20241125_173434 =========
耗时 : 33.666 秒
预备执行用例数量 : 9
实际执行用例数量 : 9
通过 : 9
失败 : 0
异常 : 0
套件初始化失败 : 0
套件清除 失败 : 0
用例初始化失败 : 0
用例清除 失败 : 0
......@@ -202,7 +202,7 @@ CSV文件已读取
========= 测试开始 : 20241125_171701 =========
========= 测试开始 : 20241125_175001 =========
......@@ -223,7 +223,7 @@ CSV文件已读取
>>> cases\登录模块\账号密码登录测试.py
* 登录_001 - 2024-11-25 17:17:29
* 登录_001 - 2024-11-25 17:50:16
[ case execution steps ]
......@@ -232,7 +232,7 @@ CSV文件已读取
-- 第 2 步 -- 点击登录按钮
picture imgs/Login/Login_Pwd/登录_001_检查登录失败提示信息20241125171732048271.png
picture imgs/Login/Login_Pwd/登录_001_检查登录失败提示信息20241125175018799640.png
Alert text: 请输入账号!
-- 第 3 步 -- 校验提示信息: 请输入账号!
......@@ -245,16 +245,16 @@ Alert text: 请输入账号!
PASS
* 登录_002 - 2024-11-25 17:17:32
* 登录_002 - 2024-11-25 17:50:19
[ case execution steps ]
-- 第 1 步 -- 输入账号: admin@czj, 密码: , 验证码: csba
-- 第 1 步 -- 输入账号: admin@czj1, 密码: , 验证码: csba
-- 第 2 步 -- 点击登录按钮
picture imgs/Login/Login_Pwd/登录_002_检查登录失败提示信息20241125171735013601.png
picture imgs/Login/Login_Pwd/登录_002_检查登录失败提示信息20241125175021814253.png
Alert text: 请输入密码!
-- 第 3 步 -- 校验提示信息: 请输入密码!
......@@ -267,16 +267,16 @@ Alert text: 请输入密码!
PASS
* 登录_003 - 2024-11-25 17:17:35
* 登录_003 - 2024-11-25 17:50:22
[ case execution steps ]
-- 第 1 步 -- 输入账号: admin@czj, 密码: Ubains@4321, 验证码:
-- 第 1 步 -- 输入账号: admin@czj2, 密码: Ubains@4321, 验证码:
-- 第 2 步 -- 点击登录按钮
picture imgs/Login/Login_Pwd/登录_003_检查登录失败提示信息20241125171738347420.png
picture imgs/Login/Login_Pwd/登录_003_检查登录失败提示信息20241125175024843078.png
Alert text: 请输入验证码!
-- 第 3 步 -- 校验提示信息: 请输入验证码!
......@@ -289,7 +289,7 @@ Alert text: 请输入验证码!
PASS
* 登录_004 - 2024-11-25 17:17:38
* 登录_004 - 2024-11-25 17:50:25
[ case execution steps ]
......@@ -298,24 +298,20 @@ Alert text: 请输入验证码!
-- 第 2 步 -- 点击登录按钮
picture imgs/Login/Login_Pwd/登录_004_检查登录失败提示信息20241125171741269146.png
Alert text: 超过限制登录次数,请10分钟以后再登录!
picture imgs/Login/Login_Pwd/登录_004_检查登录失败提示信息20241125175027757649.png
Alert text: 账号或密码错误
-- 第 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
-- 第 4 步 -- 刷新页面
PASS
* 登录_005 - 2024-11-25 17:17:41
* 登录_005 - 2024-11-25 17:50:28
[ case execution steps ]
......@@ -324,33 +320,29 @@ AssertionError
-- 第 2 步 -- 点击登录按钮
picture imgs/Login/Login_Pwd/登录_005_检查登录失败提示信息20241125171744245968.png
Alert text: 超过限制登录次数,请10分钟以后再登录!
picture imgs/Login/Login_Pwd/登录_005_检查登录失败提示信息20241125175030707855.png
Alert text: 账号或密码错误
-- 第 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
-- 第 4 步 -- 刷新页面
* 登录_006 - 2024-11-25 17:17:44
PASS
* 登录_006 - 2024-11-25 17:50:31
[ case execution steps ]
-- 第 1 步 -- 输入账号: admin@czj, 密码: 12345, 验证码: csba
-- 第 1 步 -- 输入账号: admin@czj3, 密码: 12345, 验证码: csba
-- 第 2 步 -- 点击登录按钮
picture imgs/Login/Login_Pwd/登录_006_检查登录失败提示信息20241125171747276382.png
picture imgs/Login/Login_Pwd/登录_006_检查登录失败提示信息20241125175033655666.png
Alert text: 账号或密码错误
-- 第 3 步 -- 校验提示信息: 账号或密码错误
......@@ -363,134 +355,79 @@ Alert text: 账号或密码错误
PASS
* 登录_007 - 2024-11-25 17:17:48
* 登录_007 - 2024-11-25 17:50:34
[ case execution steps ]
-- 第 1 步 -- 输入账号: admin@czj, 密码: U bains1s@432, 验证码: csba
-- 第 1 步 -- 输入账号: admin@czj4, 密码: U bains1s@432, 验证码: csba
-- 第 2 步 -- 点击登录按钮
picture imgs/Login/Login_Pwd/登录_007_检查登录失败提示信息20241125171750628846.png
Alert text: 超过限制登录次数,请10分钟以后再登录!
picture imgs/Login/Login_Pwd/登录_007_检查登录失败提示信息20241125175036568256.png
Alert text: 账号或密码错误
-- 第 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
-- 第 4 步 -- 刷新页面
PASS
* 登录_008 - 2024-11-25 17:17:51
* 登录_008 - 2024-11-25 17:50:37
[ case execution steps ]
-- 第 1 步 -- 输入账号: admin@czj, 密码: Ubains@4321, 验证码: 123
-- 第 1 步 -- 输入账号: admin@czj5, 密码: Ubains@4321, 验证码: 123
-- 第 2 步 -- 点击登录按钮
picture imgs/Login/Login_Pwd/登录_008_检查登录失败提示信息20241125171753578494.png
Alert text: 超过限制登录次数,请10分钟以后再登录!
picture imgs/Login/Login_Pwd/登录_008_检查登录失败提示信息20241125175039445768.png
Alert text: 验证码错误
-- 第 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
-- 第 4 步 -- 刷新页面
* 登录_009 - 2024-11-25 17:17:54
PASS
* 登录_009 - 2024-11-25 17:50:39
[ case execution steps ]
-- 第 1 步 -- 输入账号: admin@czj, 密码: Ubains@4321, 验证码: cs 12
-- 第 1 步 -- 输入账号: admin@czj6, 密码: Ubains@4321, 验证码: cs 12
-- 第 2 步 -- 点击登录按钮
picture imgs/Login/Login_Pwd/登录_009_检查登录失败提示信息20241125171756875999.png
Alert text: 超过限制登录次数,请10分钟以后再登录!
picture imgs/Login/Login_Pwd/登录_009_检查登录失败提示信息20241125175042356574.png
Alert text: 验证码错误
-- 第 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
-- 第 4 步 -- 刷新页面
* 登录_010 - 2024-11-25 17:17:57
PASS
* 登录_010 - 2024-11-25 17:50:42
[ case execution steps ]
-- 第 1 步 -- 输入账号: admin@czj, 密码: Ubains@4321, 验证码: csba
-- 第 1 步 -- 输入账号: admin@ZDH, 密码: Ubains@4321, 验证码: csba
-- 第 2 步 -- 点击登录按钮
picture imgs/Login/Login_Pwd/登录_010_检查登录成功提示信息20241125171819679182.png
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
[ suite teardown ] cases\
清除浏览器
========= 测试结束 : 20241125_171822 =========
耗时 : 81.530 秒
预备执行用例数量 : 10
实际执行用例数量 : 10
通过 : 4
失败 : 6
异常 : 0
套件初始化失败 : 0
套件清除 失败 : 0
用例初始化失败 : 0
用例清除 失败 : 0
picture imgs/Login/Login_Pwd/登录_010_检查登录成功提示信息20241125175045377467.png
......@@ -198,11 +198,11 @@ CSV文件已读取
=== [ 执行测试用例 ] ===
预备执行用例数量 : 9
预备执行用例数量 : 10
========= 测试开始 : 20241125_171101 =========
========= 测试开始 : 20241125_174401 =========
......@@ -223,7 +223,7 @@ CSV文件已读取
>>> cases\登录模块\账号密码登录测试.py
* 登录_001 - 2024-11-25 17:11:23
* 登录_001 - 2024-11-25 17:44:04
[ case execution steps ]
......@@ -232,7 +232,7 @@ CSV文件已读取
-- 第 2 步 -- 点击登录按钮
picture imgs/Login/Login_Pwd/登录_001_检查登录失败提示信息20241125171126112028.png
picture imgs/Login/Login_Pwd/登录_001_检查登录失败提示信息20241125174407080171.png
Alert text: 请输入账号!
-- 第 3 步 -- 校验提示信息: 请输入账号!
......@@ -245,16 +245,16 @@ Alert text: 请输入账号!
PASS
* 登录_002 - 2024-11-25 17:11:26
* 登录_002 - 2024-11-25 17:44:07
[ case execution steps ]
-- 第 1 步 -- 输入账号: admin@czj, 密码: , 验证码: csba
-- 第 1 步 -- 输入账号: admin@czj1, 密码: , 验证码: csba
-- 第 2 步 -- 点击登录按钮
picture imgs/Login/Login_Pwd/登录_002_检查登录失败提示信息20241125171129080193.png
picture imgs/Login/Login_Pwd/登录_002_检查登录失败提示信息20241125174410069134.png
Alert text: 请输入密码!
-- 第 3 步 -- 校验提示信息: 请输入密码!
......@@ -267,16 +267,16 @@ Alert text: 请输入密码!
PASS
* 登录_003 - 2024-11-25 17:11:29
* 登录_003 - 2024-11-25 17:44:10
[ case execution steps ]
-- 第 1 步 -- 输入账号: admin@czj, 密码: Ubains@4321, 验证码:
-- 第 1 步 -- 输入账号: admin@czj2, 密码: Ubains@4321, 验证码:
-- 第 2 步 -- 点击登录按钮
picture imgs/Login/Login_Pwd/登录_003_检查登录失败提示信息20241125171132174157.png
picture imgs/Login/Login_Pwd/登录_003_检查登录失败提示信息20241125174413028657.png
Alert text: 请输入验证码!
-- 第 3 步 -- 校验提示信息: 请输入验证码!
......@@ -289,7 +289,7 @@ Alert text: 请输入验证码!
PASS
* 登录_004 - 2024-11-25 17:11:32
* 登录_004 - 2024-11-25 17:44:13
[ case execution steps ]
......@@ -298,24 +298,20 @@ Alert text: 请输入验证码!
-- 第 2 步 -- 点击登录按钮
picture imgs/Login/Login_Pwd/登录_004_检查登录失败提示信息20241125171135108097.png
Alert text: 超过限制登录次数,请10分钟以后再登录!
picture imgs/Login/Login_Pwd/登录_004_检查登录失败提示信息20241125174415937254.png
Alert text: 账号或密码错误
-- 第 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
-- 第 4 步 -- 刷新页面
PASS
* 登录_005 - 2024-11-25 17:11:35
* 登录_005 - 2024-11-25 17:44:16
[ case execution steps ]
......@@ -324,33 +320,29 @@ AssertionError
-- 第 2 步 -- 点击登录按钮
picture imgs/Login/Login_Pwd/登录_005_检查登录失败提示信息20241125171137961500.png
Alert text: 超过限制登录次数,请10分钟以后再登录!
picture imgs/Login/Login_Pwd/登录_005_检查登录失败提示信息20241125174418832049.png
Alert text: 账号或密码错误
-- 第 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
-- 第 4 步 -- 刷新页面
* 登录_006 - 2024-11-25 17:11:38
PASS
* 登录_006 - 2024-11-25 17:44:19
[ case execution steps ]
-- 第 1 步 -- 输入账号: admin@czj, 密码: 12345, 验证码: csba
-- 第 1 步 -- 输入账号: admin@czj3, 密码: 12345, 验证码: csba
-- 第 2 步 -- 点击登录按钮
picture imgs/Login/Login_Pwd/登录_006_检查登录失败提示信息20241125171140710074.png
picture imgs/Login/Login_Pwd/登录_006_检查登录失败提示信息20241125174421880105.png
Alert text: 账号或密码错误
-- 第 3 步 -- 校验提示信息: 账号或密码错误
......@@ -363,16 +355,16 @@ Alert text: 账号或密码错误
PASS
* 登录_007 - 2024-11-25 17:11:41
* 登录_007 - 2024-11-25 17:44:22
[ case execution steps ]
-- 第 1 步 -- 输入账号: admin@czj, 密码: U bains1s@432, 验证码: csba
-- 第 1 步 -- 输入账号: admin@czj4, 密码: U bains1s@432, 验证码: csba
-- 第 2 步 -- 点击登录按钮
picture imgs/Login/Login_Pwd/登录_007_检查登录失败提示信息20241125171143613127.png
picture imgs/Login/Login_Pwd/登录_007_检查登录失败提示信息20241125174424902427.png
Alert text: 账号或密码错误
-- 第 3 步 -- 校验提示信息: 账号或密码错误
......@@ -385,16 +377,16 @@ Alert text: 账号或密码错误
PASS
* 登录_008 - 2024-11-25 17:11:44
* 登录_008 - 2024-11-25 17:44:25
[ case execution steps ]
-- 第 1 步 -- 输入账号: admin@czj, 密码: Ubains@4321, 验证码: 123
-- 第 1 步 -- 输入账号: admin@czj5, 密码: Ubains@4321, 验证码: 123
-- 第 2 步 -- 点击登录按钮
picture imgs/Login/Login_Pwd/登录_008_检查登录失败提示信息20241125171146571054.png
picture imgs/Login/Login_Pwd/登录_008_检查登录失败提示信息20241125174427870609.png
Alert text: 验证码错误
-- 第 3 步 -- 校验提示信息: 验证码错误
......@@ -407,16 +399,16 @@ Alert text: 验证码错误
PASS
* 登录_009 - 2024-11-25 17:11:47
* 登录_009 - 2024-11-25 17:44:28
[ case execution steps ]
-- 第 1 步 -- 输入账号: admin@czj, 密码: Ubains@4321, 验证码: cs 12
-- 第 1 步 -- 输入账号: admin@czj6, 密码: Ubains@4321, 验证码: cs 12
-- 第 2 步 -- 点击登录按钮
picture imgs/Login/Login_Pwd/登录_009_检查登录失败提示信息20241125171149572699.png
picture imgs/Login/Login_Pwd/登录_009_检查登录失败提示信息20241125174430794150.png
Alert text: 验证码错误
-- 第 3 步 -- 校验提示信息: 验证码错误
......@@ -429,30 +421,13 @@ Alert text: 验证码错误
PASS
[ suite teardown ] cases\
清除浏览器
* 登录_010 - 2024-11-25 17:44:31
========= 测试结束 : 20241125_171152 =========
耗时 : 51.446 秒
预备执行用例数量 : 9
实际执行用例数量 : 9
通过 : 7
失败 : 2
异常 : 0
[ case execution steps ]
套件初始化失败 : 0
-- 第 1 步 -- 输入账号: admin@ZDH, 密码: Ubains@4321, 验证码: csba
套件清除 失败 : 0
用例初始化失败 : 0
-- 第 2 步 -- 点击登录按钮
用例清除 失败 : 0
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
......@@ -43,14 +43,14 @@ def run_automation_test():
report_link = link_pattern.search(stdout)
if report_link:
report_link = report_link.group(0)
logging.info(f"Test report link: {report_link}")
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"Failed to call dingding_send_message: {e}")
logging.error(f"dingding_send_message调用失败: {e}")
else:
logging.warning("No test report link found in stdout")
......@@ -73,7 +73,7 @@ def run_automation_test():
logging.error(f"OS error occurred: {e}")
# 每天凌晨 0 点执行任务
schedule.every().day.at("17:34").do(run_automation_test)
schedule.every().day.at("16:18").do(run_automation_test)
while True:
schedule.run_pending()
......
name,account,expected
登录_001,,Ubains@4321,csba,请输入账号!
登录_002,admin@czj,,csba,请输入密码!
登录_003,admin@czj,Ubains@4321,,请输入验证码!
登录_002,admin@czj1,,csba,请输入密码!
登录_003,admin@czj2,Ubains@4321,,请输入验证码!
登录_004,admin@czj112,Ubains@4321,csba,账号或密码错误
登录_005,adM 12in@czj,Ubains@4321,csba,账号或密码错误
登录_006,admin@czj,12345,csba,账号或密码错误
登录_007,admin@czj,U bains1s@432,csba,账号或密码错误
登录_008,admin@czj,Ubains@4321,123,验证码错误
登录_009,admin@czj,Ubains@4321,cs 12,验证码错误
登录_010,admin@czj,Ubains@4321,csba,欢迎 预定标准版测试
\ No newline at end of file
登录_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
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论