Commit 9b5e26af by shenjiamin

api.1

parent ff2f409f
# -*-coding:utf-8 -*- #
# ---------------------------------------------------------------------------
# ProjectName: ${PROJECT_NAME}
# FileName: ${FILE_NAME}
# Author: shen
# Datetime: ${DATE} ${TIME}
# Description:
#
# ---------------------------------------------------------------------------
import functools
import logging
import os.path
import time
log_path = os.path.join(os.path.join(os.path.join(os.path.dirname(__file__),"report"),"log"),time.strftime("%Y_%m_%d_%H_%M_%S",time.localtime())+".log")
def project_log(log_file):
#创建logger对象
logger = logging.getLogger()
#设置日志的级别
logger.setLevel("INFO")
#创建日志文件的handler
handler = logging.FileHandler(log_file,mode="a",encoding="utf-8")
#设置日志显示的格式
formatter = logging.Formatter("%(asctime)s - %(levelname)s: %(message)s")
#给日志文件添加日志的格式
handler.setFormatter(formatter)
#给logger对象添加handler
logger.addHandler(handler)
return logger
project_log = project_log(log_path)
def log_decorator(func_name):
@functools.wraps(func_name)
def inner(*args, **kwargs):
try:
project_log.info(f"执行的功能为:{func_name.__name__}, 功能的描述为:{func_name.__doc__}, 所在的文件路径为:{func_name.__code__.co_filename}, 所做的行为:{func_name.__code__.co_firstlineno}")
res = func_name(*args, **kwargs)
except Exception as e:
project_log.error(f"执行的功能为:{func_name.__name__}, 功能的描述为:{func_name.__doc__}, 所在的文件路径为:{func_name.__code__.co_filename}, 所做的行为:{func_name.__code__.co_firstlineno}, 产生错误,错误的类型为:{type(e)}, 错误的描述为:{e}")
raise e
else:
return res
return inner
# -*-coding:utf-8 -*- #
# ---------------------------------------------------------------------------
# ProjectName: ${PROJECT_NAME}
# FileName: ${FILE_NAME}
# Author: shen
# Datetime: ${DATE} ${TIME}
# Description:
#
# ---------------------------------------------------------------------------
import pymysql
from APIAutoTest_shen_2 import log_decorator
from APIAutoTest_shen_2.common.read_basic_ini import ReadBasicIni
class DB:
@log_decorator
def __init__(self):
"""连接数据库,获取连接对象和游标对象"""
# 创建ReadBasicIni对象
ini = ReadBasicIni()
#创建连接对象
self.conn = pymysql.connect(
host=ini.get_database_conn_msg("host"),
port=int(ini.get_database_conn_msg("port")),
user=ini.get_database_conn_msg("user"),
password=ini.get_database_conn_msg("pwd"),
database=ini.get_database_conn_msg("database"),
charset="utf8"
)
#创建游标对象
self.cursor = self.conn.cursor()
@log_decorator
def close(self):
"""关闭连接对象和游标对象"""
#先关闭游标对象再关闭连接对象
self.cursor.close()
self.conn.close()
@log_decorator
def delete(self,sql_data):
"""执行sql的删除语句"""
#执行删除语句
self.cursor.execute(sql_data)
#连接对象提交
self.conn.commit()
@log_decorator
def select(self,sql_data):
"""执行sql的查询语句"""
#执行查询语句
self.cursor.execute(sql_data)
#获取查询结果并返回
select_res = self.cursor.fetchall()
#判断是否有查询结果,有就返回第一个结果,没有就返回none
if select_res:
return select_res[0][0]
if __name__ == '__main__':
db = DB()
sql = """DELETE FROM uc_demension where CODE_ = "test_dem";"""
sql1 = """select ID_ from uc_demension where CODE_="test_dem1";"""
print(db.select(sql1))
# -*-coding:utf-8 -*- #
# ---------------------------------------------------------------------------
# ProjectName: ${PROJECT_NAME}
# FileName: ${FILE_NAME}
# Author: shen
# Datetime: ${DATE} ${TIME}
# Description:
#
# ---------------------------------------------------------------------------
import configparser
import os.path
from APIAutoTest_shen_2 import log_decorator
class ReadBasicIni:
@log_decorator
def __init__(self):
"""获取项目下基础配置ini配置文件的路径,创建Configparser对象,读取ini文件"""
self.data_config_path = os.path.join(os.path.dirname(os.path.dirname(__file__)), "data_config")
ini_path = os.path.join(self.data_config_path, "config.ini")
self.conf = configparser.ConfigParser()
self.conf.read(ini_path, encoding="utf-8")
@log_decorator
def get_host(self, key):
"""根据key,获取host节点下系统的域名"""
return self.conf.get("host", key)
@log_decorator
def get_database_conn_msg(self, key):
"""根据key,获取sql节点下数据库的连接信息"""
return self.conf.get("sql", key)
@log_decorator
def get_user_data_dir_name(self, key):
"""根据key,获取用户存放数据的目录路径"""
# 获取用户存放数据的目录名称
user_data_dir_name = self.conf.get("user", key)
# 用户存放数据的目录名称和data_config的目录路径进行路径拼接,再返回
return os.path.join(self.data_config_path, user_data_dir_name)
if __name__ == '__main__':
ini = ReadBasicIni()
#print(ini.get_file_path("excel"))
print(ini.get_host("bpm"))
#print(ini.get_table_name("name"))
# print(ini.get_database_conn_msg("host"))
# print(ini.get_user_data_dir_name("zs"))
# -*-coding:utf-8 -*- #
# ---------------------------------------------------------------------------
# ProjectName: ${PROJECT_NAME}
# FileName: ${FILE_NAME}
# Author: shen
# Datetime: ${DATE} ${TIME}
# Description:
#
# ---------------------------------------------------------------------------
import openpyxl
from APIAutoTest_shen_2 import log_decorator
from APIAutoTest_shen_2.common.read_basic_ini import ReadBasicIni
from APIAutoTest_shen_2.common.read_json import read_json
from APIAutoTest_shen_2.common.read_user_ini import ReadUserIni
class ReadExcel:
@log_decorator
def __init__(self,username):
"""获取excel和所有json文件的路径以及excel工作表的名称,获取工作薄和工作表,获取所有json文件数据对应的python对象"""
#创建ReadBasicIni的对象,主要是用来获取被测系统的域名
self.basic_ini = ReadBasicIni()
#创建ReadUserIni的对象,来获取用户的数据
self.ini = ReadUserIni(username)
# 获取excel文件的路径和所有json文件的路径,获取工作表的名称
case_data_path = self.ini.get_file_path("case")
expect_data_path = self.ini.get_file_path("expect")
excel_path = self.ini.get_file_path("excel")
sql_data_path = self.ini.get_file_path("sql")
table_name = self.ini.get_table_name("name")
#获取工作薄和工作表
#获取excel工作薄的路径
wb = openpyxl.load_workbook(excel_path)
#获取工作表
self.ws = wb[table_name]
#调用read_json函数,获取json文件的数据
#获取用例文件的数据
self.case_data_dict = read_json(case_data_path)
#获取期望用例的数据
self.expect_data_dict = read_json(expect_data_path)
#获取sql语句的数据
self.sql_data_dict = read_json(sql_data_path)
@log_decorator
#使用私有方法根据行和列获取单元格的数据
def __get_cell_value(self,column,row):
"""根据行和列获取指定单元格的数据"""
value = self.ws[column+str(row)].value
#判断单元格数据是否不为none,如果不为none,将单元格数据去掉前后空格之后再返回,如果为none,将去掉空格为空的字符串返回none
if isinstance(value,str) and value.strip():
return value.strip()
@log_decorator
def module_name(self,row):
"""根据行,获取模块名称"""
#调用私有方法__get_cell_value,根据行来获取模块名称
return self.__get_cell_value("b",row)
@log_decorator
def api_name(self,row):
"""根据行,获取接口名称"""
#调用私有方法__get_cell_value,根据行来获取接口名称
return self.__get_cell_value("c",row)
@log_decorator
def case_url(self,row):
"""根据行,获取url"""
# 调用私有方法__get_cell_value,根据行来获取url
path = self.__get_cell_value("f",row)
#判断路径是否不为none,如果不为none,和域名进行拼接
if path:
return self.basic_ini.get_host("bpm") + path
@log_decorator
def case_mime(self,row):
"""根据行,获取用例的媒体类型"""
# 调用私有方法__get_cell_value,根据行来获取媒体类型
mime = self.__get_cell_value("g",row)
#判断媒体类型的值,如果不为none,全部转小写再返回
if mime:
return mime.lower()
@log_decorator
def case_req(self,row):
"""根据行获取用例的请求方法"""
# 调用私有方法__get_cell_value,根据行来获取请求方法
return self.__get_cell_value("h",row)
@log_decorator
def case_data(self,row):
"""根据行,获取用例的数据"""
# 调用私有方法__get_cell_value,根据行来获取用例数据
case_data_key = self.__get_cell_value("i",row)
# 判断用例数据的key是否不为None,如果不为None,就提取用例数据,如果为None,就返回None
if case_data_key:
#获取模块名称
module_name = self.module_name(row)
#获取接口名称
api_name = self.api_name(row)
#提取用例数据并返回
return self.case_data_dict[module_name][api_name][case_data_key]
@log_decorator
def expect_data(self,row):
"""根据行获取期望数据"""
# 调用私有方法__get_cell_value,根据行来获取期望数据
expect_data_key = self.__get_cell_value("j",row)
#判断期望数据的key是否不为none,如果不为none,提取期望数据,如果为none,就返回none
if expect_data_key:
#获取模块名称
module_name = self.module_name(row)
api_name = self.api_name(row)
#提取期望数据并返回
return self.expect_data_dict[module_name][api_name][expect_data_key]
@log_decorator
def sql_data(self,row):
"""根据行获取sql数据"""
# 调用私有方法__get_cell_value,根据行来获取sql数据
sql_data_key = self.__get_cell_value("l",row)
#判断sql数据是否不为none,如果不为none,就提取数据,如果为none,就返回none
if sql_data_key:
#获取模块名称
module_name = self.module_name(row)
#获取接口名称
api_name = self.api_name(row)
#提取sql数据并返回
return self.sql_data_dict[module_name][api_name][sql_data_key]
@log_decorator
def sql_type(self,row):
"""根据行获取sql类型"""
# 调用私有方法__get_cell_value,根据行来获取sql类型
sql_statement =self.__get_cell_value("k",row)
#判断sql语句类型的值是否不为none,如果不为none,就将值转小写再返回
if sql_statement:
return sql_statement.lower()
@log_decorator
def update_key(self,row):
"""根据行获取更新的值"""
# 调用私有方法__get_cell_value,根据行来获取更新的值
return self.__get_cell_value("m",row)
@log_decorator
def get_data(self):
"""获取所有的测试数据,放在二维列表中"""
list_data = []
for row in range(2,self.ws.max_row+1):
url = self.case_url(row)
mime = self.case_mime(row)
req = self.case_req(row)
case = self.case_data(row)
expect = self.expect_data(row)
sql = self.sql_data(row)
sql_type1 = self.sql_type(row)
update = self.update_key(row)
#过滤空行
if url is not None and req is not None and expect is not None:
#将每行数据放在列表中,再将列表追加到之前创建的空列表中
list_data.append([url,mime,req,case,expect,sql,sql_type1,update])
else:
return list_data
if __name__ == '__main__':
excel = ReadExcel("zs")
print(excel.get_data())
# -*-coding:utf-8 -*- #
# ---------------------------------------------------------------------------
# ProjectName: ${PROJECT_NAME}
# FileName: ${FILE_NAME}
# Author: shen
# Datetime: ${DATE} ${TIME}
# Description:
#
# ---------------------------------------------------------------------------
import json
from APIAutoTest_shen_2 import log_decorator
@log_decorator
def read_json(filepath):
"""读取json文件,将json文件的内容序列化为python对象再返回"""
with open(filepath,mode="r",encoding="utf-8") as f:
#序列化为python对象再返回
return json.load(f)
# -*-coding:utf-8 -*- #
# ---------------------------------------------------------------------------
# ProjectName: ${PROJECT_NAME}
# FileName: ${FILE_NAME}
# Author: shen
# Datetime: ${DATE} ${TIME}
# Description:
#
# ---------------------------------------------------------------------------
import configparser
import os.path
from APIAutoTest_shen_2 import log_decorator
from APIAutoTest_shen_2.common.read_basic_ini import ReadBasicIni
class ReadUserIni:
@log_decorator
def __init__(self,username):
"""获取项目下用户ini配置文件的路径,创建Configparser对象,读取ini文件"""
#创建ReadBasicIni的对象,调用get_user_data_dir_name方法,获取用户存放数据的目录路径
self.user_data_dir_path = ReadBasicIni().get_user_data_dir_name(username)
# 获取ini文件的路径
ini_path = os.path.join(self.user_data_dir_path,"config.ini")
# 创建Configparser对象
self.conf = configparser.ConfigParser()
# Configparser对象对象调用read方法读取ini文件
self.conf.read(ini_path,encoding="utf-8")
@log_decorator
def get_file_path(self,key):
"""根据key,获取file节点下文件的路径"""
return os.path.join(self.user_data_dir_path,self.conf.get("file",key))
@log_decorator
def get_table_name(self,key):
"""根据key,获取table节点下工作表的名称"""
return self.conf.get("table",key)
if __name__ == '__main__':
res = ReadUserIni("zs")
print(res.get_table_name("name"))
[host]
# 配置项目的域名
bpm= http://36.139.193.99:8088
[sql]
# 数据库的连接信息
host=36.139.193.99
port=3306
user=root
pwd=Rhrc@2024
database=eip8
[user]
# 随着用户的增加而增加选项,配置的是数据的目录名称
zs=zhangsan_data
{
"认证接口": {
"登录系统": {
"LoginSuccess": {
"username": "admin",
"password": "WuHRoZXGrg1LHOix8EVOhqGcu3CEEd0hOWNPRENTScZMb2ekrEtBGGBJweUxGKi36k346+OrS5mD3nnjyrocZOfzo4UqoshNoqJgx09u81LV2vc53Sy83DsBWKGoZZZRUhsDrpRj8feUlakJMCpgqswG0y9jm95Lk9auWpI146I="
},
"LoginErrorUsernameIsNone": {
"username": "",
"password": "WuHRoZXGrg1LHOix8EVOhqGcu3CEEd0hOWNPRENTScZMb2ekrEtBGGBJweUxGKi36k346+OrS5mD3nnjyrocZOfzo4UqoshNoqJgx09u81LV2vc53Sy83DsBWKGoZZZRUhsDrpRj8feUlakJMCpgqswG0y9jm95Lk9auWpI146I="
},
"LoginErrorUsernameIsShort": {
"username": "a",
"password": "WuHRoZXGrg1LHOix8EVOhqGcu3CEEd0hOWNPRENTScZMb2ekrEtBGGBJweUxGKi36k346+OrS5mD3nnjyrocZOfzo4UqoshNoqJgx09u81LV2vc53Sy83DsBWKGoZZZRUhsDrpRj8feUlakJMCpgqswG0y9jm95Lk9auWpI146I="
},
"LoginErrorUsernameIsLong": {
"username": "adminadminadminadminadminadminadmin",
"password": "WuHRoZXGrg1LHOix8EVOhqGcu3CEEd0hOWNPRENTScZMb2ekrEtBGGBJweUxGKi36k346+OrS5mD3nnjyrocZOfzo4UqoshNoqJgx09u81LV2vc53Sy83DsBWKGoZZZRUhsDrpRj8feUlakJMCpgqswG0y9jm95Lk9auWpI146I="
},
"LoginErrorUsernameIsSpecial": {
"username": "▣▤▥▦▩◘◙",
"password": "WuHRoZXGrg1LHOix8EVOhqGcu3CEEd0hOWNPRENTScZMb2ekrEtBGGBJweUxGKi36k346+OrS5mD3nnjyrocZOfzo4UqoshNoqJgx09u81LV2vc53Sy83DsBWKGoZZZRUhsDrpRj8feUlakJMCpgqswG0y9jm95Lk9auWpI146I="
},
"LoginErrorUsernameIsError": {
"username": "Admin123",
"password": "WuHRoZXGrg1LHOix8EVOhqGcu3CEEd0hOWNPRENTScZMb2ekrEtBGGBJweUxGKi36k346+OrS5mD3nnjyrocZOfzo4UqoshNoqJgx09u81LV2vc53Sy83DsBWKGoZZZRUhsDrpRj8feUlakJMCpgqswG0y9jm95Lk9auWpI146I="
},
"LoginErrorPwdIsNone": {
"username": "admin",
"password": ""
},
"LoginErrorPwdIsShort": {
"username": "admin",
"password": "1"
},
"LoginErrorPwdIsSpecial": {
"username": "admin",
"password": "▣▤▥▦▩◘◙"
},
"LoginErrorPwdIsLong": {
"username": "admin",
"password": "WuHRoZXGrg1LHOix8EVOhqGcu3CEEd0hOWNPRENTScZMb2ekrEtBGGBJweUxGKi36k346+OrS5mD3nnjyrocZOfzo4UqoshNoqJgx09u81LV2vc53Sy83DsBWKGoZZZRUhsDrpRj8feUlakJMCpgqswG0y9jm95Lk9auWpI146I=WuHRoZXGrg1LHOix8EVOhqGcu3CEEd0hOWNPRENTScZMb2ekrEtBGGBJweUxGKi36k346+OrS5mD3nnjyrocZOfzo4UqoshNoqJgx09u81LV2vc53Sy83DsBWKGoZZZRUhsDrpRj8feUlakJMCpgqswG0y9jm95Lk9auWpI146I="
}
}
},
"维度管理": {
"添加维度": {
"AddDemSuccess": {
"code": "test_dem1",
"description": "测试添加的维度",
"isDefault": 1,
"name": "测试维度"
}
},
"根据维度编码删除维度": {
"DeleteDemSuccess": {
"ids": "需要更新"
}
},
"更新维度": {
"PutDemSuccess": {
"code": "test_dem1",
"description": "测试添加的维度",
"isDefault": 1,
"name": "测试维度-更新"
}
}
},
"组织管理": {
"添加组织": {
"AddOrgSuccess": {
"code": "test_org_code",
"demId": "需要更新",
"exceedLimitNum": 0,
"grade": "",
"limitNum": 0,
"name": "测试组织",
"nowNum": 0,
"orderNo": 0,
"parentId": "0"
}
},
"组织加入用户": {
"UserJoinOrgSuccess": {"orgCode": "test_org_code", "accounts": "admin"}
},
"保存组织参数": {
"SaveOrgParamSuccess": {
"query": {"orgCode": "test_org_code"},
"json": [{"alias":"sz","value":100000}]
}
},
"删除组织": {
"DeleteOrgSuccess": "test_org_code"
}
}
}
[file]
#配置数据层中工作表的名称
excel=apiAutoTest.xlsx
case=case_data.json
expect=expect_data.json
sql=sql_data.json
[table]
#配置数据层中工作表的名称
name=BPM
{
"认证接口": {
"登录系统": {
"LoginSuccess": {
"username": "超级管理员",
"account": "admin",
"userId": "1",
"expiration": 86400
},
"LoginErrorUsernameIsNone": {
"message": "账号或密码错误"
},
"LoginErrorUsernameIsShort": {
"message": "账号或密码错误"
},
"LoginErrorUsernameIsLong": {
"message": "账号或密码错误"
},
"LoginErrorUsernameIsSpecial": {
"message": "账号或密码错误"
},
"LoginErrorUsernameIsError": {
"message": "账号或密码错误"
},
"LoginErrorPwdIsNone": {
"message": "账号或密码错误"
},
"LoginErrorPwdIsShort": {
"message": "账号或密码错误"
},
"LoginErrorPwdIsSpecial": {
"message": "账号或密码错误"
},
"LoginErrorPwdIsLong": {
"message": "账号或密码错误"
}
},
"刷新token": {
"RefreshSuccess": {
"message": "刷新成功"
}
}
},
"维度管理": {
"添加维度": {
"AddDemSuccess": {
"message": "添加维度成功!"
}
},
"根据维度编码删除维度": {
"DeleteDemSuccess": {
"message": "删除维度成功!"
}
},
"更新维度": {
"PutDemSuccess": {
"message": "更新维度成功!"
}
}
},
"组织管理": {
"添加组织": {
"AddOrgSuccess": {
"message": "添加组织成功"
}
},
"组织加入用户": {
"UserJoinOrgSuccess": {"message": "加入成功"}
},
"保存组织参数": {
"SaveOrgParamSuccess": {"message":"保存组织参数成功!"}
},
"删除组织": {
"DeleteOrgSuccess": {"message":"删除组织成功!"}
}
}
}
{
"维度管理": {
"添加维度": {
"AddDemSuccess": "delete from uc_demension where CODE_=\"test_dem1\";"
},
"根据维度编码删除维度": {
"DeleteDemSuccess": "select ID_ from uc_demension where CODE_=\"test_dem1\";"
}
},
"组织管理": {
"添加组织": {
"AddOrgSuccess": {
"select": "select ID_ from uc_demension where CODE_=\"test_org_code\"; ",
"delete": "delete from uc_org where CODE_=\"test_org_code\";"
}
}
}
}
body {
font-family: Helvetica, Arial, sans-serif;
font-size: 12px;
/* do not increase min-width as some may use split screens */
min-width: 800px;
color: #999;
}
h1 {
font-size: 24px;
color: black;
}
h2 {
font-size: 16px;
color: black;
}
p {
color: black;
}
a {
color: #999;
}
table {
border-collapse: collapse;
}
/******************************
* SUMMARY INFORMATION
******************************/
#environment td {
padding: 5px;
border: 1px solid #e6e6e6;
vertical-align: top;
}
#environment tr:nth-child(odd) {
background-color: #f6f6f6;
}
#environment ul {
margin: 0;
padding: 0 20px;
}
/******************************
* TEST RESULT COLORS
******************************/
span.passed,
.passed .col-result {
color: green;
}
span.skipped,
span.xfailed,
span.rerun,
.skipped .col-result,
.xfailed .col-result,
.rerun .col-result {
color: orange;
}
span.error,
span.failed,
span.xpassed,
.error .col-result,
.failed .col-result,
.xpassed .col-result {
color: red;
}
.col-links__extra {
margin-right: 3px;
}
/******************************
* RESULTS TABLE
*
* 1. Table Layout
* 2. Extra
* 3. Sorting items
*
******************************/
/*------------------
* 1. Table Layout
*------------------*/
#results-table {
border: 1px solid #e6e6e6;
color: #999;
font-size: 12px;
width: 100%;
}
#results-table th,
#results-table td {
padding: 5px;
border: 1px solid #e6e6e6;
text-align: left;
}
#results-table th {
font-weight: bold;
}
/*------------------
* 2. Extra
*------------------*/
.logwrapper {
max-height: 230px;
overflow-y: scroll;
background-color: #e6e6e6;
}
.logwrapper.expanded {
max-height: none;
}
.logwrapper.expanded .logexpander:after {
content: "collapse [-]";
}
.logwrapper .logexpander {
z-index: 1;
position: sticky;
top: 10px;
width: max-content;
border: 1px solid;
border-radius: 3px;
padding: 5px 7px;
margin: 10px 0 10px calc(100% - 80px);
cursor: pointer;
background-color: #e6e6e6;
}
.logwrapper .logexpander:after {
content: "expand [+]";
}
.logwrapper .logexpander:hover {
color: #000;
border-color: #000;
}
.logwrapper .log {
min-height: 40px;
position: relative;
top: -50px;
height: calc(100% + 50px);
border: 1px solid #e6e6e6;
color: black;
display: block;
font-family: "Courier New", Courier, monospace;
padding: 5px;
padding-right: 80px;
white-space: pre-wrap;
}
div.media {
border: 1px solid #e6e6e6;
float: right;
height: 240px;
margin: 0 5px;
overflow: hidden;
width: 320px;
}
.media-container {
display: grid;
grid-template-columns: 25px auto 25px;
align-items: center;
flex: 1 1;
overflow: hidden;
height: 200px;
}
.media-container--fullscreen {
grid-template-columns: 0px auto 0px;
}
.media-container__nav--right,
.media-container__nav--left {
text-align: center;
cursor: pointer;
}
.media-container__viewport {
cursor: pointer;
text-align: center;
height: inherit;
}
.media-container__viewport img,
.media-container__viewport video {
object-fit: cover;
width: 100%;
max-height: 100%;
}
.media__name,
.media__counter {
display: flex;
flex-direction: row;
justify-content: space-around;
flex: 0 0 25px;
align-items: center;
}
.collapsible td:not(.col-links) {
cursor: pointer;
}
.collapsible td:not(.col-links):hover::after {
color: #bbb;
font-style: italic;
cursor: pointer;
}
.col-result {
width: 130px;
}
.col-result:hover::after {
content: " (hide details)";
}
.col-result.collapsed:hover::after {
content: " (show details)";
}
#environment-header h2:hover::after {
content: " (hide details)";
color: #bbb;
font-style: italic;
cursor: pointer;
font-size: 12px;
}
#environment-header.collapsed h2:hover::after {
content: " (show details)";
color: #bbb;
font-style: italic;
cursor: pointer;
font-size: 12px;
}
/*------------------
* 3. Sorting items
*------------------*/
.sortable {
cursor: pointer;
}
.sortable.desc:after {
content: " ";
position: relative;
left: 5px;
bottom: -12.5px;
border: 10px solid #4caf50;
border-bottom: 0;
border-left-color: transparent;
border-right-color: transparent;
}
.sortable.asc:after {
content: " ";
position: relative;
left: 5px;
bottom: 12.5px;
border: 10px solid #4caf50;
border-top: 0;
border-left-color: transparent;
border-right-color: transparent;
}
.hidden, .summary__reload__button.hidden {
display: none;
}
.summary__data {
flex: 0 0 550px;
}
.summary__reload {
flex: 1 1;
display: flex;
justify-content: center;
}
.summary__reload__button {
flex: 0 0 300px;
display: flex;
color: white;
font-weight: bold;
background-color: #4caf50;
text-align: center;
justify-content: center;
align-items: center;
border-radius: 3px;
cursor: pointer;
}
.summary__reload__button:hover {
background-color: #46a049;
}
.summary__spacer {
flex: 0 0 550px;
}
.controls {
display: flex;
justify-content: space-between;
}
.filters,
.collapse {
display: flex;
align-items: center;
}
.filters button,
.collapse button {
color: #999;
border: none;
background: none;
cursor: pointer;
text-decoration: underline;
}
.filters button:hover,
.collapse button:hover {
color: #ccc;
}
.filter__label {
margin-right: 10px;
}
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8"/>
<title id="head-title">report.html</title>
<link href="assets\style.css" rel="stylesheet" type="text/css"/>
</head>
<body>
<h1 id="title">report.html</h1>
<p>Report generated on 28-Dec-2024 at 13:39:19 by <a href="https://pypi.python.org/pypi/pytest-html">pytest-html</a>
v4.1.1</p>
<div id="environment-header">
<h2>Environment</h2>
</div>
<table id="environment"></table>
<!-- TEMPLATES -->
<template id="template_environment_row">
<tr>
<td></td>
<td></td>
</tr>
</template>
<template id="template_results-table__body--empty">
<tbody class="results-table-row">
<tr id="not-found-message">
<td colspan="4">No results found. Check the filters.</th>
</tr>
</template>
<template id="template_results-table__tbody">
<tbody class="results-table-row">
<tr class="collapsible">
</tr>
<tr class="extras-row">
<td class="extra" colspan="4">
<div class="extraHTML"></div>
<div class="media">
<div class="media-container">
<div class="media-container__nav--left"><</div>
<div class="media-container__viewport">
<img src="" />
<video controls>
<source src="" type="video/mp4">
</video>
</div>
<div class="media-container__nav--right">></div>
</div>
<div class="media__name"></div>
<div class="media__counter"></div>
</div>
<div class="logwrapper">
<div class="logexpander"></div>
<div class="log"></div>
</div>
</td>
</tr>
</tbody>
</template>
<!-- END TEMPLATES -->
<div class="summary">
<div class="summary__data">
<h2>Summary</h2>
<div class="additional-summary prefix">
</div>
<p class="run-count">3 tests took 364 ms.</p>
<p class="filter">(Un)check the boxes to filter the results.</p>
<div class="summary__reload">
<div class="summary__reload__button hidden" onclick="location.reload()">
<div>There are still tests running. <br />Reload this page to get the latest results!</div>
</div>
</div>
<div class="summary__spacer"></div>
<div class="controls">
<div class="filters">
<input checked="true" class="filter" name="filter_checkbox" type="checkbox" data-test-result="failed" disabled/>
<span class="failed">0 Failed,</span>
<input checked="true" class="filter" name="filter_checkbox" type="checkbox" data-test-result="passed" />
<span class="passed">3 Passed,</span>
<input checked="true" class="filter" name="filter_checkbox" type="checkbox" data-test-result="skipped" disabled/>
<span class="skipped">0 Skipped,</span>
<input checked="true" class="filter" name="filter_checkbox" type="checkbox" data-test-result="xfailed" disabled/>
<span class="xfailed">0 Expected failures,</span>
<input checked="true" class="filter" name="filter_checkbox" type="checkbox" data-test-result="xpassed" disabled/>
<span class="xpassed">0 Unexpected passes,</span>
<input checked="true" class="filter" name="filter_checkbox" type="checkbox" data-test-result="error" disabled/>
<span class="error">0 Errors,</span>
<input checked="true" class="filter" name="filter_checkbox" type="checkbox" data-test-result="rerun" disabled/>
<span class="rerun">0 Reruns</span>
</div>
<div class="collapse">
<button id="show_all_details">Show all details</button>&nbsp;/&nbsp;<button id="hide_all_details">Hide all details</button>
</div>
</div>
</div>
<div class="additional-summary summary">
</div>
<div class="additional-summary postfix">
</div>
</div>
<table id="results-table">
<thead id="results-table-head">
<tr>
<th class="sortable" data-column-type="result">Result</th>
<th class="sortable" data-column-type="testId">Test</th>
<th class="sortable" data-column-type="duration">Duration</th>
<th>Links</th>
</tr>
</thead>
</table>
</body>
<footer>
<div id="data-container" data-jsonblob="{&#34;environment&#34;: {&#34;Python&#34;: &#34;3.13.0&#34;, &#34;Platform&#34;: &#34;Windows-10-10.0.17763-SP0&#34;, &#34;Packages&#34;: {&#34;pytest&#34;: &#34;8.3.4&#34;, &#34;pluggy&#34;: &#34;1.5.0&#34;}, &#34;Plugins&#34;: {&#34;Faker&#34;: &#34;33.1.0&#34;, &#34;dependency&#34;: &#34;0.6.0&#34;, &#34;html&#34;: &#34;4.1.1&#34;, &#34;metadata&#34;: &#34;3.1.1&#34;, &#34;ordering&#34;: &#34;0.6&#34;, &#34;rerunfailures&#34;: &#34;15.0&#34;}}, &#34;tests&#34;: {&#34;test_case/test_user_zs/test_bpm.py::TestBPM::test_bpm[http://36.139.193.99:8088/api/demension/v1/dem/addDem-json-post-case0-expect0-delete from uc_demension where CODE_=\&#34;test_dem1\&#34;;-delete-None]&#34;: [{&#34;extras&#34;: [], &#34;result&#34;: &#34;Passed&#34;, &#34;testId&#34;: &#34;test_case/test_user_zs/test_bpm.py::TestBPM::test_bpm[http://36.139.193.99:8088/api/demension/v1/dem/addDem-json-post-case0-expect0-delete from uc_demension where CODE_=\&#34;test_dem1\&#34;;-delete-None]&#34;, &#34;duration&#34;: &#34;283 ms&#34;, &#34;resultsTableRow&#34;: [&#34;&lt;td class=\&#34;col-result\&#34;&gt;Passed&lt;/td&gt;&#34;, &#34;&lt;td class=\&#34;col-testId\&#34;&gt;test_case/test_user_zs/test_bpm.py::TestBPM::test_bpm[http://36.139.193.99:8088/api/demension/v1/dem/addDem-json-post-case0-expect0-delete from uc_demension where CODE_=\&#34;test_dem1\&#34;;-delete-None]&lt;/td&gt;&#34;, &#34;&lt;td class=\&#34;col-duration\&#34;&gt;283 ms&lt;/td&gt;&#34;, &#34;&lt;td class=\&#34;col-links\&#34;&gt;&lt;/td&gt;&#34;], &#34;log&#34;: &#34;------------------------------ Captured log setup ------------------------------\nINFO root:__init__.py:39 \u6267\u884c\u7684\u529f\u80fd\u4e3a\uff1a__init__, \u529f\u80fd\u7684\u63cf\u8ff0\u4e3a\uff1a\u7ba1\u7406\u88ab\u6d4b\u7cfb\u7edf\u7684\u767b\u5f55\u72b6\u6001, \u6240\u5728\u7684\u6587\u4ef6\u8def\u5f84\u4e3a\uff1aD:\\software\\pythons\\APIAutoTest_shen_2\\requests_method\\requests_method.py, \u6240\u505a\u7684\u884c\u4e3a\uff1a19\nINFO root:__init__.py:39 \u6267\u884c\u7684\u529f\u80fd\u4e3a\uff1a__init__, \u529f\u80fd\u7684\u63cf\u8ff0\u4e3a\uff1a\u8fde\u63a5\u6570\u636e\u5e93\uff0c\u83b7\u53d6\u8fde\u63a5\u5bf9\u8c61\u548c\u6e38\u6807\u5bf9\u8c61, \u6240\u5728\u7684\u6587\u4ef6\u8def\u5f84\u4e3a\uff1aD:\\software\\pythons\\APIAutoTest_shen_2\\common\\db.py, \u6240\u505a\u7684\u884c\u4e3a\uff1a17\nINFO root:__init__.py:39 \u6267\u884c\u7684\u529f\u80fd\u4e3a\uff1a__init__, \u529f\u80fd\u7684\u63cf\u8ff0\u4e3a\uff1a\u83b7\u53d6\u9879\u76ee\u4e0b\u57fa\u7840\u914d\u7f6eini\u914d\u7f6e\u6587\u4ef6\u7684\u8def\u5f84\uff0c\u521b\u5efaConfigparser\u5bf9\u8c61\uff0c\u8bfb\u53d6ini\u6587\u4ef6, \u6240\u5728\u7684\u6587\u4ef6\u8def\u5f84\u4e3a\uff1aD:\\software\\pythons\\APIAutoTest_shen_2\\common\\read_basic_ini.py, \u6240\u505a\u7684\u884c\u4e3a\uff1a17\nINFO root:__init__.py:39 \u6267\u884c\u7684\u529f\u80fd\u4e3a\uff1aget_database_conn_msg, \u529f\u80fd\u7684\u63cf\u8ff0\u4e3a\uff1a\u6839\u636ekey\uff0c\u83b7\u53d6sql\u8282\u70b9\u4e0b\u6570\u636e\u5e93\u7684\u8fde\u63a5\u4fe1\u606f, \u6240\u5728\u7684\u6587\u4ef6\u8def\u5f84\u4e3a\uff1aD:\\software\\pythons\\APIAutoTest_shen_2\\common\\read_basic_ini.py, \u6240\u505a\u7684\u884c\u4e3a\uff1a30\nINFO root:__init__.py:39 \u6267\u884c\u7684\u529f\u80fd\u4e3a\uff1aget_database_conn_msg, \u529f\u80fd\u7684\u63cf\u8ff0\u4e3a\uff1a\u6839\u636ekey\uff0c\u83b7\u53d6sql\u8282\u70b9\u4e0b\u6570\u636e\u5e93\u7684\u8fde\u63a5\u4fe1\u606f, \u6240\u5728\u7684\u6587\u4ef6\u8def\u5f84\u4e3a\uff1aD:\\software\\pythons\\APIAutoTest_shen_2\\common\\read_basic_ini.py, \u6240\u505a\u7684\u884c\u4e3a\uff1a30\nINFO root:__init__.py:39 \u6267\u884c\u7684\u529f\u80fd\u4e3a\uff1aget_database_conn_msg, \u529f\u80fd\u7684\u63cf\u8ff0\u4e3a\uff1a\u6839\u636ekey\uff0c\u83b7\u53d6sql\u8282\u70b9\u4e0b\u6570\u636e\u5e93\u7684\u8fde\u63a5\u4fe1\u606f, \u6240\u5728\u7684\u6587\u4ef6\u8def\u5f84\u4e3a\uff1aD:\\software\\pythons\\APIAutoTest_shen_2\\common\\read_basic_ini.py, \u6240\u505a\u7684\u884c\u4e3a\uff1a30\nINFO root:__init__.py:39 \u6267\u884c\u7684\u529f\u80fd\u4e3a\uff1aget_database_conn_msg, \u529f\u80fd\u7684\u63cf\u8ff0\u4e3a\uff1a\u6839\u636ekey\uff0c\u83b7\u53d6sql\u8282\u70b9\u4e0b\u6570\u636e\u5e93\u7684\u8fde\u63a5\u4fe1\u606f, \u6240\u5728\u7684\u6587\u4ef6\u8def\u5f84\u4e3a\uff1aD:\\software\\pythons\\APIAutoTest_shen_2\\common\\read_basic_ini.py, \u6240\u505a\u7684\u884c\u4e3a\uff1a30\nINFO root:__init__.py:39 \u6267\u884c\u7684\u529f\u80fd\u4e3a\uff1aget_database_conn_msg, \u529f\u80fd\u7684\u63cf\u8ff0\u4e3a\uff1a\u6839\u636ekey\uff0c\u83b7\u53d6sql\u8282\u70b9\u4e0b\u6570\u636e\u5e93\u7684\u8fde\u63a5\u4fe1\u606f, \u6240\u5728\u7684\u6587\u4ef6\u8def\u5f84\u4e3a\uff1aD:\\software\\pythons\\APIAutoTest_shen_2\\common\\read_basic_ini.py, \u6240\u505a\u7684\u884c\u4e3a\uff1a30\nINFO root:__init__.py:39 \u6267\u884c\u7684\u529f\u80fd\u4e3a\uff1a__init__, \u529f\u80fd\u7684\u63cf\u8ff0\u4e3a\uff1a\u83b7\u53d6\u9879\u76ee\u4e0b\u57fa\u7840\u914d\u7f6eini\u914d\u7f6e\u6587\u4ef6\u7684\u8def\u5f84\uff0c\u521b\u5efaConfigparser\u5bf9\u8c61\uff0c\u8bfb\u53d6ini\u6587\u4ef6, \u6240\u5728\u7684\u6587\u4ef6\u8def\u5f84\u4e3a\uff1aD:\\software\\pythons\\APIAutoTest_shen_2\\common\\read_basic_ini.py, \u6240\u505a\u7684\u884c\u4e3a\uff1a17\nINFO root:__init__.py:39 \u6267\u884c\u7684\u529f\u80fd\u4e3a\uff1aget_host, \u529f\u80fd\u7684\u63cf\u8ff0\u4e3a\uff1a\u6839\u636ekey\uff0c\u83b7\u53d6host\u8282\u70b9\u4e0b\u7cfb\u7edf\u7684\u57df\u540d, \u6240\u5728\u7684\u6587\u4ef6\u8def\u5f84\u4e3a\uff1aD:\\software\\pythons\\APIAutoTest_shen_2\\common\\read_basic_ini.py, \u6240\u505a\u7684\u884c\u4e3a\uff1a25\n\n----------------------------- Captured stdout call -----------------------------\n[&amp;#x27;http://36.139.193.99:8088/api/demension/v1/dem/addDem&amp;#x27;, &amp;#x27;json&amp;#x27;, &amp;#x27;post&amp;#x27;, {&amp;#x27;code&amp;#x27;: &amp;#x27;test_dem1&amp;#x27;, &amp;#x27;description&amp;#x27;: &amp;#x27;\u6d4b\u8bd5\u6dfb\u52a0\u7684\u7ef4\u5ea6&amp;#x27;, &amp;#x27;isDefault&amp;#x27;: 1, &amp;#x27;name&amp;#x27;: &amp;#x27;\u6d4b\u8bd5\u7ef4\u5ea6&amp;#x27;}, &amp;#x27;delete from uc_demension where CODE_=&amp;quot;test_dem1&amp;quot;;&amp;#x27;, &amp;#x27;delete&amp;#x27;, None, {&amp;#x27;message&amp;#x27;: &amp;#x27;\u6dfb\u52a0\u7ef4\u5ea6\u6210\u529f\uff01&amp;#x27;}]\n\n------------------------------ Captured log call -------------------------------\nINFO root:__init__.py:39 \u6267\u884c\u7684\u529f\u80fd\u4e3a\uff1atest_bpm, \u529f\u80fd\u7684\u63cf\u8ff0\u4e3a\uff1aNone, \u6240\u5728\u7684\u6587\u4ef6\u8def\u5f84\u4e3a\uff1aD:\\software\\pythons\\APIAutoTest_shen_2\\test_case\\test_user_zs\\test_bpm.py, \u6240\u505a\u7684\u884c\u4e3a\uff1a21\nINFO root:__init__.py:39 \u6267\u884c\u7684\u529f\u80fd\u4e3a\uff1arequest_all, \u529f\u80fd\u7684\u63cf\u8ff0\u4e3a\uff1aNone, \u6240\u5728\u7684\u6587\u4ef6\u8def\u5f84\u4e3a\uff1aD:\\software\\pythons\\APIAutoTest_shen_2\\requests_method\\requests_method.py, \u6240\u505a\u7684\u884c\u4e3a\uff1a39\nINFO root:__init__.py:39 \u6267\u884c\u7684\u529f\u80fd\u4e3a\uff1adelete, \u529f\u80fd\u7684\u63cf\u8ff0\u4e3a\uff1a\u6267\u884csql\u7684\u5220\u9664\u8bed\u53e5, \u6240\u5728\u7684\u6587\u4ef6\u8def\u5f84\u4e3a\uff1aD:\\software\\pythons\\APIAutoTest_shen_2\\common\\db.py, \u6240\u505a\u7684\u884c\u4e3a\uff1a40\n\n&#34;}], &#34;test_case/test_user_zs/test_bpm.py::TestBPM::test_bpm[http://36.139.193.99:8088/api/demension/v1/dem/updateDem-json-put-case1-expect1-None-None-None]&#34;: [{&#34;extras&#34;: [], &#34;result&#34;: &#34;Passed&#34;, &#34;testId&#34;: &#34;test_case/test_user_zs/test_bpm.py::TestBPM::test_bpm[http://36.139.193.99:8088/api/demension/v1/dem/updateDem-json-put-case1-expect1-None-None-None]&#34;, &#34;duration&#34;: &#34;45 ms&#34;, &#34;resultsTableRow&#34;: [&#34;&lt;td class=\&#34;col-result\&#34;&gt;Passed&lt;/td&gt;&#34;, &#34;&lt;td class=\&#34;col-testId\&#34;&gt;test_case/test_user_zs/test_bpm.py::TestBPM::test_bpm[http://36.139.193.99:8088/api/demension/v1/dem/updateDem-json-put-case1-expect1-None-None-None]&lt;/td&gt;&#34;, &#34;&lt;td class=\&#34;col-duration\&#34;&gt;45 ms&lt;/td&gt;&#34;, &#34;&lt;td class=\&#34;col-links\&#34;&gt;&lt;/td&gt;&#34;], &#34;log&#34;: &#34;----------------------------- Captured stdout call -----------------------------\n[&amp;#x27;http://36.139.193.99:8088/api/demension/v1/dem/updateDem&amp;#x27;, &amp;#x27;json&amp;#x27;, &amp;#x27;put&amp;#x27;, {&amp;#x27;code&amp;#x27;: &amp;#x27;test_dem1&amp;#x27;, &amp;#x27;description&amp;#x27;: &amp;#x27;\u6d4b\u8bd5\u6dfb\u52a0\u7684\u7ef4\u5ea6&amp;#x27;, &amp;#x27;isDefault&amp;#x27;: 1, &amp;#x27;name&amp;#x27;: &amp;#x27;\u6d4b\u8bd5\u7ef4\u5ea6-\u66f4\u65b0&amp;#x27;}, None, None, None, {&amp;#x27;message&amp;#x27;: &amp;#x27;\u66f4\u65b0\u7ef4\u5ea6\u6210\u529f\uff01&amp;#x27;}]\n\n------------------------------ Captured log call -------------------------------\nINFO root:__init__.py:39 \u6267\u884c\u7684\u529f\u80fd\u4e3a\uff1atest_bpm, \u529f\u80fd\u7684\u63cf\u8ff0\u4e3a\uff1aNone, \u6240\u5728\u7684\u6587\u4ef6\u8def\u5f84\u4e3a\uff1aD:\\software\\pythons\\APIAutoTest_shen_2\\test_case\\test_user_zs\\test_bpm.py, \u6240\u505a\u7684\u884c\u4e3a\uff1a21\nINFO root:__init__.py:39 \u6267\u884c\u7684\u529f\u80fd\u4e3a\uff1arequest_all, \u529f\u80fd\u7684\u63cf\u8ff0\u4e3a\uff1aNone, \u6240\u5728\u7684\u6587\u4ef6\u8def\u5f84\u4e3a\uff1aD:\\software\\pythons\\APIAutoTest_shen_2\\requests_method\\requests_method.py, \u6240\u505a\u7684\u884c\u4e3a\uff1a39\n\n&#34;}], &#34;test_case/test_user_zs/test_bpm.py::TestBPM::test_bpm[http://36.139.193.99:8088/api/demension/v1/dem/deleteDemByIds-query-delete-case2-expect2-select ID_ from uc_demension where CODE_=\&#34;test_dem1\&#34;;-select-ids]&#34;: [{&#34;extras&#34;: [], &#34;result&#34;: &#34;Passed&#34;, &#34;testId&#34;: &#34;test_case/test_user_zs/test_bpm.py::TestBPM::test_bpm[http://36.139.193.99:8088/api/demension/v1/dem/deleteDemByIds-query-delete-case2-expect2-select ID_ from uc_demension where CODE_=\&#34;test_dem1\&#34;;-select-ids]&#34;, &#34;duration&#34;: &#34;36 ms&#34;, &#34;resultsTableRow&#34;: [&#34;&lt;td class=\&#34;col-result\&#34;&gt;Passed&lt;/td&gt;&#34;, &#34;&lt;td class=\&#34;col-testId\&#34;&gt;test_case/test_user_zs/test_bpm.py::TestBPM::test_bpm[http://36.139.193.99:8088/api/demension/v1/dem/deleteDemByIds-query-delete-case2-expect2-select ID_ from uc_demension where CODE_=\&#34;test_dem1\&#34;;-select-ids]&lt;/td&gt;&#34;, &#34;&lt;td class=\&#34;col-duration\&#34;&gt;36 ms&lt;/td&gt;&#34;, &#34;&lt;td class=\&#34;col-links\&#34;&gt;&lt;/td&gt;&#34;], &#34;log&#34;: &#34;----------------------------- Captured stdout call -----------------------------\n[&amp;#x27;http://36.139.193.99:8088/api/demension/v1/dem/deleteDemByIds&amp;#x27;, &amp;#x27;query&amp;#x27;, &amp;#x27;delete&amp;#x27;, {&amp;#x27;ids&amp;#x27;: &amp;#x27;1872879042358157312&amp;#x27;}, &amp;#x27;select ID_ from uc_demension where CODE_=&amp;quot;test_dem1&amp;quot;;&amp;#x27;, &amp;#x27;select&amp;#x27;, &amp;#x27;ids&amp;#x27;, {&amp;#x27;message&amp;#x27;: &amp;#x27;\u5220\u9664\u7ef4\u5ea6\u6210\u529f\uff01&amp;#x27;}]\n\n------------------------------ Captured log call -------------------------------\nINFO root:__init__.py:39 \u6267\u884c\u7684\u529f\u80fd\u4e3a\uff1atest_bpm, \u529f\u80fd\u7684\u63cf\u8ff0\u4e3a\uff1aNone, \u6240\u5728\u7684\u6587\u4ef6\u8def\u5f84\u4e3a\uff1aD:\\software\\pythons\\APIAutoTest_shen_2\\test_case\\test_user_zs\\test_bpm.py, \u6240\u505a\u7684\u884c\u4e3a\uff1a21\nINFO root:__init__.py:39 \u6267\u884c\u7684\u529f\u80fd\u4e3a\uff1arequest_all, \u529f\u80fd\u7684\u63cf\u8ff0\u4e3a\uff1aNone, \u6240\u5728\u7684\u6587\u4ef6\u8def\u5f84\u4e3a\uff1aD:\\software\\pythons\\APIAutoTest_shen_2\\requests_method\\requests_method.py, \u6240\u505a\u7684\u884c\u4e3a\uff1a39\nINFO root:__init__.py:39 \u6267\u884c\u7684\u529f\u80fd\u4e3a\uff1aselect, \u529f\u80fd\u7684\u63cf\u8ff0\u4e3a\uff1a\u6267\u884csql\u7684\u67e5\u8be2\u8bed\u53e5, \u6240\u5728\u7684\u6587\u4ef6\u8def\u5f84\u4e3a\uff1aD:\\software\\pythons\\APIAutoTest_shen_2\\common\\db.py, \u6240\u505a\u7684\u884c\u4e3a\uff1a47\n\n---------------------------- Captured log teardown -----------------------------\nINFO root:__init__.py:39 \u6267\u884c\u7684\u529f\u80fd\u4e3a\uff1aclose, \u529f\u80fd\u7684\u63cf\u8ff0\u4e3a\uff1a\u5173\u95ed\u6570\u636e\u7684\u8fde\u63a5, \u6240\u5728\u7684\u6587\u4ef6\u8def\u5f84\u4e3a\uff1aD:\\software\\pythons\\APIAutoTest_shen_2\\requests_method\\requests_method.py, \u6240\u505a\u7684\u884c\u4e3a\uff1a34\nINFO root:__init__.py:39 \u6267\u884c\u7684\u529f\u80fd\u4e3a\uff1aclose, \u529f\u80fd\u7684\u63cf\u8ff0\u4e3a\uff1a\u5173\u95ed\u8fde\u63a5\u5bf9\u8c61\u548c\u6e38\u6807\u5bf9\u8c61, \u6240\u5728\u7684\u6587\u4ef6\u8def\u5f84\u4e3a\uff1aD:\\software\\pythons\\APIAutoTest_shen_2\\common\\db.py, \u6240\u505a\u7684\u884c\u4e3a\uff1a33&#34;}]}, &#34;renderCollapsed&#34;: [&#34;passed&#34;], &#34;initialSort&#34;: &#34;result&#34;, &#34;title&#34;: &#34;report.html&#34;}"></div>
<script>
(function(){function r(e,n,t){function o(i,f){if(!n[i]){if(!e[i]){var c="function"==typeof require&&require;if(!f&&c)return c(i,!0);if(u)return u(i,!0);var a=new Error("Cannot find module '"+i+"'");throw a.code="MODULE_NOT_FOUND",a}var p=n[i]={exports:{}};e[i][0].call(p.exports,function(r){var n=e[i][1][r];return o(n||r)},p,p.exports,r,e,n,t)}return n[i].exports}for(var u="function"==typeof require&&require,i=0;i<t.length;i++)o(t[i]);return o}return r})()({1:[function(require,module,exports){
const { getCollapsedCategory, setCollapsedIds } = require('./storage.js')
class DataManager {
setManager(data) {
const collapsedCategories = [...getCollapsedCategory(data.renderCollapsed)]
const collapsedIds = []
const tests = Object.values(data.tests).flat().map((test, index) => {
const collapsed = collapsedCategories.includes(test.result.toLowerCase())
const id = `test_${index}`
if (collapsed) {
collapsedIds.push(id)
}
return {
...test,
id,
collapsed,
}
})
const dataBlob = { ...data, tests }
this.data = { ...dataBlob }
this.renderData = { ...dataBlob }
setCollapsedIds(collapsedIds)
}
get allData() {
return { ...this.data }
}
resetRender() {
this.renderData = { ...this.data }
}
setRender(data) {
this.renderData.tests = [...data]
}
toggleCollapsedItem(id) {
this.renderData.tests = this.renderData.tests.map((test) =>
test.id === id ? { ...test, collapsed: !test.collapsed } : test,
)
}
set allCollapsed(collapsed) {
this.renderData = { ...this.renderData, tests: [...this.renderData.tests.map((test) => (
{ ...test, collapsed }
))] }
}
get testSubset() {
return [...this.renderData.tests]
}
get environment() {
return this.renderData.environment
}
get initialSort() {
return this.data.initialSort
}
}
module.exports = {
manager: new DataManager(),
}
},{"./storage.js":8}],2:[function(require,module,exports){
const mediaViewer = require('./mediaviewer.js')
const templateEnvRow = document.getElementById('template_environment_row')
const templateResult = document.getElementById('template_results-table__tbody')
function htmlToElements(html) {
const temp = document.createElement('template')
temp.innerHTML = html
return temp.content.childNodes
}
const find = (selector, elem) => {
if (!elem) {
elem = document
}
return elem.querySelector(selector)
}
const findAll = (selector, elem) => {
if (!elem) {
elem = document
}
return [...elem.querySelectorAll(selector)]
}
const dom = {
getStaticRow: (key, value) => {
const envRow = templateEnvRow.content.cloneNode(true)
const isObj = typeof value === 'object' && value !== null
const values = isObj ? Object.keys(value).map((k) => `${k}: ${value[k]}`) : null
const valuesElement = htmlToElements(
values ? `<ul>${values.map((val) => `<li>${val}</li>`).join('')}<ul>` : `<div>${value}</div>`)[0]
const td = findAll('td', envRow)
td[0].textContent = key
td[1].appendChild(valuesElement)
return envRow
},
getResultTBody: ({ testId, id, log, extras, resultsTableRow, tableHtml, result, collapsed }) => {
const resultBody = templateResult.content.cloneNode(true)
resultBody.querySelector('tbody').classList.add(result.toLowerCase())
resultBody.querySelector('tbody').id = testId
resultBody.querySelector('.collapsible').dataset.id = id
resultsTableRow.forEach((html) => {
const t = document.createElement('template')
t.innerHTML = html
resultBody.querySelector('.collapsible').appendChild(t.content)
})
if (log) {
// Wrap lines starting with "E" with span.error to color those lines red
const wrappedLog = log.replace(/^E.*$/gm, (match) => `<span class="error">${match}</span>`)
resultBody.querySelector('.log').innerHTML = wrappedLog
} else {
resultBody.querySelector('.log').remove()
}
if (collapsed) {
resultBody.querySelector('.collapsible > td')?.classList.add('collapsed')
resultBody.querySelector('.extras-row').classList.add('hidden')
} else {
resultBody.querySelector('.collapsible > td')?.classList.remove('collapsed')
}
const media = []
extras?.forEach(({ name, format_type, content }) => {
if (['image', 'video'].includes(format_type)) {
media.push({ path: content, name, format_type })
}
if (format_type === 'html') {
resultBody.querySelector('.extraHTML').insertAdjacentHTML('beforeend', `<div>${content}</div>`)
}
})
mediaViewer.setup(resultBody, media)
// Add custom html from the pytest_html_results_table_html hook
tableHtml?.forEach((item) => {
resultBody.querySelector('td[class="extra"]').insertAdjacentHTML('beforeend', item)
})
return resultBody
},
}
module.exports = {
dom,
htmlToElements,
find,
findAll,
}
},{"./mediaviewer.js":6}],3:[function(require,module,exports){
const { manager } = require('./datamanager.js')
const { doSort } = require('./sort.js')
const storageModule = require('./storage.js')
const getFilteredSubSet = (filter) =>
manager.allData.tests.filter(({ result }) => filter.includes(result.toLowerCase()))
const doInitFilter = () => {
const currentFilter = storageModule.getVisible()
const filteredSubset = getFilteredSubSet(currentFilter)
manager.setRender(filteredSubset)
}
const doFilter = (type, show) => {
if (show) {
storageModule.showCategory(type)
} else {
storageModule.hideCategory(type)
}
const currentFilter = storageModule.getVisible()
const filteredSubset = getFilteredSubSet(currentFilter)
manager.setRender(filteredSubset)
const sortColumn = storageModule.getSort()
doSort(sortColumn, true)
}
module.exports = {
doFilter,
doInitFilter,
}
},{"./datamanager.js":1,"./sort.js":7,"./storage.js":8}],4:[function(require,module,exports){
const { redraw, bindEvents, renderStatic } = require('./main.js')
const { doInitFilter } = require('./filter.js')
const { doInitSort } = require('./sort.js')
const { manager } = require('./datamanager.js')
const data = JSON.parse(document.getElementById('data-container').dataset.jsonblob)
function init() {
manager.setManager(data)
doInitFilter()
doInitSort()
renderStatic()
redraw()
bindEvents()
}
init()
},{"./datamanager.js":1,"./filter.js":3,"./main.js":5,"./sort.js":7}],5:[function(require,module,exports){
const { dom, find, findAll } = require('./dom.js')
const { manager } = require('./datamanager.js')
const { doSort } = require('./sort.js')
const { doFilter } = require('./filter.js')
const {
getVisible,
getCollapsedIds,
setCollapsedIds,
getSort,
getSortDirection,
possibleFilters,
} = require('./storage.js')
const removeChildren = (node) => {
while (node.firstChild) {
node.removeChild(node.firstChild)
}
}
const renderStatic = () => {
const renderEnvironmentTable = () => {
const environment = manager.environment
const rows = Object.keys(environment).map((key) => dom.getStaticRow(key, environment[key]))
const table = document.getElementById('environment')
removeChildren(table)
rows.forEach((row) => table.appendChild(row))
}
renderEnvironmentTable()
}
const addItemToggleListener = (elem) => {
elem.addEventListener('click', ({ target }) => {
const id = target.parentElement.dataset.id
manager.toggleCollapsedItem(id)
const collapsedIds = getCollapsedIds()
if (collapsedIds.includes(id)) {
const updated = collapsedIds.filter((item) => item !== id)
setCollapsedIds(updated)
} else {
collapsedIds.push(id)
setCollapsedIds(collapsedIds)
}
redraw()
})
}
const renderContent = (tests) => {
const sortAttr = getSort(manager.initialSort)
const sortAsc = JSON.parse(getSortDirection())
const rows = tests.map(dom.getResultTBody)
const table = document.getElementById('results-table')
const tableHeader = document.getElementById('results-table-head')
const newTable = document.createElement('table')
newTable.id = 'results-table'
// remove all sorting classes and set the relevant
findAll('.sortable', tableHeader).forEach((elem) => elem.classList.remove('asc', 'desc'))
tableHeader.querySelector(`.sortable[data-column-type="${sortAttr}"]`)?.classList.add(sortAsc ? 'desc' : 'asc')
newTable.appendChild(tableHeader)
if (!rows.length) {
const emptyTable = document.getElementById('template_results-table__body--empty').content.cloneNode(true)
newTable.appendChild(emptyTable)
} else {
rows.forEach((row) => {
if (!!row) {
findAll('.collapsible td:not(.col-links', row).forEach(addItemToggleListener)
find('.logexpander', row).addEventListener('click',
(evt) => evt.target.parentNode.classList.toggle('expanded'),
)
newTable.appendChild(row)
}
})
}
table.replaceWith(newTable)
}
const renderDerived = () => {
const currentFilter = getVisible()
possibleFilters.forEach((result) => {
const input = document.querySelector(`input[data-test-result="${result}"]`)
input.checked = currentFilter.includes(result)
})
}
const bindEvents = () => {
const filterColumn = (evt) => {
const { target: element } = evt
const { testResult } = element.dataset
doFilter(testResult, element.checked)
const collapsedIds = getCollapsedIds()
const updated = manager.renderData.tests.map((test) => {
return {
...test,
collapsed: collapsedIds.includes(test.id),
}
})
manager.setRender(updated)
redraw()
}
const header = document.getElementById('environment-header')
header.addEventListener('click', () => {
const table = document.getElementById('environment')
table.classList.toggle('hidden')
header.classList.toggle('collapsed')
})
findAll('input[name="filter_checkbox"]').forEach((elem) => {
elem.addEventListener('click', filterColumn)
})
findAll('.sortable').forEach((elem) => {
elem.addEventListener('click', (evt) => {
const { target: element } = evt
const { columnType } = element.dataset
doSort(columnType)
redraw()
})
})
document.getElementById('show_all_details').addEventListener('click', () => {
manager.allCollapsed = false
setCollapsedIds([])
redraw()
})
document.getElementById('hide_all_details').addEventListener('click', () => {
manager.allCollapsed = true
const allIds = manager.renderData.tests.map((test) => test.id)
setCollapsedIds(allIds)
redraw()
})
}
const redraw = () => {
const { testSubset } = manager
renderContent(testSubset)
renderDerived()
}
module.exports = {
redraw,
bindEvents,
renderStatic,
}
},{"./datamanager.js":1,"./dom.js":2,"./filter.js":3,"./sort.js":7,"./storage.js":8}],6:[function(require,module,exports){
class MediaViewer {
constructor(assets) {
this.assets = assets
this.index = 0
}
nextActive() {
this.index = this.index === this.assets.length - 1 ? 0 : this.index + 1
return [this.activeFile, this.index]
}
prevActive() {
this.index = this.index === 0 ? this.assets.length - 1 : this.index -1
return [this.activeFile, this.index]
}
get currentIndex() {
return this.index
}
get activeFile() {
return this.assets[this.index]
}
}
const setup = (resultBody, assets) => {
if (!assets.length) {
resultBody.querySelector('.media').classList.add('hidden')
return
}
const mediaViewer = new MediaViewer(assets)
const container = resultBody.querySelector('.media-container')
const leftArrow = resultBody.querySelector('.media-container__nav--left')
const rightArrow = resultBody.querySelector('.media-container__nav--right')
const mediaName = resultBody.querySelector('.media__name')
const counter = resultBody.querySelector('.media__counter')
const imageEl = resultBody.querySelector('img')
const sourceEl = resultBody.querySelector('source')
const videoEl = resultBody.querySelector('video')
const setImg = (media, index) => {
if (media?.format_type === 'image') {
imageEl.src = media.path
imageEl.classList.remove('hidden')
videoEl.classList.add('hidden')
} else if (media?.format_type === 'video') {
sourceEl.src = media.path
videoEl.classList.remove('hidden')
imageEl.classList.add('hidden')
}
mediaName.innerText = media?.name
counter.innerText = `${index + 1} / ${assets.length}`
}
setImg(mediaViewer.activeFile, mediaViewer.currentIndex)
const moveLeft = () => {
const [media, index] = mediaViewer.prevActive()
setImg(media, index)
}
const doRight = () => {
const [media, index] = mediaViewer.nextActive()
setImg(media, index)
}
const openImg = () => {
window.open(mediaViewer.activeFile.path, '_blank')
}
if (assets.length === 1) {
container.classList.add('media-container--fullscreen')
} else {
leftArrow.addEventListener('click', moveLeft)
rightArrow.addEventListener('click', doRight)
}
imageEl.addEventListener('click', openImg)
}
module.exports = {
setup,
}
},{}],7:[function(require,module,exports){
const { manager } = require('./datamanager.js')
const storageModule = require('./storage.js')
const genericSort = (list, key, ascending, customOrder) => {
let sorted
if (customOrder) {
sorted = list.sort((a, b) => {
const aValue = a.result.toLowerCase()
const bValue = b.result.toLowerCase()
const aIndex = customOrder.findIndex((item) => item.toLowerCase() === aValue)
const bIndex = customOrder.findIndex((item) => item.toLowerCase() === bValue)
// Compare the indices to determine the sort order
return aIndex - bIndex
})
} else {
sorted = list.sort((a, b) => a[key] === b[key] ? 0 : a[key] > b[key] ? 1 : -1)
}
if (ascending) {
sorted.reverse()
}
return sorted
}
const durationSort = (list, ascending) => {
const parseDuration = (duration) => {
if (duration.includes(':')) {
// If it's in the format "HH:mm:ss"
const [hours, minutes, seconds] = duration.split(':').map(Number)
return (hours * 3600 + minutes * 60 + seconds) * 1000
} else {
// If it's in the format "nnn ms"
return parseInt(duration)
}
}
const sorted = list.sort((a, b) => parseDuration(a['duration']) - parseDuration(b['duration']))
if (ascending) {
sorted.reverse()
}
return sorted
}
const doInitSort = () => {
const type = storageModule.getSort(manager.initialSort)
const ascending = storageModule.getSortDirection()
const list = manager.testSubset
const initialOrder = ['Error', 'Failed', 'Rerun', 'XFailed', 'XPassed', 'Skipped', 'Passed']
storageModule.setSort(type)
storageModule.setSortDirection(ascending)
if (type?.toLowerCase() === 'original') {
manager.setRender(list)
} else {
let sortedList
switch (type) {
case 'duration':
sortedList = durationSort(list, ascending)
break
case 'result':
sortedList = genericSort(list, type, ascending, initialOrder)
break
default:
sortedList = genericSort(list, type, ascending)
break
}
manager.setRender(sortedList)
}
}
const doSort = (type, skipDirection) => {
const newSortType = storageModule.getSort(manager.initialSort) !== type
const currentAsc = storageModule.getSortDirection()
let ascending
if (skipDirection) {
ascending = currentAsc
} else {
ascending = newSortType ? false : !currentAsc
}
storageModule.setSort(type)
storageModule.setSortDirection(ascending)
const list = manager.testSubset
const sortedList = type === 'duration' ? durationSort(list, ascending) : genericSort(list, type, ascending)
manager.setRender(sortedList)
}
module.exports = {
doInitSort,
doSort,
}
},{"./datamanager.js":1,"./storage.js":8}],8:[function(require,module,exports){
const possibleFilters = [
'passed',
'skipped',
'failed',
'error',
'xfailed',
'xpassed',
'rerun',
]
const getVisible = () => {
const url = new URL(window.location.href)
const settings = new URLSearchParams(url.search).get('visible')
const lower = (item) => {
const lowerItem = item.toLowerCase()
if (possibleFilters.includes(lowerItem)) {
return lowerItem
}
return null
}
return settings === null ?
possibleFilters :
[...new Set(settings?.split(',').map(lower).filter((item) => item))]
}
const hideCategory = (categoryToHide) => {
const url = new URL(window.location.href)
const visibleParams = new URLSearchParams(url.search).get('visible')
const currentVisible = visibleParams ? visibleParams.split(',') : [...possibleFilters]
const settings = [...new Set(currentVisible)].filter((f) => f !== categoryToHide).join(',')
url.searchParams.set('visible', settings)
window.history.pushState({}, null, unescape(url.href))
}
const showCategory = (categoryToShow) => {
if (typeof window === 'undefined') {
return
}
const url = new URL(window.location.href)
const currentVisible = new URLSearchParams(url.search).get('visible')?.split(',').filter(Boolean) ||
[...possibleFilters]
const settings = [...new Set([categoryToShow, ...currentVisible])]
const noFilter = possibleFilters.length === settings.length || !settings.length
noFilter ? url.searchParams.delete('visible') : url.searchParams.set('visible', settings.join(','))
window.history.pushState({}, null, unescape(url.href))
}
const getSort = (initialSort) => {
const url = new URL(window.location.href)
let sort = new URLSearchParams(url.search).get('sort')
if (!sort) {
sort = initialSort || 'result'
}
return sort
}
const setSort = (type) => {
const url = new URL(window.location.href)
url.searchParams.set('sort', type)
window.history.pushState({}, null, unescape(url.href))
}
const getCollapsedCategory = (renderCollapsed) => {
let categories
if (typeof window !== 'undefined') {
const url = new URL(window.location.href)
const collapsedItems = new URLSearchParams(url.search).get('collapsed')
switch (true) {
case !renderCollapsed && collapsedItems === null:
categories = ['passed']
break
case collapsedItems?.length === 0 || /^["']{2}$/.test(collapsedItems):
categories = []
break
case /^all$/.test(collapsedItems) || collapsedItems === null && /^all$/.test(renderCollapsed):
categories = [...possibleFilters]
break
default:
categories = collapsedItems?.split(',').map((item) => item.toLowerCase()) || renderCollapsed
break
}
} else {
categories = []
}
return categories
}
const getSortDirection = () => JSON.parse(sessionStorage.getItem('sortAsc')) || false
const setSortDirection = (ascending) => sessionStorage.setItem('sortAsc', ascending)
const getCollapsedIds = () => JSON.parse(sessionStorage.getItem('collapsedIds')) || []
const setCollapsedIds = (list) => sessionStorage.setItem('collapsedIds', JSON.stringify(list))
module.exports = {
getVisible,
hideCategory,
showCategory,
getCollapsedIds,
setCollapsedIds,
getSort,
setSort,
getSortDirection,
setSortDirection,
getCollapsedCategory,
possibleFilters,
}
},{}]},{},[4]);
</script>
</footer>
</html>
\ No newline at end of file
2024-12-30 18:59:21,562 - INFO: 执行的功能为:__init__, 功能的描述为:获取excel和所有json文件的路径以及excel工作表的名称,获取工作薄和工作表,获取所有json文件数据对应的python对象, 所在的文件路径为:D:\software\pythons\APIAutoTest_shen_2\common\read_excel.py, 所做的行为:19
2024-12-30 18:59:21,563 - INFO: 执行的功能为:__init__, 功能的描述为:获取项目下基础配置ini配置文件的路径,创建Configparser对象,读取ini文件, 所在的文件路径为:D:\software\pythons\APIAutoTest_shen_2\common\read_basic_ini.py, 所做的行为:17
2024-12-30 18:59:21,564 - INFO: 执行的功能为:__init__, 功能的描述为:获取项目下用户ini配置文件的路径,创建Configparser对象,读取ini文件, 所在的文件路径为:D:\software\pythons\APIAutoTest_shen_2\common\read_user_ini.py, 所做的行为:18
2024-12-30 18:59:21,565 - INFO: 执行的功能为:__init__, 功能的描述为:获取项目下基础配置ini配置文件的路径,创建Configparser对象,读取ini文件, 所在的文件路径为:D:\software\pythons\APIAutoTest_shen_2\common\read_basic_ini.py, 所做的行为:17
2024-12-30 18:59:21,566 - INFO: 执行的功能为:get_user_data_dir_name, 功能的描述为:根据key,获取用户存放数据的目录路径, 所在的文件路径为:D:\software\pythons\APIAutoTest_shen_2\common\read_basic_ini.py, 所做的行为:35
2024-12-30 18:59:21,567 - INFO: 执行的功能为:get_file_path, 功能的描述为:根据key,获取file节点下文件的路径, 所在的文件路径为:D:\software\pythons\APIAutoTest_shen_2\common\read_user_ini.py, 所做的行为:30
2024-12-30 18:59:21,567 - INFO: 执行的功能为:get_file_path, 功能的描述为:根据key,获取file节点下文件的路径, 所在的文件路径为:D:\software\pythons\APIAutoTest_shen_2\common\read_user_ini.py, 所做的行为:30
2024-12-30 18:59:21,567 - INFO: 执行的功能为:get_file_path, 功能的描述为:根据key,获取file节点下文件的路径, 所在的文件路径为:D:\software\pythons\APIAutoTest_shen_2\common\read_user_ini.py, 所做的行为:30
2024-12-30 18:59:21,567 - INFO: 执行的功能为:get_file_path, 功能的描述为:根据key,获取file节点下文件的路径, 所在的文件路径为:D:\software\pythons\APIAutoTest_shen_2\common\read_user_ini.py, 所做的行为:30
2024-12-30 18:59:21,567 - INFO: 执行的功能为:get_table_name, 功能的描述为:根据key,获取table节点下工作表的名称, 所在的文件路径为:D:\software\pythons\APIAutoTest_shen_2\common\read_user_ini.py, 所做的行为:35
2024-12-30 18:59:21,659 - INFO: 执行的功能为:read_json, 功能的描述为:读取json文件,将json文件的内容序列化为python对象再返回, 所在的文件路径为:D:\software\pythons\APIAutoTest_shen_2\common\read_json.py, 所做的行为:15
2024-12-30 18:59:21,660 - INFO: 执行的功能为:read_json, 功能的描述为:读取json文件,将json文件的内容序列化为python对象再返回, 所在的文件路径为:D:\software\pythons\APIAutoTest_shen_2\common\read_json.py, 所做的行为:15
2024-12-30 18:59:21,661 - INFO: 执行的功能为:read_json, 功能的描述为:读取json文件,将json文件的内容序列化为python对象再返回, 所在的文件路径为:D:\software\pythons\APIAutoTest_shen_2\common\read_json.py, 所做的行为:15
2024-12-30 18:59:21,663 - INFO: 执行的功能为:get_data, 功能的描述为:获取所有的测试数据,放在二维列表中, 所在的文件路径为:D:\software\pythons\APIAutoTest_shen_2\common\read_excel.py, 所做的行为:145
2024-12-30 18:59:21,665 - INFO: 执行的功能为:case_url, 功能的描述为:根据行,获取url, 所在的文件路径为:D:\software\pythons\APIAutoTest_shen_2\common\read_excel.py, 所做的行为:64
2024-12-30 18:59:21,666 - INFO: 执行的功能为:__get_cell_value, 功能的描述为:根据行和列获取指定单元格的数据, 所在的文件路径为:D:\software\pythons\APIAutoTest_shen_2\common\read_excel.py, 所做的行为:46
2024-12-30 18:59:21,666 - INFO: 执行的功能为:get_host, 功能的描述为:根据key,获取host节点下系统的域名, 所在的文件路径为:D:\software\pythons\APIAutoTest_shen_2\common\read_basic_ini.py, 所做的行为:25
2024-12-30 18:59:21,667 - INFO: 执行的功能为:case_mime, 功能的描述为:根据行,获取用例的媒体类型, 所在的文件路径为:D:\software\pythons\APIAutoTest_shen_2\common\read_excel.py, 所做的行为:73
2024-12-30 18:59:21,667 - INFO: 执行的功能为:__get_cell_value, 功能的描述为:根据行和列获取指定单元格的数据, 所在的文件路径为:D:\software\pythons\APIAutoTest_shen_2\common\read_excel.py, 所做的行为:46
2024-12-30 18:59:21,668 - INFO: 执行的功能为:case_req, 功能的描述为:根据行获取用例的请求方法, 所在的文件路径为:D:\software\pythons\APIAutoTest_shen_2\common\read_excel.py, 所做的行为:82
2024-12-30 18:59:21,669 - INFO: 执行的功能为:__get_cell_value, 功能的描述为:根据行和列获取指定单元格的数据, 所在的文件路径为:D:\software\pythons\APIAutoTest_shen_2\common\read_excel.py, 所做的行为:46
2024-12-30 18:59:21,669 - INFO: 执行的功能为:case_data, 功能的描述为:根据行,获取用例的数据, 所在的文件路径为:D:\software\pythons\APIAutoTest_shen_2\common\read_excel.py, 所做的行为:88
2024-12-30 18:59:21,670 - INFO: 执行的功能为:__get_cell_value, 功能的描述为:根据行和列获取指定单元格的数据, 所在的文件路径为:D:\software\pythons\APIAutoTest_shen_2\common\read_excel.py, 所做的行为:46
2024-12-30 18:59:21,670 - INFO: 执行的功能为:module_name, 功能的描述为:根据行,获取模块名称, 所在的文件路径为:D:\software\pythons\APIAutoTest_shen_2\common\read_excel.py, 所做的行为:54
2024-12-30 18:59:21,670 - INFO: 执行的功能为:__get_cell_value, 功能的描述为:根据行和列获取指定单元格的数据, 所在的文件路径为:D:\software\pythons\APIAutoTest_shen_2\common\read_excel.py, 所做的行为:46
2024-12-30 18:59:21,671 - INFO: 执行的功能为:api_name, 功能的描述为:根据行,获取接口名称, 所在的文件路径为:D:\software\pythons\APIAutoTest_shen_2\common\read_excel.py, 所做的行为:59
2024-12-30 18:59:21,671 - INFO: 执行的功能为:__get_cell_value, 功能的描述为:根据行和列获取指定单元格的数据, 所在的文件路径为:D:\software\pythons\APIAutoTest_shen_2\common\read_excel.py, 所做的行为:46
2024-12-30 18:59:21,671 - INFO: 执行的功能为:expect_data, 功能的描述为:根据行获取期望数据, 所在的文件路径为:D:\software\pythons\APIAutoTest_shen_2\common\read_excel.py, 所做的行为:102
2024-12-30 18:59:21,672 - INFO: 执行的功能为:__get_cell_value, 功能的描述为:根据行和列获取指定单元格的数据, 所在的文件路径为:D:\software\pythons\APIAutoTest_shen_2\common\read_excel.py, 所做的行为:46
2024-12-30 18:59:21,673 - INFO: 执行的功能为:module_name, 功能的描述为:根据行,获取模块名称, 所在的文件路径为:D:\software\pythons\APIAutoTest_shen_2\common\read_excel.py, 所做的行为:54
2024-12-30 18:59:21,673 - INFO: 执行的功能为:__get_cell_value, 功能的描述为:根据行和列获取指定单元格的数据, 所在的文件路径为:D:\software\pythons\APIAutoTest_shen_2\common\read_excel.py, 所做的行为:46
2024-12-30 18:59:21,673 - INFO: 执行的功能为:api_name, 功能的描述为:根据行,获取接口名称, 所在的文件路径为:D:\software\pythons\APIAutoTest_shen_2\common\read_excel.py, 所做的行为:59
2024-12-30 18:59:21,673 - INFO: 执行的功能为:__get_cell_value, 功能的描述为:根据行和列获取指定单元格的数据, 所在的文件路径为:D:\software\pythons\APIAutoTest_shen_2\common\read_excel.py, 所做的行为:46
2024-12-30 18:59:21,674 - INFO: 执行的功能为:sql_data, 功能的描述为:根据行获取sql数据, 所在的文件路径为:D:\software\pythons\APIAutoTest_shen_2\common\read_excel.py, 所做的行为:115
2024-12-30 18:59:21,674 - INFO: 执行的功能为:__get_cell_value, 功能的描述为:根据行和列获取指定单元格的数据, 所在的文件路径为:D:\software\pythons\APIAutoTest_shen_2\common\read_excel.py, 所做的行为:46
2024-12-30 18:59:21,674 - INFO: 执行的功能为:module_name, 功能的描述为:根据行,获取模块名称, 所在的文件路径为:D:\software\pythons\APIAutoTest_shen_2\common\read_excel.py, 所做的行为:54
2024-12-30 18:59:21,675 - INFO: 执行的功能为:__get_cell_value, 功能的描述为:根据行和列获取指定单元格的数据, 所在的文件路径为:D:\software\pythons\APIAutoTest_shen_2\common\read_excel.py, 所做的行为:46
2024-12-30 18:59:21,675 - INFO: 执行的功能为:api_name, 功能的描述为:根据行,获取接口名称, 所在的文件路径为:D:\software\pythons\APIAutoTest_shen_2\common\read_excel.py, 所做的行为:59
2024-12-30 18:59:21,675 - INFO: 执行的功能为:__get_cell_value, 功能的描述为:根据行和列获取指定单元格的数据, 所在的文件路径为:D:\software\pythons\APIAutoTest_shen_2\common\read_excel.py, 所做的行为:46
2024-12-30 18:59:21,675 - INFO: 执行的功能为:sql_type, 功能的描述为:根据行获取sql类型, 所在的文件路径为:D:\software\pythons\APIAutoTest_shen_2\common\read_excel.py, 所做的行为:129
2024-12-30 18:59:21,675 - INFO: 执行的功能为:__get_cell_value, 功能的描述为:根据行和列获取指定单元格的数据, 所在的文件路径为:D:\software\pythons\APIAutoTest_shen_2\common\read_excel.py, 所做的行为:46
2024-12-30 18:59:21,676 - INFO: 执行的功能为:update_key, 功能的描述为:根据行获取更新的值, 所在的文件路径为:D:\software\pythons\APIAutoTest_shen_2\common\read_excel.py, 所做的行为:139
2024-12-30 18:59:21,676 - INFO: 执行的功能为:__get_cell_value, 功能的描述为:根据行和列获取指定单元格的数据, 所在的文件路径为:D:\software\pythons\APIAutoTest_shen_2\common\read_excel.py, 所做的行为:46
2024-12-30 18:59:21,676 - INFO: 执行的功能为:case_url, 功能的描述为:根据行,获取url, 所在的文件路径为:D:\software\pythons\APIAutoTest_shen_2\common\read_excel.py, 所做的行为:64
2024-12-30 18:59:21,676 - INFO: 执行的功能为:__get_cell_value, 功能的描述为:根据行和列获取指定单元格的数据, 所在的文件路径为:D:\software\pythons\APIAutoTest_shen_2\common\read_excel.py, 所做的行为:46
2024-12-30 18:59:21,676 - INFO: 执行的功能为:get_host, 功能的描述为:根据key,获取host节点下系统的域名, 所在的文件路径为:D:\software\pythons\APIAutoTest_shen_2\common\read_basic_ini.py, 所做的行为:25
2024-12-30 18:59:21,677 - INFO: 执行的功能为:case_mime, 功能的描述为:根据行,获取用例的媒体类型, 所在的文件路径为:D:\software\pythons\APIAutoTest_shen_2\common\read_excel.py, 所做的行为:73
2024-12-30 18:59:21,677 - INFO: 执行的功能为:__get_cell_value, 功能的描述为:根据行和列获取指定单元格的数据, 所在的文件路径为:D:\software\pythons\APIAutoTest_shen_2\common\read_excel.py, 所做的行为:46
2024-12-30 18:59:21,677 - INFO: 执行的功能为:case_req, 功能的描述为:根据行获取用例的请求方法, 所在的文件路径为:D:\software\pythons\APIAutoTest_shen_2\common\read_excel.py, 所做的行为:82
2024-12-30 18:59:21,677 - INFO: 执行的功能为:__get_cell_value, 功能的描述为:根据行和列获取指定单元格的数据, 所在的文件路径为:D:\software\pythons\APIAutoTest_shen_2\common\read_excel.py, 所做的行为:46
2024-12-30 18:59:21,677 - INFO: 执行的功能为:case_data, 功能的描述为:根据行,获取用例的数据, 所在的文件路径为:D:\software\pythons\APIAutoTest_shen_2\common\read_excel.py, 所做的行为:88
2024-12-30 18:59:21,678 - INFO: 执行的功能为:__get_cell_value, 功能的描述为:根据行和列获取指定单元格的数据, 所在的文件路径为:D:\software\pythons\APIAutoTest_shen_2\common\read_excel.py, 所做的行为:46
2024-12-30 18:59:21,678 - INFO: 执行的功能为:module_name, 功能的描述为:根据行,获取模块名称, 所在的文件路径为:D:\software\pythons\APIAutoTest_shen_2\common\read_excel.py, 所做的行为:54
2024-12-30 18:59:21,679 - INFO: 执行的功能为:__get_cell_value, 功能的描述为:根据行和列获取指定单元格的数据, 所在的文件路径为:D:\software\pythons\APIAutoTest_shen_2\common\read_excel.py, 所做的行为:46
2024-12-30 18:59:21,679 - INFO: 执行的功能为:api_name, 功能的描述为:根据行,获取接口名称, 所在的文件路径为:D:\software\pythons\APIAutoTest_shen_2\common\read_excel.py, 所做的行为:59
2024-12-30 18:59:21,682 - INFO: 执行的功能为:__get_cell_value, 功能的描述为:根据行和列获取指定单元格的数据, 所在的文件路径为:D:\software\pythons\APIAutoTest_shen_2\common\read_excel.py, 所做的行为:46
2024-12-30 18:59:21,682 - INFO: 执行的功能为:expect_data, 功能的描述为:根据行获取期望数据, 所在的文件路径为:D:\software\pythons\APIAutoTest_shen_2\common\read_excel.py, 所做的行为:102
2024-12-30 18:59:21,682 - INFO: 执行的功能为:__get_cell_value, 功能的描述为:根据行和列获取指定单元格的数据, 所在的文件路径为:D:\software\pythons\APIAutoTest_shen_2\common\read_excel.py, 所做的行为:46
2024-12-30 18:59:21,683 - INFO: 执行的功能为:module_name, 功能的描述为:根据行,获取模块名称, 所在的文件路径为:D:\software\pythons\APIAutoTest_shen_2\common\read_excel.py, 所做的行为:54
2024-12-30 18:59:21,683 - INFO: 执行的功能为:__get_cell_value, 功能的描述为:根据行和列获取指定单元格的数据, 所在的文件路径为:D:\software\pythons\APIAutoTest_shen_2\common\read_excel.py, 所做的行为:46
2024-12-30 18:59:21,683 - INFO: 执行的功能为:api_name, 功能的描述为:根据行,获取接口名称, 所在的文件路径为:D:\software\pythons\APIAutoTest_shen_2\common\read_excel.py, 所做的行为:59
2024-12-30 18:59:21,683 - INFO: 执行的功能为:__get_cell_value, 功能的描述为:根据行和列获取指定单元格的数据, 所在的文件路径为:D:\software\pythons\APIAutoTest_shen_2\common\read_excel.py, 所做的行为:46
2024-12-30 18:59:21,683 - INFO: 执行的功能为:sql_data, 功能的描述为:根据行获取sql数据, 所在的文件路径为:D:\software\pythons\APIAutoTest_shen_2\common\read_excel.py, 所做的行为:115
2024-12-30 18:59:21,684 - INFO: 执行的功能为:__get_cell_value, 功能的描述为:根据行和列获取指定单元格的数据, 所在的文件路径为:D:\software\pythons\APIAutoTest_shen_2\common\read_excel.py, 所做的行为:46
2024-12-30 18:59:21,687 - INFO: 执行的功能为:sql_type, 功能的描述为:根据行获取sql类型, 所在的文件路径为:D:\software\pythons\APIAutoTest_shen_2\common\read_excel.py, 所做的行为:129
2024-12-30 18:59:21,687 - INFO: 执行的功能为:__get_cell_value, 功能的描述为:根据行和列获取指定单元格的数据, 所在的文件路径为:D:\software\pythons\APIAutoTest_shen_2\common\read_excel.py, 所做的行为:46
2024-12-30 18:59:21,688 - INFO: 执行的功能为:update_key, 功能的描述为:根据行获取更新的值, 所在的文件路径为:D:\software\pythons\APIAutoTest_shen_2\common\read_excel.py, 所做的行为:139
2024-12-30 18:59:21,688 - INFO: 执行的功能为:__get_cell_value, 功能的描述为:根据行和列获取指定单元格的数据, 所在的文件路径为:D:\software\pythons\APIAutoTest_shen_2\common\read_excel.py, 所做的行为:46
2024-12-30 18:59:21,688 - INFO: 执行的功能为:case_url, 功能的描述为:根据行,获取url, 所在的文件路径为:D:\software\pythons\APIAutoTest_shen_2\common\read_excel.py, 所做的行为:64
2024-12-30 18:59:21,689 - INFO: 执行的功能为:__get_cell_value, 功能的描述为:根据行和列获取指定单元格的数据, 所在的文件路径为:D:\software\pythons\APIAutoTest_shen_2\common\read_excel.py, 所做的行为:46
2024-12-30 18:59:21,689 - INFO: 执行的功能为:case_mime, 功能的描述为:根据行,获取用例的媒体类型, 所在的文件路径为:D:\software\pythons\APIAutoTest_shen_2\common\read_excel.py, 所做的行为:73
2024-12-30 18:59:21,689 - INFO: 执行的功能为:__get_cell_value, 功能的描述为:根据行和列获取指定单元格的数据, 所在的文件路径为:D:\software\pythons\APIAutoTest_shen_2\common\read_excel.py, 所做的行为:46
2024-12-30 18:59:21,690 - INFO: 执行的功能为:case_req, 功能的描述为:根据行获取用例的请求方法, 所在的文件路径为:D:\software\pythons\APIAutoTest_shen_2\common\read_excel.py, 所做的行为:82
2024-12-30 18:59:21,690 - INFO: 执行的功能为:__get_cell_value, 功能的描述为:根据行和列获取指定单元格的数据, 所在的文件路径为:D:\software\pythons\APIAutoTest_shen_2\common\read_excel.py, 所做的行为:46
2024-12-30 18:59:21,690 - INFO: 执行的功能为:case_data, 功能的描述为:根据行,获取用例的数据, 所在的文件路径为:D:\software\pythons\APIAutoTest_shen_2\common\read_excel.py, 所做的行为:88
2024-12-30 18:59:21,691 - INFO: 执行的功能为:__get_cell_value, 功能的描述为:根据行和列获取指定单元格的数据, 所在的文件路径为:D:\software\pythons\APIAutoTest_shen_2\common\read_excel.py, 所做的行为:46
2024-12-30 18:59:21,691 - INFO: 执行的功能为:expect_data, 功能的描述为:根据行获取期望数据, 所在的文件路径为:D:\software\pythons\APIAutoTest_shen_2\common\read_excel.py, 所做的行为:102
2024-12-30 18:59:21,691 - INFO: 执行的功能为:__get_cell_value, 功能的描述为:根据行和列获取指定单元格的数据, 所在的文件路径为:D:\software\pythons\APIAutoTest_shen_2\common\read_excel.py, 所做的行为:46
2024-12-30 18:59:21,692 - INFO: 执行的功能为:sql_data, 功能的描述为:根据行获取sql数据, 所在的文件路径为:D:\software\pythons\APIAutoTest_shen_2\common\read_excel.py, 所做的行为:115
2024-12-30 18:59:21,692 - INFO: 执行的功能为:__get_cell_value, 功能的描述为:根据行和列获取指定单元格的数据, 所在的文件路径为:D:\software\pythons\APIAutoTest_shen_2\common\read_excel.py, 所做的行为:46
2024-12-30 18:59:21,692 - INFO: 执行的功能为:sql_type, 功能的描述为:根据行获取sql类型, 所在的文件路径为:D:\software\pythons\APIAutoTest_shen_2\common\read_excel.py, 所做的行为:129
2024-12-30 18:59:21,693 - INFO: 执行的功能为:__get_cell_value, 功能的描述为:根据行和列获取指定单元格的数据, 所在的文件路径为:D:\software\pythons\APIAutoTest_shen_2\common\read_excel.py, 所做的行为:46
2024-12-30 18:59:21,694 - INFO: 执行的功能为:update_key, 功能的描述为:根据行获取更新的值, 所在的文件路径为:D:\software\pythons\APIAutoTest_shen_2\common\read_excel.py, 所做的行为:139
2024-12-30 18:59:21,694 - INFO: 执行的功能为:__get_cell_value, 功能的描述为:根据行和列获取指定单元格的数据, 所在的文件路径为:D:\software\pythons\APIAutoTest_shen_2\common\read_excel.py, 所做的行为:46
2024-12-30 18:59:21,694 - INFO: 执行的功能为:case_url, 功能的描述为:根据行,获取url, 所在的文件路径为:D:\software\pythons\APIAutoTest_shen_2\common\read_excel.py, 所做的行为:64
2024-12-30 18:59:21,695 - INFO: 执行的功能为:__get_cell_value, 功能的描述为:根据行和列获取指定单元格的数据, 所在的文件路径为:D:\software\pythons\APIAutoTest_shen_2\common\read_excel.py, 所做的行为:46
2024-12-30 18:59:21,695 - INFO: 执行的功能为:get_host, 功能的描述为:根据key,获取host节点下系统的域名, 所在的文件路径为:D:\software\pythons\APIAutoTest_shen_2\common\read_basic_ini.py, 所做的行为:25
2024-12-30 18:59:21,695 - INFO: 执行的功能为:case_mime, 功能的描述为:根据行,获取用例的媒体类型, 所在的文件路径为:D:\software\pythons\APIAutoTest_shen_2\common\read_excel.py, 所做的行为:73
2024-12-30 18:59:21,695 - INFO: 执行的功能为:__get_cell_value, 功能的描述为:根据行和列获取指定单元格的数据, 所在的文件路径为:D:\software\pythons\APIAutoTest_shen_2\common\read_excel.py, 所做的行为:46
2024-12-30 18:59:21,696 - INFO: 执行的功能为:case_req, 功能的描述为:根据行获取用例的请求方法, 所在的文件路径为:D:\software\pythons\APIAutoTest_shen_2\common\read_excel.py, 所做的行为:82
2024-12-30 18:59:21,696 - INFO: 执行的功能为:__get_cell_value, 功能的描述为:根据行和列获取指定单元格的数据, 所在的文件路径为:D:\software\pythons\APIAutoTest_shen_2\common\read_excel.py, 所做的行为:46
2024-12-30 18:59:21,696 - INFO: 执行的功能为:case_data, 功能的描述为:根据行,获取用例的数据, 所在的文件路径为:D:\software\pythons\APIAutoTest_shen_2\common\read_excel.py, 所做的行为:88
2024-12-30 18:59:21,696 - INFO: 执行的功能为:__get_cell_value, 功能的描述为:根据行和列获取指定单元格的数据, 所在的文件路径为:D:\software\pythons\APIAutoTest_shen_2\common\read_excel.py, 所做的行为:46
2024-12-30 18:59:21,696 - INFO: 执行的功能为:module_name, 功能的描述为:根据行,获取模块名称, 所在的文件路径为:D:\software\pythons\APIAutoTest_shen_2\common\read_excel.py, 所做的行为:54
2024-12-30 18:59:21,700 - INFO: 执行的功能为:__get_cell_value, 功能的描述为:根据行和列获取指定单元格的数据, 所在的文件路径为:D:\software\pythons\APIAutoTest_shen_2\common\read_excel.py, 所做的行为:46
2024-12-30 18:59:21,703 - INFO: 执行的功能为:api_name, 功能的描述为:根据行,获取接口名称, 所在的文件路径为:D:\software\pythons\APIAutoTest_shen_2\common\read_excel.py, 所做的行为:59
2024-12-30 18:59:21,703 - INFO: 执行的功能为:__get_cell_value, 功能的描述为:根据行和列获取指定单元格的数据, 所在的文件路径为:D:\software\pythons\APIAutoTest_shen_2\common\read_excel.py, 所做的行为:46
2024-12-30 18:59:21,704 - INFO: 执行的功能为:expect_data, 功能的描述为:根据行获取期望数据, 所在的文件路径为:D:\software\pythons\APIAutoTest_shen_2\common\read_excel.py, 所做的行为:102
2024-12-30 18:59:21,705 - INFO: 执行的功能为:__get_cell_value, 功能的描述为:根据行和列获取指定单元格的数据, 所在的文件路径为:D:\software\pythons\APIAutoTest_shen_2\common\read_excel.py, 所做的行为:46
2024-12-30 18:59:21,705 - INFO: 执行的功能为:module_name, 功能的描述为:根据行,获取模块名称, 所在的文件路径为:D:\software\pythons\APIAutoTest_shen_2\common\read_excel.py, 所做的行为:54
2024-12-30 18:59:21,705 - INFO: 执行的功能为:__get_cell_value, 功能的描述为:根据行和列获取指定单元格的数据, 所在的文件路径为:D:\software\pythons\APIAutoTest_shen_2\common\read_excel.py, 所做的行为:46
2024-12-30 18:59:21,705 - INFO: 执行的功能为:api_name, 功能的描述为:根据行,获取接口名称, 所在的文件路径为:D:\software\pythons\APIAutoTest_shen_2\common\read_excel.py, 所做的行为:59
2024-12-30 18:59:21,705 - INFO: 执行的功能为:__get_cell_value, 功能的描述为:根据行和列获取指定单元格的数据, 所在的文件路径为:D:\software\pythons\APIAutoTest_shen_2\common\read_excel.py, 所做的行为:46
2024-12-30 18:59:21,706 - INFO: 执行的功能为:sql_data, 功能的描述为:根据行获取sql数据, 所在的文件路径为:D:\software\pythons\APIAutoTest_shen_2\common\read_excel.py, 所做的行为:115
2024-12-30 18:59:21,706 - INFO: 执行的功能为:__get_cell_value, 功能的描述为:根据行和列获取指定单元格的数据, 所在的文件路径为:D:\software\pythons\APIAutoTest_shen_2\common\read_excel.py, 所做的行为:46
2024-12-30 18:59:21,706 - INFO: 执行的功能为:module_name, 功能的描述为:根据行,获取模块名称, 所在的文件路径为:D:\software\pythons\APIAutoTest_shen_2\common\read_excel.py, 所做的行为:54
2024-12-30 18:59:21,706 - INFO: 执行的功能为:__get_cell_value, 功能的描述为:根据行和列获取指定单元格的数据, 所在的文件路径为:D:\software\pythons\APIAutoTest_shen_2\common\read_excel.py, 所做的行为:46
2024-12-30 18:59:21,707 - INFO: 执行的功能为:api_name, 功能的描述为:根据行,获取接口名称, 所在的文件路径为:D:\software\pythons\APIAutoTest_shen_2\common\read_excel.py, 所做的行为:59
2024-12-30 18:59:21,707 - INFO: 执行的功能为:__get_cell_value, 功能的描述为:根据行和列获取指定单元格的数据, 所在的文件路径为:D:\software\pythons\APIAutoTest_shen_2\common\read_excel.py, 所做的行为:46
2024-12-30 18:59:21,707 - INFO: 执行的功能为:sql_type, 功能的描述为:根据行获取sql类型, 所在的文件路径为:D:\software\pythons\APIAutoTest_shen_2\common\read_excel.py, 所做的行为:129
2024-12-30 18:59:21,707 - INFO: 执行的功能为:__get_cell_value, 功能的描述为:根据行和列获取指定单元格的数据, 所在的文件路径为:D:\software\pythons\APIAutoTest_shen_2\common\read_excel.py, 所做的行为:46
2024-12-30 18:59:21,707 - INFO: 执行的功能为:update_key, 功能的描述为:根据行获取更新的值, 所在的文件路径为:D:\software\pythons\APIAutoTest_shen_2\common\read_excel.py, 所做的行为:139
2024-12-30 18:59:21,708 - INFO: 执行的功能为:__get_cell_value, 功能的描述为:根据行和列获取指定单元格的数据, 所在的文件路径为:D:\software\pythons\APIAutoTest_shen_2\common\read_excel.py, 所做的行为:46
2024-12-30 18:59:22,270 - INFO: 执行的功能为:__init__, 功能的描述为:管理被测系统的登录状态, 所在的文件路径为:D:\software\pythons\APIAutoTest_shen_2\requests_method\requests_method.py, 所做的行为:19
2024-12-30 18:59:22,270 - INFO: 执行的功能为:__init__, 功能的描述为:连接数据库,获取连接对象和游标对象, 所在的文件路径为:D:\software\pythons\APIAutoTest_shen_2\common\db.py, 所做的行为:17
2024-12-30 18:59:22,270 - INFO: 执行的功能为:__init__, 功能的描述为:获取项目下基础配置ini配置文件的路径,创建Configparser对象,读取ini文件, 所在的文件路径为:D:\software\pythons\APIAutoTest_shen_2\common\read_basic_ini.py, 所做的行为:17
2024-12-30 18:59:22,271 - INFO: 执行的功能为:get_database_conn_msg, 功能的描述为:根据key,获取sql节点下数据库的连接信息, 所在的文件路径为:D:\software\pythons\APIAutoTest_shen_2\common\read_basic_ini.py, 所做的行为:30
2024-12-30 18:59:22,271 - INFO: 执行的功能为:get_database_conn_msg, 功能的描述为:根据key,获取sql节点下数据库的连接信息, 所在的文件路径为:D:\software\pythons\APIAutoTest_shen_2\common\read_basic_ini.py, 所做的行为:30
2024-12-30 18:59:22,271 - INFO: 执行的功能为:get_database_conn_msg, 功能的描述为:根据key,获取sql节点下数据库的连接信息, 所在的文件路径为:D:\software\pythons\APIAutoTest_shen_2\common\read_basic_ini.py, 所做的行为:30
2024-12-30 18:59:22,271 - INFO: 执行的功能为:get_database_conn_msg, 功能的描述为:根据key,获取sql节点下数据库的连接信息, 所在的文件路径为:D:\software\pythons\APIAutoTest_shen_2\common\read_basic_ini.py, 所做的行为:30
2024-12-30 18:59:22,272 - INFO: 执行的功能为:get_database_conn_msg, 功能的描述为:根据key,获取sql节点下数据库的连接信息, 所在的文件路径为:D:\software\pythons\APIAutoTest_shen_2\common\read_basic_ini.py, 所做的行为:30
2024-12-30 18:59:22,333 - INFO: 执行的功能为:__init__, 功能的描述为:获取项目下基础配置ini配置文件的路径,创建Configparser对象,读取ini文件, 所在的文件路径为:D:\software\pythons\APIAutoTest_shen_2\common\read_basic_ini.py, 所做的行为:17
2024-12-30 18:59:22,335 - INFO: 执行的功能为:get_host, 功能的描述为:根据key,获取host节点下系统的域名, 所在的文件路径为:D:\software\pythons\APIAutoTest_shen_2\common\read_basic_ini.py, 所做的行为:25
2024-12-30 18:59:22,440 - INFO: 执行的功能为:test_bpm, 功能的描述为:None, 所在的文件路径为:D:\software\pythons\APIAutoTest_shen_2\test_case\test_user_zs\test_bpm.py, 所做的行为:21
2024-12-30 18:59:22,440 - INFO: 执行的功能为:request_all, 功能的描述为:None, 所在的文件路径为:D:\software\pythons\APIAutoTest_shen_2\requests_method\requests_method.py, 所做的行为:39
2024-12-30 18:59:22,440 - INFO: 执行的功能为:delete, 功能的描述为:执行sql的删除语句, 所在的文件路径为:D:\software\pythons\APIAutoTest_shen_2\common\db.py, 所做的行为:40
2024-12-30 18:59:22,506 - INFO: 执行的功能为:test_bpm, 功能的描述为:None, 所在的文件路径为:D:\software\pythons\APIAutoTest_shen_2\test_case\test_user_zs\test_bpm.py, 所做的行为:21
2024-12-30 18:59:22,506 - INFO: 执行的功能为:request_all, 功能的描述为:None, 所在的文件路径为:D:\software\pythons\APIAutoTest_shen_2\requests_method\requests_method.py, 所做的行为:39
2024-12-30 18:59:22,538 - INFO: 执行的功能为:test_bpm, 功能的描述为:None, 所在的文件路径为:D:\software\pythons\APIAutoTest_shen_2\test_case\test_user_zs\test_bpm.py, 所做的行为:21
2024-12-30 18:59:22,539 - INFO: 执行的功能为:request_all, 功能的描述为:None, 所在的文件路径为:D:\software\pythons\APIAutoTest_shen_2\requests_method\requests_method.py, 所做的行为:39
2024-12-30 18:59:22,539 - INFO: 执行的功能为:select, 功能的描述为:执行sql的查询语句, 所在的文件路径为:D:\software\pythons\APIAutoTest_shen_2\common\db.py, 所做的行为:47
2024-12-30 18:59:22,575 - INFO: 执行的功能为:close, 功能的描述为:关闭数据的连接, 所在的文件路径为:D:\software\pythons\APIAutoTest_shen_2\requests_method\requests_method.py, 所做的行为:34
2024-12-30 18:59:22,575 - INFO: 执行的功能为:close, 功能的描述为:关闭连接对象和游标对象, 所在的文件路径为:D:\software\pythons\APIAutoTest_shen_2\common\db.py, 所做的行为:33
# -*-coding:utf-8 -*- #
# ---------------------------------------------------------------------------
# ProjectName: ${PROJECT_NAME}
# FileName: ${FILE_NAME}
# Author: shen
# Datetime: ${DATE} ${TIME}
# Description:
#
# ---------------------------------------------------------------------------
import requests.sessions
from APIAutoTest_shen_2 import log_decorator
from APIAutoTest_shen_2.common.db import DB
from APIAutoTest_shen_2.common.read_basic_ini import ReadBasicIni
from APIAutoTest_shen_2.common.read_excel import ReadExcel
class RequestsMethod:
@log_decorator
def __init__(self):
"""管理被测系统的登录状态"""
#创建db类对象
self.db = DB()
#创建session对象
self.bpm_session =requests.sessions.Session()
#配置登录数据
login_url = ReadBasicIni().get_host("bpm") + "/auth"
login_data = {"username":"admin","password":"WuHRoZXGrg1LHOix8EVOhqGcu3CEEd0hOWNPRENTScZMb2ekrEtBGGBJweUxGKi36k346+OrS5mD3nnjyrocZOfzo4UqoshNoqJgx09u81LV2vc53Sy83DsBWKGoZZZRUhsDrpRj8feUlakJMCpgqswG0y9jm95Lk9auWpI146I="}
#获取token
token = self.bpm_session.request(method="post",url=login_url,json=login_data).json().get("token")
#将获取到的token更新到session对象的headers中
self.bpm_session.headers["Authorization"] = "Bearer "+token
@log_decorator
def close(self):
"""关闭数据的连接"""
self.db.close()
#
@log_decorator
def request_all(self,req_url,req_mime,req_method,case_data,sql_data,update_key,sql_type):
#封装一个公共的请求方法,先执行sql语句再发送请求
#执行删除sql语句
if sql_type =="delete":
self.db.delete(sql_data)
#再执行查询的sql语句
elif sql_type == "select":
select_result = self.db.select(sql_data)
#将查询结果更新到用例数据中
case_data[update_key] = select_result
#判断sql语句是否为select|delete,或者是否为delete|select
elif sql_type == "select|delete" or sql_type == "delete|select":
#执行删除语句
self.db.delete(sql_data["delete"])
#执行查询语句
select_result = self.db.select(sql_data["select"])
#将查询到的结果更新到用例中
case_data[update_key] = select_result
#发送请求
# requests传参关心的是传参的方式,不关心请求的方法
#判断媒体类型是否为query|json,json|query表示请求体使用json传参,同时也在地址栏传参
if req_mime == "query|json" or req_mime == "json|query":
#requests支持地址栏和请求体同时传参,请求体中每次只能使用一个关键字传参
return self.bpm_session.request(method=req_method,url=req_url,json=case_data["json"],params=case_data["query"])
#判断媒体类型是否为application/json或json,使用关键字json传参
elif req_mime == "application/json" or req_mime == "json":
return self.bpm_session.request(method=req_method,url=req_url,json=case_data)
#判断媒体类型是否为application/x-www-form-urlencoded或form,使用关键字data传参
elif req_mime == "application/x-www-form-urlencoded" or req_mime == "form":
return self.bpm_session.request(method=req_method,url=req_url,data=case_data)
#判断媒体类型是否为multipart/form-data或form-data,使用关键字files传参
elif req_mime == "multipart/form-data" or req_mime == "form-data":
return self.bpm_session.request(method=req_method,url=req_url,files=case_data)
elif req_mime == "query":
return self.bpm_session.request(method=req_method, url=req_url,params=case_data)
elif req_mime is None:
return self.bpm_session.request(method=req_method, url=req_url)
else:
return ValueError("媒体类型的值错误")
if __name__ == '__main__':
req = RequestsMethod()
print(req.bpm_session.headers)
# data =['http://36.139.193.99:8088/api/demension/v1/dem/addDem', 'json', 'post', {'code': 'test_dem', 'description': '测试添加的维度', 'isDefault': 1, 'name': '测试维度'}, {'message': '添加维度成功!'}, 'delete from uc_demension where CODE_="test_dem";', 'delete', None]
# res = req.request_all(req_url=data[0],req_method=data[2],req_mime=data[1],case_data=data[3],sql_type=data[-2],sql_data=data[-3],update_key=data[-1])
# print(res.text)
# res = ReadExcel("zs").get_data()
# for data in res:
# res1 = req.request_all(req_url=data[0],req_method=data[2],req_mime=data[1],case_data=data[3],sql_type=data[-2],sql_data=data[-3],update_key=data[-1])
# print(res1.json())
import pytest
from APIAutoTest_shen_2 import log_decorator
from APIAutoTest_shen_2.requests_method.requests_method import RequestsMethod
@log_decorator
#用例的自定义固件,一般设置为最高级别
@pytest.fixture(scope="session")
def req_fix1():
#创建RequestsMethod对象
req = RequestsMethod()
yield req
req.close()
# -*-coding:utf-8 -*- #
# ---------------------------------------------------------------------------
# ProjectName: ${PROJECT_NAME}
# FileName: ${FILE_NAME}
# Author: shen
# Datetime: ${DATE} ${TIME}
# Description:
#
# ---------------------------------------------------------------------------
import pytest
from APIAutoTest_shen_2 import log_decorator
from APIAutoTest_shen_2.common.read_excel import ReadExcel
#获取张三的数据
case_datas = ReadExcel("zs").get_data()
class TestBPM:
#调用装饰器,来获取日志的输出到report目录文件
@log_decorator
@pytest.mark.parametrize("url,mime,req,case,expect,sql,sql_type1,update",case_datas)
#用例函数
def test_bpm(self,req_fix1,url,mime,req,case,expect,sql,sql_type1,update):
#调用封装的公共请求方法发送请求
res = req_fix1.request_all(req_url=url,req_method=req,req_mime=mime,case_data=case,sql_type=sql_type1,sql_data=sql,update_key=update)
print([url,mime,req,case,sql,sql_type1,update,expect])
try:
#将key循环取到期望数据的值
for key in expect:
#断言,判断获取到的res中期望数据的key是否等于期望数据中的key
assert res.json().get(key) == expect[key]
except AssertionError:
#如果不等于,就抛出断言类型的错误
raise AssertionError(f"断言失败,用例数据为:{case},期望数据为:{expect}, 服务器返回的数据为:{res.text}")
except Exception as e:
raise e
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment