Commit 0cb63906 by fc

第一次脚本提交

parents
# -*-coding:utf-8 -*- #
# ---------------------------------------------------------------------------
# ProjectName: pythonProject
# FileName: __init__.py
# Author: xxxxxxx
# Datetime: 2023/8/7 10:27
# Description:
#
# ---------------------------------------------------------------------------
# -*-coding:utf-8 -*- #
# ---------------------------------------------------------------------------
# ProjectName: pythonProject
# FileName: __init__.py
# Author: xxxxxxx
# Datetime: 2023/8/7 10:27
# Description:
#
# ---------------------------------------------------------------------------
# -*-coding:utf-8 -*- #
# ---------------------------------------------------------------------------
# ProjectName: pythonProject
# FileName: request_methid.py
# Author: xxxxxxx
# Datetime: 2023/8/5 16:39
# Description:
#
# ---------------------------------------------------------------------------
import base64
import requests
from interface_bpm.data_extraction.read_ini import ReadIni
class Request:
def __init__(self):
domain_name = ReadIni().read_host("test_bpm")
login_path = domain_name + "/auth"
login_data = {"username": "admin", "password": "123456"}
login_data["password"] = base64.b64encode(login_data["password"].encode("utf-8")).decode("utf-8")
self.req = requests.sessions.Session()
result = self.req.request(method="post", url=login_path, json=login_data)
token = result.json()["token"]
self.req.headers["Authorization"] = "Bearer " + token
def all_request(self, method, url, mime, data):
if mime == "application/x-www-form-urlencoded" or mime == "x-www-form-urlencoded":
return self.req.request(method=method, url=url, data=data)
elif mime == "application/json" or mime == "json":
return self.req.request(method=method, url=url, json=data)
elif mime == "multipart/form-data" or mime == "form-data":
return self.req.request(method=method, url=url, files=data)
elif mime == "query" or mime == "params":
return self.req.request(method=method, url=url, params=data)
elif mime == "text/plain" or mime == "text":
return self.req.request(method=method, url=url, data=data)
elif mime == "application/Json|query" or mime == "json|query" or mime == "json|params":
return self.req.request(method=method, url=url, params=data["query"], json=data["body"])
elif mime is None:
return self.req.request(method=method, url=url)
else:
raise AssertionError("输入的媒体类型错误")
if __name__ == '__main__':
re = Request()
# -*-coding:utf-8 -*- #
# ---------------------------------------------------------------------------
# ProjectName: pythonProject
# FileName: db_sql.py
# Author: xxxxxxx
# Datetime: 2023/8/5 13:59
# Description:
#
# ---------------------------------------------------------------------------
"""
连接数据库的流程
一:构造方法
1.从ini文件中获取连接的信息
2.创建连接对象
3.使用连接对象创建游标对象
二:
"""
import pymysql
from interface_bpm.data_extraction.read_excel import ReadExcel
from interface_bpm.data_extraction.read_ini import ReadIni
class DB:
def __init__(self):
read_ini = ReadIni()
self.read_excel = ReadExcel()
host = read_ini.read_sql("host")
port = read_ini.read_sql("port")
user = read_ini.read_sql("user")
password = read_ini.read_sql("password")
database = read_ini.read_sql("database")
self.con = pymysql.connect(host=host, port=int(port), user=user, password=password, database=database, charset='utf8')
self.yb = self.con.cursor()
def delete_sql(self, sql_data):
self.yb.execute(sql_data)
self.con.commit()
def select_sql(self, sql_data):
self.yb.execute(sql_data)
result = self.yb.fetchall()
return result[0][0]
if __name__ == '__main__':
db = DB()
print(db.select_sql("""SELECT ID_ FROM uc_demension WHERE `CODE_`="test56_dem";"""))
# -*-coding:utf-8 -*- #
# ---------------------------------------------------------------------------
# ProjectName: pythonProject
# FileName: read_excel.py
# Author: xxxxxxx
# Datetime: 2023/8/5 9:57
# Description:
# ---------------------------------------------------------------------------
"""
读取excel文件的步骤
一:构造方法
1.获取excel文件的路径
2.获取表名
3.打开工作簿
4.打开工作表
5.获取json文件的值
二:方法
1.先对表中所有的数据提取出来进行格式处理,如果为空返回None,如果有空格取消空格
2,分别取出对应列的数据
"""
import openpyxl
from openpyxl.utils import get_column_letter
from interface_bpm.data_extraction.read_ini import ReadIni
from interface_bpm.data_extraction.read_json import read_json
class ReadExcel:
# 读取excel表中的文件,获取json文件的值
def __init__(self):
self.read_ini = ReadIni()
self.case_json_data = read_json(self.read_ini.read_file("case"))
self.expect_json_data = read_json(self.read_ini.read_file("expect"))
self.sql_json_data = read_json(self.read_ini.read_file("sql"))
excel_path = self.read_ini.read_file("excel")
excel_sheet = self.read_ini.read_sheet("sheet")
self.wb = openpyxl.load_workbook(excel_path)
self.ws = self.wb[excel_sheet]
# 获取所有的单元格数据,如果为空返回None,如果有空格取消空格
def data_process(self, column, row):
if self.ws[str(column)+str(row)].value is None:
return None
elif self.ws[str(column)+str(row)].value.strip():
return self.ws[str(column)+str(row)].value.strip()
# 根据首行的内容获取对应的列号
def get_name(self, name):
for i in range(1, self.ws.max_column+1):
if self.ws[get_column_letter(i) + str(1)].value == name:
return get_column_letter(i)
# 获取模块名称的值
def get_mokuai(self, row):
return self.data_process(self.get_name('模块名称'), row)
def get_jk(self, row):
return self.data_process(self.get_name('接口名称'), row)
# 获取用例标题
def get_title(self, row):
return self.data_process(self.get_name('标题'), row)
# 获取用例级别
def get_level(self, row):
return self.data_process(self.get_name('用例等级'), row)
def get_method(self, row):
return self.data_process(self.get_name('请求方法'), row)
def get_url(self, row):
host = self.read_ini.read_host("test_bpm")
ulr = self.data_process(self.get_name('请求路径'), row)
return host + ulr
def get_mime(self, row):
if self.data_process(self.get_name('媒体类型'), row):
return self.data_process(self.get_name('媒体类型'), row).lower()
# 获取excel表中关键字对应json文件用例数据的值
def get_case_data(self, row):
if self.data_process(self.get_name('用例数据'), row) is None:
return None
elif self.data_process(self.get_name('用例数据'), row):
mokuai_name = self.get_mokuai(row)
jk_name = self.get_jk(row)
data = self.case_json_data[mokuai_name][jk_name][self.data_process(self.get_name('用例数据'), row)]
return data
# 获取excel表中关键字对应json文件期望数据的值
def get_expect(self, row):
if self.data_process(self.get_name("期望数据"), row) is None:
return None
elif self.data_process(self.get_name("期望数据"), row):
mokuai_name = self.get_mokuai(row)
jk_name = self.get_jk(row)
expect_data = self.expect_json_data[mokuai_name][jk_name][self.data_process(self.get_name("期望数据"), row)]
return expect_data
# 获取sql语句的类型的值
def get_sql_type(self, row):
sql_type = self.data_process(self.get_name('SQL语句的类型'), row)
if sql_type:
return sql_type.lower()
# 根据excel表的值获取存放在json文件中的sql语句
def get_sql(self, row):
sql_name = self.data_process(self.get_name('SQL语句'), row)
if sql_name is None:
return None
elif sql_name.lower():
mokuai_name = self.get_mokuai(row)
jk_name = self.get_jk(row)
sql_data = self.sql_json_data[mokuai_name][jk_name][sql_name]
return sql_data
# 根据表首行对应的列号获取更新的key的值
def get_update_key(self, row):
return self.data_process(self.get_name('更新的key'), row)
# 将获取的值根据行号存放到一个二维列表中
def all_data(self):
lists_data = []
for row in range(2, self.ws.max_row+1):
mokuai_data = self.get_mokuai(row)
jk_data = self.get_jk(row)
title_data = self.get_title(row)
level_data = self.get_level(row)
method_data = self.get_method(row)
mime_data = self.get_mime(row)
url_data = self.get_url(row)
case_data = self.get_case_data(row)
expect_data = self.get_expect(row)
sql_type = self.get_sql_type(row)
sql_data = self.get_sql(row)
update_key = self.get_update_key(row)
lists_data.append([mokuai_data, jk_data, title_data, level_data, method_data, mime_data, url_data, case_data, expect_data, sql_type, sql_data, update_key])
return lists_data
if __name__ == '__main__':
read_excel = ReadExcel()
print(read_excel.all_data())
# -*-coding:utf-8 -*- #
# ---------------------------------------------------------------------------
# ProjectName: pythonProject
# FileName: read_ini.py
# Author: xxxxxxx
# Datetime: 2023/8/5 9:15
# Description:
#
# ---------------------------------------------------------------------------
"""
读取ini文件的流程
一。构造函数
1.获取ini文件的路径
2.获取存放文件的父目录
3.使用configparser创建configparser对象
4.使用对象的read方法读取ini文件
二。方法
1.使用对象的get方法获取对应节点下key对应的值
"""
import configparser
import os
class ReadIni:
def __init__(self):
# 获取存放文件的父级目录
self.data_management_path = os.path.join(os.path.dirname(os.path.dirname(__file__)), "data_management")
# 获取ini文件的目录
ini_path = os.path.join(self.data_management_path, "config.ini")
# 创建configparser的对象
self.conf = configparser.ConfigParser()
# 使用对象的read方法读取文件内容到对象中
self.conf.read(ini_path, encoding='utf-8')
# 根据key的值获取节点下对于文件的目录
def read_file(self, key):
value = self.conf.get("file", key)
return os.path.join(self.data_management_path, value)
# 根据key获取节点下host对应域名的值
def read_host(self, key):
return self.conf.get("host", key)
# 根据key获取节点下excel表的表名
def read_sheet(self, key):
return self.conf.get("sheet_name", key)
# 根据key获取节点下对应的数据库连接信息的值
def read_sql(self, key):
return self.conf.get("sql", key)
if __name__ == '__main__':
read_ini = ReadIni()
print(read_ini.read_sheet("sheet"))
\ No newline at end of file
# -*-coding:utf-8 -*- #
# ---------------------------------------------------------------------------
# ProjectName: pythonProject
# FileName: read_json.py
# Author: xxxxxxx
# Datetime: 2023/8/5 9:59
# Description:
#
# ---------------------------------------------------------------------------
import json
def read_json(name):
with open(name, mode='r', encoding='utf-8') as fp:
return json.loads(fp.read())
{
"认证接口":{
"登录系统":{
"LoginSuccess": {"password": "MTIzNDU2","username": "admin"},
"LoginFailUsernameIsNone":{"password": "MTIzNDU2","username": ""},
"LoginFailUsernameIsLong":{"password": "MTIzNDU2","username": "adminadminadminadminadminadminadminadminan"},
"LoginFailUsernameIsShort":{"password": "MTIzNDU2","username": "a"},
"LoginFailUsernameIsSpecialChar":{"password": "MTIzNDU2","username": "▬♦◊◦☼♠♣"},
"LoginFailUsernameIsError":{"password": "MTIzNDU2","username": "tomcat"},
"LoginFailPWDIsNone":{"password": "","username": "admin"},
"LoginFailPWDIsLong":{"password": "MTIzNDU2MTIzNDU2MTIzNDU2MTIzNDU2MTIzNDU2MTIzNDU2","username": "admin"},
"LoginFailPWDIsShort":{"password": "1","username": "admin"},
"LoginFailPWDIsSpecial":{"password": "▬♦◊◦☼♠♣","username": "admin"}
}
},
"维度管理": {
"添加维度": {
"AddDemSuccess": {
"code": "一个不知名维度",
"description": "无名之辈",
"isDefault": 0,
"name": "明珠"
}
},
"根据维度编码删除维度": {
"DeleteDemSuccess": {"ids": "等待查询"}
}
},
"组织管理": {
"添加组织": {
"AddOrgSuccess": {
"code": "soory",
"demId": "等待查询",
"exceedLimitNum": 0,
"grade": "",
"limitNum": 0,
"name": "一个不知名的组织名称",
"nowNum": 0,
"orderNo": 0,
"parentId": "0"
}
},
"删除组织": {
"DeleteOrgSuccess": "soory"
},
"保存组织参数": {
"SaveOrgParamSuccess": {
"query": {"orgCode": "soory"},
"body": [
{"alias":"sz","value":0},
{"alias":"zy","value":"math"},
{"alias":"rq","value":"2023-08-04"},
{"alias":"ah","value":"lq"},
{"alias":"yyyy","value":"诶嘿"},
{"alias":"xb","value":"200"}]
}
}
}
}
[file]
excel=APIAutoTest.xlsx
case=case_data.json
expect=expect_data.json
sql=sql.json
[host]
test_bpm=http://120.46.172.186:8080
[sheet_name]
sheet=BPM接口
[sql]
host=120.46.172.186
port=3306
user=root
password=root@2023
database=eipsaas
\ No newline at end of file
{
"认证接口":{
"登录系统":{
"LoginSuccess": {"username": "超级管理员","account": "admin"},
"LoginFailUsernameIsNone":{"state": false,"message": "账号或密码错误"},
"LoginFailUsernameIsLong":{"state": false,"message": "账号或密码错误"},
"LoginFailUsernameIsShort":{"state": false,"message": "账号或密码错误"},
"LoginFailUsernameIsSpecialChar":{"state": false,"message": "账号或密码错误"},
"LoginFailUsernameIsError":{"state": false,"message": "账号或密码错误"},
"LoginFailPWDIsNone":{"state": false,"message": "账号或密码错误"},
"LoginFailPWDIsLong":{"state": false,"message": "账号或密码错误"},
"LoginFailPWDIsShort":{"state": false,"message": "账号或密码错误"},
"LoginFailPWDIsSpecial":{"state": false,"message": "账号或密码错误"}},
"刷新token": {"RefreshSuccess": {"message": "刷新token成功"}
}
},
"维度管理": {
"添加维度": {
"AddDemSuccess": {"state": true, "message": "添加维度成功!"}
},
"根据维度编码删除维度": {
"DeleteDemSuccess": {"state": true, "message": "删除维度成功!"}
}
},
"组织管理": {
"添加组织": {
"AddOrgSuccess": {"state": true, "message": "添加组织成功!"}
},
"删除组织": {
"DeleteOrgSuccess": {"state": true, "message": "删除组织成功!"}
},
"保存组织参数": {
"SaveOrgParamSuccess": {"state": true, "message": "保存组织参数成功!"}
}
}
}
{
"维度管理": {
"添加维度": {
"AddDemSuccess": "DELETE FROM uc_demension WHERE `CODE_`=\"一个不知名维度\";"
},
"根据维度编码删除维度": {
"DeleteDemSuccess": "SELECT ID_ FROM uc_demension WHERE `CODE_`=\"一个不知名维度\";"
}
},
"组织管理": {
"添加组织": {
"AddOrgSuccess": {
"select": "SELECT ID_ FROM uc_demension WHERE `CODE_`=\"一个不知名维度\";",
"delete": "DELETE FROM uc_org WHERE `CODE_`=\"soory\";"
}
}
}
}
\ No newline at end of file
{"uuid": "6bb30dd8-0b02-4861-8a50-c74e5e94ee94", "befores": [{"name": "case_data", "status": "passed", "start": 1691390528228, "stop": 1691390528228}], "start": 1691390528228, "stop": 1691390528361}
\ No newline at end of file
{"uuid": "b098f755-5491-4fc5-b395-61c9d1b4d994", "befores": [{"name": "sql_data", "status": "passed", "start": 1691390530324, "stop": 1691390530324}], "start": 1691390530323, "stop": 1691390530519}
\ No newline at end of file
{"uuid": "9278b29a-d828-4425-afb2-3bfbb8e5b864", "befores": [{"name": "sql_type", "status": "passed", "start": 1691390527773, "stop": 1691390527773}], "start": 1691390527773, "stop": 1691390527836}
\ No newline at end of file
{"uuid": "763f53d8-e98b-4ef2-be71-fa700d1265fb", "befores": [{"name": "url_data", "status": "passed", "start": 1691390530661, "stop": 1691390530661}], "start": 1691390530661, "stop": 1691390530749}
\ No newline at end of file
{"uuid": "8c940c21-4124-4738-98fb-864e38aa930c", "befores": [{"name": "expect_data", "status": "passed", "start": 1691390528685, "stop": 1691390528685}], "start": 1691390528685, "stop": 1691390528814}
\ No newline at end of file
{"uuid": "a5ade9e8-6bd1-4e8c-89ef-7647f4cf0ede", "befores": [{"name": "mokuai_data", "status": "passed", "start": 1691390527857, "stop": 1691390527857}], "start": 1691390527857, "stop": 1691390527938}
\ No newline at end of file
{"uuid": "fd381b84-9221-4256-8027-cedd9e404010", "befores": [{"name": "mokuai_data", "status": "passed", "start": 1691390527947, "stop": 1691390527947}], "start": 1691390527947, "stop": 1691390528085}
\ No newline at end of file
{"uuid": "0792f47d-116b-484f-8dc5-6c10c5cb8382", "befores": [{"name": "update_key", "status": "passed", "start": 1691390527773, "stop": 1691390527773}], "start": 1691390527773, "stop": 1691390527833}
\ No newline at end of file
{"uuid": "5f677d0e-aad6-4ef5-9852-88f5d0f6c0ee", "befores": [{"name": "mokuai_data", "status": "passed", "start": 1691390530549, "stop": 1691390530549}], "start": 1691390530549, "stop": 1691390530650}
\ No newline at end of file
{"uuid": "567fac81-c33b-4a33-b8b0-f9ba08c3451c", "befores": [{"name": "level_data", "status": "passed", "start": 1691390530660, "stop": 1691390530660}], "start": 1691390530660, "stop": 1691390530764}
\ No newline at end of file
{"uuid": "3623faef-2ecb-4306-b824-7164ee37e3ec", "befores": [{"name": "expect_data", "status": "passed", "start": 1691390530322, "stop": 1691390530323}], "start": 1691390530322, "stop": 1691390530522}
\ No newline at end of file
{"uuid": "70cfad00-31fb-4b36-b737-af17c58def9d", "befores": [{"name": "case_data", "status": "passed", "start": 1691390527858, "stop": 1691390527858}], "start": 1691390527858, "stop": 1691390527926}
\ No newline at end of file
{"uuid": "85f48db7-aaac-436c-bbef-676f6896095f", "befores": [{"name": "mokuai_data", "status": "passed", "start": 1691390527771, "stop": 1691390527771}], "start": 1691390527771, "stop": 1691390527851}
\ No newline at end of file
{"uuid": "11449f3c-c885-451c-b25c-47d6b6abc0a8", "befores": [{"name": "expect_data", "status": "passed", "start": 1691390528094, "stop": 1691390528094}], "start": 1691390528093, "stop": 1691390528207}
\ No newline at end of file
{"uuid": "51635e65-7420-42bf-8107-afed88c50b5a", "befores": [{"name": "method_data", "status": "passed", "start": 1691390528853, "stop": 1691390528854}], "start": 1691390528853, "stop": 1691390528982}
\ No newline at end of file
{"uuid": "c2fb25f8-71a1-4b6c-8c74-ec5aa817e395", "befores": [{"name": "sql_type", "status": "passed", "start": 1691390529957, "stop": 1691390529957}], "start": 1691390529957, "stop": 1691390530282}
\ No newline at end of file
{"uuid": "7bc2f000-f164-47ae-b6b9-a1cd1f8dbb66", "befores": [{"name": "mokuai_data", "status": "passed", "start": 1691390528851, "stop": 1691390528852}], "start": 1691390528851, "stop": 1691390528989}
\ No newline at end of file
{"uuid": "e5e95020-9e35-4cc1-b2d6-e03e1646f5e7", "befores": [{"name": "mime_data", "status": "passed", "start": 1691390530550, "stop": 1691390530550}], "start": 1691390530550, "stop": 1691390530641}
\ No newline at end of file
{"uuid": "1f0d25c2-3076-4af8-802e-c6ad505065de", "befores": [{"name": "sql_type", "status": "passed", "start": 1691390530323, "stop": 1691390530323}], "start": 1691390530323, "stop": 1691390530521}
\ No newline at end of file
{"uuid": "eeba8112-6c7b-4113-9ed9-da2b0750bdbc", "befores": [{"name": "sql_type", "status": "passed", "start": 1691390528541, "stop": 1691390528541}], "start": 1691390528541, "stop": 1691390528656}
\ No newline at end of file
{"uuid": "10da967a-da07-4328-8e7b-0c3838bfb686", "befores": [{"name": "expect_data", "status": "passed", "start": 1691390530662, "stop": 1691390530662}], "start": 1691390530662, "stop": 1691390530746}
\ No newline at end of file
{"uuid": "a77a66c4-4369-4ebb-8a63-a27fffd1b029", "befores": [{"name": "title_data", "status": "passed", "start": 1691390527858, "stop": 1691390527858}], "start": 1691390527858, "stop": 1691390527935}
\ No newline at end of file
{"uuid": "f7d3eb03-3d76-4506-8092-e33a6daa6b9f", "children": ["911f8177-c3b4-47e5-bdc2-9b30a5961f52", "3dae06b2-a445-4bb5-95ef-f4dfe0f08444", "d51285b1-b376-41f4-898c-914fa70b6177", "5e677c7c-8f0c-4938-936a-6d0d9aca9d16", "7836758a-de65-4210-a040-bd0fdf1b1812", "373b5216-e07b-4334-8f37-40535a24d9dd", "0452a190-7e5d-49b9-b5ab-3ef9939463bc", "d7c1ef21-4c01-48fc-97b1-71c5cb2c05e3", "442296b1-3a4f-4c5b-99d8-ff6a3f816978", "12fdbada-1975-4fc9-8433-cedeb943db43", "a2019ceb-8baa-46c1-970d-a96e3a25124a", "a1319fe6-c645-44c4-bebc-7597241419a1", "29ed5c61-127a-4a73-8862-f26d2de657a5", "a9cf7aab-c515-4802-afb2-0b5419ad29e9", "dd79c2ce-1d7c-483f-9dbc-62fc3baf4b3e", "9d477f86-5798-4ac4-a1ba-43d7a61d28a4"], "befores": [{"name": "db_fix", "status": "passed", "start": 1691390527509, "stop": 1691390527771}], "afters": [{"name": "db_fix::0", "status": "passed", "start": 1691390531065, "stop": 1691390531065}], "start": 1691390527509, "stop": 1691390531065}
\ No newline at end of file
{"uuid": "9183ee0f-6846-4406-bfb9-d49832497e27", "befores": [{"name": "level_data", "status": "passed", "start": 1691390528684, "stop": 1691390528684}], "start": 1691390528684, "stop": 1691390528825}
\ No newline at end of file
{"uuid": "466771cd-3ded-495a-8f24-9f1430dde86c", "befores": [{"name": "sql_data", "status": "passed", "start": 1691390530782, "stop": 1691390530782}], "start": 1691390530782, "stop": 1691390530955}
\ No newline at end of file
{"uuid": "f8fd8122-1248-410f-9894-ee37754d5fe6", "befores": [{"name": "update_key", "status": "passed", "start": 1691390528858, "stop": 1691390528858}], "start": 1691390528858, "stop": 1691390528963}
\ No newline at end of file
{"uuid": "3f328ad1-84cb-4d6c-acad-bcc15419343b", "befores": [{"name": "sql_data", "status": "passed", "start": 1691390528229, "stop": 1691390528229}], "start": 1691390528229, "stop": 1691390528344}
\ No newline at end of file
{"uuid": "b02a64a5-0117-4ad4-8948-2a2c534bb2cd", "befores": [{"name": "update_key", "status": "passed", "start": 1691390528094, "stop": 1691390528094}], "start": 1691390528094, "stop": 1691390528201}
\ No newline at end of file
{"uuid": "25269507-006c-47fb-b902-2bd6d841bd5b", "befores": [{"name": "url_data", "status": "passed", "start": 1691390529953, "stop": 1691390529953}], "start": 1691390529953, "stop": 1691390530296}
\ No newline at end of file
{"name": "反向用例-用户名过短", "status": "passed", "attachments": [{"name": "stdout", "source": "f3f70147-2f00-44a6-8427-2b598184c0e8-attachment.txt", "type": "text/plain"}], "parameters": [{"name": "mokuai_data", "value": "'认证接口'"}, {"name": "jk_data", "value": "'登录系统'"}, {"name": "title_data", "value": "'反向用例-用户名过短'"}, {"name": "level_data", "value": "'中'"}, {"name": "method_data", "value": "'POST'"}, {"name": "mime_data", "value": "'application/json'"}, {"name": "url_data", "value": "'http://120.46.172.186:8080/auth'"}, {"name": "case_data", "value": "{'password': 'MTIzNDU2', 'username': 'a'}"}, {"name": "expect_data", "value": "{'state': False, 'message': '账号或密码错误'}"}, {"name": "sql_type", "value": "None"}, {"name": "sql_data", "value": "None"}, {"name": "update_key", "value": "None"}], "start": 1691390528095, "stop": 1691390528200, "uuid": "5e677c7c-8f0c-4938-936a-6d0d9aca9d16", "historyId": "8a91d3e89f072e293190b9beeb5ab922", "testCaseId": "2724745064c397947229ef37c57663d4", "fullName": "test_execute_request.TestBPM#test_request", "labels": [{"name": "feature", "value": "认证接口"}, {"name": "story", "value": "登录系统"}, {"name": "severity", "value": "中"}, {"name": "epic", "value": "BPM系统"}, {"name": "suite", "value": "test_execute_request"}, {"name": "subSuite", "value": "TestBPM"}, {"name": "host", "value": "DESKTOP-V67H69U"}, {"name": "thread", "value": "10596-MainThread"}, {"name": "framework", "value": "pytest"}, {"name": "language", "value": "cpython3"}, {"name": "package", "value": "test_execute_request"}]}
\ No newline at end of file
{"uuid": "ae79604a-14cc-4810-ac65-013243e55a31", "befores": [{"name": "method_data", "status": "passed", "start": 1691390529949, "stop": 1691390529949}], "start": 1691390529949, "stop": 1691390530301}
\ No newline at end of file
{"uuid": "53a08228-35f0-4ed0-98e1-36c3d00ad614", "befores": [{"name": "sql_type", "status": "passed", "start": 1691390527949, "stop": 1691390527949}], "start": 1691390527949, "stop": 1691390528066}
\ No newline at end of file
{"uuid": "bd444da6-8a71-44db-8d4b-3a3c628c43d9", "befores": [{"name": "sql_data", "status": "passed", "start": 1691390527949, "stop": 1691390527949}], "start": 1691390527949, "stop": 1691390528064}
\ No newline at end of file
{"uuid": "a5d70902-948c-4861-a3a1-4ff696841255", "befores": [{"name": "title_data", "status": "passed", "start": 1691390528538, "stop": 1691390528538}], "start": 1691390528538, "stop": 1691390528671}
\ No newline at end of file
{"uuid": "08f90f5a-2910-441b-8f6d-8b469aa79f39", "befores": [{"name": "method_data", "status": "passed", "start": 1691390528539, "stop": 1691390528539}], "start": 1691390528539, "stop": 1691390528668}
\ No newline at end of file
{"uuid": "7390e6ea-96b5-4a0e-8d2c-64441c1a2a5c", "befores": [{"name": "url_data", "status": "passed", "start": 1691390530781, "stop": 1691390530782}], "start": 1691390530781, "stop": 1691390530965}
\ No newline at end of file
{"uuid": "2ca3e30a-e639-48b4-9c42-91c17ca6751f", "befores": [{"name": "url_data", "status": "passed", "start": 1691390528389, "stop": 1691390528389}], "start": 1691390528389, "stop": 1691390528506}
\ No newline at end of file
{"name": "反向用例-密码为特殊字符", "status": "passed", "attachments": [{"name": "stdout", "source": "885da6ce-7247-437f-841c-cf588d108200-attachment.txt", "type": "text/plain"}], "parameters": [{"name": "mokuai_data", "value": "'认证接口'"}, {"name": "jk_data", "value": "'登录系统'"}, {"name": "title_data", "value": "'反向用例-密码为特殊字符'"}, {"name": "level_data", "value": "'中'"}, {"name": "method_data", "value": "'POST'"}, {"name": "mime_data", "value": "'application/json'"}, {"name": "url_data", "value": "'http://120.46.172.186:8080/auth'"}, {"name": "case_data", "value": "{'password': '▬♦◊◦☼♠♣', 'username': 'admin'}"}, {"name": "expect_data", "value": "{'state': False, 'message': '账号或密码错误'}"}, {"name": "sql_type", "value": "None"}, {"name": "sql_data", "value": "None"}, {"name": "update_key", "value": "None"}], "start": 1691390529000, "stop": 1691390529102, "uuid": "12fdbada-1975-4fc9-8433-cedeb943db43", "historyId": "01875ce9fa6faa324a9120410461830e", "testCaseId": "2724745064c397947229ef37c57663d4", "fullName": "test_execute_request.TestBPM#test_request", "labels": [{"name": "feature", "value": "认证接口"}, {"name": "story", "value": "登录系统"}, {"name": "severity", "value": "中"}, {"name": "epic", "value": "BPM系统"}, {"name": "suite", "value": "test_execute_request"}, {"name": "subSuite", "value": "TestBPM"}, {"name": "host", "value": "DESKTOP-V67H69U"}, {"name": "thread", "value": "10596-MainThread"}, {"name": "framework", "value": "pytest"}, {"name": "language", "value": "cpython3"}, {"name": "package", "value": "test_execute_request"}]}
\ No newline at end of file
{"uuid": "526608aa-b201-41b6-8209-1b379b1040c0", "befores": [{"name": "method_data", "status": "passed", "start": 1691390528093, "stop": 1691390528093}], "start": 1691390528093, "stop": 1691390528214}
\ No newline at end of file
{"uuid": "6c08ad59-7a26-4b06-a1b1-8f361bf36645", "befores": [{"name": "update_key", "status": "passed", "start": 1691390530782, "stop": 1691390530783}], "start": 1691390530782, "stop": 1691390530953}
\ No newline at end of file
{"uuid": "bddee92e-8378-4e80-8e55-1e6583c4e31a", "befores": [{"name": "title_data", "status": "passed", "start": 1691390528092, "stop": 1691390528092}], "start": 1691390528092, "stop": 1691390528217}
\ No newline at end of file
{"uuid": "83069535-682f-44d5-b51b-eb56b24bb74f", "befores": [{"name": "sql_type", "status": "passed", "start": 1691390528685, "stop": 1691390528685}], "start": 1691390528685, "stop": 1691390528806}
\ No newline at end of file
{"uuid": "9e4d869d-7a0e-497f-9add-eb26c03ea41a", "befores": [{"name": "mime_data", "status": "passed", "start": 1691390529949, "stop": 1691390529951}], "start": 1691390529949, "stop": 1691390530299}
\ No newline at end of file
{"uuid": "7da25d11-1ab8-4aa4-8eeb-a2ac7f414694", "befores": [{"name": "method_data", "status": "passed", "start": 1691390530660, "stop": 1691390530660}], "start": 1691390530660, "stop": 1691390530753}
\ No newline at end of file
{"uuid": "b4fa5ed8-2a36-4df2-8d7e-3f01261370f5", "befores": [{"name": "title_data", "status": "passed", "start": 1691390527772, "stop": 1691390527772}], "start": 1691390527772, "stop": 1691390527847}
\ No newline at end of file
{"uuid": "a3f8796b-160d-4ffa-a9c4-16eef4b1ffb3", "befores": [{"name": "mime_data", "status": "passed", "start": 1691390527948, "stop": 1691390527948}], "start": 1691390527948, "stop": 1691390528075}
\ No newline at end of file
{"name": "反向用例-用户名错误", "status": "passed", "attachments": [{"name": "stdout", "source": "f0cc0099-e1a5-4e74-b216-3309bbcd2e45-attachment.txt", "type": "text/plain"}], "parameters": [{"name": "mokuai_data", "value": "'认证接口'"}, {"name": "jk_data", "value": "'登录系统'"}, {"name": "title_data", "value": "'反向用例-用户名错误'"}, {"name": "level_data", "value": "'中'"}, {"name": "method_data", "value": "'POST'"}, {"name": "mime_data", "value": "'json'"}, {"name": "url_data", "value": "'http://120.46.172.186:8080/auth'"}, {"name": "case_data", "value": "{'password': 'MTIzNDU2', 'username': 'tomcat'}"}, {"name": "expect_data", "value": "{'state': False, 'message': '账号或密码错误'}"}, {"name": "sql_type", "value": "None"}, {"name": "sql_data", "value": "None"}, {"name": "update_key", "value": "None"}], "start": 1691390528391, "stop": 1691390528489, "uuid": "373b5216-e07b-4334-8f37-40535a24d9dd", "historyId": "789598d719a4f2a830bc89f74dfdebd2", "testCaseId": "2724745064c397947229ef37c57663d4", "fullName": "test_execute_request.TestBPM#test_request", "labels": [{"name": "feature", "value": "认证接口"}, {"name": "story", "value": "登录系统"}, {"name": "severity", "value": "中"}, {"name": "epic", "value": "BPM系统"}, {"name": "suite", "value": "test_execute_request"}, {"name": "subSuite", "value": "TestBPM"}, {"name": "host", "value": "DESKTOP-V67H69U"}, {"name": "thread", "value": "10596-MainThread"}, {"name": "framework", "value": "pytest"}, {"name": "language", "value": "cpython3"}, {"name": "package", "value": "test_execute_request"}]}
\ No newline at end of file
{"uuid": "96d06d91-7128-4aec-89db-c1590bae70b5", "befores": [{"name": "expect_data", "status": "passed", "start": 1691390527949, "stop": 1691390527949}], "start": 1691390527949, "stop": 1691390528069}
\ No newline at end of file
{"uuid": "2ab02212-e775-4aa8-a829-27f2dc3129ea", "befores": [{"name": "level_data", "status": "passed", "start": 1691390529144, "stop": 1691390529144}], "start": 1691390529144, "stop": 1691390529754}
\ No newline at end of file
{"uuid": "56eae683-8392-4adb-b4b4-454126481092", "befores": [{"name": "update_key", "status": "passed", "start": 1691390528541, "stop": 1691390528541}], "start": 1691390528541, "stop": 1691390528653}
\ No newline at end of file
{"name": "正向用例", "status": "failed", "statusDetails": {"message": "AssertionError: 断言失败", "trace": "self = <interface_接口优化2.test_case.test_execute_request.TestBPM object at 0x0000020D226A0F50>\nreq_fix = <interface_接口优化2.comprehensive_request.request_method.Request object at 0x0000020D223CD490>\ndb_fix = <interface_接口优化2.data_extraction.db_sql.DB object at 0x0000020D226B8ED0>, mokuai_data = '组织管理', jk_data = '删除组织', title_data = '正向用例'\nlevel_data = '高', method_data = 'post', mime_data = 'text/plain', url_data = 'http://120.46.172.186:8080/api/org/v1/org/deleteOrg', case_data = '一个不知名组织'\nexpect_data = {'message': '删除组织成功!', 'state': True}, sql_type = None, sql_data = None, update_key = None\n\n @pytest.mark.parametrize(\"mokuai_data, jk_data, title_data, level_data, method_data, mime_data, url_data, \"\n \"case_data, expect_data, sql_type,\"\" sql_data, update_key\", ReadExcel().all_data())\n def test_request(self, req_fix, db_fix, mokuai_data, jk_data, title_data, level_data, method_data, mime_data,\n url_data, case_data, expect_data, sql_type, sql_data, update_key):\n allure.dynamic.feature(mokuai_data)\n allure.dynamic.story(jk_data)\n allure.dynamic.title(title_data)\n allure.dynamic.severity(level_data)\n if sql_type is None:\n result = req_fix.all_request(method=method_data, url=url_data, mime=mime_data, data=case_data)\n \n elif sql_type == \"delete\":\n db_fix.delete_sql(sql_data)\n result = req_fix.all_request(method=method_data, url=url_data, mime=mime_data, data=case_data)\n \n elif sql_type == \"select\":\n re = db_fix.select_sql(sql_data)\n case_data[update_key] = re\n result = req_fix.all_request(method=method_data, url=url_data, mime=mime_data, data=case_data)\n \n elif sql_type == \"delete|select\" or sql_type == \"select|delete\":\n db_fix.delete_sql(sql_data[\"delete\"])\n \n re = db_fix.select_sql(sql_data[\"select\"])\n case_data[update_key] = re\n result = req_fix.all_request(method=method_data, url=url_data, mime=mime_data, data=case_data)\n \n else:\n result = req_fix.request_all(method=method_data, url=url_data, mime=mime_data, case_data=case_data)\n \n try:\n for key in expect_data:\n> assert expect_data[key] == result.json().get(key)\nE AssertionError: assert '删除组织成功!' == '部分删除成功,其中编码为【一个�】的组织不存在;'\nE - 部分删除成功,其中编码为【一个�】的组织不存在;\nE + 删除组织成功!\n\ntest_execute_request.py:59: AssertionError\n\nDuring handling of the above exception, another exception occurred:\n\nself = <interface_接口优化2.test_case.test_execute_request.TestBPM object at 0x0000020D226A0F50>\nreq_fix = <interface_接口优化2.comprehensive_request.request_method.Request object at 0x0000020D223CD490>\ndb_fix = <interface_接口优化2.data_extraction.db_sql.DB object at 0x0000020D226B8ED0>, mokuai_data = '组织管理', jk_data = '删除组织', title_data = '正向用例'\nlevel_data = '高', method_data = 'post', mime_data = 'text/plain', url_data = 'http://120.46.172.186:8080/api/org/v1/org/deleteOrg', case_data = '一个不知名组织'\nexpect_data = {'message': '删除组织成功!', 'state': True}, sql_type = None, sql_data = None, update_key = None\n\n @pytest.mark.parametrize(\"mokuai_data, jk_data, title_data, level_data, method_data, mime_data, url_data, \"\n \"case_data, expect_data, sql_type,\"\" sql_data, update_key\", ReadExcel().all_data())\n def test_request(self, req_fix, db_fix, mokuai_data, jk_data, title_data, level_data, method_data, mime_data,\n url_data, case_data, expect_data, sql_type, sql_data, update_key):\n allure.dynamic.feature(mokuai_data)\n allure.dynamic.story(jk_data)\n allure.dynamic.title(title_data)\n allure.dynamic.severity(level_data)\n if sql_type is None:\n result = req_fix.all_request(method=method_data, url=url_data, mime=mime_data, data=case_data)\n \n elif sql_type == \"delete\":\n db_fix.delete_sql(sql_data)\n result = req_fix.all_request(method=method_data, url=url_data, mime=mime_data, data=case_data)\n \n elif sql_type == \"select\":\n re = db_fix.select_sql(sql_data)\n case_data[update_key] = re\n result = req_fix.all_request(method=method_data, url=url_data, mime=mime_data, data=case_data)\n \n elif sql_type == \"delete|select\" or sql_type == \"select|delete\":\n db_fix.delete_sql(sql_data[\"delete\"])\n \n re = db_fix.select_sql(sql_data[\"select\"])\n case_data[update_key] = re\n result = req_fix.all_request(method=method_data, url=url_data, mime=mime_data, data=case_data)\n \n else:\n result = req_fix.request_all(method=method_data, url=url_data, mime=mime_data, case_data=case_data)\n \n try:\n for key in expect_data:\n assert expect_data[key] == result.json().get(key)\n \n except:\n> raise AssertionError(\"断言失败\")\nE AssertionError: 断言失败\n\ntest_execute_request.py:62: AssertionError"}, "parameters": [{"name": "mokuai_data", "value": "'组织管理'"}, {"name": "jk_data", "value": "'删除组织'"}, {"name": "title_data", "value": "'正向用例'"}, {"name": "level_data", "value": "'高'"}, {"name": "method_data", "value": "'post'"}, {"name": "mime_data", "value": "'text/plain'"}, {"name": "url_data", "value": "'http://120.46.172.186:8080/api/org/v1/org/deleteOrg'"}, {"name": "case_data", "value": "'一个不知名组织'"}, {"name": "expect_data", "value": "{'state': True, 'message': '删除组织成功!'}"}, {"name": "sql_type", "value": "None"}, {"name": "sql_data", "value": "None"}, {"name": "update_key", "value": "None"}], "start": 1691390530663, "stop": 1691390530720, "uuid": "dd79c2ce-1d7c-483f-9dbc-62fc3baf4b3e", "historyId": "043add4c0ead732d83128a2969e5c30e", "testCaseId": "2724745064c397947229ef37c57663d4", "fullName": "test_execute_request.TestBPM#test_request", "labels": [{"name": "feature", "value": "组织管理"}, {"name": "story", "value": "删除组织"}, {"name": "severity", "value": "高"}, {"name": "epic", "value": "BPM系统"}, {"name": "suite", "value": "test_execute_request"}, {"name": "subSuite", "value": "TestBPM"}, {"name": "host", "value": "DESKTOP-V67H69U"}, {"name": "thread", "value": "10596-MainThread"}, {"name": "framework", "value": "pytest"}, {"name": "language", "value": "cpython3"}, {"name": "package", "value": "test_execute_request"}]}
\ No newline at end of file
{"uuid": "97a89ade-f84a-48c6-a764-0c1de6d5cca3", "befores": [{"name": "level_data", "status": "passed", "start": 1691390527772, "stop": 1691390527772}], "start": 1691390527772, "stop": 1691390527845}
\ No newline at end of file
{"uuid": "43cb815d-c451-4135-8029-e18436a0ae3c", "befores": [{"name": "update_key", "status": "passed", "start": 1691390529958, "stop": 1691390529958}], "start": 1691390529958, "stop": 1691390530157}
\ No newline at end of file
{"uuid": "e3d6e178-fc50-4224-9061-181790a9f065", "befores": [{"name": "url_data", "status": "passed", "start": 1691390530322, "stop": 1691390530322}], "start": 1691390530322, "stop": 1691390530527}
\ No newline at end of file
{"uuid": "8555c7d8-a598-4732-a253-e5c6031dfef3", "befores": [{"name": "mokuai_data", "status": "passed", "start": 1691390529948, "stop": 1691390529948}], "start": 1691390529948, "stop": 1691390530311}
\ No newline at end of file
{"uuid": "02305485-44e9-415e-8396-fd1be34bb411", "befores": [{"name": "mokuai_data", "status": "passed", "start": 1691390528091, "stop": 1691390528091}], "start": 1691390528091, "stop": 1691390528221}
\ No newline at end of file
{"uuid": "9687846d-cac1-4539-a230-d94fc3a43999", "befores": [{"name": "title_data", "status": "passed", "start": 1691390528852, "stop": 1691390528852}], "start": 1691390528852, "stop": 1691390528986}
\ No newline at end of file
{"uuid": "a897bdce-e329-4451-a510-420b51dcf3fb", "befores": [{"name": "level_data", "status": "passed", "start": 1691390530321, "stop": 1691390530322}], "start": 1691390530321, "stop": 1691390530534}
\ No newline at end of file
{"uuid": "f0504956-b619-407b-a2a3-2ad4781d64d1", "befores": [{"name": "mokuai_data", "status": "passed", "start": 1691390528683, "stop": 1691390528683}], "start": 1691390528683, "stop": 1691390528834}
\ No newline at end of file
{"uuid": "6d8dfb30-b14f-4314-8022-c9e08e25f7d7", "befores": [{"name": "level_data", "status": "passed", "start": 1691390530550, "stop": 1691390530550}], "start": 1691390530550, "stop": 1691390530644}
\ No newline at end of file
{"name": "反向用例-用户名特殊字符", "status": "passed", "attachments": [{"name": "stdout", "source": "5bf9f97c-65c5-411b-938e-499c240a58c8-attachment.txt", "type": "text/plain"}], "parameters": [{"name": "mokuai_data", "value": "'认证接口'"}, {"name": "jk_data", "value": "'登录系统'"}, {"name": "title_data", "value": "'反向用例-用户名特殊字符'"}, {"name": "level_data", "value": "'中'"}, {"name": "method_data", "value": "'POST'"}, {"name": "mime_data", "value": "'application/json'"}, {"name": "url_data", "value": "'http://120.46.172.186:8080/auth'"}, {"name": "case_data", "value": "{'password': 'MTIzNDU2', 'username': '▬♦◊◦☼♠♣'}"}, {"name": "expect_data", "value": "{'state': False, 'message': '账号或密码错误'}"}, {"name": "sql_type", "value": "None"}, {"name": "sql_data", "value": "None"}, {"name": "update_key", "value": "None"}], "start": 1691390528230, "stop": 1691390528337, "uuid": "7836758a-de65-4210-a040-bd0fdf1b1812", "historyId": "6e5b2a8a3613a74eb4d65966ca603993", "testCaseId": "2724745064c397947229ef37c57663d4", "fullName": "test_execute_request.TestBPM#test_request", "labels": [{"name": "feature", "value": "认证接口"}, {"name": "story", "value": "登录系统"}, {"name": "severity", "value": "中"}, {"name": "epic", "value": "BPM系统"}, {"name": "suite", "value": "test_execute_request"}, {"name": "subSuite", "value": "TestBPM"}, {"name": "host", "value": "DESKTOP-V67H69U"}, {"name": "thread", "value": "10596-MainThread"}, {"name": "framework", "value": "pytest"}, {"name": "language", "value": "cpython3"}, {"name": "package", "value": "test_execute_request"}]}
\ No newline at end of file
{"uuid": "278e2391-5bc1-4ee8-9645-e05fa697b096", "befores": [{"name": "title_data", "status": "passed", "start": 1691390528999, "stop": 1691390528999}], "start": 1691390528999, "stop": 1691390529132}
\ No newline at end of file
{"uuid": "f4f3d2e4-6d52-4029-bfcb-e8c23f75e17b", "befores": [{"name": "mime_data", "status": "passed", "start": 1691390527773, "stop": 1691390527773}], "start": 1691390527772, "stop": 1691390527843}
\ No newline at end of file
{"uuid": "4447d25e-91e7-437e-9930-03291c73549f", "befores": [{"name": "level_data", "status": "passed", "start": 1691390527948, "stop": 1691390527948}], "start": 1691390527948, "stop": 1691390528079}
\ No newline at end of file
{"uuid": "3efc6add-24ca-4551-be85-395504959355", "befores": [{"name": "url_data", "status": "passed", "start": 1691390528540, "stop": 1691390528540}], "start": 1691390528540, "stop": 1691390528664}
\ No newline at end of file
{"name": "反向用例-密码为空", "status": "passed", "attachments": [{"name": "stdout", "source": "bfa4e7b2-8f9c-4bac-9acf-efc1e0b07584-attachment.txt", "type": "text/plain"}], "parameters": [{"name": "mokuai_data", "value": "'认证接口'"}, {"name": "jk_data", "value": "'登录系统'"}, {"name": "title_data", "value": "'反向用例-密码为空'"}, {"name": "level_data", "value": "'中'"}, {"name": "method_data", "value": "'POST'"}, {"name": "mime_data", "value": "'application/json'"}, {"name": "url_data", "value": "'http://120.46.172.186:8080/auth'"}, {"name": "case_data", "value": "{'password': '', 'username': 'admin'}"}, {"name": "expect_data", "value": "{'state': False, 'message': '账号或密码错误'}"}, {"name": "sql_type", "value": "None"}, {"name": "sql_data", "value": "None"}, {"name": "update_key", "value": "None"}], "start": 1691390528546, "stop": 1691390528652, "uuid": "0452a190-7e5d-49b9-b5ab-3ef9939463bc", "historyId": "d11183f9894fad60aca444763af058ad", "testCaseId": "2724745064c397947229ef37c57663d4", "fullName": "test_execute_request.TestBPM#test_request", "labels": [{"name": "feature", "value": "认证接口"}, {"name": "story", "value": "登录系统"}, {"name": "severity", "value": "中"}, {"name": "epic", "value": "BPM系统"}, {"name": "suite", "value": "test_execute_request"}, {"name": "subSuite", "value": "TestBPM"}, {"name": "host", "value": "DESKTOP-V67H69U"}, {"name": "thread", "value": "10596-MainThread"}, {"name": "framework", "value": "pytest"}, {"name": "language", "value": "cpython3"}, {"name": "package", "value": "test_execute_request"}]}
\ No newline at end of file
{"uuid": "d1c0cae4-4e2c-4a08-be63-8752c01e4b91", "befores": [{"name": "case_data", "status": "passed", "start": 1691390530782, "stop": 1691390530782}], "start": 1691390530782, "stop": 1691390530963}
\ No newline at end of file
{"uuid": "6d9a3f9b-9173-4732-b90f-f6b86a9c2881", "befores": [{"name": "update_key", "status": "passed", "start": 1691390529000, "stop": 1691390529000}], "start": 1691390529000, "stop": 1691390529104}
\ No newline at end of file
{"uuid": "adb5da7e-2c80-4f55-865d-91d904fd8e5c", "befores": [{"name": "case_data", "status": "passed", "start": 1691390528389, "stop": 1691390528389}], "start": 1691390528389, "stop": 1691390528503}
\ No newline at end of file
{"uuid": "1eeef762-9978-411a-872f-f166d908db9f", "befores": [{"name": "mime_data", "status": "passed", "start": 1691390529144, "stop": 1691390529144}], "start": 1691390529144, "stop": 1691390529737}
\ No newline at end of file
{"uuid": "293ae078-e523-42f4-83d6-03ce2e03f17d", "befores": [{"name": "jk_data", "status": "passed", "start": 1691390528683, "stop": 1691390528684}], "start": 1691390528683, "stop": 1691390528832}
\ No newline at end of file
{"uuid": "436e3af0-bd20-4758-b84c-efe0e71b72e8", "befores": [{"name": "jk_data", "status": "passed", "start": 1691390528228, "stop": 1691390528228}], "start": 1691390528228, "stop": 1691390528381}
\ No newline at end of file
{"uuid": "4ea8b8de-47ec-4076-a8e8-46fed400e8c7", "befores": [{"name": "expect_data", "status": "passed", "start": 1691390530782, "stop": 1691390530782}], "start": 1691390530782, "stop": 1691390530960}
\ No newline at end of file
{"uuid": "2c9e328d-da2b-4c88-8ca4-aace69337a67", "befores": [{"name": "level_data", "status": "passed", "start": 1691390527858, "stop": 1691390527858}], "start": 1691390527858, "stop": 1691390527934}
\ No newline at end of file
{"uuid": "73251648-5aba-4423-8612-c0cc56806419", "befores": [{"name": "update_key", "status": "passed", "start": 1691390530324, "stop": 1691390530324}], "start": 1691390530324, "stop": 1691390530517}
\ No newline at end of file
{"uuid": "7403bb58-db30-4f8a-885b-2edf61bc1bc9", "befores": [{"name": "mime_data", "status": "passed", "start": 1691390528999, "stop": 1691390528999}], "start": 1691390528999, "stop": 1691390529127}
\ No newline at end of file
{"uuid": "92ee94bb-6b4d-4fb8-b53f-5a4d2dac5787", "befores": [{"name": "jk_data", "status": "passed", "start": 1691390530781, "stop": 1691390530781}], "start": 1691390530781, "stop": 1691390530980}
\ No newline at end of file
{"uuid": "201439e5-b013-4ea9-9a5c-49db530152f4", "befores": [{"name": "method_data", "status": "passed", "start": 1691390528999, "stop": 1691390528999}], "start": 1691390528999, "stop": 1691390529129}
\ No newline at end of file
{"uuid": "6481d2c2-46f5-4aee-839d-260e2fbdb4cb", "befores": [{"name": "sql_type", "status": "passed", "start": 1691390530782, "stop": 1691390530782}], "start": 1691390530782, "stop": 1691390530958}
\ No newline at end of file
{"uuid": "1f4e053e-34a9-4f66-83b7-bba928bb6e3f", "befores": [{"name": "title_data", "status": "passed", "start": 1691390529144, "stop": 1691390529144}], "start": 1691390529144, "stop": 1691390529786}
\ No newline at end of file
{"uuid": "4f9e0571-5ecf-4b10-87b5-8b7adcd754cb", "befores": [{"name": "jk_data", "status": "passed", "start": 1691390527772, "stop": 1691390527772}], "start": 1691390527772, "stop": 1691390527849}
\ No newline at end of file
{"uuid": "310e87ba-3b8b-4692-8ff2-8c64d8e46b84", "befores": [{"name": "mime_data", "status": "passed", "start": 1691390530781, "stop": 1691390530781}], "start": 1691390530781, "stop": 1691390530966}
\ No newline at end of file
{"uuid": "2222d3c4-76a2-4b6f-a76c-f5174cb73328", "befores": [{"name": "title_data", "status": "passed", "start": 1691390530321, "stop": 1691390530321}], "start": 1691390530321, "stop": 1691390530536}
\ No newline at end of file
{"uuid": "e46a06d1-6aa9-464d-8523-b619d97824ce", "befores": [{"name": "method_data", "status": "passed", "start": 1691390530322, "stop": 1691390530322}], "start": 1691390530322, "stop": 1691390530532}
\ No newline at end of file
{"uuid": "39382017-47cd-4fd4-8b91-f9f72cb991b1", "befores": [{"name": "mime_data", "status": "passed", "start": 1691390528389, "stop": 1691390528389}], "start": 1691390528389, "stop": 1691390528511}
\ No newline at end of file
{"uuid": "aff5427b-a04d-428b-b627-5913de414db1", "befores": [{"name": "mokuai_data", "status": "passed", "start": 1691390528228, "stop": 1691390528228}], "start": 1691390528228, "stop": 1691390528382}
\ No newline at end of file
{"uuid": "2f742e41-0d81-41e5-8d2f-e15ce3372552", "befores": [{"name": "level_data", "status": "passed", "start": 1691390528999, "stop": 1691390528999}], "start": 1691390528999, "stop": 1691390529131}
\ No newline at end of file
{"uuid": "2991a36e-9823-4942-be01-98d6895c72e8", "befores": [{"name": "sql_data", "status": "passed", "start": 1691390529958, "stop": 1691390529958}], "start": 1691390529957, "stop": 1691390530175}
\ No newline at end of file
{"uuid": "ecf388f7-0ac8-4f29-951f-8b4f8902c7be", "befores": [{"name": "level_data", "status": "passed", "start": 1691390529949, "stop": 1691390529949}], "start": 1691390529949, "stop": 1691390530302}
\ No newline at end of file
{"uuid": "7ae469d4-89fd-430c-a646-47daaddbca04", "befores": [{"name": "expect_data", "status": "passed", "start": 1691390528229, "stop": 1691390528229}], "start": 1691390528229, "stop": 1691390528354}
\ No newline at end of file
{"uuid": "ffde6c37-7bee-4d4e-a385-fdc06b2f1e59", "befores": [{"name": "url_data", "status": "passed", "start": 1691390530550, "stop": 1691390530550}], "start": 1691390530550, "stop": 1691390530639}
\ No newline at end of file
{"uuid": "ef9f2b7c-e5b4-4e93-b664-b0cd81cbecc9", "befores": [{"name": "expect_data", "status": "passed", "start": 1691390528540, "stop": 1691390528540}], "start": 1691390528540, "stop": 1691390528658}
\ No newline at end of file
{"uuid": "45f66aa8-7c86-4050-a2a4-58f5142fe1e6", "befores": [{"name": "case_data", "status": "passed", "start": 1691390530662, "stop": 1691390530662}], "start": 1691390530661, "stop": 1691390530747}
\ No newline at end of file
{"uuid": "2ba37e5a-370b-4956-8071-bbdabb24a3d5", "befores": [{"name": "sql_type", "status": "passed", "start": 1691390530551, "stop": 1691390530551}], "start": 1691390530551, "stop": 1691390530633}
\ No newline at end of file
{"uuid": "72f7b68b-c52d-4506-816c-a039f076a0a7", "befores": [{"name": "mime_data", "status": "passed", "start": 1691390527858, "stop": 1691390527858}], "start": 1691390527858, "stop": 1691390527930}
\ No newline at end of file
{"uuid": "22ae9799-d52f-4ea0-b518-2bc16471833f", "befores": [{"name": "jk_data", "status": "passed", "start": 1691390529948, "stop": 1691390529949}], "start": 1691390529948, "stop": 1691390530306}
\ No newline at end of file
{"uuid": "dd1e5a4b-c5b4-49c3-9639-a466f332e060", "befores": [{"name": "case_data", "status": "passed", "start": 1691390527948, "stop": 1691390527948}], "start": 1691390527948, "stop": 1691390528072}
\ No newline at end of file
{"uuid": "f577c9bf-f0b5-4c43-8808-1bd45e145907", "befores": [{"name": "mime_data", "status": "passed", "start": 1691390528093, "stop": 1691390528093}], "start": 1691390528093, "stop": 1691390528213}
\ No newline at end of file
{"uuid": "d1be4f5b-c9a8-44fb-93fe-904afb769532", "befores": [{"name": "expect_data", "status": "passed", "start": 1691390528999, "stop": 1691390529000}], "start": 1691390528999, "stop": 1691390529118}
\ No newline at end of file
{"uuid": "7c97c485-5f1b-4d73-8f11-7953d2a0a761", "befores": [{"name": "sql_type", "status": "passed", "start": 1691390528857, "stop": 1691390528857}], "start": 1691390528857, "stop": 1691390528971}
\ No newline at end of file
{"uuid": "d4f5bbdd-47f7-45b1-933f-652d067d55d2", "befores": [{"name": "sql_type", "status": "passed", "start": 1691390530662, "stop": 1691390530662}], "start": 1691390530662, "stop": 1691390530743}
\ No newline at end of file
{"uuid": "fba23067-d8a0-426d-a074-34ce9a76914c", "befores": [{"name": "jk_data", "status": "passed", "start": 1691390530321, "stop": 1691390530321}], "start": 1691390530321, "stop": 1691390530538}
\ No newline at end of file
{"uuid": "f0f801da-d8f8-4087-a51a-bfa0cf149362", "befores": [{"name": "url_data", "status": "passed", "start": 1691390527858, "stop": 1691390527858}], "start": 1691390527858, "stop": 1691390527928}
\ No newline at end of file
{"uuid": "736e802e-d841-4862-a816-2f2c63f409e6", "befores": [{"name": "update_key", "status": "passed", "start": 1691390527859, "stop": 1691390527859}], "start": 1691390527859, "stop": 1691390527917}
\ No newline at end of file
{"uuid": "a090fef3-07f2-4c70-887e-c15d5900c20b", "befores": [{"name": "case_data", "status": "passed", "start": 1691390528855, "stop": 1691390528856}], "start": 1691390528855, "stop": 1691390528976}
\ No newline at end of file
{"uuid": "289a0ccc-ad35-4207-aafe-3c99010bcdcf", "befores": [{"name": "update_key", "status": "passed", "start": 1691390530551, "stop": 1691390530551}], "start": 1691390530551, "stop": 1691390530630}
\ No newline at end of file
{"uuid": "402fd9d0-e23e-4cc0-bc2a-ecc55fc10d56", "befores": [{"name": "sql_type", "status": "passed", "start": 1691390528389, "stop": 1691390528389}], "start": 1691390528389, "stop": 1691390528497}
\ No newline at end of file
{"uuid": "145431cf-bdce-4237-b8fb-50fdbf2900c3", "befores": [{"name": "mokuai_data", "status": "passed", "start": 1691390530659, "stop": 1691390530659}], "start": 1691390530659, "stop": 1691390530773}
\ No newline at end of file
{"uuid": "7fe652ca-5c3e-4dd6-89a8-d61acc5aede5", "befores": [{"name": "url_data", "status": "passed", "start": 1691390528228, "stop": 1691390528228}], "start": 1691390528228, "stop": 1691390528366}
\ No newline at end of file
{"uuid": "86e3052a-acb9-4c90-99a3-7f675b5ab839", "befores": [{"name": "case_data", "status": "passed", "start": 1691390528540, "stop": 1691390528540}], "start": 1691390528540, "stop": 1691390528661}
\ No newline at end of file
{"uuid": "618d69a4-a847-42eb-97b3-e19d7398a377", "befores": [{"name": "title_data", "status": "passed", "start": 1691390528389, "stop": 1691390528389}], "start": 1691390528388, "stop": 1691390528518}
\ No newline at end of file
{"uuid": "8efd0776-a82e-4d58-8bfd-8615f062b415", "befores": [{"name": "jk_data", "status": "passed", "start": 1691390530550, "stop": 1691390530550}], "start": 1691390530550, "stop": 1691390530648}
\ No newline at end of file
{"uuid": "1d39abc2-becd-4388-b0a0-1095b9815c67", "befores": [{"name": "mokuai_data", "status": "passed", "start": 1691390528998, "stop": 1691390528998}], "start": 1691390528998, "stop": 1691390529135}
\ No newline at end of file
{"name": "正向用例", "status": "passed", "attachments": [{"name": "stdout", "source": "4af2e114-a317-47e6-bca1-fb327f4dc1f7-attachment.txt", "type": "text/plain"}], "parameters": [{"name": "mokuai_data", "value": "'认证接口'"}, {"name": "jk_data", "value": "'登录系统'"}, {"name": "title_data", "value": "'正向用例'"}, {"name": "level_data", "value": "'高'"}, {"name": "method_data", "value": "'POST'"}, {"name": "mime_data", "value": "'application/json'"}, {"name": "url_data", "value": "'http://120.46.172.186:8080/auth'"}, {"name": "case_data", "value": "{'password': 'MTIzNDU2', 'username': 'admin'}"}, {"name": "expect_data", "value": "{'username': '超级管理员', 'account': 'admin'}"}, {"name": "sql_type", "value": "None"}, {"name": "sql_data", "value": "None"}, {"name": "update_key", "value": "None"}], "start": 1691390527774, "stop": 1691390527832, "uuid": "911f8177-c3b4-47e5-bdc2-9b30a5961f52", "historyId": "b28c1423b3491e65921c8f9a80ce6db4", "testCaseId": "2724745064c397947229ef37c57663d4", "fullName": "test_execute_request.TestBPM#test_request", "labels": [{"name": "feature", "value": "认证接口"}, {"name": "story", "value": "登录系统"}, {"name": "severity", "value": "高"}, {"name": "epic", "value": "BPM系统"}, {"name": "suite", "value": "test_execute_request"}, {"name": "subSuite", "value": "TestBPM"}, {"name": "host", "value": "DESKTOP-V67H69U"}, {"name": "thread", "value": "10596-MainThread"}, {"name": "framework", "value": "pytest"}, {"name": "language", "value": "cpython3"}, {"name": "package", "value": "test_execute_request"}]}
\ No newline at end of file
{"uuid": "6e434e10-9c25-4e03-a96e-98e4a86557f9", "befores": [{"name": "jk_data", "status": "passed", "start": 1691390530659, "stop": 1691390530660}], "start": 1691390530659, "stop": 1691390530771}
\ No newline at end of file
{"uuid": "7a0b884b-5024-451a-9dd9-06c6c2ebf5ca", "befores": [{"name": "sql_data", "status": "passed", "start": 1691390530662, "stop": 1691390530662}], "start": 1691390530662, "stop": 1691390530742}
\ No newline at end of file
{"uuid": "d48e549d-e8fd-4033-bb29-daaab3c29cec", "befores": [{"name": "level_data", "status": "passed", "start": 1691390528389, "stop": 1691390528389}], "start": 1691390528389, "stop": 1691390528516}
\ No newline at end of file
{"uuid": "334f818a-2eb2-47ea-b6d6-9b6dff9094ce", "befores": [{"name": "method_data", "status": "passed", "start": 1691390527948, "stop": 1691390527948}], "start": 1691390527948, "stop": 1691390528078}
\ No newline at end of file
{"uuid": "720238c4-1a1d-42d8-abc4-d2d5dce7da08", "befores": [{"name": "method_data", "status": "passed", "start": 1691390529144, "stop": 1691390529144}], "start": 1691390529144, "stop": 1691390529738}
\ No newline at end of file
{"uuid": "7c2bd26b-a907-48d9-bac5-16d787d3bbff", "befores": [{"name": "case_data", "status": "passed", "start": 1691390528684, "stop": 1691390528684}], "start": 1691390528684, "stop": 1691390528817}
\ No newline at end of file
{"name": "正向用例", "status": "failed", "statusDetails": {"message": "AssertionError: 断言失败", "trace": "self = <interface_接口优化2.test_case.test_execute_request.TestBPM object at 0x0000020D226A2410>\nreq_fix = <interface_接口优化2.comprehensive_request.request_method.Request object at 0x0000020D223CD490>\ndb_fix = <interface_接口优化2.data_extraction.db_sql.DB object at 0x0000020D226B8ED0>, mokuai_data = '维度管理', jk_data = '根据维度编码删除维度', title_data = '正向用例'\nlevel_data = '高', method_data = 'DELETE', mime_data = 'query', url_data = 'http://120.46.172.186:8080/api/demension/v1/dem/deleteDemByIds'\ncase_data = {'ids': '1688440375846387712'}, expect_data = {'message': '删除维度成功!', 'state': True}, sql_type = 'select'\nsql_data = 'SELECT ID_ FROM uc_demension WHERE `CODE_`=\"一个不知名维度\";', update_key = 'ids'\n\n @pytest.mark.parametrize(\"mokuai_data, jk_data, title_data, level_data, method_data, mime_data, url_data, \"\n \"case_data, expect_data, sql_type,\"\" sql_data, update_key\", ReadExcel().all_data())\n def test_request(self, req_fix, db_fix, mokuai_data, jk_data, title_data, level_data, method_data, mime_data,\n url_data, case_data, expect_data, sql_type, sql_data, update_key):\n allure.dynamic.feature(mokuai_data)\n allure.dynamic.story(jk_data)\n allure.dynamic.title(title_data)\n allure.dynamic.severity(level_data)\n if sql_type is None:\n result = req_fix.all_request(method=method_data, url=url_data, mime=mime_data, data=case_data)\n \n elif sql_type == \"delete\":\n db_fix.delete_sql(sql_data)\n result = req_fix.all_request(method=method_data, url=url_data, mime=mime_data, data=case_data)\n \n elif sql_type == \"select\":\n re = db_fix.select_sql(sql_data)\n case_data[update_key] = re\n result = req_fix.all_request(method=method_data, url=url_data, mime=mime_data, data=case_data)\n \n elif sql_type == \"delete|select\" or sql_type == \"select|delete\":\n db_fix.delete_sql(sql_data[\"delete\"])\n \n re = db_fix.select_sql(sql_data[\"select\"])\n case_data[update_key] = re\n result = req_fix.all_request(method=method_data, url=url_data, mime=mime_data, data=case_data)\n \n else:\n result = req_fix.request_all(method=method_data, url=url_data, mime=mime_data, case_data=case_data)\n \n try:\n for key in expect_data:\n> assert expect_data[key] == result.json().get(key)\nE AssertionError: assert True == False\nE + where False = <built-in method get of dict object at 0x0000020D22721740>('state')\nE + where <built-in method get of dict object at 0x0000020D22721740> = {'message': '【明珠(一个不知名维度)】的维度下存在组织,不允许删除 ', 'state': False, 'value': ''}.get\nE + where {'message': '【明珠(一个不知名维度)】的维度下存在组织,不允许删除 ', 'state': False, 'value': ''} = <bound method Response.json of <Response [200]>>()\nE + where <bound method Response.json of <Response [200]>> = <Response [200]>.json\n\ntest_execute_request.py:59: AssertionError\n\nDuring handling of the above exception, another exception occurred:\n\nself = <interface_接口优化2.test_case.test_execute_request.TestBPM object at 0x0000020D226A2410>\nreq_fix = <interface_接口优化2.comprehensive_request.request_method.Request object at 0x0000020D223CD490>\ndb_fix = <interface_接口优化2.data_extraction.db_sql.DB object at 0x0000020D226B8ED0>, mokuai_data = '维度管理', jk_data = '根据维度编码删除维度', title_data = '正向用例'\nlevel_data = '高', method_data = 'DELETE', mime_data = 'query', url_data = 'http://120.46.172.186:8080/api/demension/v1/dem/deleteDemByIds'\ncase_data = {'ids': '1688440375846387712'}, expect_data = {'message': '删除维度成功!', 'state': True}, sql_type = 'select'\nsql_data = 'SELECT ID_ FROM uc_demension WHERE `CODE_`=\"一个不知名维度\";', update_key = 'ids'\n\n @pytest.mark.parametrize(\"mokuai_data, jk_data, title_data, level_data, method_data, mime_data, url_data, \"\n \"case_data, expect_data, sql_type,\"\" sql_data, update_key\", ReadExcel().all_data())\n def test_request(self, req_fix, db_fix, mokuai_data, jk_data, title_data, level_data, method_data, mime_data,\n url_data, case_data, expect_data, sql_type, sql_data, update_key):\n allure.dynamic.feature(mokuai_data)\n allure.dynamic.story(jk_data)\n allure.dynamic.title(title_data)\n allure.dynamic.severity(level_data)\n if sql_type is None:\n result = req_fix.all_request(method=method_data, url=url_data, mime=mime_data, data=case_data)\n \n elif sql_type == \"delete\":\n db_fix.delete_sql(sql_data)\n result = req_fix.all_request(method=method_data, url=url_data, mime=mime_data, data=case_data)\n \n elif sql_type == \"select\":\n re = db_fix.select_sql(sql_data)\n case_data[update_key] = re\n result = req_fix.all_request(method=method_data, url=url_data, mime=mime_data, data=case_data)\n \n elif sql_type == \"delete|select\" or sql_type == \"select|delete\":\n db_fix.delete_sql(sql_data[\"delete\"])\n \n re = db_fix.select_sql(sql_data[\"select\"])\n case_data[update_key] = re\n result = req_fix.all_request(method=method_data, url=url_data, mime=mime_data, data=case_data)\n \n else:\n result = req_fix.request_all(method=method_data, url=url_data, mime=mime_data, case_data=case_data)\n \n try:\n for key in expect_data:\n assert expect_data[key] == result.json().get(key)\n \n except:\n> raise AssertionError(\"断言失败\")\nE AssertionError: 断言失败\n\ntest_execute_request.py:62: AssertionError"}, "parameters": [{"name": "mokuai_data", "value": "'维度管理'"}, {"name": "jk_data", "value": "'根据维度编码删除维度'"}, {"name": "title_data", "value": "'正向用例'"}, {"name": "level_data", "value": "'高'"}, {"name": "method_data", "value": "'DELETE'"}, {"name": "mime_data", "value": "'query'"}, {"name": "url_data", "value": "'http://120.46.172.186:8080/api/demension/v1/dem/deleteDemByIds'"}, {"name": "case_data", "value": "{'ids': '等待查询'}"}, {"name": "expect_data", "value": "{'state': True, 'message': '删除维度成功!'}"}, {"name": "sql_type", "value": "'select'"}, {"name": "sql_data", "value": "'SELECT ID_ FROM uc_demension WHERE `CODE_`=\"一个不知名维度\";'"}, {"name": "update_key", "value": "'ids'"}], "start": 1691390530784, "stop": 1691390530927, "uuid": "9d477f86-5798-4ac4-a1ba-43d7a61d28a4", "historyId": "5ce81e9fb6760147aa1e4520b2da2182", "testCaseId": "2724745064c397947229ef37c57663d4", "fullName": "test_execute_request.TestBPM#test_request", "labels": [{"name": "feature", "value": "维度管理"}, {"name": "story", "value": "根据维度编码删除维度"}, {"name": "severity", "value": "高"}, {"name": "epic", "value": "BPM系统"}, {"name": "suite", "value": "test_execute_request"}, {"name": "subSuite", "value": "TestBPM"}, {"name": "host", "value": "DESKTOP-V67H69U"}, {"name": "thread", "value": "10596-MainThread"}, {"name": "framework", "value": "pytest"}, {"name": "language", "value": "cpython3"}, {"name": "package", "value": "test_execute_request"}]}
\ No newline at end of file
{"uuid": "0c5986ac-30a2-4b6c-9599-b90a3296acbb", "befores": [{"name": "level_data", "status": "passed", "start": 1691390528853, "stop": 1691390528853}], "start": 1691390528853, "stop": 1691390528984}
\ No newline at end of file
{"name": "正向用例", "status": "passed", "attachments": [{"name": "stdout", "source": "5e9974c1-0331-4816-b144-7214485b2b5a-attachment.txt", "type": "text/plain"}], "parameters": [{"name": "mokuai_data", "value": "'组织管理'"}, {"name": "jk_data", "value": "'保存组织参数'"}, {"name": "title_data", "value": "'正向用例'"}, {"name": "level_data", "value": "'高'"}, {"name": "method_data", "value": "'post'"}, {"name": "mime_data", "value": "'json|query'"}, {"name": "url_data", "value": "'http://120.46.172.186:8080/api/org/v1/orgParam/saveOrgParams'"}, {"name": "case_data", "value": "{'query': {'orgCode': '一个不知名组织'}, 'body': [{'alias': 'sz', 'value': 0}, {'alias': 'zy', 'value': 'math'}, {'alias': 'rq', 'value': '2023-08-04'}, {'alias': 'ah', 'value': 'lq'}, {'alias': 'yyyy', 'value': '诶嘿'}, {'alias': 'xb', 'value': '200'}]}"}, {"name": "expect_data", "value": "{'state': True, 'message': '保存组织参数成功!'}"}, {"name": "sql_type", "value": "None"}, {"name": "sql_data", "value": "None"}, {"name": "update_key", "value": "None"}], "start": 1691390530552, "stop": 1691390530629, "uuid": "a9cf7aab-c515-4802-afb2-0b5419ad29e9", "historyId": "dfa51186bf161b64adcd6e1428792faf", "testCaseId": "2724745064c397947229ef37c57663d4", "fullName": "test_execute_request.TestBPM#test_request", "labels": [{"name": "feature", "value": "组织管理"}, {"name": "story", "value": "保存组织参数"}, {"name": "severity", "value": "高"}, {"name": "epic", "value": "BPM系统"}, {"name": "suite", "value": "test_execute_request"}, {"name": "subSuite", "value": "TestBPM"}, {"name": "host", "value": "DESKTOP-V67H69U"}, {"name": "thread", "value": "10596-MainThread"}, {"name": "framework", "value": "pytest"}, {"name": "language", "value": "cpython3"}, {"name": "package", "value": "test_execute_request"}]}
\ No newline at end of file
{"uuid": "87380921-104c-43a9-9050-d202ae64cf18", "befores": [{"name": "mokuai_data", "status": "passed", "start": 1691390530780, "stop": 1691390530780}], "start": 1691390530780, "stop": 1691390531063}
\ No newline at end of file
{"uuid": "73cc5b3e-4141-4b68-9a0f-02fddfe9768b", "befores": [{"name": "mime_data", "status": "passed", "start": 1691390528684, "stop": 1691390528684}], "start": 1691390528684, "stop": 1691390528821}
\ No newline at end of file
{"uuid": "39297281-3c32-4fad-b2cd-f3a906233c34", "befores": [{"name": "jk_data", "status": "passed", "start": 1691390528092, "stop": 1691390528092}], "start": 1691390528092, "stop": 1691390528219}
\ No newline at end of file
{"name": "正向用例", "status": "passed", "attachments": [{"name": "stdout", "source": "5af1560f-10b6-4c22-ba20-28ff0b5120b8-attachment.txt", "type": "text/plain"}], "parameters": [{"name": "mokuai_data", "value": "'维度管理'"}, {"name": "jk_data", "value": "'添加维度'"}, {"name": "title_data", "value": "'正向用例'"}, {"name": "level_data", "value": "'高'"}, {"name": "method_data", "value": "'post'"}, {"name": "mime_data", "value": "'application/json'"}, {"name": "url_data", "value": "'http://120.46.172.186:8080/api/demension/v1/dem/addDem'"}, {"name": "case_data", "value": "{'code': '一个不知名维度', 'description': '无名之辈', 'isDefault': 0, 'name': '明珠'}"}, {"name": "expect_data", "value": "{'state': True, 'message': '添加维度成功!'}"}, {"name": "sql_type", "value": "'delete'"}, {"name": "sql_data", "value": "'DELETE FROM uc_demension WHERE `CODE_`=\"一个不知名维度\";'"}, {"name": "update_key", "value": "None"}], "start": 1691390529961, "stop": 1691390530112, "uuid": "a1319fe6-c645-44c4-bebc-7597241419a1", "historyId": "1eaf692a125d92d10069ec4b0aa01afd", "testCaseId": "2724745064c397947229ef37c57663d4", "fullName": "test_execute_request.TestBPM#test_request", "labels": [{"name": "feature", "value": "维度管理"}, {"name": "story", "value": "添加维度"}, {"name": "severity", "value": "高"}, {"name": "epic", "value": "BPM系统"}, {"name": "suite", "value": "test_execute_request"}, {"name": "subSuite", "value": "TestBPM"}, {"name": "host", "value": "DESKTOP-V67H69U"}, {"name": "thread", "value": "10596-MainThread"}, {"name": "framework", "value": "pytest"}, {"name": "language", "value": "cpython3"}, {"name": "package", "value": "test_execute_request"}]}
\ No newline at end of file
{"uuid": "5b546715-8028-4f25-83ec-011f7f9e9455", "befores": [{"name": "sql_data", "status": "passed", "start": 1691390528685, "stop": 1691390528685}], "start": 1691390528685, "stop": 1691390528802}
\ No newline at end of file
{"uuid": "2aea564c-696f-4406-a497-0704fb6e8cb3", "befores": [{"name": "sql_data", "status": "passed", "start": 1691390527858, "stop": 1691390527859}], "start": 1691390527858, "stop": 1691390527920}
\ No newline at end of file
{"uuid": "d2e37104-b22c-4d4f-895d-2c8620aaea5b", "befores": [{"name": "sql_data", "status": "passed", "start": 1691390528541, "stop": 1691390528541}], "start": 1691390528541, "stop": 1691390528654}
\ No newline at end of file
{"uuid": "1f83ab0b-726b-4d4b-872a-9719435aa1b1", "befores": [{"name": "mokuai_data", "status": "passed", "start": 1691390528537, "stop": 1691390528537}], "start": 1691390528537, "stop": 1691390528675}
\ No newline at end of file
{"uuid": "138ec380-fa1c-47fc-aa87-c15a0c0f665c", "befores": [{"name": "expect_data", "status": "passed", "start": 1691390527858, "stop": 1691390527858}], "start": 1691390527858, "stop": 1691390527924}
\ No newline at end of file
{"uuid": "28c93ae5-395c-4cb8-9d39-1b1e998ca345", "befores": [{"name": "mokuai_data", "status": "passed", "start": 1691390528388, "stop": 1691390528388}], "start": 1691390528388, "stop": 1691390528522}
\ No newline at end of file
{"uuid": "ea936010-2c12-47f3-adf6-bf3a15dd32d8", "befores": [{"name": "expect_data", "status": "passed", "start": 1691390529145, "stop": 1691390529145}], "start": 1691390529145, "stop": 1691390529732}
\ No newline at end of file
{"uuid": "7c19032b-ebc2-494e-9eda-213bbff0b534", "befores": [{"name": "url_data", "status": "passed", "start": 1691390529144, "stop": 1691390529144}], "start": 1691390529144, "stop": 1691390529736}
\ No newline at end of file
{"uuid": "7137da02-d3b9-40ac-9b5d-0bf07445f9c7", "befores": [{"name": "sql_type", "status": "passed", "start": 1691390527858, "stop": 1691390527858}], "start": 1691390527858, "stop": 1691390527922}
\ No newline at end of file
{"uuid": "9f5dd11b-d12d-4327-a2c6-2e501e98a8f6", "befores": [{"name": "title_data", "status": "passed", "start": 1691390530550, "stop": 1691390530550}], "start": 1691390530550, "stop": 1691390530647}
\ No newline at end of file
{"uuid": "686bc9c4-2d34-4e2b-a814-76e1f13f998d", "befores": [{"name": "update_key", "status": "passed", "start": 1691390527950, "stop": 1691390527950}], "start": 1691390527950, "stop": 1691390528059}
\ No newline at end of file
{"uuid": "6751c306-6f20-43cc-a4cb-1fcc87ffcbdc", "befores": [{"name": "expect_data", "status": "passed", "start": 1691390529956, "stop": 1691390529956}], "start": 1691390529956, "stop": 1691390530285}
\ No newline at end of file
{"uuid": "3e4932da-5ef7-46cd-b65e-fcf591644549", "befores": [{"name": "case_data", "status": "passed", "start": 1691390529144, "stop": 1691390529144}], "start": 1691390529144, "stop": 1691390529734}
\ No newline at end of file
{"uuid": "34c8a2fb-e57b-4b7f-a509-b83896cd030e", "befores": [{"name": "mokuai_data", "status": "passed", "start": 1691390530321, "stop": 1691390530321}], "start": 1691390530321, "stop": 1691390530541}
\ No newline at end of file
{"name": "反向用例-用户名为空", "status": "passed", "attachments": [{"name": "stdout", "source": "5b41e9ea-5547-4fc2-9b4e-e00b9f361fae-attachment.txt", "type": "text/plain"}], "parameters": [{"name": "mokuai_data", "value": "'认证接口'"}, {"name": "jk_data", "value": "'登录系统'"}, {"name": "title_data", "value": "'反向用例-用户名为空'"}, {"name": "level_data", "value": "'中'"}, {"name": "method_data", "value": "'POST'"}, {"name": "mime_data", "value": "'application/json'"}, {"name": "url_data", "value": "'http://120.46.172.186:8080/auth'"}, {"name": "case_data", "value": "{'password': 'MTIzNDU2', 'username': ''}"}, {"name": "expect_data", "value": "{'state': False, 'message': '账号或密码错误'}"}, {"name": "sql_type", "value": "None"}, {"name": "sql_data", "value": "None"}, {"name": "update_key", "value": "None"}], "start": 1691390527861, "stop": 1691390527915, "uuid": "3dae06b2-a445-4bb5-95ef-f4dfe0f08444", "historyId": "fa3f36761bcf568e61a0e9c217a5a1e6", "testCaseId": "2724745064c397947229ef37c57663d4", "fullName": "test_execute_request.TestBPM#test_request", "labels": [{"name": "feature", "value": "认证接口"}, {"name": "story", "value": "登录系统"}, {"name": "severity", "value": "中"}, {"name": "epic", "value": "BPM系统"}, {"name": "suite", "value": "test_execute_request"}, {"name": "subSuite", "value": "TestBPM"}, {"name": "host", "value": "DESKTOP-V67H69U"}, {"name": "thread", "value": "10596-MainThread"}, {"name": "framework", "value": "pytest"}, {"name": "language", "value": "cpython3"}, {"name": "package", "value": "test_execute_request"}]}
\ No newline at end of file
{"uuid": "8cde4fb4-e7d2-4fff-913a-1dd92c3124a1", "befores": [{"name": "case_data", "status": "passed", "start": 1691390528999, "stop": 1691390528999}], "start": 1691390528999, "stop": 1691390529120}
\ No newline at end of file
{"uuid": "ebc6611c-8384-431b-83f9-06d70c7135d2", "befores": [{"name": "method_data", "status": "passed", "start": 1691390527858, "stop": 1691390527858}], "start": 1691390527858, "stop": 1691390527932}
\ No newline at end of file
{"uuid": "99a5be6a-7084-49c5-b9db-27cede98314d", "befores": [{"name": "title_data", "status": "passed", "start": 1691390527948, "stop": 1691390527948}], "start": 1691390527948, "stop": 1691390528081}
\ No newline at end of file
{"uuid": "b554e1c7-af5a-4898-b599-e9e901330657", "befores": [{"name": "case_data", "status": "passed", "start": 1691390529954, "stop": 1691390529954}], "start": 1691390529954, "stop": 1691390530287}
\ No newline at end of file
{"uuid": "53d058ae-eb73-4ffe-923b-67c07d51bcad", "befores": [{"name": "jk_data", "status": "passed", "start": 1691390528998, "stop": 1691390528999}], "start": 1691390528998, "stop": 1691390529134}
\ No newline at end of file
{"uuid": "491a4e82-386c-497c-88cf-2d12a9bc2db8", "befores": [{"name": "sql_data", "status": "passed", "start": 1691390528094, "stop": 1691390528094}], "start": 1691390528094, "stop": 1691390528203}
\ No newline at end of file
{"uuid": "8815b331-bc63-4f64-b3ff-2a0966ee74ad", "befores": [{"name": "mime_data", "status": "passed", "start": 1691390530660, "stop": 1691390530660}], "start": 1691390530660, "stop": 1691390530751}
\ No newline at end of file
{"uuid": "9344043e-e84a-4c78-89a9-3e71604864d8", "befores": [{"name": "jk_data", "status": "passed", "start": 1691390528388, "stop": 1691390528388}], "start": 1691390528388, "stop": 1691390528520}
\ No newline at end of file
{"uuid": "f54b6059-321a-40a5-bb0f-1968ed8a9785", "befores": [{"name": "url_data", "status": "passed", "start": 1691390528093, "stop": 1691390528093}], "start": 1691390528093, "stop": 1691390528211}
\ No newline at end of file
{"uuid": "35f6d037-bcf9-4e9d-b661-48f4808329d1", "befores": [{"name": "method_data", "status": "passed", "start": 1691390528389, "stop": 1691390528389}], "start": 1691390528389, "stop": 1691390528513}
\ No newline at end of file
{"uuid": "53d656f3-18cc-4bda-b25e-49f329ff445f", "befores": [{"name": "level_data", "status": "passed", "start": 1691390528228, "stop": 1691390528228}], "start": 1691390528228, "stop": 1691390528376}
\ No newline at end of file
{"uuid": "98e33bcd-a9d8-48d0-8ee5-60e9f61a4840", "befores": [{"name": "jk_data", "status": "passed", "start": 1691390527857, "stop": 1691390527857}], "start": 1691390527857, "stop": 1691390527936}
\ No newline at end of file
{"uuid": "3459260b-e709-444d-b1c9-56d569695281", "befores": [{"name": "mime_data", "status": "passed", "start": 1691390528228, "stop": 1691390528228}], "start": 1691390528228, "stop": 1691390528370}
\ No newline at end of file
{"uuid": "6d778a81-6b67-4c9f-b60e-81c81c8f6246", "befores": [{"name": "sql_data", "status": "passed", "start": 1691390528858, "stop": 1691390528858}], "start": 1691390528858, "stop": 1691390528967}
\ No newline at end of file
{"uuid": "2699d7bd-732f-40b2-9102-a1e1dd27d873", "befores": [{"name": "url_data", "status": "passed", "start": 1691390527773, "stop": 1691390527773}], "start": 1691390527773, "stop": 1691390527841}
\ No newline at end of file
{"uuid": "748d28b8-753b-4ded-ac9d-9f298c97cf3e", "befores": [{"name": "sql_data", "status": "passed", "start": 1691390527773, "stop": 1691390527773}], "start": 1691390527773, "stop": 1691390527834}
\ No newline at end of file
{"uuid": "f834ffa4-be1e-4a4b-bc6f-a9905fcb6192", "befores": [{"name": "sql_data", "status": "passed", "start": 1691390528390, "stop": 1691390528390}], "start": 1691390528390, "stop": 1691390528495}
\ No newline at end of file
{"uuid": "24bf26ec-7885-4045-8727-258dd62cfee0", "befores": [{"name": "jk_data", "status": "passed", "start": 1691390529143, "stop": 1691390529144}], "start": 1691390529143, "stop": 1691390529863}
\ No newline at end of file
{"uuid": "dff47bde-ec2b-4e14-bebd-5e33c1924be8", "befores": [{"name": "method_data", "status": "passed", "start": 1691390530781, "stop": 1691390530781}], "start": 1691390530781, "stop": 1691390530968}
\ No newline at end of file
{"uuid": "598c7ac4-af07-4c4b-831a-76faa7c6adf2", "befores": [{"name": "mokuai_data", "status": "passed", "start": 1691390529143, "stop": 1691390529143}], "start": 1691390529143, "stop": 1691390529924}
\ No newline at end of file
{"uuid": "49c6831d-bf58-4a75-8316-07be205bb7de", "befores": [{"name": "update_key", "status": "passed", "start": 1691390528390, "stop": 1691390528390}], "start": 1691390528390, "stop": 1691390528491}
\ No newline at end of file
{"name": "正向用例", "status": "passed", "attachments": [{"name": "stdout", "source": "e07bc991-01fa-4ebd-b782-ba91a28b6051-attachment.txt", "type": "text/plain"}], "parameters": [{"name": "mokuai_data", "value": "'组织管理'"}, {"name": "jk_data", "value": "'添加组织'"}, {"name": "title_data", "value": "'正向用例'"}, {"name": "level_data", "value": "'高'"}, {"name": "method_data", "value": "'post'"}, {"name": "mime_data", "value": "'application/json'"}, {"name": "url_data", "value": "'http://120.46.172.186:8080/api/org/v1/org/addOrg'"}, {"name": "case_data", "value": "{'code': '一个不知名组织', 'demId': '等待查询', 'exceedLimitNum': 0, 'grade': '', 'limitNum': 0, 'name': '一个不知名的组织名称', 'nowNum': 0, 'orderNo': 0, 'parentId': '0'}"}, {"name": "expect_data", "value": "{'state': True, 'message': '添加组织成功!'}"}, {"name": "sql_type", "value": "'delete|select'"}, {"name": "sql_data", "value": "{'select': 'SELECT ID_ FROM uc_demension WHERE `CODE_`=\"一个不知名维度\";', 'delete': 'DELETE FROM uc_org WHERE `CODE_`=\"一个不知名组织\";'}"}, {"name": "update_key", "value": "'demId'"}], "start": 1691390530326, "stop": 1691390530515, "uuid": "29ed5c61-127a-4a73-8862-f26d2de657a5", "historyId": "652579b9606ae4ae36489912ce9d7f7f", "testCaseId": "2724745064c397947229ef37c57663d4", "fullName": "test_execute_request.TestBPM#test_request", "labels": [{"name": "feature", "value": "组织管理"}, {"name": "story", "value": "添加组织"}, {"name": "severity", "value": "高"}, {"name": "epic", "value": "BPM系统"}, {"name": "suite", "value": "test_execute_request"}, {"name": "subSuite", "value": "TestBPM"}, {"name": "host", "value": "DESKTOP-V67H69U"}, {"name": "thread", "value": "10596-MainThread"}, {"name": "framework", "value": "pytest"}, {"name": "language", "value": "cpython3"}, {"name": "package", "value": "test_execute_request"}]}
\ No newline at end of file
{"name": "反向用例-用户名过长", "status": "passed", "attachments": [{"name": "stdout", "source": "d1bf6946-227e-409c-be4b-939c68622efe-attachment.txt", "type": "text/plain"}], "parameters": [{"name": "mokuai_data", "value": "'认证接口'"}, {"name": "jk_data", "value": "'登录系统'"}, {"name": "title_data", "value": "'反向用例-用户名过长'"}, {"name": "level_data", "value": "'中'"}, {"name": "method_data", "value": "'POST'"}, {"name": "mime_data", "value": "'application/json'"}, {"name": "url_data", "value": "'http://120.46.172.186:8080/auth'"}, {"name": "case_data", "value": "{'password': 'MTIzNDU2', 'username': 'adminadminadminadminadminadminadminadminan'}"}, {"name": "expect_data", "value": "{'state': False, 'message': '账号或密码错误'}"}, {"name": "sql_type", "value": "None"}, {"name": "sql_data", "value": "None"}, {"name": "update_key", "value": "None"}], "start": 1691390527951, "stop": 1691390528055, "uuid": "d51285b1-b376-41f4-898c-914fa70b6177", "historyId": "7613d0ed64a808f9c94b86182381946d", "testCaseId": "2724745064c397947229ef37c57663d4", "fullName": "test_execute_request.TestBPM#test_request", "labels": [{"name": "feature", "value": "认证接口"}, {"name": "story", "value": "登录系统"}, {"name": "severity", "value": "中"}, {"name": "epic", "value": "BPM系统"}, {"name": "suite", "value": "test_execute_request"}, {"name": "subSuite", "value": "TestBPM"}, {"name": "host", "value": "DESKTOP-V67H69U"}, {"name": "thread", "value": "10596-MainThread"}, {"name": "framework", "value": "pytest"}, {"name": "language", "value": "cpython3"}, {"name": "package", "value": "test_execute_request"}]}
\ No newline at end of file
{"uuid": "2064e6ff-7f50-456b-ba85-f14d0eef3546", "befores": [{"name": "url_data", "status": "passed", "start": 1691390528855, "stop": 1691390528855}], "start": 1691390528855, "stop": 1691390528978}
\ No newline at end of file
{"uuid": "17ea7087-06db-416c-9c24-cc8c3906e9f8", "befores": [{"name": "url_data", "status": "passed", "start": 1691390527948, "stop": 1691390527948}], "start": 1691390527948, "stop": 1691390528074}
\ No newline at end of file
{"uuid": "1abf7885-0b2f-4529-9541-4f1b7bf59b3e", "befores": [{"name": "level_data", "status": "passed", "start": 1691390528538, "stop": 1691390528538}], "start": 1691390528538, "stop": 1691390528669}
\ No newline at end of file
{"uuid": "d582cc26-4059-4192-99c3-34963108f26d", "befores": [{"name": "jk_data", "status": "passed", "start": 1691390527947, "stop": 1691390527948}], "start": 1691390527947, "stop": 1691390528083}
\ No newline at end of file
{"uuid": "5ee77491-0d69-48c2-ab6f-28a19259c781", "befores": [{"name": "title_data", "status": "passed", "start": 1691390530660, "stop": 1691390530660}], "start": 1691390530660, "stop": 1691390530767}
\ No newline at end of file
{"uuid": "764d144a-07c4-4356-9274-917b06c1da89", "befores": [{"name": "sql_type", "status": "passed", "start": 1691390528229, "stop": 1691390528229}], "start": 1691390528229, "stop": 1691390528349}
\ No newline at end of file
{"uuid": "0fe4e548-9ac7-430d-bf94-b9ea55e62b35", "befores": [{"name": "case_data", "status": "passed", "start": 1691390530551, "stop": 1691390530551}], "start": 1691390530551, "stop": 1691390530637}
\ No newline at end of file
{"uuid": "22b25cac-a7ea-4d82-92ca-fc1f56f3e1e4", "befores": [{"name": "jk_data", "status": "passed", "start": 1691390528852, "stop": 1691390528852}], "start": 1691390528852, "stop": 1691390528987}
\ No newline at end of file
{"uuid": "47d2d856-4666-47c7-9131-0f56e792302d", "befores": [{"name": "update_key", "status": "passed", "start": 1691390528685, "stop": 1691390528685}], "start": 1691390528685, "stop": 1691390528799}
\ No newline at end of file
{"uuid": "ef360fb8-968b-43ee-8c18-842257210153", "befores": [{"name": "url_data", "status": "passed", "start": 1691390528684, "stop": 1691390528684}], "start": 1691390528684, "stop": 1691390528819}
\ No newline at end of file
{"uuid": "cf766d92-ef41-44b1-a1df-e2f12c39821f", "befores": [{"name": "mime_data", "status": "passed", "start": 1691390528540, "stop": 1691390528540}], "start": 1691390528540, "stop": 1691390528666}
\ No newline at end of file
{"name": "正向用例", "status": "failed", "statusDetails": {"message": "AssertionError: 断言失败", "trace": "self = <interface_接口优化2.test_case.test_execute_request.TestBPM object at 0x0000020D2268E6D0>\nreq_fix = <interface_接口优化2.comprehensive_request.request_method.Request object at 0x0000020D223CD490>\ndb_fix = <interface_接口优化2.data_extraction.db_sql.DB object at 0x0000020D226B8ED0>, mokuai_data = '认证接口', jk_data = '刷新token', title_data = '正向用例'\nlevel_data = '中', method_data = 'get', mime_data = None, url_data = 'http://120.46.172.186:8080/refresh', case_data = None\nexpect_data = {'message': '刷新token成功'}, sql_type = None, sql_data = None, update_key = None\n\n @pytest.mark.parametrize(\"mokuai_data, jk_data, title_data, level_data, method_data, mime_data, url_data, \"\n \"case_data, expect_data, sql_type,\"\" sql_data, update_key\", ReadExcel().all_data())\n def test_request(self, req_fix, db_fix, mokuai_data, jk_data, title_data, level_data, method_data, mime_data,\n url_data, case_data, expect_data, sql_type, sql_data, update_key):\n allure.dynamic.feature(mokuai_data)\n allure.dynamic.story(jk_data)\n allure.dynamic.title(title_data)\n allure.dynamic.severity(level_data)\n if sql_type is None:\n result = req_fix.all_request(method=method_data, url=url_data, mime=mime_data, data=case_data)\n \n elif sql_type == \"delete\":\n db_fix.delete_sql(sql_data)\n result = req_fix.all_request(method=method_data, url=url_data, mime=mime_data, data=case_data)\n \n elif sql_type == \"select\":\n re = db_fix.select_sql(sql_data)\n case_data[update_key] = re\n result = req_fix.all_request(method=method_data, url=url_data, mime=mime_data, data=case_data)\n \n elif sql_type == \"delete|select\" or sql_type == \"select|delete\":\n db_fix.delete_sql(sql_data[\"delete\"])\n \n re = db_fix.select_sql(sql_data[\"select\"])\n case_data[update_key] = re\n result = req_fix.all_request(method=method_data, url=url_data, mime=mime_data, data=case_data)\n \n else:\n result = req_fix.request_all(method=method_data, url=url_data, mime=mime_data, case_data=case_data)\n \n try:\n for key in expect_data:\n> assert expect_data[key] == result.json().get(key)\nE AssertionError: assert '刷新token成功' == None\nE + where None = <built-in method get of dict object at 0x0000020D226947C0>('message')\nE + where <built-in method get of dict object at 0x0000020D226947C0> = {'account': '', 'loginStatus': True, 'token': 'eyJhbGciOiJIUzUxMiJ9.eyJzdWIiOiJhZG1pbiIsInRlbmFudElkIjoiLTEiLCJleHAiOj...5MDUyOX0.pggcbQ8oENI9HXU-V2Uit3PjwrJ4NSp-o7iszJ_gzZIxX4xirBSlqjQQkB43JaOzY9CUFf4iL1IvXlxhsnfirA', 'userAttrs': {}, ...}.get\nE + where {'account': '', 'loginStatus': True, 'token': 'eyJhbGciOiJIUzUxMiJ9.eyJzdWIiOiJhZG1pbiIsInRlbmFudElkIjoiLTEiLCJleHAiOj...5MDUyOX0.pggcbQ8oENI9HXU-V2Uit3PjwrJ4NSp-o7iszJ_gzZIxX4xirBSlqjQQkB43JaOzY9CUFf4iL1IvXlxhsnfirA', 'userAttrs': {}, ...} = <bound method Response.json of <Response [200]>>()\nE + where <bound method Response.json of <Response [200]>> = <Response [200]>.json\n\ntest_execute_request.py:59: AssertionError\n\nDuring handling of the above exception, another exception occurred:\n\nself = <interface_接口优化2.test_case.test_execute_request.TestBPM object at 0x0000020D2268E6D0>\nreq_fix = <interface_接口优化2.comprehensive_request.request_method.Request object at 0x0000020D223CD490>\ndb_fix = <interface_接口优化2.data_extraction.db_sql.DB object at 0x0000020D226B8ED0>, mokuai_data = '认证接口', jk_data = '刷新token', title_data = '正向用例'\nlevel_data = '中', method_data = 'get', mime_data = None, url_data = 'http://120.46.172.186:8080/refresh', case_data = None\nexpect_data = {'message': '刷新token成功'}, sql_type = None, sql_data = None, update_key = None\n\n @pytest.mark.parametrize(\"mokuai_data, jk_data, title_data, level_data, method_data, mime_data, url_data, \"\n \"case_data, expect_data, sql_type,\"\" sql_data, update_key\", ReadExcel().all_data())\n def test_request(self, req_fix, db_fix, mokuai_data, jk_data, title_data, level_data, method_data, mime_data,\n url_data, case_data, expect_data, sql_type, sql_data, update_key):\n allure.dynamic.feature(mokuai_data)\n allure.dynamic.story(jk_data)\n allure.dynamic.title(title_data)\n allure.dynamic.severity(level_data)\n if sql_type is None:\n result = req_fix.all_request(method=method_data, url=url_data, mime=mime_data, data=case_data)\n \n elif sql_type == \"delete\":\n db_fix.delete_sql(sql_data)\n result = req_fix.all_request(method=method_data, url=url_data, mime=mime_data, data=case_data)\n \n elif sql_type == \"select\":\n re = db_fix.select_sql(sql_data)\n case_data[update_key] = re\n result = req_fix.all_request(method=method_data, url=url_data, mime=mime_data, data=case_data)\n \n elif sql_type == \"delete|select\" or sql_type == \"select|delete\":\n db_fix.delete_sql(sql_data[\"delete\"])\n \n re = db_fix.select_sql(sql_data[\"select\"])\n case_data[update_key] = re\n result = req_fix.all_request(method=method_data, url=url_data, mime=mime_data, data=case_data)\n \n else:\n result = req_fix.request_all(method=method_data, url=url_data, mime=mime_data, case_data=case_data)\n \n try:\n for key in expect_data:\n assert expect_data[key] == result.json().get(key)\n \n except:\n> raise AssertionError(\"断言失败\")\nE AssertionError: 断言失败\n\ntest_execute_request.py:62: AssertionError"}, "parameters": [{"name": "mokuai_data", "value": "'认证接口'"}, {"name": "jk_data", "value": "'刷新token'"}, {"name": "title_data", "value": "'正向用例'"}, {"name": "level_data", "value": "'中'"}, {"name": "method_data", "value": "'get'"}, {"name": "mime_data", "value": "None"}, {"name": "url_data", "value": "'http://120.46.172.186:8080/refresh'"}, {"name": "case_data", "value": "None"}, {"name": "expect_data", "value": "{'message': '刷新token成功'}"}, {"name": "sql_type", "value": "None"}, {"name": "sql_data", "value": "None"}, {"name": "update_key", "value": "None"}], "start": 1691390529146, "stop": 1691390529248, "uuid": "a2019ceb-8baa-46c1-970d-a96e3a25124a", "historyId": "08bad2d751312e27c7e3f55440b48ec0", "testCaseId": "2724745064c397947229ef37c57663d4", "fullName": "test_execute_request.TestBPM#test_request", "labels": [{"name": "feature", "value": "认证接口"}, {"name": "story", "value": "刷新token"}, {"name": "severity", "value": "中"}, {"name": "epic", "value": "BPM系统"}, {"name": "suite", "value": "test_execute_request"}, {"name": "subSuite", "value": "TestBPM"}, {"name": "host", "value": "DESKTOP-V67H69U"}, {"name": "thread", "value": "10596-MainThread"}, {"name": "framework", "value": "pytest"}, {"name": "language", "value": "cpython3"}, {"name": "package", "value": "test_execute_request"}]}
\ No newline at end of file
{"uuid": "c035f8a8-2d28-42d9-9558-c15f065a970e", "befores": [{"name": "expect_data", "status": "passed", "start": 1691390528389, "stop": 1691390528389}], "start": 1691390528389, "stop": 1691390528499}
\ No newline at end of file
{"uuid": "0fb4eb30-d416-4556-ae8f-0966cc3aa26a", "befores": [{"name": "method_data", "status": "passed", "start": 1691390528684, "stop": 1691390528684}], "start": 1691390528684, "stop": 1691390528823}
\ No newline at end of file
{"uuid": "a9c00173-820e-4e04-9484-4f019addee20", "befores": [{"name": "title_data", "status": "passed", "start": 1691390528684, "stop": 1691390528684}], "start": 1691390528684, "stop": 1691390528828}
\ No newline at end of file
{"uuid": "1ec14efc-e4b4-4231-996a-d85d5ada01b9", "befores": [{"name": "case_data", "status": "passed", "start": 1691390528093, "stop": 1691390528093}], "start": 1691390528093, "stop": 1691390528210}
\ No newline at end of file
{"uuid": "3f9e9362-9d09-4668-9813-58f38c086ff0", "befores": [{"name": "sql_data", "status": "passed", "start": 1691390530551, "stop": 1691390530551}], "start": 1691390530551, "stop": 1691390530632}
\ No newline at end of file
{"name": "反向用例-密码为长", "status": "passed", "attachments": [{"name": "stdout", "source": "1b8c9e64-91cd-4811-b290-7eaa5511ccba-attachment.txt", "type": "text/plain"}], "parameters": [{"name": "mokuai_data", "value": "'认证接口'"}, {"name": "jk_data", "value": "'登录系统'"}, {"name": "title_data", "value": "'反向用例-密码为长'"}, {"name": "level_data", "value": "'中'"}, {"name": "method_data", "value": "'POST'"}, {"name": "mime_data", "value": "'application/json'"}, {"name": "url_data", "value": "'http://120.46.172.186:8080/auth'"}, {"name": "case_data", "value": "{'password': 'MTIzNDU2MTIzNDU2MTIzNDU2MTIzNDU2MTIzNDU2MTIzNDU2', 'username': 'admin'}"}, {"name": "expect_data", "value": "{'state': False, 'message': '账号或密码错误'}"}, {"name": "sql_type", "value": "None"}, {"name": "sql_data", "value": "None"}, {"name": "update_key", "value": "None"}], "start": 1691390528686, "stop": 1691390528796, "uuid": "d7c1ef21-4c01-48fc-97b1-71c5cb2c05e3", "historyId": "295ef411dac1a8ac0324e281231776cc", "testCaseId": "2724745064c397947229ef37c57663d4", "fullName": "test_execute_request.TestBPM#test_request", "labels": [{"name": "feature", "value": "认证接口"}, {"name": "story", "value": "登录系统"}, {"name": "severity", "value": "中"}, {"name": "epic", "value": "BPM系统"}, {"name": "suite", "value": "test_execute_request"}, {"name": "subSuite", "value": "TestBPM"}, {"name": "host", "value": "DESKTOP-V67H69U"}, {"name": "thread", "value": "10596-MainThread"}, {"name": "framework", "value": "pytest"}, {"name": "language", "value": "cpython3"}, {"name": "package", "value": "test_execute_request"}]}
\ No newline at end of file
{"uuid": "d38b6d22-ef6e-44c2-988b-36cdf72b323b", "befores": [{"name": "method_data", "status": "passed", "start": 1691390530550, "stop": 1691390530550}], "start": 1691390530550, "stop": 1691390530643}
\ No newline at end of file
{"uuid": "a5272500-1e25-4ffd-bab6-2457840b8147", "befores": [{"name": "title_data", "status": "passed", "start": 1691390529949, "stop": 1691390529949}], "start": 1691390529949, "stop": 1691390530304}
\ No newline at end of file
{"uuid": "15e20bda-334a-4a4d-bd20-8aa0c85399dc", "befores": [{"name": "level_data", "status": "passed", "start": 1691390530781, "stop": 1691390530781}], "start": 1691390530781, "stop": 1691390530970}
\ No newline at end of file
{"uuid": "c3f52e1d-b360-4701-919e-685c9d4edbf3", "befores": [{"name": "update_key", "status": "passed", "start": 1691390528229, "stop": 1691390528229}], "start": 1691390528229, "stop": 1691390528340}
\ No newline at end of file
{"uuid": "e96778cf-32bd-47fc-ad7f-7518bbb417a9", "befores": [{"name": "sql_data", "status": "passed", "start": 1691390529000, "stop": 1691390529000}], "start": 1691390529000, "stop": 1691390529110}
\ No newline at end of file
{"uuid": "b4fe978f-3b7b-49c9-9366-0d56780bb929", "befores": [{"name": "expect_data", "status": "passed", "start": 1691390530551, "stop": 1691390530551}], "start": 1691390530551, "stop": 1691390530635}
\ No newline at end of file
{"uuid": "7ce90884-d17d-4003-bab8-15c394605f6d", "befores": [{"name": "title_data", "status": "passed", "start": 1691390528228, "stop": 1691390528228}], "start": 1691390528228, "stop": 1691390528379}
\ No newline at end of file
{"uuid": "b8337f04-f4bf-491c-8d93-31304b7ecad4", "befores": [{"name": "expect_data", "status": "passed", "start": 1691390527773, "stop": 1691390527773}], "start": 1691390527773, "stop": 1691390527837}
\ No newline at end of file
{"uuid": "78e4d375-971c-42b9-8a75-f3188f88f453", "befores": [{"name": "level_data", "status": "passed", "start": 1691390528092, "stop": 1691390528092}], "start": 1691390528092, "stop": 1691390528215}
\ No newline at end of file
{"uuid": "a34b5619-ffde-437c-88ff-7038eaf9ae2c", "befores": [{"name": "update_key", "status": "passed", "start": 1691390529145, "stop": 1691390529145}], "start": 1691390529145, "stop": 1691390529725}
\ No newline at end of file
{"uuid": "04fc4a57-4e9f-4845-917f-0ffbaa459a76", "befores": [{"name": "update_key", "status": "passed", "start": 1691390530662, "stop": 1691390530662}], "start": 1691390530662, "stop": 1691390530740}
\ No newline at end of file
{"name": "反向用例-密码为过短", "status": "passed", "attachments": [{"name": "stdout", "source": "d4659356-b270-4603-8ec8-f01e3bfb4d10-attachment.txt", "type": "text/plain"}], "parameters": [{"name": "mokuai_data", "value": "'认证接口'"}, {"name": "jk_data", "value": "'登录系统'"}, {"name": "title_data", "value": "'反向用例-密码为过短'"}, {"name": "level_data", "value": "'中'"}, {"name": "method_data", "value": "'PoST'"}, {"name": "mime_data", "value": "'application/json'"}, {"name": "url_data", "value": "'http://120.46.172.186:8080/auth'"}, {"name": "case_data", "value": "{'password': '1', 'username': 'admin'}"}, {"name": "expect_data", "value": "{'state': False, 'message': '账号或密码错误'}"}, {"name": "sql_type", "value": "None"}, {"name": "sql_data", "value": "None"}, {"name": "update_key", "value": "None"}], "start": 1691390528861, "stop": 1691390528961, "uuid": "442296b1-3a4f-4c5b-99d8-ff6a3f816978", "historyId": "ee44d34d5e3f07d9b19fc3f0033d2b16", "testCaseId": "2724745064c397947229ef37c57663d4", "fullName": "test_execute_request.TestBPM#test_request", "labels": [{"name": "feature", "value": "认证接口"}, {"name": "story", "value": "登录系统"}, {"name": "severity", "value": "中"}, {"name": "epic", "value": "BPM系统"}, {"name": "suite", "value": "test_execute_request"}, {"name": "subSuite", "value": "TestBPM"}, {"name": "host", "value": "DESKTOP-V67H69U"}, {"name": "thread", "value": "10596-MainThread"}, {"name": "framework", "value": "pytest"}, {"name": "language", "value": "cpython3"}, {"name": "package", "value": "test_execute_request"}]}
\ No newline at end of file
{"uuid": "85e6496c-4491-438b-95be-8a20bec0e96a", "befores": [{"name": "mime_data", "status": "passed", "start": 1691390530322, "stop": 1691390530322}], "start": 1691390530322, "stop": 1691390530529}
\ No newline at end of file
{"uuid": "9de469fc-24f1-454f-b0cd-6c20c798ce16", "befores": [{"name": "method_data", "status": "passed", "start": 1691390527772, "stop": 1691390527772}], "start": 1691390527772, "stop": 1691390527844}
\ No newline at end of file
{"uuid": "117466a3-322b-48b4-8e52-61986e9ff9f6", "befores": [{"name": "case_data", "status": "passed", "start": 1691390530322, "stop": 1691390530322}], "start": 1691390530322, "stop": 1691390530524}
\ No newline at end of file
{"uuid": "70704cd7-6db6-4ae0-8a79-42e71e7cd15e", "befores": [{"name": "case_data", "status": "passed", "start": 1691390527773, "stop": 1691390527773}], "start": 1691390527773, "stop": 1691390527839}
\ No newline at end of file
{"uuid": "1c3a84b1-65df-4918-96ae-230727299a7d", "befores": [{"name": "title_data", "status": "passed", "start": 1691390530781, "stop": 1691390530781}], "start": 1691390530781, "stop": 1691390530972}
\ No newline at end of file
{"uuid": "9862bc84-67f1-41c9-8488-40d121c9bd85", "befores": [{"name": "sql_type", "status": "passed", "start": 1691390529145, "stop": 1691390529145}], "start": 1691390529145, "stop": 1691390529729}
\ No newline at end of file
{"uuid": "41f60791-0bd4-44e3-b3af-617fb417a8ef", "befores": [{"name": "expect_data", "status": "passed", "start": 1691390528856, "stop": 1691390528857}], "start": 1691390528856, "stop": 1691390528973}
\ No newline at end of file
{"uuid": "06df760f-ac57-4851-a87c-bee1f33ad0f2", "befores": [{"name": "sql_type", "status": "passed", "start": 1691390529000, "stop": 1691390529000}], "start": 1691390529000, "stop": 1691390529115}
\ No newline at end of file
{"uuid": "0ad141b6-430c-4a55-98c2-b137923e6a63", "befores": [{"name": "sql_data", "status": "passed", "start": 1691390529145, "stop": 1691390529145}], "start": 1691390529145, "stop": 1691390529728}
\ No newline at end of file
{"uuid": "f13d3948-8e2b-4f84-b946-b0b9bf913f06", "befores": [{"name": "jk_data", "status": "passed", "start": 1691390528538, "stop": 1691390528538}], "start": 1691390528538, "stop": 1691390528673}
\ No newline at end of file
{"uuid": "79f73461-9f51-4fa0-bf1f-9c2006e05274", "befores": [{"name": "method_data", "status": "passed", "start": 1691390528228, "stop": 1691390528228}], "start": 1691390528228, "stop": 1691390528373}
\ No newline at end of file
{"uuid": "4eaff433-0fd5-46a2-99f7-ffb513a386b2", "befores": [{"name": "url_data", "status": "passed", "start": 1691390528999, "stop": 1691390528999}], "start": 1691390528999, "stop": 1691390529123}
\ No newline at end of file
{"uuid": "03094c82-1e6e-4bd3-9090-0dae71175b7a", "befores": [{"name": "mime_data", "status": "passed", "start": 1691390528854, "stop": 1691390528854}], "start": 1691390528854, "stop": 1691390528980}
\ No newline at end of file
{"uuid": "0344cdcd-4b11-4bb2-94b2-310380f57ddb", "befores": [{"name": "sql_type", "status": "passed", "start": 1691390528094, "stop": 1691390528094}], "start": 1691390528094, "stop": 1691390528205}
\ No newline at end of file
{"uuid": "0afcba90-494f-47f7-a430-a97b56bc29a4", "children": ["911f8177-c3b4-47e5-bdc2-9b30a5961f52", "3dae06b2-a445-4bb5-95ef-f4dfe0f08444", "d51285b1-b376-41f4-898c-914fa70b6177", "5e677c7c-8f0c-4938-936a-6d0d9aca9d16", "7836758a-de65-4210-a040-bd0fdf1b1812", "373b5216-e07b-4334-8f37-40535a24d9dd", "0452a190-7e5d-49b9-b5ab-3ef9939463bc", "d7c1ef21-4c01-48fc-97b1-71c5cb2c05e3", "442296b1-3a4f-4c5b-99d8-ff6a3f816978", "12fdbada-1975-4fc9-8433-cedeb943db43", "a2019ceb-8baa-46c1-970d-a96e3a25124a", "a1319fe6-c645-44c4-bebc-7597241419a1", "29ed5c61-127a-4a73-8862-f26d2de657a5", "a9cf7aab-c515-4802-afb2-0b5419ad29e9", "dd79c2ce-1d7c-483f-9dbc-62fc3baf4b3e", "9d477f86-5798-4ac4-a1ba-43d7a61d28a4"], "befores": [{"name": "req_fix", "status": "passed", "start": 1691390527406, "stop": 1691390527509}], "afters": [{"name": "req_fix::0", "status": "passed", "start": 1691390531070, "stop": 1691390531070}], "start": 1691390527406, "stop": 1691390531070}
\ No newline at end of file
ERROR--2023-08-10 10:15:10--日志信息:模块名称为 认证接口, 接口名称为 刷新token, 用例级别为 中, 输入的数据为 None, 期望结果为 {'message': '刷新token成功'}, 实际结果为 {'token': 'eyJhbGciOiJIUzUxMiJ9.eyJzdWIiOiJhZG1pbiIsInRlbmFudElkIjoiLTEiLCJleHAiOjE2OTE3MjAxMDksImlhdCI6MTY5MTYzMzcwOX0.c-zHs6jHMMTXOcP8SyZ3oEl2YYr0-j9MqFZ7Y5Q9kuHwJGFyaM6dd2C9Sj8l8Kg20ugUh-kxZ5kQOt5gKprDig', 'username': '', 'account': '', 'userId': '', 'loginStatus': True, 'userAttrs': {}}
<!DOCTYPE html>
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8"/>
<title>Test Report</title>
<style>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;
}
#environment tr:nth-child(odd) {
background-color: #f6f6f6;
}
/******************************
* 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;
}
/******************************
* 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
*------------------*/
.log:only-child {
height: inherit;
}
.log {
background-color: #e6e6e6;
border: 1px solid #e6e6e6;
color: black;
display: block;
font-family: "Courier New", Courier, monospace;
height: 230px;
overflow-y: scroll;
padding: 5px;
white-space: pre-wrap;
}
div.image {
border: 1px solid #e6e6e6;
float: right;
height: 240px;
margin-left: 5px;
overflow: hidden;
width: 320px;
}
div.image img {
width: 320px;
}
div.video {
border: 1px solid #e6e6e6;
float: right;
height: 240px;
margin-left: 5px;
overflow: hidden;
width: 320px;
}
div.video video {
overflow: hidden;
width: 320px;
height: 240px;
}
.collapsed {
display: none;
}
.expander::after {
content: " (show details)";
color: #BBB;
font-style: italic;
cursor: pointer;
}
.collapser::after {
content: " (hide details)";
color: #BBB;
font-style: italic;
cursor: pointer;
}
/*------------------
* 3. Sorting items
*------------------*/
.sortable {
cursor: pointer;
}
.sort-icon {
font-size: 0px;
float: left;
margin-right: 5px;
margin-top: 5px;
/*triangle*/
width: 0;
height: 0;
border-left: 8px solid transparent;
border-right: 8px solid transparent;
}
.inactive .sort-icon {
/*finish triangle*/
border-top: 8px solid #E6E6E6;
}
.asc.active .sort-icon {
/*finish triangle*/
border-bottom: 8px solid #999;
}
.desc.active .sort-icon {
/*finish triangle*/
border-top: 8px solid #999;
}
</style></head>
<body onLoad="init()">
<script>/* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this file,
* You can obtain one at http://mozilla.org/MPL/2.0/. */
function toArray(iter) {
if (iter === null) {
return null;
}
return Array.prototype.slice.call(iter);
}
function find(selector, elem) { // eslint-disable-line no-redeclare
if (!elem) {
elem = document;
}
return elem.querySelector(selector);
}
function find_all(selector, elem) {
if (!elem) {
elem = document;
}
return toArray(elem.querySelectorAll(selector));
}
function sort_column(elem) {
toggle_sort_states(elem);
const colIndex = toArray(elem.parentNode.childNodes).indexOf(elem);
let key;
if (elem.classList.contains('result')) {
key = key_result;
} else if (elem.classList.contains('links')) {
key = key_link;
} else {
key = key_alpha;
}
sort_table(elem, key(colIndex));
}
function show_all_extras() { // eslint-disable-line no-unused-vars
find_all('.col-result').forEach(show_extras);
}
function hide_all_extras() { // eslint-disable-line no-unused-vars
find_all('.col-result').forEach(hide_extras);
}
function show_extras(colresult_elem) {
const extras = colresult_elem.parentNode.nextElementSibling;
const expandcollapse = colresult_elem.firstElementChild;
extras.classList.remove('collapsed');
expandcollapse.classList.remove('expander');
expandcollapse.classList.add('collapser');
}
function hide_extras(colresult_elem) {
const extras = colresult_elem.parentNode.nextElementSibling;
const expandcollapse = colresult_elem.firstElementChild;
extras.classList.add('collapsed');
expandcollapse.classList.remove('collapser');
expandcollapse.classList.add('expander');
}
function show_filters() {
const filter_items = document.getElementsByClassName('filter');
for (let i = 0; i < filter_items.length; i++)
filter_items[i].hidden = false;
}
function add_collapse() {
// Add links for show/hide all
const resulttable = find('table#results-table');
const showhideall = document.createElement('p');
showhideall.innerHTML = '<a href="javascript:show_all_extras()">Show all details</a> / ' +
'<a href="javascript:hide_all_extras()">Hide all details</a>';
resulttable.parentElement.insertBefore(showhideall, resulttable);
// Add show/hide link to each result
find_all('.col-result').forEach(function(elem) {
const collapsed = get_query_parameter('collapsed') || 'Passed';
const extras = elem.parentNode.nextElementSibling;
const expandcollapse = document.createElement('span');
if (extras.classList.contains('collapsed')) {
expandcollapse.classList.add('expander');
} else if (collapsed.includes(elem.innerHTML)) {
extras.classList.add('collapsed');
expandcollapse.classList.add('expander');
} else {
expandcollapse.classList.add('collapser');
}
elem.appendChild(expandcollapse);
elem.addEventListener('click', function(event) {
if (event.currentTarget.parentNode.nextElementSibling.classList.contains('collapsed')) {
show_extras(event.currentTarget);
} else {
hide_extras(event.currentTarget);
}
});
});
}
function get_query_parameter(name) {
const match = RegExp('[?&]' + name + '=([^&]*)').exec(window.location.search);
return match && decodeURIComponent(match[1].replace(/\+/g, ' '));
}
function init () { // eslint-disable-line no-unused-vars
reset_sort_headers();
add_collapse();
show_filters();
sort_column(find('.initial-sort'));
find_all('.sortable').forEach(function(elem) {
elem.addEventListener('click',
function() {
sort_column(elem);
}, false);
});
}
function sort_table(clicked, key_func) {
const rows = find_all('.results-table-row');
const reversed = !clicked.classList.contains('asc');
const sorted_rows = sort(rows, key_func, reversed);
/* Whole table is removed here because browsers acts much slower
* when appending existing elements.
*/
const thead = document.getElementById('results-table-head');
document.getElementById('results-table').remove();
const parent = document.createElement('table');
parent.id = 'results-table';
parent.appendChild(thead);
sorted_rows.forEach(function(elem) {
parent.appendChild(elem);
});
document.getElementsByTagName('BODY')[0].appendChild(parent);
}
function sort(items, key_func, reversed) {
const sort_array = items.map(function(item, i) {
return [key_func(item), i];
});
sort_array.sort(function(a, b) {
const key_a = a[0];
const key_b = b[0];
if (key_a == key_b) return 0;
if (reversed) {
return key_a < key_b ? 1 : -1;
} else {
return key_a > key_b ? 1 : -1;
}
});
return sort_array.map(function(item) {
const index = item[1];
return items[index];
});
}
function key_alpha(col_index) {
return function(elem) {
return elem.childNodes[1].childNodes[col_index].firstChild.data.toLowerCase();
};
}
function key_link(col_index) {
return function(elem) {
const dataCell = elem.childNodes[1].childNodes[col_index].firstChild;
return dataCell == null ? '' : dataCell.innerText.toLowerCase();
};
}
function key_result(col_index) {
return function(elem) {
const strings = ['Error', 'Failed', 'Rerun', 'XFailed', 'XPassed',
'Skipped', 'Passed'];
return strings.indexOf(elem.childNodes[1].childNodes[col_index].firstChild.data);
};
}
function reset_sort_headers() {
find_all('.sort-icon').forEach(function(elem) {
elem.parentNode.removeChild(elem);
});
find_all('.sortable').forEach(function(elem) {
const icon = document.createElement('div');
icon.className = 'sort-icon';
icon.textContent = 'vvv';
elem.insertBefore(icon, elem.firstChild);
elem.classList.remove('desc', 'active');
elem.classList.add('asc', 'inactive');
});
}
function toggle_sort_states(elem) {
//if active, toggle between asc and desc
if (elem.classList.contains('active')) {
elem.classList.toggle('asc');
elem.classList.toggle('desc');
}
//if inactive, reset all other functions and add ascending active
if (elem.classList.contains('inactive')) {
reset_sort_headers();
elem.classList.remove('inactive');
elem.classList.add('active');
}
}
function is_all_rows_hidden(value) {
return value.hidden == false;
}
function filter_table(elem) { // eslint-disable-line no-unused-vars
const outcome_att = 'data-test-result';
const outcome = elem.getAttribute(outcome_att);
const class_outcome = outcome + ' results-table-row';
const outcome_rows = document.getElementsByClassName(class_outcome);
for(let i = 0; i < outcome_rows.length; i++){
outcome_rows[i].hidden = !elem.checked;
}
const rows = find_all('.results-table-row').filter(is_all_rows_hidden);
const all_rows_hidden = rows.length == 0 ? true : false;
const not_found_message = document.getElementById('not-found-message');
not_found_message.hidden = !all_rows_hidden;
}
</script>
<h1>报告.html</h1>
<p>Report generated on 07-Aug-2023 at 11:26:40 by <a href="https://pypi.python.org/pypi/pytest-html">pytest-html</a> v3.1.0</p>
<h2>Summary</h2>
<p>16 tests ran in 2.51 seconds. </p>
<p class="filter" hidden="true">(Un)check the boxes to filter the results.</p><input checked="true" class="filter" data-test-result="passed" hidden="true" name="filter_checkbox" onChange="filter_table(this)" type="checkbox"/><span class="passed">13 passed</span>, <input checked="true" class="filter" data-test-result="skipped" disabled="true" hidden="true" name="filter_checkbox" onChange="filter_table(this)" type="checkbox"/><span class="skipped">0 skipped</span>, <input checked="true" class="filter" data-test-result="failed" hidden="true" name="filter_checkbox" onChange="filter_table(this)" type="checkbox"/><span class="failed">3 failed</span>, <input checked="true" class="filter" data-test-result="error" disabled="true" hidden="true" name="filter_checkbox" onChange="filter_table(this)" type="checkbox"/><span class="error">0 errors</span>, <input checked="true" class="filter" data-test-result="xfailed" disabled="true" hidden="true" name="filter_checkbox" onChange="filter_table(this)" type="checkbox"/><span class="xfailed">0 expected failures</span>, <input checked="true" class="filter" data-test-result="xpassed" disabled="true" hidden="true" name="filter_checkbox" onChange="filter_table(this)" type="checkbox"/><span class="xpassed">0 unexpected passes</span>, <input checked="true" class="filter" data-test-result="rerun" disabled="true" hidden="true" name="filter_checkbox" onChange="filter_table(this)" type="checkbox"/><span class="rerun">0 rerun</span>
<h2>Results</h2>
<table id="results-table">
<thead id="results-table-head">
<tr>
<th class="sortable result initial-sort" col="result">Result</th>
<th class="sortable" col="name">Test</th>
<th class="sortable" col="duration">Duration</th>
<th class="sortable links" col="links">Links</th></tr>
<tr hidden="true" id="not-found-message">
<th colspan="4">No results found. Try to check the filters</th></tr></thead>
<tbody class="failed results-table-row">
<tr>
<td class="col-result">Failed</td>
<td class="col-name">test_execute_request.py::TestBPM::test_request[认证接口-刷新token-get-None-http://120.46.172.186:8080/refresh-None-expect_data10-None-None-None]</td>
<td class="col-duration">0.09</td>
<td class="col-links"></td></tr>
<tr>
<td class="extra" colspan="4">
<div class="log">self = &lt;interface_接口优化2.test_case.test_execute_request.TestBPM object at 0x0000014C231F13D0&gt;<br/>req_fix = &lt;interface_接口优化2.comprehensive_request.request_method.Request object at 0x0000014C1FAF9C90&gt;<br/>db_fix = &lt;interface_接口优化2.data_extraction.db_sql.DB object at 0x0000014C22F13B90&gt;, mokuai_data = &#x27;认证接口&#x27;, jk_data = &#x27;刷新token&#x27;, method_data = &#x27;get&#x27;<br/>mime_data = None, url_data = &#x27;http://120.46.172.186:8080/refresh&#x27;, case_data = None, expect_data = {&#x27;message&#x27;: &#x27;刷新token成功&#x27;}, sql_type = None, sql_data = None<br/>update_key = None<br/><br/> @pytest.mark.parametrize(&quot;mokuai_data, jk_data, method_data, mime_data, url_data, case_data, expect_data, sql_type,&quot;<br/> &quot; sql_data, update_key&quot;, ReadExcel().all_data())<br/> def test_request(self, req_fix, db_fix, mokuai_data, jk_data, method_data, mime_data, url_data, case_data,<br/> expect_data, sql_type, sql_data, update_key):<br/> if sql_type is None:<br/> result = req_fix.all_request(method=method_data, url=url_data, mime=mime_data, data=case_data)<br/> <br/> elif sql_type == &quot;delete&quot;:<br/> db_fix.delete_sql(sql_data)<br/> result = req_fix.all_request(method=method_data, url=url_data, mime=mime_data, data=case_data)<br/> <br/> elif sql_type == &quot;select&quot;:<br/> re = db_fix.select_sql(sql_data)<br/> case_data[update_key] = re<br/> result = req_fix.all_request(method=method_data, url=url_data, mime=mime_data, data=case_data)<br/> <br/> elif sql_type == &quot;delete|select&quot; or sql_type == &quot;select|delete&quot;:<br/> db_fix.delete_sql(sql_data[&quot;delete&quot;])<br/> <br/> re = db_fix.select_sql(sql_data[&quot;select&quot;])<br/> case_data[update_key] = re<br/> result = req_fix.all_request(method=method_data, url=url_data, mime=mime_data, data=case_data)<br/> <br/> else:<br/> result = req_fix.request_all(method=method_data, url=url_data, mime=mime_data, case_data=case_data)<br/> <br/> try:<br/> for key in expect_data:<br/>&gt; assert expect_data[key] == result.json().get(key)<br/><span class="error">E AssertionError: assert &#x27;刷新token成功&#x27; == None</span><br/><span class="error">E + where None = &lt;built-in method get of dict object at 0x0000014C2320C940&gt;(&#x27;message&#x27;)</span><br/><span class="error">E + where &lt;built-in method get of dict object at 0x0000014C2320C940&gt; = {&#x27;account&#x27;: &#x27;&#x27;, &#x27;loginStatus&#x27;: True, &#x27;token&#x27;: &#x27;eyJhbGciOiJIUzUxMiJ9.eyJzdWIiOiJhZG1pbiIsInRlbmFudElkIjoiLTEiLCJleHAiOjE2OTE0NjUxOTgsImlhdCI6MTY5MTM3ODc5OH0.PR8DDtUr58CHYO72C89AX37NdYo7ckF9_RlZ97uowBSb_gJpJdwWaS_qoyl5NGOCPR0PuHRuWcoDUWdOUkqRDQ&#x27;, &#x27;userAttrs&#x27;: {}, ...}.get</span><br/><span class="error">E + where {&#x27;account&#x27;: &#x27;&#x27;, &#x27;loginStatus&#x27;: True, &#x27;token&#x27;: &#x27;eyJhbGciOiJIUzUxMiJ9.eyJzdWIiOiJhZG1pbiIsInRlbmFudElkIjoiLTEiLCJleHAiOjE2OTE0NjUxOTgsImlhdCI6MTY5MTM3ODc5OH0.PR8DDtUr58CHYO72C89AX37NdYo7ckF9_RlZ97uowBSb_gJpJdwWaS_qoyl5NGOCPR0PuHRuWcoDUWdOUkqRDQ&#x27;, &#x27;userAttrs&#x27;: {}, ...} = &lt;bound method Response.json of &lt;Response [200]&gt;&gt;()</span><br/><span class="error">E + where &lt;bound method Response.json of &lt;Response [200]&gt;&gt; = &lt;Response [200]&gt;.json</span><br/><br/>test_execute_request.py:53: AssertionError<br/><br/>During handling of the above exception, another exception occurred:<br/><br/>self = &lt;interface_接口优化2.test_case.test_execute_request.TestBPM object at 0x0000014C231F13D0&gt;<br/>req_fix = &lt;interface_接口优化2.comprehensive_request.request_method.Request object at 0x0000014C1FAF9C90&gt;<br/>db_fix = &lt;interface_接口优化2.data_extraction.db_sql.DB object at 0x0000014C22F13B90&gt;, mokuai_data = &#x27;认证接口&#x27;, jk_data = &#x27;刷新token&#x27;, method_data = &#x27;get&#x27;<br/>mime_data = None, url_data = &#x27;http://120.46.172.186:8080/refresh&#x27;, case_data = None, expect_data = {&#x27;message&#x27;: &#x27;刷新token成功&#x27;}, sql_type = None, sql_data = None<br/>update_key = None<br/><br/> @pytest.mark.parametrize(&quot;mokuai_data, jk_data, method_data, mime_data, url_data, case_data, expect_data, sql_type,&quot;<br/> &quot; sql_data, update_key&quot;, ReadExcel().all_data())<br/> def test_request(self, req_fix, db_fix, mokuai_data, jk_data, method_data, mime_data, url_data, case_data,<br/> expect_data, sql_type, sql_data, update_key):<br/> if sql_type is None:<br/> result = req_fix.all_request(method=method_data, url=url_data, mime=mime_data, data=case_data)<br/> <br/> elif sql_type == &quot;delete&quot;:<br/> db_fix.delete_sql(sql_data)<br/> result = req_fix.all_request(method=method_data, url=url_data, mime=mime_data, data=case_data)<br/> <br/> elif sql_type == &quot;select&quot;:<br/> re = db_fix.select_sql(sql_data)<br/> case_data[update_key] = re<br/> result = req_fix.all_request(method=method_data, url=url_data, mime=mime_data, data=case_data)<br/> <br/> elif sql_type == &quot;delete|select&quot; or sql_type == &quot;select|delete&quot;:<br/> db_fix.delete_sql(sql_data[&quot;delete&quot;])<br/> <br/> re = db_fix.select_sql(sql_data[&quot;select&quot;])<br/> case_data[update_key] = re<br/> result = req_fix.all_request(method=method_data, url=url_data, mime=mime_data, data=case_data)<br/> <br/> else:<br/> result = req_fix.request_all(method=method_data, url=url_data, mime=mime_data, case_data=case_data)<br/> <br/> try:<br/> for key in expect_data:<br/> assert expect_data[key] == result.json().get(key)<br/> <br/> except:<br/>&gt; raise AssertionError(&quot;断言失败&quot;)<br/><span class="error">E AssertionError: 断言失败</span><br/><br/>test_execute_request.py:56: AssertionError<br/></div></td></tr></tbody>
<tbody class="failed results-table-row">
<tr>
<td class="col-result">Failed</td>
<td class="col-name">test_execute_request.py::TestBPM::test_request[组织管理-删除组织-post-text/plain-http://120.46.172.186:8080/api/org/v1/org/deleteOrg-一个不知名组织-expect_data14-None-None-None]</td>
<td class="col-duration">0.05</td>
<td class="col-links"></td></tr>
<tr>
<td class="extra" colspan="4">
<div class="log">self = &lt;interface_接口优化2.test_case.test_execute_request.TestBPM object at 0x0000014C231F2090&gt;<br/>req_fix = &lt;interface_接口优化2.comprehensive_request.request_method.Request object at 0x0000014C1FAF9C90&gt;<br/>db_fix = &lt;interface_接口优化2.data_extraction.db_sql.DB object at 0x0000014C22F13B90&gt;, mokuai_data = &#x27;组织管理&#x27;, jk_data = &#x27;删除组织&#x27;, method_data = &#x27;post&#x27;<br/>mime_data = &#x27;text/plain&#x27;, url_data = &#x27;http://120.46.172.186:8080/api/org/v1/org/deleteOrg&#x27;, case_data = &#x27;一个不知名组织&#x27;<br/>expect_data = {&#x27;message&#x27;: &#x27;删除组织成功!&#x27;, &#x27;state&#x27;: True}, sql_type = None, sql_data = None, update_key = None<br/><br/> @pytest.mark.parametrize(&quot;mokuai_data, jk_data, method_data, mime_data, url_data, case_data, expect_data, sql_type,&quot;<br/> &quot; sql_data, update_key&quot;, ReadExcel().all_data())<br/> def test_request(self, req_fix, db_fix, mokuai_data, jk_data, method_data, mime_data, url_data, case_data,<br/> expect_data, sql_type, sql_data, update_key):<br/> if sql_type is None:<br/> result = req_fix.all_request(method=method_data, url=url_data, mime=mime_data, data=case_data)<br/> <br/> elif sql_type == &quot;delete&quot;:<br/> db_fix.delete_sql(sql_data)<br/> result = req_fix.all_request(method=method_data, url=url_data, mime=mime_data, data=case_data)<br/> <br/> elif sql_type == &quot;select&quot;:<br/> re = db_fix.select_sql(sql_data)<br/> case_data[update_key] = re<br/> result = req_fix.all_request(method=method_data, url=url_data, mime=mime_data, data=case_data)<br/> <br/> elif sql_type == &quot;delete|select&quot; or sql_type == &quot;select|delete&quot;:<br/> db_fix.delete_sql(sql_data[&quot;delete&quot;])<br/> <br/> re = db_fix.select_sql(sql_data[&quot;select&quot;])<br/> case_data[update_key] = re<br/> result = req_fix.all_request(method=method_data, url=url_data, mime=mime_data, data=case_data)<br/> <br/> else:<br/> result = req_fix.request_all(method=method_data, url=url_data, mime=mime_data, case_data=case_data)<br/> <br/> try:<br/> for key in expect_data:<br/>&gt; assert expect_data[key] == result.json().get(key)<br/><span class="error">E AssertionError: assert &#x27;删除组织成功!&#x27; == &#x27;部分删除成功,其中编码为【一个�】的组织不存在;&#x27;</span><br/><span class="error">E - 部分删除成功,其中编码为【一个�】的组织不存在;</span><br/><span class="error">E + 删除组织成功!</span><br/><br/>test_execute_request.py:53: AssertionError<br/><br/>During handling of the above exception, another exception occurred:<br/><br/>self = &lt;interface_接口优化2.test_case.test_execute_request.TestBPM object at 0x0000014C231F2090&gt;<br/>req_fix = &lt;interface_接口优化2.comprehensive_request.request_method.Request object at 0x0000014C1FAF9C90&gt;<br/>db_fix = &lt;interface_接口优化2.data_extraction.db_sql.DB object at 0x0000014C22F13B90&gt;, mokuai_data = &#x27;组织管理&#x27;, jk_data = &#x27;删除组织&#x27;, method_data = &#x27;post&#x27;<br/>mime_data = &#x27;text/plain&#x27;, url_data = &#x27;http://120.46.172.186:8080/api/org/v1/org/deleteOrg&#x27;, case_data = &#x27;一个不知名组织&#x27;<br/>expect_data = {&#x27;message&#x27;: &#x27;删除组织成功!&#x27;, &#x27;state&#x27;: True}, sql_type = None, sql_data = None, update_key = None<br/><br/> @pytest.mark.parametrize(&quot;mokuai_data, jk_data, method_data, mime_data, url_data, case_data, expect_data, sql_type,&quot;<br/> &quot; sql_data, update_key&quot;, ReadExcel().all_data())<br/> def test_request(self, req_fix, db_fix, mokuai_data, jk_data, method_data, mime_data, url_data, case_data,<br/> expect_data, sql_type, sql_data, update_key):<br/> if sql_type is None:<br/> result = req_fix.all_request(method=method_data, url=url_data, mime=mime_data, data=case_data)<br/> <br/> elif sql_type == &quot;delete&quot;:<br/> db_fix.delete_sql(sql_data)<br/> result = req_fix.all_request(method=method_data, url=url_data, mime=mime_data, data=case_data)<br/> <br/> elif sql_type == &quot;select&quot;:<br/> re = db_fix.select_sql(sql_data)<br/> case_data[update_key] = re<br/> result = req_fix.all_request(method=method_data, url=url_data, mime=mime_data, data=case_data)<br/> <br/> elif sql_type == &quot;delete|select&quot; or sql_type == &quot;select|delete&quot;:<br/> db_fix.delete_sql(sql_data[&quot;delete&quot;])<br/> <br/> re = db_fix.select_sql(sql_data[&quot;select&quot;])<br/> case_data[update_key] = re<br/> result = req_fix.all_request(method=method_data, url=url_data, mime=mime_data, data=case_data)<br/> <br/> else:<br/> result = req_fix.request_all(method=method_data, url=url_data, mime=mime_data, case_data=case_data)<br/> <br/> try:<br/> for key in expect_data:<br/> assert expect_data[key] == result.json().get(key)<br/> <br/> except:<br/>&gt; raise AssertionError(&quot;断言失败&quot;)<br/><span class="error">E AssertionError: 断言失败</span><br/><br/>test_execute_request.py:56: AssertionError<br/></div></td></tr></tbody>
<tbody class="failed results-table-row">
<tr>
<td class="col-result">Failed</td>
<td class="col-name">test_execute_request.py::TestBPM::test_request[维度管理-根据维度编码删除维度-DELETE-query-http://120.46.172.186:8080/api/demension/v1/dem/deleteDemByIds-case_data15-expect_data15-select-SELECT ID_ FROM uc_demension WHERE `CODE_`=&quot;一个不知名维度&quot;;-ids]</td>
<td class="col-duration">0.14</td>
<td class="col-links"></td></tr>
<tr>
<td class="extra" colspan="4">
<div class="log">self = &lt;interface_接口优化2.test_case.test_execute_request.TestBPM object at 0x0000014C231F3690&gt;<br/>req_fix = &lt;interface_接口优化2.comprehensive_request.request_method.Request object at 0x0000014C1FAF9C90&gt;<br/>db_fix = &lt;interface_接口优化2.data_extraction.db_sql.DB object at 0x0000014C22F13B90&gt;, mokuai_data = &#x27;维度管理&#x27;, jk_data = &#x27;根据维度编码删除维度&#x27;, method_data = &#x27;DELETE&#x27;<br/>mime_data = &#x27;query&#x27;, url_data = &#x27;http://120.46.172.186:8080/api/demension/v1/dem/deleteDemByIds&#x27;, case_data = {&#x27;ids&#x27;: &#x27;1688391173007228928&#x27;}<br/>expect_data = {&#x27;message&#x27;: &#x27;删除维度成功!&#x27;, &#x27;state&#x27;: True}, sql_type = &#x27;select&#x27;, sql_data = &#x27;SELECT ID_ FROM uc_demension WHERE `CODE_`=&quot;一个不知名维度&quot;;&#x27;<br/>update_key = &#x27;ids&#x27;<br/><br/> @pytest.mark.parametrize(&quot;mokuai_data, jk_data, method_data, mime_data, url_data, case_data, expect_data, sql_type,&quot;<br/> &quot; sql_data, update_key&quot;, ReadExcel().all_data())<br/> def test_request(self, req_fix, db_fix, mokuai_data, jk_data, method_data, mime_data, url_data, case_data,<br/> expect_data, sql_type, sql_data, update_key):<br/> if sql_type is None:<br/> result = req_fix.all_request(method=method_data, url=url_data, mime=mime_data, data=case_data)<br/> <br/> elif sql_type == &quot;delete&quot;:<br/> db_fix.delete_sql(sql_data)<br/> result = req_fix.all_request(method=method_data, url=url_data, mime=mime_data, data=case_data)<br/> <br/> elif sql_type == &quot;select&quot;:<br/> re = db_fix.select_sql(sql_data)<br/> case_data[update_key] = re<br/> result = req_fix.all_request(method=method_data, url=url_data, mime=mime_data, data=case_data)<br/> <br/> elif sql_type == &quot;delete|select&quot; or sql_type == &quot;select|delete&quot;:<br/> db_fix.delete_sql(sql_data[&quot;delete&quot;])<br/> <br/> re = db_fix.select_sql(sql_data[&quot;select&quot;])<br/> case_data[update_key] = re<br/> result = req_fix.all_request(method=method_data, url=url_data, mime=mime_data, data=case_data)<br/> <br/> else:<br/> result = req_fix.request_all(method=method_data, url=url_data, mime=mime_data, case_data=case_data)<br/> <br/> try:<br/> for key in expect_data:<br/>&gt; assert expect_data[key] == result.json().get(key)<br/><span class="error">E AssertionError: assert True == False</span><br/><span class="error">E + where False = &lt;built-in method get of dict object at 0x0000014C232C1540&gt;(&#x27;state&#x27;)</span><br/><span class="error">E + where &lt;built-in method get of dict object at 0x0000014C232C1540&gt; = {&#x27;message&#x27;: &#x27;【明珠(一个不知名维度)】的维度下存在组织,不允许删除 &#x27;, &#x27;state&#x27;: False, &#x27;value&#x27;: &#x27;&#x27;}.get</span><br/><span class="error">E + where {&#x27;message&#x27;: &#x27;【明珠(一个不知名维度)】的维度下存在组织,不允许删除 &#x27;, &#x27;state&#x27;: False, &#x27;value&#x27;: &#x27;&#x27;} = &lt;bound method Response.json of &lt;Response [200]&gt;&gt;()</span><br/><span class="error">E + where &lt;bound method Response.json of &lt;Response [200]&gt;&gt; = &lt;Response [200]&gt;.json</span><br/><br/>test_execute_request.py:53: AssertionError<br/><br/>During handling of the above exception, another exception occurred:<br/><br/>self = &lt;interface_接口优化2.test_case.test_execute_request.TestBPM object at 0x0000014C231F3690&gt;<br/>req_fix = &lt;interface_接口优化2.comprehensive_request.request_method.Request object at 0x0000014C1FAF9C90&gt;<br/>db_fix = &lt;interface_接口优化2.data_extraction.db_sql.DB object at 0x0000014C22F13B90&gt;, mokuai_data = &#x27;维度管理&#x27;, jk_data = &#x27;根据维度编码删除维度&#x27;, method_data = &#x27;DELETE&#x27;<br/>mime_data = &#x27;query&#x27;, url_data = &#x27;http://120.46.172.186:8080/api/demension/v1/dem/deleteDemByIds&#x27;, case_data = {&#x27;ids&#x27;: &#x27;1688391173007228928&#x27;}<br/>expect_data = {&#x27;message&#x27;: &#x27;删除维度成功!&#x27;, &#x27;state&#x27;: True}, sql_type = &#x27;select&#x27;, sql_data = &#x27;SELECT ID_ FROM uc_demension WHERE `CODE_`=&quot;一个不知名维度&quot;;&#x27;<br/>update_key = &#x27;ids&#x27;<br/><br/> @pytest.mark.parametrize(&quot;mokuai_data, jk_data, method_data, mime_data, url_data, case_data, expect_data, sql_type,&quot;<br/> &quot; sql_data, update_key&quot;, ReadExcel().all_data())<br/> def test_request(self, req_fix, db_fix, mokuai_data, jk_data, method_data, mime_data, url_data, case_data,<br/> expect_data, sql_type, sql_data, update_key):<br/> if sql_type is None:<br/> result = req_fix.all_request(method=method_data, url=url_data, mime=mime_data, data=case_data)<br/> <br/> elif sql_type == &quot;delete&quot;:<br/> db_fix.delete_sql(sql_data)<br/> result = req_fix.all_request(method=method_data, url=url_data, mime=mime_data, data=case_data)<br/> <br/> elif sql_type == &quot;select&quot;:<br/> re = db_fix.select_sql(sql_data)<br/> case_data[update_key] = re<br/> result = req_fix.all_request(method=method_data, url=url_data, mime=mime_data, data=case_data)<br/> <br/> elif sql_type == &quot;delete|select&quot; or sql_type == &quot;select|delete&quot;:<br/> db_fix.delete_sql(sql_data[&quot;delete&quot;])<br/> <br/> re = db_fix.select_sql(sql_data[&quot;select&quot;])<br/> case_data[update_key] = re<br/> result = req_fix.all_request(method=method_data, url=url_data, mime=mime_data, data=case_data)<br/> <br/> else:<br/> result = req_fix.request_all(method=method_data, url=url_data, mime=mime_data, case_data=case_data)<br/> <br/> try:<br/> for key in expect_data:<br/> assert expect_data[key] == result.json().get(key)<br/> <br/> except:<br/>&gt; raise AssertionError(&quot;断言失败&quot;)<br/><span class="error">E AssertionError: 断言失败</span><br/><br/>test_execute_request.py:56: AssertionError<br/></div></td></tr></tbody>
<tbody class="passed results-table-row">
<tr>
<td class="col-result">Passed</td>
<td class="col-name">test_execute_request.py::TestBPM::test_request[认证接口-登录系统-POST-application/json-http://120.46.172.186:8080/auth-case_data0-expect_data0-None-None-None]</td>
<td class="col-duration">0.43</td>
<td class="col-links"></td></tr>
<tr>
<td class="extra" colspan="4">
<div class="log"> ------------------------------Captured stdout call------------------------------ <br/>断言成功
<br/></div></td></tr></tbody>
<tbody class="passed results-table-row">
<tr>
<td class="col-result">Passed</td>
<td class="col-name">test_execute_request.py::TestBPM::test_request[认证接口-登录系统-POST-application/json-http://120.46.172.186:8080/auth-case_data1-expect_data1-None-None-None]</td>
<td class="col-duration">0.05</td>
<td class="col-links"></td></tr>
<tr>
<td class="extra" colspan="4">
<div class="log"> ------------------------------Captured stdout call------------------------------ <br/>断言成功
<br/></div></td></tr></tbody>
<tbody class="passed results-table-row">
<tr>
<td class="col-result">Passed</td>
<td class="col-name">test_execute_request.py::TestBPM::test_request[认证接口-登录系统-POST-application/json-http://120.46.172.186:8080/auth-case_data2-expect_data2-None-None-None]</td>
<td class="col-duration">0.09</td>
<td class="col-links"></td></tr>
<tr>
<td class="extra" colspan="4">
<div class="log"> ------------------------------Captured stdout call------------------------------ <br/>断言成功
<br/></div></td></tr></tbody>
<tbody class="passed results-table-row">
<tr>
<td class="col-result">Passed</td>
<td class="col-name">test_execute_request.py::TestBPM::test_request[认证接口-登录系统-POST-application/json-http://120.46.172.186:8080/auth-case_data3-expect_data3-None-None-None]</td>
<td class="col-duration">0.09</td>
<td class="col-links"></td></tr>
<tr>
<td class="extra" colspan="4">
<div class="log"> ------------------------------Captured stdout call------------------------------ <br/>断言成功
<br/></div></td></tr></tbody>
<tbody class="passed results-table-row">
<tr>
<td class="col-result">Passed</td>
<td class="col-name">test_execute_request.py::TestBPM::test_request[认证接口-登录系统-POST-application/json-http://120.46.172.186:8080/auth-case_data4-expect_data4-None-None-None]</td>
<td class="col-duration">0.09</td>
<td class="col-links"></td></tr>
<tr>
<td class="extra" colspan="4">
<div class="log"> ------------------------------Captured stdout call------------------------------ <br/>断言成功
<br/></div></td></tr></tbody>
<tbody class="passed results-table-row">
<tr>
<td class="col-result">Passed</td>
<td class="col-name">test_execute_request.py::TestBPM::test_request[认证接口-登录系统-POST-json-http://120.46.172.186:8080/auth-case_data5-expect_data5-None-None-None]</td>
<td class="col-duration">0.09</td>
<td class="col-links"></td></tr>
<tr>
<td class="extra" colspan="4">
<div class="log"> ------------------------------Captured stdout call------------------------------ <br/>断言成功
<br/></div></td></tr></tbody>
<tbody class="passed results-table-row">
<tr>
<td class="col-result">Passed</td>
<td class="col-name">test_execute_request.py::TestBPM::test_request[认证接口-登录系统-POST-application/json-http://120.46.172.186:8080/auth-case_data6-expect_data6-None-None-None]</td>
<td class="col-duration">0.09</td>
<td class="col-links"></td></tr>
<tr>
<td class="extra" colspan="4">
<div class="log"> ------------------------------Captured stdout call------------------------------ <br/>断言成功
<br/></div></td></tr></tbody>
<tbody class="passed results-table-row">
<tr>
<td class="col-result">Passed</td>
<td class="col-name">test_execute_request.py::TestBPM::test_request[认证接口-登录系统-POST-application/json-http://120.46.172.186:8080/auth-case_data7-expect_data7-None-None-None]</td>
<td class="col-duration">0.09</td>
<td class="col-links"></td></tr>
<tr>
<td class="extra" colspan="4">
<div class="log"> ------------------------------Captured stdout call------------------------------ <br/>断言成功
<br/></div></td></tr></tbody>
<tbody class="passed results-table-row">
<tr>
<td class="col-result">Passed</td>
<td class="col-name">test_execute_request.py::TestBPM::test_request[认证接口-登录系统-PoST-application/json-http://120.46.172.186:8080/auth-case_data8-expect_data8-None-None-None]</td>
<td class="col-duration">0.09</td>
<td class="col-links"></td></tr>
<tr>
<td class="extra" colspan="4">
<div class="log"> ------------------------------Captured stdout call------------------------------ <br/>断言成功
<br/></div></td></tr></tbody>
<tbody class="passed results-table-row">
<tr>
<td class="col-result">Passed</td>
<td class="col-name">test_execute_request.py::TestBPM::test_request[认证接口-登录系统-POST-application/json-http://120.46.172.186:8080/auth-case_data9-expect_data9-None-None-None]</td>
<td class="col-duration">0.10</td>
<td class="col-links"></td></tr>
<tr>
<td class="extra" colspan="4">
<div class="log"> ------------------------------Captured stdout call------------------------------ <br/>断言成功
<br/></div></td></tr></tbody>
<tbody class="passed results-table-row">
<tr>
<td class="col-result">Passed</td>
<td class="col-name">test_execute_request.py::TestBPM::test_request[维度管理-添加维度-post-application/json-http://120.46.172.186:8080/api/demension/v1/dem/addDem-case_data11-expect_data11-delete-DELETE FROM uc_demension WHERE `CODE_`=&quot;一个不知名维度&quot;;-None]</td>
<td class="col-duration">0.14</td>
<td class="col-links"></td></tr>
<tr>
<td class="extra" colspan="4">
<div class="log"> ------------------------------Captured stdout call------------------------------ <br/>断言成功
<br/></div></td></tr></tbody>
<tbody class="passed results-table-row">
<tr>
<td class="col-result">Passed</td>
<td class="col-name">test_execute_request.py::TestBPM::test_request[组织管理-添加组织-post-application/json-http://120.46.172.186:8080/api/org/v1/org/addOrg-case_data12-expect_data12-delete|select-sql_data12-demId]</td>
<td class="col-duration">0.18</td>
<td class="col-links"></td></tr>
<tr>
<td class="extra" colspan="4">
<div class="log"> ------------------------------Captured stdout call------------------------------ <br/>断言成功
<br/></div></td></tr></tbody>
<tbody class="passed results-table-row">
<tr>
<td class="col-result">Passed</td>
<td class="col-name">test_execute_request.py::TestBPM::test_request[组织管理-保存组织参数-post-json|query-http://120.46.172.186:8080/api/org/v1/orgParam/saveOrgParams-case_data13-expect_data13-None-None-None]</td>
<td class="col-duration">0.07</td>
<td class="col-links"></td></tr>
<tr>
<td class="extra" colspan="4">
<div class="log"> ------------------------------Captured stdout call------------------------------ <br/>断言成功
<br/></div></td></tr></tbody></table></body></html>
\ No newline at end of file
# -*-coding:utf-8 -*- #
# ---------------------------------------------------------------------------
# ProjectName: pythonProject
# FileName: __init__.py
# Author: xxxxxxx
# Datetime: 2023/8/7 10:27
# Description:
#
# ---------------------------------------------------------------------------
# -*-coding:utf-8 -*- #
# ---------------------------------------------------------------------------
# ProjectName: pythonProject
# FileName: conftest.py
# Author: xxxxxxx
# Datetime: 2023/8/5 17:04
# Description:
#
# ---------------------------------------------------------------------------
import pytest
from interface_bpm.comprehensive_request.request_method import Request
from interface_bpm.data_extraction.db_sql import DB
@pytest.fixture(scope="session")
def req_fix():
req = Request()
yield req
@pytest.fixture(scope="session")
def db_fix():
db = DB()
yield db
def pytest_collection_modifyitems(items):
for item in items:
item.name = item.name.encode("utf-8").decode("unicode-escape")
item._nodeid = item._nodeid.encode("utf-8").decode("unicode-escape")
\ No newline at end of file
[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=error
;设置日志在文件中的信息格式
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
# -*-coding:utf-8 -*- #
# ---------------------------------------------------------------------------
# ProjectName: pythonProject
# FileName: test_execute_request.py
# Author: xxxxxxx
# Datetime: 2023/8/5 17:05
# Description:
#
# ---------------------------------------------------------------------------
"""
流程:
1.创建一个装饰器,用来生成一个请求类对象,在请求前先获取所需要的数据,再进行请求
2.创建一个装饰器,用来生成一个读取excel的类对象,用于判断执行sql语句,将需要的值更新到json文件中去
3.判断如果需要先删除数据库,就先删除再执行请求
4.判断如果需要先查询一个结果更新到json文件中,就先执行sql语句,更新到文件中,再执行请求
5.判断不需要数据库操作,则直接执行请求
6.判断啊如果又需要删除和查询的操作
"""
import logging
import pytest
from interface_bpm.data_extraction.read_excel import ReadExcel
import allure
@allure.epic("BPM系统")
class TestBPM:
@pytest.mark.parametrize("mokuai_data, jk_data, title_data, level_data, method_data, mime_data, url_data, "
"case_data, expect_data, sql_type,"" sql_data, update_key", ReadExcel().all_data())
def test_request(self, req_fix, db_fix, mokuai_data, jk_data, title_data, level_data, method_data, mime_data,
url_data, case_data, expect_data, sql_type, sql_data, update_key):
allure.dynamic.feature(mokuai_data)
allure.dynamic.story(jk_data)
allure.dynamic.title(title_data)
allure.dynamic.severity(level_data)
if sql_type is None:
result = req_fix.all_request(method=method_data, url=url_data, mime=mime_data, data=case_data)
elif sql_type == "delete":
db_fix.delete_sql(sql_data)
result = req_fix.all_request(method=method_data, url=url_data, mime=mime_data, data=case_data)
elif sql_type == "select":
re = db_fix.select_sql(sql_data)
case_data[update_key] = re
result = req_fix.all_request(method=method_data, url=url_data, mime=mime_data, data=case_data)
elif sql_type == "delete|select" or sql_type == "select|delete":
db_fix.delete_sql(sql_data["delete"])
re = db_fix.select_sql(sql_data["select"])
case_data[update_key] = re
result = req_fix.all_request(method=method_data, url=url_data, mime=mime_data, data=case_data)
else:
result = req_fix.request_all(method=method_data, url=url_data, mime=mime_data, case_data=case_data)
try:
for key in expect_data:
assert expect_data[key] == result.json().get(key)
except:
logging.error("日志信息:"'模块名称为 {}, 接口名称为 {}, 用例级别为 {}, 输入的数据为 {}, 期望结果为 {}, 实际结果为 {}'
.format(mokuai_data, jk_data, level_data, case_data, expect_data, result.json()))
raise AssertionError("断言失败")
else:
print("断言成功")
if __name__ == '__main__':
pytest.main()
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