Commit 7cc41d8d by dwj

接口自动化框架

parent b3a9b776
# -*-coding:utf-8 -*- #
# ---------------------------------------------------------------------------
# ProjectName: 框架
# FileName: __init__.py
# Author: xxxxxxx
# Datetime: 2023/11/4 9:39
# Description:
# 命名规范:文件名全小写+下划线,类名大驼峰,方法和变量小写+下划线连接,
# 常量大写,变量和常量用名词,方法用动词
# ---------------------------------------------------------------------------
# -*-coding:utf-8 -*- #
# ---------------------------------------------------------------------------
# ProjectName: 框架
# FileName: __init__.py
# Author: xxxxxxx
# Datetime: 2023/11/4 9:39
# Description:
# 命名规范:文件名全小写+下划线,类名大驼峰,方法和变量小写+下划线连接,
# 常量大写,变量和常量用名词,方法用动词
# ---------------------------------------------------------------------------
from InterfaceAutoTest_2.common.log import write_log
log = write_log()
\ No newline at end of file
# -*-coding:utf-8 -*- #
# ---------------------------------------------------------------------------
# ProjectName: 框架
# FileName: db.py
# Author: xxxxxxx
# Datetime: 2023/11/4 14:06
# Description:
# 命名规范:文件名全小写+下划线,类名大驼峰,方法和变量小写+下划线连接,
# 常量大写,变量和常量用名词,方法用动词
# ---------------------------------------------------------------------------
import pymysql
from InterfaceAutoTest_2.common import log
from InterfaceAutoTest_2.common.read_ini import ReadIni
class DB:
def __init__(self):
"""连接数据库,获取连接对象和游标对象"""
read_ini = ReadIni()
try:
self.conn = pymysql.connect(
host=read_ini.get_sql_message("host"),
port=read_ini.get_sql_message("port"),
user=read_ini.get_sql_message("user"),
password=read_ini.get_sql_message("pwd"),
database=read_ini.get_sql_message("database"),
charset="utf-8"
)
self.cursor = self.conn.cursor()
except:
log.error("连接数据库错误或获取游标对象失败")
raise pymysql.MySQLError("连接数据库错误或获取游标对象失败")
def close(self):
self.cursor.close()
self.conn.close()
def delete(self, sql):
"""执行删除的sql语句"""
try:
self.cursor.execute(sql)
self.conn.commit()
except:
log.error("执行删除的sql语句错误,请查看对应的sql语句")
raise ValueError("执行删除的sql语句错误,请查看对应的sql语句")
def select(self, sql, num=None):
"""执行查询的sql语句"""
try:
self.cursor.execute(sql)
select_result = self.cursor.fetchall()
if select_result:
return select_result[0][0]
elif select_result and num == 2:
return select_result[0][0], select_result[0][1]
elif select_result and num > 3:
return select_result
except:
log.error("执行查询的sql语句错误,请查看对应的sql语句")
raise ValueError("执行查询的sql语句错误,请查看对应的sql语句")
\ No newline at end of file
# -*-coding:utf-8 -*- #
# ---------------------------------------------------------------------------
# ProjectName: 框架
# FileName: log.py
# Author: xxxxxxx
# Datetime: 2023/11/4 9:43
# Description:
# 命名规范:文件名全小写+下划线,类名大驼峰,方法和变量小写+下划线连接,
# 常量大写,变量和常量用名词,方法用动词
# ---------------------------------------------------------------------------
import logging
import os
def write_log():
"""创建写入日志对象"""
logger = logging.getLogger(name="test")
# 获取日志目录
log_path = os.path.join(os.path.dirname(os.path.dirname(__file__)), "report/log/InterfaceAutoTest.log")
# 文件的操作模式
handler = logging.FileHandler(log_path, mode="a", encoding="utf-8")
# 显示的格式
format = logging.Formatter('%(asctime)s - %(filename)s[line:%(lineno)d] - %(levelname)s: %(message)s - %(name)s')
handler.setFormatter(format)
logger.addHandler(handler)
return logger
\ No newline at end of file
# -*-coding:utf-8 -*- #
# ---------------------------------------------------------------------------
# ProjectName: 框架
# FileName: read_excel.py
# Author: xxxxxxx
# Datetime: 2023/11/4 14:04
# Description:
# 命名规范:文件名全小写+下划线,类名大驼峰,方法和变量小写+下划线连接,
# 常量大写,变量和常量用名词,方法用动词
# ---------------------------------------------------------------------------
import openpyxl
from InterfaceAutoTest_2.common import log
from InterfaceAutoTest_2.common.read_ini import ReadIni
from InterfaceAutoTest_2.common.read_json import read_json
class ReadExcel:
def __init__(self):
"""获取数据配置层中,除了ini文件以外的所有文件的路径,再获取excel的工作表,再读取所有的json文件"""
self.read_ini = ReadIni()
excel_path = self.read_ini.get_file_path("excel")
case_data_path = self.read_ini.get_file_path("case")
except_data_path = self.read_ini.get_file_path("expect")
sql_data_path = self.read_ini.get_file_path("sql")
# 获取工作表名称
table_name = self.read_ini.get_table_name("table_name")
wb = openpyxl.load_workbook(excel_path)
try:
self.ws = wb[table_name]
except:
log.error("获取工作表失败,请查看工作表名称是否配置正确")
raise KeyError("获取工作表失败,请查看工作表名称是否配置正确")
self.case_data_dict = read_json(case_data_path)
self.except_data_dict = read_json(except_data_path)
self.sql_data_dict = read_json(sql_data_path)
def __get_cell_value(self, column, row):
try:
value = self.ws[column + str(row)].value
if value is None:
return None
elif value.strip():
return value.strip()
except:
log.error("获取指定单元格数据失败,请查看输入的列号和行号是否正确")
raise KeyError("获取指定单元格数据失败,请查看输入的列号和行号是否正确")
def module_name(self, row):
"""根据行号获取模块名称"""
return self.__get_cell_value("B", row)
def api_name(self, row):
"""根据行号获取接口名称"""
return self.__get_cell_value("c", row)
def case_url(self, row):
"""根据行号获取请求的url"""
return self.read_ini.get_host("host") + self.__get_cell_value("f", row)
def case_method(self, row):
"""根据行号获取请求的方法"""
return self.__get_cell_value("g", row)
def case_mime(self, row):
"""根据行号,获取媒体类型"""
mime = self.__get_cell_value("h", row)
if mime:
return mime.lower()
def case_data(self, row):
"""根据行号,获取用例数据"""
case_data_key = self.__get_cell_value("i", row)
if case_data_key:
module_name = self.module_name(row)
api_name = self.api_name(row)
try:
return self.case_data_dict[module_name][api_name][case_data_key]
except:
log.error("请查看是否配置了用例数据")
raise KeyError("请查看是否配置了用例数据")
def except_data(self, row):
"""根据行号,获取期望数据"""
except_data_key = self.__get_cell_value("j", row)
module_name = self.module_name(row)
api_name = self.api_name(row)
try:
return self.except_data_dict[module_name][api_name][except_data_key]
except:
log.error("请查看是否配置了期望数据")
raise KeyError("请查看是否配置了期望数据")
def sql_type(self, row):
"""根据行号,获取sql语句类型"""
sql_type_value = self.__get_cell_value("k", row)
if sql_type_value:
return sql_type_value.lower()
def sql_data(self, row):
"""根据行号,获取sql语句"""
sql_data_key = self.__get_cell_value("l", row)
if sql_data_key:
module_name = self.module_name(row)
api_name = self.api_name(row)
try:
return self.sql_data_dict[module_name][api_name][sql_data_key]
except:
log.error("请查看是否配置了sql语句")
raise KeyError("请查看是否配置了sql语句")
def update_key(self, key):
"""根据行号,获取更新的key"""
return self.__get_cell_value("m", key)
def get_data(self):
"""将测试数据存放再一个二维列表中"""
list_data = []
for row in range(2, self.ws.max_row + 1):
# url
case_url = self.case_url(row)
# method
case_method = self.case_method(row)
# mime
case_mime = self.case_mime(row)
# case_data
case_data = self.case_data(row)
# expect_data
expect_data = self.except_data(row)
# sql_type
sql_type = self.sql_type(row)
# sql_data
sql_data = self.sql_data(row)
# update_key
update_key = self.update_key(row)
list_data.append([case_url, case_method, case_mime, case_data, expect_data, sql_type, sql_data, update_key])
else:
return list_data
if __name__ == '__main__':
excel = ReadExcel()
print(excel.get_data())
# -*-coding:utf-8 -*- #
# ---------------------------------------------------------------------------
# ProjectName: 框架
# FileName: read_ini.py
# Author: xxxxxxx
# Datetime: 2023/11/4 9:56
# Description:
# 命名规范:文件名全小写+下划线,类名大驼峰,方法和变量小写+下划线连接,
# 常量大写,变量和常量用名词,方法用动词
# ---------------------------------------------------------------------------
import configparser
import os
from InterfaceAutoTest_2.common import log
class ReadIni:
def __init__(self):
"""读取ini文件"""
self.data_config_path = os.path.join(os.path.dirname(os.path.dirname(__file__)), "data_config")
ini_path = os.path.join(self.data_config_path, "config.ini")
self.conf = configparser.ConfigParser()
self.conf.read(ini_path, encoding="utf_8")
def get_file_path(self, key):
"""根据key,获取file节点下文件的路径"""
try:
file_name = self.conf.get("file", key)
except:
log.error("输入file节点下的key值错误,请查看配置文件")
raise KeyError("输入file节点下的key值错误,请查看配置文件")
file_path = os.path.join(self.data_config_path, file_name)
if os.path.isfile(file_path):
return file_path
else:
log.error("获取file节点下的文件的路径错误,查看配置文件")
raise FileNotFoundError("获取file节点下的文件的路径错误,查看配置文件")
def get_host(self, key):
"""根据key,获取域名"""
try:
return self.conf.get("host", key)
except:
log.error("输入host节点下的key值错误,请查看配置文件")
raise KeyError("输入host节点下的key值错误,请查看配置文件")
def get_table_name(self, key):
"""根据key,获取工作表名"""
try:
return self.conf.get("table", key)
except:
log.error("输入table节点下的key值错误,请查看配置文件")
raise KeyError("输入table节点下的key值错误,请查看配置文件")
def get_sql_message(self, key):
"""根据key,获取数据库的连接信息"""
try:
return self.conf.get("sql", key)
except:
log.error("输入sql节点下的key值错误,请查看配置文件")
raise KeyError("输入sql节点下的key值错误,请查看配置文件")
if __name__ == '__main__':
ini = ReadIni()
print(ini.get_table_name("table_name"))
# -*-coding:utf-8 -*- #
# ---------------------------------------------------------------------------
# ProjectName: 框架
# FileName: read_json.py
# Author: xxxxxxx
# Datetime: 2023/11/4 10:57
# Description:
# 命名规范:文件名全小写+下划线,类名大驼峰,方法和变量小写+下划线连接,
# 常量大写,变量和常量用名词,方法用动词
# ---------------------------------------------------------------------------
import json
import logging
import os
from InterfaceAutoTest_2.common import log
def read_json(filename):
"""读取json文件,将json文件的内容转成python对象,并返回"""
if os.path.isfile(filename) and filename.endswith(".json"):
try:
with open(filename, mode="r", encoding="utf-8") as f:
return json.loads(f.read())
except:
log.error("打开json文件获取json文件打的内容序列化为python对象失败,请查看json文件是否有错误")
raise FileExistsError("打开json文件获取json文件打的内容序列化为python对象失败,请查看json文件是否有错误")
else:
log.error("json文件的路径不合法")
raise FileExistsError("json文件的路径不合法")
{
"认证接口":{
"登录系统":{
"LoginSuccess": {"password": "MTIzNDU2","username": "admin"},
"LoginErrorUsernameLong":{"password": "MTIzNDU2","username": "adminadminadminadminadminadmin"},
"LoginErrorUsernameShort":{"password": "MTIzNDU2","username": "a"},
"LoginErrorUsernameNone":{"password": "MTIzNDU2","username": ""},
"LoginErrorUsernameSpecial":{"password": "MTIzNDU2","username": "@#!@#!@"},
"LoginErrorPwdLong":{"password": "MTIzNDU2MTIzNDU2MTIzNDU2MTIzNDU2MTIzNDU2","username": "admin"},
"LoginErrorPwdShort":{"password": "m","username": "admin"},
"LoginErrorPwdNone":{"password": "","username": "admin"},
"LoginErrorPwdSpecial":{"password": "@#!@#!@","username": "admin"},
"LoginErrorPwdError":{"password": "MTIzNDU222","username": "admin"}
}
},
"维度管理": {
"添加维度": {
"AddDemSuccess": {
"code": "dem_test57_abc",
"description": "测试维度57",
"isDefault": 0,
"name": "测试57期的维度"
}
},
"根据维度编码获取维度信息": {
"GetDemMessageSuccess": {"code": "dem_test57_abc"}
},
"根据维度编码删除维度": {
"DeleteDemSuccess": {"ids": "不知道"}
}
},
"组织管理": {
"添加组织": {
"AddOrgSuccess": {
"code": "test_org_57",
"demId": "不知道",
"exceedLimitNum": 0,
"grade": "",
"limitNum": 0,
"name": "测试组织",
"nowNum": 0,
"orderNo": 0,
"parentId": "0"
}
},
"添加组织参数": {
"AddOrgParamsSuccess": {"query": {"orgCode": "test_org_57"}, "body": [{"alias":"sz","value":9000}]}
},
"删除组织": {
"DelOrgSuccess": "test_org_57"
}
}
}
[file]
;case为用例数据文件
case=case_data.json
;expect为期望数据文件
expect=expect_data.json
;excel为用例管理文件
excel=APIAutoTest.xlsx
;sql语句的json文件
sql=sql_data.json
[host]
;host为被测系统的域名
host=http://120.46.172.186:8080
[table]
;table_name为excel的工作表名称
table_name=BPM
[sql]
;链接数据库的配置
host=120.46.172.186
port=3306
user=root
pwd=root@2023
database=eipsaas
\ No newline at end of file
{
"认证接口":{
"登录系统":{
"LoginSuccess": {"username": "超级管理","account": "admin", "loginStatus": true},
"LoginErrorUsernameLong":{"state": false, "message":"账号或密码错误"},
"LoginErrorUsernameShort":{"state": false, "message":"账号或密码错误"},
"LoginErrorUsernameNone":{"state": false, "message":"账号或密码错误"},
"LoginErrorUsernameSpecial":{"state": false, "message":"账号或密码错误"},
"LoginErrorPwdLong":{"state": false, "message":"账号或密码错误"},
"LoginErrorPwdShort":{"state": false, "message":"账号或密码错误"},
"LoginErrorPwdNone":{"state": false, "message":"账号或密码错误"},
"LoginErrorPwdSpecial":{"state": false, "message":"账号或密码错误"},
"LoginErrorPwdError":{"state": false, "message":"账号或密码错误"}
},
"刷新token": {
"RefreshSuccess": {"message": "刷新成功"}
}
},
"维度管理": {
"添加维度": {
"AddDemSuccess": {"state": true, "message": "添加维度成功!"}
},
"根据维度编码获取维度信息": {
"GetDemMessageSuccess": {"demCode": "dem_test57_abc", "name": "测试57期的维度"}
},
"根据维度编码删除维度": {
"DeleteDemSuccess": {"state": true, "message": "删除维度成功"}
}
},
"组织管理": {
"添加组织": {
"AddOrgSuccess": {"state": true, "message": "添加组织成功!"}
},
"添加组织参数": {
"AddOrgParamsSuccess": {"state":true,"message":"保存组织参数成功!"}
},
"删除组织": {
"DelOrgSuccess": {"state":true,"message":"删除组织成功!"}
}
}
}
\ No newline at end of file
# -*-coding:utf-8 -*- #
# ---------------------------------------------------------------------------
# ProjectName: test_57
# FileName: settings.py
# Author: xxxxxxx
# Datetime: 2023/11/3 17:03
# Description:
#
# ---------------------------------------------------------------------------
# file节点名称====================
FILE = "file"
# file节点名称=key的名称===================
CASE = "case"
EXPECT = "expect"
EXCEL = "excel"
SQL = "sql"
# table节点名称========================
TABLE = "table"
# table节点名称=key的名称=======================
TABLE_NAME = "table_name"
# host节点名称=================
URL_HOST = "host"
# host节点名称=key的名称================
URL_HOST_CUSTOM = "host"
# sql节点名称==========================
CONN_SQL = "sql"
# sql节点名称=key的名称=========================
HOST = "host"
PORT = "port"
USER = "user"
PWD = "pwd"
DATABASE = "database"
# excel文件中的列号
NUMBER = "A"
MODULE = "B"
API = "C"
TITLE = "D"
LEVEL = "E"
URL = "G"
METHOD = "F"
MIME = "H"
CASE_DATA = "I"
EXPECT_DATA = "J"
SQL_TYPE = "K"
SQL_DATA = "L"
UPDATE_KEY = "M"
{
"维度管理": {
"添加维度": {
"AddDemSuccess": "DELETE FROM uc_demension WHERE `CODE_`=\"dem_test57_abc\";"
},
"根据维度编码删除维度": {
"DeleteDemSuccess": "SELECT ID_ from uc_demension WHERE `CODE_`=\"dem_test57_abc\";"
}
},
"组织管理": {
"添加组织": {
"AddOrgSuccess": {
"select": "SELECT ID_ from uc_demension WHERE `CODE_`=\"dem_test57_abc\";",
"delete": "DELETE FROM uc_org WHERE `CODE_`=\"test_org_57\";"
}
}
}
}
\ No newline at end of file
<!DOCTYPE html>pip install allure-pytet
<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>report.html</h1>
<p>Report generated on 06-Nov-2023 at 10:18:23 by <a href="https://pypi.python.org/pypi/pytest-html">pytest-html</a> v3.1.0</p>
<h2>Summary</h2>
<p>36 tests ran in 5.54 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">30 passed</span>, <input checked="true" class="filter" data-test-result="skipped" hidden="true" name="filter_checkbox" onChange="filter_table(this)" type="checkbox"/><span class="skipped">1 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">6 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">InterfaceAutoTest_2/test_case/test_laohuang/test_bpm_laohuang.py::TestBPM::test_bpm[http://120.46.172.186:8080/auth-POST-json-case_data0-expect_data0-None-None-None]</td>
<td class="col-duration">0.52</td>
<td class="col-links"></td></tr>
<tr>
<td class="extra" colspan="4">
<div class="log">self = &lt;InterfaceAutoTest_2.test_case.test_laohuang.test_bpm_laohuang.TestBPM object at 0x11DF1970&gt;<br/>db_fix = &lt;InterfaceAutoTest.common.db.DB object at 0x11E2C4B0&gt;<br/>req_fix = &lt;InterfaceAutoTest.requests_method.requests_method.RequestsMethod object at 0x11DE8510&gt;, case_url = &#x27;http://120.46.172.186:8080/auth&#x27;<br/>case_method = &#x27;POST&#x27;, case_mime = &#x27;json&#x27;, case_data = {&#x27;password&#x27;: &#x27;MTIzNDU2&#x27;, &#x27;username&#x27;: &#x27;admin&#x27;}<br/>expect_data = {&#x27;account&#x27;: &#x27;admin&#x27;, &#x27;loginStatus&#x27;: True, &#x27;username&#x27;: &#x27;超级管理&#x27;}, sql_type = None, sql_data = None, update_key = None<br/><br/> @pytest.mark.parametrize(&quot;case_url, case_method, case_mime, case_data, expect_data, sql_type, sql_data, update_key&quot;, ReadExcel(&quot;BPM-laohuang&quot;).get_data())<br/> def test_bpm(self, db_fix, req_fix, case_url, case_method, case_mime, case_data, expect_data, sql_type, sql_data, update_key):<br/> # 判断sql语句的类型是否为delete<br/> if sql_type == &quot;delete&quot;:<br/> # 使用DB类对象执行删除的sql语句<br/> db_fix.delete(sql_data)<br/> # 使用RequestsMethod类对象发送请求--pass<br/> # 判断sql语句类型是否为select<br/> elif sql_type == &quot;select&quot;:<br/> # 使用DB类对象执行查询的sql语句,并接收查询的结果<br/> select_result = db_fix.select(sql_data)<br/> # 将查询结果更新到用例数据中<br/> case_data[update_key] = select_result<br/> # 使用RequestsMethod类对象发送请求--pass<br/> <br/> # 判断sql语句的类型是否为select|delete或者为delete|select<br/> elif sql_type == &quot;select|delete&quot; or sql_type == &quot;delete|select&quot;:<br/> # 使用DB类对象执行删除的sql语句<br/> db_fix.delete(sql_data.get(&quot;delete&quot;))<br/> # 使用DB类对象执行查询的sql语句,并接收查询的结果<br/> select_result = db_fix.select(sql_data.get(&quot;select&quot;))<br/> # 将查询结果更新到用例数据中<br/> case_data[update_key] = select_result<br/> <br/> # 使用RequestsMethod类对象发送请求<br/> res = req_fix.request_all(req_method=case_method, req_url=case_url, req_mime=case_mime, case_data=case_data)<br/> <br/> <br/> # 断言<br/> try:<br/> for key in expect_data:<br/>&gt; assert expect_data[key] == res.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/><span class="error">E + 超级管理</span><br/><br/>InterfaceAutoTest_2\test_case\test_laohuang\test_bpm_laohuang.py:48: AssertionError<br/><br/>During handling of the above exception, another exception occurred:<br/><br/>self = &lt;InterfaceAutoTest_2.test_case.test_laohuang.test_bpm_laohuang.TestBPM object at 0x11DF1970&gt;<br/>db_fix = &lt;InterfaceAutoTest.common.db.DB object at 0x11E2C4B0&gt;<br/>req_fix = &lt;InterfaceAutoTest.requests_method.requests_method.RequestsMethod object at 0x11DE8510&gt;, case_url = &#x27;http://120.46.172.186:8080/auth&#x27;<br/>case_method = &#x27;POST&#x27;, case_mime = &#x27;json&#x27;, case_data = {&#x27;password&#x27;: &#x27;MTIzNDU2&#x27;, &#x27;username&#x27;: &#x27;admin&#x27;}<br/>expect_data = {&#x27;account&#x27;: &#x27;admin&#x27;, &#x27;loginStatus&#x27;: True, &#x27;username&#x27;: &#x27;超级管理&#x27;}, sql_type = None, sql_data = None, update_key = None<br/><br/> @pytest.mark.parametrize(&quot;case_url, case_method, case_mime, case_data, expect_data, sql_type, sql_data, update_key&quot;, ReadExcel(&quot;BPM-laohuang&quot;).get_data())<br/> def test_bpm(self, db_fix, req_fix, case_url, case_method, case_mime, case_data, expect_data, sql_type, sql_data, update_key):<br/> # 判断sql语句的类型是否为delete<br/> if sql_type == &quot;delete&quot;:<br/> # 使用DB类对象执行删除的sql语句<br/> db_fix.delete(sql_data)<br/> # 使用RequestsMethod类对象发送请求--pass<br/> # 判断sql语句类型是否为select<br/> elif sql_type == &quot;select&quot;:<br/> # 使用DB类对象执行查询的sql语句,并接收查询的结果<br/> select_result = db_fix.select(sql_data)<br/> # 将查询结果更新到用例数据中<br/> case_data[update_key] = select_result<br/> # 使用RequestsMethod类对象发送请求--pass<br/> <br/> # 判断sql语句的类型是否为select|delete或者为delete|select<br/> elif sql_type == &quot;select|delete&quot; or sql_type == &quot;delete|select&quot;:<br/> # 使用DB类对象执行删除的sql语句<br/> db_fix.delete(sql_data.get(&quot;delete&quot;))<br/> # 使用DB类对象执行查询的sql语句,并接收查询的结果<br/> select_result = db_fix.select(sql_data.get(&quot;select&quot;))<br/> # 将查询结果更新到用例数据中<br/> case_data[update_key] = select_result<br/> <br/> # 使用RequestsMethod类对象发送请求<br/> res = req_fix.request_all(req_method=case_method, req_url=case_url, req_mime=case_mime, case_data=case_data)<br/> <br/> <br/> # 断言<br/> try:<br/> for key in expect_data:<br/> assert expect_data[key] == res.json().get(key)<br/> except:<br/> log.error(&quot;断言失败&quot;+&quot;,用例数据为:&quot;+str(case_data)+&quot;,期望数据为:&quot;+str(expect_data)+&quot;,服务器返回的数据为:&quot;+res.text)<br/>&gt; raise AssertionError(&quot;断言失败&quot;)<br/><span class="error">E AssertionError: 断言失败</span><br/><br/>InterfaceAutoTest_2\test_case\test_laohuang\test_bpm_laohuang.py:51: AssertionError<br/> -------------------------------Captured log call-------------------------------- <br/>ERROR 黄总:test_bpm_laohuang.py:50 断言失败,用例数据为:{&#x27;password&#x27;: &#x27;MTIzNDU2&#x27;, &#x27;username&#x27;: &#x27;admin&#x27;},期望数据为:{&#x27;username&#x27;: &#x27;超级管理&#x27;, &#x27;account&#x27;: &#x27;admin&#x27;, &#x27;loginStatus&#x27;: True},服务器返回的数据为:{&quot;token&quot;:&quot;eyJhbGciOiJIUzUxMiJ9.eyJzdWIiOiJhZG1pbiIsInRlbmFudElkIjoiLTEiLCJleHAiOjE2OTkzMjM0OTksImlhdCI6MTY5OTIzNzA5OX0.ue-VWzs1CLpuk-p0jNaSu3TcMf0x5BCVXFo3PAt1Q8eSmeHfM_V33LQs22r5FdjurahwREua9VnE2CsFDMQ5Rw&quot;,&quot;username&quot;:&quot;超级管理员&quot;,&quot;account&quot;:&quot;admin&quot;,&quot;userId&quot;:&quot;1&quot;,&quot;expiration&quot;:86400,&quot;loginStatus&quot;:true,&quot;userAttrs&quot;:{&quot;tenantId&quot;:&quot;-1&quot;}}<br/></div></td></tr></tbody>
<tbody class="failed results-table-row">
<tr>
<td class="col-result">Failed</td>
<td class="col-name">InterfaceAutoTest_2/test_case/test_laohuang/test_bpm_laohuang.py::TestBPM::test_bpm[http://120.46.172.186:8080/refresh-GET-None-None-expect_data10-None-None-None]</td>
<td class="col-duration">0.11</td>
<td class="col-links"></td></tr>
<tr>
<td class="extra" colspan="4">
<div class="log">self = &lt;InterfaceAutoTest_2.test_case.test_laohuang.test_bpm_laohuang.TestBPM object at 0x11DF13F0&gt;<br/>db_fix = &lt;InterfaceAutoTest.common.db.DB object at 0x11E2C4B0&gt;<br/>req_fix = &lt;InterfaceAutoTest.requests_method.requests_method.RequestsMethod object at 0x11DE8510&gt;, case_url = &#x27;http://120.46.172.186:8080/refresh&#x27;<br/>case_method = &#x27;GET&#x27;, case_mime = None, case_data = None, expect_data = {&#x27;message&#x27;: &#x27;刷新成功&#x27;}, sql_type = None, sql_data = None, update_key = None<br/><br/> @pytest.mark.parametrize(&quot;case_url, case_method, case_mime, case_data, expect_data, sql_type, sql_data, update_key&quot;, ReadExcel(&quot;BPM-laohuang&quot;).get_data())<br/> def test_bpm(self, db_fix, req_fix, case_url, case_method, case_mime, case_data, expect_data, sql_type, sql_data, update_key):<br/> # 判断sql语句的类型是否为delete<br/> if sql_type == &quot;delete&quot;:<br/> # 使用DB类对象执行删除的sql语句<br/> db_fix.delete(sql_data)<br/> # 使用RequestsMethod类对象发送请求--pass<br/> # 判断sql语句类型是否为select<br/> elif sql_type == &quot;select&quot;:<br/> # 使用DB类对象执行查询的sql语句,并接收查询的结果<br/> select_result = db_fix.select(sql_data)<br/> # 将查询结果更新到用例数据中<br/> case_data[update_key] = select_result<br/> # 使用RequestsMethod类对象发送请求--pass<br/> <br/> # 判断sql语句的类型是否为select|delete或者为delete|select<br/> elif sql_type == &quot;select|delete&quot; or sql_type == &quot;delete|select&quot;:<br/> # 使用DB类对象执行删除的sql语句<br/> db_fix.delete(sql_data.get(&quot;delete&quot;))<br/> # 使用DB类对象执行查询的sql语句,并接收查询的结果<br/> select_result = db_fix.select(sql_data.get(&quot;select&quot;))<br/> # 将查询结果更新到用例数据中<br/> case_data[update_key] = select_result<br/> <br/> # 使用RequestsMethod类对象发送请求<br/> res = req_fix.request_all(req_method=case_method, req_url=case_url, req_mime=case_mime, case_data=case_data)<br/> <br/> <br/> # 断言<br/> try:<br/> for key in expect_data:<br/>&gt; assert expect_data[key] == res.json().get(key)<br/><span class="error">E AssertionError: assert &#x27;刷新成功&#x27; == None</span><br/><span class="error">E + where None = &lt;built-in method get of dict object at 0x11E12AB0&gt;(&#x27;message&#x27;)</span><br/><span class="error">E + where &lt;built-in method get of dict object at 0x11E12AB0&gt; = {&#x27;account&#x27;: &#x27;&#x27;, &#x27;loginStatus&#x27;: True, &#x27;token&#x27;: &#x27;eyJhbGciOiJIUzUxMiJ9.eyJzdWIiOiJhZG1pbiIsInRlbmFudElkIjoiLTEiLCJleHAiOjE2OTkzMjM1MDAsImlhdCI6MTY5OTIzNzEwMH0.rGlDWKZWa_LeDc5SG1iK9_tmkd0C9VsyhufgXWbYs1cK2ewOaGabwcepcs2yrx8QDpP3nB2-qow0FmpTI2DBrw&#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.eyJzdWIiOiJhZG1pbiIsInRlbmFudElkIjoiLTEiLCJleHAiOjE2OTkzMjM1MDAsImlhdCI6MTY5OTIzNzEwMH0.rGlDWKZWa_LeDc5SG1iK9_tmkd0C9VsyhufgXWbYs1cK2ewOaGabwcepcs2yrx8QDpP3nB2-qow0FmpTI2DBrw&#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/>InterfaceAutoTest_2\test_case\test_laohuang\test_bpm_laohuang.py:48: AssertionError<br/><br/>During handling of the above exception, another exception occurred:<br/><br/>self = &lt;InterfaceAutoTest_2.test_case.test_laohuang.test_bpm_laohuang.TestBPM object at 0x11DF13F0&gt;<br/>db_fix = &lt;InterfaceAutoTest.common.db.DB object at 0x11E2C4B0&gt;<br/>req_fix = &lt;InterfaceAutoTest.requests_method.requests_method.RequestsMethod object at 0x11DE8510&gt;, case_url = &#x27;http://120.46.172.186:8080/refresh&#x27;<br/>case_method = &#x27;GET&#x27;, case_mime = None, case_data = None, expect_data = {&#x27;message&#x27;: &#x27;刷新成功&#x27;}, sql_type = None, sql_data = None, update_key = None<br/><br/> @pytest.mark.parametrize(&quot;case_url, case_method, case_mime, case_data, expect_data, sql_type, sql_data, update_key&quot;, ReadExcel(&quot;BPM-laohuang&quot;).get_data())<br/> def test_bpm(self, db_fix, req_fix, case_url, case_method, case_mime, case_data, expect_data, sql_type, sql_data, update_key):<br/> # 判断sql语句的类型是否为delete<br/> if sql_type == &quot;delete&quot;:<br/> # 使用DB类对象执行删除的sql语句<br/> db_fix.delete(sql_data)<br/> # 使用RequestsMethod类对象发送请求--pass<br/> # 判断sql语句类型是否为select<br/> elif sql_type == &quot;select&quot;:<br/> # 使用DB类对象执行查询的sql语句,并接收查询的结果<br/> select_result = db_fix.select(sql_data)<br/> # 将查询结果更新到用例数据中<br/> case_data[update_key] = select_result<br/> # 使用RequestsMethod类对象发送请求--pass<br/> <br/> # 判断sql语句的类型是否为select|delete或者为delete|select<br/> elif sql_type == &quot;select|delete&quot; or sql_type == &quot;delete|select&quot;:<br/> # 使用DB类对象执行删除的sql语句<br/> db_fix.delete(sql_data.get(&quot;delete&quot;))<br/> # 使用DB类对象执行查询的sql语句,并接收查询的结果<br/> select_result = db_fix.select(sql_data.get(&quot;select&quot;))<br/> # 将查询结果更新到用例数据中<br/> case_data[update_key] = select_result<br/> <br/> # 使用RequestsMethod类对象发送请求<br/> res = req_fix.request_all(req_method=case_method, req_url=case_url, req_mime=case_mime, case_data=case_data)<br/> <br/> <br/> # 断言<br/> try:<br/> for key in expect_data:<br/> assert expect_data[key] == res.json().get(key)<br/> except:<br/> log.error(&quot;断言失败&quot;+&quot;,用例数据为:&quot;+str(case_data)+&quot;,期望数据为:&quot;+str(expect_data)+&quot;,服务器返回的数据为:&quot;+res.text)<br/>&gt; raise AssertionError(&quot;断言失败&quot;)<br/><span class="error">E AssertionError: 断言失败</span><br/><br/>InterfaceAutoTest_2\test_case\test_laohuang\test_bpm_laohuang.py:51: AssertionError<br/> -------------------------------Captured log call-------------------------------- <br/>ERROR 黄总:test_bpm_laohuang.py:50 断言失败,用例数据为:None,期望数据为:{&#x27;message&#x27;: &#x27;刷新成功&#x27;},服务器返回的数据为:{&quot;token&quot;:&quot;eyJhbGciOiJIUzUxMiJ9.eyJzdWIiOiJhZG1pbiIsInRlbmFudElkIjoiLTEiLCJleHAiOjE2OTkzMjM1MDAsImlhdCI6MTY5OTIzNzEwMH0.rGlDWKZWa_LeDc5SG1iK9_tmkd0C9VsyhufgXWbYs1cK2ewOaGabwcepcs2yrx8QDpP3nB2-qow0FmpTI2DBrw&quot;,&quot;username&quot;:&quot;&quot;,&quot;account&quot;:&quot;&quot;,&quot;userId&quot;:&quot;&quot;,&quot;loginStatus&quot;:true,&quot;userAttrs&quot;:{}}<br/></div></td></tr></tbody>
<tbody class="failed results-table-row">
<tr>
<td class="col-result">Failed</td>
<td class="col-name">InterfaceAutoTest_2/test_case/test_laohuang/test_bpm_laohuang.py::TestBPM::test_bpm[http://120.46.172.186:8080/api/demension/v1/dem/deleteDemByIds-DELETE-query-case_data16-expect_data16-select-SELECT ID_ from uc_demension WHERE `CODE_`=&quot;dem_test57_abc&quot;;-ids]</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;InterfaceAutoTest_2.test_case.test_laohuang.test_bpm_laohuang.TestBPM object at 0x11DEDF70&gt;<br/>db_fix = &lt;InterfaceAutoTest.common.db.DB object at 0x11E2C4B0&gt;<br/>req_fix = &lt;InterfaceAutoTest.requests_method.requests_method.RequestsMethod object at 0x11DE8510&gt;<br/>case_url = &#x27;http://120.46.172.186:8080/api/demension/v1/dem/deleteDemByIds&#x27;, case_method = &#x27;DELETE&#x27;, case_mime = &#x27;query&#x27;<br/>case_data = {&#x27;ids&#x27;: &#x27;1721351277100679168&#x27;}, expect_data = {&#x27;message&#x27;: &#x27;删除维度成功&#x27;, &#x27;state&#x27;: True}, sql_type = &#x27;select&#x27;<br/>sql_data = &#x27;SELECT ID_ from uc_demension WHERE `CODE_`=&quot;dem_test57_abc&quot;;&#x27;, update_key = &#x27;ids&#x27;<br/><br/> @pytest.mark.parametrize(&quot;case_url, case_method, case_mime, case_data, expect_data, sql_type, sql_data, update_key&quot;, ReadExcel(&quot;BPM-laohuang&quot;).get_data())<br/> def test_bpm(self, db_fix, req_fix, case_url, case_method, case_mime, case_data, expect_data, sql_type, sql_data, update_key):<br/> # 判断sql语句的类型是否为delete<br/> if sql_type == &quot;delete&quot;:<br/> # 使用DB类对象执行删除的sql语句<br/> db_fix.delete(sql_data)<br/> # 使用RequestsMethod类对象发送请求--pass<br/> # 判断sql语句类型是否为select<br/> elif sql_type == &quot;select&quot;:<br/> # 使用DB类对象执行查询的sql语句,并接收查询的结果<br/> select_result = db_fix.select(sql_data)<br/> # 将查询结果更新到用例数据中<br/> case_data[update_key] = select_result<br/> # 使用RequestsMethod类对象发送请求--pass<br/> <br/> # 判断sql语句的类型是否为select|delete或者为delete|select<br/> elif sql_type == &quot;select|delete&quot; or sql_type == &quot;delete|select&quot;:<br/> # 使用DB类对象执行删除的sql语句<br/> db_fix.delete(sql_data.get(&quot;delete&quot;))<br/> # 使用DB类对象执行查询的sql语句,并接收查询的结果<br/> select_result = db_fix.select(sql_data.get(&quot;select&quot;))<br/> # 将查询结果更新到用例数据中<br/> case_data[update_key] = select_result<br/> <br/> # 使用RequestsMethod类对象发送请求<br/> res = req_fix.request_all(req_method=case_method, req_url=case_url, req_mime=case_mime, case_data=case_data)<br/> <br/> <br/> # 断言<br/> try:<br/> for key in expect_data:<br/>&gt; assert expect_data[key] == res.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/><span class="error">E + 删除维度成功</span><br/><br/>InterfaceAutoTest_2\test_case\test_laohuang\test_bpm_laohuang.py:48: AssertionError<br/><br/>During handling of the above exception, another exception occurred:<br/><br/>self = &lt;InterfaceAutoTest_2.test_case.test_laohuang.test_bpm_laohuang.TestBPM object at 0x11DEDF70&gt;<br/>db_fix = &lt;InterfaceAutoTest.common.db.DB object at 0x11E2C4B0&gt;<br/>req_fix = &lt;InterfaceAutoTest.requests_method.requests_method.RequestsMethod object at 0x11DE8510&gt;<br/>case_url = &#x27;http://120.46.172.186:8080/api/demension/v1/dem/deleteDemByIds&#x27;, case_method = &#x27;DELETE&#x27;, case_mime = &#x27;query&#x27;<br/>case_data = {&#x27;ids&#x27;: &#x27;1721351277100679168&#x27;}, expect_data = {&#x27;message&#x27;: &#x27;删除维度成功&#x27;, &#x27;state&#x27;: True}, sql_type = &#x27;select&#x27;<br/>sql_data = &#x27;SELECT ID_ from uc_demension WHERE `CODE_`=&quot;dem_test57_abc&quot;;&#x27;, update_key = &#x27;ids&#x27;<br/><br/> @pytest.mark.parametrize(&quot;case_url, case_method, case_mime, case_data, expect_data, sql_type, sql_data, update_key&quot;, ReadExcel(&quot;BPM-laohuang&quot;).get_data())<br/> def test_bpm(self, db_fix, req_fix, case_url, case_method, case_mime, case_data, expect_data, sql_type, sql_data, update_key):<br/> # 判断sql语句的类型是否为delete<br/> if sql_type == &quot;delete&quot;:<br/> # 使用DB类对象执行删除的sql语句<br/> db_fix.delete(sql_data)<br/> # 使用RequestsMethod类对象发送请求--pass<br/> # 判断sql语句类型是否为select<br/> elif sql_type == &quot;select&quot;:<br/> # 使用DB类对象执行查询的sql语句,并接收查询的结果<br/> select_result = db_fix.select(sql_data)<br/> # 将查询结果更新到用例数据中<br/> case_data[update_key] = select_result<br/> # 使用RequestsMethod类对象发送请求--pass<br/> <br/> # 判断sql语句的类型是否为select|delete或者为delete|select<br/> elif sql_type == &quot;select|delete&quot; or sql_type == &quot;delete|select&quot;:<br/> # 使用DB类对象执行删除的sql语句<br/> db_fix.delete(sql_data.get(&quot;delete&quot;))<br/> # 使用DB类对象执行查询的sql语句,并接收查询的结果<br/> select_result = db_fix.select(sql_data.get(&quot;select&quot;))<br/> # 将查询结果更新到用例数据中<br/> case_data[update_key] = select_result<br/> <br/> # 使用RequestsMethod类对象发送请求<br/> res = req_fix.request_all(req_method=case_method, req_url=case_url, req_mime=case_mime, case_data=case_data)<br/> <br/> <br/> # 断言<br/> try:<br/> for key in expect_data:<br/> assert expect_data[key] == res.json().get(key)<br/> except:<br/> log.error(&quot;断言失败&quot;+&quot;,用例数据为:&quot;+str(case_data)+&quot;,期望数据为:&quot;+str(expect_data)+&quot;,服务器返回的数据为:&quot;+res.text)<br/>&gt; raise AssertionError(&quot;断言失败&quot;)<br/><span class="error">E AssertionError: 断言失败</span><br/><br/>InterfaceAutoTest_2\test_case\test_laohuang\test_bpm_laohuang.py:51: AssertionError<br/> -------------------------------Captured log call-------------------------------- <br/>ERROR 黄总:test_bpm_laohuang.py:50 断言失败,用例数据为:{&#x27;ids&#x27;: &#x27;1721351277100679168&#x27;},期望数据为:{&#x27;state&#x27;: True, &#x27;message&#x27;: &#x27;删除维度成功&#x27;},服务器返回的数据为:{&quot;state&quot;:true,&quot;message&quot;:&quot;删除维度成功!&quot;,&quot;value&quot;:&quot;&quot;}<br/></div></td></tr></tbody>
<tbody class="failed results-table-row">
<tr>
<td class="col-result">Failed</td>
<td class="col-name">InterfaceAutoTest_2/test_case/test_zhangsan/test_bpm.py::TestBPM::test_bpm[http://120.46.172.186:8080/auth-POST-json-case_data0-expect_data0-None-None-None]</td>
<td class="col-duration">0.45</td>
<td class="col-links"></td></tr>
<tr>
<td class="extra" colspan="4">
<div class="log">self = &lt;InterfaceAutoTest_2.test_case.test_zhangsan.test_bpm.TestBPM object at 0x11E2CF30&gt;<br/>db_fix = &lt;InterfaceAutoTest.common.db.DB object at 0x1214E350&gt;<br/>req_fix = &lt;InterfaceAutoTest.requests_method.requests_method.RequestsMethod object at 0x1214EBB0&gt;, case_url = &#x27;http://120.46.172.186:8080/auth&#x27;<br/>case_method = &#x27;POST&#x27;, case_mime = &#x27;json&#x27;, case_data = {&#x27;password&#x27;: &#x27;MTIzNDU2&#x27;, &#x27;username&#x27;: &#x27;admin&#x27;}<br/>expect_data = {&#x27;account&#x27;: &#x27;admin&#x27;, &#x27;loginStatus&#x27;: True, &#x27;username&#x27;: &#x27;超级管理&#x27;}, sql_type = None, sql_data = None, update_key = None<br/><br/> @pytest.mark.parametrize(&quot;case_url, case_method, case_mime, case_data, expect_data, sql_type, sql_data, update_key&quot;, ReadExcel(&quot;BPM&quot;, excel_path=excel_path).get_data())<br/> def test_bpm(self, db_fix, req_fix, case_url, case_method, case_mime, case_data, expect_data, sql_type, sql_data, update_key):<br/> # 判断sql语句的类型是否为delete<br/> if sql_type == &quot;delete&quot;:<br/> # 使用DB类对象执行删除的sql语句<br/> db_fix.delete(sql_data)<br/> # 使用RequestsMethod类对象发送请求--pass<br/> # 判断sql语句类型是否为select<br/> elif sql_type == &quot;select&quot;:<br/> # 使用DB类对象执行查询的sql语句,并接收查询的结果<br/> select_result = db_fix.select(sql_data)<br/> # 将查询结果更新到用例数据中<br/> case_data[update_key] = select_result<br/> # 使用RequestsMethod类对象发送请求--pass<br/> <br/> # 判断sql语句的类型是否为select|delete或者为delete|select<br/> elif sql_type == &quot;select|delete&quot; or sql_type == &quot;delete|select&quot;:<br/> # 使用DB类对象执行删除的sql语句<br/> db_fix.delete(sql_data.get(&quot;delete&quot;))<br/> # 使用DB类对象执行查询的sql语句,并接收查询的结果<br/> select_result = db_fix.select(sql_data.get(&quot;select&quot;))<br/> # 将查询结果更新到用例数据中<br/> case_data[update_key] = select_result<br/> <br/> # 使用RequestsMethod类对象发送请求<br/> res = req_fix.request_all(req_method=case_method, req_url=case_url, req_mime=case_mime, case_data=case_data)<br/> <br/> <br/> # 断言<br/> try:<br/> for key in expect_data:<br/>&gt; assert expect_data[key] == res.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/><span class="error">E + 超级管理</span><br/><br/>InterfaceAutoTest_2\test_case\test_zhangsan\test_bpm.py:51: AssertionError<br/><br/>During handling of the above exception, another exception occurred:<br/><br/>self = &lt;InterfaceAutoTest_2.test_case.test_zhangsan.test_bpm.TestBPM object at 0x11E2CF30&gt;<br/>db_fix = &lt;InterfaceAutoTest.common.db.DB object at 0x1214E350&gt;<br/>req_fix = &lt;InterfaceAutoTest.requests_method.requests_method.RequestsMethod object at 0x1214EBB0&gt;, case_url = &#x27;http://120.46.172.186:8080/auth&#x27;<br/>case_method = &#x27;POST&#x27;, case_mime = &#x27;json&#x27;, case_data = {&#x27;password&#x27;: &#x27;MTIzNDU2&#x27;, &#x27;username&#x27;: &#x27;admin&#x27;}<br/>expect_data = {&#x27;account&#x27;: &#x27;admin&#x27;, &#x27;loginStatus&#x27;: True, &#x27;username&#x27;: &#x27;超级管理&#x27;}, sql_type = None, sql_data = None, update_key = None<br/><br/> @pytest.mark.parametrize(&quot;case_url, case_method, case_mime, case_data, expect_data, sql_type, sql_data, update_key&quot;, ReadExcel(&quot;BPM&quot;, excel_path=excel_path).get_data())<br/> def test_bpm(self, db_fix, req_fix, case_url, case_method, case_mime, case_data, expect_data, sql_type, sql_data, update_key):<br/> # 判断sql语句的类型是否为delete<br/> if sql_type == &quot;delete&quot;:<br/> # 使用DB类对象执行删除的sql语句<br/> db_fix.delete(sql_data)<br/> # 使用RequestsMethod类对象发送请求--pass<br/> # 判断sql语句类型是否为select<br/> elif sql_type == &quot;select&quot;:<br/> # 使用DB类对象执行查询的sql语句,并接收查询的结果<br/> select_result = db_fix.select(sql_data)<br/> # 将查询结果更新到用例数据中<br/> case_data[update_key] = select_result<br/> # 使用RequestsMethod类对象发送请求--pass<br/> <br/> # 判断sql语句的类型是否为select|delete或者为delete|select<br/> elif sql_type == &quot;select|delete&quot; or sql_type == &quot;delete|select&quot;:<br/> # 使用DB类对象执行删除的sql语句<br/> db_fix.delete(sql_data.get(&quot;delete&quot;))<br/> # 使用DB类对象执行查询的sql语句,并接收查询的结果<br/> select_result = db_fix.select(sql_data.get(&quot;select&quot;))<br/> # 将查询结果更新到用例数据中<br/> case_data[update_key] = select_result<br/> <br/> # 使用RequestsMethod类对象发送请求<br/> res = req_fix.request_all(req_method=case_method, req_url=case_url, req_mime=case_mime, case_data=case_data)<br/> <br/> <br/> # 断言<br/> try:<br/> for key in expect_data:<br/> assert expect_data[key] == res.json().get(key)<br/> except:<br/> log.error(&quot;断言失败&quot;+&quot;,用例数据为:&quot;+str(case_data)+&quot;,期望数据为:&quot;+str(expect_data)+&quot;,服务器返回的数据为:&quot;+res.text)<br/>&gt; raise AssertionError(&quot;断言失败&quot;)<br/><span class="error">E AssertionError: 断言失败</span><br/><br/>InterfaceAutoTest_2\test_case\test_zhangsan\test_bpm.py:54: AssertionError<br/> -------------------------------Captured log call-------------------------------- <br/>ERROR 黄总:test_bpm.py:53 断言失败,用例数据为:{&#x27;password&#x27;: &#x27;MTIzNDU2&#x27;, &#x27;username&#x27;: &#x27;admin&#x27;},期望数据为:{&#x27;username&#x27;: &#x27;超级管理&#x27;, &#x27;account&#x27;: &#x27;admin&#x27;, &#x27;loginStatus&#x27;: True},服务器返回的数据为:{&quot;token&quot;:&quot;eyJhbGciOiJIUzUxMiJ9.eyJzdWIiOiJhZG1pbiIsInRlbmFudElkIjoiLTEiLCJleHAiOjE2OTkzMjM1MDEsImlhdCI6MTY5OTIzNzEwMX0.F8yDruDzTVjwCKvG0xBhB79eAsed-b2coyB2dJHeAw8MI_o4kGWeLotnCaUR5JA_97pRGMFBS_IMgWIXgsXnoA&quot;,&quot;username&quot;:&quot;超级管理员&quot;,&quot;account&quot;:&quot;admin&quot;,&quot;userId&quot;:&quot;1&quot;,&quot;expiration&quot;:86400,&quot;loginStatus&quot;:true,&quot;userAttrs&quot;:{&quot;tenantId&quot;:&quot;-1&quot;}}<br/></div></td></tr></tbody>
<tbody class="failed results-table-row">
<tr>
<td class="col-result">Failed</td>
<td class="col-name">InterfaceAutoTest_2/test_case/test_zhangsan/test_bpm.py::TestBPM::test_bpm[http://120.46.172.186:8080/refresh-GET-None-None-expect_data10-None-None-None]</td>
<td class="col-duration">0.11</td>
<td class="col-links"></td></tr>
<tr>
<td class="extra" colspan="4">
<div class="log">self = &lt;InterfaceAutoTest_2.test_case.test_zhangsan.test_bpm.TestBPM object at 0x11E2C990&gt;<br/>db_fix = &lt;InterfaceAutoTest.common.db.DB object at 0x1214E350&gt;<br/>req_fix = &lt;InterfaceAutoTest.requests_method.requests_method.RequestsMethod object at 0x1214EBB0&gt;, case_url = &#x27;http://120.46.172.186:8080/refresh&#x27;<br/>case_method = &#x27;GET&#x27;, case_mime = None, case_data = None, expect_data = {&#x27;message&#x27;: &#x27;刷新成功&#x27;}, sql_type = None, sql_data = None, update_key = None<br/><br/> @pytest.mark.parametrize(&quot;case_url, case_method, case_mime, case_data, expect_data, sql_type, sql_data, update_key&quot;, ReadExcel(&quot;BPM&quot;, excel_path=excel_path).get_data())<br/> def test_bpm(self, db_fix, req_fix, case_url, case_method, case_mime, case_data, expect_data, sql_type, sql_data, update_key):<br/> # 判断sql语句的类型是否为delete<br/> if sql_type == &quot;delete&quot;:<br/> # 使用DB类对象执行删除的sql语句<br/> db_fix.delete(sql_data)<br/> # 使用RequestsMethod类对象发送请求--pass<br/> # 判断sql语句类型是否为select<br/> elif sql_type == &quot;select&quot;:<br/> # 使用DB类对象执行查询的sql语句,并接收查询的结果<br/> select_result = db_fix.select(sql_data)<br/> # 将查询结果更新到用例数据中<br/> case_data[update_key] = select_result<br/> # 使用RequestsMethod类对象发送请求--pass<br/> <br/> # 判断sql语句的类型是否为select|delete或者为delete|select<br/> elif sql_type == &quot;select|delete&quot; or sql_type == &quot;delete|select&quot;:<br/> # 使用DB类对象执行删除的sql语句<br/> db_fix.delete(sql_data.get(&quot;delete&quot;))<br/> # 使用DB类对象执行查询的sql语句,并接收查询的结果<br/> select_result = db_fix.select(sql_data.get(&quot;select&quot;))<br/> # 将查询结果更新到用例数据中<br/> case_data[update_key] = select_result<br/> <br/> # 使用RequestsMethod类对象发送请求<br/> res = req_fix.request_all(req_method=case_method, req_url=case_url, req_mime=case_mime, case_data=case_data)<br/> <br/> <br/> # 断言<br/> try:<br/> for key in expect_data:<br/>&gt; assert expect_data[key] == res.json().get(key)<br/><span class="error">E AssertionError: assert &#x27;刷新成功&#x27; == None</span><br/><span class="error">E + where None = &lt;built-in method get of dict object at 0x11E17330&gt;(&#x27;message&#x27;)</span><br/><span class="error">E + where &lt;built-in method get of dict object at 0x11E17330&gt; = {&#x27;account&#x27;: &#x27;&#x27;, &#x27;loginStatus&#x27;: True, &#x27;token&#x27;: &#x27;eyJhbGciOiJIUzUxMiJ9.eyJzdWIiOiJhZG1pbiIsInRlbmFudElkIjoiLTEiLCJleHAiOjE2OTkzMjM1MDIsImlhdCI6MTY5OTIzNzEwMn0.Di8hTaAa477zCxYvjx1ZY-6WpUdtb44Cg4q9WKI2Yjzjd_tADU_TSfEdm8OZTzWDzdWW6vMF_q_DZJQwCHFtTg&#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.eyJzdWIiOiJhZG1pbiIsInRlbmFudElkIjoiLTEiLCJleHAiOjE2OTkzMjM1MDIsImlhdCI6MTY5OTIzNzEwMn0.Di8hTaAa477zCxYvjx1ZY-6WpUdtb44Cg4q9WKI2Yjzjd_tADU_TSfEdm8OZTzWDzdWW6vMF_q_DZJQwCHFtTg&#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/>InterfaceAutoTest_2\test_case\test_zhangsan\test_bpm.py:51: AssertionError<br/><br/>During handling of the above exception, another exception occurred:<br/><br/>self = &lt;InterfaceAutoTest_2.test_case.test_zhangsan.test_bpm.TestBPM object at 0x11E2C990&gt;<br/>db_fix = &lt;InterfaceAutoTest.common.db.DB object at 0x1214E350&gt;<br/>req_fix = &lt;InterfaceAutoTest.requests_method.requests_method.RequestsMethod object at 0x1214EBB0&gt;, case_url = &#x27;http://120.46.172.186:8080/refresh&#x27;<br/>case_method = &#x27;GET&#x27;, case_mime = None, case_data = None, expect_data = {&#x27;message&#x27;: &#x27;刷新成功&#x27;}, sql_type = None, sql_data = None, update_key = None<br/><br/> @pytest.mark.parametrize(&quot;case_url, case_method, case_mime, case_data, expect_data, sql_type, sql_data, update_key&quot;, ReadExcel(&quot;BPM&quot;, excel_path=excel_path).get_data())<br/> def test_bpm(self, db_fix, req_fix, case_url, case_method, case_mime, case_data, expect_data, sql_type, sql_data, update_key):<br/> # 判断sql语句的类型是否为delete<br/> if sql_type == &quot;delete&quot;:<br/> # 使用DB类对象执行删除的sql语句<br/> db_fix.delete(sql_data)<br/> # 使用RequestsMethod类对象发送请求--pass<br/> # 判断sql语句类型是否为select<br/> elif sql_type == &quot;select&quot;:<br/> # 使用DB类对象执行查询的sql语句,并接收查询的结果<br/> select_result = db_fix.select(sql_data)<br/> # 将查询结果更新到用例数据中<br/> case_data[update_key] = select_result<br/> # 使用RequestsMethod类对象发送请求--pass<br/> <br/> # 判断sql语句的类型是否为select|delete或者为delete|select<br/> elif sql_type == &quot;select|delete&quot; or sql_type == &quot;delete|select&quot;:<br/> # 使用DB类对象执行删除的sql语句<br/> db_fix.delete(sql_data.get(&quot;delete&quot;))<br/> # 使用DB类对象执行查询的sql语句,并接收查询的结果<br/> select_result = db_fix.select(sql_data.get(&quot;select&quot;))<br/> # 将查询结果更新到用例数据中<br/> case_data[update_key] = select_result<br/> <br/> # 使用RequestsMethod类对象发送请求<br/> res = req_fix.request_all(req_method=case_method, req_url=case_url, req_mime=case_mime, case_data=case_data)<br/> <br/> <br/> # 断言<br/> try:<br/> for key in expect_data:<br/> assert expect_data[key] == res.json().get(key)<br/> except:<br/> log.error(&quot;断言失败&quot;+&quot;,用例数据为:&quot;+str(case_data)+&quot;,期望数据为:&quot;+str(expect_data)+&quot;,服务器返回的数据为:&quot;+res.text)<br/>&gt; raise AssertionError(&quot;断言失败&quot;)<br/><span class="error">E AssertionError: 断言失败</span><br/><br/>InterfaceAutoTest_2\test_case\test_zhangsan\test_bpm.py:54: AssertionError<br/> -------------------------------Captured log call-------------------------------- <br/>ERROR 黄总:test_bpm.py:53 断言失败,用例数据为:None,期望数据为:{&#x27;message&#x27;: &#x27;刷新成功&#x27;},服务器返回的数据为:{&quot;token&quot;:&quot;eyJhbGciOiJIUzUxMiJ9.eyJzdWIiOiJhZG1pbiIsInRlbmFudElkIjoiLTEiLCJleHAiOjE2OTkzMjM1MDIsImlhdCI6MTY5OTIzNzEwMn0.Di8hTaAa477zCxYvjx1ZY-6WpUdtb44Cg4q9WKI2Yjzjd_tADU_TSfEdm8OZTzWDzdWW6vMF_q_DZJQwCHFtTg&quot;,&quot;username&quot;:&quot;&quot;,&quot;account&quot;:&quot;&quot;,&quot;userId&quot;:&quot;&quot;,&quot;loginStatus&quot;:true,&quot;userAttrs&quot;:{}}<br/></div></td></tr></tbody>
<tbody class="failed results-table-row">
<tr>
<td class="col-result">Failed</td>
<td class="col-name">InterfaceAutoTest_2/test_case/test_zhangsan/test_bpm.py::TestBPM::test_bpm[http://120.46.172.186:8080/api/demension/v1/dem/deleteDemByIds-DELETE-query-case_data16-expect_data16-select-SELECT ID_ from uc_demension WHERE `CODE_`=&quot;dem_test57_abc&quot;;-ids]</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;InterfaceAutoTest_2.test_case.test_zhangsan.test_bpm.TestBPM object at 0x11E2C310&gt;<br/>db_fix = &lt;InterfaceAutoTest.common.db.DB object at 0x1214E350&gt;<br/>req_fix = &lt;InterfaceAutoTest.requests_method.requests_method.RequestsMethod object at 0x1214EBB0&gt;<br/>case_url = &#x27;http://120.46.172.186:8080/api/demension/v1/dem/deleteDemByIds&#x27;, case_method = &#x27;DELETE&#x27;, case_mime = &#x27;query&#x27;<br/>case_data = {&#x27;ids&#x27;: &#x27;1721351287724851200&#x27;}, expect_data = {&#x27;message&#x27;: &#x27;删除维度成功&#x27;, &#x27;state&#x27;: True}, sql_type = &#x27;select&#x27;<br/>sql_data = &#x27;SELECT ID_ from uc_demension WHERE `CODE_`=&quot;dem_test57_abc&quot;;&#x27;, update_key = &#x27;ids&#x27;<br/><br/> @pytest.mark.parametrize(&quot;case_url, case_method, case_mime, case_data, expect_data, sql_type, sql_data, update_key&quot;, ReadExcel(&quot;BPM&quot;, excel_path=excel_path).get_data())<br/> def test_bpm(self, db_fix, req_fix, case_url, case_method, case_mime, case_data, expect_data, sql_type, sql_data, update_key):<br/> # 判断sql语句的类型是否为delete<br/> if sql_type == &quot;delete&quot;:<br/> # 使用DB类对象执行删除的sql语句<br/> db_fix.delete(sql_data)<br/> # 使用RequestsMethod类对象发送请求--pass<br/> # 判断sql语句类型是否为select<br/> elif sql_type == &quot;select&quot;:<br/> # 使用DB类对象执行查询的sql语句,并接收查询的结果<br/> select_result = db_fix.select(sql_data)<br/> # 将查询结果更新到用例数据中<br/> case_data[update_key] = select_result<br/> # 使用RequestsMethod类对象发送请求--pass<br/> <br/> # 判断sql语句的类型是否为select|delete或者为delete|select<br/> elif sql_type == &quot;select|delete&quot; or sql_type == &quot;delete|select&quot;:<br/> # 使用DB类对象执行删除的sql语句<br/> db_fix.delete(sql_data.get(&quot;delete&quot;))<br/> # 使用DB类对象执行查询的sql语句,并接收查询的结果<br/> select_result = db_fix.select(sql_data.get(&quot;select&quot;))<br/> # 将查询结果更新到用例数据中<br/> case_data[update_key] = select_result<br/> <br/> # 使用RequestsMethod类对象发送请求<br/> res = req_fix.request_all(req_method=case_method, req_url=case_url, req_mime=case_mime, case_data=case_data)<br/> <br/> <br/> # 断言<br/> try:<br/> for key in expect_data:<br/>&gt; assert expect_data[key] == res.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/><span class="error">E + 删除维度成功</span><br/><br/>InterfaceAutoTest_2\test_case\test_zhangsan\test_bpm.py:51: AssertionError<br/><br/>During handling of the above exception, another exception occurred:<br/><br/>self = &lt;InterfaceAutoTest_2.test_case.test_zhangsan.test_bpm.TestBPM object at 0x11E2C310&gt;<br/>db_fix = &lt;InterfaceAutoTest.common.db.DB object at 0x1214E350&gt;<br/>req_fix = &lt;InterfaceAutoTest.requests_method.requests_method.RequestsMethod object at 0x1214EBB0&gt;<br/>case_url = &#x27;http://120.46.172.186:8080/api/demension/v1/dem/deleteDemByIds&#x27;, case_method = &#x27;DELETE&#x27;, case_mime = &#x27;query&#x27;<br/>case_data = {&#x27;ids&#x27;: &#x27;1721351287724851200&#x27;}, expect_data = {&#x27;message&#x27;: &#x27;删除维度成功&#x27;, &#x27;state&#x27;: True}, sql_type = &#x27;select&#x27;<br/>sql_data = &#x27;SELECT ID_ from uc_demension WHERE `CODE_`=&quot;dem_test57_abc&quot;;&#x27;, update_key = &#x27;ids&#x27;<br/><br/> @pytest.mark.parametrize(&quot;case_url, case_method, case_mime, case_data, expect_data, sql_type, sql_data, update_key&quot;, ReadExcel(&quot;BPM&quot;, excel_path=excel_path).get_data())<br/> def test_bpm(self, db_fix, req_fix, case_url, case_method, case_mime, case_data, expect_data, sql_type, sql_data, update_key):<br/> # 判断sql语句的类型是否为delete<br/> if sql_type == &quot;delete&quot;:<br/> # 使用DB类对象执行删除的sql语句<br/> db_fix.delete(sql_data)<br/> # 使用RequestsMethod类对象发送请求--pass<br/> # 判断sql语句类型是否为select<br/> elif sql_type == &quot;select&quot;:<br/> # 使用DB类对象执行查询的sql语句,并接收查询的结果<br/> select_result = db_fix.select(sql_data)<br/> # 将查询结果更新到用例数据中<br/> case_data[update_key] = select_result<br/> # 使用RequestsMethod类对象发送请求--pass<br/> <br/> # 判断sql语句的类型是否为select|delete或者为delete|select<br/> elif sql_type == &quot;select|delete&quot; or sql_type == &quot;delete|select&quot;:<br/> # 使用DB类对象执行删除的sql语句<br/> db_fix.delete(sql_data.get(&quot;delete&quot;))<br/> # 使用DB类对象执行查询的sql语句,并接收查询的结果<br/> select_result = db_fix.select(sql_data.get(&quot;select&quot;))<br/> # 将查询结果更新到用例数据中<br/> case_data[update_key] = select_result<br/> <br/> # 使用RequestsMethod类对象发送请求<br/> res = req_fix.request_all(req_method=case_method, req_url=case_url, req_mime=case_mime, case_data=case_data)<br/> <br/> <br/> # 断言<br/> try:<br/> for key in expect_data:<br/> assert expect_data[key] == res.json().get(key)<br/> except:<br/> log.error(&quot;断言失败&quot;+&quot;,用例数据为:&quot;+str(case_data)+&quot;,期望数据为:&quot;+str(expect_data)+&quot;,服务器返回的数据为:&quot;+res.text)<br/>&gt; raise AssertionError(&quot;断言失败&quot;)<br/><span class="error">E AssertionError: 断言失败</span><br/><br/>InterfaceAutoTest_2\test_case\test_zhangsan\test_bpm.py:54: AssertionError<br/> -------------------------------Captured log call-------------------------------- <br/>ERROR 黄总:test_bpm.py:53 断言失败,用例数据为:{&#x27;ids&#x27;: &#x27;1721351287724851200&#x27;},期望数据为:{&#x27;state&#x27;: True, &#x27;message&#x27;: &#x27;删除维度成功&#x27;},服务器返回的数据为:{&quot;state&quot;:true,&quot;message&quot;:&quot;删除维度成功!&quot;,&quot;value&quot;:&quot;&quot;}<br/></div></td></tr></tbody>
<tbody class="skipped results-table-row">
<tr>
<td class="col-result">Skipped</td>
<td class="col-name">InterfaceAutoTest_2/test_case/test_order/test_pytest_func.py::Test01::test3</td>
<td class="col-duration">0.00</td>
<td class="col-links"></td></tr>
<tr>
<td class="extra" colspan="4">
<div class="log">(&#x27;C:\\Users\\86184\\AppData\\Local\\Programs\\Python\\Python37-32\\lib\\site-packages\\pytest_dependency.py&#x27;, 103, &#x27;Skipped: test3 depends on test1&#x27;)<br/></div></td></tr></tbody>
<tbody class="passed results-table-row">
<tr>
<td class="col-result">Passed</td>
<td class="col-name">InterfaceAutoTest_2/test_case/test_laohuang/test_bpm_laohuang.py::TestBPM::test_bpm[http://120.46.172.186:8080/auth-POST-json-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="empty log">No log output captured.</div></td></tr></tbody>
<tbody class="passed results-table-row">
<tr>
<td class="col-result">Passed</td>
<td class="col-name">InterfaceAutoTest_2/test_case/test_laohuang/test_bpm_laohuang.py::TestBPM::test_bpm[http://120.46.172.186:8080/auth-POST-json-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="empty log">No log output captured.</div></td></tr></tbody>
<tbody class="passed results-table-row">
<tr>
<td class="col-result">Passed</td>
<td class="col-name">InterfaceAutoTest_2/test_case/test_laohuang/test_bpm_laohuang.py::TestBPM::test_bpm[http://120.46.172.186:8080/auth-POST-json-case_data3-expect_data3-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="empty log">No log output captured.</div></td></tr></tbody>
<tbody class="passed results-table-row">
<tr>
<td class="col-result">Passed</td>
<td class="col-name">InterfaceAutoTest_2/test_case/test_laohuang/test_bpm_laohuang.py::TestBPM::test_bpm[http://120.46.172.186:8080/auth-POST-json-case_data4-expect_data4-None-None-None]</td>
<td class="col-duration">0.11</td>
<td class="col-links"></td></tr>
<tr>
<td class="extra" colspan="4">
<div class="empty log">No log output captured.</div></td></tr></tbody>
<tbody class="passed results-table-row">
<tr>
<td class="col-result">Passed</td>
<td class="col-name">InterfaceAutoTest_2/test_case/test_laohuang/test_bpm_laohuang.py::TestBPM::test_bpm[http://120.46.172.186:8080/auth-POST-application/json-case_data5-expect_data5-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="empty log">No log output captured.</div></td></tr></tbody>
<tbody class="passed results-table-row">
<tr>
<td class="col-result">Passed</td>
<td class="col-name">InterfaceAutoTest_2/test_case/test_laohuang/test_bpm_laohuang.py::TestBPM::test_bpm[http://120.46.172.186:8080/auth-POST-application/json-case_data6-expect_data6-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="empty log">No log output captured.</div></td></tr></tbody>
<tbody class="passed results-table-row">
<tr>
<td class="col-result">Passed</td>
<td class="col-name">InterfaceAutoTest_2/test_case/test_laohuang/test_bpm_laohuang.py::TestBPM::test_bpm[http://120.46.172.186:8080/auth-POST-json-case_data7-expect_data7-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="empty log">No log output captured.</div></td></tr></tbody>
<tbody class="passed results-table-row">
<tr>
<td class="col-result">Passed</td>
<td class="col-name">InterfaceAutoTest_2/test_case/test_laohuang/test_bpm_laohuang.py::TestBPM::test_bpm[http://120.46.172.186:8080/auth-POST-application/json-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="empty log">No log output captured.</div></td></tr></tbody>
<tbody class="passed results-table-row">
<tr>
<td class="col-result">Passed</td>
<td class="col-name">InterfaceAutoTest_2/test_case/test_laohuang/test_bpm_laohuang.py::TestBPM::test_bpm[http://120.46.172.186:8080/auth-POST-json-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="empty log">No log output captured.</div></td></tr></tbody>
<tbody class="passed results-table-row">
<tr>
<td class="col-result">Passed</td>
<td class="col-name">InterfaceAutoTest_2/test_case/test_laohuang/test_bpm_laohuang.py::TestBPM::test_bpm[http://120.46.172.186:8080/api/demension/v1/dem/addDem-post-json-case_data11-expect_data11-delete-DELETE FROM uc_demension WHERE `CODE_`=&quot;dem_test57_abc&quot;;-None]</td>
<td class="col-duration">0.14</td>
<td class="col-links"></td></tr>
<tr>
<td class="extra" colspan="4">
<div class="empty log">No log output captured.</div></td></tr></tbody>
<tbody class="passed results-table-row">
<tr>
<td class="col-result">Passed</td>
<td class="col-name">InterfaceAutoTest_2/test_case/test_laohuang/test_bpm_laohuang.py::TestBPM::test_bpm[http://120.46.172.186:8080/api/demension/v1/dem/getDem-GET-query-case_data12-expect_data12-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="empty log">No log output captured.</div></td></tr></tbody>
<tbody class="passed results-table-row">
<tr>
<td class="col-result">Passed</td>
<td class="col-name">InterfaceAutoTest_2/test_case/test_laohuang/test_bpm_laohuang.py::TestBPM::test_bpm[http://120.46.172.186:8080/api/org/v1/org/addOrg-POST-application/json-case_data13-expect_data13-select|delete-sql_data13-demId]</td>
<td class="col-duration">0.18</td>
<td class="col-links"></td></tr>
<tr>
<td class="extra" colspan="4">
<div class="empty log">No log output captured.</div></td></tr></tbody>
<tbody class="passed results-table-row">
<tr>
<td class="col-result">Passed</td>
<td class="col-name">InterfaceAutoTest_2/test_case/test_laohuang/test_bpm_laohuang.py::TestBPM::test_bpm[http://120.46.172.186:8080/api/org/v1/orgParam/saveOrgParams-POST-body|query-case_data14-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="empty log">No log output captured.</div></td></tr></tbody>
<tbody class="passed results-table-row">
<tr>
<td class="col-result">Passed</td>
<td class="col-name">InterfaceAutoTest_2/test_case/test_laohuang/test_bpm_laohuang.py::TestBPM::test_bpm[http://120.46.172.186:8080/api/org/v1/org/deleteOrg-POST-x-www-form-urlencoded-test_org_57-expect_data15-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="empty log">No log output captured.</div></td></tr></tbody>
<tbody class="passed results-table-row">
<tr>
<td class="col-result">Passed</td>
<td class="col-name">InterfaceAutoTest_2/test_case/test_order/test_pytest_func.py::Test01::test1</td>
<td class="col-duration">0.16</td>
<td class="col-links"></td></tr>
<tr>
<td class="extra" colspan="4">
<div class="log"> ------------------------------Captured stdout call------------------------------ <br/>用例1
{&quot;token&quot;:&quot;eyJhbGciOiJIUzUxMiJ9.eyJzdWIiOiJhZG1pbiIsInRlbmFudElkIjoiLTEiLCJleHAiOjE2OTkzMjM1MDAsImlhdCI6MTY5OTIzNzEwMH0.rGlDWKZWa_LeDc5SG1iK9_tmkd0C9VsyhufgXWbYs1cK2ewOaGabwcepcs2yrx8QDpP3nB2-qow0FmpTI2DBrw&quot;,&quot;username&quot;:&quot;超级管理员&quot;,&quot;account&quot;:&quot;admin&quot;,&quot;userId&quot;:&quot;1&quot;,&quot;expiration&quot;:86400,&quot;loginStatus&quot;:true,&quot;userAttrs&quot;:{&quot;tenantId&quot;:&quot;-1&quot;}}
<br/></div></td></tr></tbody>
<tbody class="passed results-table-row">
<tr>
<td class="col-result">Passed</td>
<td class="col-name">InterfaceAutoTest_2/test_case/test_order/test_pytest_func.py::Test01::test2</td>
<td class="col-duration">0.06</td>
<td class="col-links"></td></tr>
<tr>
<td class="extra" colspan="4">
<div class="log"> ------------------------------Captured stdout call------------------------------ <br/>添加维度用例
{&quot;state&quot;:true,&quot;message&quot;:&quot;添加维度成功!&quot;,&quot;value&quot;:&quot;&quot;}
<br/></div></td></tr></tbody>
<tbody class="passed results-table-row">
<tr>
<td class="col-result">Passed</td>
<td class="col-name">InterfaceAutoTest_2/test_case/test_zhangsan/test_bpm.py::TestBPM::test_bpm[http://120.46.172.186:8080/auth-POST-json-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="empty log">No log output captured.</div></td></tr></tbody>
<tbody class="passed results-table-row">
<tr>
<td class="col-result">Passed</td>
<td class="col-name">InterfaceAutoTest_2/test_case/test_zhangsan/test_bpm.py::TestBPM::test_bpm[http://120.46.172.186:8080/auth-POST-json-case_data2-expect_data2-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="empty log">No log output captured.</div></td></tr></tbody>
<tbody class="passed results-table-row">
<tr>
<td class="col-result">Passed</td>
<td class="col-name">InterfaceAutoTest_2/test_case/test_zhangsan/test_bpm.py::TestBPM::test_bpm[http://120.46.172.186:8080/auth-POST-json-case_data3-expect_data3-None-None-None]</td>
<td class="col-duration">0.11</td>
<td class="col-links"></td></tr>
<tr>
<td class="extra" colspan="4">
<div class="empty log">No log output captured.</div></td></tr></tbody>
<tbody class="passed results-table-row">
<tr>
<td class="col-result">Passed</td>
<td class="col-name">InterfaceAutoTest_2/test_case/test_zhangsan/test_bpm.py::TestBPM::test_bpm[http://120.46.172.186:8080/auth-POST-json-case_data4-expect_data4-None-None-None]</td>
<td class="col-duration">0.11</td>
<td class="col-links"></td></tr>
<tr>
<td class="extra" colspan="4">
<div class="empty log">No log output captured.</div></td></tr></tbody>
<tbody class="passed results-table-row">
<tr>
<td class="col-result">Passed</td>
<td class="col-name">InterfaceAutoTest_2/test_case/test_zhangsan/test_bpm.py::TestBPM::test_bpm[http://120.46.172.186:8080/auth-POST-application/json-case_data5-expect_data5-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="empty log">No log output captured.</div></td></tr></tbody>
<tbody class="passed results-table-row">
<tr>
<td class="col-result">Passed</td>
<td class="col-name">InterfaceAutoTest_2/test_case/test_zhangsan/test_bpm.py::TestBPM::test_bpm[http://120.46.172.186:8080/auth-POST-application/json-case_data6-expect_data6-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="empty log">No log output captured.</div></td></tr></tbody>
<tbody class="passed results-table-row">
<tr>
<td class="col-result">Passed</td>
<td class="col-name">InterfaceAutoTest_2/test_case/test_zhangsan/test_bpm.py::TestBPM::test_bpm[http://120.46.172.186:8080/auth-POST-json-case_data7-expect_data7-None-None-None]</td>
<td class="col-duration">0.11</td>
<td class="col-links"></td></tr>
<tr>
<td class="extra" colspan="4">
<div class="empty log">No log output captured.</div></td></tr></tbody>
<tbody class="passed results-table-row">
<tr>
<td class="col-result">Passed</td>
<td class="col-name">InterfaceAutoTest_2/test_case/test_zhangsan/test_bpm.py::TestBPM::test_bpm[http://120.46.172.186:8080/auth-POST-application/json-case_data8-expect_data8-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="empty log">No log output captured.</div></td></tr></tbody>
<tbody class="passed results-table-row">
<tr>
<td class="col-result">Passed</td>
<td class="col-name">InterfaceAutoTest_2/test_case/test_zhangsan/test_bpm.py::TestBPM::test_bpm[http://120.46.172.186:8080/auth-POST-json-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="empty log">No log output captured.</div></td></tr></tbody>
<tbody class="passed results-table-row">
<tr>
<td class="col-result">Passed</td>
<td class="col-name">InterfaceAutoTest_2/test_case/test_zhangsan/test_bpm.py::TestBPM::test_bpm[http://120.46.172.186:8080/api/demension/v1/dem/addDem-post-json-case_data11-expect_data11-delete-DELETE FROM uc_demension WHERE `CODE_`=&quot;dem_test57_abc&quot;;-None]</td>
<td class="col-duration">0.24</td>
<td class="col-links"></td></tr>
<tr>
<td class="extra" colspan="4">
<div class="empty log">No log output captured.</div></td></tr></tbody>
<tbody class="passed results-table-row">
<tr>
<td class="col-result">Passed</td>
<td class="col-name">InterfaceAutoTest_2/test_case/test_zhangsan/test_bpm.py::TestBPM::test_bpm[http://120.46.172.186:8080/api/demension/v1/dem/getDem-GET-query-case_data12-expect_data12-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="empty log">No log output captured.</div></td></tr></tbody>
<tbody class="passed results-table-row">
<tr>
<td class="col-result">Passed</td>
<td class="col-name">InterfaceAutoTest_2/test_case/test_zhangsan/test_bpm.py::TestBPM::test_bpm[http://120.46.172.186:8080/api/org/v1/org/addOrg-POST-application/json-case_data13-expect_data13-select|delete-sql_data13-demId]</td>
<td class="col-duration">0.19</td>
<td class="col-links"></td></tr>
<tr>
<td class="extra" colspan="4">
<div class="empty log">No log output captured.</div></td></tr></tbody>
<tbody class="passed results-table-row">
<tr>
<td class="col-result">Passed</td>
<td class="col-name">InterfaceAutoTest_2/test_case/test_zhangsan/test_bpm.py::TestBPM::test_bpm[http://120.46.172.186:8080/api/org/v1/orgParam/saveOrgParams-POST-body|query-case_data14-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="empty log">No log output captured.</div></td></tr></tbody>
<tbody class="passed results-table-row">
<tr>
<td class="col-result">Passed</td>
<td class="col-name">InterfaceAutoTest_2/test_case/test_zhangsan/test_bpm.py::TestBPM::test_bpm[http://120.46.172.186:8080/api/org/v1/org/deleteOrg-POST-x-www-form-urlencoded-test_org_57-expect_data15-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="empty log">No log output captured.</div></td></tr></tbody></table></body></html>
\ No newline at end of file
{"uuid": "422cdfed-1010-4c46-9cb2-c07c210edb6b", "befores": [{"name": "case_method", "status": "passed", "start": 1699242128421, "stop": 1699242128421}], "start": 1699242128421, "stop": 1699242128484}
\ No newline at end of file
{"uuid": "c2d032fb-ad5c-4609-93e3-260d3f77d5db", "befores": [{"name": "sql_type", "status": "passed", "start": 1699242127017, "stop": 1699242127017}], "start": 1699242127017, "stop": 1699242127079}
\ No newline at end of file
{"uuid": "5dd2cfef-c943-4989-ab1e-9bdcb1d8b36b", "befores": [{"name": "case_url", "status": "passed", "start": 1699242126283, "stop": 1699242126283}], "start": 1699242126283, "stop": 1699242126394}
\ No newline at end of file
{"uuid": "a552f43c-c26e-4bcc-9de9-070df3c46bf5", "befores": [{"name": "expect_data", "status": "passed", "start": 1699242125612, "stop": 1699242125612}], "start": 1699242125612, "stop": 1699242125737}
\ No newline at end of file
{"uuid": "de2275be-d38d-477f-82f8-c70051a5bcfb", "befores": [{"name": "expect_data", "status": "passed", "start": 1699242127087, "stop": 1699242127087}], "start": 1699242127087, "stop": 1699242127185}
\ No newline at end of file
{"uuid": "62d35d6a-5fa0-4d9e-b338-0d31b83f7c6d", "befores": [{"name": "sql_data", "status": "passed", "start": 1699242127606, "stop": 1699242127606}], "start": 1699242127606, "stop": 1699242127700}
\ No newline at end of file
{"uuid": "0bc7a835-8255-40cf-8078-76137da78018", "befores": [{"name": "expect_data", "status": "passed", "start": 1699242124893, "stop": 1699242124893}], "start": 1699242124893, "stop": 1699242124988}
\ No newline at end of file
{"uuid": "e7910ec4-606b-45ca-b32b-0e273898f1ca", "befores": [{"name": "update_key", "status": "passed", "start": 1699242128488, "stop": 1699242128488}], "start": 1699242128488, "stop": 1699242128546}
\ No newline at end of file
{"name": "test_bpm[http://120.46.172.186:8080/api/org/v1/org/deleteOrg-POST-x-www-form-urlencoded-test_org_57-expect_data15-None-None-None]", "status": "passed", "parameters": [{"name": "case_url", "value": "'http://120.46.172.186:8080/api/org/v1/org/deleteOrg'"}, {"name": "case_method", "value": "'POST'"}, {"name": "case_mime", "value": "'x-www-form-urlencoded'"}, {"name": "case_data", "value": "'test_org_57'"}, {"name": "expect_data", "value": "{'state': True, 'message': '删除组织成功!'}"}, {"name": "sql_type", "value": "None"}, {"name": "sql_data", "value": "None"}, {"name": "update_key", "value": "None"}], "start": 1699242126217, "stop": 1699242126275, "uuid": "3ff376ad-1df1-4adc-b289-6f1061f1d476", "historyId": "5b3e17d638e7d2e8ed6e5ba865241766", "testCaseId": "317585064e361b6d13052050b1dc8a9e", "fullName": "InterfaceAutoTest_2.test_case.test_laohuang.test_bpm_laohuang.TestBPM#test_bpm", "labels": [{"name": "parentSuite", "value": "InterfaceAutoTest_2.test_case.test_laohuang"}, {"name": "suite", "value": "test_bpm_laohuang"}, {"name": "subSuite", "value": "TestBPM"}, {"name": "host", "value": "LAPTOP-TAHSRL94"}, {"name": "thread", "value": "24068-MainThread"}, {"name": "framework", "value": "pytest"}, {"name": "language", "value": "cpython3"}, {"name": "package", "value": "InterfaceAutoTest_2.test_case.test_laohuang.test_bpm_laohuang"}]}
\ No newline at end of file
{"uuid": "a0d7bb77-a6c1-46ac-b888-2628bb6b2bfb", "befores": [{"name": "case_method", "status": "passed", "start": 1699242125611, "stop": 1699242125611}], "start": 1699242125611, "stop": 1699242125738}
\ No newline at end of file
{"uuid": "44c2de69-ad71-4fd4-9888-6f9c9c3b3540", "befores": [{"name": "case_url", "status": "passed", "start": 1699242128015, "stop": 1699242128015}], "start": 1699242128015, "stop": 1699242128168}
\ No newline at end of file
{"uuid": "3d432f51-71d8-41f7-a447-3cdbc3f798a4", "befores": [{"name": "sql_data", "status": "passed", "start": 1699242125098, "stop": 1699242125098}], "start": 1699242125098, "stop": 1699242125196}
\ No newline at end of file
{"uuid": "fa6bee44-54a5-455c-9b04-25629f8c585b", "befores": [{"name": "case_method", "status": "passed", "start": 1699242128015, "stop": 1699242128015}], "start": 1699242128015, "stop": 1699242128168}
\ No newline at end of file
{"uuid": "d65465d3-de3a-4e02-a99f-152e6fd3ed9a", "befores": [{"name": "expect_data", "status": "passed", "start": 1699242126283, "stop": 1699242126283}], "start": 1699242126283, "stop": 1699242126392}
\ No newline at end of file
{"uuid": "29d9d569-c3c6-4e4c-a6b9-6933853b5703", "befores": [{"name": "sql_type", "status": "passed", "start": 1699242126152, "stop": 1699242126152}], "start": 1699242126152, "stop": 1699242126210}
\ No newline at end of file
{"uuid": "fa5c80da-a18c-4465-9c35-3dfcb97c5fab", "befores": [{"name": "sql_data", "status": "passed", "start": 1699242127806, "stop": 1699242127806}], "start": 1699242127805, "stop": 1699242127896}
\ No newline at end of file
{"uuid": "8258d0cf-dd13-4c1e-9f43-3b364b9aadd6", "befores": [{"name": "sql_type", "status": "passed", "start": 1699242125098, "stop": 1699242125098}], "start": 1699242125098, "stop": 1699242125197}
\ No newline at end of file
{"uuid": "7e3931ab-8a7e-419b-ba57-142c629e3de4", "children": ["a6d31e89-bfb3-485d-a735-d4c466005cca", "2f00605c-54f5-4f15-840d-a847b1da8335", "2e909a78-7ede-4af0-944c-cf4a8d7f4388", "785aabf1-771a-4bad-b81f-19e59cf47722", "fc82b399-6c00-4a71-835d-75162cd1cfba", "f36a9425-9193-4099-95d2-2f63857dfbf0", "df94057c-bd47-47d7-b0e6-55052a18ff45", "d9079439-d469-4050-a736-e78f185b4de5", "13a48860-0cea-4f0e-a0ba-5b8825ccfe22", "bf299d4f-fd7a-49b5-b26a-139e000f6fcc", "18bba92e-2c50-49ab-9edc-96f00e1e564b", "38ab2039-2fb0-43eb-9d98-ec4d5629a251", "4496d4f0-4c17-40c3-ac9e-7678c2e254bb", "eb31edcf-b76a-4459-a307-4739aa773a88", "0e813ea2-aa48-45b8-a97e-8fe72f2646a2", "d6a465e7-8539-45d1-9cd5-15e849a9b052", "3f15ba40-a451-47c7-92f9-65067fa04182"], "befores": [{"name": "req_fix", "status": "passed", "start": 1699242126817, "stop": 1699242126933}], "afters": [{"name": "req_fix::0", "status": "passed", "start": 1699242128668, "stop": 1699242128668}], "start": 1699242126817, "stop": 1699242128668}
\ No newline at end of file
{"uuid": "a5002220-e4c3-47b4-b595-751e6406dd4e", "befores": [{"name": "case_data", "status": "passed", "start": 1699242126152, "stop": 1699242126152}], "start": 1699242126152, "stop": 1699242126212}
\ No newline at end of file
{"uuid": "2f484c1f-3fd1-476e-8548-683c913e5ddc", "befores": [{"name": "case_mime", "status": "passed", "start": 1699242127805, "stop": 1699242127805}], "start": 1699242127805, "stop": 1699242127898}
\ No newline at end of file
用例1
{"token":"eyJhbGciOiJIUzUxMiJ9.eyJzdWIiOiJhZG1pbiIsInRlbmFudElkIjoiLTEiLCJleHAiOjE2OTkzMjg1MjYsImlhdCI6MTY5OTI0MjEyNn0.5CpJBi19CiIHgaiaMyN6wZJOIuZjFWrZouKnWZ7UzmlRfkp9SIWRcBTJPOUiioMc9-dl_Fya7-U9F8av4DmQOw","username":"超级管理员","account":"admin","userId":"1","expiration":86400,"loginStatus":true,"userAttrs":{"tenantId":"-1"}}
{"uuid": "d9c0745e-5108-41fe-904e-db1ef909e122", "befores": [{"name": "case_data", "status": "passed", "start": 1699242125097, "stop": 1699242125097}], "start": 1699242125097, "stop": 1699242125198}
\ No newline at end of file
{"uuid": "1dde04d1-2000-41d0-a121-c8fd59ea5c7b", "befores": [{"name": "sql_type", "status": "passed", "start": 1699242127087, "stop": 1699242127087}], "start": 1699242127087, "stop": 1699242127184}
\ No newline at end of file
{"uuid": "3f99ef06-097f-4e70-a656-7983459ddc44", "befores": [{"name": "case_mime", "status": "passed", "start": 1699242128553, "stop": 1699242128553}], "start": 1699242128553, "stop": 1699242128666}
\ No newline at end of file
{"uuid": "7689695f-ab84-45d7-aa37-ccf84f73d2ab", "befores": [{"name": "expect_data", "status": "passed", "start": 1699242126216, "stop": 1699242126216}], "start": 1699242126216, "stop": 1699242126278}
\ No newline at end of file
{"uuid": "595f9525-7d8d-4fb0-b550-feae41170597", "befores": [{"name": "sql_type", "status": "passed", "start": 1699242128171, "stop": 1699242128172}], "start": 1699242128171, "stop": 1699242128221}
\ No newline at end of file
{"uuid": "3b7584ca-6d45-41fd-9ef3-409c9139fe1d", "befores": [{"name": "sql_data", "status": "passed", "start": 1699242127287, "stop": 1699242127287}], "start": 1699242127287, "stop": 1699242127380}
\ No newline at end of file
{"uuid": "d730ea0a-2b33-4af6-9b45-9dc1e6935e16", "befores": [{"name": "sql_data", "status": "passed", "start": 1699242128422, "stop": 1699242128422}], "start": 1699242128422, "stop": 1699242128480}
\ No newline at end of file
{"name": "test_bpm[http://120.46.172.186:8080/api/demension/v1/dem/addDem-post-json-case_data11-expect_data11-delete-DELETE FROM uc_demension WHERE `CODE_`=\"dem_test57_abc\";-None]", "status": "passed", "parameters": [{"name": "case_url", "value": "'http://120.46.172.186:8080/api/demension/v1/dem/addDem'"}, {"name": "case_method", "value": "'post'"}, {"name": "case_mime", "value": "'json'"}, {"name": "case_data", "value": "{'code': 'dem_test57_abc', 'description': '测试维度57', 'isDefault': 0, 'name': '测试57期的维度'}"}, {"name": "expect_data", "value": "{'state': True, 'message': '添加维度成功!'}"}, {"name": "sql_type", "value": "'delete'"}, {"name": "sql_data", "value": "'DELETE FROM uc_demension WHERE `CODE_`=\"dem_test57_abc\";'"}, {"name": "update_key", "value": "None"}], "start": 1699242125744, "stop": 1699242125887, "uuid": "944391c4-f1ac-4c01-a049-0da757083ff2", "historyId": "41c661511a95dc746322d218f80e5343", "testCaseId": "317585064e361b6d13052050b1dc8a9e", "fullName": "InterfaceAutoTest_2.test_case.test_laohuang.test_bpm_laohuang.TestBPM#test_bpm", "labels": [{"name": "parentSuite", "value": "InterfaceAutoTest_2.test_case.test_laohuang"}, {"name": "suite", "value": "test_bpm_laohuang"}, {"name": "subSuite", "value": "TestBPM"}, {"name": "host", "value": "LAPTOP-TAHSRL94"}, {"name": "thread", "value": "24068-MainThread"}, {"name": "framework", "value": "pytest"}, {"name": "language", "value": "cpython3"}, {"name": "package", "value": "InterfaceAutoTest_2.test_case.test_laohuang.test_bpm_laohuang"}]}
\ No newline at end of file
{"uuid": "3f81d1f2-a636-4fe1-8224-06ffeb220022", "befores": [{"name": "case_method", "status": "passed", "start": 1699242126152, "stop": 1699242126152}], "start": 1699242126152, "stop": 1699242126213}
\ No newline at end of file
{"uuid": "244c6324-5296-4d9c-b2d0-e0411c5b72d1", "befores": [{"name": "case_url", "status": "passed", "start": 1699242128487, "stop": 1699242128487}], "start": 1699242128487, "stop": 1699242128550}
\ No newline at end of file
{"uuid": "96ec8b8d-038f-4cd8-b6ba-dafe36565f02", "children": ["526c60ec-a3dd-4f93-a0b2-ac05caac874d", "62b32c4f-e1ed-42a4-a6df-ea3f333ffa8b", "1299b43f-53eb-4d94-a618-0b77d39e36ad", "5ea1b796-4f43-41ed-b57c-0510d0fb6a11", "9103af0f-ab67-473a-af61-5f84bade1aea", "e0ce9eb7-6ac0-449a-885b-caaa61800f2f", "f084ed43-c929-47bb-8a02-05cea9add22d", "2c42a5aa-1c3e-475c-9aa9-6c6bd708d88a", "6e78a222-1600-462a-9266-9127d3f7b0ad", "335e212a-47b5-4027-b0fc-aab540732e19", "ee9a79c9-7117-47f2-827d-a5ec1c39883e", "944391c4-f1ac-4c01-a049-0da757083ff2", "91bbcfa5-5549-4e6c-8c17-6e47f8ed5b77", "f6b9a8dc-6e71-440b-b90f-a7c99ee39ee0", "9bda1df2-30ff-4d6b-8186-57020ae25dde", "3ff376ad-1df1-4adc-b289-6f1061f1d476", "7d0e0737-d4fe-432e-aa89-f89d3fa4ddad"], "befores": [{"name": "db_fix", "status": "passed", "start": 1699242124196, "stop": 1699242124420}], "afters": [{"name": "db_fix::0", "status": "passed", "start": 1699242128673, "stop": 1699242128673}], "start": 1699242124196, "stop": 1699242128673}
\ No newline at end of file
{"uuid": "86f30093-577b-41d9-8b83-533357258ed4", "befores": [{"name": "case_mime", "status": "passed", "start": 1699242125413, "stop": 1699242125413}], "start": 1699242125413, "stop": 1699242125509}
\ No newline at end of file
{"uuid": "c9e3ef6c-f7cd-4e04-8870-deacefef2d53", "befores": [{"name": "case_url", "status": "passed", "start": 1699242127707, "stop": 1699242127707}], "start": 1699242127707, "stop": 1699242127802}
\ No newline at end of file
{"uuid": "75536ff0-31c3-4742-adc8-93508b51269c", "befores": [{"name": "expect_data", "status": "passed", "start": 1699242127017, "stop": 1699242127017}], "start": 1699242127017, "stop": 1699242127080}
\ No newline at end of file
{"uuid": "87937609-95b9-4ca2-931b-6b2bc49b9506", "befores": [{"name": "sql_type", "status": "passed", "start": 1699242125514, "stop": 1699242125514}], "start": 1699242125514, "stop": 1699242125604}
\ No newline at end of file
{"uuid": "807e9191-e07a-414a-a326-22d302a99791", "befores": [{"name": "case_url", "status": "passed", "start": 1699242127190, "stop": 1699242127190}], "start": 1699242127190, "stop": 1699242127284}
\ No newline at end of file
{"uuid": "fa769f6a-6b0f-4889-af5a-425a24d5effe", "befores": [{"name": "sql_type", "status": "passed", "start": 1699242128488, "stop": 1699242128488}], "start": 1699242128488, "stop": 1699242128548}
\ No newline at end of file
{"uuid": "eb7a5bc2-7ab7-401f-a482-aef9ef6323df", "befores": [{"name": "case_mime", "status": "passed", "start": 1699242127902, "stop": 1699242127902}], "start": 1699242127902, "stop": 1699242128011}
\ No newline at end of file
{"uuid": "6e3d1c5f-744e-4b4c-8702-b1e80b128226", "befores": [{"name": "case_mime", "status": "passed", "start": 1699242128016, "stop": 1699242128016}], "start": 1699242128015, "stop": 1699242128168}
\ No newline at end of file
{"uuid": "d0f77dbe-04b1-4554-b957-24517155503a", "befores": [{"name": "case_data", "status": "passed", "start": 1699242127707, "stop": 1699242127707}], "start": 1699242127707, "stop": 1699242127800}
\ No newline at end of file
{"uuid": "5d8b7928-baeb-4264-b2b8-c3578b9cbaee", "befores": [{"name": "case_method", "status": "passed", "start": 1699242127086, "stop": 1699242127086}], "start": 1699242127086, "stop": 1699242127187}
\ No newline at end of file
{"name": "test1", "status": "passed", "attachments": [{"name": "stdout", "source": "125fa72b-3f8a-4525-b1d5-39de29b9988b-attachment.txt", "type": "text/plain"}], "start": 1699242126496, "stop": 1699242126550, "uuid": "9effb113-0b86-4db4-ba47-ebf86f7b6c18", "historyId": "31302f189f4197c0ef53e34b7296010a", "testCaseId": "31302f189f4197c0ef53e34b7296010a", "fullName": "InterfaceAutoTest_2.test_case.test_order.test_pytest_func.Test01#test1", "labels": [{"name": "tag", "value": "dependency"}, {"name": "parentSuite", "value": "InterfaceAutoTest_2.test_case.test_order"}, {"name": "suite", "value": "test_pytest_func"}, {"name": "subSuite", "value": "Test01"}, {"name": "host", "value": "LAPTOP-TAHSRL94"}, {"name": "thread", "value": "24068-MainThread"}, {"name": "framework", "value": "pytest"}, {"name": "language", "value": "cpython3"}, {"name": "package", "value": "InterfaceAutoTest_2.test_case.test_order.test_pytest_func"}]}
\ No newline at end of file
{"uuid": "ba46c137-29f0-4661-b91b-6694b10439dd", "befores": [{"name": "expect_data", "status": "passed", "start": 1699242127707, "stop": 1699242127707}], "start": 1699242127707, "stop": 1699242127800}
\ No newline at end of file
{"uuid": "798f5330-8ab4-4f3b-b59a-6f5f493fcce0", "children": ["526c60ec-a3dd-4f93-a0b2-ac05caac874d", "62b32c4f-e1ed-42a4-a6df-ea3f333ffa8b", "1299b43f-53eb-4d94-a618-0b77d39e36ad", "5ea1b796-4f43-41ed-b57c-0510d0fb6a11", "9103af0f-ab67-473a-af61-5f84bade1aea", "e0ce9eb7-6ac0-449a-885b-caaa61800f2f", "f084ed43-c929-47bb-8a02-05cea9add22d", "2c42a5aa-1c3e-475c-9aa9-6c6bd708d88a", "6e78a222-1600-462a-9266-9127d3f7b0ad", "335e212a-47b5-4027-b0fc-aab540732e19", "ee9a79c9-7117-47f2-827d-a5ec1c39883e", "944391c4-f1ac-4c01-a049-0da757083ff2", "91bbcfa5-5549-4e6c-8c17-6e47f8ed5b77", "f6b9a8dc-6e71-440b-b90f-a7c99ee39ee0", "9bda1df2-30ff-4d6b-8186-57020ae25dde", "3ff376ad-1df1-4adc-b289-6f1061f1d476", "7d0e0737-d4fe-432e-aa89-f89d3fa4ddad", "9effb113-0b86-4db4-ba47-ebf86f7b6c18", "3c123d23-0011-40ee-8862-8c906aab45ad", "5adf36a9-1cf4-40e7-a818-63cc01a1db73", "a6d31e89-bfb3-485d-a735-d4c466005cca", "2f00605c-54f5-4f15-840d-a847b1da8335", "2e909a78-7ede-4af0-944c-cf4a8d7f4388", "785aabf1-771a-4bad-b81f-19e59cf47722", "fc82b399-6c00-4a71-835d-75162cd1cfba", "f36a9425-9193-4099-95d2-2f63857dfbf0", "df94057c-bd47-47d7-b0e6-55052a18ff45", "d9079439-d469-4050-a736-e78f185b4de5", "13a48860-0cea-4f0e-a0ba-5b8825ccfe22", "bf299d4f-fd7a-49b5-b26a-139e000f6fcc", "18bba92e-2c50-49ab-9edc-96f00e1e564b", "38ab2039-2fb0-43eb-9d98-ec4d5629a251", "4496d4f0-4c17-40c3-ac9e-7678c2e254bb", "eb31edcf-b76a-4459-a307-4739aa773a88", "0e813ea2-aa48-45b8-a97e-8fe72f2646a2", "d6a465e7-8539-45d1-9cd5-15e849a9b052", "3f15ba40-a451-47c7-92f9-65067fa04182"], "befores": [{"name": "_session_faker", "status": "passed", "start": 1699242124035, "stop": 1699242124196}], "start": 1699242124035, "stop": 1699242128670}
\ No newline at end of file
{"uuid": "2d2852a2-0e6f-4ffe-b74a-340a2cb7554e", "befores": [{"name": "case_method", "status": "passed", "start": 1699242125513, "stop": 1699242125513}], "start": 1699242125513, "stop": 1699242125607}
\ No newline at end of file
{"uuid": "fa5ff65e-fee3-4222-9e7c-5cc1d3b3c220", "befores": [{"name": "case_method", "status": "passed", "start": 1699242128553, "stop": 1699242128553}], "start": 1699242128553, "stop": 1699242128667}
\ No newline at end of file
{"uuid": "0aa366b4-bc4c-46ab-a130-abfdd2c4e340", "befores": [{"name": "expect_data", "status": "passed", "start": 1699242125743, "stop": 1699242125743}], "start": 1699242125743, "stop": 1699242125889}
\ No newline at end of file
{"uuid": "d436f9ce-e3a5-4d86-88ca-3149a079aa8a", "befores": [{"name": "sql_type", "status": "passed", "start": 1699242127902, "stop": 1699242127902}], "start": 1699242127902, "stop": 1699242128009}
\ No newline at end of file
{"uuid": "14dd0568-0288-418d-8084-7a84f3129b75", "befores": [{"name": "update_key", "status": "passed", "start": 1699242127087, "stop": 1699242127087}], "start": 1699242127087, "stop": 1699242127183}
\ No newline at end of file
{"uuid": "5636f77f-ba6d-45c8-87ae-037b5af47ee5", "befores": [{"name": "sql_type", "status": "passed", "start": 1699242124893, "stop": 1699242124893}], "start": 1699242124893, "stop": 1699242124988}
\ No newline at end of file
{"uuid": "b819d426-ad41-470a-be50-d49fccc7dfa5", "befores": [{"name": "expect_data", "status": "passed", "start": 1699242127287, "stop": 1699242127287}], "start": 1699242127287, "stop": 1699242127381}
\ No newline at end of file
{"uuid": "18d4c5b1-a734-41a7-93df-33de5b2cd23c", "befores": [{"name": "update_key", "status": "passed", "start": 1699242127190, "stop": 1699242127191}], "start": 1699242127190, "stop": 1699242127280}
\ No newline at end of file
{"name": "test_bpm[http://120.46.172.186:8080/api/demension/v1/dem/getDem-GET-query-case_data12-expect_data12-None-None-None]", "status": "passed", "parameters": [{"name": "case_url", "value": "'http://120.46.172.186:8080/api/demension/v1/dem/getDem'"}, {"name": "case_method", "value": "'GET'"}, {"name": "case_mime", "value": "'query'"}, {"name": "case_data", "value": "{'code': 'dem_test57_abc'}"}, {"name": "expect_data", "value": "{'demCode': 'dem_test57_abc', 'name': '测试57期的维度'}"}, {"name": "sql_type", "value": "None"}, {"name": "sql_data", "value": "None"}, {"name": "update_key", "value": "None"}], "start": 1699242128172, "stop": 1699242128219, "uuid": "4496d4f0-4c17-40c3-ac9e-7678c2e254bb", "historyId": "4d106789ce18e6bb7970b97b17c32e82", "testCaseId": "fddf80969464aadbd498677a3a3dd380", "fullName": "InterfaceAutoTest_2.test_case.test_zhangsan.test_bpm.TestBPM#test_bpm", "labels": [{"name": "parentSuite", "value": "InterfaceAutoTest_2.test_case.test_zhangsan"}, {"name": "suite", "value": "test_bpm"}, {"name": "subSuite", "value": "TestBPM"}, {"name": "host", "value": "LAPTOP-TAHSRL94"}, {"name": "thread", "value": "24068-MainThread"}, {"name": "framework", "value": "pytest"}, {"name": "language", "value": "cpython3"}, {"name": "package", "value": "InterfaceAutoTest_2.test_case.test_zhangsan.test_bpm"}]}
\ No newline at end of file
{"uuid": "d953dac0-39a8-4709-bce4-568469fb2dda", "befores": [{"name": "sql_data", "status": "passed", "start": 1699242126152, "stop": 1699242126152}], "start": 1699242126152, "stop": 1699242126209}
\ No newline at end of file
{"uuid": "52f3ba05-e6d4-468d-be06-5001e3b9deac", "befores": [{"name": "sql_data", "status": "passed", "start": 1699242128488, "stop": 1699242128488}], "start": 1699242128488, "stop": 1699242128547}
\ No newline at end of file
{"uuid": "d2b6c657-e3f1-4eac-8d01-c44e4551e1a2", "befores": [{"name": "case_mime", "status": "passed", "start": 1699242125953, "stop": 1699242125953}], "start": 1699242125953, "stop": 1699242126148}
\ No newline at end of file
{"uuid": "23f50094-d621-4f7e-a10c-c0e3f7c4ed1a", "befores": [{"name": "case_method", "status": "passed", "start": 1699242127190, "stop": 1699242127190}], "start": 1699242127190, "stop": 1699242127284}
\ No newline at end of file
{"uuid": "88811c2b-972e-4bca-8d49-19c6bd055001", "befores": [{"name": "update_key", "status": "passed", "start": 1699242127287, "stop": 1699242127287}], "start": 1699242127287, "stop": 1699242127379}
\ No newline at end of file
{"uuid": "273e16cd-f351-4731-8ade-604fcffb1c10", "befores": [{"name": "case_mime", "status": "passed", "start": 1699242124724, "stop": 1699242124724}], "start": 1699242124724, "stop": 1699242124782}
\ No newline at end of file
{"uuid": "688767ec-b8f9-4efd-880c-011680bb132b", "befores": [{"name": "sql_data", "status": "passed", "start": 1699242128554, "stop": 1699242128554}], "start": 1699242128554, "stop": 1699242128665}
\ No newline at end of file
{"uuid": "679ad91b-7ec8-4110-874c-ef28cf51c4a5", "befores": [{"name": "sql_data", "status": "passed", "start": 1699242128016, "stop": 1699242128016}], "start": 1699242128016, "stop": 1699242128165}
\ No newline at end of file
{"uuid": "50c82e86-a205-4143-b1da-df88aca92cb0", "befores": [{"name": "case_url", "status": "passed", "start": 1699242126933, "stop": 1699242126933}], "start": 1699242126933, "stop": 1699242127014}
\ No newline at end of file
{"uuid": "ff832e32-5f9f-4d8a-a439-4c7db3f24b54", "befores": [{"name": "expect_data", "status": "passed", "start": 1699242126934, "stop": 1699242126934}], "start": 1699242126934, "stop": 1699242127011}
\ No newline at end of file
{"name": "test_bpm[http://120.46.172.186:8080/auth-POST-json-case_data1-expect_data1-None-None-None]", "status": "passed", "parameters": [{"name": "case_url", "value": "'http://120.46.172.186:8080/auth'"}, {"name": "case_method", "value": "'POST'"}, {"name": "case_mime", "value": "'json'"}, {"name": "case_data", "value": "{'password': 'MTIzNDU2', 'username': 'adminadminadminadminadminadmin'}"}, {"name": "expect_data", "value": "{'state': False, 'message': '账号或密码错误'}"}, {"name": "sql_type", "value": "None"}, {"name": "sql_data", "value": "None"}, {"name": "update_key", "value": "None"}], "start": 1699242124725, "stop": 1699242124777, "uuid": "62b32c4f-e1ed-42a4-a6df-ea3f333ffa8b", "historyId": "3db2dbb08845117ec2de66609935964c", "testCaseId": "317585064e361b6d13052050b1dc8a9e", "fullName": "InterfaceAutoTest_2.test_case.test_laohuang.test_bpm_laohuang.TestBPM#test_bpm", "labels": [{"name": "parentSuite", "value": "InterfaceAutoTest_2.test_case.test_laohuang"}, {"name": "suite", "value": "test_bpm_laohuang"}, {"name": "subSuite", "value": "TestBPM"}, {"name": "host", "value": "LAPTOP-TAHSRL94"}, {"name": "thread", "value": "24068-MainThread"}, {"name": "framework", "value": "pytest"}, {"name": "language", "value": "cpython3"}, {"name": "package", "value": "InterfaceAutoTest_2.test_case.test_laohuang.test_bpm_laohuang"}]}
\ No newline at end of file
{"uuid": "543987ff-048d-4bee-8c66-6975ab0e3813", "befores": [{"name": "case_mime", "status": "passed", "start": 1699242128488, "stop": 1699242128488}], "start": 1699242128488, "stop": 1699242128549}
\ No newline at end of file
{"uuid": "6f03fb44-e03a-4b7e-abaa-f6af446f00df", "befores": [{"name": "case_method", "status": "passed", "start": 1699242125307, "stop": 1699242125307}], "start": 1699242125307, "stop": 1699242125410}
\ No newline at end of file
ERROR  黄总:test_bpm.py:53 断言失败,用例数据为:{'ids': '1721372365440434176'},期望数据为:{'state': True, 'message': '删除维度成功'},服务器返回的数据为:{"state":true,"message":"删除维度成功!","value":""}
\ No newline at end of file
{"uuid": "0640a536-f7ba-4b76-89df-e5f9040e85f4", "befores": [{"name": "case_method", "status": "passed", "start": 1699242127387, "stop": 1699242127387}], "start": 1699242127387, "stop": 1699242127484}
\ No newline at end of file
{"uuid": "ba405edf-49ad-4a3f-9ceb-12a56a43c044", "befores": [{"name": "sql_data", "status": "passed", "start": 1699242126934, "stop": 1699242126935}], "start": 1699242126934, "stop": 1699242127010}
\ No newline at end of file
{"uuid": "69834995-d4e2-42d6-8b88-87d9e3599a3a", "befores": [{"name": "case_method", "status": "passed", "start": 1699242125895, "stop": 1699242125895}], "start": 1699242125895, "stop": 1699242125950}
\ No newline at end of file
{"uuid": "87b31682-6a58-4423-9dd7-896d1c9fb3cc", "befores": [{"name": "case_url", "status": "passed", "start": 1699242125611, "stop": 1699242125611}], "start": 1699242125611, "stop": 1699242125739}
\ No newline at end of file
{"uuid": "80ade866-cea2-4594-b373-4386d84eb4a1", "befores": [{"name": "update_key", "status": "passed", "start": 1699242127806, "stop": 1699242127806}], "start": 1699242127806, "stop": 1699242127895}
\ No newline at end of file
{"uuid": "a20cd3a6-44c4-4a9c-958d-656730447eba", "befores": [{"name": "case_data", "status": "passed", "start": 1699242124994, "stop": 1699242124994}], "start": 1699242124994, "stop": 1699242125092}
\ No newline at end of file
{"uuid": "002b230d-ff50-4e44-a330-ce93ddfaf4c3", "befores": [{"name": "sql_data", "status": "passed", "start": 1699242128227, "stop": 1699242128227}], "start": 1699242128227, "stop": 1699242128409}
\ No newline at end of file
{"uuid": "ad416605-4f81-43c0-bb23-b572a593b6d9", "befores": [{"name": "expect_data", "status": "passed", "start": 1699242127605, "stop": 1699242127605}], "start": 1699242127605, "stop": 1699242127701}
\ No newline at end of file
{"name": "test_bpm[http://120.46.172.186:8080/auth-POST-json-case_data4-expect_data4-None-None-None]", "status": "passed", "parameters": [{"name": "case_url", "value": "'http://120.46.172.186:8080/auth'"}, {"name": "case_method", "value": "'POST'"}, {"name": "case_mime", "value": "'json'"}, {"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": 1699242127288, "stop": 1699242127378, "uuid": "fc82b399-6c00-4a71-835d-75162cd1cfba", "historyId": "7c81daf796c88d8be6affeae5094a638", "testCaseId": "fddf80969464aadbd498677a3a3dd380", "fullName": "InterfaceAutoTest_2.test_case.test_zhangsan.test_bpm.TestBPM#test_bpm", "labels": [{"name": "parentSuite", "value": "InterfaceAutoTest_2.test_case.test_zhangsan"}, {"name": "suite", "value": "test_bpm"}, {"name": "subSuite", "value": "TestBPM"}, {"name": "host", "value": "LAPTOP-TAHSRL94"}, {"name": "thread", "value": "24068-MainThread"}, {"name": "framework", "value": "pytest"}, {"name": "language", "value": "cpython3"}, {"name": "package", "value": "InterfaceAutoTest_2.test_case.test_zhangsan.test_bpm"}]}
\ No newline at end of file
{"uuid": "6bfdfd00-d1b3-4417-b860-3d5c847e4e67", "befores": [{"name": "case_data", "status": "passed", "start": 1699242124535, "stop": 1699242124535}], "start": 1699242124535, "stop": 1699242124719}
\ No newline at end of file
{"uuid": "8d8eb17d-825f-4c8d-9953-34a5467ba623", "befores": [{"name": "sql_type", "status": "passed", "start": 1699242128016, "stop": 1699242128016}], "start": 1699242128016, "stop": 1699242128166}
\ No newline at end of file
{"uuid": "808df71c-19b3-472f-a96e-59e0a35da383", "befores": [{"name": "case_mime", "status": "passed", "start": 1699242126283, "stop": 1699242126283}], "start": 1699242126283, "stop": 1699242126393}
\ No newline at end of file
{"uuid": "aacdb708-1a5e-425a-a711-f0621a66c9d2", "befores": [{"name": "case_method", "status": "passed", "start": 1699242127805, "stop": 1699242127805}], "start": 1699242127805, "stop": 1699242127899}
\ No newline at end of file
{"name": "test_bpm[http://120.46.172.186:8080/refresh-GET-None-None-expect_data10-None-None-None]", "status": "failed", "statusDetails": {"message": "AssertionError: 断言失败", "trace": "self = <InterfaceAutoTest_2.test_case.test_laohuang.test_bpm_laohuang.TestBPM object at 0x12AFBA90>\ndb_fix = <InterfaceAutoTest.common.db.DB object at 0x12B93C10>\nreq_fix = <InterfaceAutoTest.requests_method.requests_method.RequestsMethod object at 0x12AF3630>, case_url = 'http://120.46.172.186:8080/refresh'\ncase_method = 'GET', case_mime = None, case_data = None, expect_data = {'message': '刷新成功'}, sql_type = None, sql_data = None, update_key = None\n\n @pytest.mark.parametrize(\"case_url, case_method, case_mime, case_data, expect_data, sql_type, sql_data, update_key\", ReadExcel(\"BPM-laohuang\").get_data())\n def test_bpm(self, db_fix, req_fix, case_url, case_method, case_mime, case_data, expect_data, sql_type, sql_data, update_key):\n # 判断sql语句的类型是否为delete\n if sql_type == \"delete\":\n # 使用DB类对象执行删除的sql语句\n db_fix.delete(sql_data)\n # 使用RequestsMethod类对象发送请求--pass\n # 判断sql语句类型是否为select\n elif sql_type == \"select\":\n # 使用DB类对象执行查询的sql语句,并接收查询的结果\n select_result = db_fix.select(sql_data)\n # 将查询结果更新到用例数据中\n case_data[update_key] = select_result\n # 使用RequestsMethod类对象发送请求--pass\n \n # 判断sql语句的类型是否为select|delete或者为delete|select\n elif sql_type == \"select|delete\" or sql_type == \"delete|select\":\n # 使用DB类对象执行删除的sql语句\n db_fix.delete(sql_data.get(\"delete\"))\n # 使用DB类对象执行查询的sql语句,并接收查询的结果\n select_result = db_fix.select(sql_data.get(\"select\"))\n # 将查询结果更新到用例数据中\n case_data[update_key] = select_result\n \n # 使用RequestsMethod类对象发送请求\n res = req_fix.request_all(req_method=case_method, req_url=case_url, req_mime=case_mime, case_data=case_data)\n \n \n # 断言\n try:\n for key in expect_data:\n> assert expect_data[key] == res.json().get(key)\nE AssertionError: assert '刷新成功' == None\nE + where None = <built-in method get of dict object at 0x12AD6300>('message')\nE + where <built-in method get of dict object at 0x12AD6300> = {'account': '', 'loginStatus': True, 'token': 'eyJhbGciOiJIUzUxMiJ9.eyJzdWIiOiJhZG1pbiIsInRlbmFudElkIjoiLTEiLCJleHAiOj...0MjEyNX0.Oaqtv0ZEBeM6jwEapNM913EPBdyJzege659szhLr2viOQDvcEhggCGAr0NUm6To4eoFXaGT79C6s3YJw9usA7Q', 'userAttrs': {}, ...}.get\nE + where {'account': '', 'loginStatus': True, 'token': 'eyJhbGciOiJIUzUxMiJ9.eyJzdWIiOiJhZG1pbiIsInRlbmFudElkIjoiLTEiLCJleHAiOj...0MjEyNX0.Oaqtv0ZEBeM6jwEapNM913EPBdyJzege659szhLr2viOQDvcEhggCGAr0NUm6To4eoFXaGT79C6s3YJw9usA7Q', 'userAttrs': {}, ...} = <bound method Response.json of <Response [200]>>()\nE + where <bound method Response.json of <Response [200]>> = <Response [200]>.json\n\nInterfaceAutoTest_2\\test_case\\test_laohuang\\test_bpm_laohuang.py:48: AssertionError\n\nDuring handling of the above exception, another exception occurred:\n\nself = <InterfaceAutoTest_2.test_case.test_laohuang.test_bpm_laohuang.TestBPM object at 0x12AFBA90>\ndb_fix = <InterfaceAutoTest.common.db.DB object at 0x12B93C10>\nreq_fix = <InterfaceAutoTest.requests_method.requests_method.RequestsMethod object at 0x12AF3630>, case_url = 'http://120.46.172.186:8080/refresh'\ncase_method = 'GET', case_mime = None, case_data = None, expect_data = {'message': '刷新成功'}, sql_type = None, sql_data = None, update_key = None\n\n @pytest.mark.parametrize(\"case_url, case_method, case_mime, case_data, expect_data, sql_type, sql_data, update_key\", ReadExcel(\"BPM-laohuang\").get_data())\n def test_bpm(self, db_fix, req_fix, case_url, case_method, case_mime, case_data, expect_data, sql_type, sql_data, update_key):\n # 判断sql语句的类型是否为delete\n if sql_type == \"delete\":\n # 使用DB类对象执行删除的sql语句\n db_fix.delete(sql_data)\n # 使用RequestsMethod类对象发送请求--pass\n # 判断sql语句类型是否为select\n elif sql_type == \"select\":\n # 使用DB类对象执行查询的sql语句,并接收查询的结果\n select_result = db_fix.select(sql_data)\n # 将查询结果更新到用例数据中\n case_data[update_key] = select_result\n # 使用RequestsMethod类对象发送请求--pass\n \n # 判断sql语句的类型是否为select|delete或者为delete|select\n elif sql_type == \"select|delete\" or sql_type == \"delete|select\":\n # 使用DB类对象执行删除的sql语句\n db_fix.delete(sql_data.get(\"delete\"))\n # 使用DB类对象执行查询的sql语句,并接收查询的结果\n select_result = db_fix.select(sql_data.get(\"select\"))\n # 将查询结果更新到用例数据中\n case_data[update_key] = select_result\n \n # 使用RequestsMethod类对象发送请求\n res = req_fix.request_all(req_method=case_method, req_url=case_url, req_mime=case_mime, case_data=case_data)\n \n \n # 断言\n try:\n for key in expect_data:\n assert expect_data[key] == res.json().get(key)\n except:\n log.error(\"断言失败\"+\",用例数据为:\"+str(case_data)+\",期望数据为:\"+str(expect_data)+\",服务器返回的数据为:\"+res.text)\n> raise AssertionError(\"断言失败\")\nE AssertionError: 断言失败\n\nInterfaceAutoTest_2\\test_case\\test_laohuang\\test_bpm_laohuang.py:51: AssertionError"}, "attachments": [{"name": "log", "source": "62d79d46-483c-4870-87a8-b04ede133c3b-attachment.txt", "type": "text/plain"}], "parameters": [{"name": "case_url", "value": "'http://120.46.172.186:8080/refresh'"}, {"name": "case_method", "value": "'GET'"}, {"name": "case_mime", "value": "None"}, {"name": "case_data", "value": "None"}, {"name": "expect_data", "value": "{'message': '刷新成功'}"}, {"name": "sql_type", "value": "None"}, {"name": "sql_data", "value": "None"}, {"name": "update_key", "value": "None"}], "start": 1699242125613, "stop": 1699242125721, "uuid": "ee9a79c9-7117-47f2-827d-a5ec1c39883e", "historyId": "b99da36f8ce00850ab8e778090aec6f5", "testCaseId": "317585064e361b6d13052050b1dc8a9e", "fullName": "InterfaceAutoTest_2.test_case.test_laohuang.test_bpm_laohuang.TestBPM#test_bpm", "labels": [{"name": "parentSuite", "value": "InterfaceAutoTest_2.test_case.test_laohuang"}, {"name": "suite", "value": "test_bpm_laohuang"}, {"name": "subSuite", "value": "TestBPM"}, {"name": "host", "value": "LAPTOP-TAHSRL94"}, {"name": "thread", "value": "24068-MainThread"}, {"name": "framework", "value": "pytest"}, {"name": "language", "value": "cpython3"}, {"name": "package", "value": "InterfaceAutoTest_2.test_case.test_laohuang.test_bpm_laohuang"}]}
\ No newline at end of file
{"uuid": "52b821d0-51d0-4ba8-a08f-e299eff81c76", "befores": [{"name": "case_data", "status": "passed", "start": 1699242128016, "stop": 1699242128016}], "start": 1699242128016, "stop": 1699242128167}
\ No newline at end of file
{"uuid": "7c8c0fd5-7786-49d6-a835-c97ffacf4898", "befores": [{"name": "sql_data", "status": "passed", "start": 1699242125203, "stop": 1699242125203}], "start": 1699242125203, "stop": 1699242125297}
\ No newline at end of file
{"uuid": "0bb8f267-0d98-4686-af02-11636d222fd0", "befores": [{"name": "sql_data", "status": "passed", "start": 1699242127490, "stop": 1699242127490}], "start": 1699242127490, "stop": 1699242127598}
\ No newline at end of file
{"uuid": "046d82c2-2926-4807-bc2f-c452839053df", "befores": [{"name": "sql_type", "status": "passed", "start": 1699242124994, "stop": 1699242124994}], "start": 1699242124994, "stop": 1699242125091}
\ No newline at end of file
{"uuid": "ffa80b8f-e8cb-48a2-a22b-87ea5f51c8c8", "befores": [{"name": "case_data", "status": "passed", "start": 1699242128171, "stop": 1699242128171}], "start": 1699242128171, "stop": 1699242128223}
\ No newline at end of file
{"uuid": "93c9bc10-24b7-4dbc-9ad1-5286aebf3450", "befores": [{"name": "case_mime", "status": "passed", "start": 1699242124893, "stop": 1699242124893}], "start": 1699242124893, "stop": 1699242124990}
\ No newline at end of file
{"name": "test_bpm[http://120.46.172.186:8080/auth-POST-json-case_data3-expect_data3-None-None-None]", "status": "passed", "parameters": [{"name": "case_url", "value": "'http://120.46.172.186:8080/auth'"}, {"name": "case_method", "value": "'POST'"}, {"name": "case_mime", "value": "'json'"}, {"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": 1699242127191, "stop": 1699242127279, "uuid": "785aabf1-771a-4bad-b81f-19e59cf47722", "historyId": "ce24925cbf1a4de9155e8c6c5f56fe18", "testCaseId": "fddf80969464aadbd498677a3a3dd380", "fullName": "InterfaceAutoTest_2.test_case.test_zhangsan.test_bpm.TestBPM#test_bpm", "labels": [{"name": "parentSuite", "value": "InterfaceAutoTest_2.test_case.test_zhangsan"}, {"name": "suite", "value": "test_bpm"}, {"name": "subSuite", "value": "TestBPM"}, {"name": "host", "value": "LAPTOP-TAHSRL94"}, {"name": "thread", "value": "24068-MainThread"}, {"name": "framework", "value": "pytest"}, {"name": "language", "value": "cpython3"}, {"name": "package", "value": "InterfaceAutoTest_2.test_case.test_zhangsan.test_bpm"}]}
\ No newline at end of file
{"uuid": "66bffca0-3f0d-42f3-a852-6541c76271ff", "befores": [{"name": "expect_data", "status": "passed", "start": 1699242124535, "stop": 1699242124535}], "start": 1699242124535, "stop": 1699242124718}
\ No newline at end of file
{"uuid": "bf4ee854-370b-435a-89ec-b8b6d7545e49", "befores": [{"name": "expect_data", "status": "passed", "start": 1699242127489, "stop": 1699242127490}], "start": 1699242127489, "stop": 1699242127600}
\ No newline at end of file
{"uuid": "77f84dd6-5a4e-4f32-a77e-b26b0b5ec63c", "befores": [{"name": "expect_data", "status": "passed", "start": 1699242127190, "stop": 1699242127190}], "start": 1699242127190, "stop": 1699242127282}
\ No newline at end of file
{"uuid": "a8b594f4-16ce-4dc6-8147-76cc274042db", "befores": [{"name": "case_url", "status": "passed", "start": 1699242124892, "stop": 1699242124893}], "start": 1699242124892, "stop": 1699242124991}
\ No newline at end of file
{"uuid": "70694e2d-2c1d-4f64-87bb-7ad22d96ba1f", "befores": [{"name": "case_data", "status": "passed", "start": 1699242125513, "stop": 1699242125514}], "start": 1699242125513, "stop": 1699242125605}
\ No newline at end of file
{"uuid": "0abfdfdb-c486-4f5e-9b98-f735d01217d3", "befores": [{"name": "case_data", "status": "passed", "start": 1699242127805, "stop": 1699242127805}], "start": 1699242127805, "stop": 1699242127897}
\ No newline at end of file
{"uuid": "fccb1786-4a87-440b-9056-d2e0223c7db8", "befores": [{"name": "case_method", "status": "passed", "start": 1699242127017, "stop": 1699242127017}], "start": 1699242127017, "stop": 1699242127082}
\ No newline at end of file
{"uuid": "7189422d-1d8b-41a7-ab00-e22f9e9c12f2", "befores": [{"name": "case_data", "status": "passed", "start": 1699242125612, "stop": 1699242125612}], "start": 1699242125612, "stop": 1699242125737}
\ No newline at end of file
{"uuid": "4928973f-5102-4e4b-87f9-78d3bb946497", "befores": [{"name": "case_mime", "status": "passed", "start": 1699242124787, "stop": 1699242124787}], "start": 1699242124787, "stop": 1699242124889}
\ No newline at end of file
{"uuid": "c4a8beb7-20ec-40e2-8d9b-bede9877c5d3", "befores": [{"name": "update_key", "status": "passed", "start": 1699242125896, "stop": 1699242125896}], "start": 1699242125896, "stop": 1699242125946}
\ No newline at end of file
{"uuid": "2ff43719-7732-42c6-81b5-490c7ad3a8fa", "befores": [{"name": "case_data", "status": "passed", "start": 1699242127387, "stop": 1699242127387}], "start": 1699242127387, "stop": 1699242127482}
\ No newline at end of file
{"uuid": "e97d7cba-6731-48c0-b5c9-48b381317993", "befores": [{"name": "sql_type", "status": "passed", "start": 1699242125414, "stop": 1699242125414}], "start": 1699242125414, "stop": 1699242125507}
\ No newline at end of file
{"uuid": "d0637d6d-1385-426c-bad8-585783f091aa", "befores": [{"name": "case_url", "status": "passed", "start": 1699242125513, "stop": 1699242125513}], "start": 1699242125513, "stop": 1699242125608}
\ No newline at end of file
{"uuid": "88b5c192-7c15-4931-8f60-b95fce186917", "befores": [{"name": "sql_data", "status": "passed", "start": 1699242125612, "stop": 1699242125612}], "start": 1699242125612, "stop": 1699242125736}
\ No newline at end of file
{"uuid": "676a2bf7-9186-405b-baad-76ede81bc4b8", "befores": [{"name": "expect_data", "status": "passed", "start": 1699242125308, "stop": 1699242125308}], "start": 1699242125308, "stop": 1699242125407}
\ No newline at end of file
{"uuid": "7fa7cfda-a18c-4c1d-909c-bab5db2de533", "befores": [{"name": "case_method", "status": "passed", "start": 1699242125953, "stop": 1699242125953}], "start": 1699242125953, "stop": 1699242126149}
\ No newline at end of file
{"uuid": "1a2f5133-83bc-4c7c-bd94-afe8d2594d64", "befores": [{"name": "sql_data", "status": "passed", "start": 1699242125514, "stop": 1699242125514}], "start": 1699242125514, "stop": 1699242125603}
\ No newline at end of file
{"uuid": "c2a432fc-16f0-4773-86bc-eeca7256e117", "befores": [{"name": "expect_data", "status": "passed", "start": 1699242125514, "stop": 1699242125514}], "start": 1699242125514, "stop": 1699242125604}
\ No newline at end of file
{"name": "test3", "status": "skipped", "statusDetails": {"message": "Skipped: test3 depends on test1", "trace": "('C:\\\\Users\\\\86184\\\\AppData\\\\Local\\\\Programs\\\\Python\\\\Python37-32\\\\lib\\\\site-packages\\\\pytest_dependency.py', 103, 'Skipped: test3 depends on test1')"}, "start": 1699242126610, "stop": 1699242126610, "uuid": "5adf36a9-1cf4-40e7-a818-63cc01a1db73", "historyId": "fd5a1a26c805fe3687f8094fba2f6231", "testCaseId": "fd5a1a26c805fe3687f8094fba2f6231", "fullName": "InterfaceAutoTest_2.test_case.test_order.test_pytest_func.Test01#test3", "labels": [{"name": "tag", "value": "dependency(depends=['test1', 'test2'])"}, {"name": "parentSuite", "value": "InterfaceAutoTest_2.test_case.test_order"}, {"name": "suite", "value": "test_pytest_func"}, {"name": "subSuite", "value": "Test01"}, {"name": "host", "value": "LAPTOP-TAHSRL94"}, {"name": "thread", "value": "24068-MainThread"}, {"name": "framework", "value": "pytest"}, {"name": "language", "value": "cpython3"}, {"name": "package", "value": "InterfaceAutoTest_2.test_case.test_order.test_pytest_func"}]}
\ No newline at end of file
{"uuid": "f3ec795d-3c90-43b1-a1ec-d17d8756951f", "befores": [{"name": "case_data", "status": "passed", "start": 1699242124893, "stop": 1699242124893}], "start": 1699242124893, "stop": 1699242124989}
\ No newline at end of file
{"uuid": "a622f87d-9b32-4a90-90d3-01dbcec217b9", "befores": [{"name": "sql_data", "status": "passed", "start": 1699242125954, "stop": 1699242125954}], "start": 1699242125954, "stop": 1699242126145}
\ No newline at end of file
{"uuid": "30e7fc0c-dc34-48ea-94c7-a7b3da11cf42", "befores": [{"name": "sql_type", "status": "passed", "start": 1699242127190, "stop": 1699242127190}], "start": 1699242127190, "stop": 1699242127281}
\ No newline at end of file
{"uuid": "4990fe8d-2588-44af-98fb-44280e13ed37", "befores": [{"name": "case_mime", "status": "passed", "start": 1699242125202, "stop": 1699242125202}], "start": 1699242125202, "stop": 1699242125299}
\ No newline at end of file
{"uuid": "fd1c875e-496a-4930-a7c4-4b63f2aa9e52", "befores": [{"name": "expect_data", "status": "passed", "start": 1699242125202, "stop": 1699242125202}], "start": 1699242125202, "stop": 1699242125298}
\ No newline at end of file
{"name": "test_bpm[http://120.46.172.186:8080/auth-POST-application/json-case_data5-expect_data5-None-None-None]", "status": "passed", "parameters": [{"name": "case_url", "value": "'http://120.46.172.186:8080/auth'"}, {"name": "case_method", "value": "'POST'"}, {"name": "case_mime", "value": "'application/json'"}, {"name": "case_data", "value": "{'password': 'MTIzNDU2MTIzNDU2MTIzNDU2MTIzNDU2MTIzNDU2', '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": 1699242125098, "stop": 1699242125195, "uuid": "e0ce9eb7-6ac0-449a-885b-caaa61800f2f", "historyId": "b67494610103ec8ef4dbce8026bf492b", "testCaseId": "317585064e361b6d13052050b1dc8a9e", "fullName": "InterfaceAutoTest_2.test_case.test_laohuang.test_bpm_laohuang.TestBPM#test_bpm", "labels": [{"name": "parentSuite", "value": "InterfaceAutoTest_2.test_case.test_laohuang"}, {"name": "suite", "value": "test_bpm_laohuang"}, {"name": "subSuite", "value": "TestBPM"}, {"name": "host", "value": "LAPTOP-TAHSRL94"}, {"name": "thread", "value": "24068-MainThread"}, {"name": "framework", "value": "pytest"}, {"name": "language", "value": "cpython3"}, {"name": "package", "value": "InterfaceAutoTest_2.test_case.test_laohuang.test_bpm_laohuang"}]}
\ No newline at end of file
{"uuid": "f3b10677-8745-47cc-8f63-47a77f065bf7", "befores": [{"name": "sql_type", "status": "passed", "start": 1699242128422, "stop": 1699242128422}], "start": 1699242128422, "stop": 1699242128481}
\ No newline at end of file
{"uuid": "61d048b8-2c45-4de5-9f6f-e4d0e0cf5c98", "befores": [{"name": "update_key", "status": "passed", "start": 1699242124788, "stop": 1699242124788}], "start": 1699242124788, "stop": 1699242124885}
\ No newline at end of file
{"uuid": "a779dcaf-3280-4326-9985-2d1b10b2a60d", "befores": [{"name": "case_url", "status": "passed", "start": 1699242124724, "stop": 1699242124724}], "start": 1699242124724, "stop": 1699242124783}
\ No newline at end of file
{"uuid": "d065fe98-6aec-4710-a424-35a7ced0e599", "befores": [{"name": "case_mime", "status": "passed", "start": 1699242127017, "stop": 1699242127017}], "start": 1699242127017, "stop": 1699242127082}
\ No newline at end of file
{"name": "test_bpm[http://120.46.172.186:8080/api/org/v1/org/deleteOrg-POST-x-www-form-urlencoded-test_org_57-expect_data15-None-None-None]", "status": "passed", "parameters": [{"name": "case_url", "value": "'http://120.46.172.186:8080/api/org/v1/org/deleteOrg'"}, {"name": "case_method", "value": "'POST'"}, {"name": "case_mime", "value": "'x-www-form-urlencoded'"}, {"name": "case_data", "value": "'test_org_57'"}, {"name": "expect_data", "value": "{'state': True, 'message': '删除组织成功!'}"}, {"name": "sql_type", "value": "None"}, {"name": "sql_data", "value": "None"}, {"name": "update_key", "value": "None"}], "start": 1699242128489, "stop": 1699242128546, "uuid": "d6a465e7-8539-45d1-9cd5-15e849a9b052", "historyId": "782b5ed1b9e9fa182e2ec0279e95bc58", "testCaseId": "fddf80969464aadbd498677a3a3dd380", "fullName": "InterfaceAutoTest_2.test_case.test_zhangsan.test_bpm.TestBPM#test_bpm", "labels": [{"name": "parentSuite", "value": "InterfaceAutoTest_2.test_case.test_zhangsan"}, {"name": "suite", "value": "test_bpm"}, {"name": "subSuite", "value": "TestBPM"}, {"name": "host", "value": "LAPTOP-TAHSRL94"}, {"name": "thread", "value": "24068-MainThread"}, {"name": "framework", "value": "pytest"}, {"name": "language", "value": "cpython3"}, {"name": "package", "value": "InterfaceAutoTest_2.test_case.test_zhangsan.test_bpm"}]}
\ No newline at end of file
ERROR  黄总:test_bpm_laohuang.py:50 断言失败,用例数据为:None,期望数据为:{'message': '刷新成功'},服务器返回的数据为:{"token":"eyJhbGciOiJIUzUxMiJ9.eyJzdWIiOiJhZG1pbiIsInRlbmFudElkIjoiLTEiLCJleHAiOjE2OTkzMjg1MjUsImlhdCI6MTY5OTI0MjEyNX0.Oaqtv0ZEBeM6jwEapNM913EPBdyJzege659szhLr2viOQDvcEhggCGAr0NUm6To4eoFXaGT79C6s3YJw9usA7Q","username":"","account":"","userId":"","loginStatus":true,"userAttrs":{}}
\ No newline at end of file
{"name": "test_bpm[http://120.46.172.186:8080/api/org/v1/org/addOrg-POST-application/json-case_data13-expect_data13-select|delete-sql_data13-demId]", "status": "passed", "parameters": [{"name": "case_url", "value": "'http://120.46.172.186:8080/api/org/v1/org/addOrg'"}, {"name": "case_method", "value": "'POST'"}, {"name": "case_mime", "value": "'application/json'"}, {"name": "case_data", "value": "{'code': 'test_org_57', 'demId': '不知道', 'exceedLimitNum': 0, 'grade': '', 'limitNum': 0, 'name': '测试组织', 'nowNum': 0, 'orderNo': 0, 'parentId': '0'}"}, {"name": "expect_data", "value": "{'state': True, 'message': '添加组织成功!'}"}, {"name": "sql_type", "value": "'select|delete'"}, {"name": "sql_data", "value": "{'select': 'SELECT ID_ from uc_demension WHERE `CODE_`=\"dem_test57_abc\";', 'delete': 'DELETE FROM uc_org WHERE `CODE_`=\"test_org_57\";'}"}, {"name": "update_key", "value": "'demId'"}], "start": 1699242128228, "stop": 1699242128407, "uuid": "eb31edcf-b76a-4459-a307-4739aa773a88", "historyId": "dcc957fcde3d1abfaae65c5bc6a04193", "testCaseId": "fddf80969464aadbd498677a3a3dd380", "fullName": "InterfaceAutoTest_2.test_case.test_zhangsan.test_bpm.TestBPM#test_bpm", "labels": [{"name": "parentSuite", "value": "InterfaceAutoTest_2.test_case.test_zhangsan"}, {"name": "suite", "value": "test_bpm"}, {"name": "subSuite", "value": "TestBPM"}, {"name": "host", "value": "LAPTOP-TAHSRL94"}, {"name": "thread", "value": "24068-MainThread"}, {"name": "framework", "value": "pytest"}, {"name": "language", "value": "cpython3"}, {"name": "package", "value": "InterfaceAutoTest_2.test_case.test_zhangsan.test_bpm"}]}
\ No newline at end of file
{"uuid": "ccdd74ba-869f-4d49-9e36-aa9099494e89", "befores": [{"name": "case_data", "status": "passed", "start": 1699242127605, "stop": 1699242127605}], "start": 1699242127605, "stop": 1699242127702}
\ No newline at end of file
{"uuid": "c11369ef-2540-4643-be4a-29a964d55004", "befores": [{"name": "case_mime", "status": "passed", "start": 1699242125742, "stop": 1699242125742}], "start": 1699242125742, "stop": 1699242125891}
\ No newline at end of file
{"uuid": "717296ad-9c68-4cdf-a5ee-0139407d62e2", "befores": [{"name": "case_mime", "status": "passed", "start": 1699242126934, "stop": 1699242126934}], "start": 1699242126933, "stop": 1699242127012}
\ No newline at end of file
{"uuid": "37d8f5a2-0719-4423-84d4-9f3cc53df43c", "befores": [{"name": "case_method", "status": "passed", "start": 1699242127707, "stop": 1699242127707}], "start": 1699242127707, "stop": 1699242127802}
\ No newline at end of file
{"uuid": "7d9bf2d8-08f4-4c53-a5af-2a6493e25178", "befores": [{"name": "sql_data", "status": "passed", "start": 1699242124535, "stop": 1699242124535}], "start": 1699242124535, "stop": 1699242124717}
\ No newline at end of file
{"uuid": "7f259c17-c93c-4eef-a0be-4eb987a0f3e0", "befores": [{"name": "sql_data", "status": "passed", "start": 1699242124994, "stop": 1699242124994}], "start": 1699242124994, "stop": 1699242125090}
\ No newline at end of file
{"uuid": "ab4b9486-9d95-4d10-90dd-253a13bdca8a", "befores": [{"name": "sql_type", "status": "passed", "start": 1699242127805, "stop": 1699242127805}], "start": 1699242127805, "stop": 1699242127896}
\ No newline at end of file
{"uuid": "6f9966ca-2cad-49dd-8e8a-f49e773c32e8", "befores": [{"name": "case_data", "status": "passed", "start": 1699242128553, "stop": 1699242128553}], "start": 1699242128553, "stop": 1699242128666}
\ No newline at end of file
{"uuid": "7c702e9b-734c-49f9-ac0c-fe89b22f549a", "befores": [{"name": "case_url", "status": "passed", "start": 1699242125895, "stop": 1699242125895}], "start": 1699242125895, "stop": 1699242125951}
\ No newline at end of file
{"uuid": "3d956915-57e7-4df9-952f-175f388d8768", "befores": [{"name": "case_method", "status": "passed", "start": 1699242125202, "stop": 1699242125202}], "start": 1699242125202, "stop": 1699242125300}
\ No newline at end of file
{"uuid": "c716871b-9faf-48e0-8564-868119317718", "befores": [{"name": "expect_data", "status": "passed", "start": 1699242125954, "stop": 1699242125954}], "start": 1699242125954, "stop": 1699242126147}
\ No newline at end of file
{"uuid": "484cf7e8-4752-49d0-a5e9-232e59e7cc50", "befores": [{"name": "expect_data", "status": "passed", "start": 1699242126152, "stop": 1699242126152}], "start": 1699242126152, "stop": 1699242126211}
\ No newline at end of file
{"uuid": "933511a7-b793-4ddd-8f8d-a0228031be3b", "befores": [{"name": "case_url", "status": "passed", "start": 1699242128171, "stop": 1699242128171}], "start": 1699242128171, "stop": 1699242128224}
\ No newline at end of file
{"uuid": "20b2c5da-5b58-442e-b50e-2c7a39d51213", "befores": [{"name": "update_key", "status": "passed", "start": 1699242125098, "stop": 1699242125098}], "start": 1699242125098, "stop": 1699242125195}
\ No newline at end of file
{"name": "test_bpm[http://120.46.172.186:8080/auth-POST-json-case_data9-expect_data9-None-None-None]", "status": "passed", "parameters": [{"name": "case_url", "value": "'http://120.46.172.186:8080/auth'"}, {"name": "case_method", "value": "'POST'"}, {"name": "case_mime", "value": "'json'"}, {"name": "case_data", "value": "{'password': 'MTIzNDU222', '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": 1699242127806, "stop": 1699242127894, "uuid": "bf299d4f-fd7a-49b5-b26a-139e000f6fcc", "historyId": "0603fe4fb68a875bb617c4720780d417", "testCaseId": "fddf80969464aadbd498677a3a3dd380", "fullName": "InterfaceAutoTest_2.test_case.test_zhangsan.test_bpm.TestBPM#test_bpm", "labels": [{"name": "parentSuite", "value": "InterfaceAutoTest_2.test_case.test_zhangsan"}, {"name": "suite", "value": "test_bpm"}, {"name": "subSuite", "value": "TestBPM"}, {"name": "host", "value": "LAPTOP-TAHSRL94"}, {"name": "thread", "value": "24068-MainThread"}, {"name": "framework", "value": "pytest"}, {"name": "language", "value": "cpython3"}, {"name": "package", "value": "InterfaceAutoTest_2.test_case.test_zhangsan.test_bpm"}]}
\ No newline at end of file
{"uuid": "9df4ece4-2d78-4742-97cc-6015bf8a2161", "befores": [{"name": "update_key", "status": "passed", "start": 1699242128172, "stop": 1699242128172}], "start": 1699242128172, "stop": 1699242128220}
\ No newline at end of file
{"uuid": "5b8c1b9a-b15d-47ca-9b04-d94751a273ae", "befores": [{"name": "update_key", "status": "passed", "start": 1699242128016, "stop": 1699242128016}], "start": 1699242128016, "stop": 1699242128164}
\ No newline at end of file
{"uuid": "a7c5011b-1d40-497c-982b-3292ede031ab", "befores": [{"name": "case_method", "status": "passed", "start": 1699242128171, "stop": 1699242128171}], "start": 1699242128171, "stop": 1699242128224}
\ No newline at end of file
{"uuid": "dbc78439-1858-40d7-b8d5-0d9996680bbc", "befores": [{"name": "case_url", "status": "passed", "start": 1699242127387, "stop": 1699242127387}], "start": 1699242127387, "stop": 1699242127485}
\ No newline at end of file
{"name": "test_bpm[http://120.46.172.186:8080/auth-POST-json-case_data7-expect_data7-None-None-None]", "status": "passed", "parameters": [{"name": "case_url", "value": "'http://120.46.172.186:8080/auth'"}, {"name": "case_method", "value": "'POST'"}, {"name": "case_mime", "value": "'json'"}, {"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": 1699242127606, "stop": 1699242127698, "uuid": "d9079439-d469-4050-a736-e78f185b4de5", "historyId": "b263148c6bfd6f1558ca479047f55cb9", "testCaseId": "fddf80969464aadbd498677a3a3dd380", "fullName": "InterfaceAutoTest_2.test_case.test_zhangsan.test_bpm.TestBPM#test_bpm", "labels": [{"name": "parentSuite", "value": "InterfaceAutoTest_2.test_case.test_zhangsan"}, {"name": "suite", "value": "test_bpm"}, {"name": "subSuite", "value": "TestBPM"}, {"name": "host", "value": "LAPTOP-TAHSRL94"}, {"name": "thread", "value": "24068-MainThread"}, {"name": "framework", "value": "pytest"}, {"name": "language", "value": "cpython3"}, {"name": "package", "value": "InterfaceAutoTest_2.test_case.test_zhangsan.test_bpm"}]}
\ No newline at end of file
{"uuid": "418fdbf5-bcb2-461c-9c46-ce859880e0a7", "befores": [{"name": "case_data", "status": "passed", "start": 1699242128488, "stop": 1699242128488}], "start": 1699242128488, "stop": 1699242128549}
\ No newline at end of file
{"uuid": "87677179-bd37-45ee-930e-bd62ce30a6b3", "befores": [{"name": "sql_data", "status": "passed", "start": 1699242127087, "stop": 1699242127087}], "start": 1699242127087, "stop": 1699242127184}
\ No newline at end of file
{"uuid": "f0539d58-f6e2-4d8c-b66c-d3f7fd2ebf6a", "befores": [{"name": "update_key", "status": "passed", "start": 1699242125414, "stop": 1699242125414}], "start": 1699242125414, "stop": 1699242125506}
\ No newline at end of file
{"uuid": "1fa52937-c0f3-4d27-a6b0-d65cf7bdd79c", "befores": [{"name": "case_method", "status": "passed", "start": 1699242128488, "stop": 1699242128488}], "start": 1699242128488, "stop": 1699242128549}
\ No newline at end of file
{"uuid": "472a65ad-7627-4676-984c-a4e4f3c491a1", "befores": [{"name": "update_key", "status": "passed", "start": 1699242125743, "stop": 1699242125743}], "start": 1699242125743, "stop": 1699242125888}
\ No newline at end of file
{"uuid": "63f3623f-611d-44f0-b8ea-3210474ab0be", "befores": [{"name": "expect_data", "status": "passed", "start": 1699242127805, "stop": 1699242127805}], "start": 1699242127805, "stop": 1699242127897}
\ No newline at end of file
{"uuid": "7103d1a0-560c-4f85-9614-6484982d95c9", "befores": [{"name": "case_mime", "status": "passed", "start": 1699242127190, "stop": 1699242127190}], "start": 1699242127190, "stop": 1699242127283}
\ No newline at end of file
{"uuid": "2cf059d0-1562-4893-a1cc-c7cd5ddff77f", "befores": [{"name": "update_key", "status": "passed", "start": 1699242127017, "stop": 1699242127018}], "start": 1699242127017, "stop": 1699242127078}
\ No newline at end of file
{"uuid": "56f17345-d5f6-4b3e-a6db-569461d01b03", "befores": [{"name": "case_method", "status": "passed", "start": 1699242128227, "stop": 1699242128227}], "start": 1699242128227, "stop": 1699242128414}
\ No newline at end of file
{"uuid": "053946ed-bad5-4e1f-833d-42b44926173d", "befores": [{"name": "expect_data", "status": "passed", "start": 1699242128422, "stop": 1699242128422}], "start": 1699242128422, "stop": 1699242128482}
\ No newline at end of file
{"uuid": "1e8dfd55-4da9-4600-a29f-63355449bb86", "befores": [{"name": "case_mime", "status": "passed", "start": 1699242127707, "stop": 1699242127707}], "start": 1699242127707, "stop": 1699242127801}
\ No newline at end of file
{"uuid": "baf60f41-c8b8-4ff3-b3b8-6348a7a315bc", "befores": [{"name": "case_method", "status": "passed", "start": 1699242125413, "stop": 1699242125413}], "start": 1699242125413, "stop": 1699242125510}
\ No newline at end of file
{"uuid": "a3f7fdaa-8c16-4f1b-bb74-7a6311180f8d", "befores": [{"name": "sql_data", "status": "passed", "start": 1699242127387, "stop": 1699242127387}], "start": 1699242127387, "stop": 1699242127480}
\ No newline at end of file
{"name": "test_bpm[http://120.46.172.186:8080/auth-POST-json-case_data4-expect_data4-None-None-None]", "status": "passed", "parameters": [{"name": "case_url", "value": "'http://120.46.172.186:8080/auth'"}, {"name": "case_method", "value": "'POST'"}, {"name": "case_mime", "value": "'json'"}, {"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": 1699242124995, "stop": 1699242125088, "uuid": "9103af0f-ab67-473a-af61-5f84bade1aea", "historyId": "617a26e255df96e568ecd0312194b32c", "testCaseId": "317585064e361b6d13052050b1dc8a9e", "fullName": "InterfaceAutoTest_2.test_case.test_laohuang.test_bpm_laohuang.TestBPM#test_bpm", "labels": [{"name": "parentSuite", "value": "InterfaceAutoTest_2.test_case.test_laohuang"}, {"name": "suite", "value": "test_bpm_laohuang"}, {"name": "subSuite", "value": "TestBPM"}, {"name": "host", "value": "LAPTOP-TAHSRL94"}, {"name": "thread", "value": "24068-MainThread"}, {"name": "framework", "value": "pytest"}, {"name": "language", "value": "cpython3"}, {"name": "package", "value": "InterfaceAutoTest_2.test_case.test_laohuang.test_bpm_laohuang"}]}
\ No newline at end of file
{"uuid": "4ebc8a32-9e6f-4599-971f-21b75bc2e6ab", "befores": [{"name": "update_key", "status": "passed", "start": 1699242125514, "stop": 1699242125514}], "start": 1699242125514, "stop": 1699242125602}
\ No newline at end of file
{"uuid": "863984fa-fb3c-4091-83d7-fd7d5a2dcaab", "befores": [{"name": "case_data", "status": "passed", "start": 1699242125308, "stop": 1699242125308}], "start": 1699242125308, "stop": 1699242125408}
\ No newline at end of file
{"uuid": "f0296bb7-a142-4d3c-967c-611df0a3109d", "befores": [{"name": "case_url", "status": "passed", "start": 1699242124534, "stop": 1699242124534}], "start": 1699242124534, "stop": 1699242124721}
\ No newline at end of file
{"uuid": "651a2203-6f8e-46d5-94c4-ef58658f8449", "befores": [{"name": "sql_type", "status": "passed", "start": 1699242127490, "stop": 1699242127490}], "start": 1699242127490, "stop": 1699242127599}
\ No newline at end of file
{"uuid": "8041b857-eb2b-4b4e-824c-07747ff39af5", "befores": [{"name": "sql_type", "status": "passed", "start": 1699242127707, "stop": 1699242127708}], "start": 1699242127707, "stop": 1699242127799}
\ No newline at end of file
{"uuid": "c848c370-c07a-42a4-a871-793e6c392574", "befores": [{"name": "case_url", "status": "passed", "start": 1699242125097, "stop": 1699242125097}], "start": 1699242125097, "stop": 1699242125199}
\ No newline at end of file
{"uuid": "0e46ecb0-3c94-4ca8-9192-c2787cb11d5d", "befores": [{"name": "case_url", "status": "passed", "start": 1699242126215, "stop": 1699242126215}], "start": 1699242126215, "stop": 1699242126280}
\ No newline at end of file
{"uuid": "9cdef43c-98b4-448a-b7b5-d59cbb402106", "children": ["526c60ec-a3dd-4f93-a0b2-ac05caac874d", "62b32c4f-e1ed-42a4-a6df-ea3f333ffa8b", "1299b43f-53eb-4d94-a618-0b77d39e36ad", "5ea1b796-4f43-41ed-b57c-0510d0fb6a11", "9103af0f-ab67-473a-af61-5f84bade1aea", "e0ce9eb7-6ac0-449a-885b-caaa61800f2f", "f084ed43-c929-47bb-8a02-05cea9add22d", "2c42a5aa-1c3e-475c-9aa9-6c6bd708d88a", "6e78a222-1600-462a-9266-9127d3f7b0ad", "335e212a-47b5-4027-b0fc-aab540732e19", "ee9a79c9-7117-47f2-827d-a5ec1c39883e", "944391c4-f1ac-4c01-a049-0da757083ff2", "91bbcfa5-5549-4e6c-8c17-6e47f8ed5b77", "f6b9a8dc-6e71-440b-b90f-a7c99ee39ee0", "9bda1df2-30ff-4d6b-8186-57020ae25dde", "3ff376ad-1df1-4adc-b289-6f1061f1d476", "7d0e0737-d4fe-432e-aa89-f89d3fa4ddad"], "befores": [{"name": "req_fix", "status": "passed", "start": 1699242124420, "stop": 1699242124534}], "afters": [{"name": "req_fix::0", "status": "passed", "start": 1699242128672, "stop": 1699242128672}], "start": 1699242124420, "stop": 1699242128672}
\ No newline at end of file
{"uuid": "4af8c908-bbd0-453b-8ce4-3f263dd01991", "befores": [{"name": "update_key", "status": "passed", "start": 1699242127388, "stop": 1699242127388}], "start": 1699242127387, "stop": 1699242127479}
\ No newline at end of file
{"uuid": "074b98e7-c63d-4757-a350-f0843749d6e4", "befores": [{"name": "sql_data", "status": "passed", "start": 1699242128172, "stop": 1699242128172}], "start": 1699242128172, "stop": 1699242128221}
\ No newline at end of file
{"uuid": "81439094-39aa-4bbe-81ba-b2d426aab45d", "befores": [{"name": "sql_data", "status": "passed", "start": 1699242125895, "stop": 1699242125895}], "start": 1699242125895, "stop": 1699242125947}
\ No newline at end of file
{"uuid": "1aba0e11-55d9-44c9-9021-437a47d1d7f7", "befores": [{"name": "case_method", "status": "passed", "start": 1699242125742, "stop": 1699242125742}], "start": 1699242125742, "stop": 1699242125892}
\ No newline at end of file
{"uuid": "c5295c28-35d0-4b8d-981a-8d21579d7f88", "befores": [{"name": "expect_data", "status": "passed", "start": 1699242124994, "stop": 1699242124994}], "start": 1699242124994, "stop": 1699242125092}
\ No newline at end of file
{"uuid": "f6f5aa6f-d9c1-4ee8-a844-b49b3e8d36fe", "befores": [{"name": "sql_data", "status": "passed", "start": 1699242126283, "stop": 1699242126283}], "start": 1699242126283, "stop": 1699242126391}
\ No newline at end of file
{"uuid": "9d59fc73-6a9e-44fc-b44d-7371dabb57a0", "befores": [{"name": "case_mime", "status": "passed", "start": 1699242128227, "stop": 1699242128227}], "start": 1699242128227, "stop": 1699242128413}
\ No newline at end of file
{"name": "test_bpm[http://120.46.172.186:8080/auth-POST-json-case_data9-expect_data9-None-None-None]", "status": "passed", "parameters": [{"name": "case_url", "value": "'http://120.46.172.186:8080/auth'"}, {"name": "case_method", "value": "'POST'"}, {"name": "case_mime", "value": "'json'"}, {"name": "case_data", "value": "{'password': 'MTIzNDU222', '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": 1699242125514, "stop": 1699242125601, "uuid": "335e212a-47b5-4027-b0fc-aab540732e19", "historyId": "ebad5927ad7545f5a1e69ea58f2843dc", "testCaseId": "317585064e361b6d13052050b1dc8a9e", "fullName": "InterfaceAutoTest_2.test_case.test_laohuang.test_bpm_laohuang.TestBPM#test_bpm", "labels": [{"name": "parentSuite", "value": "InterfaceAutoTest_2.test_case.test_laohuang"}, {"name": "suite", "value": "test_bpm_laohuang"}, {"name": "subSuite", "value": "TestBPM"}, {"name": "host", "value": "LAPTOP-TAHSRL94"}, {"name": "thread", "value": "24068-MainThread"}, {"name": "framework", "value": "pytest"}, {"name": "language", "value": "cpython3"}, {"name": "package", "value": "InterfaceAutoTest_2.test_case.test_laohuang.test_bpm_laohuang"}]}
\ No newline at end of file
{"uuid": "d9369e40-5c82-43a9-8f0f-7c9244719387", "befores": [{"name": "update_key", "status": "passed", "start": 1699242124994, "stop": 1699242124994}], "start": 1699242124994, "stop": 1699242125089}
\ No newline at end of file
{"uuid": "4c6f17ae-af56-44f0-ae2a-2faa861d724c", "befores": [{"name": "update_key", "status": "passed", "start": 1699242127708, "stop": 1699242127708}], "start": 1699242127708, "stop": 1699242127798}
\ No newline at end of file
{"uuid": "3b59d437-5555-4c7e-bdd8-dc1c90d0feb0", "befores": [{"name": "expect_data", "status": "passed", "start": 1699242128016, "stop": 1699242128016}], "start": 1699242128016, "stop": 1699242128166}
\ No newline at end of file
{"uuid": "3f22b646-a079-4f62-9666-cf2ef4adc09f", "befores": [{"name": "case_url", "status": "passed", "start": 1699242128227, "stop": 1699242128227}], "start": 1699242128227, "stop": 1699242128416}
\ No newline at end of file
{"uuid": "fb0fb5a0-5a0b-44aa-b4aa-3f216ebb289c", "befores": [{"name": "update_key", "status": "passed", "start": 1699242128554, "stop": 1699242128554}], "start": 1699242128554, "stop": 1699242128664}
\ No newline at end of file
{"uuid": "8c94c23f-756f-4d21-a4f1-b4a00e6ce90a", "befores": [{"name": "case_url", "status": "passed", "start": 1699242127902, "stop": 1699242127902}], "start": 1699242127902, "stop": 1699242128012}
\ No newline at end of file
{"uuid": "2948dcb1-43a2-4868-b4f9-9021920f18ac", "befores": [{"name": "case_data", "status": "passed", "start": 1699242125953, "stop": 1699242125953}], "start": 1699242125953, "stop": 1699242126147}
\ No newline at end of file
{"uuid": "504eb84b-2989-4009-b45c-2b89666bee74", "befores": [{"name": "expect_data", "status": "passed", "start": 1699242124787, "stop": 1699242124787}], "start": 1699242124787, "stop": 1699242124887}
\ No newline at end of file
{"uuid": "7a41d0d8-28ef-4c64-a9ba-71d2ae7a8e99", "befores": [{"name": "update_key", "status": "passed", "start": 1699242127490, "stop": 1699242127490}], "start": 1699242127490, "stop": 1699242127597}
\ No newline at end of file
{"uuid": "0e2e8a10-4b15-4964-a1ac-d3cd73424276", "befores": [{"name": "case_method", "status": "passed", "start": 1699242127902, "stop": 1699242127902}], "start": 1699242127902, "stop": 1699242128012}
\ No newline at end of file
{"uuid": "fa1d5d8a-c89e-4f6c-9292-5961f4cb19ff", "befores": [{"name": "case_method", "status": "passed", "start": 1699242124893, "stop": 1699242124893}], "start": 1699242124893, "stop": 1699242124990}
\ No newline at end of file
ERROR  黄总:test_bpm_laohuang.py:50 断言失败,用例数据为:{'ids': '1721372355906781184'},期望数据为:{'state': True, 'message': '删除维度成功'},服务器返回的数据为:{"state":true,"message":"删除维度成功!","value":""}
\ No newline at end of file
{"uuid": "ef6478ba-a801-4b49-bd3f-7e203b790008", "befores": [{"name": "update_key", "status": "passed", "start": 1699242128422, "stop": 1699242128422}], "start": 1699242128422, "stop": 1699242128480}
\ No newline at end of file
{"uuid": "73bb5ee6-9002-4c4e-8a20-88899c7e161e", "befores": [{"name": "sql_type", "status": "passed", "start": 1699242125612, "stop": 1699242125612}], "start": 1699242125612, "stop": 1699242125736}
\ No newline at end of file
{"uuid": "a420c955-1b17-4c4e-8b49-fd711411dbf3", "befores": [{"name": "sql_data", "status": "passed", "start": 1699242124893, "stop": 1699242124893}], "start": 1699242124893, "stop": 1699242124987}
\ No newline at end of file
{"uuid": "76f3b0cb-9fe6-43c3-abe6-837e18666841", "befores": [{"name": "sql_type", "status": "passed", "start": 1699242127287, "stop": 1699242127287}], "start": 1699242127287, "stop": 1699242127381}
\ No newline at end of file
{"name": "test_bpm[http://120.46.172.186:8080/auth-POST-application/json-case_data6-expect_data6-None-None-None]", "status": "passed", "parameters": [{"name": "case_url", "value": "'http://120.46.172.186:8080/auth'"}, {"name": "case_method", "value": "'POST'"}, {"name": "case_mime", "value": "'application/json'"}, {"name": "case_data", "value": "{'password': 'm', '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": 1699242127490, "stop": 1699242127596, "uuid": "df94057c-bd47-47d7-b0e6-55052a18ff45", "historyId": "5601ee977a357185ee7f6fee30f5f852", "testCaseId": "fddf80969464aadbd498677a3a3dd380", "fullName": "InterfaceAutoTest_2.test_case.test_zhangsan.test_bpm.TestBPM#test_bpm", "labels": [{"name": "parentSuite", "value": "InterfaceAutoTest_2.test_case.test_zhangsan"}, {"name": "suite", "value": "test_bpm"}, {"name": "subSuite", "value": "TestBPM"}, {"name": "host", "value": "LAPTOP-TAHSRL94"}, {"name": "thread", "value": "24068-MainThread"}, {"name": "framework", "value": "pytest"}, {"name": "language", "value": "cpython3"}, {"name": "package", "value": "InterfaceAutoTest_2.test_case.test_zhangsan.test_bpm"}]}
\ No newline at end of file
{"uuid": "fa8000ee-ded6-4ba2-8abb-0391d750f145", "befores": [{"name": "case_method", "status": "passed", "start": 1699242124724, "stop": 1699242124724}], "start": 1699242124724, "stop": 1699242124783}
\ No newline at end of file
{"uuid": "048a432b-bb17-45f9-ae0b-0136d5e7ae5d", "befores": [{"name": "case_data", "status": "passed", "start": 1699242127287, "stop": 1699242127287}], "start": 1699242127287, "stop": 1699242127382}
\ No newline at end of file
{"uuid": "7567e5e5-a53b-4568-8b01-40843326f48f", "befores": [{"name": "expect_data", "status": "passed", "start": 1699242124724, "stop": 1699242124724}], "start": 1699242124724, "stop": 1699242124780}
\ No newline at end of file
{"uuid": "335479ad-c8fb-4525-b772-e22457decd46", "befores": [{"name": "case_data", "status": "passed", "start": 1699242126934, "stop": 1699242126934}], "start": 1699242126934, "stop": 1699242127012}
\ No newline at end of file
{"uuid": "c75fba68-6c34-4efc-819b-f34a77ee7902", "befores": [{"name": "sql_type", "status": "passed", "start": 1699242126934, "stop": 1699242126934}], "start": 1699242126934, "stop": 1699242127011}
\ No newline at end of file
{"uuid": "9b65e1e2-c074-4004-85ad-edc8231b307c", "befores": [{"name": "case_method", "status": "passed", "start": 1699242125097, "stop": 1699242125097}], "start": 1699242125097, "stop": 1699242125199}
\ No newline at end of file
{"uuid": "86e02ee7-cde8-43a7-9a91-af0304fc2da7", "befores": [{"name": "expect_data", "status": "passed", "start": 1699242125414, "stop": 1699242125414}], "start": 1699242125414, "stop": 1699242125508}
\ No newline at end of file
{"uuid": "560a756a-a5f3-4737-8871-aec25b74bd6a", "befores": [{"name": "update_key", "status": "passed", "start": 1699242125203, "stop": 1699242125203}], "start": 1699242125203, "stop": 1699242125296}
\ No newline at end of file
{"uuid": "773faa3e-e37d-4dc0-8456-dca0d2398693", "befores": [{"name": "case_url", "status": "passed", "start": 1699242127805, "stop": 1699242127805}], "start": 1699242127805, "stop": 1699242127899}
\ No newline at end of file
{"name": "test_bpm[http://120.46.172.186:8080/auth-POST-json-case_data7-expect_data7-None-None-None]", "status": "passed", "parameters": [{"name": "case_url", "value": "'http://120.46.172.186:8080/auth'"}, {"name": "case_method", "value": "'POST'"}, {"name": "case_mime", "value": "'json'"}, {"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": 1699242125309, "stop": 1699242125404, "uuid": "2c42a5aa-1c3e-475c-9aa9-6c6bd708d88a", "historyId": "3f5666d8dd12c4aa4ca4ad3134b1bd97", "testCaseId": "317585064e361b6d13052050b1dc8a9e", "fullName": "InterfaceAutoTest_2.test_case.test_laohuang.test_bpm_laohuang.TestBPM#test_bpm", "labels": [{"name": "parentSuite", "value": "InterfaceAutoTest_2.test_case.test_laohuang"}, {"name": "suite", "value": "test_bpm_laohuang"}, {"name": "subSuite", "value": "TestBPM"}, {"name": "host", "value": "LAPTOP-TAHSRL94"}, {"name": "thread", "value": "24068-MainThread"}, {"name": "framework", "value": "pytest"}, {"name": "language", "value": "cpython3"}, {"name": "package", "value": "InterfaceAutoTest_2.test_case.test_laohuang.test_bpm_laohuang"}]}
\ No newline at end of file
{"uuid": "a3ccd2f7-f16c-4a6c-9c57-86450f27ceb7", "befores": [{"name": "sql_data", "status": "passed", "start": 1699242127903, "stop": 1699242127903}], "start": 1699242127903, "stop": 1699242128009}
\ No newline at end of file
{"uuid": "c969326d-7cd9-4947-b6d6-55281dc39930", "befores": [{"name": "expect_data", "status": "passed", "start": 1699242128227, "stop": 1699242128227}], "start": 1699242128227, "stop": 1699242128411}
\ No newline at end of file
{"uuid": "a573a753-fb88-4f18-b23b-a5f60cd9a30b", "befores": [{"name": "case_mime", "status": "passed", "start": 1699242127086, "stop": 1699242127086}], "start": 1699242127086, "stop": 1699242127186}
\ No newline at end of file
{"uuid": "f66a30ad-3820-42c3-94c3-b0b19a0b120f", "befores": [{"name": "sql_type", "status": "passed", "start": 1699242124535, "stop": 1699242124535}], "start": 1699242124535, "stop": 1699242124718}
\ No newline at end of file
{"uuid": "534e8d11-5251-4d03-9c72-ce01c172e3a7", "befores": [{"name": "case_method", "status": "passed", "start": 1699242126216, "stop": 1699242126216}], "start": 1699242126216, "stop": 1699242126280}
\ No newline at end of file
{"uuid": "9398159f-2b46-4465-b19f-d0c113bcede8", "befores": [{"name": "update_key", "status": "passed", "start": 1699242126283, "stop": 1699242126283}], "start": 1699242126283, "stop": 1699242126390}
\ No newline at end of file
{"uuid": "9a84fe3a-a934-4b5a-8803-97557b819284", "befores": [{"name": "case_mime", "status": "passed", "start": 1699242125895, "stop": 1699242125895}], "start": 1699242125895, "stop": 1699242125949}
\ No newline at end of file
{"uuid": "b50c6af4-5794-468d-a21d-5e3cea0f1b06", "befores": [{"name": "sql_type", "status": "passed", "start": 1699242127387, "stop": 1699242127387}], "start": 1699242127387, "stop": 1699242127481}
\ No newline at end of file
{"uuid": "32c5a8d2-91ea-43d2-bb52-cb97627e035e", "befores": [{"name": "case_data", "status": "passed", "start": 1699242127902, "stop": 1699242127902}], "start": 1699242127902, "stop": 1699242128011}
\ No newline at end of file
{"uuid": "14ec3b0c-c273-4f40-a53f-57c382c41747", "befores": [{"name": "case_url", "status": "passed", "start": 1699242127489, "stop": 1699242127489}], "start": 1699242127489, "stop": 1699242127602}
\ No newline at end of file
{"uuid": "cf5b7288-42c0-4280-b858-4595adec4160", "befores": [{"name": "sql_type", "status": "passed", "start": 1699242125895, "stop": 1699242125895}], "start": 1699242125895, "stop": 1699242125948}
\ No newline at end of file
{"name": "test_bpm[http://120.46.172.186:8080/auth-POST-json-case_data3-expect_data3-None-None-None]", "status": "passed", "parameters": [{"name": "case_url", "value": "'http://120.46.172.186:8080/auth'"}, {"name": "case_method", "value": "'POST'"}, {"name": "case_mime", "value": "'json'"}, {"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": 1699242124894, "stop": 1699242124985, "uuid": "5ea1b796-4f43-41ed-b57c-0510d0fb6a11", "historyId": "82c29531d7eef0cd94144c23a1d04a67", "testCaseId": "317585064e361b6d13052050b1dc8a9e", "fullName": "InterfaceAutoTest_2.test_case.test_laohuang.test_bpm_laohuang.TestBPM#test_bpm", "labels": [{"name": "parentSuite", "value": "InterfaceAutoTest_2.test_case.test_laohuang"}, {"name": "suite", "value": "test_bpm_laohuang"}, {"name": "subSuite", "value": "TestBPM"}, {"name": "host", "value": "LAPTOP-TAHSRL94"}, {"name": "thread", "value": "24068-MainThread"}, {"name": "framework", "value": "pytest"}, {"name": "language", "value": "cpython3"}, {"name": "package", "value": "InterfaceAutoTest_2.test_case.test_laohuang.test_bpm_laohuang"}]}
\ No newline at end of file
{"uuid": "b9513136-fac1-4861-bf68-7baad6a3fdbb", "befores": [{"name": "case_data", "status": "passed", "start": 1699242126283, "stop": 1699242126283}], "start": 1699242126283, "stop": 1699242126392}
\ No newline at end of file
{"uuid": "c7de10e0-03eb-4d7b-a69a-c2111d961abc", "befores": [{"name": "sql_type", "status": "passed", "start": 1699242126216, "stop": 1699242126216}], "start": 1699242126216, "stop": 1699242126277}
\ No newline at end of file
{"uuid": "0aa048ae-3ff9-4098-b2b5-77025f3a2927", "befores": [{"name": "sql_data", "status": "passed", "start": 1699242127017, "stop": 1699242127017}], "start": 1699242127017, "stop": 1699242127079}
\ No newline at end of file
{"uuid": "264ac706-01ad-440a-95d3-773b9aabe973", "befores": [{"name": "sql_type", "status": "passed", "start": 1699242128553, "stop": 1699242128553}], "start": 1699242128553, "stop": 1699242128665}
\ No newline at end of file
{"uuid": "02d172f7-5c05-4136-826d-982bd667137a", "children": ["a6d31e89-bfb3-485d-a735-d4c466005cca", "2f00605c-54f5-4f15-840d-a847b1da8335", "2e909a78-7ede-4af0-944c-cf4a8d7f4388", "785aabf1-771a-4bad-b81f-19e59cf47722", "fc82b399-6c00-4a71-835d-75162cd1cfba", "f36a9425-9193-4099-95d2-2f63857dfbf0", "df94057c-bd47-47d7-b0e6-55052a18ff45", "d9079439-d469-4050-a736-e78f185b4de5", "13a48860-0cea-4f0e-a0ba-5b8825ccfe22", "bf299d4f-fd7a-49b5-b26a-139e000f6fcc", "18bba92e-2c50-49ab-9edc-96f00e1e564b", "38ab2039-2fb0-43eb-9d98-ec4d5629a251", "4496d4f0-4c17-40c3-ac9e-7678c2e254bb", "eb31edcf-b76a-4459-a307-4739aa773a88", "0e813ea2-aa48-45b8-a97e-8fe72f2646a2", "d6a465e7-8539-45d1-9cd5-15e849a9b052", "3f15ba40-a451-47c7-92f9-65067fa04182"], "befores": [{"name": "db_fix", "status": "passed", "start": 1699242126616, "stop": 1699242126817}], "afters": [{"name": "db_fix::0", "status": "passed", "start": 1699242128669, "stop": 1699242128669}], "start": 1699242126616, "stop": 1699242128669}
\ No newline at end of file
{"uuid": "e583bf2c-445f-4c67-ade4-e5636d35789d", "befores": [{"name": "sql_data", "status": "passed", "start": 1699242127190, "stop": 1699242127190}], "start": 1699242127190, "stop": 1699242127281}
\ No newline at end of file
{"uuid": "2ad9c463-9229-4b29-a3ae-1e7dca1569e0", "befores": [{"name": "update_key", "status": "passed", "start": 1699242125612, "stop": 1699242125612}], "start": 1699242125612, "stop": 1699242125735}
\ No newline at end of file
{"uuid": "a1589e8e-2172-4e5c-9c62-a6fba63a6140", "befores": [{"name": "case_mime", "status": "passed", "start": 1699242125611, "stop": 1699242125612}], "start": 1699242125611, "stop": 1699242125738}
\ No newline at end of file
{"name": "test_bpm[http://120.46.172.186:8080/auth-POST-json-case_data0-expect_data0-None-None-None]", "status": "failed", "statusDetails": {"message": "AssertionError: 断言失败", "trace": "self = <InterfaceAutoTest_2.test_case.test_laohuang.test_bpm_laohuang.TestBPM object at 0x12B06050>\ndb_fix = <InterfaceAutoTest.common.db.DB object at 0x12B93C10>\nreq_fix = <InterfaceAutoTest.requests_method.requests_method.RequestsMethod object at 0x12AF3630>, case_url = 'http://120.46.172.186:8080/auth'\ncase_method = 'POST', case_mime = 'json', case_data = {'password': 'MTIzNDU2', 'username': 'admin'}\nexpect_data = {'account': 'admin', 'loginStatus': True, 'username': '超级管理'}, sql_type = None, sql_data = None, update_key = None\n\n @pytest.mark.parametrize(\"case_url, case_method, case_mime, case_data, expect_data, sql_type, sql_data, update_key\", ReadExcel(\"BPM-laohuang\").get_data())\n def test_bpm(self, db_fix, req_fix, case_url, case_method, case_mime, case_data, expect_data, sql_type, sql_data, update_key):\n # 判断sql语句的类型是否为delete\n if sql_type == \"delete\":\n # 使用DB类对象执行删除的sql语句\n db_fix.delete(sql_data)\n # 使用RequestsMethod类对象发送请求--pass\n # 判断sql语句类型是否为select\n elif sql_type == \"select\":\n # 使用DB类对象执行查询的sql语句,并接收查询的结果\n select_result = db_fix.select(sql_data)\n # 将查询结果更新到用例数据中\n case_data[update_key] = select_result\n # 使用RequestsMethod类对象发送请求--pass\n \n # 判断sql语句的类型是否为select|delete或者为delete|select\n elif sql_type == \"select|delete\" or sql_type == \"delete|select\":\n # 使用DB类对象执行删除的sql语句\n db_fix.delete(sql_data.get(\"delete\"))\n # 使用DB类对象执行查询的sql语句,并接收查询的结果\n select_result = db_fix.select(sql_data.get(\"select\"))\n # 将查询结果更新到用例数据中\n case_data[update_key] = select_result\n \n # 使用RequestsMethod类对象发送请求\n res = req_fix.request_all(req_method=case_method, req_url=case_url, req_mime=case_mime, case_data=case_data)\n \n \n # 断言\n try:\n for key in expect_data:\n> assert expect_data[key] == res.json().get(key)\nE AssertionError: assert '超级管理' == '超级管理员'\nE - 超级管理员\nE ? -\nE + 超级管理\n\nInterfaceAutoTest_2\\test_case\\test_laohuang\\test_bpm_laohuang.py:48: AssertionError\n\nDuring handling of the above exception, another exception occurred:\n\nself = <InterfaceAutoTest_2.test_case.test_laohuang.test_bpm_laohuang.TestBPM object at 0x12B06050>\ndb_fix = <InterfaceAutoTest.common.db.DB object at 0x12B93C10>\nreq_fix = <InterfaceAutoTest.requests_method.requests_method.RequestsMethod object at 0x12AF3630>, case_url = 'http://120.46.172.186:8080/auth'\ncase_method = 'POST', case_mime = 'json', case_data = {'password': 'MTIzNDU2', 'username': 'admin'}\nexpect_data = {'account': 'admin', 'loginStatus': True, 'username': '超级管理'}, sql_type = None, sql_data = None, update_key = None\n\n @pytest.mark.parametrize(\"case_url, case_method, case_mime, case_data, expect_data, sql_type, sql_data, update_key\", ReadExcel(\"BPM-laohuang\").get_data())\n def test_bpm(self, db_fix, req_fix, case_url, case_method, case_mime, case_data, expect_data, sql_type, sql_data, update_key):\n # 判断sql语句的类型是否为delete\n if sql_type == \"delete\":\n # 使用DB类对象执行删除的sql语句\n db_fix.delete(sql_data)\n # 使用RequestsMethod类对象发送请求--pass\n # 判断sql语句类型是否为select\n elif sql_type == \"select\":\n # 使用DB类对象执行查询的sql语句,并接收查询的结果\n select_result = db_fix.select(sql_data)\n # 将查询结果更新到用例数据中\n case_data[update_key] = select_result\n # 使用RequestsMethod类对象发送请求--pass\n \n # 判断sql语句的类型是否为select|delete或者为delete|select\n elif sql_type == \"select|delete\" or sql_type == \"delete|select\":\n # 使用DB类对象执行删除的sql语句\n db_fix.delete(sql_data.get(\"delete\"))\n # 使用DB类对象执行查询的sql语句,并接收查询的结果\n select_result = db_fix.select(sql_data.get(\"select\"))\n # 将查询结果更新到用例数据中\n case_data[update_key] = select_result\n \n # 使用RequestsMethod类对象发送请求\n res = req_fix.request_all(req_method=case_method, req_url=case_url, req_mime=case_mime, case_data=case_data)\n \n \n # 断言\n try:\n for key in expect_data:\n assert expect_data[key] == res.json().get(key)\n except:\n log.error(\"断言失败\"+\",用例数据为:\"+str(case_data)+\",期望数据为:\"+str(expect_data)+\",服务器返回的数据为:\"+res.text)\n> raise AssertionError(\"断言失败\")\nE AssertionError: 断言失败\n\nInterfaceAutoTest_2\\test_case\\test_laohuang\\test_bpm_laohuang.py:51: AssertionError"}, "attachments": [{"name": "log", "source": "bcf48d28-2b9f-46d5-a518-8fdd3b90c0fa-attachment.txt", "type": "text/plain"}], "parameters": [{"name": "case_url", "value": "'http://120.46.172.186:8080/auth'"}, {"name": "case_method", "value": "'POST'"}, {"name": "case_mime", "value": "'json'"}, {"name": "case_data", "value": "{'password': 'MTIzNDU2', 'username': 'admin'}"}, {"name": "expect_data", "value": "{'username': '超级管理', 'account': 'admin', 'loginStatus': True}"}, {"name": "sql_type", "value": "None"}, {"name": "sql_data", "value": "None"}, {"name": "update_key", "value": "None"}], "start": 1699242124537, "stop": 1699242124599, "uuid": "526c60ec-a3dd-4f93-a0b2-ac05caac874d", "historyId": "16ed6e1bdac83d33b397398987281d59", "testCaseId": "317585064e361b6d13052050b1dc8a9e", "fullName": "InterfaceAutoTest_2.test_case.test_laohuang.test_bpm_laohuang.TestBPM#test_bpm", "labels": [{"name": "parentSuite", "value": "InterfaceAutoTest_2.test_case.test_laohuang"}, {"name": "suite", "value": "test_bpm_laohuang"}, {"name": "subSuite", "value": "TestBPM"}, {"name": "host", "value": "LAPTOP-TAHSRL94"}, {"name": "thread", "value": "24068-MainThread"}, {"name": "framework", "value": "pytest"}, {"name": "language", "value": "cpython3"}, {"name": "package", "value": "InterfaceAutoTest_2.test_case.test_laohuang.test_bpm_laohuang"}]}
\ No newline at end of file
{"uuid": "d91e703c-1880-4001-887a-ced49fda49c3", "befores": [{"name": "case_method", "status": "passed", "start": 1699242126283, "stop": 1699242126283}], "start": 1699242126283, "stop": 1699242126393}
\ No newline at end of file
{"uuid": "bab7f6ec-b56b-4016-82d3-aeaeaefd566a", "befores": [{"name": "case_method", "status": "passed", "start": 1699242124993, "stop": 1699242124993}], "start": 1699242124993, "stop": 1699242125094}
\ No newline at end of file
{"uuid": "1b281115-e880-4286-9ad2-6e344ad78496", "befores": [{"name": "case_data", "status": "passed", "start": 1699242125895, "stop": 1699242125895}], "start": 1699242125895, "stop": 1699242125949}
\ No newline at end of file
{"uuid": "60ab28e9-1301-4145-affa-6052c40cdf5b", "befores": [{"name": "case_mime", "status": "passed", "start": 1699242124534, "stop": 1699242124534}], "start": 1699242124534, "stop": 1699242124719}
\ No newline at end of file
{"uuid": "cdb01a32-f024-4609-8454-44f3112b5886", "befores": [{"name": "sql_type", "status": "passed", "start": 1699242124724, "stop": 1699242124725}], "start": 1699242124724, "stop": 1699242124779}
\ No newline at end of file
{"uuid": "2056f182-621e-42d7-b95d-5a4fa70b183b", "befores": [{"name": "case_url", "status": "passed", "start": 1699242128553, "stop": 1699242128553}], "start": 1699242128553, "stop": 1699242128667}
\ No newline at end of file
{"uuid": "e6f793a8-b41f-45e5-9615-709ead7b512a", "befores": [{"name": "case_method", "status": "passed", "start": 1699242127489, "stop": 1699242127489}], "start": 1699242127489, "stop": 1699242127602}
\ No newline at end of file
{"uuid": "2c7183c3-fd30-433c-97b3-2d2cc2e9aeba", "befores": [{"name": "sql_data", "status": "passed", "start": 1699242125308, "stop": 1699242125308}], "start": 1699242125308, "stop": 1699242125406}
\ No newline at end of file
ERROR  黄总:test_bpm.py:53 断言失败,用例数据为:None,期望数据为:{'message': '刷新成功'},服务器返回的数据为:{"token":"eyJhbGciOiJIUzUxMiJ9.eyJzdWIiOiJhZG1pbiIsInRlbmFudElkIjoiLTEiLCJleHAiOjE2OTkzMjg1MjcsImlhdCI6MTY5OTI0MjEyN30.nZzf2ZrV4S_hh7wXJR448Afb_XG_W0wY7Ax6cNsBxSYkMWGm1t5h8-HfQ44ChMX0uAcupAxbyRtFlCz65EpMMA","username":"","account":"","userId":"","loginStatus":true,"userAttrs":{}}
\ No newline at end of file
{"uuid": "eec24949-3c60-41bf-915a-12667ccebae0", "befores": [{"name": "sql_type", "status": "passed", "start": 1699242125954, "stop": 1699242125954}], "start": 1699242125954, "stop": 1699242126146}
\ No newline at end of file
ERROR  黄总:test_bpm_laohuang.py:50 断言失败,用例数据为:{'password': 'MTIzNDU2', 'username': 'admin'},期望数据为:{'username': '超级管理', 'account': 'admin', 'loginStatus': True},服务器返回的数据为:{"token":"eyJhbGciOiJIUzUxMiJ9.eyJzdWIiOiJhZG1pbiIsInRlbmFudElkIjoiLTEiLCJleHAiOjE2OTkzMjg1MjQsImlhdCI6MTY5OTI0MjEyNH0.xcnuL2_AUFddbJTPhk-yVJ56QYuY2F_YLwBoyoKBLzR2fojtIkRS7eG8iJcK9LFhqBZNTB0Q59Zc6E1sKnW74A","username":"超级管理员","account":"admin","userId":"1","expiration":86400,"loginStatus":true,"userAttrs":{"tenantId":"-1"}}
\ No newline at end of file
添加维度用例
{"state":false,"message":"添加维度失败,维度编码【addDem17】在系统中已存在!","value":""}
{"uuid": "b2d115a5-73ac-4feb-9058-443c195d76bc", "befores": [{"name": "expect_data", "status": "passed", "start": 1699242125895, "stop": 1699242125895}], "start": 1699242125895, "stop": 1699242125948}
\ No newline at end of file
{"uuid": "497323ba-fecf-4979-b3d1-3167d780c3c6", "befores": [{"name": "case_mime", "status": "passed", "start": 1699242124994, "stop": 1699242124994}], "start": 1699242124994, "stop": 1699242125093}
\ No newline at end of file
{"uuid": "8b560d66-ff2a-4e40-995d-8b1a54279e85", "befores": [{"name": "case_mime", "status": "passed", "start": 1699242127489, "stop": 1699242127489}], "start": 1699242127489, "stop": 1699242127601}
\ No newline at end of file
{"uuid": "730867c2-959a-4bfd-9dfb-12443b3cc5ce", "befores": [{"name": "case_mime", "status": "passed", "start": 1699242128421, "stop": 1699242128421}], "start": 1699242128421, "stop": 1699242128483}
\ No newline at end of file
{"uuid": "4649a951-3745-4de0-b269-f0ec0cf0d1cd", "befores": [{"name": "expect_data", "status": "passed", "start": 1699242125097, "stop": 1699242125097}], "start": 1699242125097, "stop": 1699242125197}
\ No newline at end of file
{"uuid": "ef48d75b-301f-423d-95cd-2fa7938a24dd", "befores": [{"name": "sql_type", "status": "passed", "start": 1699242125308, "stop": 1699242125308}], "start": 1699242125308, "stop": 1699242125407}
\ No newline at end of file
{"uuid": "e441332a-8da9-4b26-a6c6-2bd45fa9e549", "befores": [{"name": "case_data", "status": "passed", "start": 1699242128421, "stop": 1699242128421}], "start": 1699242128421, "stop": 1699242128482}
\ No newline at end of file
{"uuid": "dbc906c5-6d6d-4a19-8f00-74ad95d9f9f0", "befores": [{"name": "case_mime", "status": "passed", "start": 1699242125097, "stop": 1699242125097}], "start": 1699242125097, "stop": 1699242125198}
\ No newline at end of file
{"uuid": "5d926315-1479-4d37-93c6-c6c321a5d668", "befores": [{"name": "case_url", "status": "passed", "start": 1699242128420, "stop": 1699242128421}], "start": 1699242128420, "stop": 1699242128485}
\ No newline at end of file
{"uuid": "3157fa3f-238b-4c90-a587-843dcd95d3df", "befores": [{"name": "case_method", "status": "passed", "start": 1699242126933, "stop": 1699242126933}], "start": 1699242126933, "stop": 1699242127013}
\ No newline at end of file
{"name": "test_bpm[http://120.46.172.186:8080/auth-POST-json-case_data0-expect_data0-None-None-None]", "status": "failed", "statusDetails": {"message": "AssertionError: 断言失败", "trace": "self = <InterfaceAutoTest_2.test_case.test_zhangsan.test_bpm.TestBPM object at 0x12B59570>\ndb_fix = <InterfaceAutoTest.common.db.DB object at 0x12BAD5D0>\nreq_fix = <InterfaceAutoTest.requests_method.requests_method.RequestsMethod object at 0x12AD33B0>, case_url = 'http://120.46.172.186:8080/auth'\ncase_method = 'POST', case_mime = 'json', case_data = {'password': 'MTIzNDU2', 'username': 'admin'}\nexpect_data = {'account': 'admin', 'loginStatus': True, 'username': '超级管理'}, sql_type = None, sql_data = None, update_key = None\n\n @pytest.mark.parametrize(\"case_url, case_method, case_mime, case_data, expect_data, sql_type, sql_data, update_key\", ReadExcel(\"BPM\", excel_path=excel_path).get_data())\n def test_bpm(self, db_fix, req_fix, case_url, case_method, case_mime, case_data, expect_data, sql_type, sql_data, update_key):\n # 判断sql语句的类型是否为delete\n if sql_type == \"delete\":\n # 使用DB类对象执行删除的sql语句\n db_fix.delete(sql_data)\n # 使用RequestsMethod类对象发送请求--pass\n # 判断sql语句类型是否为select\n elif sql_type == \"select\":\n # 使用DB类对象执行查询的sql语句,并接收查询的结果\n select_result = db_fix.select(sql_data)\n # 将查询结果更新到用例数据中\n case_data[update_key] = select_result\n # 使用RequestsMethod类对象发送请求--pass\n \n # 判断sql语句的类型是否为select|delete或者为delete|select\n elif sql_type == \"select|delete\" or sql_type == \"delete|select\":\n # 使用DB类对象执行删除的sql语句\n db_fix.delete(sql_data.get(\"delete\"))\n # 使用DB类对象执行查询的sql语句,并接收查询的结果\n select_result = db_fix.select(sql_data.get(\"select\"))\n # 将查询结果更新到用例数据中\n case_data[update_key] = select_result\n \n # 使用RequestsMethod类对象发送请求\n res = req_fix.request_all(req_method=case_method, req_url=case_url, req_mime=case_mime, case_data=case_data)\n \n \n # 断言\n try:\n for key in expect_data:\n> assert expect_data[key] == res.json().get(key)\nE AssertionError: assert '超级管理' == '超级管理员'\nE - 超级管理员\nE ? -\nE + 超级管理\n\nInterfaceAutoTest_2\\test_case\\test_zhangsan\\test_bpm.py:51: AssertionError\n\nDuring handling of the above exception, another exception occurred:\n\nself = <InterfaceAutoTest_2.test_case.test_zhangsan.test_bpm.TestBPM object at 0x12B59570>\ndb_fix = <InterfaceAutoTest.common.db.DB object at 0x12BAD5D0>\nreq_fix = <InterfaceAutoTest.requests_method.requests_method.RequestsMethod object at 0x12AD33B0>, case_url = 'http://120.46.172.186:8080/auth'\ncase_method = 'POST', case_mime = 'json', case_data = {'password': 'MTIzNDU2', 'username': 'admin'}\nexpect_data = {'account': 'admin', 'loginStatus': True, 'username': '超级管理'}, sql_type = None, sql_data = None, update_key = None\n\n @pytest.mark.parametrize(\"case_url, case_method, case_mime, case_data, expect_data, sql_type, sql_data, update_key\", ReadExcel(\"BPM\", excel_path=excel_path).get_data())\n def test_bpm(self, db_fix, req_fix, case_url, case_method, case_mime, case_data, expect_data, sql_type, sql_data, update_key):\n # 判断sql语句的类型是否为delete\n if sql_type == \"delete\":\n # 使用DB类对象执行删除的sql语句\n db_fix.delete(sql_data)\n # 使用RequestsMethod类对象发送请求--pass\n # 判断sql语句类型是否为select\n elif sql_type == \"select\":\n # 使用DB类对象执行查询的sql语句,并接收查询的结果\n select_result = db_fix.select(sql_data)\n # 将查询结果更新到用例数据中\n case_data[update_key] = select_result\n # 使用RequestsMethod类对象发送请求--pass\n \n # 判断sql语句的类型是否为select|delete或者为delete|select\n elif sql_type == \"select|delete\" or sql_type == \"delete|select\":\n # 使用DB类对象执行删除的sql语句\n db_fix.delete(sql_data.get(\"delete\"))\n # 使用DB类对象执行查询的sql语句,并接收查询的结果\n select_result = db_fix.select(sql_data.get(\"select\"))\n # 将查询结果更新到用例数据中\n case_data[update_key] = select_result\n \n # 使用RequestsMethod类对象发送请求\n res = req_fix.request_all(req_method=case_method, req_url=case_url, req_mime=case_mime, case_data=case_data)\n \n \n # 断言\n try:\n for key in expect_data:\n assert expect_data[key] == res.json().get(key)\n except:\n log.error(\"断言失败\"+\",用例数据为:\"+str(case_data)+\",期望数据为:\"+str(expect_data)+\",服务器返回的数据为:\"+res.text)\n> raise AssertionError(\"断言失败\")\nE AssertionError: 断言失败\n\nInterfaceAutoTest_2\\test_case\\test_zhangsan\\test_bpm.py:54: AssertionError"}, "attachments": [{"name": "log", "source": "d682e165-b434-4ef4-8326-e947169670f6-attachment.txt", "type": "text/plain"}], "parameters": [{"name": "case_url", "value": "'http://120.46.172.186:8080/auth'"}, {"name": "case_method", "value": "'POST'"}, {"name": "case_mime", "value": "'json'"}, {"name": "case_data", "value": "{'password': 'MTIzNDU2', 'username': 'admin'}"}, {"name": "expect_data", "value": "{'username': '超级管理', 'account': 'admin', 'loginStatus': True}"}, {"name": "sql_type", "value": "None"}, {"name": "sql_data", "value": "None"}, {"name": "update_key", "value": "None"}], "start": 1699242126936, "stop": 1699242126995, "uuid": "a6d31e89-bfb3-485d-a735-d4c466005cca", "historyId": "3dea97e7fd5b7cd8d6379a5ca6ba0985", "testCaseId": "fddf80969464aadbd498677a3a3dd380", "fullName": "InterfaceAutoTest_2.test_case.test_zhangsan.test_bpm.TestBPM#test_bpm", "labels": [{"name": "parentSuite", "value": "InterfaceAutoTest_2.test_case.test_zhangsan"}, {"name": "suite", "value": "test_bpm"}, {"name": "subSuite", "value": "TestBPM"}, {"name": "host", "value": "LAPTOP-TAHSRL94"}, {"name": "thread", "value": "24068-MainThread"}, {"name": "framework", "value": "pytest"}, {"name": "language", "value": "cpython3"}, {"name": "package", "value": "InterfaceAutoTest_2.test_case.test_zhangsan.test_bpm"}]}
\ No newline at end of file
{"uuid": "063c3246-807d-47c4-87ef-570366c576b9", "befores": [{"name": "case_data", "status": "passed", "start": 1699242126216, "stop": 1699242126216}], "start": 1699242126216, "stop": 1699242126278}
\ No newline at end of file
{"uuid": "780e960a-903d-4303-a951-5bae4b1bfe77", "befores": [{"name": "case_mime", "status": "passed", "start": 1699242127387, "stop": 1699242127387}], "start": 1699242127387, "stop": 1699242127483}
\ No newline at end of file
{"name": "test_bpm[http://120.46.172.186:8080/auth-POST-json-case_data2-expect_data2-None-None-None]", "status": "passed", "parameters": [{"name": "case_url", "value": "'http://120.46.172.186:8080/auth'"}, {"name": "case_method", "value": "'POST'"}, {"name": "case_mime", "value": "'json'"}, {"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": 1699242124788, "stop": 1699242124884, "uuid": "1299b43f-53eb-4d94-a618-0b77d39e36ad", "historyId": "21c75ac890a274718840a652a3584737", "testCaseId": "317585064e361b6d13052050b1dc8a9e", "fullName": "InterfaceAutoTest_2.test_case.test_laohuang.test_bpm_laohuang.TestBPM#test_bpm", "labels": [{"name": "parentSuite", "value": "InterfaceAutoTest_2.test_case.test_laohuang"}, {"name": "suite", "value": "test_bpm_laohuang"}, {"name": "subSuite", "value": "TestBPM"}, {"name": "host", "value": "LAPTOP-TAHSRL94"}, {"name": "thread", "value": "24068-MainThread"}, {"name": "framework", "value": "pytest"}, {"name": "language", "value": "cpython3"}, {"name": "package", "value": "InterfaceAutoTest_2.test_case.test_laohuang.test_bpm_laohuang"}]}
\ No newline at end of file
{"uuid": "d975374c-663a-4e63-9795-0c8654969c5e", "befores": [{"name": "case_data", "status": "passed", "start": 1699242125742, "stop": 1699242125742}], "start": 1699242125742, "stop": 1699242125890}
\ No newline at end of file
{"uuid": "9b0da7cd-4aeb-403f-ac1a-41df1567111f", "befores": [{"name": "case_data", "status": "passed", "start": 1699242127190, "stop": 1699242127190}], "start": 1699242127190, "stop": 1699242127282}
\ No newline at end of file
{"uuid": "01e8e89b-b426-4fd9-a4ed-0f6020f5fdf5", "befores": [{"name": "sql_type", "status": "passed", "start": 1699242125743, "stop": 1699242125743}], "start": 1699242125743, "stop": 1699242125889}
\ No newline at end of file
{"uuid": "75deef72-69cf-4ec1-b58b-799db599ffb1", "befores": [{"name": "update_key", "status": "passed", "start": 1699242126935, "stop": 1699242126935}], "start": 1699242126935, "stop": 1699242127009}
\ No newline at end of file
{"uuid": "f8ed9c99-198c-461f-af53-f5e27c368e9e", "befores": [{"name": "case_data", "status": "passed", "start": 1699242128227, "stop": 1699242128227}], "start": 1699242128227, "stop": 1699242128412}
\ No newline at end of file
{"uuid": "56ba20e2-f235-4156-9cc5-416ecd2169b2", "befores": [{"name": "case_url", "status": "passed", "start": 1699242124993, "stop": 1699242124993}], "start": 1699242124993, "stop": 1699242125094}
\ No newline at end of file
{"uuid": "3ab578c7-7695-42a4-8d1d-2ae021fe8e3d", "befores": [{"name": "sql_type", "status": "passed", "start": 1699242128227, "stop": 1699242128227}], "start": 1699242128227, "stop": 1699242128410}
\ No newline at end of file
{"uuid": "c36f141d-3fd5-4932-a71e-015dca851051", "befores": [{"name": "update_key", "status": "passed", "start": 1699242128228, "stop": 1699242128228}], "start": 1699242128228, "stop": 1699242128408}
\ No newline at end of file
{"uuid": "7a993cbc-f891-42f7-9781-cf86a6981257", "befores": [{"name": "sql_data", "status": "passed", "start": 1699242125414, "stop": 1699242125414}], "start": 1699242125414, "stop": 1699242125506}
\ No newline at end of file
{"uuid": "9136fe0e-d8f7-47fd-addd-13b0c977fd7f", "befores": [{"name": "update_key", "status": "passed", "start": 1699242125954, "stop": 1699242125954}], "start": 1699242125954, "stop": 1699242126145}
\ No newline at end of file
{"uuid": "23a6728f-c31f-4869-a5a4-5dcafbb21ddf", "befores": [{"name": "expect_data", "status": "passed", "start": 1699242128553, "stop": 1699242128553}], "start": 1699242128553, "stop": 1699242128666}
\ No newline at end of file
{"uuid": "bd42ae87-5393-42c3-8f82-d5e547ef5817", "befores": [{"name": "case_url", "status": "passed", "start": 1699242127017, "stop": 1699242127017}], "start": 1699242127017, "stop": 1699242127083}
\ No newline at end of file
{"uuid": "683dd1cf-bfd9-4d37-b27f-42a893db9229", "befores": [{"name": "update_key", "status": "passed", "start": 1699242127606, "stop": 1699242127606}], "start": 1699242127606, "stop": 1699242127700}
\ No newline at end of file
{"name": "test_bpm[http://120.46.172.186:8080/api/demension/v1/dem/addDem-post-json-case_data11-expect_data11-delete-DELETE FROM uc_demension WHERE `CODE_`=\"dem_test57_abc\";-None]", "status": "passed", "parameters": [{"name": "case_url", "value": "'http://120.46.172.186:8080/api/demension/v1/dem/addDem'"}, {"name": "case_method", "value": "'post'"}, {"name": "case_mime", "value": "'json'"}, {"name": "case_data", "value": "{'code': 'dem_test57_abc', 'description': '测试维度57', 'isDefault': 0, 'name': '测试57期的维度'}"}, {"name": "expect_data", "value": "{'state': True, 'message': '添加维度成功!'}"}, {"name": "sql_type", "value": "'delete'"}, {"name": "sql_data", "value": "'DELETE FROM uc_demension WHERE `CODE_`=\"dem_test57_abc\";'"}, {"name": "update_key", "value": "None"}], "start": 1699242128017, "stop": 1699242128163, "uuid": "38ab2039-2fb0-43eb-9d98-ec4d5629a251", "historyId": "3da999a9f86dbe177ee4619c775b434a", "testCaseId": "fddf80969464aadbd498677a3a3dd380", "fullName": "InterfaceAutoTest_2.test_case.test_zhangsan.test_bpm.TestBPM#test_bpm", "labels": [{"name": "parentSuite", "value": "InterfaceAutoTest_2.test_case.test_zhangsan"}, {"name": "suite", "value": "test_bpm"}, {"name": "subSuite", "value": "TestBPM"}, {"name": "host", "value": "LAPTOP-TAHSRL94"}, {"name": "thread", "value": "24068-MainThread"}, {"name": "framework", "value": "pytest"}, {"name": "language", "value": "cpython3"}, {"name": "package", "value": "InterfaceAutoTest_2.test_case.test_zhangsan.test_bpm"}]}
\ No newline at end of file
{"uuid": "67a58721-f891-41f0-a0e5-2db061ae61f1", "befores": [{"name": "sql_data", "status": "passed", "start": 1699242127708, "stop": 1699242127708}], "start": 1699242127708, "stop": 1699242127798}
\ No newline at end of file
{"uuid": "bc76c042-1e8e-4fc4-9957-99d04d4eff58", "befores": [{"name": "case_method", "status": "passed", "start": 1699242127605, "stop": 1699242127605}], "start": 1699242127605, "stop": 1699242127703}
\ No newline at end of file
{"uuid": "86332cf8-764d-4486-bc2d-e7ff62e573f4", "befores": [{"name": "expect_data", "status": "passed", "start": 1699242128488, "stop": 1699242128488}], "start": 1699242128488, "stop": 1699242128549}
\ No newline at end of file
{"uuid": "32287d38-4943-493b-94d2-a6ed10516c96", "befores": [{"name": "case_mime", "status": "passed", "start": 1699242128171, "stop": 1699242128171}], "start": 1699242128171, "stop": 1699242128223}
\ No newline at end of file
{"name": "test_bpm[http://120.46.172.186:8080/api/org/v1/orgParam/saveOrgParams-POST-body|query-case_data14-expect_data14-None-None-None]", "status": "passed", "parameters": [{"name": "case_url", "value": "'http://120.46.172.186:8080/api/org/v1/orgParam/saveOrgParams'"}, {"name": "case_method", "value": "'POST'"}, {"name": "case_mime", "value": "'body|query'"}, {"name": "case_data", "value": "{'query': {'orgCode': 'test_org_57'}, 'body': [{'alias': 'sz', 'value': 9000}]}"}, {"name": "expect_data", "value": "{'state': True, 'message': '保存组织参数成功!'}"}, {"name": "sql_type", "value": "None"}, {"name": "sql_data", "value": "None"}, {"name": "update_key", "value": "None"}], "start": 1699242126154, "stop": 1699242126208, "uuid": "9bda1df2-30ff-4d6b-8186-57020ae25dde", "historyId": "f1acaa1c32b41abf0a6e823462593332", "testCaseId": "317585064e361b6d13052050b1dc8a9e", "fullName": "InterfaceAutoTest_2.test_case.test_laohuang.test_bpm_laohuang.TestBPM#test_bpm", "labels": [{"name": "parentSuite", "value": "InterfaceAutoTest_2.test_case.test_laohuang"}, {"name": "suite", "value": "test_bpm_laohuang"}, {"name": "subSuite", "value": "TestBPM"}, {"name": "host", "value": "LAPTOP-TAHSRL94"}, {"name": "thread", "value": "24068-MainThread"}, {"name": "framework", "value": "pytest"}, {"name": "language", "value": "cpython3"}, {"name": "package", "value": "InterfaceAutoTest_2.test_case.test_laohuang.test_bpm_laohuang"}]}
\ No newline at end of file
{"uuid": "a7f292e1-4348-4eb0-bd67-879c3c1f84d5", "befores": [{"name": "sql_type", "status": "passed", "start": 1699242127606, "stop": 1699242127606}], "start": 1699242127606, "stop": 1699242127700}
\ No newline at end of file
{"name": "test2", "status": "failed", "statusDetails": {"message": "AssertionError: assert '添加维度成功' in '{\"state\":false,\"message\":\"添加维度失败,维度编码【addDem17】在系统中已存在!\",\"value\":\"\"}'\n + where '{\"state\":false,\"message\":\"添加维度失败,维度编码【addDem17】在系统中已存在!\",\"value\":\"\"}' = <Response [200]>.text", "trace": "self = <InterfaceAutoTest_2.test_case.test_order.test_pytest_func.Test01 object at 0x12ADA610>\n\n @pytest.mark.dependency(depends=[\"Test01::test1\"])\n def test2(self):\n print(\"添加维度用例\")\n add_dem_url = \"http://120.46.172.186:8080/api/demension/v1/dem/addDem\"\n add_dem_data = {\n \"code\": \"addDem\"+str(random.randrange(1, 100)),\n \"description\": \"addDem\",\n \"isDefault\": 0,\n \"name\": \"addDem\"\n }\n \n res = self.bpm_sess.request(method=\"post\", url=add_dem_url, json=add_dem_data)\n print(res.text)\n> assert \"添加维度成功\" in res.text\nE assert '添加维度成功' in '{\"state\":false,\"message\":\"添加维度失败,维度编码【addDem17】在系统中已存在!\",\"value\":\"\"}'\nE + where '{\"state\":false,\"message\":\"添加维度失败,维度编码【addDem17】在系统中已存在!\",\"value\":\"\"}' = <Response [200]>.text\n\nInterfaceAutoTest_2\\test_case\\test_order\\test_pytest_func.py:78: AssertionError"}, "attachments": [{"name": "stdout", "source": "bd61a578-3777-461f-8df8-c750c1c834b9-attachment.txt", "type": "text/plain"}], "start": 1699242126554, "stop": 1699242126602, "uuid": "3c123d23-0011-40ee-8862-8c906aab45ad", "historyId": "468ca9aedfb58473e35d7005545b7294", "testCaseId": "468ca9aedfb58473e35d7005545b7294", "fullName": "InterfaceAutoTest_2.test_case.test_order.test_pytest_func.Test01#test2", "labels": [{"name": "tag", "value": "dependency(depends=['Test01::test1'])"}, {"name": "parentSuite", "value": "InterfaceAutoTest_2.test_case.test_order"}, {"name": "suite", "value": "test_pytest_func"}, {"name": "subSuite", "value": "Test01"}, {"name": "host", "value": "LAPTOP-TAHSRL94"}, {"name": "thread", "value": "24068-MainThread"}, {"name": "framework", "value": "pytest"}, {"name": "language", "value": "cpython3"}, {"name": "package", "value": "InterfaceAutoTest_2.test_case.test_order.test_pytest_func"}]}
\ No newline at end of file
ERROR  黄总:test_bpm.py:53 断言失败,用例数据为:{'password': 'MTIzNDU2', 'username': 'admin'},期望数据为:{'username': '超级管理', 'account': 'admin', 'loginStatus': True},服务器返回的数据为:{"token":"eyJhbGciOiJIUzUxMiJ9.eyJzdWIiOiJhZG1pbiIsInRlbmFudElkIjoiLTEiLCJleHAiOjE2OTkzMjg1MjYsImlhdCI6MTY5OTI0MjEyNn0.5CpJBi19CiIHgaiaMyN6wZJOIuZjFWrZouKnWZ7UzmlRfkp9SIWRcBTJPOUiioMc9-dl_Fya7-U9F8av4DmQOw","username":"超级管理员","account":"admin","userId":"1","expiration":86400,"loginStatus":true,"userAttrs":{"tenantId":"-1"}}
\ No newline at end of file
{"uuid": "959bfb53-b04e-4fe5-898d-044057dc34f5", "befores": [{"name": "case_data", "status": "passed", "start": 1699242127489, "stop": 1699242127489}], "start": 1699242127489, "stop": 1699242127600}
\ No newline at end of file
{"uuid": "b4d28766-cdc5-47ec-99ce-1630471bb70d", "befores": [{"name": "case_mime", "status": "passed", "start": 1699242127287, "stop": 1699242127287}], "start": 1699242127287, "stop": 1699242127383}
\ No newline at end of file
{"uuid": "2f4c7700-9c02-423a-86be-e17fadfd8f24", "befores": [{"name": "case_url", "status": "passed", "start": 1699242125413, "stop": 1699242125413}], "start": 1699242125413, "stop": 1699242125511}
\ No newline at end of file
{"uuid": "57756e4f-522f-4ece-90bc-a0f1fff1fff0", "befores": [{"name": "sql_data", "status": "passed", "start": 1699242126216, "stop": 1699242126216}], "start": 1699242126216, "stop": 1699242126277}
\ No newline at end of file
{"name": "test_bpm[http://120.46.172.186:8080/auth-POST-application/json-case_data8-expect_data8-None-None-None]", "status": "passed", "parameters": [{"name": "case_url", "value": "'http://120.46.172.186:8080/auth'"}, {"name": "case_method", "value": "'POST'"}, {"name": "case_mime", "value": "'application/json'"}, {"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": 1699242127708, "stop": 1699242127797, "uuid": "13a48860-0cea-4f0e-a0ba-5b8825ccfe22", "historyId": "5c95576139a17b88d5707706aaef96ef", "testCaseId": "fddf80969464aadbd498677a3a3dd380", "fullName": "InterfaceAutoTest_2.test_case.test_zhangsan.test_bpm.TestBPM#test_bpm", "labels": [{"name": "parentSuite", "value": "InterfaceAutoTest_2.test_case.test_zhangsan"}, {"name": "suite", "value": "test_bpm"}, {"name": "subSuite", "value": "TestBPM"}, {"name": "host", "value": "LAPTOP-TAHSRL94"}, {"name": "thread", "value": "24068-MainThread"}, {"name": "framework", "value": "pytest"}, {"name": "language", "value": "cpython3"}, {"name": "package", "value": "InterfaceAutoTest_2.test_case.test_zhangsan.test_bpm"}]}
\ No newline at end of file
{"uuid": "2f98aa82-d4c0-4cfc-9cf5-dd79c3520451", "befores": [{"name": "sql_type", "status": "passed", "start": 1699242125203, "stop": 1699242125203}], "start": 1699242125203, "stop": 1699242125298}
\ No newline at end of file
{"uuid": "2062900f-b889-45ac-8d7f-783fda159762", "befores": [{"name": "case_method", "status": "passed", "start": 1699242127287, "stop": 1699242127287}], "start": 1699242127287, "stop": 1699242127383}
\ No newline at end of file
{"name": "test_bpm[http://120.46.172.186:8080/api/demension/v1/dem/deleteDemByIds-DELETE-query-case_data16-expect_data16-select-SELECT ID_ from uc_demension WHERE `CODE_`=\"dem_test57_abc\";-ids]", "status": "failed", "statusDetails": {"message": "AssertionError: 断言失败", "trace": "self = <InterfaceAutoTest_2.test_case.test_laohuang.test_bpm_laohuang.TestBPM object at 0x12AFB350>\ndb_fix = <InterfaceAutoTest.common.db.DB object at 0x12B93C10>\nreq_fix = <InterfaceAutoTest.requests_method.requests_method.RequestsMethod object at 0x12AF3630>\ncase_url = 'http://120.46.172.186:8080/api/demension/v1/dem/deleteDemByIds', case_method = 'DELETE', case_mime = 'query'\ncase_data = {'ids': '1721372355906781184'}, expect_data = {'message': '删除维度成功', 'state': True}, sql_type = 'select'\nsql_data = 'SELECT ID_ from uc_demension WHERE `CODE_`=\"dem_test57_abc\";', update_key = 'ids'\n\n @pytest.mark.parametrize(\"case_url, case_method, case_mime, case_data, expect_data, sql_type, sql_data, update_key\", ReadExcel(\"BPM-laohuang\").get_data())\n def test_bpm(self, db_fix, req_fix, case_url, case_method, case_mime, case_data, expect_data, sql_type, sql_data, update_key):\n # 判断sql语句的类型是否为delete\n if sql_type == \"delete\":\n # 使用DB类对象执行删除的sql语句\n db_fix.delete(sql_data)\n # 使用RequestsMethod类对象发送请求--pass\n # 判断sql语句类型是否为select\n elif sql_type == \"select\":\n # 使用DB类对象执行查询的sql语句,并接收查询的结果\n select_result = db_fix.select(sql_data)\n # 将查询结果更新到用例数据中\n case_data[update_key] = select_result\n # 使用RequestsMethod类对象发送请求--pass\n \n # 判断sql语句的类型是否为select|delete或者为delete|select\n elif sql_type == \"select|delete\" or sql_type == \"delete|select\":\n # 使用DB类对象执行删除的sql语句\n db_fix.delete(sql_data.get(\"delete\"))\n # 使用DB类对象执行查询的sql语句,并接收查询的结果\n select_result = db_fix.select(sql_data.get(\"select\"))\n # 将查询结果更新到用例数据中\n case_data[update_key] = select_result\n \n # 使用RequestsMethod类对象发送请求\n res = req_fix.request_all(req_method=case_method, req_url=case_url, req_mime=case_mime, case_data=case_data)\n \n \n # 断言\n try:\n for key in expect_data:\n> assert expect_data[key] == res.json().get(key)\nE AssertionError: assert '删除维度成功' == '删除维度成功!'\nE - 删除维度成功!\nE ? -\nE + 删除维度成功\n\nInterfaceAutoTest_2\\test_case\\test_laohuang\\test_bpm_laohuang.py:48: AssertionError\n\nDuring handling of the above exception, another exception occurred:\n\nself = <InterfaceAutoTest_2.test_case.test_laohuang.test_bpm_laohuang.TestBPM object at 0x12AFB350>\ndb_fix = <InterfaceAutoTest.common.db.DB object at 0x12B93C10>\nreq_fix = <InterfaceAutoTest.requests_method.requests_method.RequestsMethod object at 0x12AF3630>\ncase_url = 'http://120.46.172.186:8080/api/demension/v1/dem/deleteDemByIds', case_method = 'DELETE', case_mime = 'query'\ncase_data = {'ids': '1721372355906781184'}, expect_data = {'message': '删除维度成功', 'state': True}, sql_type = 'select'\nsql_data = 'SELECT ID_ from uc_demension WHERE `CODE_`=\"dem_test57_abc\";', update_key = 'ids'\n\n @pytest.mark.parametrize(\"case_url, case_method, case_mime, case_data, expect_data, sql_type, sql_data, update_key\", ReadExcel(\"BPM-laohuang\").get_data())\n def test_bpm(self, db_fix, req_fix, case_url, case_method, case_mime, case_data, expect_data, sql_type, sql_data, update_key):\n # 判断sql语句的类型是否为delete\n if sql_type == \"delete\":\n # 使用DB类对象执行删除的sql语句\n db_fix.delete(sql_data)\n # 使用RequestsMethod类对象发送请求--pass\n # 判断sql语句类型是否为select\n elif sql_type == \"select\":\n # 使用DB类对象执行查询的sql语句,并接收查询的结果\n select_result = db_fix.select(sql_data)\n # 将查询结果更新到用例数据中\n case_data[update_key] = select_result\n # 使用RequestsMethod类对象发送请求--pass\n \n # 判断sql语句的类型是否为select|delete或者为delete|select\n elif sql_type == \"select|delete\" or sql_type == \"delete|select\":\n # 使用DB类对象执行删除的sql语句\n db_fix.delete(sql_data.get(\"delete\"))\n # 使用DB类对象执行查询的sql语句,并接收查询的结果\n select_result = db_fix.select(sql_data.get(\"select\"))\n # 将查询结果更新到用例数据中\n case_data[update_key] = select_result\n \n # 使用RequestsMethod类对象发送请求\n res = req_fix.request_all(req_method=case_method, req_url=case_url, req_mime=case_mime, case_data=case_data)\n \n \n # 断言\n try:\n for key in expect_data:\n assert expect_data[key] == res.json().get(key)\n except:\n log.error(\"断言失败\"+\",用例数据为:\"+str(case_data)+\",期望数据为:\"+str(expect_data)+\",服务器返回的数据为:\"+res.text)\n> raise AssertionError(\"断言失败\")\nE AssertionError: 断言失败\n\nInterfaceAutoTest_2\\test_case\\test_laohuang\\test_bpm_laohuang.py:51: AssertionError"}, "attachments": [{"name": "log", "source": "993830a7-7737-483b-9920-ab01bbfaf483-attachment.txt", "type": "text/plain"}], "parameters": [{"name": "case_url", "value": "'http://120.46.172.186:8080/api/demension/v1/dem/deleteDemByIds'"}, {"name": "case_method", "value": "'DELETE'"}, {"name": "case_mime", "value": "'query'"}, {"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_`=\"dem_test57_abc\";'"}, {"name": "update_key", "value": "'ids'"}], "start": 1699242126284, "stop": 1699242126380, "uuid": "7d0e0737-d4fe-432e-aa89-f89d3fa4ddad", "historyId": "2fa23a5d9b43b330750bdbe031121e31", "testCaseId": "317585064e361b6d13052050b1dc8a9e", "fullName": "InterfaceAutoTest_2.test_case.test_laohuang.test_bpm_laohuang.TestBPM#test_bpm", "labels": [{"name": "parentSuite", "value": "InterfaceAutoTest_2.test_case.test_laohuang"}, {"name": "suite", "value": "test_bpm_laohuang"}, {"name": "subSuite", "value": "TestBPM"}, {"name": "host", "value": "LAPTOP-TAHSRL94"}, {"name": "thread", "value": "24068-MainThread"}, {"name": "framework", "value": "pytest"}, {"name": "language", "value": "cpython3"}, {"name": "package", "value": "InterfaceAutoTest_2.test_case.test_laohuang.test_bpm_laohuang"}]}
\ No newline at end of file
{"uuid": "5caadb42-56c6-44b3-9e5f-ca4f1f29ec2f", "befores": [{"name": "expect_data", "status": "passed", "start": 1699242127387, "stop": 1699242127387}], "start": 1699242127387, "stop": 1699242127482}
\ No newline at end of file
{"uuid": "ba699460-f546-436e-9f54-adb4c572b543", "children": ["9effb113-0b86-4db4-ba47-ebf86f7b6c18", "3c123d23-0011-40ee-8862-8c906aab45ad", "5adf36a9-1cf4-40e7-a818-63cc01a1db73"], "befores": [{"name": "_xunit_setup_class_fixture_Test01", "status": "passed", "start": 1699242126399, "stop": 1699242126495}], "afters": [{"name": "_xunit_setup_class_fixture_Test01::0", "status": "passed", "start": 1699242126612, "stop": 1699242126612}], "start": 1699242126399, "stop": 1699242126612}
\ No newline at end of file
{"uuid": "848738aa-bd4c-42b8-88a4-59dba5544a1b", "befores": [{"name": "case_url", "status": "passed", "start": 1699242125202, "stop": 1699242125202}], "start": 1699242125202, "stop": 1699242125301}
\ No newline at end of file
{"uuid": "81493516-3c58-4ea9-9eca-5379baf4e48b", "befores": [{"name": "update_key", "status": "passed", "start": 1699242127903, "stop": 1699242127903}], "start": 1699242127903, "stop": 1699242128009}
\ No newline at end of file
{"uuid": "a3c37335-b0a5-4f47-9a96-c05ef6ddf463", "befores": [{"name": "case_data", "status": "passed", "start": 1699242127017, "stop": 1699242127017}], "start": 1699242127017, "stop": 1699242127081}
\ No newline at end of file
{"uuid": "d6e8ff28-b224-4349-9431-dc234b8e6026", "befores": [{"name": "case_url", "status": "passed", "start": 1699242125307, "stop": 1699242125307}], "start": 1699242125307, "stop": 1699242125411}
\ No newline at end of file
{"uuid": "e190284d-6633-4502-ae6f-adf558e98366", "befores": [{"name": "case_mime", "status": "passed", "start": 1699242127605, "stop": 1699242127605}], "start": 1699242127605, "stop": 1699242127702}
\ No newline at end of file
{"uuid": "057fb04b-b329-4c02-a903-aed47aee8085", "befores": [{"name": "case_data", "status": "passed", "start": 1699242125202, "stop": 1699242125202}], "start": 1699242125202, "stop": 1699242125299}
\ No newline at end of file
{"uuid": "f24436e4-4f4c-4d44-85f4-460255d00d0f", "befores": [{"name": "expect_data", "status": "passed", "start": 1699242128171, "stop": 1699242128171}], "start": 1699242128171, "stop": 1699242128222}
\ No newline at end of file
{"name": "test_bpm[http://120.46.172.186:8080/api/org/v1/org/addOrg-POST-application/json-case_data13-expect_data13-select|delete-sql_data13-demId]", "status": "passed", "parameters": [{"name": "case_url", "value": "'http://120.46.172.186:8080/api/org/v1/org/addOrg'"}, {"name": "case_method", "value": "'POST'"}, {"name": "case_mime", "value": "'application/json'"}, {"name": "case_data", "value": "{'code': 'test_org_57', 'demId': '不知道', 'exceedLimitNum': 0, 'grade': '', 'limitNum': 0, 'name': '测试组织', 'nowNum': 0, 'orderNo': 0, 'parentId': '0'}"}, {"name": "expect_data", "value": "{'state': True, 'message': '添加组织成功!'}"}, {"name": "sql_type", "value": "'select|delete'"}, {"name": "sql_data", "value": "{'select': 'SELECT ID_ from uc_demension WHERE `CODE_`=\"dem_test57_abc\";', 'delete': 'DELETE FROM uc_org WHERE `CODE_`=\"test_org_57\";'}"}, {"name": "update_key", "value": "'demId'"}], "start": 1699242125955, "stop": 1699242126144, "uuid": "f6b9a8dc-6e71-440b-b90f-a7c99ee39ee0", "historyId": "aad8dbfbf7d9bfe8d01d6e1101b7167d", "testCaseId": "317585064e361b6d13052050b1dc8a9e", "fullName": "InterfaceAutoTest_2.test_case.test_laohuang.test_bpm_laohuang.TestBPM#test_bpm", "labels": [{"name": "parentSuite", "value": "InterfaceAutoTest_2.test_case.test_laohuang"}, {"name": "suite", "value": "test_bpm_laohuang"}, {"name": "subSuite", "value": "TestBPM"}, {"name": "host", "value": "LAPTOP-TAHSRL94"}, {"name": "thread", "value": "24068-MainThread"}, {"name": "framework", "value": "pytest"}, {"name": "language", "value": "cpython3"}, {"name": "package", "value": "InterfaceAutoTest_2.test_case.test_laohuang.test_bpm_laohuang"}]}
\ No newline at end of file
{"uuid": "74dc70e3-a99e-413f-88fa-c9581210156a", "befores": [{"name": "case_data", "status": "passed", "start": 1699242124787, "stop": 1699242124787}], "start": 1699242124787, "stop": 1699242124888}
\ No newline at end of file
{"uuid": "497420e2-70e9-4986-ab23-fab9ae9cdc10", "befores": [{"name": "sql_data", "status": "passed", "start": 1699242124788, "stop": 1699242124788}], "start": 1699242124788, "stop": 1699242124885}
\ No newline at end of file
{"uuid": "f4abd0a5-3ff0-460e-9fe7-e76cb3aaa86c", "befores": [{"name": "case_mime", "status": "passed", "start": 1699242126152, "stop": 1699242126152}], "start": 1699242126152, "stop": 1699242126212}
\ No newline at end of file
{"uuid": "819ab440-7313-44f3-abd9-d1364fab6713", "befores": [{"name": "case_data", "status": "passed", "start": 1699242125414, "stop": 1699242125414}], "start": 1699242125413, "stop": 1699242125508}
\ No newline at end of file
{"uuid": "71d5eb04-859e-46d3-a7cd-dcb29e73ed86", "befores": [{"name": "case_method", "status": "passed", "start": 1699242124787, "stop": 1699242124787}], "start": 1699242124787, "stop": 1699242124889}
\ No newline at end of file
{"name": "test_bpm[http://120.46.172.186:8080/auth-POST-json-case_data2-expect_data2-None-None-None]", "status": "passed", "parameters": [{"name": "case_url", "value": "'http://120.46.172.186:8080/auth'"}, {"name": "case_method", "value": "'POST'"}, {"name": "case_mime", "value": "'json'"}, {"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": 1699242127087, "stop": 1699242127182, "uuid": "2e909a78-7ede-4af0-944c-cf4a8d7f4388", "historyId": "e7588b3a21bbb3e2433bf02be6398a21", "testCaseId": "fddf80969464aadbd498677a3a3dd380", "fullName": "InterfaceAutoTest_2.test_case.test_zhangsan.test_bpm.TestBPM#test_bpm", "labels": [{"name": "parentSuite", "value": "InterfaceAutoTest_2.test_case.test_zhangsan"}, {"name": "suite", "value": "test_bpm"}, {"name": "subSuite", "value": "TestBPM"}, {"name": "host", "value": "LAPTOP-TAHSRL94"}, {"name": "thread", "value": "24068-MainThread"}, {"name": "framework", "value": "pytest"}, {"name": "language", "value": "cpython3"}, {"name": "package", "value": "InterfaceAutoTest_2.test_case.test_zhangsan.test_bpm"}]}
\ No newline at end of file
{"uuid": "aac1999f-ffaf-470f-83d3-86b4699d995f", "befores": [{"name": "case_mime", "status": "passed", "start": 1699242125307, "stop": 1699242125307}], "start": 1699242125307, "stop": 1699242125409}
\ No newline at end of file
{"name": "test_bpm[http://120.46.172.186:8080/refresh-GET-None-None-expect_data10-None-None-None]", "status": "failed", "statusDetails": {"message": "AssertionError: 断言失败", "trace": "self = <InterfaceAutoTest_2.test_case.test_zhangsan.test_bpm.TestBPM object at 0x12B51FF0>\ndb_fix = <InterfaceAutoTest.common.db.DB object at 0x12BAD5D0>\nreq_fix = <InterfaceAutoTest.requests_method.requests_method.RequestsMethod object at 0x12AD33B0>, case_url = 'http://120.46.172.186:8080/refresh'\ncase_method = 'GET', case_mime = None, case_data = None, expect_data = {'message': '刷新成功'}, sql_type = None, sql_data = None, update_key = None\n\n @pytest.mark.parametrize(\"case_url, case_method, case_mime, case_data, expect_data, sql_type, sql_data, update_key\", ReadExcel(\"BPM\", excel_path=excel_path).get_data())\n def test_bpm(self, db_fix, req_fix, case_url, case_method, case_mime, case_data, expect_data, sql_type, sql_data, update_key):\n # 判断sql语句的类型是否为delete\n if sql_type == \"delete\":\n # 使用DB类对象执行删除的sql语句\n db_fix.delete(sql_data)\n # 使用RequestsMethod类对象发送请求--pass\n # 判断sql语句类型是否为select\n elif sql_type == \"select\":\n # 使用DB类对象执行查询的sql语句,并接收查询的结果\n select_result = db_fix.select(sql_data)\n # 将查询结果更新到用例数据中\n case_data[update_key] = select_result\n # 使用RequestsMethod类对象发送请求--pass\n \n # 判断sql语句的类型是否为select|delete或者为delete|select\n elif sql_type == \"select|delete\" or sql_type == \"delete|select\":\n # 使用DB类对象执行删除的sql语句\n db_fix.delete(sql_data.get(\"delete\"))\n # 使用DB类对象执行查询的sql语句,并接收查询的结果\n select_result = db_fix.select(sql_data.get(\"select\"))\n # 将查询结果更新到用例数据中\n case_data[update_key] = select_result\n \n # 使用RequestsMethod类对象发送请求\n res = req_fix.request_all(req_method=case_method, req_url=case_url, req_mime=case_mime, case_data=case_data)\n \n \n # 断言\n try:\n for key in expect_data:\n> assert expect_data[key] == res.json().get(key)\nE AssertionError: assert '刷新成功' == None\nE + where None = <built-in method get of dict object at 0x12E56FC0>('message')\nE + where <built-in method get of dict object at 0x12E56FC0> = {'account': '', 'loginStatus': True, 'token': 'eyJhbGciOiJIUzUxMiJ9.eyJzdWIiOiJhZG1pbiIsInRlbmFudElkIjoiLTEiLCJleHAiOj...0MjEyN30.nZzf2ZrV4S_hh7wXJR448Afb_XG_W0wY7Ax6cNsBxSYkMWGm1t5h8-HfQ44ChMX0uAcupAxbyRtFlCz65EpMMA', 'userAttrs': {}, ...}.get\nE + where {'account': '', 'loginStatus': True, 'token': 'eyJhbGciOiJIUzUxMiJ9.eyJzdWIiOiJhZG1pbiIsInRlbmFudElkIjoiLTEiLCJleHAiOj...0MjEyN30.nZzf2ZrV4S_hh7wXJR448Afb_XG_W0wY7Ax6cNsBxSYkMWGm1t5h8-HfQ44ChMX0uAcupAxbyRtFlCz65EpMMA', 'userAttrs': {}, ...} = <bound method Response.json of <Response [200]>>()\nE + where <bound method Response.json of <Response [200]>> = <Response [200]>.json\n\nInterfaceAutoTest_2\\test_case\\test_zhangsan\\test_bpm.py:51: AssertionError\n\nDuring handling of the above exception, another exception occurred:\n\nself = <InterfaceAutoTest_2.test_case.test_zhangsan.test_bpm.TestBPM object at 0x12B51FF0>\ndb_fix = <InterfaceAutoTest.common.db.DB object at 0x12BAD5D0>\nreq_fix = <InterfaceAutoTest.requests_method.requests_method.RequestsMethod object at 0x12AD33B0>, case_url = 'http://120.46.172.186:8080/refresh'\ncase_method = 'GET', case_mime = None, case_data = None, expect_data = {'message': '刷新成功'}, sql_type = None, sql_data = None, update_key = None\n\n @pytest.mark.parametrize(\"case_url, case_method, case_mime, case_data, expect_data, sql_type, sql_data, update_key\", ReadExcel(\"BPM\", excel_path=excel_path).get_data())\n def test_bpm(self, db_fix, req_fix, case_url, case_method, case_mime, case_data, expect_data, sql_type, sql_data, update_key):\n # 判断sql语句的类型是否为delete\n if sql_type == \"delete\":\n # 使用DB类对象执行删除的sql语句\n db_fix.delete(sql_data)\n # 使用RequestsMethod类对象发送请求--pass\n # 判断sql语句类型是否为select\n elif sql_type == \"select\":\n # 使用DB类对象执行查询的sql语句,并接收查询的结果\n select_result = db_fix.select(sql_data)\n # 将查询结果更新到用例数据中\n case_data[update_key] = select_result\n # 使用RequestsMethod类对象发送请求--pass\n \n # 判断sql语句的类型是否为select|delete或者为delete|select\n elif sql_type == \"select|delete\" or sql_type == \"delete|select\":\n # 使用DB类对象执行删除的sql语句\n db_fix.delete(sql_data.get(\"delete\"))\n # 使用DB类对象执行查询的sql语句,并接收查询的结果\n select_result = db_fix.select(sql_data.get(\"select\"))\n # 将查询结果更新到用例数据中\n case_data[update_key] = select_result\n \n # 使用RequestsMethod类对象发送请求\n res = req_fix.request_all(req_method=case_method, req_url=case_url, req_mime=case_mime, case_data=case_data)\n \n \n # 断言\n try:\n for key in expect_data:\n assert expect_data[key] == res.json().get(key)\n except:\n log.error(\"断言失败\"+\",用例数据为:\"+str(case_data)+\",期望数据为:\"+str(expect_data)+\",服务器返回的数据为:\"+res.text)\n> raise AssertionError(\"断言失败\")\nE AssertionError: 断言失败\n\nInterfaceAutoTest_2\\test_case\\test_zhangsan\\test_bpm.py:54: AssertionError"}, "attachments": [{"name": "log", "source": "bc071451-3976-49c4-8138-5d75700b3228-attachment.txt", "type": "text/plain"}], "parameters": [{"name": "case_url", "value": "'http://120.46.172.186:8080/refresh'"}, {"name": "case_method", "value": "'GET'"}, {"name": "case_mime", "value": "None"}, {"name": "case_data", "value": "None"}, {"name": "expect_data", "value": "{'message': '刷新成功'}"}, {"name": "sql_type", "value": "None"}, {"name": "sql_data", "value": "None"}, {"name": "update_key", "value": "None"}], "start": 1699242127903, "stop": 1699242128000, "uuid": "18bba92e-2c50-49ab-9edc-96f00e1e564b", "historyId": "7caf6e6dd223c3b0910330b2d6240caf", "testCaseId": "fddf80969464aadbd498677a3a3dd380", "fullName": "InterfaceAutoTest_2.test_case.test_zhangsan.test_bpm.TestBPM#test_bpm", "labels": [{"name": "parentSuite", "value": "InterfaceAutoTest_2.test_case.test_zhangsan"}, {"name": "suite", "value": "test_bpm"}, {"name": "subSuite", "value": "TestBPM"}, {"name": "host", "value": "LAPTOP-TAHSRL94"}, {"name": "thread", "value": "24068-MainThread"}, {"name": "framework", "value": "pytest"}, {"name": "language", "value": "cpython3"}, {"name": "package", "value": "InterfaceAutoTest_2.test_case.test_zhangsan.test_bpm"}]}
\ No newline at end of file
{"uuid": "492f4498-2ea7-455c-b155-8925b671ceb1", "befores": [{"name": "case_url", "status": "passed", "start": 1699242125742, "stop": 1699242125742}], "start": 1699242125742, "stop": 1699242125892}
\ No newline at end of file
{"name": "test_bpm[http://120.46.172.186:8080/api/demension/v1/dem/deleteDemByIds-DELETE-query-case_data16-expect_data16-select-SELECT ID_ from uc_demension WHERE `CODE_`=\"dem_test57_abc\";-ids]", "status": "failed", "statusDetails": {"message": "AssertionError: 断言失败", "trace": "self = <InterfaceAutoTest_2.test_case.test_zhangsan.test_bpm.TestBPM object at 0x12B51C30>\ndb_fix = <InterfaceAutoTest.common.db.DB object at 0x12BAD5D0>\nreq_fix = <InterfaceAutoTest.requests_method.requests_method.RequestsMethod object at 0x12AD33B0>\ncase_url = 'http://120.46.172.186:8080/api/demension/v1/dem/deleteDemByIds', case_method = 'DELETE', case_mime = 'query'\ncase_data = {'ids': '1721372365440434176'}, expect_data = {'message': '删除维度成功', 'state': True}, sql_type = 'select'\nsql_data = 'SELECT ID_ from uc_demension WHERE `CODE_`=\"dem_test57_abc\";', update_key = 'ids'\n\n @pytest.mark.parametrize(\"case_url, case_method, case_mime, case_data, expect_data, sql_type, sql_data, update_key\", ReadExcel(\"BPM\", excel_path=excel_path).get_data())\n def test_bpm(self, db_fix, req_fix, case_url, case_method, case_mime, case_data, expect_data, sql_type, sql_data, update_key):\n # 判断sql语句的类型是否为delete\n if sql_type == \"delete\":\n # 使用DB类对象执行删除的sql语句\n db_fix.delete(sql_data)\n # 使用RequestsMethod类对象发送请求--pass\n # 判断sql语句类型是否为select\n elif sql_type == \"select\":\n # 使用DB类对象执行查询的sql语句,并接收查询的结果\n select_result = db_fix.select(sql_data)\n # 将查询结果更新到用例数据中\n case_data[update_key] = select_result\n # 使用RequestsMethod类对象发送请求--pass\n \n # 判断sql语句的类型是否为select|delete或者为delete|select\n elif sql_type == \"select|delete\" or sql_type == \"delete|select\":\n # 使用DB类对象执行删除的sql语句\n db_fix.delete(sql_data.get(\"delete\"))\n # 使用DB类对象执行查询的sql语句,并接收查询的结果\n select_result = db_fix.select(sql_data.get(\"select\"))\n # 将查询结果更新到用例数据中\n case_data[update_key] = select_result\n \n # 使用RequestsMethod类对象发送请求\n res = req_fix.request_all(req_method=case_method, req_url=case_url, req_mime=case_mime, case_data=case_data)\n \n \n # 断言\n try:\n for key in expect_data:\n> assert expect_data[key] == res.json().get(key)\nE AssertionError: assert '删除维度成功' == '删除维度成功!'\nE - 删除维度成功!\nE ? -\nE + 删除维度成功\n\nInterfaceAutoTest_2\\test_case\\test_zhangsan\\test_bpm.py:51: AssertionError\n\nDuring handling of the above exception, another exception occurred:\n\nself = <InterfaceAutoTest_2.test_case.test_zhangsan.test_bpm.TestBPM object at 0x12B51C30>\ndb_fix = <InterfaceAutoTest.common.db.DB object at 0x12BAD5D0>\nreq_fix = <InterfaceAutoTest.requests_method.requests_method.RequestsMethod object at 0x12AD33B0>\ncase_url = 'http://120.46.172.186:8080/api/demension/v1/dem/deleteDemByIds', case_method = 'DELETE', case_mime = 'query'\ncase_data = {'ids': '1721372365440434176'}, expect_data = {'message': '删除维度成功', 'state': True}, sql_type = 'select'\nsql_data = 'SELECT ID_ from uc_demension WHERE `CODE_`=\"dem_test57_abc\";', update_key = 'ids'\n\n @pytest.mark.parametrize(\"case_url, case_method, case_mime, case_data, expect_data, sql_type, sql_data, update_key\", ReadExcel(\"BPM\", excel_path=excel_path).get_data())\n def test_bpm(self, db_fix, req_fix, case_url, case_method, case_mime, case_data, expect_data, sql_type, sql_data, update_key):\n # 判断sql语句的类型是否为delete\n if sql_type == \"delete\":\n # 使用DB类对象执行删除的sql语句\n db_fix.delete(sql_data)\n # 使用RequestsMethod类对象发送请求--pass\n # 判断sql语句类型是否为select\n elif sql_type == \"select\":\n # 使用DB类对象执行查询的sql语句,并接收查询的结果\n select_result = db_fix.select(sql_data)\n # 将查询结果更新到用例数据中\n case_data[update_key] = select_result\n # 使用RequestsMethod类对象发送请求--pass\n \n # 判断sql语句的类型是否为select|delete或者为delete|select\n elif sql_type == \"select|delete\" or sql_type == \"delete|select\":\n # 使用DB类对象执行删除的sql语句\n db_fix.delete(sql_data.get(\"delete\"))\n # 使用DB类对象执行查询的sql语句,并接收查询的结果\n select_result = db_fix.select(sql_data.get(\"select\"))\n # 将查询结果更新到用例数据中\n case_data[update_key] = select_result\n \n # 使用RequestsMethod类对象发送请求\n res = req_fix.request_all(req_method=case_method, req_url=case_url, req_mime=case_mime, case_data=case_data)\n \n \n # 断言\n try:\n for key in expect_data:\n assert expect_data[key] == res.json().get(key)\n except:\n log.error(\"断言失败\"+\",用例数据为:\"+str(case_data)+\",期望数据为:\"+str(expect_data)+\",服务器返回的数据为:\"+res.text)\n> raise AssertionError(\"断言失败\")\nE AssertionError: 断言失败\n\nInterfaceAutoTest_2\\test_case\\test_zhangsan\\test_bpm.py:54: AssertionError"}, "attachments": [{"name": "log", "source": "3ba47fd3-b454-42a0-9988-fbc791addb08-attachment.txt", "type": "text/plain"}], "parameters": [{"name": "case_url", "value": "'http://120.46.172.186:8080/api/demension/v1/dem/deleteDemByIds'"}, {"name": "case_method", "value": "'DELETE'"}, {"name": "case_mime", "value": "'query'"}, {"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_`=\"dem_test57_abc\";'"}, {"name": "update_key", "value": "'ids'"}], "start": 1699242128554, "stop": 1699242128648, "uuid": "3f15ba40-a451-47c7-92f9-65067fa04182", "historyId": "caaeb0aed69081813dc56822921f49f2", "testCaseId": "fddf80969464aadbd498677a3a3dd380", "fullName": "InterfaceAutoTest_2.test_case.test_zhangsan.test_bpm.TestBPM#test_bpm", "labels": [{"name": "parentSuite", "value": "InterfaceAutoTest_2.test_case.test_zhangsan"}, {"name": "suite", "value": "test_bpm"}, {"name": "subSuite", "value": "TestBPM"}, {"name": "host", "value": "LAPTOP-TAHSRL94"}, {"name": "thread", "value": "24068-MainThread"}, {"name": "framework", "value": "pytest"}, {"name": "language", "value": "cpython3"}, {"name": "package", "value": "InterfaceAutoTest_2.test_case.test_zhangsan.test_bpm"}]}
\ No newline at end of file
{"name": "test_bpm[http://120.46.172.186:8080/auth-POST-application/json-case_data8-expect_data8-None-None-None]", "status": "passed", "parameters": [{"name": "case_url", "value": "'http://120.46.172.186:8080/auth'"}, {"name": "case_method", "value": "'POST'"}, {"name": "case_mime", "value": "'application/json'"}, {"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": 1699242125415, "stop": 1699242125505, "uuid": "6e78a222-1600-462a-9266-9127d3f7b0ad", "historyId": "29bfe1cdcc22139c525b23325056509d", "testCaseId": "317585064e361b6d13052050b1dc8a9e", "fullName": "InterfaceAutoTest_2.test_case.test_laohuang.test_bpm_laohuang.TestBPM#test_bpm", "labels": [{"name": "parentSuite", "value": "InterfaceAutoTest_2.test_case.test_laohuang"}, {"name": "suite", "value": "test_bpm_laohuang"}, {"name": "subSuite", "value": "TestBPM"}, {"name": "host", "value": "LAPTOP-TAHSRL94"}, {"name": "thread", "value": "24068-MainThread"}, {"name": "framework", "value": "pytest"}, {"name": "language", "value": "cpython3"}, {"name": "package", "value": "InterfaceAutoTest_2.test_case.test_laohuang.test_bpm_laohuang"}]}
\ No newline at end of file
{"uuid": "98883d82-64bf-4094-bd14-6a77076579aa", "befores": [{"name": "case_url", "status": "passed", "start": 1699242124787, "stop": 1699242124787}], "start": 1699242124787, "stop": 1699242124890}
\ No newline at end of file
{"uuid": "2a2b9d2a-e155-41c8-be08-105270cbd2e9", "befores": [{"name": "case_url", "status": "passed", "start": 1699242126152, "stop": 1699242126152}], "start": 1699242126152, "stop": 1699242126213}
\ No newline at end of file
{"uuid": "f0d88e8b-d065-4fa0-93b4-7cbdb4b93c48", "befores": [{"name": "update_key", "status": "passed", "start": 1699242124725, "stop": 1699242124725}], "start": 1699242124725, "stop": 1699242124778}
\ No newline at end of file
{"uuid": "77ec00c6-3a6a-40c2-8cef-8a9298f56c92", "befores": [{"name": "update_key", "status": "passed", "start": 1699242124535, "stop": 1699242124536}], "start": 1699242124535, "stop": 1699242124716}
\ No newline at end of file
{"name": "test_bpm[http://120.46.172.186:8080/api/org/v1/orgParam/saveOrgParams-POST-body|query-case_data14-expect_data14-None-None-None]", "status": "passed", "parameters": [{"name": "case_url", "value": "'http://120.46.172.186:8080/api/org/v1/orgParam/saveOrgParams'"}, {"name": "case_method", "value": "'POST'"}, {"name": "case_mime", "value": "'body|query'"}, {"name": "case_data", "value": "{'query': {'orgCode': 'test_org_57'}, 'body': [{'alias': 'sz', 'value': 9000}]}"}, {"name": "expect_data", "value": "{'state': True, 'message': '保存组织参数成功!'}"}, {"name": "sql_type", "value": "None"}, {"name": "sql_data", "value": "None"}, {"name": "update_key", "value": "None"}], "start": 1699242128423, "stop": 1699242128479, "uuid": "0e813ea2-aa48-45b8-a97e-8fe72f2646a2", "historyId": "10b764822f0760f5356da97ae60f8c98", "testCaseId": "fddf80969464aadbd498677a3a3dd380", "fullName": "InterfaceAutoTest_2.test_case.test_zhangsan.test_bpm.TestBPM#test_bpm", "labels": [{"name": "parentSuite", "value": "InterfaceAutoTest_2.test_case.test_zhangsan"}, {"name": "suite", "value": "test_bpm"}, {"name": "subSuite", "value": "TestBPM"}, {"name": "host", "value": "LAPTOP-TAHSRL94"}, {"name": "thread", "value": "24068-MainThread"}, {"name": "framework", "value": "pytest"}, {"name": "language", "value": "cpython3"}, {"name": "package", "value": "InterfaceAutoTest_2.test_case.test_zhangsan.test_bpm"}]}
\ No newline at end of file
{"uuid": "d687d88f-2055-4c56-9a61-33099c3bd784", "befores": [{"name": "sql_data", "status": "passed", "start": 1699242124725, "stop": 1699242124725}], "start": 1699242124725, "stop": 1699242124779}
\ No newline at end of file
{"uuid": "dcc3f11b-062a-4ccb-b092-4659a4454b97", "befores": [{"name": "case_data", "status": "passed", "start": 1699242127086, "stop": 1699242127086}], "start": 1699242127086, "stop": 1699242127186}
\ No newline at end of file
{"uuid": "cb84ecbf-898c-4948-9d45-1522a58d90ac", "befores": [{"name": "case_url", "status": "passed", "start": 1699242127287, "stop": 1699242127287}], "start": 1699242127287, "stop": 1699242127384}
\ No newline at end of file
{"uuid": "5376724c-06ea-473c-b235-d8d5f369d6f2", "befores": [{"name": "case_url", "status": "passed", "start": 1699242125953, "stop": 1699242125953}], "start": 1699242125953, "stop": 1699242126149}
\ No newline at end of file
{"uuid": "2cf4630c-8380-4329-a5a5-140e66d9e9a7", "befores": [{"name": "update_key", "status": "passed", "start": 1699242124893, "stop": 1699242124893}], "start": 1699242124893, "stop": 1699242124986}
\ No newline at end of file
{"name": "test_bpm[http://120.46.172.186:8080/auth-POST-json-case_data1-expect_data1-None-None-None]", "status": "passed", "parameters": [{"name": "case_url", "value": "'http://120.46.172.186:8080/auth'"}, {"name": "case_method", "value": "'POST'"}, {"name": "case_mime", "value": "'json'"}, {"name": "case_data", "value": "{'password': 'MTIzNDU2', 'username': 'adminadminadminadminadminadmin'}"}, {"name": "expect_data", "value": "{'state': False, 'message': '账号或密码错误'}"}, {"name": "sql_type", "value": "None"}, {"name": "sql_data", "value": "None"}, {"name": "update_key", "value": "None"}], "start": 1699242127018, "stop": 1699242127077, "uuid": "2f00605c-54f5-4f15-840d-a847b1da8335", "historyId": "ac8ea06dfd18e411b1567683937e072f", "testCaseId": "fddf80969464aadbd498677a3a3dd380", "fullName": "InterfaceAutoTest_2.test_case.test_zhangsan.test_bpm.TestBPM#test_bpm", "labels": [{"name": "parentSuite", "value": "InterfaceAutoTest_2.test_case.test_zhangsan"}, {"name": "suite", "value": "test_bpm"}, {"name": "subSuite", "value": "TestBPM"}, {"name": "host", "value": "LAPTOP-TAHSRL94"}, {"name": "thread", "value": "24068-MainThread"}, {"name": "framework", "value": "pytest"}, {"name": "language", "value": "cpython3"}, {"name": "package", "value": "InterfaceAutoTest_2.test_case.test_zhangsan.test_bpm"}]}
\ No newline at end of file
{"uuid": "c85eb7a1-e7eb-4208-b9cb-52f1026b9ee9", "befores": [{"name": "sql_type", "status": "passed", "start": 1699242124788, "stop": 1699242124788}], "start": 1699242124787, "stop": 1699242124886}
\ No newline at end of file
{"uuid": "8069bcdc-74e2-47a5-b8da-ecf8e18dbe0e", "befores": [{"name": "update_key", "status": "passed", "start": 1699242126216, "stop": 1699242126216}], "start": 1699242126216, "stop": 1699242126276}
\ No newline at end of file
{"name": "test_bpm[http://120.46.172.186:8080/auth-POST-application/json-case_data5-expect_data5-None-None-None]", "status": "passed", "parameters": [{"name": "case_url", "value": "'http://120.46.172.186:8080/auth'"}, {"name": "case_method", "value": "'POST'"}, {"name": "case_mime", "value": "'application/json'"}, {"name": "case_data", "value": "{'password': 'MTIzNDU2MTIzNDU2MTIzNDU2MTIzNDU2MTIzNDU2', '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": 1699242127388, "stop": 1699242127478, "uuid": "f36a9425-9193-4099-95d2-2f63857dfbf0", "historyId": "ea99e17c949b7564ef2f407396b447b5", "testCaseId": "fddf80969464aadbd498677a3a3dd380", "fullName": "InterfaceAutoTest_2.test_case.test_zhangsan.test_bpm.TestBPM#test_bpm", "labels": [{"name": "parentSuite", "value": "InterfaceAutoTest_2.test_case.test_zhangsan"}, {"name": "suite", "value": "test_bpm"}, {"name": "subSuite", "value": "TestBPM"}, {"name": "host", "value": "LAPTOP-TAHSRL94"}, {"name": "thread", "value": "24068-MainThread"}, {"name": "framework", "value": "pytest"}, {"name": "language", "value": "cpython3"}, {"name": "package", "value": "InterfaceAutoTest_2.test_case.test_zhangsan.test_bpm"}]}
\ No newline at end of file
{"uuid": "6df9f53b-1e67-4ba3-9e66-c97d08dbe051", "befores": [{"name": "case_method", "status": "passed", "start": 1699242124534, "stop": 1699242124534}], "start": 1699242124534, "stop": 1699242124720}
\ No newline at end of file
{"uuid": "5179ab47-4b62-401b-afd4-a1691fe61502", "befores": [{"name": "sql_type", "status": "passed", "start": 1699242126283, "stop": 1699242126283}], "start": 1699242126283, "stop": 1699242126391}
\ No newline at end of file
{"uuid": "91dfcd6b-21fd-4002-82a7-6f0e15d7cab6", "befores": [{"name": "update_key", "status": "passed", "start": 1699242126152, "stop": 1699242126152}], "start": 1699242126152, "stop": 1699242126209}
\ No newline at end of file
{"name": "test_bpm[http://120.46.172.186:8080/api/demension/v1/dem/getDem-GET-query-case_data12-expect_data12-None-None-None]", "status": "passed", "parameters": [{"name": "case_url", "value": "'http://120.46.172.186:8080/api/demension/v1/dem/getDem'"}, {"name": "case_method", "value": "'GET'"}, {"name": "case_mime", "value": "'query'"}, {"name": "case_data", "value": "{'code': 'dem_test57_abc'}"}, {"name": "expect_data", "value": "{'demCode': 'dem_test57_abc', 'name': '测试57期的维度'}"}, {"name": "sql_type", "value": "None"}, {"name": "sql_data", "value": "None"}, {"name": "update_key", "value": "None"}], "start": 1699242125896, "stop": 1699242125945, "uuid": "91bbcfa5-5549-4e6c-8c17-6e47f8ed5b77", "historyId": "eb912f80dcac05c32f00504310558a51", "testCaseId": "317585064e361b6d13052050b1dc8a9e", "fullName": "InterfaceAutoTest_2.test_case.test_laohuang.test_bpm_laohuang.TestBPM#test_bpm", "labels": [{"name": "parentSuite", "value": "InterfaceAutoTest_2.test_case.test_laohuang"}, {"name": "suite", "value": "test_bpm_laohuang"}, {"name": "subSuite", "value": "TestBPM"}, {"name": "host", "value": "LAPTOP-TAHSRL94"}, {"name": "thread", "value": "24068-MainThread"}, {"name": "framework", "value": "pytest"}, {"name": "language", "value": "cpython3"}, {"name": "package", "value": "InterfaceAutoTest_2.test_case.test_laohuang.test_bpm_laohuang"}]}
\ No newline at end of file
{"uuid": "8af8128a-fd79-4fc6-ac01-3260ffaff15d", "befores": [{"name": "case_url", "status": "passed", "start": 1699242127605, "stop": 1699242127605}], "start": 1699242127605, "stop": 1699242127704}
\ No newline at end of file
{"uuid": "00d02842-b32a-40f8-9428-a3a3dba9118f", "befores": [{"name": "case_url", "status": "passed", "start": 1699242127086, "stop": 1699242127086}], "start": 1699242127086, "stop": 1699242127187}
\ No newline at end of file
{"uuid": "e611000a-7d6e-4d99-ab38-cda68f8f8742", "befores": [{"name": "expect_data", "status": "passed", "start": 1699242127902, "stop": 1699242127902}], "start": 1699242127902, "stop": 1699242128010}
\ No newline at end of file
{"uuid": "2d1b2420-7982-4749-a639-4e30be315456", "befores": [{"name": "case_mime", "status": "passed", "start": 1699242126216, "stop": 1699242126216}], "start": 1699242126216, "stop": 1699242126279}
\ No newline at end of file
{"uuid": "ecf991bd-a2bf-4381-beff-9dd5835a42d8", "befores": [{"name": "update_key", "status": "passed", "start": 1699242125308, "stop": 1699242125308}], "start": 1699242125308, "stop": 1699242125405}
\ No newline at end of file
{"uuid": "d0773609-f578-4789-8af5-5dc0867386b4", "befores": [{"name": "case_data", "status": "passed", "start": 1699242124724, "stop": 1699242124724}], "start": 1699242124724, "stop": 1699242124781}
\ No newline at end of file
{"name": "test_bpm[http://120.46.172.186:8080/auth-POST-application/json-case_data6-expect_data6-None-None-None]", "status": "passed", "parameters": [{"name": "case_url", "value": "'http://120.46.172.186:8080/auth'"}, {"name": "case_method", "value": "'POST'"}, {"name": "case_mime", "value": "'application/json'"}, {"name": "case_data", "value": "{'password': 'm', '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": 1699242125203, "stop": 1699242125295, "uuid": "f084ed43-c929-47bb-8a02-05cea9add22d", "historyId": "d831f91d329741e51801ea9d2214734f", "testCaseId": "317585064e361b6d13052050b1dc8a9e", "fullName": "InterfaceAutoTest_2.test_case.test_laohuang.test_bpm_laohuang.TestBPM#test_bpm", "labels": [{"name": "parentSuite", "value": "InterfaceAutoTest_2.test_case.test_laohuang"}, {"name": "suite", "value": "test_bpm_laohuang"}, {"name": "subSuite", "value": "TestBPM"}, {"name": "host", "value": "LAPTOP-TAHSRL94"}, {"name": "thread", "value": "24068-MainThread"}, {"name": "framework", "value": "pytest"}, {"name": "language", "value": "cpython3"}, {"name": "package", "value": "InterfaceAutoTest_2.test_case.test_laohuang.test_bpm_laohuang"}]}
\ No newline at end of file
{"uuid": "bfe07c7a-6461-483d-8a78-32a88d827a5a", "befores": [{"name": "case_mime", "status": "passed", "start": 1699242125513, "stop": 1699242125513}], "start": 1699242125513, "stop": 1699242125606}
\ No newline at end of file
{"uuid": "2db6c597-fbcf-4fae-ae68-dd1289583032", "befores": [{"name": "sql_data", "status": "passed", "start": 1699242125743, "stop": 1699242125743}], "start": 1699242125743, "stop": 1699242125888}
\ No newline at end of file
2023-11-04 10:18:17,089 - read_ini.py[line:63] - ERROR: 输入sql节点下的key值错误,请查看配置文件 - test
2023-11-04 16:07:38,149 - read_ini.py[line:31] - ERROR: 输入file节点下的key值错误,请查看配置文件 - test
2023-11-04 16:08:40,177 - read_json.py[line:25] - ERROR: 打开json文件获取json文件打的内容序列化为python对象失败,请查看json文件 是否有错误 - test
2023-11-04 16:14:27,935 - read_json.py[line:25] - ERROR: 打开json文件获取json文件打的内容序列化为python对象失败,请查看json文件 是否有错误 - test
2023-11-04 16:18:13,364 - read_json.py[line:25] - ERROR: 打开json文件获取json文件打的内容序列化为python对象失败,请查看json文件是否有错误 - test
2023-11-04 16:22:19,328 - read_excel.py[line:98] - ERROR: 请查看是否配置了期望数据 - test
# -*-coding:utf-8 -*- #
# ---------------------------------------------------------------------------
# ProjectName: 框架
# FileName: __init__.py
# Author: xxxxxxx
# Datetime: 2023/11/4 9:42
# Description:
# 命名规范:文件名全小写+下划线,类名大驼峰,方法和变量小写+下划线连接,
# 常量大写,变量和常量用名词,方法用动词
# ---------------------------------------------------------------------------
# -*-coding:utf-8 -*- #
# ---------------------------------------------------------------------------
# ProjectName: test_57
# FileName: requests_method.py
# Author: xxxxxxx
# Datetime: 2023/11/3 15:24
# Description:
#
# ---------------------------------------------------------------------------
import base64
import logging
import requests
from InterfaceAutoTest.common import log
from InterfaceAutoTest.common.read_ini import ReadIni
from InterfaceAutoTest.data_config.settings import *
class RequestsMethod:
def __init__(self):
"""关联被测系统的登录状态"""
login_url = ReadIni().get_host(URL_HOST_CUSTOM) + "/auth"
login_data = {"username": "admin", "password": base64.b64encode("123456".encode()).decode()}
self.bpm_session = requests.sessions.Session()
self.bpm_session.headers.update({"Authorization": "Bearer "+self.bpm_session.post(url=login_url, json=login_data).json().get("token")})
def request_all(self, req_method, req_url, req_mime=None, case_data=None):
"""封装公共的请求方法"""
if req_mime == "json" or req_mime == "application/json":
return self.bpm_session.request(method=req_method, url=req_url, json=case_data)
elif req_mime == "x-www-form-urlencoded" or req_mime == "application/x-www-form-urlencoded":
return self.bpm_session.request(method=req_method, url=req_url, data=case_data)
elif req_mime == "form-data" or req_mime == "multipart/form-data":
return self.bpm_session.request(method=req_method, url=req_url, files=case_data)
elif req_mime == "query" or req_mime == "params" or req_mime == "param":
return self.bpm_session.request(method=req_method, url=req_url, params=case_data)
elif req_mime is None:
return self.bpm_session.request(method=req_method, url=req_url)
# 判断媒体类型是否为query|body 或者 body|query 、json|query、query|json
elif req_mime == "query|body" or req_mime == "body|query" or req_mime == "json|query" or req_mime == "query|json":
return self.bpm_session.request(method=req_method, url=req_url, params=case_data["query"], json=case_data["body"])
else:
log.error("传入的媒体类型的值错误,请察看excel中是否填入正确")
raise NameError("传入的媒体类型的值错误,请察看excel中是否填入正确")
\ No newline at end of file
# -*-coding:utf-8 -*- #
# ---------------------------------------------------------------------------
# ProjectName: 框架
# FileName: __init__.py
# Author: xxxxxxx
# Datetime: 2023/11/4 9:41
# Description:
# 命名规范:文件名全小写+下划线,类名大驼峰,方法和变量小写+下划线连接,
# 常量大写,变量和常量用名词,方法用动词
# ---------------------------------------------------------------------------
++ "b/InterfaceAutoTest_2/test_case/report/log/bpm_\346\216\245\345\217\243\350\207\252\345\212\250\345\214\226\346\241\206\346\236\266\346\234\200\346\226\260\350\277\220\350\241\214\346\227\245\345\277\227.log"
# -*-coding:utf-8 -*- #
# ---------------------------------------------------------------------------
# ProjectName: test_57
# FileName: __init__.py
# Author: xxxxxxx
# Datetime: 2023/11/3 17:37
# Description:
#
# ---------------------------------------------------------------------------
# -*-coding:utf-8 -*- #
# ---------------------------------------------------------------------------
# ProjectName: test_57
# FileName: conftest.py
# Author: xxxxxxx
# Datetime: 2023/11/3 15:33
# Description:
#
# ---------------------------------------------------------------------------
import pytest
from InterfaceAutoTest.common.db import DB
from InterfaceAutoTest.requests_method.requests_method import RequestsMethod
@pytest.fixture(scope="session")
def req_fix():
req = RequestsMethod()
yield req
@pytest.fixture(scope="session")
def db_fix():
db = DB()
yield db
db.close()
# 黄总定义的自定义固件,请勿乱动=================start=========>
# <====================================================end
# -*-coding:utf-8 -*- #
# ---------------------------------------------------------------------------
# ProjectName: test_57
# FileName: test_bpm.py
# Author: xxxxxxx
# Datetime: 2023/11/3 15:33
# Description:
#
# ---------------------------------------------------------------------------
import pytest
from InterfaceAutoTest.common import log
from InterfaceAutoTest.common.read_excel import ReadExcel
class TestBPM:
@pytest.mark.parametrize("case_url, case_method, case_mime, case_data, expect_data, sql_type, sql_data, update_key", ReadExcel("BPM-laohuang").get_data())
def test_bpm(self, db_fix, req_fix, case_url, case_method, case_mime, case_data, expect_data, sql_type, sql_data, update_key):
# 判断sql语句的类型是否为delete
if sql_type == "delete":
# 使用DB类对象执行删除的sql语句
db_fix.delete(sql_data)
# 使用RequestsMethod类对象发送请求--pass
# 判断sql语句类型是否为select
elif sql_type == "select":
# 使用DB类对象执行查询的sql语句,并接收查询的结果
select_result = db_fix.select(sql_data)
# 将查询结果更新到用例数据中
case_data[update_key] = select_result
# 使用RequestsMethod类对象发送请求--pass
# 判断sql语句的类型是否为select|delete或者为delete|select
elif sql_type == "select|delete" or sql_type == "delete|select":
# 使用DB类对象执行删除的sql语句
db_fix.delete(sql_data.get("delete"))
# 使用DB类对象执行查询的sql语句,并接收查询的结果
select_result = db_fix.select(sql_data.get("select"))
# 将查询结果更新到用例数据中
case_data[update_key] = select_result
# 使用RequestsMethod类对象发送请求
res = req_fix.request_all(req_method=case_method, req_url=case_url, req_mime=case_mime, case_data=case_data)
# 断言
try:
for key in expect_data:
assert expect_data[key] == res.json().get(key)
except:
log.error("断言失败"+",用例数据为:"+str(case_data)+",期望数据为:"+str(expect_data)+",服务器返回的数据为:"+res.text)
raise AssertionError("断言失败")
if __name__ == '__main__':
pytest.main()
\ No newline at end of file
# -*-coding:utf-8 -*- #
# ---------------------------------------------------------------------------
# ProjectName: test_57
# FileName: __init__.py
# Author: xxxxxxx
# Datetime: 2023/11/3 14:01
# Description:
#
# ---------------------------------------------------------------------------
# -*-coding:utf-8 -*- #
# ---------------------------------------------------------------------------
# ProjectName: test_57
# FileName: test_pytest_func.py
# Author: xxxxxxx
# Datetime: 2023/11/3 9:36
# Description:
#
# ---------------------------------------------------------------------------
import base64
import random
import pytest
import requests
"""
pytest装饰器:
1:@pytest.fixture(scope="指定自定义固件的级别", autouse=False, params=可迭代类型):实现自定义固件
2:@pytest.mark.parametrize("字符串", 可迭代类型): 实现用例的参数化
3: 下载插件,插件为:pytest-dependency, 下载方式为:pip install pytest-dependency
插件:pytest-dependency的功能为实现用例之间的依赖。
使用流程:
先使用装饰器@pytest.mark.dependency()标记依赖的用例
再使用装饰器@pytest.mark.dependency(depends=["用例的名称"])管理依赖的用例,也可以标记用例被后面的用例依赖
4: @pytest.mark.标签名:功能给用例打上标签,在终端运行的时候,使用的命令为:pytest -vs 用例py文件 -m="标签名"
5: @pytest.mark.run(order=num): num为整形,数字越小越先执行。但是需要下载插件,插件为:pip install pytest-ordering
6:@pytest.mark.usefixtures("自定义固件名称"):实现自定义固件的调用
7: @pytest.mark.skip(reason="无条件跳过"): 让用例无条件跳过
8: @pytest.mark.skipif(bool, reason="有条件跳过"):如果bool表达式为True,用例有条件跳过
9:@pytest.mark.xfail(reason="预期失败")
"""
dict1 = {}
class Test01:
def setup_class(self):
login_url = "http://120.46.172.186:8080/auth"
# 配置登录数据
login_data = {"username": "admin", "password": base64.b64encode("123456".encode()).decode()}
self.bpm_sess = requests.sessions.Session()
self.token = self.bpm_sess.post(login_url, json=login_data).json().get("token")
self.bpm_sess.headers.update({"Authorization": "Bearer "+self.token})
@pytest.mark.dependency()
def test1(self):
print("用例1")
# 实现登录,获取服务器返回的token
login_url = "http://120.46.172.186:8080/auth"
# 配置登录数据
login_data = {"username": "admin", "password": base64.b64encode("123456".encode()).decode()}
res = self.bpm_sess.post(url=login_url, json=login_data)
print(res.text)
assert "超级管理员" == res.json().get("username")
@pytest.mark.dependency(depends=["Test01::test1"])
def test2(self):
print("添加维度用例")
add_dem_url = "http://120.46.172.186:8080/api/demension/v1/dem/addDem"
add_dem_data = {
"code": "addDem"+str(random.randrange(1, 100)),
"description": "addDem",
"isDefault": 0,
"name": "addDem"
}
res = self.bpm_sess.request(method="post", url=add_dem_url, json=add_dem_data)
print(res.text)
assert "添加维度成功" in res.text
@pytest.mark.dependency(depends=["test1", "test2"])
def test3(self):
print("用例3")
'''
@pytest.mark.run(order=4)
@pytest.mark.p1
def test1():
print("用例1")
@pytest.mark.dependency(depends=["test4"])
@pytest.mark.run(order=2)
@pytest.mark.p0
def test2():
print("用例2")
@pytest.mark.run(order=3)
@pytest.mark.p0
def test3():
print("用例3")
@pytest.mark.dependency()
@pytest.mark.run(order=1)
@pytest.mark.p1
def test4():
print("用例4")
assert 1 == 2
'''
'''
def test1():
print("用例1")
@pytest.mark.skip(reason="无条件跳过")
def test2():
print("用例2")
@pytest.mark.skipif(1 == 2, reason="无条件跳过")
def test3():
print("用例2")
@pytest.mark.xfail(reason="预期失败")
def test4():
print("预期失败")
assert 1 == 3
'''
if __name__ == '__main__':
pytest.main()
\ No newline at end of file
# -*-coding:utf-8 -*- #
# ---------------------------------------------------------------------------
# ProjectName: test_57
# FileName: __init__.py
# Author: xxxxxxx
# Datetime: 2023/11/3 17:38
# Description:
#
# ---------------------------------------------------------------------------
# -*-coding:utf-8 -*- #
# ---------------------------------------------------------------------------
# ProjectName: test_57
# FileName: conftest.py
# Author: xxxxxxx
# Datetime: 2023/11/3 15:33
# Description:
#
# ---------------------------------------------------------------------------
import pytest
from InterfaceAutoTest.common.db import DB
from InterfaceAutoTest.requests_method.requests_method import RequestsMethod
@pytest.fixture(scope="session")
def req_fix():
req = RequestsMethod()
yield req
@pytest.fixture(scope="session")
def db_fix():
db = DB()
yield db
db.close()
# 黄总定义的自定义固件,请勿乱动=================start=========>
# <====================================================end
# -*-coding:utf-8 -*- #
# ---------------------------------------------------------------------------
# ProjectName: test_57
# FileName: test_bpm.py
# Author: xxxxxxx
# Datetime: 2023/11/3 15:33
# Description:
#
# ---------------------------------------------------------------------------
import pytest
from InterfaceAutoTest.common import log
from InterfaceAutoTest.common.read_excel import ReadExcel
from InterfaceAutoTest.common.read_ini import ReadIni
excel_path = ReadIni().get_file_path("excel")
class TestBPM:
@pytest.mark.parametrize("case_url, case_method, case_mime, case_data, expect_data, sql_type, sql_data, update_key", ReadExcel("BPM", excel_path=excel_path).get_data())
def test_bpm(self, db_fix, req_fix, case_url, case_method, case_mime, case_data, expect_data, sql_type, sql_data, update_key):
# 判断sql语句的类型是否为delete
if sql_type == "delete":
# 使用DB类对象执行删除的sql语句
db_fix.delete(sql_data)
# 使用RequestsMethod类对象发送请求--pass
# 判断sql语句类型是否为select
elif sql_type == "select":
# 使用DB类对象执行查询的sql语句,并接收查询的结果
select_result = db_fix.select(sql_data)
# 将查询结果更新到用例数据中
case_data[update_key] = select_result
# 使用RequestsMethod类对象发送请求--pass
# 判断sql语句的类型是否为select|delete或者为delete|select
elif sql_type == "select|delete" or sql_type == "delete|select":
# 使用DB类对象执行删除的sql语句
db_fix.delete(sql_data.get("delete"))
# 使用DB类对象执行查询的sql语句,并接收查询的结果
select_result = db_fix.select(sql_data.get("select"))
# 将查询结果更新到用例数据中
case_data[update_key] = select_result
# 使用RequestsMethod类对象发送请求
res = req_fix.request_all(req_method=case_method, req_url=case_url, req_mime=case_mime, case_data=case_data)
# 断言
try:
for key in expect_data:
assert expect_data[key] == res.json().get(key)
except:
log.error("断言失败"+",用例数据为:"+str(case_data)+",期望数据为:"+str(expect_data)+",服务器返回的数据为:"+res.text)
raise AssertionError("断言失败")
if __name__ == '__main__':
pytest.main()
\ No newline at end of file
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