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

标准版注释clear_columns_in_xlsx和write_xlsx_data方法调用。

上级 63d8115f
......@@ -320,4 +320,6 @@
93. 2025-06-12:
- 测试报告发送前增加blocking_rate用例阻塞率的获取以及发送。
94. 2025-06-13:
- 兰州中石化项目模块增加tag标签。
\ No newline at end of file
- 兰州中石化项目模块增加tag标签。
95. 2025-06-16:
- 标准版注释clear_columns_in_xlsx和write_xlsx_data方法调用。
\ No newline at end of file
......@@ -25,7 +25,7 @@ class AIMeeting:
"""
ddt_cases = read_xlsx_data(xlsx_file_path, sheet_name='AI创会',case_type="标准版")
# 测试开始前调用clear_columns_in_xlsx函数,将测试用例中的测试结果和日志截图置空
clear_columns_in_xlsx(xlsx_file_path, sheet_name='AI创会', columns_to_clear=['测试结果', '测试频次', '日志截图'])
# clear_columns_in_xlsx(xlsx_file_path, sheet_name='AI创会', columns_to_clear=['测试结果', '测试频次', '日志截图'])
def teststeps(self):
wd = GSTORE['wd']
......
......@@ -25,7 +25,7 @@ class SMCMeeting:
"""
ddt_cases = read_xlsx_data(xlsx_file_path, sheet_name='会控-SMC',case_type="标准版")
# 测试开始前调用clear_columns_in_xlsx函数,将测试用例中的测试结果和日志截图置空
clear_columns_in_xlsx(xlsx_file_path, sheet_name='会控-SMC', columns_to_clear=['测试结果', '测试频次', '日志截图'])
# clear_columns_in_xlsx(xlsx_file_path, sheet_name='会控-SMC', columns_to_clear=['测试结果', '测试频次', '日志截图'])
def teststeps(self):
wd = GSTORE['wd']
......
......@@ -25,7 +25,7 @@ class EditMessage:
"""
ddt_cases = read_xlsx_data(xlsx_file_path, sheet_name='会议修改',case_type="标准版")
# 测试开始前调用clear_columns_in_xlsx函数,将测试用例中的测试结果和日志截图置空
clear_columns_in_xlsx(xlsx_file_path, sheet_name='会议修改', columns_to_clear=['测试结果', '测试频次', '日志截图'])
# clear_columns_in_xlsx(xlsx_file_path, sheet_name='会议修改', columns_to_clear=['测试结果', '测试频次', '日志截图'])
def teststeps(self):
"""
......
......@@ -25,7 +25,7 @@ class MeetingMessage:
"""
ddt_cases = read_xlsx_data(xlsx_file_path, sheet_name='会议创建',case_type="标准版")
# 测试开始前调用clear_columns_in_xlsx函数,将测试用例中的测试结果和日志截图置空
clear_columns_in_xlsx(xlsx_file_path, sheet_name='会议创建', columns_to_clear=['测试结果', '测试频次', '日志截图'])
# clear_columns_in_xlsx(xlsx_file_path, sheet_name='会议创建', columns_to_clear=['测试结果', '测试频次', '日志截图'])
def teststeps(self):
"""
......
......@@ -25,7 +25,7 @@ class MessageApproval:
"""
ddt_cases = read_xlsx_data(xlsx_file_path, sheet_name='会议审批',case_type="标准版")
# 测试开始前调用clear_columns_in_xlsx函数,将测试用例中的测试结果和日志截图置空
clear_columns_in_xlsx(xlsx_file_path, sheet_name='会议审批', columns_to_clear=['测试结果', '测试频次', '日志截图'])
# clear_columns_in_xlsx(xlsx_file_path, sheet_name='会议审批', columns_to_clear=['测试结果', '测试频次', '日志截图'])
def teststeps(self):
"""
......
......@@ -25,7 +25,7 @@ class MessageTemplate:
"""
ddt_cases = read_xlsx_data(xlsx_file_path, sheet_name='会议模板',case_type="标准版")
# 测试开始前调用clear_columns_in_xlsx函数,将测试用例中的测试结果和日志截图置空
clear_columns_in_xlsx(xlsx_file_path, sheet_name='会议模板', columns_to_clear=['测试结果', '测试频次', '日志截图'])
# clear_columns_in_xlsx(xlsx_file_path, sheet_name='会议模板', columns_to_clear=['测试结果', '测试频次', '日志截图'])
def teststeps(self):
"""
......
......@@ -25,7 +25,7 @@ class InformationDelivery:
"""
ddt_cases = read_xlsx_data(xlsx_file_path, sheet_name='信息发布',case_type="标准版")
# 测试开始前调用clear_columns_in_xlsx函数,将测试用例中的测试结果和日志截图置空
clear_columns_in_xlsx(xlsx_file_path, sheet_name='信息发布', columns_to_clear=['测试结果', '测试频次', '日志截图'])
# clear_columns_in_xlsx(xlsx_file_path, sheet_name='信息发布', columns_to_clear=['测试结果', '测试频次', '日志截图'])
def teststeps(self):
"""
......
......@@ -25,7 +25,7 @@ class InformationStatistics:
"""
ddt_cases = read_xlsx_data(xlsx_file_path, sheet_name='信息统计',case_type="标准版")
# 测试开始前调用clear_columns_in_xlsx函数,将测试用例中的测试结果和日志截图置空
clear_columns_in_xlsx(xlsx_file_path, sheet_name='信息统计', columns_to_clear=['测试结果', '测试频次', '日志截图'])
# clear_columns_in_xlsx(xlsx_file_path, sheet_name='信息统计', columns_to_clear=['测试结果', '测试频次', '日志截图'])
def teststeps(self):
"""
......
......@@ -25,7 +25,7 @@ class GlobalConfiguration:
"""
ddt_cases = read_xlsx_data(xlsx_file_path, sheet_name='全局配置',case_type="标准版")
# 测试开始前调用clear_columns_in_xlsx函数,将测试用例中的测试结果和日志截图置空
clear_columns_in_xlsx(xlsx_file_path, sheet_name='全局配置', columns_to_clear=['测试结果', '测试频次', '日志截图'])
# clear_columns_in_xlsx(xlsx_file_path, sheet_name='全局配置', columns_to_clear=['测试结果', '测试频次', '日志截图'])
def teststeps(self):
"""
......
......@@ -25,7 +25,7 @@ class AndroidInformation:
"""
ddt_cases = read_xlsx_data(xlsx_file_path, sheet_name='安卓信息',case_type="标准版")
# 测试开始前调用clear_columns_in_xlsx函数,将测试用例中的测试结果和日志截图置空
clear_columns_in_xlsx(xlsx_file_path, sheet_name='安卓信息', columns_to_clear=['测试结果', '测试频次', '日志截图'])
# clear_columns_in_xlsx(xlsx_file_path, sheet_name='安卓信息', columns_to_clear=['测试结果', '测试频次', '日志截图'])
def teststeps(self):
"""
......
......@@ -25,7 +25,7 @@ class Login:
"""
ddt_cases = read_xlsx_data(xlsx_file_path, sheet_name='登录页面',case_type="标准版")
# 测试开始前调用clear_columns_in_xlsx函数,将测试用例中的测试结果和日志截图置空
clear_columns_in_xlsx(xlsx_file_path, sheet_name='登录页面', columns_to_clear=['测试结果', '测试频次', '日志截图'])
# clear_columns_in_xlsx(xlsx_file_path, sheet_name='登录页面', columns_to_clear=['测试结果', '测试频次', '日志截图'])
def teststeps(self):
"""
......@@ -65,25 +65,26 @@ class Login:
SELENIUM_LOG_SCREEN(wd, '50%', 'Login', 'Login_Pwd', "检查登录成功提示信息")
# 记录提示信息
INFO(f"Alert text: {notify_text}")
CHECK_POINT('检查是否出现提示弹窗', "欢迎" in notify_text)
# 检查提示信息是否包含“欢迎”
if CHECK_POINT('检查是否出现提示弹窗', "欢迎" in notify_text):
# 如果提示信息不正确,记录为失败
write_xlsx_data(
xlsx_file_path,
"登录页面",
name,
f"失败,提示{notify_text}",
r"D:\GithubData\自动化\ubains-module-test\预定系统\reports\imgs\Login\Login_Pwd\检查登录成功提示信息.png"
)
else:
# 如果提示信息正确,记录为成功
write_xlsx_data(
xlsx_file_path,
"登录页面",
name,
f"成功,正确提示:{notify_text}",
r"D:\GithubData\自动化\ubains-module-test\预定系统\reports\imgs\Login\Login_Pwd\检查登录成功提示信息.png"
)
# if CHECK_POINT('检查是否出现提示弹窗', "欢迎" in notify_text):
# # 如果提示信息不正确,记录为失败
# write_xlsx_data(
# xlsx_file_path,
# "登录页面",
# name,
# f"失败,提示{notify_text}",
# r"D:\GithubData\自动化\ubains-module-test\预定系统\reports\imgs\Login\Login_Pwd\检查登录成功提示信息.png"
# )
# else:
# # 如果提示信息正确,记录为成功
# write_xlsx_data(
# xlsx_file_path,
# "登录页面",
# name,
# f"成功,正确提示:{notify_text}",
# r"D:\GithubData\自动化\ubains-module-test\预定系统\reports\imgs\Login\Login_Pwd\检查登录成功提示信息.png"
# )
# 点击退出登录按钮
safe_click((By.XPATH, "//img[@title='退出登录']"), wd)
sleep(2)
......@@ -99,25 +100,26 @@ class Login:
)
# 记录获取到的结果
INFO(f"获取到的结果:{notify_text}")
CHECK_POINT('检查是否出现提示弹窗', expented_result in notify_text)
# 检查提示信息是否包含预期的错误信息
if CHECK_POINT('检查是否出现提示弹窗', expented_result in notify_text):
# 如果提示信息不正确,记录为失败
write_xlsx_data(
xlsx_file_path,
"登录页面",
name,
f"失败,提示:{notify_text}",
r"D:\GithubData\自动化\ubains-module-test\预定系统\reports\imgs\Login\Login_Pwd\检查登录成功提示信息.png"
)
else:
# 如果提示信息正确,记录为成功
write_xlsx_data(
xlsx_file_path,
"登录页面",
name,
f"成功,正确提示:{notify_text}",
r"D:\GithubData\自动化\ubains-module-test\预定系统\reports\imgs\Login\Login_Pwd\检查登录成功提示信息.png"
)
# if CHECK_POINT('检查是否出现提示弹窗', expented_result in notify_text):
# # 如果提示信息不正确,记录为失败
# write_xlsx_data(
# xlsx_file_path,
# "登录页面",
# name,
# f"失败,提示:{notify_text}",
# r"D:\GithubData\自动化\ubains-module-test\预定系统\reports\imgs\Login\Login_Pwd\检查登录成功提示信息.png"
# )
# else:
# # 如果提示信息正确,记录为成功
# write_xlsx_data(
# xlsx_file_path,
# "登录页面",
# name,
# f"成功,正确提示:{notify_text}",
# r"D:\GithubData\自动化\ubains-module-test\预定系统\reports\imgs\Login\Login_Pwd\检查登录成功提示信息.png"
# )
sleep(2)
elif "请输入" in expented_result:
......@@ -131,23 +133,24 @@ class Login:
)
# 记录获取到的结果
INFO(f"获取到的结果:{notify_text}")
CHECK_POINT('检查是否出现提示弹窗', expented_result in notify_text)
# 检查提示信息是否包含预期的提示信息
if CHECK_POINT('检查是否出现提示弹窗', expented_result in notify_text):
# 如果提示信息不正确,记录为失败
write_xlsx_data(
xlsx_file_path,
"登录页面",
name,
f"失败,提示:{notify_text}",
r"D:\GithubData\自动化\ubains-module-test\预定系统\reports\imgs\Login\Login_Pwd\检查登录成功提示信息.png"
)
else:
# 如果提示信息正确,记录为成功
write_xlsx_data(
xlsx_file_path,
"登录页面",
name,
f"成功,正确提示:{notify_text}",
r"D:\GithubData\自动化\ubains-module-test\预定系统\reports\imgs\Login\Login_Pwd\检查登录成功提示信息.png"
)
# if CHECK_POINT('检查是否出现提示弹窗', expented_result in notify_text):
# # 如果提示信息不正确,记录为失败
# write_xlsx_data(
# xlsx_file_path,
# "登录页面",
# name,
# f"失败,提示:{notify_text}",
# r"D:\GithubData\自动化\ubains-module-test\预定系统\reports\imgs\Login\Login_Pwd\检查登录成功提示信息.png"
# )
# else:
# # 如果提示信息正确,记录为成功
# write_xlsx_data(
# xlsx_file_path,
# "登录页面",
# name,
# f"成功,正确提示:{notify_text}",
# r"D:\GithubData\自动化\ubains-module-test\预定系统\reports\imgs\Login\Login_Pwd\检查登录成功提示信息.png"
# )
sleep(2)
\ No newline at end of file
......@@ -25,7 +25,7 @@ class SystemManage:
"""
ddt_cases = read_xlsx_data(xlsx_file_path, sheet_name='系统管理',case_type="标准版")
# 测试开始前调用clear_columns_in_xlsx函数,将测试用例中的测试结果和日志截图置空
clear_columns_in_xlsx(xlsx_file_path, sheet_name='系统管理', columns_to_clear=['测试结果', '测试频次', '日志截图'])
# clear_columns_in_xlsx(xlsx_file_path, sheet_name='系统管理', columns_to_clear=['测试结果', '测试频次', '日志截图'])
def teststeps(self):
"""
......
......@@ -25,7 +25,7 @@ class AccountManagement:
"""
ddt_cases = read_xlsx_data(xlsx_file_path, sheet_name='账号管理',case_type="标准版")
# 测试开始前调用clear_columns_in_xlsx函数,将测试用例中的测试结果和日志截图置空
clear_columns_in_xlsx(xlsx_file_path, sheet_name='账号管理', columns_to_clear=['测试结果', '测试频次', '日志截图'])
# clear_columns_in_xlsx(xlsx_file_path, sheet_name='账号管理', columns_to_clear=['测试结果', '测试频次', '日志截图'])
def teststeps(self):
"""
......
......@@ -22,7 +22,7 @@ class AccountManagement:
"""
ddt_cases = read_xlsx_data(xlsx_file_path, sheet_name='账号管理',case_type="工商银行项目-25-04-01")
# 测试开始前调用clear_columns_in_xlsx函数,将测试用例中的测试结果和日志截图置空
clear_columns_in_xlsx(xlsx_file_path, sheet_name='账号管理', columns_to_clear=['测试结果', '测试频次', '日志截图'])
# clear_columns_in_xlsx(xlsx_file_path, sheet_name='账号管理', columns_to_clear=['测试结果', '测试频次', '日志截图'])
def teststeps(self):
"""
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论