Commit 73206575 by djj

test python v1.0

parent 455ef05b
# -*-coding:utf-8 -*- #
# ---------------------------------------------------------------------------
# ProjectName: test59
# FileName: __init__.py
# Author: laozhao
# Datetime: 2024/3/18 16:11
# Description:
#
# ---------------------------------------------------------------------------
import functools
import logging
import os
import time
def my_log(filename):
# 创建logger对象
logger = logging.getLogger()
# 设置日志的显示级别
logger.level = logging.NOTSET
# 设置日志写入的文件
handler = logging.FileHandler(filename, mode="a", encoding="utf-8")
# 设置日志文件中日志的级别
handler.setLevel(logging.NOTSET)
# 设置日志文件中日志的格式
formatter = logging.Formatter('%(asctime)s - %(levelname)s: %(message)s')
# 将格式设置到日志文件中
handler.setFormatter(formatter)
# 将日志文件加载到logger中
logger.addHandler(handler)
return logger
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")+".log")
# log_path = os.path.join(os.path.join(os.path.join(os.path.dirname(__file__), "report"), "log"), "BPM.log")
log = my_log(log_path)
def log_decorator(func_name):
@functools.wraps(func_name)
def inner(*args, **kwargs):
try:
log.info("执行的函数或方法为:"+str(func_name.__name__)+",其功能为:"+str(func_name.__doc__))
return func_name(*args, **kwargs)
except Exception as e:
log.error(e)
raise e
return inner
\ No newline at end of file
# -*-coding:utf-8 -*- #
# ---------------------------------------------------------------------------
# ProjectName: test59
# FileName: db.py
# Author: laozhao
# Datetime: 2024/3/18 15:27
# Description:
#
# ---------------------------------------------------------------------------
import pymysql
from com.rhrc.APIAutoTest.day_05.t.InterfaceAutoTest import log_decorator
from com.rhrc.APIAutoTest.day_05.t.InterfaceAutoTest.common.read_ini import ReadIni
class DB:
@log_decorator
def __init__(self):
"""链接是数据库,获取链接对象和游标对象"""
read_ini = ReadIni()
try:
self.conn = pymysql.Connect(
host=read_ini.get_sql_connect_msg("host"),
port=int(read_ini.get_sql_connect_msg("port")),
user=read_ini.get_sql_connect_msg("user"),
password=read_ini.get_sql_connect_msg("password"),
database=read_ini.get_sql_connect_msg("database"),
charset="utf8"
)
self.cursor = self.conn.cursor()
except:
raise ConnectionError("链接数据库失败")
@log_decorator
def close(self):
self.cursor.close()
self.conn.close()
@log_decorator
def delete(self, sql_sentence):
"""使用游标对象执行删除的sql语句"""
try:
self.cursor.execute(sql_sentence)
except:
raise ValueError("sql语句错误")
else:
self.conn.commit()
@log_decorator
def select(self, sql_sentence):
"""使用游标对象执行查询的sql语句,并返回查询的结果"""
try:
self.cursor.execute(sql_sentence)
except:
raise ValueError("sql语句错误")
else:
select_result = self.cursor.fetchall()
if select_result:
return select_result[0][0]
# -*-coding:utf-8 -*- #
# ---------------------------------------------------------------------------
# ProjectName: test59
# FileName: read_excel.py
# Author: laozhao
# Datetime: 2024/3/18 15:32
# Description:
#
# ---------------------------------------------------------------------------
import openpyxl
from com.rhrc.APIAutoTest.day_05.t.InterfaceAutoTest import log_decorator, log
from com.rhrc.APIAutoTest.day_05.t.InterfaceAutoTest.common.read_ini import ReadIni
from com.rhrc.APIAutoTest.day_05.t.InterfaceAutoTest.common.read_json import read_json
class ReadExcel:
@log_decorator
def __init__(self, username, table_name, excel_path=None, case_data_path=None, expect_data_path=None,
sql_data_path=None):
"""获取所有的json文件的路径,在使用read_json读取所有的json文件,再获取excel文件路径,加载工作簿,获取工作表"""
self.read_ini = ReadIni()
# 判断table_name的值是否为None如果为None使用ini配置文件中的值,如果不为None使用传入的值
if table_name is None:
table_name = self.read_ini.get_table_name("name")
if excel_path is None and case_data_path is None and expect_data_path is None or sql_data_path is None:
case_data_path = self.read_ini.get_file_path("case", username)
expect_data_path = self.read_ini.get_file_path("expect", username)
sql_data_path = self.read_ini.get_file_path("sql", username)
excel_path = self.read_ini.get_file_path("excel", username)
self.case_data_dict = read_json(case_data_path)
self.expect_data_dict = read_json(expect_data_path)
self.sql_data_dict = read_json(sql_data_path)
try:
wb = openpyxl.load_workbook(excel_path)
self.ws = wb[table_name]
except:
raise ValueError("配置文件中的excel名称或工作表名称错误")
def __get_cell_value(self, column: str, row: int) -> str:
"""获取指定单元格数据"""
log.info("功能为:获取指定单元格数据" + "方法名称为:" + "__get_cell_value")
try:
value = self.ws[column + str(row)].value
except:
log.error("指定的行和列错误")
raise KeyError("指定的行和列错误")
else:
if value is None:
return None
elif value.strip():
return value.strip()
@log_decorator
def module_name(self, row):
"""根据行号获取模块名称"""
return self.__get_cell_value("b", row)
@log_decorator
def api_name(self, row):
"""根据行号获取接口名称"""
return self.__get_cell_value("c", row)
@log_decorator
def case_title(self, row):
"""根据行号获取用例标题"""
return self.__get_cell_value("d", row)
@log_decorator
def case_level(self, row):
"""根据行号获取用例等级"""
return self.__get_cell_value("e", row)
@log_decorator
def case_url(self, row):
"""根据行号,获取用例的url"""
host = self.read_ini.get_host("bpm_host")
path = self.__get_cell_value("f", row)
if path:
return host + path
@log_decorator
def case_req_method(self, row):
"""根据行号,获取用例的请求方法"""
return self.__get_cell_value("g", row)
@log_decorator
def case_mime(self, row):
"""根据行号,获取用例请求的媒体类型"""
value = self.__get_cell_value("h", row)
if value:
return value.lower()
@log_decorator
def case_data(self, row):
"""根据行号,获取用例数据"""
case_data_key = self.__get_cell_value("i", row)
if case_data_key:
module_name = self.module_name(row)
api_name = self.api_name(row)
try:
return self.case_data_dict[module_name][api_name][case_data_key]
except:
raise KeyError("根据用例的key获取用例数据失败,请察看用例json文件中,是否有配置")
@log_decorator
def expect_data(self, row):
"""根据行号,获取期望数据"""
expect_data_key = self.__get_cell_value("j", row)
if expect_data_key:
module_name = self.module_name(row)
api_name = self.api_name(row)
try:
return self.expect_data_dict[module_name][api_name][expect_data_key]
except:
raise KeyError("根据期望的key获取期望数据失败,请察看期望json文件中,是否有配置")
@log_decorator
def sql_data(self, row):
"""根据行号,获取sql语句"""
sql_data_key = self.__get_cell_value("l", row)
if sql_data_key:
module_name = self.module_name(row)
api_name = self.api_name(row)
try:
return self.sql_data_dict[module_name][api_name][sql_data_key]
except:
raise KeyError("根据sql语句的key获取sql语句失败,请察看sql语句json文件中,是否有配置")
@log_decorator
def sql_type(self, row):
"""根据行号,获取sql语句类型"""
value = self.__get_cell_value("k", row)
if value:
return value.lower()
@log_decorator
def update_key(self, row):
"""根据行号,获取更新的key"""
return self.__get_cell_value("m", row)
def get_data(self):
"""获取所有的测试数据,存放在一个二维列表中"""
log.info("功能:获取所有的测试数据,存放在一个二维列表中" + "方法名称为:" + "get_data")
list_data = []
for row in range(2, self.ws.max_row + 1):
# url
url = self.case_url(row)
# method
method = self.case_req_method(row)
if url and method:
# mime
mime = self.case_mime(row)
# case_data
case_data = self.case_data(row)
# expect_data
expect_data = self.expect_data(row)
# sql_type
sql_type = self.sql_type(row)
# sql_data
sql_data = self.sql_data(row)
# update_key
update_key = self.update_key(row)
# 模块名称
module_name = self.module_name(row)
# 接口名称
api_name = self.api_name(row)
# 用例标题
case_title = self.case_title(row)
# 用例等级
case_level = self.case_level(row)
list_data.append(
[module_name, api_name, case_title, case_level, url, method, mime, case_data, expect_data, sql_type,
sql_data, update_key])
else:
return list_data
if __name__ == '__main__':
excel = ReadExcel(username="basic", table_name="登录-维度管理")
print(excel.get_data())
# -*-coding:utf-8 -*- #
# ---------------------------------------------------------------------------
# ProjectName: test59
# FileName: read_ini.py
# Author: laozhao
# Datetime: 2024/3/18 15:20
# Description:
#
# ---------------------------------------------------------------------------
import configparser
import os
from com.rhrc.APIAutoTest.day_05.t.InterfaceAutoTest import log_decorator
class ReadIni:
@log_decorator
def __init__(self):
"""获取ini文件的路径,使用Configparser对象的read方法读取ini文件"""
self.data_config = os.path.join(os.path.dirname(os.path.dirname(__file__)), "data_config")
ini_path = os.path.join(self.data_config, "config.ini")
self.conf = configparser.ConfigParser()
self.conf.read(ini_path, encoding="utf-8")
@log_decorator
def get_file_path(self, key, username):
"""根据key获取file节点下文件的路径"""
try:
value = self.conf.get("file", key)
except:
raise KeyError("输入的key错误")
else:
return os.path.join(os.path.join(self.data_config, username), value)
@log_decorator
def get_table_name(self, key):
"""根据key获取table节点下key对应的工作表名称"""
try:
value = self.conf.get("table", key)
except:
raise KeyError("输入的key错误")
else:
return value
@log_decorator
def get_host(self, key):
"""根据key获取host节点下key对应的域名"""
try:
value = self.conf.get("host", key)
except:
raise KeyError("输入的key错误")
else:
return value
@log_decorator
def get_sql_connect_msg(self, key):
"""根据key获取sql节点下key对应的数据库链接信息"""
try:
value = self.conf.get("sql", key)
except:
raise KeyError("输入的key错误")
else:
return value
if __name__ == '__main__':
ini = ReadIni()
print(ini.get_file_path("excel", "张三"))
# -*-coding:utf-8 -*- #
# ---------------------------------------------------------------------------
# ProjectName: test59
# FileName: read_json.py
# Author: laozhao
# Datetime: 2024/3/18 15:26
# Description:
#
# ---------------------------------------------------------------------------
import json
import os
from com.rhrc.APIAutoTest.day_05.t.InterfaceAutoTest import log_decorator
@log_decorator
def read_json(filename: str):
if os.path.isfile(filename) and filename.endswith(".json"):
try:
with open(filename, mode="r", encoding="utf-8") as fp:
return json.loads(fp.read())
except:
raise IOError("文件内容有错误")
else:
raise FileNotFoundError("传入的文件路径错误")
{
"认证接口":{
"登录系统":{
"LoginSuccess": {"username":"admin", "password":"MTIzNDU2"},
"LoginErrorPasswordIsNone":{"username":"admin", "password":""},
"LoginErrorPasswordIsShort":{"username":"admin", "password":"s"},
"LoginErrorPasswordIsLong":{"username":"admin", "password":"MTIzNDU2MTIzNDU2MTIzNDU2MTIzNDU2MTIzNDU2MTIzNDU2MTIzNDU2MTIzNDU2MTIzNDU2MTIzNDU2MTIzNDU2MTIzNDU2MTIzNDU2MTIzNDU2MTIzNDU2MTIzNDU2MTIzNDU2MTIzNDU2"},
"LoginErrorPasswordIsSpecialChar":{"username":"admin", "password":"▣▤▥▦▩◘◈"},
"LoginErrorPasswordIsError":{"username":"admin", "password":"MTIzNDU232"},
"LoginErrorUsernameIsError":{"username":"admin123", "password":"MTIzNDU2"},
"LoginErrorUsernameIsSpecialChar":{"username":"▣▤▥▦▩◘◈", "password":"MTIzNDU2"},
"LoginErrorUsernameParamIsUser":{"user":"admin", "password":"MTIzNDU2"},
"LonginErrorUsernameIsLong":{"username":"adminadminadminadminadminadminadminadminadminadminadminadminadminadminadminadminadminadminadmin", "password":"MTIzNDU2"}
}
},
"维度管理": {
"添加维度": {
"AddDemSuccess": {"code": "abc_123_xyz","description": "abc_123_xyz","isDefault": 0,"name": "接口自动化框架"}
},
"根据维度编码获取维度信息": {
"GetDemMessageSuccess": {"code": "abc_123_xyz"}
},
"根据维度编码删除维度": {
"DeleteDemSuccess": {"ids": "不知道"}
}
},
"组织管理": {
"添加组织": {
"AddOrgSuccess": {
"code": "add_org_test",
"demId": "不知道",
"exceedLimitNum": 0,
"grade": "",
"limitNum": 0,
"name": "接口自动化框架添加的组织",
"nowNum": 0,
"orderNo": 0,
"parentId": "0"
}
},
"组织加入用户": {
"OrgAddUserSuccess": {"orgCode":"add_org_test", "accounts": "admin"}
}
}
}
{
"认证接口":{
"登录系统":{
"LoginSuccess": {"username":"超级管理员"},
"LoginErrorPasswordIsNone":{"message":"账号或密码错误"},
"LoginErrorPasswordIsShort":{"message":"账号或密码错误"},
"LoginErrorPasswordIsLong":{"message":"账号或密码错误"},
"LoginErrorPasswordIsSpecialChar":{"message":"账号或密码错误"},
"LoginErrorPasswordIsError":{"message":"账号或密码错误"},
"LoginErrorUsernameIsError":{"message":"账号或密码错误"},
"LoginErrorUsernameIsSpecialChar":{"message":"账号或密码错误"},
"LoginErrorUsernameParamIsUser":{"message":"账号或密码错误"},
"LonginErrorUsernameIsLong":{"message":"账号或密码错误"}
},
"刷新token": {
"RefreshTokenSuccess": {"message": "刷新token成功"}
}
},
"维度管理": {
"添加维度": {
"AddDemSuccess": {"message": "添加维度成功"}
},
"根据维度编码获取维度信息": {
"GetDemMessageSuccess": {"isDelete": "0"}
},
"根据维度编码删除维度": {
"DeleteDemSuccess": {"message": "删除维度成功"}
}
},
"组织管理": {
"添加组织": {
"AddOrgSuccess": {"message": "添加组织成功"}
},
"组织加入用户": {
"OrgAddUserSuccess": {"state":true,"message":"加入成功","value":""}
}
}
}
{
"维度管理": {
"添加维度": {
"AddDemSuccess": "DELETE FROM uc_demension WHERE `CODE_`=\"abc_123_xyz\";"
},
"根据维度编码删除维度": {
"DeleteDemSuccess": "select ID_ FROM uc_demension WHERE `CODE_`=\"abc_123_xyz\";"
}
},
"组织管理": {
"添加组织": {
"AddOrgSuccess": {
"delete": "DELETE FROM uc_org WHERE `CODE_`=\"add_org_test\";",
"select": "select ID_ FROM uc_demension WHERE `CODE_`=\"abc_123_xyz\";"
}
}
}
}
[节点名称]
# 注释
; 注释
键=值
[file]
# 编辑data_config目录下的文件
excel=APIAutoTest.xlsx
case=case_data.json
expect=expect_data.json
sql=sql_data.json
[table]
# excel中工作表名称
name=BPM
[host]
# 被测系统的域名
bpm_host=http://120.46.172.186:8080
[sql]
# 数据库的链接信息
host=120.46.172.186
port=3306
user=root
password=root@2023
database=eipsaas
\ No newline at end of file
每个用户的数据文件名称必须一直
每个用户的数据文件名称必须一直
在用例层中,在获取数据时,需要指定哪个用户的哪个表
@pytest.mark.parametrize("忽略的字段名...", ReadExcel(username="指定用户名", table_name="指定工作表名称").get_data())
def test_bpm(忽略的形参名名...):
\ No newline at end of file
{
{
"认证接口":{
"登录系统":{
"LoginSuccess": {"username":"admin", "password":"MTIzNDU2"},
"LoginErrorPasswordIsNone":{"username":"admin", "password":""},
"LoginErrorPasswordIsShort":{"username":"admin", "password":"s"},
"LoginErrorPasswordIsLong":{"username":"admin", "password":"MTIzNDU2MTIzNDU2MTIzNDU2MTIzNDU2MTIzNDU2MTIzNDU2MTIzNDU2MTIzNDU2MTIzNDU2MTIzNDU2MTIzNDU2MTIzNDU2MTIzNDU2MTIzNDU2MTIzNDU2MTIzNDU2MTIzNDU2MTIzNDU2"},
"LoginErrorPasswordIsSpecialChar":{"username":"admin", "password":"▣▤▥▦▩◘◈"},
"LoginErrorPasswordIsError":{"username":"admin", "password":"MTIzNDU232"},
"LoginErrorUsernameIsError":{"username":"admin123", "password":"MTIzNDU2"},
"LoginErrorUsernameIsSpecialChar":{"username":"▣▤▥▦▩◘◈", "password":"MTIzNDU2"},
"LoginErrorUsernameParamIsUser":{"user":"admin", "password":"MTIzNDU2"},
"LonginErrorUsernameIsLong":{"username":"adminadminadminadminadminadminadminadminadminadminadminadminadminadminadminadminadminadminadmin", "password":"MTIzNDU2"}
}
},
"维度管理": {
"添加维度": {
"AddDemSuccess": {"code": "abc_123_xyz","description": "abc_123_xyz","isDefault": 0,"name": "接口自动化框架"}
},
"根据维度编码获取维度信息": {
"GetDemMessageSuccess": {"code": "abc_123_xyz"}
},
"根据维度编码删除维度": {
"DeleteDemSuccess": {"ids": "不知道"}
}
},
"组织管理": {
"添加组织": {
"AddOrgSuccess": {
"code": "add_org_test",
"demId": "不知道",
"exceedLimitNum": 0,
"grade": "",
"limitNum": 0,
"name": "接口自动化框架添加的组织",
"nowNum": 0,
"orderNo": 0,
"parentId": "0"
}
},
"组织加入用户": {
"OrgAddUserSuccess": {"orgCode":"add_org_test", "accounts": "admin"}
},
"删除组织": {
"DeleteOrgSuccess": "add_org_test"
}
}
}
{
{
"认证接口":{
"登录系统":{
"LoginSuccess": {"username":"超级管理员"},
"LoginErrorPasswordIsNone":{"message":"账号或密码错误"},
"LoginErrorPasswordIsShort":{"message":"账号或密码错误"},
"LoginErrorPasswordIsLong":{"message":"账号或密码错误"},
"LoginErrorPasswordIsSpecialChar":{"message":"账号或密码错误"},
"LoginErrorPasswordIsError":{"message":"账号或密码错误"},
"LoginErrorUsernameIsError":{"message":"账号或密码错误"},
"LoginErrorUsernameIsSpecialChar":{"message":"账号或密码错误"},
"LoginErrorUsernameParamIsUser":{"message":"账号或密码错误"},
"LonginErrorUsernameIsLong":{"message":"账号或密码错误"}
},
"刷新token": {
"RefreshTokenSuccess": {"message": "刷新token成功"}
}
},
"维度管理": {
"添加维度": {
"AddDemSuccess": {"message": "添加维度成功"}
},
"根据维度编码获取维度信息": {
"GetDemMessageSuccess": {"isDelete": "0"}
},
"根据维度编码删除维度": {
"DeleteDemSuccess": {"message": "删除维度成功"}
}
},
"组织管理": {
"添加组织": {
"AddOrgSuccess": {"message": "添加组织成功"}
},
"组织加入用户": {
"OrgAddUserSuccess": {"state":true,"message":"加入成功","value":""}
},
"删除组织": {
"DeleteOrgSuccess": {"state":true,"message":"删除组织成功!","value":""}
}
}
}
{
{
"维度管理": {
"添加维度": {
"AddDemSuccess": "DELETE FROM uc_demension WHERE `CODE_`=\"abc_123_xyz\";"
},
"根据维度编码删除维度": {
"DeleteDemSuccess": "select ID_ FROM uc_demension WHERE `CODE_`=\"abc_123_xyz\";"
}
},
"组织管理": {
"添加组织": {
"AddOrgSuccess": {
"delete": "DELETE FROM uc_org WHERE `CODE_`=\"add_org_test\";",
"select": "select ID_ FROM uc_demension WHERE `CODE_`=\"abc_123_xyz\";"
}
}
}
}
{
{
"认证接口":{
"登录系统":{
"LoginSuccess": {"username":"admin", "password":"MTIzNDU2"},
"LoginErrorPasswordIsNone":{"username":"admin", "password":""},
"LoginErrorPasswordIsShort":{"username":"admin", "password":"s"},
"LoginErrorPasswordIsLong":{"username":"admin", "password":"MTIzNDU2MTIzNDU2MTIzNDU2MTIzNDU2MTIzNDU2MTIzNDU2MTIzNDU2MTIzNDU2MTIzNDU2MTIzNDU2MTIzNDU2MTIzNDU2MTIzNDU2MTIzNDU2MTIzNDU2MTIzNDU2MTIzNDU2MTIzNDU2"},
"LoginErrorPasswordIsSpecialChar":{"username":"admin", "password":"▣▤▥▦▩◘◈"},
"LoginErrorPasswordIsError":{"username":"admin", "password":"MTIzNDU232"},
"LoginErrorUsernameIsError":{"username":"admin123", "password":"MTIzNDU2"},
"LoginErrorUsernameIsSpecialChar":{"username":"▣▤▥▦▩◘◈", "password":"MTIzNDU2"},
"LoginErrorUsernameParamIsUser":{"user":"admin", "password":"MTIzNDU2"},
"LonginErrorUsernameIsLong":{"username":"adminadminadminadminadminadminadminadminadminadminadminadminadminadminadminadminadminadminadmin", "password":"MTIzNDU2"}
}
},
"维度管理": {
"添加维度": {
"AddDemSuccess": {"code": "abc_123_xyz","description": "abc_123_xyz","isDefault": 0,"name": "接口自动化框架"}
},
"根据维度编码获取维度信息": {
"GetDemMessageSuccess": {"code": "abc_123_xyz"}
},
"根据维度编码删除维度": {
"DeleteDemSuccess": {"ids": "不知道"}
}
},
"组织管理": {
"添加组织": {
"AddOrgSuccess": {
"code": "add_org_test",
"demId": "不知道",
"exceedLimitNum": 0,
"grade": "",
"limitNum": 0,
"name": "接口自动化框架添加的组织",
"nowNum": 0,
"orderNo": 0,
"parentId": "0"
}
},
"组织加入用户": {
"OrgAddUserSuccess": {"orgCode":"add_org_test", "accounts": "admin"}
},
"删除组织": {
"DeleteOrgSuccess": "add_org_test"
},
"保存组织参数": {
"SaveOrgParamSuccess": {
"query": {"orgCode": "add_org_test"},
"body": [{"alias":"ah","value":"1,2"},{"alias":"sz","value":"成都"}]
}
}
}
}
{
{
"认证接口":{
"登录系统":{
"LoginSuccess": {"username":"超级管理员"},
"LoginErrorPasswordIsNone":{"message":"账号或密码错误"},
"LoginErrorPasswordIsShort":{"message":"账号或密码错误"},
"LoginErrorPasswordIsLong":{"message":"账号或密码错误"},
"LoginErrorPasswordIsSpecialChar":{"message":"账号或密码错误"},
"LoginErrorPasswordIsError":{"message":"账号或密码错误"},
"LoginErrorUsernameIsError":{"message":"账号或密码错误"},
"LoginErrorUsernameIsSpecialChar":{"message":"账号或密码错误"},
"LoginErrorUsernameParamIsUser":{"message":"账号或密码错误"},
"LonginErrorUsernameIsLong":{"message":"账号或密码错误"}
},
"刷新token": {
"RefreshTokenSuccess": {"message": "刷新token成功"}
}
},
"维度管理": {
"添加维度": {
"AddDemSuccess": {"message": "添加维度成功"}
},
"根据维度编码获取维度信息": {
"GetDemMessageSuccess": {"isDelete": "0"}
},
"根据维度编码删除维度": {
"DeleteDemSuccess": {"message": "删除维度成功"}
}
},
"组织管理": {
"添加组织": {
"AddOrgSuccess": {"message": "添加组织成功"}
},
"组织加入用户": {
"OrgAddUserSuccess": {"state":true,"message":"加入成功","value":""}
},
"删除组织": {
"DeleteOrgSuccess": {"state":true,"message":"删除组织成功!","value":""}
},
"保存组织参数": {
"SaveOrgParamSuccess": {"state":true,"message":"保存组织参数成功!","value":""}
}
}
}
{
{
"维度管理": {
"添加维度": {
"AddDemSuccess": "DELETE FROM uc_demension WHERE `CODE_`=\"abc_123_xyz\";"
},
"根据维度编码删除维度": {
"DeleteDemSuccess": "select ID_ FROM uc_demension WHERE `CODE_`=\"abc_123_xyz\";"
}
},
"组织管理": {
"添加组织": {
"AddOrgSuccess": {
"delete": "DELETE FROM uc_org WHERE `CODE_`=\"add_org_test\";",
"select": "select ID_ FROM uc_demension WHERE `CODE_`=\"abc_123_xyz\";"
}
}
}
}
[pytest]
;开启日志
log_cli=true
;设置日志的级别,如果不设置级别的话,可以设置为NOTSET,如果要设置级别,级别可以有debug,info,warning,error,致命
log_level=NOTSET
;设置日志显示的信息格式
log_format=%(levelname)s--%(asctime)s--%(message)s
;设置日志中时间显示的格式
log_date_format=%Y-%m-%d %H:%M:%S
;每个py文件运行的时候追加的命令
;addopts=-vs
;设置日志保存的文件
;log_file=../report/log/bpm_test.log
;设置日志保存在文件中的级别
log_file_level=NOTSET
;设置日志在文件中的信息格式
log_file_format=%(levelname)s--%(asctime)s--%(message)s
;设置文件日志中时间显示的格式
log_file_date_format=%Y-%m-%d %H:%M:%S
\ No newline at end of file
{"uuid": "b82ff25c-d305-448c-9b3f-bd61fde1f58e", "befores": [{"name": "update_key", "status": "passed", "start": 1710834108426, "stop": 1710834108426}], "start": 1710834108426, "stop": 1710834108570}
\ No newline at end of file
{"uuid": "8e8f6a61-4275-4ad0-81b8-6412159b21f5", "befores": [{"name": "sql_type", "status": "passed", "start": 1710834108425, "stop": 1710834108425}], "start": 1710834108425, "stop": 1710834108571}
\ No newline at end of file
{"uuid": "b5cfe10d-b878-42fb-a9d3-4eb535f5bc5c", "befores": [{"name": "case_data", "status": "passed", "start": 1710834109993, "stop": 1710834109993}], "start": 1710834109993, "stop": 1710834110091}
\ No newline at end of file
{"uuid": "0767fc81-e6b5-4ae4-bfe4-3f602efed411", "befores": [{"name": "update_key", "status": "passed", "start": 1710834109928, "stop": 1710834109928}], "start": 1710834109928, "stop": 1710834109986}
\ No newline at end of file
{"uuid": "eef4f2b8-7784-43e7-9458-d9c0412bdc95", "befores": [{"name": "update_key", "status": "passed", "start": 1710834107556, "stop": 1710834107556}], "start": 1710834107556, "stop": 1710834107621}
\ No newline at end of file
{"uuid": "0faf0638-b1f1-489f-b95f-c2fec1cc47ce", "befores": [{"name": "url", "status": "passed", "start": 1710834108829, "stop": 1710834108829}], "start": 1710834108829, "stop": 1710834108896}
\ No newline at end of file
{"uuid": "971a1a1f-4a4f-429d-bd70-d2715febf740", "befores": [{"name": "case_data", "status": "passed", "start": 1710834106641, "stop": 1710834106641}], "start": 1710834106641, "stop": 1710834106730}
\ No newline at end of file
DEBUG  urllib3.connectionpool:connectionpool.py:549 http://120.46.172.186:8080 "GET /api/demension/v1/dem/getDem?code=abc_123_xyz HTTP/1.1" 200 None
ERROR  root:test_bpm.py:70 断言成功,请求的url为:http://120.46.172.186:8080/api/demension/v1/dem/getDem,请求的方法为:GET,请求的媒体类型为:query, 请求的用例数据:{'code': 'abc_123_xyz'}, 期望数据为:{'isDelete': '0'},服务器返回的数据为:{"createTime":"2024-03-19 15:41:49","isDelete":"0","id":"1769992657137844224","demCode":"abc_123_xyz","demName":"接口自动化框架","demDesc":"abc_123_xyz","isDefault":0,"organId":0,"code":"abc_123_xyz","name":"接口自动化框架","pkVal":"1769992657137844224"}
\ No newline at end of file
DEBUG  urllib3.connectionpool:connectionpool.py:549 http://120.46.172.186:8080 "POST /api/org/v1/org/deleteOrg HTTP/1.1" 200 None
ERROR  root:test_bpm.py:66 断言失败,请求的url为:http://120.46.172.186:8080/api/org/v1/org/deleteOrg,请求的方法为:post,请求的媒体类型为:json, 请求的用例数据:add_org_test, 期望数据为:{'state': True, 'message': '删除组织成功!', 'value': ''},服务器返回的数据为:{"state":true,"message":"部分删除成功,其中编码为【\"add_org_test\"】的组织不存在;","value":""}
\ No newline at end of file
{"uuid": "71661cc5-3eb4-46e8-bb09-295f5b77789e", "befores": [{"name": "module_name", "status": "passed", "start": 1710834105909, "stop": 1710834105909}], "start": 1710834105909, "stop": 1710834106027}
\ No newline at end of file
DEBUG  urllib3.connectionpool:connectionpool.py:292 Resetting dropped connection: 120.46.172.186
DEBUG  urllib3.connectionpool:connectionpool.py:549 http://120.46.172.186:8080 "POST /auth HTTP/1.1" 500 None
ERROR  root:test_bpm.py:70 断言成功,请求的url为:http://120.46.172.186:8080/auth,请求的方法为:POST,请求的媒体类型为:application/json, 请求的用例数据:{'username': 'admin123', 'password': 'MTIzNDU2'}, 期望数据为:{'message': '账号或密码错误'},服务器返回的数据为:{"state":false,"message":"账号或密码错误","logId":"1769992654172471296"}
\ No newline at end of file
{"uuid": "b4e22cda-87b1-47fd-b244-4bd86ab1b721", "befores": [{"name": "sql_type", "status": "passed", "start": 1710834107253, "stop": 1710834107253}], "start": 1710834107253, "stop": 1710834107312}
\ No newline at end of file
{"uuid": "3c1f694b-3b85-43e2-8f1a-fad9ef540274", "children": ["3798e783-1f3a-43fb-bd3a-d689eaaa7607", "8bc06299-d13e-4839-84be-00775376ea05", "1bd55cdd-cb3f-4af7-a3af-3967a65dfc01", "572c51f3-034d-45e8-9b0c-fdd16e9f0e02", "e483661b-fc4c-4946-9261-6d9d2b2373ea", "e3f8ebed-e8f4-4364-8aef-1736d5cdfa94", "21ee0528-bf9d-4518-868c-e21f9c3cec3a", "04a6b91c-0cff-4edb-a7f6-fa7001716245", "e326b4cb-1997-471e-bb8a-cbdacd65bb70", "caeae498-c4fa-4fa6-ba29-e08dea5cc3a8", "6558a2d3-744f-461c-9b0b-be255022b773", "d6db2fad-7697-4457-b5d4-8e383530f162", "417adfdd-b538-44b2-8377-1cf769d49602", "0fb0f010-3199-4623-a40c-df0616643ae0", "f99c65d3-3812-4b38-9f65-c8d6e02597ff", "c0441c65-2731-42a0-be0a-f9ee32244bb3"], "befores": [{"name": "req_fix", "status": "passed", "start": 1710834105680, "stop": 1710834105781}], "afters": [{"name": "req_fix::0", "status": "passed", "start": 1710834110098, "stop": 1710834110098}], "start": 1710834105680, "stop": 1710834110098}
\ No newline at end of file
DEBUG  urllib3.connectionpool:connectionpool.py:292 Resetting dropped connection: 120.46.172.186
DEBUG  urllib3.connectionpool:connectionpool.py:549 http://120.46.172.186:8080 "POST /auth HTTP/1.1" 500 None
ERROR  root:test_bpm.py:70 断言成功,请求的url为:http://120.46.172.186:8080/auth,请求的方法为:POST,请求的媒体类型为:application/json, 请求的用例数据:{'username': '▣▤▥▦▩◘◈', 'password': 'MTIzNDU2'}, 期望数据为:{'message': '账号或密码错误'},服务器返回的数据为:{"state":false,"message":"账号或密码错误","logId":"1769992654617067520"}
\ No newline at end of file
{"uuid": "1edce783-ad49-4603-82f1-543a51bb55f4", "befores": [{"name": "expect_data", "status": "passed", "start": 1710834108425, "stop": 1710834108425}], "start": 1710834108425, "stop": 1710834108571}
\ No newline at end of file
{"uuid": "fed28b0f-948d-4795-9e3d-71672f0c5708", "befores": [{"name": "sql_type", "status": "passed", "start": 1710834107089, "stop": 1710834107089}], "start": 1710834107089, "stop": 1710834107246}
\ No newline at end of file
DEBUG  urllib3.connectionpool:connectionpool.py:292 Resetting dropped connection: 120.46.172.186
DEBUG  urllib3.connectionpool:connectionpool.py:549 http://120.46.172.186:8080 "POST /auth HTTP/1.1" 500 None
ERROR  root:test_bpm.py:70 断言成功,请求的url为:http://120.46.172.186:8080/auth,请求的方法为:POST,请求的媒体类型为:application/json, 请求的用例数据:{'username': 'admin', 'password': '▣▤▥▦▩◘◈'}, 期望数据为:{'message': '账号或密码错误'},服务器返回的数据为:{"state":false,"message":"账号或密码错误","logId":"1769992652956123136"}
\ No newline at end of file
{"uuid": "08a1094a-f391-48cc-a0c1-18802cbd2af8", "befores": [{"name": "url", "status": "passed", "start": 1710834109530, "stop": 1710834109530}], "start": 1710834109530, "stop": 1710834109594}
\ No newline at end of file
{"uuid": "e8e87ab3-cee0-4faa-9c02-1973b8fe9c59", "befores": [{"name": "api_name", "status": "passed", "start": 1710834109992, "stop": 1710834109992}], "start": 1710834109992, "stop": 1710834110093}
\ No newline at end of file
{"uuid": "dc9e12d5-38a3-4a3f-95b7-bd11a370d453", "befores": [{"name": "update_key", "status": "passed", "start": 1710834107089, "stop": 1710834107089}], "start": 1710834107089, "stop": 1710834107245}
\ No newline at end of file
{"uuid": "c4e59322-6456-476b-84d6-f4445a7442ec", "befores": [{"name": "url", "status": "passed", "start": 1710834107088, "stop": 1710834107088}], "start": 1710834107088, "stop": 1710834107247}
\ No newline at end of file
DEBUG  urllib3.connectionpool:connectionpool.py:549 http://120.46.172.186:8080 "POST /api/org/v1/orgUsers/addUsersForOrg?orgCode=add_org_test&accounts=admin HTTP/1.1" 200 None
ERROR  root:test_bpm.py:70 断言成功,请求的url为:http://120.46.172.186:8080/api/org/v1/orgUsers/addUsersForOrg,请求的方法为:post,请求的媒体类型为:params, 请求的用例数据:{'orgCode': 'add_org_test', 'accounts': 'admin'}, 期望数据为:{'state': True, 'message': '加入成功', 'value': ''},服务器返回的数据为:{"state":true,"message":"加入成功","value":""}
\ No newline at end of file
{"uuid": "41c372eb-8bd4-496b-bfcf-b986e617ce7f", "befores": [{"name": "update_key", "status": "passed", "start": 1710834106140, "stop": 1710834106140}], "start": 1710834106140, "stop": 1710834106236}
\ No newline at end of file
{"uuid": "8f1a85a6-0552-41eb-bdff-acaf7e08d596", "befores": [{"name": "sql_type", "status": "passed", "start": 1710834106031, "stop": 1710834106031}], "start": 1710834106031, "stop": 1710834106131}
\ No newline at end of file
{"uuid": "a91c94df-e550-48fc-80f3-4cf8467f656a", "befores": [{"name": "update_key", "status": "passed", "start": 1710834106031, "stop": 1710834106031}], "start": 1710834106031, "stop": 1710834106129}
\ No newline at end of file
DEBUG  pytest_dependency:pytest_dependency.py:87 check dependencies of test_get_dem_msg in module scope ...
DEBUG  pytest_dependency:pytest_dependency.py:92 ... test_add_dem succeeded
DEBUG  urllib3.connectionpool:connectionpool.py:244 Starting new HTTP connection (1): 120.46.172.186:8080
DEBUG  urllib3.connectionpool:connectionpool.py:549 http://120.46.172.186:8080 "GET /api/demension/v1/dem/getDem?code=18778357549 HTTP/1.1" 200 None
\ No newline at end of file
{"uuid": "212955c1-cd76-4f69-baee-9324031761e4", "befores": [{"name": "mime", "status": "passed", "start": 1710834109928, "stop": 1710834109928}], "start": 1710834109928, "stop": 1710834109988}
\ No newline at end of file
{"uuid": "ddc1a84f-7e6d-4ee1-b082-2742271662a0", "befores": [{"name": "module_name", "status": "passed", "start": 1710834108577, "stop": 1710834108577}], "start": 1710834108577, "stop": 1710834108629}
\ No newline at end of file
{"uuid": "47db98c0-df5b-426b-9a0a-7cdda2c9b284", "befores": [{"name": "api_name", "status": "passed", "start": 1710834108972, "stop": 1710834108972}], "start": 1710834108972, "stop": 1710834109075}
\ No newline at end of file
{"uuid": "bf4ab96c-7b40-4b07-ac0c-d19daea0d90a", "befores": [{"name": "sql_data", "status": "passed", "start": 1710834107629, "stop": 1710834107629}], "start": 1710834107629, "stop": 1710834107745}
\ No newline at end of file
{"uuid": "f7729fbe-078e-4b59-a654-2a10a9239efa", "befores": [{"name": "expect_data", "status": "passed", "start": 1710834106641, "stop": 1710834106641}], "start": 1710834106641, "stop": 1710834106730}
\ No newline at end of file
{"name": "根据维度编码获取维度信息的正向用例", "status": "passed", "attachments": [{"name": "log", "source": "0ec57f19-9c1d-4617-8a04-6bfe25bdc8b1-attachment.txt", "type": "text/plain"}], "start": 1710834108015, "stop": 1710834108106, "uuid": "8381d44d-2636-41c3-a1dd-2ad3eaf36f2e", "historyId": "6457de8282ef399aec143b4cafb61250", "testCaseId": "6457de8282ef399aec143b4cafb61250", "fullName": "test_case.test_场景.test_login_addDem_getDemMsg#test_get_dem_msg", "labels": [{"name": "feature", "value": "维度管理"}, {"name": "story", "value": "根据维度编码获取维度信息"}, {"name": "severity", "value": "高"}, {"name": "epic", "value": "BPM-场景"}, {"name": "tag", "value": "dependency(depends=['test_add_dem'])"}, {"name": "parentSuite", "value": "test_case.test_场景"}, {"name": "suite", "value": "test_login_addDem_getDemMsg"}, {"name": "host", "value": "ding"}, {"name": "thread", "value": "21048-MainThread"}, {"name": "framework", "value": "pytest"}, {"name": "language", "value": "cpython3"}, {"name": "package", "value": "test_case.test_场景.test_login_addDem_getDemMsg"}]}
\ No newline at end of file
{"name": "反向用例-password正确-username参数名为user", "status": "passed", "attachments": [{"name": "log", "source": "18590920-0079-493b-928c-2f9188bc2f5e-attachment.txt", "type": "text/plain"}], "parameters": [{"name": "module_name", "value": "'认证接口'"}, {"name": "api_name", "value": "'登录系统'"}, {"name": "case_title", "value": "'反向用例-password正确-username参数名为user'"}, {"name": "case_level", "value": "'中'"}, {"name": "url", "value": "'http://120.46.172.186:8080/auth'"}, {"name": "method", "value": "'POST'"}, {"name": "mime", "value": "'application/json'"}, {"name": "case_data", "value": "{'user': 'admin', 'password': 'MTIzNDU2'}"}, {"name": "expect_data", "value": "{'message': '账号或密码错误'}"}, {"name": "sql_type", "value": "None"}, {"name": "sql_data", "value": "None"}, {"name": "update_key", "value": "None"}], "start": 1710834106642, "stop": 1710834106727, "uuid": "e326b4cb-1997-471e-bb8a-cbdacd65bb70", "historyId": "0c28b443652de3fd75b1d682ff543180", "testCaseId": "dba452b4cd07103342b046890245d967", "fullName": "test_case.test_basic.test_bpm.TestBPM#test_bpm", "labels": [{"name": "feature", "value": "认证接口"}, {"name": "story", "value": "登录系统"}, {"name": "severity", "value": "中"}, {"name": "epic", "value": "BPM项目-basic"}, {"name": "parentSuite", "value": "test_case.test_basic"}, {"name": "suite", "value": "test_bpm"}, {"name": "subSuite", "value": "TestBPM"}, {"name": "host", "value": "ding"}, {"name": "thread", "value": "21048-MainThread"}, {"name": "framework", "value": "pytest"}, {"name": "language", "value": "cpython3"}, {"name": "package", "value": "test_case.test_basic.test_bpm"}]}
\ No newline at end of file
{"uuid": "f78b3898-4de9-4892-8dc1-701c4fdbc5af", "befores": [{"name": "url", "status": "passed", "start": 1710834107321, "stop": 1710834107321}], "start": 1710834107321, "stop": 1710834107551}
\ No newline at end of file
{"uuid": "250cd41a-2733-413a-b526-4851f4654059", "befores": [{"name": "case_level", "status": "passed", "start": 1710834109601, "stop": 1710834109601}], "start": 1710834109601, "stop": 1710834109789}
\ No newline at end of file
{"uuid": "a4649242-4386-4788-8c54-679a75eccffa", "befores": [{"name": "case_level", "status": "passed", "start": 1710834109374, "stop": 1710834109374}], "start": 1710834109374, "stop": 1710834109525}
\ No newline at end of file
{"uuid": "b5784a92-682a-421b-a00a-c782599efb6e", "befores": [{"name": "update_key", "status": "passed", "start": 1710834108632, "stop": 1710834108632}], "start": 1710834108632, "stop": 1710834108821}
\ No newline at end of file
{"uuid": "7903f723-48dc-4a2e-a31a-b8c607628484", "befores": [{"name": "expect_data", "status": "passed", "start": 1710834109993, "stop": 1710834109993}], "start": 1710834109993, "stop": 1710834110091}
\ No newline at end of file
{"uuid": "c761d0f8-609b-4408-9727-ceb553d7cd47", "befores": [{"name": "update_key", "status": "passed", "start": 1710834109601, "stop": 1710834109601}], "start": 1710834109601, "stop": 1710834109786}
\ No newline at end of file
{"name": "反向用例-username正确-password为空", "status": "passed", "attachments": [{"name": "log", "source": "bb557d36-ac9c-4e89-8f4f-25a0995bbff2-attachment.txt", "type": "text/plain"}], "parameters": [{"name": "module_name", "value": "'认证接口'"}, {"name": "api_name", "value": "'登录系统'"}, {"name": "case_title", "value": "'反向用例-username正确-password为空'"}, {"name": "case_level", "value": "'中'"}, {"name": "url", "value": "'http://120.46.172.186:8080/auth'"}, {"name": "method", "value": "'POST'"}, {"name": "mime", "value": "'application/json'"}, {"name": "case_data", "value": "{'username': 'admin', 'password': ''}"}, {"name": "expect_data", "value": "{'message': '账号或密码错误'}"}, {"name": "sql_type", "value": "None"}, {"name": "sql_data", "value": "None"}, {"name": "update_key", "value": "None"}], "start": 1710834105848, "stop": 1710834105901, "uuid": "8bc06299-d13e-4839-84be-00775376ea05", "historyId": "84a645c7fde7c9d82679e72341e909ac", "testCaseId": "dba452b4cd07103342b046890245d967", "fullName": "test_case.test_basic.test_bpm.TestBPM#test_bpm", "labels": [{"name": "feature", "value": "认证接口"}, {"name": "story", "value": "登录系统"}, {"name": "severity", "value": "中"}, {"name": "epic", "value": "BPM项目-basic"}, {"name": "parentSuite", "value": "test_case.test_basic"}, {"name": "suite", "value": "test_bpm"}, {"name": "subSuite", "value": "TestBPM"}, {"name": "host", "value": "ding"}, {"name": "thread", "value": "21048-MainThread"}, {"name": "framework", "value": "pytest"}, {"name": "language", "value": "cpython3"}, {"name": "package", "value": "test_case.test_basic.test_bpm"}]}
\ No newline at end of file
{"uuid": "2cb8d1cc-8d3a-4f5d-8866-cde86c439eec", "befores": [{"name": "module_name", "status": "passed", "start": 1710834107088, "stop": 1710834107088}], "start": 1710834107088, "stop": 1710834107249}
\ No newline at end of file
{"uuid": "377102b8-551d-423e-9678-adbeabc51aad", "befores": [{"name": "api_name", "status": "passed", "start": 1710834105781, "stop": 1710834105781}], "start": 1710834105781, "stop": 1710834105844}
\ No newline at end of file
{"uuid": "96fc3722-a2f4-4f1e-a83a-15a7606e0535", "befores": [{"name": "case_title", "status": "passed", "start": 1710834109374, "stop": 1710834109374}], "start": 1710834109374, "stop": 1710834109525}
\ No newline at end of file
DEBUG  urllib3.connectionpool:connectionpool.py:549 http://120.46.172.186:8080 "POST /api/org/v1/org/deleteOrg HTTP/1.1" 200 None
ERROR  root:test_bpm.py:66 断言失败,请求的url为:http://120.46.172.186:8080/api/org/v1/org/deleteOrg,请求的方法为:post,请求的媒体类型为:json, 请求的用例数据:add_org_test, 期望数据为:{'state': True, 'message': '删除组织成功!', 'value': ''},服务器返回的数据为:{"state":true,"message":"部分删除成功,其中编码为【\"add_org_test\"】的组织不存在;","value":""}
\ No newline at end of file
{"uuid": "17980f98-3978-4a12-9cf5-f1fbe9e3e63b", "befores": [{"name": "sql_type", "status": "passed", "start": 1710834109928, "stop": 1710834109928}], "start": 1710834109928, "stop": 1710834109987}
\ No newline at end of file
{"uuid": "11c1d299-7a23-4e09-ad53-3d3e7959cee9", "befores": [{"name": "method", "status": "passed", "start": 1710834108829, "stop": 1710834108829}], "start": 1710834108829, "stop": 1710834108895}
\ No newline at end of file
DEBUG  urllib3.connectionpool:connectionpool.py:292 Resetting dropped connection: 120.46.172.186
DEBUG  urllib3.connectionpool:connectionpool.py:549 http://120.46.172.186:8080 "POST /auth HTTP/1.1" 500 None
ERROR  root:test_bpm.py:70 断言成功,请求的url为:http://120.46.172.186:8080/auth,请求的方法为:POST,请求的媒体类型为:application/json, 请求的用例数据:{'user': 'admin', 'password': 'MTIzNDU2'}, 期望数据为:{'message': '账号或密码错误'},服务器返回的数据为:{"state":false,"message":"账号或密码错误","logId":"1769992655019720704"}
\ No newline at end of file
{"uuid": "a37c4f09-b84d-426c-a5fc-f794a155704a", "befores": [{"name": "case_level", "status": "passed", "start": 1710834107628, "stop": 1710834107629}], "start": 1710834107628, "stop": 1710834107748}
\ No newline at end of file
{"uuid": "13abe21b-b570-4f5b-9abe-d9ef20783d4a", "befores": [{"name": "sql_data", "status": "passed", "start": 1710834106031, "stop": 1710834106031}], "start": 1710834106031, "stop": 1710834106130}
\ No newline at end of file
{"uuid": "5a09caf0-1d12-45a4-ae32-3cdbdf6c6dcd", "befores": [{"name": "method", "status": "passed", "start": 1710834109530, "stop": 1710834109530}], "start": 1710834109530, "stop": 1710834109593}
\ No newline at end of file
{"uuid": "7ef9ead0-a8e3-4beb-8643-3bd9781db878", "befores": [{"name": "case_data", "status": "passed", "start": 1710834109797, "stop": 1710834109797}], "start": 1710834109797, "stop": 1710834109854}
\ No newline at end of file
{"uuid": "b6268a71-1fa2-4387-aa4b-ff35650b9e55", "befores": [{"name": "sql_type", "status": "passed", "start": 1710834106334, "stop": 1710834106334}], "start": 1710834106334, "stop": 1710834106423}
\ No newline at end of file
{"uuid": "526110d0-e0f5-4502-aaaa-3dc06d304498", "befores": [{"name": "mime", "status": "passed", "start": 1710834109860, "stop": 1710834109860}], "start": 1710834109860, "stop": 1710834109922}
\ No newline at end of file
{"uuid": "9ebf825b-63b8-47d1-aeb1-016e0befed56", "befores": [{"name": "case_level", "status": "passed", "start": 1710834105847, "stop": 1710834105847}], "start": 1710834105847, "stop": 1710834105904}
\ No newline at end of file
{"uuid": "5606d486-9012-4809-8265-6da3b9fc1da2", "befores": [{"name": "mime", "status": "passed", "start": 1710834106334, "stop": 1710834106334}], "start": 1710834106334, "stop": 1710834106425}
\ No newline at end of file
{"uuid": "e8c45b5c-e060-40ce-bb28-297f36cc1453", "befores": [{"name": "url", "status": "passed", "start": 1710834107629, "stop": 1710834107629}], "start": 1710834107629, "stop": 1710834107748}
\ No newline at end of file
{"uuid": "a169ba2a-510b-4141-9004-ae0a6bd7df70", "befores": [{"name": "case_data", "status": "passed", "start": 1710834106736, "stop": 1710834106736}], "start": 1710834106736, "stop": 1710834106834}
\ No newline at end of file
{"uuid": "c528cea7-ecb1-4853-a5de-d90f1731b090", "befores": [{"name": "sql_data", "status": "passed", "start": 1710834108632, "stop": 1710834108632}], "start": 1710834108632, "stop": 1710834108822}
\ No newline at end of file
{"uuid": "cfdc4735-2db9-476d-95a6-a0a5ba59e913", "befores": [{"name": "expect_data", "status": "passed", "start": 1710834109530, "stop": 1710834109530}], "start": 1710834109530, "stop": 1710834109588}
\ No newline at end of file
{"uuid": "b4c90444-16c4-4497-a719-f0dd560e4445", "befores": [{"name": "expect_data", "status": "passed", "start": 1710834107556, "stop": 1710834107556}], "start": 1710834107556, "stop": 1710834107622}
\ No newline at end of file
{"uuid": "2c4a23fc-ff86-4dd1-b86b-1afa8d96ad2f", "befores": [{"name": "case_data", "status": "passed", "start": 1710834105781, "stop": 1710834105782}], "start": 1710834105781, "stop": 1710834105842}
\ No newline at end of file
{"uuid": "0342202f-e345-4b13-85d9-2534a1e5bfd7", "befores": [{"name": "url", "status": "passed", "start": 1710834106431, "stop": 1710834106431}], "start": 1710834106431, "stop": 1710834106529}
\ No newline at end of file
INFO  root:__init__.py:43 执行的函数或方法为:select,其功能为:使用游标对象执行查询的sql语句,并返回查询的结果
DEBUG  urllib3.connectionpool:connectionpool.py:549 http://120.46.172.186:8080 "DELETE /api/demension/v1/dem/deleteDemByIds?ids=1769992662695297024 HTTP/1.1" 200 None
ERROR  root:test_bpm.py:66 断言失败,请求的url为:http://120.46.172.186:8080/api/demension/v1/dem/deleteDemByIds,请求的方法为:DELETE,请求的媒体类型为:query, 请求的用例数据:{'ids': '1769992662695297024'}, 期望数据为:{'message': '删除维度成功'},服务器返回的数据为:{"state":false,"message":"【接口自动化框架(abc_123_xyz)】的维度下存在组织,不允许删除 ","value":""}
\ No newline at end of file
{"uuid": "cdf8b527-b98a-44d0-94ca-466b082826c6", "befores": [{"name": "case_title", "status": "passed", "start": 1710834105781, "stop": 1710834105781}], "start": 1710834105781, "stop": 1710834105844}
\ No newline at end of file
{"uuid": "3b37de4e-e187-4cf7-923e-8320b6dc9c99", "befores": [{"name": "mime", "status": "passed", "start": 1710834105781, "stop": 1710834105781}], "start": 1710834105781, "stop": 1710834105842}
\ No newline at end of file
{"uuid": "f8481641-84f9-453b-aaaf-9def499a33b3", "befores": [{"name": "api_name", "status": "passed", "start": 1710834106640, "stop": 1710834106640}], "start": 1710834106640, "stop": 1710834106733}
\ No newline at end of file
{"uuid": "b1ad8447-f590-449b-9310-5f28dec1a1e9", "befores": [{"name": "update_key", "status": "passed", "start": 1710834105847, "stop": 1710834105847}], "start": 1710834105847, "stop": 1710834105901}
\ No newline at end of file
DEBUG  urllib3.connectionpool:connectionpool.py:549 http://120.46.172.186:8080 "GET /api/demension/v1/dem/getDem?code=abc_123_xyz HTTP/1.1" 200 None
ERROR  root:test_bpm.py:70 断言成功,请求的url为:http://120.46.172.186:8080/api/demension/v1/dem/getDem,请求的方法为:GET,请求的媒体类型为:query, 请求的用例数据:{'code': 'abc_123_xyz'}, 期望数据为:{'isDelete': '0'},服务器返回的数据为:{"createTime":"2024-03-19 15:41:51","isDelete":"0","id":"1769992666658914304","demCode":"abc_123_xyz","demName":"接口自动化框架","demDesc":"abc_123_xyz","isDefault":0,"organId":0,"code":"abc_123_xyz","name":"接口自动化框架","pkVal":"1769992666658914304"}
\ No newline at end of file
{"uuid": "82f79b65-6fb5-4914-842b-9f6728781a77", "befores": [{"name": "case_title", "status": "passed", "start": 1710834108906, "stop": 1710834108906}], "start": 1710834108906, "stop": 1710834108969}
\ No newline at end of file
{"uuid": "b5dccc4b-5288-443d-91c3-76ad3af19782", "befores": [{"name": "expect_data", "status": "passed", "start": 1710834105847, "stop": 1710834105847}], "start": 1710834105847, "stop": 1710834105902}
\ No newline at end of file
{"uuid": "7c1453b7-0300-4750-9ff9-bcccbcc7ceff", "befores": [{"name": "api_name", "status": "passed", "start": 1710834109529, "stop": 1710834109529}], "start": 1710834109529, "stop": 1710834109596}
\ No newline at end of file
{"uuid": "8a96ae57-dc68-400d-b31f-3a00594590d8", "befores": [{"name": "api_name", "status": "passed", "start": 1710834107252, "stop": 1710834107252}], "start": 1710834107252, "stop": 1710834107316}
\ No newline at end of file
{"uuid": "a2311ccb-5818-4134-b707-f5fa1bcc7c24", "befores": [{"name": "case_title", "status": "passed", "start": 1710834107252, "stop": 1710834107252}], "start": 1710834107252, "stop": 1710834107316}
\ No newline at end of file
{"uuid": "cdaa3020-daca-42b8-8e5c-511576ac3b77", "befores": [{"name": "expect_data", "status": "passed", "start": 1710834106334, "stop": 1710834106334}], "start": 1710834106334, "stop": 1710834106423}
\ No newline at end of file
{"uuid": "25c271bb-0d30-4d0f-b659-d2b56ba4466d", "children": ["327f2f33-b297-4ae2-b854-47228b588905", "6da6d055-ea38-4f55-96d6-18742db585d2", "bbdd515a-7bed-4f46-a71a-a3c17c4f443b", "ea4854de-3b23-4541-8585-8df1cba05ce8", "9b75d70b-7913-4860-bba8-47ec1ab7ad59", "484feaa9-ee25-4ff3-a091-cefbde342769"], "befores": [{"name": "req_fix", "status": "passed", "start": 1710834108330, "stop": 1710834108424}], "afters": [{"name": "req_fix::0", "status": "passed", "start": 1710834110096, "stop": 1710834110096}], "start": 1710834108330, "stop": 1710834110096}
\ No newline at end of file
{"uuid": "658e1939-e57a-4801-b793-f2fa81d43274", "befores": [{"name": "case_level", "status": "passed", "start": 1710834108906, "stop": 1710834108906}], "start": 1710834108906, "stop": 1710834108968}
\ No newline at end of file
{"uuid": "99b6312b-f1c9-4815-9466-9bc4d500aa96", "befores": [{"name": "case_data", "status": "passed", "start": 1710834109375, "stop": 1710834109375}], "start": 1710834109375, "stop": 1710834109523}
\ No newline at end of file
{"uuid": "da104b68-9487-4b5a-9427-9ae87921d133", "befores": [{"name": "expect_data", "status": "passed", "start": 1710834105910, "stop": 1710834105910}], "start": 1710834105910, "stop": 1710834106019}
\ No newline at end of file
{"uuid": "b4e90328-cce6-4a25-9984-55a26086e383", "children": ["fe3166ff-6798-4876-bf9e-4983c6001921", "c2740ecf-cade-45e2-bd84-dacb179fd408", "6e488b18-dbcc-47c6-8544-f2d66b79310b", "20695645-938e-4ba9-9662-4356fc7a2a32", "023da189-ccee-4da3-b551-88002173f580", "cdd5eb68-3424-4477-b3ea-f6ecb1c87a5f", "c99dad99-7d95-4196-926a-7fd833d82b3c"], "befores": [{"name": "db_fix", "status": "passed", "start": 1710834109080, "stop": 1710834109277}], "afters": [{"name": "db_fix::0", "status": "passed", "start": 1710834110095, "stop": 1710834110095}], "start": 1710834109080, "stop": 1710834110095}
\ No newline at end of file
{"name": "添加维度场景用例的正向用例", "status": "passed", "attachments": [{"name": "log", "source": "cd6b34d1-2750-4efc-aae1-afbbf8db15f6-attachment.txt", "type": "text/plain"}], "start": 1710834107857, "stop": 1710834108010, "uuid": "3f650351-c96c-4294-9354-e577db6f017c", "historyId": "339271251d5b9f0017a531e684ad7baf", "testCaseId": "339271251d5b9f0017a531e684ad7baf", "fullName": "test_case.test_场景.test_login_addDem_getDemMsg#test_add_dem", "labels": [{"name": "feature", "value": "维度管理"}, {"name": "epic", "value": "BPM-场景"}, {"name": "story", "value": "添加维度"}, {"name": "severity", "value": "高"}, {"name": "tag", "value": "dependency(depends=['test_login'])"}, {"name": "parentSuite", "value": "test_case.test_场景"}, {"name": "suite", "value": "test_login_addDem_getDemMsg"}, {"name": "host", "value": "ding"}, {"name": "thread", "value": "21048-MainThread"}, {"name": "framework", "value": "pytest"}, {"name": "language", "value": "cpython3"}, {"name": "package", "value": "test_case.test_场景.test_login_addDem_getDemMsg"}]}
\ No newline at end of file
This source diff could not be displayed because it is too large. You can view the blob instead.
This source diff could not be displayed because it is too large. You can view the blob instead.
This source diff could not be displayed because it is too large. You can view the blob instead.
This source diff could not be displayed because it is too large. You can view the blob instead.
This source diff could not be displayed because it is too large. You can view the blob instead.
This source diff could not be displayed because it is too large. You can view the blob instead.
This source diff could not be displayed because it is too large. You can view the blob instead.
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