Commit 1f2a4e27 by liulei

第二次提交测试程序

parent 4984fa6d
# -*-coding:utf-8 -*- #
# ---------------------------------------------------------------------------
# ProjectName: pythonProject
# FileName: __init__.py
# Author: liulei
# Datetime: 2024/7/15 10:30
# Description:
#
# ---------------------------------------------------------------------------
# -*-coding:utf-8 -*- #
# ---------------------------------------------------------------------------
# ProjectName: pythonProject
# FileName: db.py
# Author: liulei
# Datetime: 2024/7/15 9:04
# Description:
#
# ---------------------------------------------------------------------------
import pymysql
from APIAutoTest_V2_1.commen.read_ini import ReadIni
class DB:
def __init__(self):
ini = ReadIni()
try:
self.conn = pymysql.connect(
host=ini.get_database_connect_msg("host"),
port=int(ini.get_database_connect_msg("port")),
user=ini.get_database_connect_msg("user"),
password=ini.get_database_connect_msg("pwd"),
database=ini.get_database_connect_msg("database"),
charset="utf8"
)
except Exception as e:
print("连接数据库出现错误")
raise e
else:
# 建立游标对象
self.cur = self.conn.cursor()
def close(self):
# 关闭游标对象
self.cur.close()
# 关闭数据库连接
self.conn.close()
def delete(self, sql_sentence):
"""执行删除的sql语句"""
try:
self.cur.execute(sql_sentence)
except Exception as e:
print("执行删除语句时出现错误")
raise e
else:
self.conn.commit()
def select(self, sql_sentence):
"""执行查询的sql语句"""
try:
self.cur.execute(sql_sentence)
except Exception as e:
print("执行查询的sql语句时出现错误")
raise e
else:
result = self.cur.fetchall()
if result:
return result[0][0]
\ No newline at end of file
# -*-coding:utf-8 -*- #
# ---------------------------------------------------------------------------
# ProjectName: pythonProject
# FileName: read_ini.py
# Author: liulei
# Datetime: 2024/7/13 20:19
# Description:
#
# ---------------------------------------------------------------------------
import openpyxl
from APIAutoTest_V2_1.commen.read_ini import ReadIni
from APIAutoTest_V2_1.commen.read_json import ReadJson
class ReadExcel:
def __init__(self):
# 获取excel文件的路径和工作表
self.RI = ReadIni()
excel_path = self.RI.get_file("excel")
table_name = self.RI.get_table("table")
# 创建openpyxl对象
wb = openpyxl.load_workbook(excel_path)
self.ws = wb[table_name]
def __get_value_cell(self, column, row):
"""配置一个对象内部使用的获取单元格值的方法"""
Value = self.ws[column + str(row)].value
if Value:
if Value.strip():
return Value.strip()
else:
return None
else:
return None
def get_module_name(self, row):
"""获取模块名称"""
try:
module_name = self.__get_value_cell("B", row)
except Exception as e:
print("获取模块名称时出现错误,错误为:")
raise e
else:
if module_name is None:
return None
else:
return module_name
def get_API_name(self, row):
"""获取接口名称"""
try:
API_name = self.__get_value_cell("C", row)
except Exception as e:
print("获取接口名称时出现错误,错误为:")
raise e
else:
if API_name is None:
return None
else:
return API_name
def get_case_title(self, row):
"""获取用例标题"""
try:
case_title = self.__get_value_cell("D", row)
except Exception as e:
print("获取用例标题时出现错误,错误为:")
raise e
else:
return case_title
def get_request_method(self, row):
"""获取请求方法"""
try:
request_method = self.__get_value_cell("F", row)
except Exception as e:
print("获取请求方法时出现错误,错误为:")
raise e
else:
return request_method
def get_request_path(self, row):
"""获取请求路径"""
try:
path = self.__get_value_cell("G", row)
except Exception as e:
print("获取请求路径时出现错误,错误为:")
raise e
else:
try:
host = self.RI.get_url("test_host")
except Exception as E:
print("在获取请求路径时,读取被测系统域名时出现错误,错误为:")
raise E
else:
if path is None:
return host
else:
return host + path
def get_mime(self, row):
"""获取媒体类型"""
try:
mime = self.__get_value_cell("H", row)
except Exception as e:
print("在获取媒体类型时出现错误,错误为:")
raise e
else:
return mime
def get_case_data(self, row):
"""获取用例数据"""
try:
case_data = self.__get_value_cell("I", row)
except Exception as e:
print("在excel中读取用例数据时出现错误,错误为:")
raise e
else:
if self.get_module_name(row) is None or self.get_API_name(row) is None or case_data is None:
return None
else:
try:
json_data = ReadJson("case")[self.get_module_name(row)][self.get_API_name(row)][case_data]
except KeyError as k:
print("读取该条json数据时出现错误,case_data为:", case_data)
print("获取json中的用例数据时,找不到对应的数据,错误为:")
raise k
else:
return json_data
def get_expect_data(self, row):
"""获取期望数据"""
try:
expect_data = self.__get_value_cell("J", row)
except Exception as e:
print("在excel中读取期望数据时出现错误,错误为:")
raise e
else:
try:
if self.get_module_name(row) is None or self.get_API_name(row) is None:
return None
else:
json_data = ReadJson("expect")[self.get_module_name(row)][self.get_API_name(row)][expect_data]
except Exception as e:
print("根据excel中的用例数据去读取json文件中的数据时出现错误,错误为:")
raise e
else:
return json_data
def get_sql_type(self, row):
"""根据key获取sql语句类型"""
sql_type = self.__get_value_cell("K", row)
if sql_type:
print("读取excel中获取到的语句类型为:", sql_type)
return sql_type
def get_sql_data(self, row):
"""根据key读取sql语句"""
sql_data_key = self.__get_value_cell("L", row)
if sql_data_key:
module_name = self.get_module_name(row)
API_name = self.get_API_name(row)
sql_data = ReadJson("sql")[module_name][API_name][sql_data_key]
return sql_data
def get_updatekey(self, row):
"""获取更新的key"""
update_key = self.__get_value_cell("M", row)
if update_key:
return update_key
def get_data_all(self):
"""将用例数据装进一个二维列表里面"""
data_list = []
try:
for row in range(2, self.ws.max_row+1):
list1 = [self.get_request_method(row), self.get_request_path(row), self.get_mime(row), self.get_case_data(row), self.get_expect_data(row), self.get_sql_type(row), self.get_sql_data(row), self.get_updatekey(row)]
if self.get_module_name(row) is not None and self.get_API_name(row) is not None:
data_list.append(list1)
else:
continue
except Exception as e:
print("获取所有用例数据时出现错误,错误为:")
raise e
else:
return data_list
if __name__ == "__main__":
RE = ReadExcel()
list2 = RE.get_data_all()
for i in range(len(list2)):
print(i+1, end=' ')
print(list2[i])
print("="*140)
#
# s1 = " "
# print(s1.strip())
# if s1.strip():
# print("hello")
# -*-coding:utf-8 -*- #
# ---------------------------------------------------------------------------
# ProjectName: pythonProject
# FileName: read_ini.py
# Author: liulei
# Datetime: 2024/7/13 20:19
# Description:
#
# ---------------------------------------------------------------------------
import configparser
import os
class ReadIni:
def __init__(self):
# 获取配置文件的路径
self.config_path = os.path.dirname(os.path.dirname(__file__)) + r"\data_config\\"
# 创建configparser对象
self.conf = configparser.ConfigParser()
self.conf.read(self.config_path + r"\config.ini", encoding='utf-8')
def get_file(self, key):
"""根据key获取文件的路径"""
try:
path = self.config_path + self.conf.get("file", key)
except Exception as e:
print("获取文件的路径时出现错误,错误为:")
raise e
else:
return path
def get_url(self, key):
"""根据key获取被测系统的域名"""
try:
host = self.conf.get("host", key)
except Exception as e:
print("获取被测系统域名时出现错误,错误为:")
raise e
else:
return host
def get_table(self, key):
"""根据key获取excel的工作表"""
try:
table = self.conf.get("table_name", key)
except Exception as e:
print("获取工作表名称时出现错误,错误为:")
raise e
else:
return table
def get_database_connect_msg(self, key):
"""根据key获取数据库的连接信息"""
try:
msg = self.conf.get("sql", key)
except Exception as e:
print("获取数据库连接信息时出现错误,错误为:")
raise e
else:
return msg
if __name__ == "__main__":
RI = ReadIni()
# -*-coding:utf-8 -*- #
# ---------------------------------------------------------------------------
# ProjectName: pythonProject
# FileName: read_ini.py
# Author: liulei
# Datetime: 2024/7/13 20:19
# Description:
#
# ---------------------------------------------------------------------------
import json
from APIAutoTest_V2_1.commen.read_ini import ReadIni
def ReadJson(key):
"""获取json文件的路径"""
read_ini = ReadIni()
json_path = read_ini.get_file(key)
# 根据传入的key决定取哪个json文件的数据
try:
with open(json_path, 'r', encoding='utf-8') as f:
json_data = json.loads(f.read())
except Exception as e:
print("获取json文件数据时出现错误,错误为:")
raise e
else:
return json_data
{
"认证接口":{
"登录系统":{
"LoginSuccess":{"username":"admin","password":"F4/DVgPS/NEruLxVVRqHktsb1R2fVpw81t5VuGfFjwp0G7U4k6spHPr/ejPlw8XxIVilJ+SyIH0G5FbQStFEd/94mmI7+2Dw2c7MXXIERYKjd3XNe4gZR4ANJclCJHNGfE+mtnX5voprYwEo9m6ponCdmmXTMx9cWVEJ4K/nbR8="},
"LoginFailUsernameIsNone":{"username":"","password":"F4/DVgPS/NEruLxVVRqHktsb1R2fVpw81t5VuGfFjwp0G7U4k6spHPr/ejPlw8XxIVilJ+SyIH0G5FbQStFEd/94mmI7+2Dw2c7MXXIERYKjd3XNe4gZR4ANJclCJHNGfE+mtnX5voprYwEo9m6ponCdmmXTMx9cWVEJ4K/nbR8="},
"LoginFailUsernameIsShort":{"username":"a","password":"F4/DVgPS/NEruLxVVRqHktsb1R2fVpw81t5VuGfFjwp0G7U4k6spHPr/ejPlw8XxIVilJ+SyIH0G5FbQStFEd/94mmI7+2Dw2c7MXXIERYKjd3XNe4gZR4ANJclCJHNGfE+mtnX5voprYwEo9m6ponCdmmXTMx9cWVEJ4K/nbR8="},
"LoginFailUsernameIsLong":{"username":"adminadminadminadminadminadminadminadminadminadminadminadminadminadminadminadminadminadminadminadminadminadmin","password":"F4/DVgPS/NEruLxVVRqHktsb1R2fVpw81t5VuGfFjwp0G7U4k6spHPr/ejPlw8XxIVilJ+SyIH0G5FbQStFEd/94mmI7+2Dw2c7MXXIERYKjd3XNe4gZR4ANJclCJHNGfE+mtnX5voprYwEo9m6ponCdmmXTMx9cWVEJ4K/nbR8="},
"LoginFailUsernameIsSpecial":{"username":"♡♣♤♥♦♧♨♩ε","password":"F4/DVgPS/NEruLxVVRqHktsb1R2fVpw81t5VuGfFjwp0G7U4k6spHPr/ejPlw8XxIVilJ+SyIH0G5FbQStFEd/94mmI7+2Dw2c7MXXIERYKjd3XNe4gZR4ANJclCJHNGfE+mtnX5voprYwEo9m6ponCdmmXTMx9cWVEJ4K/nbR8="},
"LoginFailPwdIsNone":{"username":"admin","password":""},
"LoginFailPwdIsShort":{"username":"admin","password":"1"},
"LoginFailPwdIsLong":{"username":"admin","password":"F4/DVgPS/NEruLxVVRqHktsb1R2fVpw81t5VuGfFjwp0G7U4k6spHPr/ejPlw8XxIVilJ+SyIH0G5FbQStFEd/94mmI7+2Dw2c7MXXIERYKjd3XNe4gZR4ANJclCJHNGfE+mtnX5voprYwEo9m6ponCdmmXTMx9cWVEJ4K/nbR8=F4/DVgPS/NEruLxVVRqHktsb1R2fVpw81t5VuGfFjwp0G7U4k6spHPr/ejPlw8XxIVilJ+SyIH0G5FbQStFEd/94mmI7+2Dw2c7MXXIERYKjd3XNe4gZR4ANJclCJHNGfE+mtnX5voprYwEo9m6ponCdmmXTMx9cWVEJ4K/nbR8="}
}
},
"维度管理": {
"添加维度": {
"AddDemSuccess": {"code": "test_dem_xyz_123","description": "测试维度","isDefault": 0, "name": "xyz测试维度"}
},
"设置默认维度": {
"SetDefaultDemSuccess": {"code": "test_dem_xyz_123"}
},
"根据维度编码删除维度": {
"DeleteDemSuccess": {"ids": "需要更新"}
}
}
}
\ No newline at end of file
[节点名称]
键=值
# 配置数据层中文件的节点
[file]
# 用例管理文件
excel=APIAutoTest.xlsx
# 用例数据文件
case=case_data.json
# 期望数据文件
expect=expect.json
# sql语句文件
sql=sql_data.json
# 配置被测系统的域名
[host]
test_host=http://36.139.193.99:8088
# 配置excel中工作表的名称
[table_name]
table=BPM
[sql]
host=36.139.193.99
port=3306
user=root
pwd=Rhrc@2024
database=eip8
\ No newline at end of file
{
"认证接口":{
"登录系统":{
"LoginSuccess": {"username":"超级管理员","account":"admin","userId":"1","expiration":86400},
"LoginFailUsernameIsNone":{"state":false,"message":"账户错误或该租户未启用"},
"LoginFailUsernameIsShort":{"state":false,"message":"账户错误或该租户未启用"},
"LoginFailUsernameIsLong":{"state":false,"message":"账户错误或该租户未启用"},
"LoginFailUsernameIsSpecial":{"state":false,"message":"账户错误或该租户未启用"},
"LoginFailPwdIsNone":{"state":false,"message":"账户错误或该租户未启用"},
"LoginFailPwdIsShort":{"state":false,"message":"账户错误或该租户未启用"},
"LoginFailPwdIsLong":{"state":false,"message":"账户错误或该租户未启用"}
},
"刷新token": {
"RefreshSuccess": {"message": "刷新成功"}
}
},
"维度管理": {
"添加维度": {
"AddDemSuccess": {"message": "添加维度成功!"}
},
"设置默认维度": {
"SetDefaultDemSuccess": {"message": "设置默认维度成功!"}
},
"根据维度编码删除维度": {
"DeleteDemSuccess": {"message": "删除维度成功"}
}
}
}
\ No newline at end of file
{
"维度管理": {
"添加维度": {
"AddDemSuccess": "DELETE FROM uc_demension WHERE `CODE_`=\"test_dem_xyz_123\";"
},
"根据维度编码删除维度": {
"DeleteDemSuccess": "SELECT ID_ FROM uc_demension WHERE `CODE_`=\"test_dem_xyz_123\";"
}
}
}
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8"/>
<title id="head-title">bpm_report.html</title>
<style type="text/css">body {
font-family: Helvetica, Arial, sans-serif;
font-size: 12px;
/* do not increase min-width as some may use split screens */
min-width: 800px;
color: #999;
}
h1 {
font-size: 24px;
color: black;
}
h2 {
font-size: 16px;
color: black;
}
p {
color: black;
}
a {
color: #999;
}
table {
border-collapse: collapse;
}
/******************************
* SUMMARY INFORMATION
******************************/
#environment td {
padding: 5px;
border: 1px solid #e6e6e6;
vertical-align: top;
}
#environment tr:nth-child(odd) {
background-color: #f6f6f6;
}
#environment ul {
margin: 0;
padding: 0 20px;
}
/******************************
* TEST RESULT COLORS
******************************/
span.passed,
.passed .col-result {
color: green;
}
span.skipped,
span.xfailed,
span.rerun,
.skipped .col-result,
.xfailed .col-result,
.rerun .col-result {
color: orange;
}
span.error,
span.failed,
span.xpassed,
.error .col-result,
.failed .col-result,
.xpassed .col-result {
color: red;
}
.col-links__extra {
margin-right: 3px;
}
/******************************
* RESULTS TABLE
*
* 1. Table Layout
* 2. Extra
* 3. Sorting items
*
******************************/
/*------------------
* 1. Table Layout
*------------------*/
#results-table {
border: 1px solid #e6e6e6;
color: #999;
font-size: 12px;
width: 100%;
}
#results-table th,
#results-table td {
padding: 5px;
border: 1px solid #e6e6e6;
text-align: left;
}
#results-table th {
font-weight: bold;
}
/*------------------
* 2. Extra
*------------------*/
.logwrapper {
max-height: 230px;
overflow-y: scroll;
background-color: #e6e6e6;
}
.logwrapper.expanded {
max-height: none;
}
.logwrapper.expanded .logexpander:after {
content: "collapse [-]";
}
.logwrapper .logexpander {
z-index: 1;
position: sticky;
top: 10px;
width: max-content;
border: 1px solid;
border-radius: 3px;
padding: 5px 7px;
margin: 10px 0 10px calc(100% - 80px);
cursor: pointer;
background-color: #e6e6e6;
}
.logwrapper .logexpander:after {
content: "expand [+]";
}
.logwrapper .logexpander:hover {
color: #000;
border-color: #000;
}
.logwrapper .log {
min-height: 40px;
position: relative;
top: -50px;
height: calc(100% + 50px);
border: 1px solid #e6e6e6;
color: black;
display: block;
font-family: "Courier New", Courier, monospace;
padding: 5px;
padding-right: 80px;
white-space: pre-wrap;
}
div.media {
border: 1px solid #e6e6e6;
float: right;
height: 240px;
margin: 0 5px;
overflow: hidden;
width: 320px;
}
.media-container {
display: grid;
grid-template-columns: 25px auto 25px;
align-items: center;
flex: 1 1;
overflow: hidden;
height: 200px;
}
.media-container--fullscreen {
grid-template-columns: 0px auto 0px;
}
.media-container__nav--right,
.media-container__nav--left {
text-align: center;
cursor: pointer;
}
.media-container__viewport {
cursor: pointer;
text-align: center;
height: inherit;
}
.media-container__viewport img,
.media-container__viewport video {
object-fit: cover;
width: 100%;
max-height: 100%;
}
.media__name,
.media__counter {
display: flex;
flex-direction: row;
justify-content: space-around;
flex: 0 0 25px;
align-items: center;
}
.collapsible td:not(.col-links) {
cursor: pointer;
}
.collapsible td:not(.col-links):hover::after {
color: #bbb;
font-style: italic;
cursor: pointer;
}
.col-result {
width: 130px;
}
.col-result:hover::after {
content: " (hide details)";
}
.col-result.collapsed:hover::after {
content: " (show details)";
}
#environment-header h2:hover::after {
content: " (hide details)";
color: #bbb;
font-style: italic;
cursor: pointer;
font-size: 12px;
}
#environment-header.collapsed h2:hover::after {
content: " (show details)";
color: #bbb;
font-style: italic;
cursor: pointer;
font-size: 12px;
}
/*------------------
* 3. Sorting items
*------------------*/
.sortable {
cursor: pointer;
}
.sortable.desc:after {
content: " ";
position: relative;
left: 5px;
bottom: -12.5px;
border: 10px solid #4caf50;
border-bottom: 0;
border-left-color: transparent;
border-right-color: transparent;
}
.sortable.asc:after {
content: " ";
position: relative;
left: 5px;
bottom: 12.5px;
border: 10px solid #4caf50;
border-top: 0;
border-left-color: transparent;
border-right-color: transparent;
}
.hidden, .summary__reload__button.hidden {
display: none;
}
.summary__data {
flex: 0 0 550px;
}
.summary__reload {
flex: 1 1;
display: flex;
justify-content: center;
}
.summary__reload__button {
flex: 0 0 300px;
display: flex;
color: white;
font-weight: bold;
background-color: #4caf50;
text-align: center;
justify-content: center;
align-items: center;
border-radius: 3px;
cursor: pointer;
}
.summary__reload__button:hover {
background-color: #46a049;
}
.summary__spacer {
flex: 0 0 550px;
}
.controls {
display: flex;
justify-content: space-between;
}
.filters,
.collapse {
display: flex;
align-items: center;
}
.filters button,
.collapse button {
color: #999;
border: none;
background: none;
cursor: pointer;
text-decoration: underline;
}
.filters button:hover,
.collapse button:hover {
color: #ccc;
}
.filter__label {
margin-right: 10px;
}
</style>
</head>
<body>
<h1 id="title">bpm_report.html</h1>
<p>Report generated on 16-Jul-2024 at 08:58:15 by <a href="https://pypi.python.org/pypi/pytest-html">pytest-html</a>
v4.1.1</p>
<div id="environment-header">
<h2>Environment</h2>
</div>
<table id="environment"></table>
<!-- TEMPLATES -->
<template id="template_environment_row">
<tr>
<td></td>
<td></td>
</tr>
</template>
<template id="template_results-table__body--empty">
<tbody class="results-table-row">
<tr id="not-found-message">
<td colspan="4">No results found. Check the filters.</th>
</tr>
</template>
<template id="template_results-table__tbody">
<tbody class="results-table-row">
<tr class="collapsible">
</tr>
<tr class="extras-row">
<td class="extra" colspan="4">
<div class="extraHTML"></div>
<div class="media">
<div class="media-container">
<div class="media-container__nav--left"><</div>
<div class="media-container__viewport">
<img src="" />
<video controls>
<source src="" type="video/mp4">
</video>
</div>
<div class="media-container__nav--right">></div>
</div>
<div class="media__name"></div>
<div class="media__counter"></div>
</div>
<div class="logwrapper">
<div class="logexpander"></div>
<div class="log"></div>
</div>
</td>
</tr>
</tbody>
</template>
<!-- END TEMPLATES -->
<div class="summary">
<div class="summary__data">
<h2>Summary</h2>
<div class="additional-summary prefix">
</div>
<p class="run-count">12 tests took 689 ms.</p>
<p class="filter">(Un)check the boxes to filter the results.</p>
<div class="summary__reload">
<div class="summary__reload__button hidden" onclick="location.reload()">
<div>There are still tests running. <br />Reload this page to get the latest results!</div>
</div>
</div>
<div class="summary__spacer"></div>
<div class="controls">
<div class="filters">
<input checked="true" class="filter" name="filter_checkbox" type="checkbox" data-test-result="failed" />
<span class="failed">7 Failed,</span>
<input checked="true" class="filter" name="filter_checkbox" type="checkbox" data-test-result="passed" />
<span class="passed">5 Passed,</span>
<input checked="true" class="filter" name="filter_checkbox" type="checkbox" data-test-result="skipped" disabled/>
<span class="skipped">0 Skipped,</span>
<input checked="true" class="filter" name="filter_checkbox" type="checkbox" data-test-result="xfailed" disabled/>
<span class="xfailed">0 Expected failures,</span>
<input checked="true" class="filter" name="filter_checkbox" type="checkbox" data-test-result="xpassed" disabled/>
<span class="xpassed">0 Unexpected passes,</span>
<input checked="true" class="filter" name="filter_checkbox" type="checkbox" data-test-result="error" disabled/>
<span class="error">0 Errors,</span>
<input checked="true" class="filter" name="filter_checkbox" type="checkbox" data-test-result="rerun" disabled/>
<span class="rerun">0 Reruns</span>
</div>
<div class="collapse">
<button id="show_all_details">Show all details</button>&nbsp;/&nbsp;<button id="hide_all_details">Hide all details</button>
</div>
</div>
</div>
<div class="additional-summary summary">
</div>
<div class="additional-summary postfix">
</div>
</div>
<table id="results-table">
<thead id="results-table-head">
<tr>
<th class="sortable" data-column-type="result">Result</th>
<th class="sortable" data-column-type="testId">Test</th>
<th class="sortable" data-column-type="duration">Duration</th>
<th>Links</th>
</tr>
</thead>
</table>
</body>
<footer>
<div id="data-container" data-jsonblob="{&#34;environment&#34;: {&#34;Python&#34;: &#34;3.11.7&#34;, &#34;Platform&#34;: &#34;Windows-10-10.0.19045-SP0&#34;, &#34;Packages&#34;: {&#34;pytest&#34;: &#34;8.2.2&#34;, &#34;pluggy&#34;: &#34;1.5.0&#34;}, &#34;Plugins&#34;: {&#34;allure-pytest&#34;: &#34;2.13.5&#34;, &#34;Faker&#34;: &#34;25.8.0&#34;, &#34;html&#34;: &#34;4.1.1&#34;, &#34;metadata&#34;: &#34;3.1.1&#34;}, &#34;JAVA_HOME&#34;: &#34;C:\\Program Files\\Java\\jdk1.8.0_251&#34;}, &#34;tests&#34;: {&#34;test_case/test_bpm.py::TestBPM::test_request_bpm[POST-http://36.139.193.99:8088/auth-application/json-case_data0-expect_data0-None-None-None]&#34;: [{&#34;extras&#34;: [], &#34;result&#34;: &#34;Passed&#34;, &#34;testId&#34;: &#34;test_case/test_bpm.py::TestBPM::test_request_bpm[POST-http://36.139.193.99:8088/auth-application/json-case_data0-expect_data0-None-None-None]&#34;, &#34;duration&#34;: &#34;294 ms&#34;, &#34;resultsTableRow&#34;: [&#34;&lt;td class=\&#34;col-result\&#34;&gt;Passed&lt;/td&gt;&#34;, &#34;&lt;td class=\&#34;col-testId\&#34;&gt;test_case/test_bpm.py::TestBPM::test_request_bpm[POST-http://36.139.193.99:8088/auth-application/json-case_data0-expect_data0-None-None-None]&lt;/td&gt;&#34;, &#34;&lt;td class=\&#34;col-duration\&#34;&gt;294 ms&lt;/td&gt;&#34;, &#34;&lt;td class=\&#34;col-links\&#34;&gt;&lt;/td&gt;&#34;], &#34;log&#34;: &#34;----------------------------- Captured stdout call -----------------------------\n{&amp;#x27;token&amp;#x27;: &amp;#x27;eyJhbGciOiJIUzUxMiJ9.eyJzdWIiOiJhZG1pbiIsInRlbmFudElkIjoiLTEiLCJleHAiOjE3MjExNzc4MzYsImlhdCI6MTcyMTA5MTQzNn0.fojgDLQ2Ll4u-xk03ZxUu8jhvP9_VzTNNBDUVp14DUKuDj2lb1u_Cj7x8FFY5y7sdFTDu2hvmxxgPUf88RtN4w&amp;#x27;, &amp;#x27;username&amp;#x27;: &amp;#x27;\u8d85\u7ea7\u7ba1\u7406\u5458&amp;#x27;, &amp;#x27;account&amp;#x27;: &amp;#x27;admin&amp;#x27;, &amp;#x27;userId&amp;#x27;: &amp;#x27;1&amp;#x27;, &amp;#x27;expiration&amp;#x27;: 86400, &amp;#x27;loginStatus&amp;#x27;: True, &amp;#x27;userAttrs&amp;#x27;: {&amp;#x27;tenantId&amp;#x27;: &amp;#x27;-1&amp;#x27;}}\n\u65ad\u8a00\u6210\u529f\n&#34;}], &#34;test_case/test_bpm.py::TestBPM::test_request_bpm[POST-http://36.139.193.99:8088/auth-Application/json-case_data1-expect_data1-None-None-None]&#34;: [{&#34;extras&#34;: [], &#34;result&#34;: &#34;Passed&#34;, &#34;testId&#34;: &#34;test_case/test_bpm.py::TestBPM::test_request_bpm[POST-http://36.139.193.99:8088/auth-Application/json-case_data1-expect_data1-None-None-None]&#34;, &#34;duration&#34;: &#34;41 ms&#34;, &#34;resultsTableRow&#34;: [&#34;&lt;td class=\&#34;col-result\&#34;&gt;Passed&lt;/td&gt;&#34;, &#34;&lt;td class=\&#34;col-testId\&#34;&gt;test_case/test_bpm.py::TestBPM::test_request_bpm[POST-http://36.139.193.99:8088/auth-Application/json-case_data1-expect_data1-None-None-None]&lt;/td&gt;&#34;, &#34;&lt;td class=\&#34;col-duration\&#34;&gt;41 ms&lt;/td&gt;&#34;, &#34;&lt;td class=\&#34;col-links\&#34;&gt;&lt;/td&gt;&#34;], &#34;log&#34;: &#34;----------------------------- Captured stdout call -----------------------------\n{&amp;#x27;state&amp;#x27;: False, &amp;#x27;message&amp;#x27;: &amp;#x27;\u8d26\u6237\u9519\u8bef\u6216\u8be5\u79df\u6237\u672a\u542f\u7528&amp;#x27;, &amp;#x27;code&amp;#x27;: 200, &amp;#x27;logId&amp;#x27;: &amp;#x27;1813015006695497728&amp;#x27;}\n\u65ad\u8a00\u6210\u529f\n&#34;}], &#34;test_case/test_bpm.py::TestBPM::test_request_bpm[POST-http://36.139.193.99:8088/auth-application/json-case_data2-expect_data2-None-None-None]&#34;: [{&#34;extras&#34;: [], &#34;result&#34;: &#34;Passed&#34;, &#34;testId&#34;: &#34;test_case/test_bpm.py::TestBPM::test_request_bpm[POST-http://36.139.193.99:8088/auth-application/json-case_data2-expect_data2-None-None-None]&#34;, &#34;duration&#34;: &#34;41 ms&#34;, &#34;resultsTableRow&#34;: [&#34;&lt;td class=\&#34;col-result\&#34;&gt;Passed&lt;/td&gt;&#34;, &#34;&lt;td class=\&#34;col-testId\&#34;&gt;test_case/test_bpm.py::TestBPM::test_request_bpm[POST-http://36.139.193.99:8088/auth-application/json-case_data2-expect_data2-None-None-None]&lt;/td&gt;&#34;, &#34;&lt;td class=\&#34;col-duration\&#34;&gt;41 ms&lt;/td&gt;&#34;, &#34;&lt;td class=\&#34;col-links\&#34;&gt;&lt;/td&gt;&#34;], &#34;log&#34;: &#34;----------------------------- Captured stdout call -----------------------------\n{&amp;#x27;state&amp;#x27;: False, &amp;#x27;message&amp;#x27;: &amp;#x27;\u8d26\u6237\u9519\u8bef\u6216\u8be5\u79df\u6237\u672a\u542f\u7528&amp;#x27;, &amp;#x27;code&amp;#x27;: 200, &amp;#x27;logId&amp;#x27;: &amp;#x27;1813015006880047104&amp;#x27;}\n\u65ad\u8a00\u6210\u529f\n&#34;}], &#34;test_case/test_bpm.py::TestBPM::test_request_bpm[POST-http://36.139.193.99:8088/auth-application/JSON-case_data3-expect_data3-None-None-None]&#34;: [{&#34;extras&#34;: [], &#34;result&#34;: &#34;Passed&#34;, &#34;testId&#34;: &#34;test_case/test_bpm.py::TestBPM::test_request_bpm[POST-http://36.139.193.99:8088/auth-application/JSON-case_data3-expect_data3-None-None-None]&#34;, &#34;duration&#34;: &#34;43 ms&#34;, &#34;resultsTableRow&#34;: [&#34;&lt;td class=\&#34;col-result\&#34;&gt;Passed&lt;/td&gt;&#34;, &#34;&lt;td class=\&#34;col-testId\&#34;&gt;test_case/test_bpm.py::TestBPM::test_request_bpm[POST-http://36.139.193.99:8088/auth-application/JSON-case_data3-expect_data3-None-None-None]&lt;/td&gt;&#34;, &#34;&lt;td class=\&#34;col-duration\&#34;&gt;43 ms&lt;/td&gt;&#34;, &#34;&lt;td class=\&#34;col-links\&#34;&gt;&lt;/td&gt;&#34;], &#34;log&#34;: &#34;----------------------------- Captured stdout call -----------------------------\n{&amp;#x27;state&amp;#x27;: False, &amp;#x27;message&amp;#x27;: &amp;#x27;\u8d26\u6237\u9519\u8bef\u6216\u8be5\u79df\u6237\u672a\u542f\u7528&amp;#x27;, &amp;#x27;code&amp;#x27;: 200, &amp;#x27;logId&amp;#x27;: &amp;#x27;1813015007072985088&amp;#x27;}\n\u65ad\u8a00\u6210\u529f\n&#34;}], &#34;test_case/test_bpm.py::TestBPM::test_request_bpm[POST-http://36.139.193.99:8088/auth-application/json-case_data4-expect_data4-None-None-None]&#34;: [{&#34;extras&#34;: [], &#34;result&#34;: &#34;Passed&#34;, &#34;testId&#34;: &#34;test_case/test_bpm.py::TestBPM::test_request_bpm[POST-http://36.139.193.99:8088/auth-application/json-case_data4-expect_data4-None-None-None]&#34;, &#34;duration&#34;: &#34;37 ms&#34;, &#34;resultsTableRow&#34;: [&#34;&lt;td class=\&#34;col-result\&#34;&gt;Passed&lt;/td&gt;&#34;, &#34;&lt;td class=\&#34;col-testId\&#34;&gt;test_case/test_bpm.py::TestBPM::test_request_bpm[POST-http://36.139.193.99:8088/auth-application/json-case_data4-expect_data4-None-None-None]&lt;/td&gt;&#34;, &#34;&lt;td class=\&#34;col-duration\&#34;&gt;37 ms&lt;/td&gt;&#34;, &#34;&lt;td class=\&#34;col-links\&#34;&gt;&lt;/td&gt;&#34;], &#34;log&#34;: &#34;----------------------------- Captured stdout call -----------------------------\n{&amp;#x27;state&amp;#x27;: False, &amp;#x27;message&amp;#x27;: &amp;#x27;\u8d26\u6237\u9519\u8bef\u6216\u8be5\u79df\u6237\u672a\u542f\u7528&amp;#x27;, &amp;#x27;code&amp;#x27;: 200, &amp;#x27;logId&amp;#x27;: &amp;#x27;1813015007236562944&amp;#x27;}\n\u65ad\u8a00\u6210\u529f\n&#34;}], &#34;test_case/test_bpm.py::TestBPM::test_request_bpm[POST-http://36.139.193.99:8088/auth-application/json-case_data5-expect_data5-None-None-None]&#34;: [{&#34;extras&#34;: [], &#34;result&#34;: &#34;Failed&#34;, &#34;testId&#34;: &#34;test_case/test_bpm.py::TestBPM::test_request_bpm[POST-http://36.139.193.99:8088/auth-application/json-case_data5-expect_data5-None-None-None]&#34;, &#34;duration&#34;: &#34;45 ms&#34;, &#34;resultsTableRow&#34;: [&#34;&lt;td class=\&#34;col-result\&#34;&gt;Failed&lt;/td&gt;&#34;, &#34;&lt;td class=\&#34;col-testId\&#34;&gt;test_case/test_bpm.py::TestBPM::test_request_bpm[POST-http://36.139.193.99:8088/auth-application/json-case_data5-expect_data5-None-None-None]&lt;/td&gt;&#34;, &#34;&lt;td class=\&#34;col-duration\&#34;&gt;45 ms&lt;/td&gt;&#34;, &#34;&lt;td class=\&#34;col-links\&#34;&gt;&lt;/td&gt;&#34;], &#34;log&#34;: &#34;self = &amp;lt;APIAutoTest_V2_1.test_case.test_bpm.TestBPM object at 0x00000207CE7466D0&amp;gt;\nreq_fix = &amp;lt;APIAutoTest_V2_1.request_method.request_method.RequestMethod object at 0x00000207CE7A30D0&amp;gt;\ndb_fix = &amp;lt;APIAutoTest_V2_1.commen.db.DB object at 0x00000207CE2AE410&amp;gt;, req_method = &amp;#x27;POST&amp;#x27;, req_url = &amp;#x27;http://36.139.193.99:8088/auth&amp;#x27;\nreq_mime = &amp;#x27;application/json&amp;#x27;, case_data = {&amp;#x27;password&amp;#x27;: &amp;#x27;&amp;#x27;, &amp;#x27;username&amp;#x27;: &amp;#x27;admin&amp;#x27;}, expect_data = {&amp;#x27;message&amp;#x27;: &amp;#x27;\u8d26\u6237\u9519\u8bef\u6216\u8be5\u79df\u6237\u672a\u542f\u7528&amp;#x27;, &amp;#x27;state&amp;#x27;: False}\nsql_type = None, sql_data = None, update_key = None\n\n @pytest.mark.parametrize(&amp;quot;req_method, req_url, req_mime, case_data, expect_data, sql_type, sql_data, update_key&amp;quot;, ReadExcel().get_data_all())\n def test_request_bpm(self, req_fix, db_fix, req_method, req_url, req_mime, case_data, expect_data, sql_type, sql_data, update_key):\n # print(req_method, req_url, req_mime, case_data, expect_data, sql_type, sql_data, update_key)\n if sql_type == &amp;quot;delete&amp;quot;:\n db_fix.delete(sql_data)\n result = req_fix.request_all(req_method, req_url, req_mime, case_data)\n print(result.json())\n \n elif sql_type == &amp;quot;select&amp;quot;:\n select_result = db_fix.select(sql_data)\n print(&amp;quot;\u67e5\u8be2\u7ed3\u679c\u4e3a\uff1a&amp;quot;, select_result)\n case_data[update_key] = select_result\n \n result = req_fix.request_all(req_method, req_url, req_mime, case_data)\n print(result.json())\n \n \n else:\n result = req_fix.request_all(req_method, req_url, req_mime, case_data)\n print(result.json())\n \n try:\n for key in expect_data.keys():\n&amp;gt; assert expect_data[key] == result.json().get(key)\nE AssertionError: assert &amp;#x27;\u8d26\u6237\u9519\u8bef\u6216\u8be5\u79df\u6237\u672a\u542f\u7528&amp;#x27; == &amp;#x27;\u8d26\u53f7\u6216\u5bc6\u7801\u9519\u8bef&amp;#x27;\nE \nE - \u8d26\u53f7\u6216\u5bc6\u7801\u9519\u8bef\nE + \u8d26\u6237\u9519\u8bef\u6216\u8be5\u79df\u6237\u672a\u542f\u7528\n\ntest_case\\test_bpm.py:39: AssertionError\n\nDuring handling of the above exception, another exception occurred:\n\nself = &amp;lt;APIAutoTest_V2_1.test_case.test_bpm.TestBPM object at 0x00000207CE7466D0&amp;gt;\nreq_fix = &amp;lt;APIAutoTest_V2_1.request_method.request_method.RequestMethod object at 0x00000207CE7A30D0&amp;gt;\ndb_fix = &amp;lt;APIAutoTest_V2_1.commen.db.DB object at 0x00000207CE2AE410&amp;gt;, req_method = &amp;#x27;POST&amp;#x27;, req_url = &amp;#x27;http://36.139.193.99:8088/auth&amp;#x27;\nreq_mime = &amp;#x27;application/json&amp;#x27;, case_data = {&amp;#x27;password&amp;#x27;: &amp;#x27;&amp;#x27;, &amp;#x27;username&amp;#x27;: &amp;#x27;admin&amp;#x27;}, expect_data = {&amp;#x27;message&amp;#x27;: &amp;#x27;\u8d26\u6237\u9519\u8bef\u6216\u8be5\u79df\u6237\u672a\u542f\u7528&amp;#x27;, &amp;#x27;state&amp;#x27;: False}\nsql_type = None, sql_data = None, update_key = None\n\n @pytest.mark.parametrize(&amp;quot;req_method, req_url, req_mime, case_data, expect_data, sql_type, sql_data, update_key&amp;quot;, ReadExcel().get_data_all())\n def test_request_bpm(self, req_fix, db_fix, req_method, req_url, req_mime, case_data, expect_data, sql_type, sql_data, update_key):\n # print(req_method, req_url, req_mime, case_data, expect_data, sql_type, sql_data, update_key)\n if sql_type == &amp;quot;delete&amp;quot;:\n db_fix.delete(sql_data)\n result = req_fix.request_all(req_method, req_url, req_mime, case_data)\n print(result.json())\n \n elif sql_type == &amp;quot;select&amp;quot;:\n select_result = db_fix.select(sql_data)\n print(&amp;quot;\u67e5\u8be2\u7ed3\u679c\u4e3a\uff1a&amp;quot;, select_result)\n case_data[update_key] = select_result\n \n result = req_fix.request_all(req_method, req_url, req_mime, case_data)\n print(result.json())\n \n \n else:\n result = req_fix.request_all(req_method, req_url, req_mime, case_data)\n print(result.json())\n \n try:\n for key in expect_data.keys():\n assert expect_data[key] == result.json().get(key)\n except:\n&amp;gt; raise AssertionError(&amp;quot;\u65ad\u8a00\u5931\u8d25&amp;quot;)\nE AssertionError: \u65ad\u8a00\u5931\u8d25\n\ntest_case\\test_bpm.py:41: AssertionError\n\n----------------------------- Captured stdout call -----------------------------\n{&amp;#x27;state&amp;#x27;: False, &amp;#x27;message&amp;#x27;: &amp;#x27;\u8d26\u53f7\u6216\u5bc6\u7801\u9519\u8bef&amp;#x27;, &amp;#x27;code&amp;#x27;: 200, &amp;#x27;logId&amp;#x27;: &amp;#x27;1813015007416918016&amp;#x27;}\n&#34;}], &#34;test_case/test_bpm.py::TestBPM::test_request_bpm[POST-http://36.139.193.99:8088/auth-application/json-case_data6-expect_data6-None-None-None]&#34;: [{&#34;extras&#34;: [], &#34;result&#34;: &#34;Failed&#34;, &#34;testId&#34;: &#34;test_case/test_bpm.py::TestBPM::test_request_bpm[POST-http://36.139.193.99:8088/auth-application/json-case_data6-expect_data6-None-None-None]&#34;, &#34;duration&#34;: &#34;41 ms&#34;, &#34;resultsTableRow&#34;: [&#34;&lt;td class=\&#34;col-result\&#34;&gt;Failed&lt;/td&gt;&#34;, &#34;&lt;td class=\&#34;col-testId\&#34;&gt;test_case/test_bpm.py::TestBPM::test_request_bpm[POST-http://36.139.193.99:8088/auth-application/json-case_data6-expect_data6-None-None-None]&lt;/td&gt;&#34;, &#34;&lt;td class=\&#34;col-duration\&#34;&gt;41 ms&lt;/td&gt;&#34;, &#34;&lt;td class=\&#34;col-links\&#34;&gt;&lt;/td&gt;&#34;], &#34;log&#34;: &#34;self = &amp;lt;APIAutoTest_V2_1.test_case.test_bpm.TestBPM object at 0x00000207CE746F90&amp;gt;\nreq_fix = &amp;lt;APIAutoTest_V2_1.request_method.request_method.RequestMethod object at 0x00000207CE7A30D0&amp;gt;\ndb_fix = &amp;lt;APIAutoTest_V2_1.commen.db.DB object at 0x00000207CE2AE410&amp;gt;, req_method = &amp;#x27;POST&amp;#x27;, req_url = &amp;#x27;http://36.139.193.99:8088/auth&amp;#x27;\nreq_mime = &amp;#x27;application/json&amp;#x27;, case_data = {&amp;#x27;password&amp;#x27;: &amp;#x27;1&amp;#x27;, &amp;#x27;username&amp;#x27;: &amp;#x27;admin&amp;#x27;}, expect_data = {&amp;#x27;message&amp;#x27;: &amp;#x27;\u8d26\u6237\u9519\u8bef\u6216\u8be5\u79df\u6237\u672a\u542f\u7528&amp;#x27;, &amp;#x27;state&amp;#x27;: False}\nsql_type = None, sql_data = None, update_key = None\n\n @pytest.mark.parametrize(&amp;quot;req_method, req_url, req_mime, case_data, expect_data, sql_type, sql_data, update_key&amp;quot;, ReadExcel().get_data_all())\n def test_request_bpm(self, req_fix, db_fix, req_method, req_url, req_mime, case_data, expect_data, sql_type, sql_data, update_key):\n # print(req_method, req_url, req_mime, case_data, expect_data, sql_type, sql_data, update_key)\n if sql_type == &amp;quot;delete&amp;quot;:\n db_fix.delete(sql_data)\n result = req_fix.request_all(req_method, req_url, req_mime, case_data)\n print(result.json())\n \n elif sql_type == &amp;quot;select&amp;quot;:\n select_result = db_fix.select(sql_data)\n print(&amp;quot;\u67e5\u8be2\u7ed3\u679c\u4e3a\uff1a&amp;quot;, select_result)\n case_data[update_key] = select_result\n \n result = req_fix.request_all(req_method, req_url, req_mime, case_data)\n print(result.json())\n \n \n else:\n result = req_fix.request_all(req_method, req_url, req_mime, case_data)\n print(result.json())\n \n try:\n for key in expect_data.keys():\n&amp;gt; assert expect_data[key] == result.json().get(key)\nE AssertionError: assert &amp;#x27;\u8d26\u6237\u9519\u8bef\u6216\u8be5\u79df\u6237\u672a\u542f\u7528&amp;#x27; == &amp;#x27;\u8d26\u53f7\u6216\u5bc6\u7801\u9519\u8bef&amp;#x27;\nE \nE - \u8d26\u53f7\u6216\u5bc6\u7801\u9519\u8bef\nE + \u8d26\u6237\u9519\u8bef\u6216\u8be5\u79df\u6237\u672a\u542f\u7528\n\ntest_case\\test_bpm.py:39: AssertionError\n\nDuring handling of the above exception, another exception occurred:\n\nself = &amp;lt;APIAutoTest_V2_1.test_case.test_bpm.TestBPM object at 0x00000207CE746F90&amp;gt;\nreq_fix = &amp;lt;APIAutoTest_V2_1.request_method.request_method.RequestMethod object at 0x00000207CE7A30D0&amp;gt;\ndb_fix = &amp;lt;APIAutoTest_V2_1.commen.db.DB object at 0x00000207CE2AE410&amp;gt;, req_method = &amp;#x27;POST&amp;#x27;, req_url = &amp;#x27;http://36.139.193.99:8088/auth&amp;#x27;\nreq_mime = &amp;#x27;application/json&amp;#x27;, case_data = {&amp;#x27;password&amp;#x27;: &amp;#x27;1&amp;#x27;, &amp;#x27;username&amp;#x27;: &amp;#x27;admin&amp;#x27;}, expect_data = {&amp;#x27;message&amp;#x27;: &amp;#x27;\u8d26\u6237\u9519\u8bef\u6216\u8be5\u79df\u6237\u672a\u542f\u7528&amp;#x27;, &amp;#x27;state&amp;#x27;: False}\nsql_type = None, sql_data = None, update_key = None\n\n @pytest.mark.parametrize(&amp;quot;req_method, req_url, req_mime, case_data, expect_data, sql_type, sql_data, update_key&amp;quot;, ReadExcel().get_data_all())\n def test_request_bpm(self, req_fix, db_fix, req_method, req_url, req_mime, case_data, expect_data, sql_type, sql_data, update_key):\n # print(req_method, req_url, req_mime, case_data, expect_data, sql_type, sql_data, update_key)\n if sql_type == &amp;quot;delete&amp;quot;:\n db_fix.delete(sql_data)\n result = req_fix.request_all(req_method, req_url, req_mime, case_data)\n print(result.json())\n \n elif sql_type == &amp;quot;select&amp;quot;:\n select_result = db_fix.select(sql_data)\n print(&amp;quot;\u67e5\u8be2\u7ed3\u679c\u4e3a\uff1a&amp;quot;, select_result)\n case_data[update_key] = select_result\n \n result = req_fix.request_all(req_method, req_url, req_mime, case_data)\n print(result.json())\n \n \n else:\n result = req_fix.request_all(req_method, req_url, req_mime, case_data)\n print(result.json())\n \n try:\n for key in expect_data.keys():\n assert expect_data[key] == result.json().get(key)\n except:\n&amp;gt; raise AssertionError(&amp;quot;\u65ad\u8a00\u5931\u8d25&amp;quot;)\nE AssertionError: \u65ad\u8a00\u5931\u8d25\n\ntest_case\\test_bpm.py:41: AssertionError\n\n----------------------------- Captured stdout call -----------------------------\n{&amp;#x27;state&amp;#x27;: False, &amp;#x27;message&amp;#x27;: &amp;#x27;\u8d26\u53f7\u6216\u5bc6\u7801\u9519\u8bef&amp;#x27;, &amp;#x27;code&amp;#x27;: 200, &amp;#x27;logId&amp;#x27;: &amp;#x27;1813015008427745280&amp;#x27;}\n&#34;}], &#34;test_case/test_bpm.py::TestBPM::test_request_bpm[POST-http://36.139.193.99:8088/auth-application/json-case_data7-expect_data7-None-None-None]&#34;: [{&#34;extras&#34;: [], &#34;result&#34;: &#34;Failed&#34;, &#34;testId&#34;: &#34;test_case/test_bpm.py::TestBPM::test_request_bpm[POST-http://36.139.193.99:8088/auth-application/json-case_data7-expect_data7-None-None-None]&#34;, &#34;duration&#34;: &#34;60 ms&#34;, &#34;resultsTableRow&#34;: [&#34;&lt;td class=\&#34;col-result\&#34;&gt;Failed&lt;/td&gt;&#34;, &#34;&lt;td class=\&#34;col-testId\&#34;&gt;test_case/test_bpm.py::TestBPM::test_request_bpm[POST-http://36.139.193.99:8088/auth-application/json-case_data7-expect_data7-None-None-None]&lt;/td&gt;&#34;, &#34;&lt;td class=\&#34;col-duration\&#34;&gt;60 ms&lt;/td&gt;&#34;, &#34;&lt;td class=\&#34;col-links\&#34;&gt;&lt;/td&gt;&#34;], &#34;log&#34;: &#34;self = &amp;lt;APIAutoTest_V2_1.test_case.test_bpm.TestBPM object at 0x00000207CE7459D0&amp;gt;\nreq_fix = &amp;lt;APIAutoTest_V2_1.request_method.request_method.RequestMethod object at 0x00000207CE7A30D0&amp;gt;\ndb_fix = &amp;lt;APIAutoTest_V2_1.commen.db.DB object at 0x00000207CE2AE410&amp;gt;, req_method = &amp;#x27;POST&amp;#x27;, req_url = &amp;#x27;http://36.139.193.99:8088/auth&amp;#x27;\nreq_mime = &amp;#x27;application/json&amp;#x27;\ncase_data = {&amp;#x27;password&amp;#x27;: &amp;#x27;F4/DVgPS/NEruLxVVRqHktsb1R2fVpw81t5VuGfFjwp0G7U4k6spHPr/ejPlw8XxIVilJ+SyIH0G5FbQStFEd/94mmI7+2Dw2c7MXXIE...5FbQStFEd/94mmI7+2Dw2c7MXXIERYKjd3XNe4gZR4ANJclCJHNGfE+mtnX5voprYwEo9m6ponCdmmXTMx9cWVEJ4K/nbR8=&amp;#x27;, &amp;#x27;username&amp;#x27;: &amp;#x27;admin&amp;#x27;}\nexpect_data = {&amp;#x27;message&amp;#x27;: &amp;#x27;\u8d26\u6237\u9519\u8bef\u6216\u8be5\u79df\u6237\u672a\u542f\u7528&amp;#x27;, &amp;#x27;state&amp;#x27;: False}, sql_type = None, sql_data = None, update_key = None\n\n @pytest.mark.parametrize(&amp;quot;req_method, req_url, req_mime, case_data, expect_data, sql_type, sql_data, update_key&amp;quot;, ReadExcel().get_data_all())\n def test_request_bpm(self, req_fix, db_fix, req_method, req_url, req_mime, case_data, expect_data, sql_type, sql_data, update_key):\n # print(req_method, req_url, req_mime, case_data, expect_data, sql_type, sql_data, update_key)\n if sql_type == &amp;quot;delete&amp;quot;:\n db_fix.delete(sql_data)\n result = req_fix.request_all(req_method, req_url, req_mime, case_data)\n print(result.json())\n \n elif sql_type == &amp;quot;select&amp;quot;:\n select_result = db_fix.select(sql_data)\n print(&amp;quot;\u67e5\u8be2\u7ed3\u679c\u4e3a\uff1a&amp;quot;, select_result)\n case_data[update_key] = select_result\n \n result = req_fix.request_all(req_method, req_url, req_mime, case_data)\n print(result.json())\n \n \n else:\n result = req_fix.request_all(req_method, req_url, req_mime, case_data)\n print(result.json())\n \n try:\n for key in expect_data.keys():\n&amp;gt; assert expect_data[key] == result.json().get(key)\nE AssertionError: assert False == None\nE + where None = &amp;lt;built-in method get of dict object at 0x00000207CE895500&amp;gt;(&amp;#x27;state&amp;#x27;)\nE + where &amp;lt;built-in method get of dict object at 0x00000207CE895500&amp;gt; = {&amp;#x27;account&amp;#x27;: &amp;#x27;admin&amp;#x27;, &amp;#x27;expiration&amp;#x27;: 86400, &amp;#x27;loginStatus&amp;#x27;: True, &amp;#x27;token&amp;#x27;: &amp;#x27;eyJhbGciOiJIUzUxMiJ9.eyJzdWIiOiJhZG1pbiIsInRlbmFudElkIjoiLTEiLCJleHAiOjE3MjExNzc4MzYsImlhdCI6MTcyMTA5MTQzNn0.fojgDLQ2Ll4u-xk03ZxUu8jhvP9_VzTNNBDUVp14DUKuDj2lb1u_Cj7x8FFY5y7sdFTDu2hvmxxgPUf88RtN4w&amp;#x27;, ...}.get\nE + where {&amp;#x27;account&amp;#x27;: &amp;#x27;admin&amp;#x27;, &amp;#x27;expiration&amp;#x27;: 86400, &amp;#x27;loginStatus&amp;#x27;: True, &amp;#x27;token&amp;#x27;: &amp;#x27;eyJhbGciOiJIUzUxMiJ9.eyJzdWIiOiJhZG1pbiIsInRlbmFudElkIjoiLTEiLCJleHAiOjE3MjExNzc4MzYsImlhdCI6MTcyMTA5MTQzNn0.fojgDLQ2Ll4u-xk03ZxUu8jhvP9_VzTNNBDUVp14DUKuDj2lb1u_Cj7x8FFY5y7sdFTDu2hvmxxgPUf88RtN4w&amp;#x27;, ...} = &amp;lt;bound method Response.json of &amp;lt;Response [200]&amp;gt;&amp;gt;()\nE + where &amp;lt;bound method Response.json of &amp;lt;Response [200]&amp;gt;&amp;gt; = &amp;lt;Response [200]&amp;gt;.json\n\ntest_case\\test_bpm.py:39: AssertionError\n\nDuring handling of the above exception, another exception occurred:\n\nself = &amp;lt;APIAutoTest_V2_1.test_case.test_bpm.TestBPM object at 0x00000207CE7459D0&amp;gt;\nreq_fix = &amp;lt;APIAutoTest_V2_1.request_method.request_method.RequestMethod object at 0x00000207CE7A30D0&amp;gt;\ndb_fix = &amp;lt;APIAutoTest_V2_1.commen.db.DB object at 0x00000207CE2AE410&amp;gt;, req_method = &amp;#x27;POST&amp;#x27;, req_url = &amp;#x27;http://36.139.193.99:8088/auth&amp;#x27;\nreq_mime = &amp;#x27;application/json&amp;#x27;\ncase_data = {&amp;#x27;password&amp;#x27;: &amp;#x27;F4/DVgPS/NEruLxVVRqHktsb1R2fVpw81t5VuGfFjwp0G7U4k6spHPr/ejPlw8XxIVilJ+SyIH0G5FbQStFEd/94mmI7+2Dw2c7MXXIE...5FbQStFEd/94mmI7+2Dw2c7MXXIERYKjd3XNe4gZR4ANJclCJHNGfE+mtnX5voprYwEo9m6ponCdmmXTMx9cWVEJ4K/nbR8=&amp;#x27;, &amp;#x27;username&amp;#x27;: &amp;#x27;admin&amp;#x27;}\nexpect_data = {&amp;#x27;message&amp;#x27;: &amp;#x27;\u8d26\u6237\u9519\u8bef\u6216\u8be5\u79df\u6237\u672a\u542f\u7528&amp;#x27;, &amp;#x27;state&amp;#x27;: False}, sql_type = None, sql_data = None, update_key = None\n\n @pytest.mark.parametrize(&amp;quot;req_method, req_url, req_mime, case_data, expect_data, sql_type, sql_data, update_key&amp;quot;, ReadExcel().get_data_all())\n def test_request_bpm(self, req_fix, db_fix, req_method, req_url, req_mime, case_data, expect_data, sql_type, sql_data, update_key):\n # print(req_method, req_url, req_mime, case_data, expect_data, sql_type, sql_data, update_key)\n if sql_type == &amp;quot;delete&amp;quot;:\n db_fix.delete(sql_data)\n result = req_fix.request_all(req_method, req_url, req_mime, case_data)\n print(result.json())\n \n elif sql_type == &amp;quot;select&amp;quot;:\n select_result = db_fix.select(sql_data)\n print(&amp;quot;\u67e5\u8be2\u7ed3\u679c\u4e3a\uff1a&amp;quot;, select_result)\n case_data[update_key] = select_result\n \n result = req_fix.request_all(req_method, req_url, req_mime, case_data)\n print(result.json())\n \n \n else:\n result = req_fix.request_all(req_method, req_url, req_mime, case_data)\n print(result.json())\n \n try:\n for key in expect_data.keys():\n assert expect_data[key] == result.json().get(key)\n except:\n&amp;gt; raise AssertionError(&amp;quot;\u65ad\u8a00\u5931\u8d25&amp;quot;)\nE AssertionError: \u65ad\u8a00\u5931\u8d25\n\ntest_case\\test_bpm.py:41: AssertionError\n\n----------------------------- Captured stdout call -----------------------------\n{&amp;#x27;token&amp;#x27;: &amp;#x27;eyJhbGciOiJIUzUxMiJ9.eyJzdWIiOiJhZG1pbiIsInRlbmFudElkIjoiLTEiLCJleHAiOjE3MjExNzc4MzYsImlhdCI6MTcyMTA5MTQzNn0.fojgDLQ2Ll4u-xk03ZxUu8jhvP9_VzTNNBDUVp14DUKuDj2lb1u_Cj7x8FFY5y7sdFTDu2hvmxxgPUf88RtN4w&amp;#x27;, &amp;#x27;username&amp;#x27;: &amp;#x27;\u8d85\u7ea7\u7ba1\u7406\u5458&amp;#x27;, &amp;#x27;account&amp;#x27;: &amp;#x27;admin&amp;#x27;, &amp;#x27;userId&amp;#x27;: &amp;#x27;1&amp;#x27;, &amp;#x27;expiration&amp;#x27;: 86400, &amp;#x27;loginStatus&amp;#x27;: True, &amp;#x27;userAttrs&amp;#x27;: {&amp;#x27;tenantId&amp;#x27;: &amp;#x27;-1&amp;#x27;}}\n&#34;}], &#34;test_case/test_bpm.py::TestBPM::test_request_bpm[GET-http://36.139.193.99:8088/refresh-None-None-expect_data8-None-None-None]&#34;: [{&#34;extras&#34;: [], &#34;result&#34;: &#34;Failed&#34;, &#34;testId&#34;: &#34;test_case/test_bpm.py::TestBPM::test_request_bpm[GET-http://36.139.193.99:8088/refresh-None-None-expect_data8-None-None-None]&#34;, &#34;duration&#34;: &#34;2 ms&#34;, &#34;resultsTableRow&#34;: [&#34;&lt;td class=\&#34;col-result\&#34;&gt;Failed&lt;/td&gt;&#34;, &#34;&lt;td class=\&#34;col-testId\&#34;&gt;test_case/test_bpm.py::TestBPM::test_request_bpm[GET-http://36.139.193.99:8088/refresh-None-None-expect_data8-None-None-None]&lt;/td&gt;&#34;, &#34;&lt;td class=\&#34;col-duration\&#34;&gt;2 ms&lt;/td&gt;&#34;, &#34;&lt;td class=\&#34;col-links\&#34;&gt;&lt;/td&gt;&#34;], &#34;log&#34;: &#34;self = &amp;lt;APIAutoTest_V2_1.test_case.test_bpm.TestBPM object at 0x00000207CE7467D0&amp;gt;\nreq_fix = &amp;lt;APIAutoTest_V2_1.request_method.request_method.RequestMethod object at 0x00000207CE7A30D0&amp;gt;\ndb_fix = &amp;lt;APIAutoTest_V2_1.commen.db.DB object at 0x00000207CE2AE410&amp;gt;, req_method = &amp;#x27;GET&amp;#x27;, req_url = &amp;#x27;http://36.139.193.99:8088/refresh&amp;#x27;\nreq_mime = None, case_data = None, expect_data = {&amp;#x27;message&amp;#x27;: &amp;#x27;\u5237\u65b0\u6210\u529f&amp;#x27;}, sql_type = None, sql_data = None, update_key = None\n\n @pytest.mark.parametrize(&amp;quot;req_method, req_url, req_mime, case_data, expect_data, sql_type, sql_data, update_key&amp;quot;, ReadExcel().get_data_all())\n def test_request_bpm(self, req_fix, db_fix, req_method, req_url, req_mime, case_data, expect_data, sql_type, sql_data, update_key):\n # print(req_method, req_url, req_mime, case_data, expect_data, sql_type, sql_data, update_key)\n if sql_type == &amp;quot;delete&amp;quot;:\n db_fix.delete(sql_data)\n result = req_fix.request_all(req_method, req_url, req_mime, case_data)\n print(result.json())\n \n elif sql_type == &amp;quot;select&amp;quot;:\n select_result = db_fix.select(sql_data)\n print(&amp;quot;\u67e5\u8be2\u7ed3\u679c\u4e3a\uff1a&amp;quot;, select_result)\n case_data[update_key] = select_result\n \n result = req_fix.request_all(req_method, req_url, req_mime, case_data)\n print(result.json())\n \n \n else:\n&amp;gt; result = req_fix.request_all(req_method, req_url, req_mime, case_data)\n\ntest_case\\test_bpm.py:34: \n_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _\n\nself = &amp;lt;APIAutoTest_V2_1.request_method.request_method.RequestMethod object at 0x00000207CE7A30D0&amp;gt;, req_method = &amp;#x27;GET&amp;#x27;\nreq_url = &amp;#x27;http://36.139.193.99:8088/refresh&amp;#x27;, req_mime = None, case_data = None\n\n def request_all(self, req_method, req_url, req_mime, case_data):\n &amp;quot;&amp;quot;&amp;quot;\u6839\u636e\u5a92\u4f53\u7c7b\u578b\u7684\u4e0d\u540c\uff0c\u6765\u51b3\u5b9a\u8bf7\u6c42\u65b9\u5f0f&amp;quot;&amp;quot;&amp;quot;\n&amp;gt; req_mime = req_mime.lower()\nE AttributeError: &amp;#x27;NoneType&amp;#x27; object has no attribute &amp;#x27;lower&amp;#x27;\n\nrequest_method\\request_method.py:28: AttributeError\n&#34;}], &#34;test_case/test_bpm.py::TestBPM::test_request_bpm[post-http://36.139.193.99:8088/api/demension/v1/dem/addDem-json-case_data9-expect_data9-Delete-DELETE FROM uc_demension WHERE `CODE_`=\&#34;test_dem_xyz_123\&#34;;-None]&#34;: [{&#34;extras&#34;: [], &#34;result&#34;: &#34;Failed&#34;, &#34;testId&#34;: &#34;test_case/test_bpm.py::TestBPM::test_request_bpm[post-http://36.139.193.99:8088/api/demension/v1/dem/addDem-json-case_data9-expect_data9-Delete-DELETE FROM uc_demension WHERE `CODE_`=\&#34;test_dem_xyz_123\&#34;;-None]&#34;, &#34;duration&#34;: &#34;24 ms&#34;, &#34;resultsTableRow&#34;: [&#34;&lt;td class=\&#34;col-result\&#34;&gt;Failed&lt;/td&gt;&#34;, &#34;&lt;td class=\&#34;col-testId\&#34;&gt;test_case/test_bpm.py::TestBPM::test_request_bpm[post-http://36.139.193.99:8088/api/demension/v1/dem/addDem-json-case_data9-expect_data9-Delete-DELETE FROM uc_demension WHERE `CODE_`=\&#34;test_dem_xyz_123\&#34;;-None]&lt;/td&gt;&#34;, &#34;&lt;td class=\&#34;col-duration\&#34;&gt;24 ms&lt;/td&gt;&#34;, &#34;&lt;td class=\&#34;col-links\&#34;&gt;&lt;/td&gt;&#34;], &#34;log&#34;: &#34;self = &amp;lt;APIAutoTest_V2_1.test_case.test_bpm.TestBPM object at 0x00000207CE745290&amp;gt;\nreq_fix = &amp;lt;APIAutoTest_V2_1.request_method.request_method.RequestMethod object at 0x00000207CE7A30D0&amp;gt;\ndb_fix = &amp;lt;APIAutoTest_V2_1.commen.db.DB object at 0x00000207CE2AE410&amp;gt;, req_method = &amp;#x27;post&amp;#x27;\nreq_url = &amp;#x27;http://36.139.193.99:8088/api/demension/v1/dem/addDem&amp;#x27;, req_mime = &amp;#x27;json&amp;#x27;\ncase_data = {&amp;#x27;code&amp;#x27;: &amp;#x27;test_dem_xyz_123&amp;#x27;, &amp;#x27;description&amp;#x27;: &amp;#x27;\u6d4b\u8bd5\u7ef4\u5ea6&amp;#x27;, &amp;#x27;isDefault&amp;#x27;: 0, &amp;#x27;name&amp;#x27;: &amp;#x27;xyz\u6d4b\u8bd5\u7ef4\u5ea6&amp;#x27;}, expect_data = {&amp;#x27;message&amp;#x27;: &amp;#x27;\u6dfb\u52a0\u7ef4\u5ea6\u6210\u529f\uff01&amp;#x27;}\nsql_type = &amp;#x27;Delete&amp;#x27;, sql_data = &amp;#x27;DELETE FROM uc_demension WHERE `CODE_`=&amp;quot;test_dem_xyz_123&amp;quot;;&amp;#x27;, update_key = None\n\n @pytest.mark.parametrize(&amp;quot;req_method, req_url, req_mime, case_data, expect_data, sql_type, sql_data, update_key&amp;quot;, ReadExcel().get_data_all())\n def test_request_bpm(self, req_fix, db_fix, req_method, req_url, req_mime, case_data, expect_data, sql_type, sql_data, update_key):\n # print(req_method, req_url, req_mime, case_data, expect_data, sql_type, sql_data, update_key)\n if sql_type == &amp;quot;delete&amp;quot;:\n db_fix.delete(sql_data)\n result = req_fix.request_all(req_method, req_url, req_mime, case_data)\n print(result.json())\n \n elif sql_type == &amp;quot;select&amp;quot;:\n select_result = db_fix.select(sql_data)\n print(&amp;quot;\u67e5\u8be2\u7ed3\u679c\u4e3a\uff1a&amp;quot;, select_result)\n case_data[update_key] = select_result\n \n result = req_fix.request_all(req_method, req_url, req_mime, case_data)\n print(result.json())\n \n \n else:\n result = req_fix.request_all(req_method, req_url, req_mime, case_data)\n print(result.json())\n \n try:\n for key in expect_data.keys():\n&amp;gt; assert expect_data[key] == result.json().get(key)\nE AssertionError: assert &amp;#x27;\u6dfb\u52a0\u7ef4\u5ea6\u6210\u529f\uff01&amp;#x27; == &amp;#x27;\u6dfb\u52a0\u7ef4\u5ea6\u5931\u8d25\uff0c\u7ef4\u5ea6\u522b\u540d\u3010test_dem_xyz_123\u3011\u5728\u7cfb\u7edf\u4e2d\u5df2\u5b58\u5728\uff01&amp;#x27;\nE \nE - \u6dfb\u52a0\u7ef4\u5ea6\u5931\u8d25\uff0c\u7ef4\u5ea6\u522b\u540d\u3010test_dem_xyz_123\u3011\u5728\u7cfb\u7edf\u4e2d\u5df2\u5b58\u5728\uff01\nE + \u6dfb\u52a0\u7ef4\u5ea6\u6210\u529f\uff01\n\ntest_case\\test_bpm.py:39: AssertionError\n\nDuring handling of the above exception, another exception occurred:\n\nself = &amp;lt;APIAutoTest_V2_1.test_case.test_bpm.TestBPM object at 0x00000207CE745290&amp;gt;\nreq_fix = &amp;lt;APIAutoTest_V2_1.request_method.request_method.RequestMethod object at 0x00000207CE7A30D0&amp;gt;\ndb_fix = &amp;lt;APIAutoTest_V2_1.commen.db.DB object at 0x00000207CE2AE410&amp;gt;, req_method = &amp;#x27;post&amp;#x27;\nreq_url = &amp;#x27;http://36.139.193.99:8088/api/demension/v1/dem/addDem&amp;#x27;, req_mime = &amp;#x27;json&amp;#x27;\ncase_data = {&amp;#x27;code&amp;#x27;: &amp;#x27;test_dem_xyz_123&amp;#x27;, &amp;#x27;description&amp;#x27;: &amp;#x27;\u6d4b\u8bd5\u7ef4\u5ea6&amp;#x27;, &amp;#x27;isDefault&amp;#x27;: 0, &amp;#x27;name&amp;#x27;: &amp;#x27;xyz\u6d4b\u8bd5\u7ef4\u5ea6&amp;#x27;}, expect_data = {&amp;#x27;message&amp;#x27;: &amp;#x27;\u6dfb\u52a0\u7ef4\u5ea6\u6210\u529f\uff01&amp;#x27;}\nsql_type = &amp;#x27;Delete&amp;#x27;, sql_data = &amp;#x27;DELETE FROM uc_demension WHERE `CODE_`=&amp;quot;test_dem_xyz_123&amp;quot;;&amp;#x27;, update_key = None\n\n @pytest.mark.parametrize(&amp;quot;req_method, req_url, req_mime, case_data, expect_data, sql_type, sql_data, update_key&amp;quot;, ReadExcel().get_data_all())\n def test_request_bpm(self, req_fix, db_fix, req_method, req_url, req_mime, case_data, expect_data, sql_type, sql_data, update_key):\n # print(req_method, req_url, req_mime, case_data, expect_data, sql_type, sql_data, update_key)\n if sql_type == &amp;quot;delete&amp;quot;:\n db_fix.delete(sql_data)\n result = req_fix.request_all(req_method, req_url, req_mime, case_data)\n print(result.json())\n \n elif sql_type == &amp;quot;select&amp;quot;:\n select_result = db_fix.select(sql_data)\n print(&amp;quot;\u67e5\u8be2\u7ed3\u679c\u4e3a\uff1a&amp;quot;, select_result)\n case_data[update_key] = select_result\n \n result = req_fix.request_all(req_method, req_url, req_mime, case_data)\n print(result.json())\n \n \n else:\n result = req_fix.request_all(req_method, req_url, req_mime, case_data)\n print(result.json())\n \n try:\n for key in expect_data.keys():\n assert expect_data[key] == result.json().get(key)\n except:\n&amp;gt; raise AssertionError(&amp;quot;\u65ad\u8a00\u5931\u8d25&amp;quot;)\nE AssertionError: \u65ad\u8a00\u5931\u8d25\n\ntest_case\\test_bpm.py:41: AssertionError\n\n----------------------------- Captured stdout call -----------------------------\n{&amp;#x27;state&amp;#x27;: False, &amp;#x27;message&amp;#x27;: &amp;#x27;\u6dfb\u52a0\u7ef4\u5ea6\u5931\u8d25\uff0c\u7ef4\u5ea6\u522b\u540d\u3010test_dem_xyz_123\u3011\u5728\u7cfb\u7edf\u4e2d\u5df2\u5b58\u5728\uff01&amp;#x27;, &amp;#x27;value&amp;#x27;: &amp;#x27;&amp;#x27;, &amp;#x27;code&amp;#x27;: 200}\n&#34;}], &#34;test_case/test_bpm.py::TestBPM::test_request_bpm[PUT-http://36.139.193.99:8088/api/demension/v1/dem/setDefaultDem-query-case_data10-expect_data10-None-None-None]&#34;: [{&#34;extras&#34;: [], &#34;result&#34;: &#34;Failed&#34;, &#34;testId&#34;: &#34;test_case/test_bpm.py::TestBPM::test_request_bpm[PUT-http://36.139.193.99:8088/api/demension/v1/dem/setDefaultDem-query-case_data10-expect_data10-None-None-None]&#34;, &#34;duration&#34;: &#34;23 ms&#34;, &#34;resultsTableRow&#34;: [&#34;&lt;td class=\&#34;col-result\&#34;&gt;Failed&lt;/td&gt;&#34;, &#34;&lt;td class=\&#34;col-testId\&#34;&gt;test_case/test_bpm.py::TestBPM::test_request_bpm[PUT-http://36.139.193.99:8088/api/demension/v1/dem/setDefaultDem-query-case_data10-expect_data10-None-None-None]&lt;/td&gt;&#34;, &#34;&lt;td class=\&#34;col-duration\&#34;&gt;23 ms&lt;/td&gt;&#34;, &#34;&lt;td class=\&#34;col-links\&#34;&gt;&lt;/td&gt;&#34;], &#34;log&#34;: &#34;self = &amp;lt;APIAutoTest_V2_1.test_case.test_bpm.TestBPM object at 0x00000207CE745410&amp;gt;\nreq_fix = &amp;lt;APIAutoTest_V2_1.request_method.request_method.RequestMethod object at 0x00000207CE7A30D0&amp;gt;\ndb_fix = &amp;lt;APIAutoTest_V2_1.commen.db.DB object at 0x00000207CE2AE410&amp;gt;, req_method = &amp;#x27;PUT&amp;#x27;\nreq_url = &amp;#x27;http://36.139.193.99:8088/api/demension/v1/dem/setDefaultDem&amp;#x27;, req_mime = &amp;#x27;query&amp;#x27;, case_data = {&amp;#x27;code&amp;#x27;: &amp;#x27;test_dem_xyz_123&amp;#x27;}\nexpect_data = {&amp;#x27;message&amp;#x27;: &amp;#x27;\u8bbe\u7f6e\u9ed8\u8ba4\u7ef4\u5ea6\u6210\u529f\uff01&amp;#x27;}, sql_type = None, sql_data = None, update_key = None\n\n @pytest.mark.parametrize(&amp;quot;req_method, req_url, req_mime, case_data, expect_data, sql_type, sql_data, update_key&amp;quot;, ReadExcel().get_data_all())\n def test_request_bpm(self, req_fix, db_fix, req_method, req_url, req_mime, case_data, expect_data, sql_type, sql_data, update_key):\n # print(req_method, req_url, req_mime, case_data, expect_data, sql_type, sql_data, update_key)\n if sql_type == &amp;quot;delete&amp;quot;:\n db_fix.delete(sql_data)\n result = req_fix.request_all(req_method, req_url, req_mime, case_data)\n print(result.json())\n \n elif sql_type == &amp;quot;select&amp;quot;:\n select_result = db_fix.select(sql_data)\n print(&amp;quot;\u67e5\u8be2\u7ed3\u679c\u4e3a\uff1a&amp;quot;, select_result)\n case_data[update_key] = select_result\n \n result = req_fix.request_all(req_method, req_url, req_mime, case_data)\n print(result.json())\n \n \n else:\n result = req_fix.request_all(req_method, req_url, req_mime, case_data)\n print(result.json())\n \n try:\n for key in expect_data.keys():\n&amp;gt; assert expect_data[key] == result.json().get(key)\nE AssertionError: assert &amp;#x27;\u8bbe\u7f6e\u9ed8\u8ba4\u7ef4\u5ea6\u6210\u529f\uff01&amp;#x27; == &amp;#x27;\u8bbe\u7f6e\u9ed8\u8ba4\u7ef4\u5ea6\u5931\u8d25\uff0c\u7ef4\u5ea6\u7f16\u7801\u3010test_dem_xyz_123\u3011\u4e0d\u5b58\u5728\uff01&amp;#x27;\nE \nE - \u8bbe\u7f6e\u9ed8\u8ba4\u7ef4\u5ea6\u5931\u8d25\uff0c\u7ef4\u5ea6\u7f16\u7801\u3010test_dem_xyz_123\u3011\u4e0d\u5b58\u5728\uff01\nE + \u8bbe\u7f6e\u9ed8\u8ba4\u7ef4\u5ea6\u6210\u529f\uff01\n\ntest_case\\test_bpm.py:39: AssertionError\n\nDuring handling of the above exception, another exception occurred:\n\nself = &amp;lt;APIAutoTest_V2_1.test_case.test_bpm.TestBPM object at 0x00000207CE745410&amp;gt;\nreq_fix = &amp;lt;APIAutoTest_V2_1.request_method.request_method.RequestMethod object at 0x00000207CE7A30D0&amp;gt;\ndb_fix = &amp;lt;APIAutoTest_V2_1.commen.db.DB object at 0x00000207CE2AE410&amp;gt;, req_method = &amp;#x27;PUT&amp;#x27;\nreq_url = &amp;#x27;http://36.139.193.99:8088/api/demension/v1/dem/setDefaultDem&amp;#x27;, req_mime = &amp;#x27;query&amp;#x27;, case_data = {&amp;#x27;code&amp;#x27;: &amp;#x27;test_dem_xyz_123&amp;#x27;}\nexpect_data = {&amp;#x27;message&amp;#x27;: &amp;#x27;\u8bbe\u7f6e\u9ed8\u8ba4\u7ef4\u5ea6\u6210\u529f\uff01&amp;#x27;}, sql_type = None, sql_data = None, update_key = None\n\n @pytest.mark.parametrize(&amp;quot;req_method, req_url, req_mime, case_data, expect_data, sql_type, sql_data, update_key&amp;quot;, ReadExcel().get_data_all())\n def test_request_bpm(self, req_fix, db_fix, req_method, req_url, req_mime, case_data, expect_data, sql_type, sql_data, update_key):\n # print(req_method, req_url, req_mime, case_data, expect_data, sql_type, sql_data, update_key)\n if sql_type == &amp;quot;delete&amp;quot;:\n db_fix.delete(sql_data)\n result = req_fix.request_all(req_method, req_url, req_mime, case_data)\n print(result.json())\n \n elif sql_type == &amp;quot;select&amp;quot;:\n select_result = db_fix.select(sql_data)\n print(&amp;quot;\u67e5\u8be2\u7ed3\u679c\u4e3a\uff1a&amp;quot;, select_result)\n case_data[update_key] = select_result\n \n result = req_fix.request_all(req_method, req_url, req_mime, case_data)\n print(result.json())\n \n \n else:\n result = req_fix.request_all(req_method, req_url, req_mime, case_data)\n print(result.json())\n \n try:\n for key in expect_data.keys():\n assert expect_data[key] == result.json().get(key)\n except:\n&amp;gt; raise AssertionError(&amp;quot;\u65ad\u8a00\u5931\u8d25&amp;quot;)\nE AssertionError: \u65ad\u8a00\u5931\u8d25\n\ntest_case\\test_bpm.py:41: AssertionError\n\n----------------------------- Captured stdout call -----------------------------\n{&amp;#x27;state&amp;#x27;: False, &amp;#x27;message&amp;#x27;: &amp;#x27;\u8bbe\u7f6e\u9ed8\u8ba4\u7ef4\u5ea6\u5931\u8d25\uff0c\u7ef4\u5ea6\u7f16\u7801\u3010test_dem_xyz_123\u3011\u4e0d\u5b58\u5728\uff01&amp;#x27;, &amp;#x27;code&amp;#x27;: 200, &amp;#x27;logId&amp;#x27;: &amp;#x27;1813015009132388352&amp;#x27;}\n&#34;}], &#34;test_case/test_bpm.py::TestBPM::test_request_bpm[DELETE-http://36.139.193.99:8088/api/demension/v1/dem/deleteDemByIds-query-case_data11-expect_data11-select-SELECT ID_ FROM uc_demension WHERE `CODE_`=\&#34;test_dem_xyz_123\&#34;;-ids]&#34;: [{&#34;extras&#34;: [], &#34;result&#34;: &#34;Failed&#34;, &#34;testId&#34;: &#34;test_case/test_bpm.py::TestBPM::test_request_bpm[DELETE-http://36.139.193.99:8088/api/demension/v1/dem/deleteDemByIds-query-case_data11-expect_data11-select-SELECT ID_ FROM uc_demension WHERE `CODE_`=\&#34;test_dem_xyz_123\&#34;;-ids]&#34;, &#34;duration&#34;: &#34;35 ms&#34;, &#34;resultsTableRow&#34;: [&#34;&lt;td class=\&#34;col-result\&#34;&gt;Failed&lt;/td&gt;&#34;, &#34;&lt;td class=\&#34;col-testId\&#34;&gt;test_case/test_bpm.py::TestBPM::test_request_bpm[DELETE-http://36.139.193.99:8088/api/demension/v1/dem/deleteDemByIds-query-case_data11-expect_data11-select-SELECT ID_ FROM uc_demension WHERE `CODE_`=\&#34;test_dem_xyz_123\&#34;;-ids]&lt;/td&gt;&#34;, &#34;&lt;td class=\&#34;col-duration\&#34;&gt;35 ms&lt;/td&gt;&#34;, &#34;&lt;td class=\&#34;col-links\&#34;&gt;&lt;/td&gt;&#34;], &#34;log&#34;: &#34;self = &amp;lt;APIAutoTest_V2_1.test_case.test_bpm.TestBPM object at 0x00000207CE746810&amp;gt;\nreq_fix = &amp;lt;APIAutoTest_V2_1.request_method.request_method.RequestMethod object at 0x00000207CE7A30D0&amp;gt;\ndb_fix = &amp;lt;APIAutoTest_V2_1.commen.db.DB object at 0x00000207CE2AE410&amp;gt;, req_method = &amp;#x27;DELETE&amp;#x27;\nreq_url = &amp;#x27;http://36.139.193.99:8088/api/demension/v1/dem/deleteDemByIds&amp;#x27;, req_mime = &amp;#x27;query&amp;#x27;, case_data = {&amp;#x27;ids&amp;#x27;: &amp;#x27;1812818742032834560&amp;#x27;}\nexpect_data = {&amp;#x27;message&amp;#x27;: &amp;#x27;\u5220\u9664\u7ef4\u5ea6\u6210\u529f&amp;#x27;}, sql_type = &amp;#x27;select&amp;#x27;, sql_data = &amp;#x27;SELECT ID_ FROM uc_demension WHERE `CODE_`=&amp;quot;test_dem_xyz_123&amp;quot;;&amp;#x27;\nupdate_key = &amp;#x27;ids&amp;#x27;\n\n @pytest.mark.parametrize(&amp;quot;req_method, req_url, req_mime, case_data, expect_data, sql_type, sql_data, update_key&amp;quot;, ReadExcel().get_data_all())\n def test_request_bpm(self, req_fix, db_fix, req_method, req_url, req_mime, case_data, expect_data, sql_type, sql_data, update_key):\n # print(req_method, req_url, req_mime, case_data, expect_data, sql_type, sql_data, update_key)\n if sql_type == &amp;quot;delete&amp;quot;:\n db_fix.delete(sql_data)\n result = req_fix.request_all(req_method, req_url, req_mime, case_data)\n print(result.json())\n \n elif sql_type == &amp;quot;select&amp;quot;:\n select_result = db_fix.select(sql_data)\n print(&amp;quot;\u67e5\u8be2\u7ed3\u679c\u4e3a\uff1a&amp;quot;, select_result)\n case_data[update_key] = select_result\n \n result = req_fix.request_all(req_method, req_url, req_mime, case_data)\n print(result.json())\n \n \n else:\n result = req_fix.request_all(req_method, req_url, req_mime, case_data)\n print(result.json())\n \n try:\n for key in expect_data.keys():\n&amp;gt; assert expect_data[key] == result.json().get(key)\nE AssertionError: assert &amp;#x27;\u5220\u9664\u7ef4\u5ea6\u6210\u529f&amp;#x27; == &amp;#x27;&amp;#x27;\nE \nE + \u5220\u9664\u7ef4\u5ea6\u6210\u529f\n\ntest_case\\test_bpm.py:39: AssertionError\n\nDuring handling of the above exception, another exception occurred:\n\nself = &amp;lt;APIAutoTest_V2_1.test_case.test_bpm.TestBPM object at 0x00000207CE746810&amp;gt;\nreq_fix = &amp;lt;APIAutoTest_V2_1.request_method.request_method.RequestMethod object at 0x00000207CE7A30D0&amp;gt;\ndb_fix = &amp;lt;APIAutoTest_V2_1.commen.db.DB object at 0x00000207CE2AE410&amp;gt;, req_method = &amp;#x27;DELETE&amp;#x27;\nreq_url = &amp;#x27;http://36.139.193.99:8088/api/demension/v1/dem/deleteDemByIds&amp;#x27;, req_mime = &amp;#x27;query&amp;#x27;, case_data = {&amp;#x27;ids&amp;#x27;: &amp;#x27;1812818742032834560&amp;#x27;}\nexpect_data = {&amp;#x27;message&amp;#x27;: &amp;#x27;\u5220\u9664\u7ef4\u5ea6\u6210\u529f&amp;#x27;}, sql_type = &amp;#x27;select&amp;#x27;, sql_data = &amp;#x27;SELECT ID_ FROM uc_demension WHERE `CODE_`=&amp;quot;test_dem_xyz_123&amp;quot;;&amp;#x27;\nupdate_key = &amp;#x27;ids&amp;#x27;\n\n @pytest.mark.parametrize(&amp;quot;req_method, req_url, req_mime, case_data, expect_data, sql_type, sql_data, update_key&amp;quot;, ReadExcel().get_data_all())\n def test_request_bpm(self, req_fix, db_fix, req_method, req_url, req_mime, case_data, expect_data, sql_type, sql_data, update_key):\n # print(req_method, req_url, req_mime, case_data, expect_data, sql_type, sql_data, update_key)\n if sql_type == &amp;quot;delete&amp;quot;:\n db_fix.delete(sql_data)\n result = req_fix.request_all(req_method, req_url, req_mime, case_data)\n print(result.json())\n \n elif sql_type == &amp;quot;select&amp;quot;:\n select_result = db_fix.select(sql_data)\n print(&amp;quot;\u67e5\u8be2\u7ed3\u679c\u4e3a\uff1a&amp;quot;, select_result)\n case_data[update_key] = select_result\n \n result = req_fix.request_all(req_method, req_url, req_mime, case_data)\n print(result.json())\n \n \n else:\n result = req_fix.request_all(req_method, req_url, req_mime, case_data)\n print(result.json())\n \n try:\n for key in expect_data.keys():\n assert expect_data[key] == result.json().get(key)\n except:\n&amp;gt; raise AssertionError(&amp;quot;\u65ad\u8a00\u5931\u8d25&amp;quot;)\nE AssertionError: \u65ad\u8a00\u5931\u8d25\n\ntest_case\\test_bpm.py:41: AssertionError\n\n----------------------------- Captured stdout call -----------------------------\n\u67e5\u8be2\u7ed3\u679c\u4e3a\uff1a 1812818742032834560\n{&amp;#x27;state&amp;#x27;: False, &amp;#x27;message&amp;#x27;: &amp;#x27;&amp;#x27;, &amp;#x27;code&amp;#x27;: 200, &amp;#x27;logId&amp;#x27;: &amp;#x27;1813015009333714944&amp;#x27;}\n&#34;}]}, &#34;renderCollapsed&#34;: [&#34;passed&#34;], &#34;initialSort&#34;: &#34;result&#34;, &#34;title&#34;: &#34;bpm_report.html&#34;}"></div>
<script>
(function(){function r(e,n,t){function o(i,f){if(!n[i]){if(!e[i]){var c="function"==typeof require&&require;if(!f&&c)return c(i,!0);if(u)return u(i,!0);var a=new Error("Cannot find module '"+i+"'");throw a.code="MODULE_NOT_FOUND",a}var p=n[i]={exports:{}};e[i][0].call(p.exports,function(r){var n=e[i][1][r];return o(n||r)},p,p.exports,r,e,n,t)}return n[i].exports}for(var u="function"==typeof require&&require,i=0;i<t.length;i++)o(t[i]);return o}return r})()({1:[function(require,module,exports){
const { getCollapsedCategory, setCollapsedIds } = require('./storage.js')
class DataManager {
setManager(data) {
const collapsedCategories = [...getCollapsedCategory(data.renderCollapsed)]
const collapsedIds = []
const tests = Object.values(data.tests).flat().map((test, index) => {
const collapsed = collapsedCategories.includes(test.result.toLowerCase())
const id = `test_${index}`
if (collapsed) {
collapsedIds.push(id)
}
return {
...test,
id,
collapsed,
}
})
const dataBlob = { ...data, tests }
this.data = { ...dataBlob }
this.renderData = { ...dataBlob }
setCollapsedIds(collapsedIds)
}
get allData() {
return { ...this.data }
}
resetRender() {
this.renderData = { ...this.data }
}
setRender(data) {
this.renderData.tests = [...data]
}
toggleCollapsedItem(id) {
this.renderData.tests = this.renderData.tests.map((test) =>
test.id === id ? { ...test, collapsed: !test.collapsed } : test,
)
}
set allCollapsed(collapsed) {
this.renderData = { ...this.renderData, tests: [...this.renderData.tests.map((test) => (
{ ...test, collapsed }
))] }
}
get testSubset() {
return [...this.renderData.tests]
}
get environment() {
return this.renderData.environment
}
get initialSort() {
return this.data.initialSort
}
}
module.exports = {
manager: new DataManager(),
}
},{"./storage.js":8}],2:[function(require,module,exports){
const mediaViewer = require('./mediaviewer.js')
const templateEnvRow = document.getElementById('template_environment_row')
const templateResult = document.getElementById('template_results-table__tbody')
function htmlToElements(html) {
const temp = document.createElement('template')
temp.innerHTML = html
return temp.content.childNodes
}
const find = (selector, elem) => {
if (!elem) {
elem = document
}
return elem.querySelector(selector)
}
const findAll = (selector, elem) => {
if (!elem) {
elem = document
}
return [...elem.querySelectorAll(selector)]
}
const dom = {
getStaticRow: (key, value) => {
const envRow = templateEnvRow.content.cloneNode(true)
const isObj = typeof value === 'object' && value !== null
const values = isObj ? Object.keys(value).map((k) => `${k}: ${value[k]}`) : null
const valuesElement = htmlToElements(
values ? `<ul>${values.map((val) => `<li>${val}</li>`).join('')}<ul>` : `<div>${value}</div>`)[0]
const td = findAll('td', envRow)
td[0].textContent = key
td[1].appendChild(valuesElement)
return envRow
},
getResultTBody: ({ testId, id, log, extras, resultsTableRow, tableHtml, result, collapsed }) => {
const resultBody = templateResult.content.cloneNode(true)
resultBody.querySelector('tbody').classList.add(result.toLowerCase())
resultBody.querySelector('tbody').id = testId
resultBody.querySelector('.collapsible').dataset.id = id
resultsTableRow.forEach((html) => {
const t = document.createElement('template')
t.innerHTML = html
resultBody.querySelector('.collapsible').appendChild(t.content)
})
if (log) {
// Wrap lines starting with "E" with span.error to color those lines red
const wrappedLog = log.replace(/^E.*$/gm, (match) => `<span class="error">${match}</span>`)
resultBody.querySelector('.log').innerHTML = wrappedLog
} else {
resultBody.querySelector('.log').remove()
}
if (collapsed) {
resultBody.querySelector('.collapsible > td')?.classList.add('collapsed')
resultBody.querySelector('.extras-row').classList.add('hidden')
} else {
resultBody.querySelector('.collapsible > td')?.classList.remove('collapsed')
}
const media = []
extras?.forEach(({ name, format_type, content }) => {
if (['image', 'video'].includes(format_type)) {
media.push({ path: content, name, format_type })
}
if (format_type === 'html') {
resultBody.querySelector('.extraHTML').insertAdjacentHTML('beforeend', `<div>${content}</div>`)
}
})
mediaViewer.setup(resultBody, media)
// Add custom html from the pytest_html_results_table_html hook
tableHtml?.forEach((item) => {
resultBody.querySelector('td[class="extra"]').insertAdjacentHTML('beforeend', item)
})
return resultBody
},
}
module.exports = {
dom,
htmlToElements,
find,
findAll,
}
},{"./mediaviewer.js":6}],3:[function(require,module,exports){
const { manager } = require('./datamanager.js')
const { doSort } = require('./sort.js')
const storageModule = require('./storage.js')
const getFilteredSubSet = (filter) =>
manager.allData.tests.filter(({ result }) => filter.includes(result.toLowerCase()))
const doInitFilter = () => {
const currentFilter = storageModule.getVisible()
const filteredSubset = getFilteredSubSet(currentFilter)
manager.setRender(filteredSubset)
}
const doFilter = (type, show) => {
if (show) {
storageModule.showCategory(type)
} else {
storageModule.hideCategory(type)
}
const currentFilter = storageModule.getVisible()
const filteredSubset = getFilteredSubSet(currentFilter)
manager.setRender(filteredSubset)
const sortColumn = storageModule.getSort()
doSort(sortColumn, true)
}
module.exports = {
doFilter,
doInitFilter,
}
},{"./datamanager.js":1,"./sort.js":7,"./storage.js":8}],4:[function(require,module,exports){
const { redraw, bindEvents, renderStatic } = require('./main.js')
const { doInitFilter } = require('./filter.js')
const { doInitSort } = require('./sort.js')
const { manager } = require('./datamanager.js')
const data = JSON.parse(document.getElementById('data-container').dataset.jsonblob)
function init() {
manager.setManager(data)
doInitFilter()
doInitSort()
renderStatic()
redraw()
bindEvents()
}
init()
},{"./datamanager.js":1,"./filter.js":3,"./main.js":5,"./sort.js":7}],5:[function(require,module,exports){
const { dom, find, findAll } = require('./dom.js')
const { manager } = require('./datamanager.js')
const { doSort } = require('./sort.js')
const { doFilter } = require('./filter.js')
const {
getVisible,
getCollapsedIds,
setCollapsedIds,
getSort,
getSortDirection,
possibleFilters,
} = require('./storage.js')
const removeChildren = (node) => {
while (node.firstChild) {
node.removeChild(node.firstChild)
}
}
const renderStatic = () => {
const renderEnvironmentTable = () => {
const environment = manager.environment
const rows = Object.keys(environment).map((key) => dom.getStaticRow(key, environment[key]))
const table = document.getElementById('environment')
removeChildren(table)
rows.forEach((row) => table.appendChild(row))
}
renderEnvironmentTable()
}
const addItemToggleListener = (elem) => {
elem.addEventListener('click', ({ target }) => {
const id = target.parentElement.dataset.id
manager.toggleCollapsedItem(id)
const collapsedIds = getCollapsedIds()
if (collapsedIds.includes(id)) {
const updated = collapsedIds.filter((item) => item !== id)
setCollapsedIds(updated)
} else {
collapsedIds.push(id)
setCollapsedIds(collapsedIds)
}
redraw()
})
}
const renderContent = (tests) => {
const sortAttr = getSort(manager.initialSort)
const sortAsc = JSON.parse(getSortDirection())
const rows = tests.map(dom.getResultTBody)
const table = document.getElementById('results-table')
const tableHeader = document.getElementById('results-table-head')
const newTable = document.createElement('table')
newTable.id = 'results-table'
// remove all sorting classes and set the relevant
findAll('.sortable', tableHeader).forEach((elem) => elem.classList.remove('asc', 'desc'))
tableHeader.querySelector(`.sortable[data-column-type="${sortAttr}"]`)?.classList.add(sortAsc ? 'desc' : 'asc')
newTable.appendChild(tableHeader)
if (!rows.length) {
const emptyTable = document.getElementById('template_results-table__body--empty').content.cloneNode(true)
newTable.appendChild(emptyTable)
} else {
rows.forEach((row) => {
if (!!row) {
findAll('.collapsible td:not(.col-links', row).forEach(addItemToggleListener)
find('.logexpander', row).addEventListener('click',
(evt) => evt.target.parentNode.classList.toggle('expanded'),
)
newTable.appendChild(row)
}
})
}
table.replaceWith(newTable)
}
const renderDerived = () => {
const currentFilter = getVisible()
possibleFilters.forEach((result) => {
const input = document.querySelector(`input[data-test-result="${result}"]`)
input.checked = currentFilter.includes(result)
})
}
const bindEvents = () => {
const filterColumn = (evt) => {
const { target: element } = evt
const { testResult } = element.dataset
doFilter(testResult, element.checked)
const collapsedIds = getCollapsedIds()
const updated = manager.renderData.tests.map((test) => {
return {
...test,
collapsed: collapsedIds.includes(test.id),
}
})
manager.setRender(updated)
redraw()
}
const header = document.getElementById('environment-header')
header.addEventListener('click', () => {
const table = document.getElementById('environment')
table.classList.toggle('hidden')
header.classList.toggle('collapsed')
})
findAll('input[name="filter_checkbox"]').forEach((elem) => {
elem.addEventListener('click', filterColumn)
})
findAll('.sortable').forEach((elem) => {
elem.addEventListener('click', (evt) => {
const { target: element } = evt
const { columnType } = element.dataset
doSort(columnType)
redraw()
})
})
document.getElementById('show_all_details').addEventListener('click', () => {
manager.allCollapsed = false
setCollapsedIds([])
redraw()
})
document.getElementById('hide_all_details').addEventListener('click', () => {
manager.allCollapsed = true
const allIds = manager.renderData.tests.map((test) => test.id)
setCollapsedIds(allIds)
redraw()
})
}
const redraw = () => {
const { testSubset } = manager
renderContent(testSubset)
renderDerived()
}
module.exports = {
redraw,
bindEvents,
renderStatic,
}
},{"./datamanager.js":1,"./dom.js":2,"./filter.js":3,"./sort.js":7,"./storage.js":8}],6:[function(require,module,exports){
class MediaViewer {
constructor(assets) {
this.assets = assets
this.index = 0
}
nextActive() {
this.index = this.index === this.assets.length - 1 ? 0 : this.index + 1
return [this.activeFile, this.index]
}
prevActive() {
this.index = this.index === 0 ? this.assets.length - 1 : this.index -1
return [this.activeFile, this.index]
}
get currentIndex() {
return this.index
}
get activeFile() {
return this.assets[this.index]
}
}
const setup = (resultBody, assets) => {
if (!assets.length) {
resultBody.querySelector('.media').classList.add('hidden')
return
}
const mediaViewer = new MediaViewer(assets)
const container = resultBody.querySelector('.media-container')
const leftArrow = resultBody.querySelector('.media-container__nav--left')
const rightArrow = resultBody.querySelector('.media-container__nav--right')
const mediaName = resultBody.querySelector('.media__name')
const counter = resultBody.querySelector('.media__counter')
const imageEl = resultBody.querySelector('img')
const sourceEl = resultBody.querySelector('source')
const videoEl = resultBody.querySelector('video')
const setImg = (media, index) => {
if (media?.format_type === 'image') {
imageEl.src = media.path
imageEl.classList.remove('hidden')
videoEl.classList.add('hidden')
} else if (media?.format_type === 'video') {
sourceEl.src = media.path
videoEl.classList.remove('hidden')
imageEl.classList.add('hidden')
}
mediaName.innerText = media?.name
counter.innerText = `${index + 1} / ${assets.length}`
}
setImg(mediaViewer.activeFile, mediaViewer.currentIndex)
const moveLeft = () => {
const [media, index] = mediaViewer.prevActive()
setImg(media, index)
}
const doRight = () => {
const [media, index] = mediaViewer.nextActive()
setImg(media, index)
}
const openImg = () => {
window.open(mediaViewer.activeFile.path, '_blank')
}
if (assets.length === 1) {
container.classList.add('media-container--fullscreen')
} else {
leftArrow.addEventListener('click', moveLeft)
rightArrow.addEventListener('click', doRight)
}
imageEl.addEventListener('click', openImg)
}
module.exports = {
setup,
}
},{}],7:[function(require,module,exports){
const { manager } = require('./datamanager.js')
const storageModule = require('./storage.js')
const genericSort = (list, key, ascending, customOrder) => {
let sorted
if (customOrder) {
sorted = list.sort((a, b) => {
const aValue = a.result.toLowerCase()
const bValue = b.result.toLowerCase()
const aIndex = customOrder.findIndex((item) => item.toLowerCase() === aValue)
const bIndex = customOrder.findIndex((item) => item.toLowerCase() === bValue)
// Compare the indices to determine the sort order
return aIndex - bIndex
})
} else {
sorted = list.sort((a, b) => a[key] === b[key] ? 0 : a[key] > b[key] ? 1 : -1)
}
if (ascending) {
sorted.reverse()
}
return sorted
}
const durationSort = (list, ascending) => {
const parseDuration = (duration) => {
if (duration.includes(':')) {
// If it's in the format "HH:mm:ss"
const [hours, minutes, seconds] = duration.split(':').map(Number)
return (hours * 3600 + minutes * 60 + seconds) * 1000
} else {
// If it's in the format "nnn ms"
return parseInt(duration)
}
}
const sorted = list.sort((a, b) => parseDuration(a['duration']) - parseDuration(b['duration']))
if (ascending) {
sorted.reverse()
}
return sorted
}
const doInitSort = () => {
const type = storageModule.getSort(manager.initialSort)
const ascending = storageModule.getSortDirection()
const list = manager.testSubset
const initialOrder = ['Error', 'Failed', 'Rerun', 'XFailed', 'XPassed', 'Skipped', 'Passed']
storageModule.setSort(type)
storageModule.setSortDirection(ascending)
if (type?.toLowerCase() === 'original') {
manager.setRender(list)
} else {
let sortedList
switch (type) {
case 'duration':
sortedList = durationSort(list, ascending)
break
case 'result':
sortedList = genericSort(list, type, ascending, initialOrder)
break
default:
sortedList = genericSort(list, type, ascending)
break
}
manager.setRender(sortedList)
}
}
const doSort = (type, skipDirection) => {
const newSortType = storageModule.getSort(manager.initialSort) !== type
const currentAsc = storageModule.getSortDirection()
let ascending
if (skipDirection) {
ascending = currentAsc
} else {
ascending = newSortType ? false : !currentAsc
}
storageModule.setSort(type)
storageModule.setSortDirection(ascending)
const list = manager.testSubset
const sortedList = type === 'duration' ? durationSort(list, ascending) : genericSort(list, type, ascending)
manager.setRender(sortedList)
}
module.exports = {
doInitSort,
doSort,
}
},{"./datamanager.js":1,"./storage.js":8}],8:[function(require,module,exports){
const possibleFilters = [
'passed',
'skipped',
'failed',
'error',
'xfailed',
'xpassed',
'rerun',
]
const getVisible = () => {
const url = new URL(window.location.href)
const settings = new URLSearchParams(url.search).get('visible')
const lower = (item) => {
const lowerItem = item.toLowerCase()
if (possibleFilters.includes(lowerItem)) {
return lowerItem
}
return null
}
return settings === null ?
possibleFilters :
[...new Set(settings?.split(',').map(lower).filter((item) => item))]
}
const hideCategory = (categoryToHide) => {
const url = new URL(window.location.href)
const visibleParams = new URLSearchParams(url.search).get('visible')
const currentVisible = visibleParams ? visibleParams.split(',') : [...possibleFilters]
const settings = [...new Set(currentVisible)].filter((f) => f !== categoryToHide).join(',')
url.searchParams.set('visible', settings)
window.history.pushState({}, null, unescape(url.href))
}
const showCategory = (categoryToShow) => {
if (typeof window === 'undefined') {
return
}
const url = new URL(window.location.href)
const currentVisible = new URLSearchParams(url.search).get('visible')?.split(',').filter(Boolean) ||
[...possibleFilters]
const settings = [...new Set([categoryToShow, ...currentVisible])]
const noFilter = possibleFilters.length === settings.length || !settings.length
noFilter ? url.searchParams.delete('visible') : url.searchParams.set('visible', settings.join(','))
window.history.pushState({}, null, unescape(url.href))
}
const getSort = (initialSort) => {
const url = new URL(window.location.href)
let sort = new URLSearchParams(url.search).get('sort')
if (!sort) {
sort = initialSort || 'result'
}
return sort
}
const setSort = (type) => {
const url = new URL(window.location.href)
url.searchParams.set('sort', type)
window.history.pushState({}, null, unescape(url.href))
}
const getCollapsedCategory = (renderCollapsed) => {
let categories
if (typeof window !== 'undefined') {
const url = new URL(window.location.href)
const collapsedItems = new URLSearchParams(url.search).get('collapsed')
switch (true) {
case !renderCollapsed && collapsedItems === null:
categories = ['passed']
break
case collapsedItems?.length === 0 || /^["']{2}$/.test(collapsedItems):
categories = []
break
case /^all$/.test(collapsedItems) || collapsedItems === null && /^all$/.test(renderCollapsed):
categories = [...possibleFilters]
break
default:
categories = collapsedItems?.split(',').map((item) => item.toLowerCase()) || renderCollapsed
break
}
} else {
categories = []
}
return categories
}
const getSortDirection = () => JSON.parse(sessionStorage.getItem('sortAsc')) || false
const setSortDirection = (ascending) => sessionStorage.setItem('sortAsc', ascending)
const getCollapsedIds = () => JSON.parse(sessionStorage.getItem('collapsedIds')) || []
const setCollapsedIds = (list) => sessionStorage.setItem('collapsedIds', JSON.stringify(list))
module.exports = {
getVisible,
hideCategory,
showCategory,
getCollapsedIds,
setCollapsedIds,
getSort,
setSort,
getSortDirection,
setSortDirection,
getCollapsedCategory,
possibleFilters,
}
},{}]},{},[4]);
</script>
</footer>
</html>
\ No newline at end of file
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8"/>
<title id="head-title">bpm_report.html</title>
<style type="text/css">body {
font-family: Helvetica, Arial, sans-serif;
font-size: 12px;
/* do not increase min-width as some may use split screens */
min-width: 800px;
color: #999;
}
h1 {
font-size: 24px;
color: black;
}
h2 {
font-size: 16px;
color: black;
}
p {
color: black;
}
a {
color: #999;
}
table {
border-collapse: collapse;
}
/******************************
* SUMMARY INFORMATION
******************************/
#environment td {
padding: 5px;
border: 1px solid #e6e6e6;
vertical-align: top;
}
#environment tr:nth-child(odd) {
background-color: #f6f6f6;
}
#environment ul {
margin: 0;
padding: 0 20px;
}
/******************************
* TEST RESULT COLORS
******************************/
span.passed,
.passed .col-result {
color: green;
}
span.skipped,
span.xfailed,
span.rerun,
.skipped .col-result,
.xfailed .col-result,
.rerun .col-result {
color: orange;
}
span.error,
span.failed,
span.xpassed,
.error .col-result,
.failed .col-result,
.xpassed .col-result {
color: red;
}
.col-links__extra {
margin-right: 3px;
}
/******************************
* RESULTS TABLE
*
* 1. Table Layout
* 2. Extra
* 3. Sorting items
*
******************************/
/*------------------
* 1. Table Layout
*------------------*/
#results-table {
border: 1px solid #e6e6e6;
color: #999;
font-size: 12px;
width: 100%;
}
#results-table th,
#results-table td {
padding: 5px;
border: 1px solid #e6e6e6;
text-align: left;
}
#results-table th {
font-weight: bold;
}
/*------------------
* 2. Extra
*------------------*/
.logwrapper {
max-height: 230px;
overflow-y: scroll;
background-color: #e6e6e6;
}
.logwrapper.expanded {
max-height: none;
}
.logwrapper.expanded .logexpander:after {
content: "collapse [-]";
}
.logwrapper .logexpander {
z-index: 1;
position: sticky;
top: 10px;
width: max-content;
border: 1px solid;
border-radius: 3px;
padding: 5px 7px;
margin: 10px 0 10px calc(100% - 80px);
cursor: pointer;
background-color: #e6e6e6;
}
.logwrapper .logexpander:after {
content: "expand [+]";
}
.logwrapper .logexpander:hover {
color: #000;
border-color: #000;
}
.logwrapper .log {
min-height: 40px;
position: relative;
top: -50px;
height: calc(100% + 50px);
border: 1px solid #e6e6e6;
color: black;
display: block;
font-family: "Courier New", Courier, monospace;
padding: 5px;
padding-right: 80px;
white-space: pre-wrap;
}
div.media {
border: 1px solid #e6e6e6;
float: right;
height: 240px;
margin: 0 5px;
overflow: hidden;
width: 320px;
}
.media-container {
display: grid;
grid-template-columns: 25px auto 25px;
align-items: center;
flex: 1 1;
overflow: hidden;
height: 200px;
}
.media-container--fullscreen {
grid-template-columns: 0px auto 0px;
}
.media-container__nav--right,
.media-container__nav--left {
text-align: center;
cursor: pointer;
}
.media-container__viewport {
cursor: pointer;
text-align: center;
height: inherit;
}
.media-container__viewport img,
.media-container__viewport video {
object-fit: cover;
width: 100%;
max-height: 100%;
}
.media__name,
.media__counter {
display: flex;
flex-direction: row;
justify-content: space-around;
flex: 0 0 25px;
align-items: center;
}
.collapsible td:not(.col-links) {
cursor: pointer;
}
.collapsible td:not(.col-links):hover::after {
color: #bbb;
font-style: italic;
cursor: pointer;
}
.col-result {
width: 130px;
}
.col-result:hover::after {
content: " (hide details)";
}
.col-result.collapsed:hover::after {
content: " (show details)";
}
#environment-header h2:hover::after {
content: " (hide details)";
color: #bbb;
font-style: italic;
cursor: pointer;
font-size: 12px;
}
#environment-header.collapsed h2:hover::after {
content: " (show details)";
color: #bbb;
font-style: italic;
cursor: pointer;
font-size: 12px;
}
/*------------------
* 3. Sorting items
*------------------*/
.sortable {
cursor: pointer;
}
.sortable.desc:after {
content: " ";
position: relative;
left: 5px;
bottom: -12.5px;
border: 10px solid #4caf50;
border-bottom: 0;
border-left-color: transparent;
border-right-color: transparent;
}
.sortable.asc:after {
content: " ";
position: relative;
left: 5px;
bottom: 12.5px;
border: 10px solid #4caf50;
border-top: 0;
border-left-color: transparent;
border-right-color: transparent;
}
.hidden, .summary__reload__button.hidden {
display: none;
}
.summary__data {
flex: 0 0 550px;
}
.summary__reload {
flex: 1 1;
display: flex;
justify-content: center;
}
.summary__reload__button {
flex: 0 0 300px;
display: flex;
color: white;
font-weight: bold;
background-color: #4caf50;
text-align: center;
justify-content: center;
align-items: center;
border-radius: 3px;
cursor: pointer;
}
.summary__reload__button:hover {
background-color: #46a049;
}
.summary__spacer {
flex: 0 0 550px;
}
.controls {
display: flex;
justify-content: space-between;
}
.filters,
.collapse {
display: flex;
align-items: center;
}
.filters button,
.collapse button {
color: #999;
border: none;
background: none;
cursor: pointer;
text-decoration: underline;
}
.filters button:hover,
.collapse button:hover {
color: #ccc;
}
.filter__label {
margin-right: 10px;
}
</style>
</head>
<body>
<h1 id="title">bpm_report.html</h1>
<p>Report generated on 16-Jul-2024 at 19:28:05 by <a href="https://pypi.python.org/pypi/pytest-html">pytest-html</a>
v4.1.1</p>
<div id="environment-header">
<h2>Environment</h2>
</div>
<table id="environment"></table>
<!-- TEMPLATES -->
<template id="template_environment_row">
<tr>
<td></td>
<td></td>
</tr>
</template>
<template id="template_results-table__body--empty">
<tbody class="results-table-row">
<tr id="not-found-message">
<td colspan="4">No results found. Check the filters.</th>
</tr>
</template>
<template id="template_results-table__tbody">
<tbody class="results-table-row">
<tr class="collapsible">
</tr>
<tr class="extras-row">
<td class="extra" colspan="4">
<div class="extraHTML"></div>
<div class="media">
<div class="media-container">
<div class="media-container__nav--left"><</div>
<div class="media-container__viewport">
<img src="" />
<video controls>
<source src="" type="video/mp4">
</video>
</div>
<div class="media-container__nav--right">></div>
</div>
<div class="media__name"></div>
<div class="media__counter"></div>
</div>
<div class="logwrapper">
<div class="logexpander"></div>
<div class="log"></div>
</div>
</td>
</tr>
</tbody>
</template>
<!-- END TEMPLATES -->
<div class="summary">
<div class="summary__data">
<h2>Summary</h2>
<div class="additional-summary prefix">
</div>
<p class="run-count">12 tests took 608 ms.</p>
<p class="filter">(Un)check the boxes to filter the results.</p>
<div class="summary__reload">
<div class="summary__reload__button hidden" onclick="location.reload()">
<div>There are still tests running. <br />Reload this page to get the latest results!</div>
</div>
</div>
<div class="summary__spacer"></div>
<div class="controls">
<div class="filters">
<input checked="true" class="filter" name="filter_checkbox" type="checkbox" data-test-result="failed" />
<span class="failed">7 Failed,</span>
<input checked="true" class="filter" name="filter_checkbox" type="checkbox" data-test-result="passed" />
<span class="passed">5 Passed,</span>
<input checked="true" class="filter" name="filter_checkbox" type="checkbox" data-test-result="skipped" disabled/>
<span class="skipped">0 Skipped,</span>
<input checked="true" class="filter" name="filter_checkbox" type="checkbox" data-test-result="xfailed" disabled/>
<span class="xfailed">0 Expected failures,</span>
<input checked="true" class="filter" name="filter_checkbox" type="checkbox" data-test-result="xpassed" disabled/>
<span class="xpassed">0 Unexpected passes,</span>
<input checked="true" class="filter" name="filter_checkbox" type="checkbox" data-test-result="error" disabled/>
<span class="error">0 Errors,</span>
<input checked="true" class="filter" name="filter_checkbox" type="checkbox" data-test-result="rerun" disabled/>
<span class="rerun">0 Reruns</span>
</div>
<div class="collapse">
<button id="show_all_details">Show all details</button>&nbsp;/&nbsp;<button id="hide_all_details">Hide all details</button>
</div>
</div>
</div>
<div class="additional-summary summary">
</div>
<div class="additional-summary postfix">
</div>
</div>
<table id="results-table">
<thead id="results-table-head">
<tr>
<th class="sortable" data-column-type="result">Result</th>
<th class="sortable" data-column-type="testId">Test</th>
<th class="sortable" data-column-type="duration">Duration</th>
<th>Links</th>
</tr>
</thead>
</table>
</body>
<footer>
<div id="data-container" data-jsonblob="{&#34;environment&#34;: {&#34;Python&#34;: &#34;3.11.7&#34;, &#34;Platform&#34;: &#34;Windows-10-10.0.19045-SP0&#34;, &#34;Packages&#34;: {&#34;pytest&#34;: &#34;8.2.2&#34;, &#34;pluggy&#34;: &#34;1.5.0&#34;}, &#34;Plugins&#34;: {&#34;allure-pytest&#34;: &#34;2.13.5&#34;, &#34;Faker&#34;: &#34;25.8.0&#34;, &#34;html&#34;: &#34;4.1.1&#34;, &#34;metadata&#34;: &#34;3.1.1&#34;}, &#34;JAVA_HOME&#34;: &#34;C:\\Program Files\\Java\\jdk1.8.0_251&#34;}, &#34;tests&#34;: {&#34;test_case/test_bpm.py::TestBPM::test_request_bpm[POST-http://36.139.193.99:8088/auth-application/json-case_data0-expect_data0-None-None-None]&#34;: [{&#34;extras&#34;: [], &#34;result&#34;: &#34;Passed&#34;, &#34;testId&#34;: &#34;test_case/test_bpm.py::TestBPM::test_request_bpm[POST-http://36.139.193.99:8088/auth-application/json-case_data0-expect_data0-None-None-None]&#34;, &#34;duration&#34;: &#34;271 ms&#34;, &#34;resultsTableRow&#34;: [&#34;&lt;td class=\&#34;col-result\&#34;&gt;Passed&lt;/td&gt;&#34;, &#34;&lt;td class=\&#34;col-testId\&#34;&gt;test_case/test_bpm.py::TestBPM::test_request_bpm[POST-http://36.139.193.99:8088/auth-application/json-case_data0-expect_data0-None-None-None]&lt;/td&gt;&#34;, &#34;&lt;td class=\&#34;col-duration\&#34;&gt;271 ms&lt;/td&gt;&#34;, &#34;&lt;td class=\&#34;col-links\&#34;&gt;&lt;/td&gt;&#34;], &#34;log&#34;: &#34;----------------------------- Captured stdout call -----------------------------\n{&amp;#x27;token&amp;#x27;: &amp;#x27;eyJhbGciOiJIUzUxMiJ9.eyJzdWIiOiJhZG1pbiIsInRlbmFudElkIjoiLTEiLCJleHAiOjE3MjEyMTU2MjcsImlhdCI6MTcyMTEyOTIyN30.GNO5mHQozP05xcLroe0LPY82pzrpj4wauEW87D01o5yAZdC7hkkxqFXW2dWqLiQ-KMu2EPdabHS7GUIcwzHIrw&amp;#x27;, &amp;#x27;username&amp;#x27;: &amp;#x27;\u8d85\u7ea7\u7ba1\u7406\u5458&amp;#x27;, &amp;#x27;account&amp;#x27;: &amp;#x27;admin&amp;#x27;, &amp;#x27;userId&amp;#x27;: &amp;#x27;1&amp;#x27;, &amp;#x27;expiration&amp;#x27;: 86400, &amp;#x27;loginStatus&amp;#x27;: True, &amp;#x27;userAttrs&amp;#x27;: {&amp;#x27;tenantId&amp;#x27;: &amp;#x27;-1&amp;#x27;}}\n\u65ad\u8a00\u6210\u529f\n&#34;}], &#34;test_case/test_bpm.py::TestBPM::test_request_bpm[POST-http://36.139.193.99:8088/auth-Application/json-case_data1-expect_data1-None-None-None]&#34;: [{&#34;extras&#34;: [], &#34;result&#34;: &#34;Passed&#34;, &#34;testId&#34;: &#34;test_case/test_bpm.py::TestBPM::test_request_bpm[POST-http://36.139.193.99:8088/auth-Application/json-case_data1-expect_data1-None-None-None]&#34;, &#34;duration&#34;: &#34;26 ms&#34;, &#34;resultsTableRow&#34;: [&#34;&lt;td class=\&#34;col-result\&#34;&gt;Passed&lt;/td&gt;&#34;, &#34;&lt;td class=\&#34;col-testId\&#34;&gt;test_case/test_bpm.py::TestBPM::test_request_bpm[POST-http://36.139.193.99:8088/auth-Application/json-case_data1-expect_data1-None-None-None]&lt;/td&gt;&#34;, &#34;&lt;td class=\&#34;col-duration\&#34;&gt;26 ms&lt;/td&gt;&#34;, &#34;&lt;td class=\&#34;col-links\&#34;&gt;&lt;/td&gt;&#34;], &#34;log&#34;: &#34;----------------------------- Captured stdout call -----------------------------\n{&amp;#x27;state&amp;#x27;: False, &amp;#x27;message&amp;#x27;: &amp;#x27;\u8d26\u6237\u9519\u8bef\u6216\u8be5\u79df\u6237\u672a\u542f\u7528&amp;#x27;, &amp;#x27;code&amp;#x27;: 200, &amp;#x27;logId&amp;#x27;: &amp;#x27;1813173513885425664&amp;#x27;}\n\u65ad\u8a00\u6210\u529f\n&#34;}], &#34;test_case/test_bpm.py::TestBPM::test_request_bpm[POST-http://36.139.193.99:8088/auth-application/json-case_data2-expect_data2-None-None-None]&#34;: [{&#34;extras&#34;: [], &#34;result&#34;: &#34;Passed&#34;, &#34;testId&#34;: &#34;test_case/test_bpm.py::TestBPM::test_request_bpm[POST-http://36.139.193.99:8088/auth-application/json-case_data2-expect_data2-None-None-None]&#34;, &#34;duration&#34;: &#34;34 ms&#34;, &#34;resultsTableRow&#34;: [&#34;&lt;td class=\&#34;col-result\&#34;&gt;Passed&lt;/td&gt;&#34;, &#34;&lt;td class=\&#34;col-testId\&#34;&gt;test_case/test_bpm.py::TestBPM::test_request_bpm[POST-http://36.139.193.99:8088/auth-application/json-case_data2-expect_data2-None-None-None]&lt;/td&gt;&#34;, &#34;&lt;td class=\&#34;col-duration\&#34;&gt;34 ms&lt;/td&gt;&#34;, &#34;&lt;td class=\&#34;col-links\&#34;&gt;&lt;/td&gt;&#34;], &#34;log&#34;: &#34;----------------------------- Captured stdout call -----------------------------\n{&amp;#x27;state&amp;#x27;: False, &amp;#x27;message&amp;#x27;: &amp;#x27;\u8d26\u6237\u9519\u8bef\u6216\u8be5\u79df\u6237\u672a\u542f\u7528&amp;#x27;, &amp;#x27;code&amp;#x27;: 200, &amp;#x27;logId&amp;#x27;: &amp;#x27;1813173514036420608&amp;#x27;}\n\u65ad\u8a00\u6210\u529f\n&#34;}], &#34;test_case/test_bpm.py::TestBPM::test_request_bpm[POST-http://36.139.193.99:8088/auth-application/JSON-case_data3-expect_data3-None-None-None]&#34;: [{&#34;extras&#34;: [], &#34;result&#34;: &#34;Passed&#34;, &#34;testId&#34;: &#34;test_case/test_bpm.py::TestBPM::test_request_bpm[POST-http://36.139.193.99:8088/auth-application/JSON-case_data3-expect_data3-None-None-None]&#34;, &#34;duration&#34;: &#34;35 ms&#34;, &#34;resultsTableRow&#34;: [&#34;&lt;td class=\&#34;col-result\&#34;&gt;Passed&lt;/td&gt;&#34;, &#34;&lt;td class=\&#34;col-testId\&#34;&gt;test_case/test_bpm.py::TestBPM::test_request_bpm[POST-http://36.139.193.99:8088/auth-application/JSON-case_data3-expect_data3-None-None-None]&lt;/td&gt;&#34;, &#34;&lt;td class=\&#34;col-duration\&#34;&gt;35 ms&lt;/td&gt;&#34;, &#34;&lt;td class=\&#34;col-links\&#34;&gt;&lt;/td&gt;&#34;], &#34;log&#34;: &#34;----------------------------- Captured stdout call -----------------------------\n{&amp;#x27;state&amp;#x27;: False, &amp;#x27;message&amp;#x27;: &amp;#x27;\u8d26\u6237\u9519\u8bef\u6216\u8be5\u79df\u6237\u672a\u542f\u7528&amp;#x27;, &amp;#x27;code&amp;#x27;: 200, &amp;#x27;logId&amp;#x27;: &amp;#x27;1813173514187415552&amp;#x27;}\n\u65ad\u8a00\u6210\u529f\n&#34;}], &#34;test_case/test_bpm.py::TestBPM::test_request_bpm[POST-http://36.139.193.99:8088/auth-application/json-case_data4-expect_data4-None-None-None]&#34;: [{&#34;extras&#34;: [], &#34;result&#34;: &#34;Passed&#34;, &#34;testId&#34;: &#34;test_case/test_bpm.py::TestBPM::test_request_bpm[POST-http://36.139.193.99:8088/auth-application/json-case_data4-expect_data4-None-None-None]&#34;, &#34;duration&#34;: &#34;38 ms&#34;, &#34;resultsTableRow&#34;: [&#34;&lt;td class=\&#34;col-result\&#34;&gt;Passed&lt;/td&gt;&#34;, &#34;&lt;td class=\&#34;col-testId\&#34;&gt;test_case/test_bpm.py::TestBPM::test_request_bpm[POST-http://36.139.193.99:8088/auth-application/json-case_data4-expect_data4-None-None-None]&lt;/td&gt;&#34;, &#34;&lt;td class=\&#34;col-duration\&#34;&gt;38 ms&lt;/td&gt;&#34;, &#34;&lt;td class=\&#34;col-links\&#34;&gt;&lt;/td&gt;&#34;], &#34;log&#34;: &#34;----------------------------- Captured stdout call -----------------------------\n{&amp;#x27;state&amp;#x27;: False, &amp;#x27;message&amp;#x27;: &amp;#x27;\u8d26\u6237\u9519\u8bef\u6216\u8be5\u79df\u6237\u672a\u542f\u7528&amp;#x27;, &amp;#x27;code&amp;#x27;: 200, &amp;#x27;logId&amp;#x27;: &amp;#x27;1813173514350993408&amp;#x27;}\n\u65ad\u8a00\u6210\u529f\n&#34;}], &#34;test_case/test_bpm.py::TestBPM::test_request_bpm[POST-http://36.139.193.99:8088/auth-application/json-case_data5-expect_data5-None-None-None]&#34;: [{&#34;extras&#34;: [], &#34;result&#34;: &#34;Failed&#34;, &#34;testId&#34;: &#34;test_case/test_bpm.py::TestBPM::test_request_bpm[POST-http://36.139.193.99:8088/auth-application/json-case_data5-expect_data5-None-None-None]&#34;, &#34;duration&#34;: &#34;39 ms&#34;, &#34;resultsTableRow&#34;: [&#34;&lt;td class=\&#34;col-result\&#34;&gt;Failed&lt;/td&gt;&#34;, &#34;&lt;td class=\&#34;col-testId\&#34;&gt;test_case/test_bpm.py::TestBPM::test_request_bpm[POST-http://36.139.193.99:8088/auth-application/json-case_data5-expect_data5-None-None-None]&lt;/td&gt;&#34;, &#34;&lt;td class=\&#34;col-duration\&#34;&gt;39 ms&lt;/td&gt;&#34;, &#34;&lt;td class=\&#34;col-links\&#34;&gt;&lt;/td&gt;&#34;], &#34;log&#34;: &#34;self = &amp;lt;APIAutoTest_V2_1.test_case.test_bpm.TestBPM object at 0x000002B66C4F8650&amp;gt;\nreq_fix = &amp;lt;APIAutoTest_V2_1.request_method.request_method.RequestMethod object at 0x000002B66BF59110&amp;gt;\ndb_fix = &amp;lt;APIAutoTest_V2_1.commen.db.DB object at 0x000002B66C048450&amp;gt;, req_method = &amp;#x27;POST&amp;#x27;, req_url = &amp;#x27;http://36.139.193.99:8088/auth&amp;#x27;\nreq_mime = &amp;#x27;application/json&amp;#x27;, case_data = {&amp;#x27;password&amp;#x27;: &amp;#x27;&amp;#x27;, &amp;#x27;username&amp;#x27;: &amp;#x27;admin&amp;#x27;}, expect_data = {&amp;#x27;message&amp;#x27;: &amp;#x27;\u8d26\u6237\u9519\u8bef\u6216\u8be5\u79df\u6237\u672a\u542f\u7528&amp;#x27;, &amp;#x27;state&amp;#x27;: False}\nsql_type = None, sql_data = None, update_key = None\n\n @pytest.mark.parametrize(&amp;quot;req_method, req_url, req_mime, case_data, expect_data, sql_type, sql_data, update_key&amp;quot;, ReadExcel().get_data_all())\n def test_request_bpm(self, req_fix, db_fix, req_method, req_url, req_mime, case_data, expect_data, sql_type, sql_data, update_key):\n # print(req_method, req_url, req_mime, case_data, expect_data, sql_type, sql_data, update_key)\n if sql_type == &amp;quot;delete&amp;quot;:\n db_fix.delete(sql_data)\n result = req_fix.request_all(req_method, req_url, req_mime, case_data)\n print(result.json())\n \n elif sql_type == &amp;quot;select&amp;quot;:\n select_result = db_fix.select(sql_data)\n print(&amp;quot;\u67e5\u8be2\u7ed3\u679c\u4e3a\uff1a&amp;quot;, select_result)\n case_data[update_key] = select_result\n \n result = req_fix.request_all(req_method, req_url, req_mime, case_data)\n print(result.json())\n \n \n else:\n result = req_fix.request_all(req_method, req_url, req_mime, case_data)\n print(result.json())\n \n try:\n for key in expect_data.keys():\n&amp;gt; assert expect_data[key] == result.json().get(key)\nE AssertionError: assert &amp;#x27;\u8d26\u6237\u9519\u8bef\u6216\u8be5\u79df\u6237\u672a\u542f\u7528&amp;#x27; == &amp;#x27;\u8d26\u53f7\u6216\u5bc6\u7801\u9519\u8bef&amp;#x27;\nE \nE - \u8d26\u53f7\u6216\u5bc6\u7801\u9519\u8bef\nE + \u8d26\u6237\u9519\u8bef\u6216\u8be5\u79df\u6237\u672a\u542f\u7528\n\ntest_case\\test_bpm.py:39: AssertionError\n\nDuring handling of the above exception, another exception occurred:\n\nself = &amp;lt;APIAutoTest_V2_1.test_case.test_bpm.TestBPM object at 0x000002B66C4F8650&amp;gt;\nreq_fix = &amp;lt;APIAutoTest_V2_1.request_method.request_method.RequestMethod object at 0x000002B66BF59110&amp;gt;\ndb_fix = &amp;lt;APIAutoTest_V2_1.commen.db.DB object at 0x000002B66C048450&amp;gt;, req_method = &amp;#x27;POST&amp;#x27;, req_url = &amp;#x27;http://36.139.193.99:8088/auth&amp;#x27;\nreq_mime = &amp;#x27;application/json&amp;#x27;, case_data = {&amp;#x27;password&amp;#x27;: &amp;#x27;&amp;#x27;, &amp;#x27;username&amp;#x27;: &amp;#x27;admin&amp;#x27;}, expect_data = {&amp;#x27;message&amp;#x27;: &amp;#x27;\u8d26\u6237\u9519\u8bef\u6216\u8be5\u79df\u6237\u672a\u542f\u7528&amp;#x27;, &amp;#x27;state&amp;#x27;: False}\nsql_type = None, sql_data = None, update_key = None\n\n @pytest.mark.parametrize(&amp;quot;req_method, req_url, req_mime, case_data, expect_data, sql_type, sql_data, update_key&amp;quot;, ReadExcel().get_data_all())\n def test_request_bpm(self, req_fix, db_fix, req_method, req_url, req_mime, case_data, expect_data, sql_type, sql_data, update_key):\n # print(req_method, req_url, req_mime, case_data, expect_data, sql_type, sql_data, update_key)\n if sql_type == &amp;quot;delete&amp;quot;:\n db_fix.delete(sql_data)\n result = req_fix.request_all(req_method, req_url, req_mime, case_data)\n print(result.json())\n \n elif sql_type == &amp;quot;select&amp;quot;:\n select_result = db_fix.select(sql_data)\n print(&amp;quot;\u67e5\u8be2\u7ed3\u679c\u4e3a\uff1a&amp;quot;, select_result)\n case_data[update_key] = select_result\n \n result = req_fix.request_all(req_method, req_url, req_mime, case_data)\n print(result.json())\n \n \n else:\n result = req_fix.request_all(req_method, req_url, req_mime, case_data)\n print(result.json())\n \n try:\n for key in expect_data.keys():\n assert expect_data[key] == result.json().get(key)\n except:\n&amp;gt; raise AssertionError(&amp;quot;\u65ad\u8a00\u5931\u8d25&amp;quot;)\nE AssertionError: \u65ad\u8a00\u5931\u8d25\n\ntest_case\\test_bpm.py:41: AssertionError\n\n----------------------------- Captured stdout call -----------------------------\n{&amp;#x27;state&amp;#x27;: False, &amp;#x27;message&amp;#x27;: &amp;#x27;\u8d26\u53f7\u6216\u5bc6\u7801\u9519\u8bef&amp;#x27;, &amp;#x27;code&amp;#x27;: 200, &amp;#x27;logId&amp;#x27;: &amp;#x27;1813173514518765568&amp;#x27;}\n&#34;}], &#34;test_case/test_bpm.py::TestBPM::test_request_bpm[POST-http://36.139.193.99:8088/auth-application/json-case_data6-expect_data6-None-None-None]&#34;: [{&#34;extras&#34;: [], &#34;result&#34;: &#34;Failed&#34;, &#34;testId&#34;: &#34;test_case/test_bpm.py::TestBPM::test_request_bpm[POST-http://36.139.193.99:8088/auth-application/json-case_data6-expect_data6-None-None-None]&#34;, &#34;duration&#34;: &#34;35 ms&#34;, &#34;resultsTableRow&#34;: [&#34;&lt;td class=\&#34;col-result\&#34;&gt;Failed&lt;/td&gt;&#34;, &#34;&lt;td class=\&#34;col-testId\&#34;&gt;test_case/test_bpm.py::TestBPM::test_request_bpm[POST-http://36.139.193.99:8088/auth-application/json-case_data6-expect_data6-None-None-None]&lt;/td&gt;&#34;, &#34;&lt;td class=\&#34;col-duration\&#34;&gt;35 ms&lt;/td&gt;&#34;, &#34;&lt;td class=\&#34;col-links\&#34;&gt;&lt;/td&gt;&#34;], &#34;log&#34;: &#34;self = &amp;lt;APIAutoTest_V2_1.test_case.test_bpm.TestBPM object at 0x000002B66C4FAB90&amp;gt;\nreq_fix = &amp;lt;APIAutoTest_V2_1.request_method.request_method.RequestMethod object at 0x000002B66BF59110&amp;gt;\ndb_fix = &amp;lt;APIAutoTest_V2_1.commen.db.DB object at 0x000002B66C048450&amp;gt;, req_method = &amp;#x27;POST&amp;#x27;, req_url = &amp;#x27;http://36.139.193.99:8088/auth&amp;#x27;\nreq_mime = &amp;#x27;application/json&amp;#x27;, case_data = {&amp;#x27;password&amp;#x27;: &amp;#x27;1&amp;#x27;, &amp;#x27;username&amp;#x27;: &amp;#x27;admin&amp;#x27;}, expect_data = {&amp;#x27;message&amp;#x27;: &amp;#x27;\u8d26\u6237\u9519\u8bef\u6216\u8be5\u79df\u6237\u672a\u542f\u7528&amp;#x27;, &amp;#x27;state&amp;#x27;: False}\nsql_type = None, sql_data = None, update_key = None\n\n @pytest.mark.parametrize(&amp;quot;req_method, req_url, req_mime, case_data, expect_data, sql_type, sql_data, update_key&amp;quot;, ReadExcel().get_data_all())\n def test_request_bpm(self, req_fix, db_fix, req_method, req_url, req_mime, case_data, expect_data, sql_type, sql_data, update_key):\n # print(req_method, req_url, req_mime, case_data, expect_data, sql_type, sql_data, update_key)\n if sql_type == &amp;quot;delete&amp;quot;:\n db_fix.delete(sql_data)\n result = req_fix.request_all(req_method, req_url, req_mime, case_data)\n print(result.json())\n \n elif sql_type == &amp;quot;select&amp;quot;:\n select_result = db_fix.select(sql_data)\n print(&amp;quot;\u67e5\u8be2\u7ed3\u679c\u4e3a\uff1a&amp;quot;, select_result)\n case_data[update_key] = select_result\n \n result = req_fix.request_all(req_method, req_url, req_mime, case_data)\n print(result.json())\n \n \n else:\n result = req_fix.request_all(req_method, req_url, req_mime, case_data)\n print(result.json())\n \n try:\n for key in expect_data.keys():\n&amp;gt; assert expect_data[key] == result.json().get(key)\nE AssertionError: assert &amp;#x27;\u8d26\u6237\u9519\u8bef\u6216\u8be5\u79df\u6237\u672a\u542f\u7528&amp;#x27; == &amp;#x27;\u8d26\u53f7\u6216\u5bc6\u7801\u9519\u8bef&amp;#x27;\nE \nE - \u8d26\u53f7\u6216\u5bc6\u7801\u9519\u8bef\nE + \u8d26\u6237\u9519\u8bef\u6216\u8be5\u79df\u6237\u672a\u542f\u7528\n\ntest_case\\test_bpm.py:39: AssertionError\n\nDuring handling of the above exception, another exception occurred:\n\nself = &amp;lt;APIAutoTest_V2_1.test_case.test_bpm.TestBPM object at 0x000002B66C4FAB90&amp;gt;\nreq_fix = &amp;lt;APIAutoTest_V2_1.request_method.request_method.RequestMethod object at 0x000002B66BF59110&amp;gt;\ndb_fix = &amp;lt;APIAutoTest_V2_1.commen.db.DB object at 0x000002B66C048450&amp;gt;, req_method = &amp;#x27;POST&amp;#x27;, req_url = &amp;#x27;http://36.139.193.99:8088/auth&amp;#x27;\nreq_mime = &amp;#x27;application/json&amp;#x27;, case_data = {&amp;#x27;password&amp;#x27;: &amp;#x27;1&amp;#x27;, &amp;#x27;username&amp;#x27;: &amp;#x27;admin&amp;#x27;}, expect_data = {&amp;#x27;message&amp;#x27;: &amp;#x27;\u8d26\u6237\u9519\u8bef\u6216\u8be5\u79df\u6237\u672a\u542f\u7528&amp;#x27;, &amp;#x27;state&amp;#x27;: False}\nsql_type = None, sql_data = None, update_key = None\n\n @pytest.mark.parametrize(&amp;quot;req_method, req_url, req_mime, case_data, expect_data, sql_type, sql_data, update_key&amp;quot;, ReadExcel().get_data_all())\n def test_request_bpm(self, req_fix, db_fix, req_method, req_url, req_mime, case_data, expect_data, sql_type, sql_data, update_key):\n # print(req_method, req_url, req_mime, case_data, expect_data, sql_type, sql_data, update_key)\n if sql_type == &amp;quot;delete&amp;quot;:\n db_fix.delete(sql_data)\n result = req_fix.request_all(req_method, req_url, req_mime, case_data)\n print(result.json())\n \n elif sql_type == &amp;quot;select&amp;quot;:\n select_result = db_fix.select(sql_data)\n print(&amp;quot;\u67e5\u8be2\u7ed3\u679c\u4e3a\uff1a&amp;quot;, select_result)\n case_data[update_key] = select_result\n \n result = req_fix.request_all(req_method, req_url, req_mime, case_data)\n print(result.json())\n \n \n else:\n result = req_fix.request_all(req_method, req_url, req_mime, case_data)\n print(result.json())\n \n try:\n for key in expect_data.keys():\n assert expect_data[key] == result.json().get(key)\n except:\n&amp;gt; raise AssertionError(&amp;quot;\u65ad\u8a00\u5931\u8d25&amp;quot;)\nE AssertionError: \u65ad\u8a00\u5931\u8d25\n\ntest_case\\test_bpm.py:41: AssertionError\n\n----------------------------- Captured stdout call -----------------------------\n{&amp;#x27;state&amp;#x27;: False, &amp;#x27;message&amp;#x27;: &amp;#x27;\u8d26\u53f7\u6216\u5bc6\u7801\u9519\u8bef&amp;#x27;, &amp;#x27;code&amp;#x27;: 200, &amp;#x27;logId&amp;#x27;: &amp;#x27;1813173515714142208&amp;#x27;}\n&#34;}], &#34;test_case/test_bpm.py::TestBPM::test_request_bpm[POST-http://36.139.193.99:8088/auth-application/json-case_data7-expect_data7-None-None-None]&#34;: [{&#34;extras&#34;: [], &#34;result&#34;: &#34;Failed&#34;, &#34;testId&#34;: &#34;test_case/test_bpm.py::TestBPM::test_request_bpm[POST-http://36.139.193.99:8088/auth-application/json-case_data7-expect_data7-None-None-None]&#34;, &#34;duration&#34;: &#34;49 ms&#34;, &#34;resultsTableRow&#34;: [&#34;&lt;td class=\&#34;col-result\&#34;&gt;Failed&lt;/td&gt;&#34;, &#34;&lt;td class=\&#34;col-testId\&#34;&gt;test_case/test_bpm.py::TestBPM::test_request_bpm[POST-http://36.139.193.99:8088/auth-application/json-case_data7-expect_data7-None-None-None]&lt;/td&gt;&#34;, &#34;&lt;td class=\&#34;col-duration\&#34;&gt;49 ms&lt;/td&gt;&#34;, &#34;&lt;td class=\&#34;col-links\&#34;&gt;&lt;/td&gt;&#34;], &#34;log&#34;: &#34;self = &amp;lt;APIAutoTest_V2_1.test_case.test_bpm.TestBPM object at 0x000002B66C4F9050&amp;gt;\nreq_fix = &amp;lt;APIAutoTest_V2_1.request_method.request_method.RequestMethod object at 0x000002B66BF59110&amp;gt;\ndb_fix = &amp;lt;APIAutoTest_V2_1.commen.db.DB object at 0x000002B66C048450&amp;gt;, req_method = &amp;#x27;POST&amp;#x27;, req_url = &amp;#x27;http://36.139.193.99:8088/auth&amp;#x27;\nreq_mime = &amp;#x27;application/json&amp;#x27;\ncase_data = {&amp;#x27;password&amp;#x27;: &amp;#x27;F4/DVgPS/NEruLxVVRqHktsb1R2fVpw81t5VuGfFjwp0G7U4k6spHPr/ejPlw8XxIVilJ+SyIH0G5FbQStFEd/94mmI7+2Dw2c7MXXIE...5FbQStFEd/94mmI7+2Dw2c7MXXIERYKjd3XNe4gZR4ANJclCJHNGfE+mtnX5voprYwEo9m6ponCdmmXTMx9cWVEJ4K/nbR8=&amp;#x27;, &amp;#x27;username&amp;#x27;: &amp;#x27;admin&amp;#x27;}\nexpect_data = {&amp;#x27;message&amp;#x27;: &amp;#x27;\u8d26\u6237\u9519\u8bef\u6216\u8be5\u79df\u6237\u672a\u542f\u7528&amp;#x27;, &amp;#x27;state&amp;#x27;: False}, sql_type = None, sql_data = None, update_key = None\n\n @pytest.mark.parametrize(&amp;quot;req_method, req_url, req_mime, case_data, expect_data, sql_type, sql_data, update_key&amp;quot;, ReadExcel().get_data_all())\n def test_request_bpm(self, req_fix, db_fix, req_method, req_url, req_mime, case_data, expect_data, sql_type, sql_data, update_key):\n # print(req_method, req_url, req_mime, case_data, expect_data, sql_type, sql_data, update_key)\n if sql_type == &amp;quot;delete&amp;quot;:\n db_fix.delete(sql_data)\n result = req_fix.request_all(req_method, req_url, req_mime, case_data)\n print(result.json())\n \n elif sql_type == &amp;quot;select&amp;quot;:\n select_result = db_fix.select(sql_data)\n print(&amp;quot;\u67e5\u8be2\u7ed3\u679c\u4e3a\uff1a&amp;quot;, select_result)\n case_data[update_key] = select_result\n \n result = req_fix.request_all(req_method, req_url, req_mime, case_data)\n print(result.json())\n \n \n else:\n result = req_fix.request_all(req_method, req_url, req_mime, case_data)\n print(result.json())\n \n try:\n for key in expect_data.keys():\n&amp;gt; assert expect_data[key] == result.json().get(key)\nE AssertionError: assert False == None\nE + where None = &amp;lt;built-in method get of dict object at 0x000002B66C628680&amp;gt;(&amp;#x27;state&amp;#x27;)\nE + where &amp;lt;built-in method get of dict object at 0x000002B66C628680&amp;gt; = {&amp;#x27;account&amp;#x27;: &amp;#x27;admin&amp;#x27;, &amp;#x27;expiration&amp;#x27;: 86400, &amp;#x27;loginStatus&amp;#x27;: True, &amp;#x27;token&amp;#x27;: &amp;#x27;eyJhbGciOiJIUzUxMiJ9.eyJzdWIiOiJhZG1pbiIsInRlbmFudElkIjoiLTEiLCJleHAiOjE3MjEyMTU2MjcsImlhdCI6MTcyMTEyOTIyN30.GNO5mHQozP05xcLroe0LPY82pzrpj4wauEW87D01o5yAZdC7hkkxqFXW2dWqLiQ-KMu2EPdabHS7GUIcwzHIrw&amp;#x27;, ...}.get\nE + where {&amp;#x27;account&amp;#x27;: &amp;#x27;admin&amp;#x27;, &amp;#x27;expiration&amp;#x27;: 86400, &amp;#x27;loginStatus&amp;#x27;: True, &amp;#x27;token&amp;#x27;: &amp;#x27;eyJhbGciOiJIUzUxMiJ9.eyJzdWIiOiJhZG1pbiIsInRlbmFudElkIjoiLTEiLCJleHAiOjE3MjEyMTU2MjcsImlhdCI6MTcyMTEyOTIyN30.GNO5mHQozP05xcLroe0LPY82pzrpj4wauEW87D01o5yAZdC7hkkxqFXW2dWqLiQ-KMu2EPdabHS7GUIcwzHIrw&amp;#x27;, ...} = &amp;lt;bound method Response.json of &amp;lt;Response [200]&amp;gt;&amp;gt;()\nE + where &amp;lt;bound method Response.json of &amp;lt;Response [200]&amp;gt;&amp;gt; = &amp;lt;Response [200]&amp;gt;.json\n\ntest_case\\test_bpm.py:39: AssertionError\n\nDuring handling of the above exception, another exception occurred:\n\nself = &amp;lt;APIAutoTest_V2_1.test_case.test_bpm.TestBPM object at 0x000002B66C4F9050&amp;gt;\nreq_fix = &amp;lt;APIAutoTest_V2_1.request_method.request_method.RequestMethod object at 0x000002B66BF59110&amp;gt;\ndb_fix = &amp;lt;APIAutoTest_V2_1.commen.db.DB object at 0x000002B66C048450&amp;gt;, req_method = &amp;#x27;POST&amp;#x27;, req_url = &amp;#x27;http://36.139.193.99:8088/auth&amp;#x27;\nreq_mime = &amp;#x27;application/json&amp;#x27;\ncase_data = {&amp;#x27;password&amp;#x27;: &amp;#x27;F4/DVgPS/NEruLxVVRqHktsb1R2fVpw81t5VuGfFjwp0G7U4k6spHPr/ejPlw8XxIVilJ+SyIH0G5FbQStFEd/94mmI7+2Dw2c7MXXIE...5FbQStFEd/94mmI7+2Dw2c7MXXIERYKjd3XNe4gZR4ANJclCJHNGfE+mtnX5voprYwEo9m6ponCdmmXTMx9cWVEJ4K/nbR8=&amp;#x27;, &amp;#x27;username&amp;#x27;: &amp;#x27;admin&amp;#x27;}\nexpect_data = {&amp;#x27;message&amp;#x27;: &amp;#x27;\u8d26\u6237\u9519\u8bef\u6216\u8be5\u79df\u6237\u672a\u542f\u7528&amp;#x27;, &amp;#x27;state&amp;#x27;: False}, sql_type = None, sql_data = None, update_key = None\n\n @pytest.mark.parametrize(&amp;quot;req_method, req_url, req_mime, case_data, expect_data, sql_type, sql_data, update_key&amp;quot;, ReadExcel().get_data_all())\n def test_request_bpm(self, req_fix, db_fix, req_method, req_url, req_mime, case_data, expect_data, sql_type, sql_data, update_key):\n # print(req_method, req_url, req_mime, case_data, expect_data, sql_type, sql_data, update_key)\n if sql_type == &amp;quot;delete&amp;quot;:\n db_fix.delete(sql_data)\n result = req_fix.request_all(req_method, req_url, req_mime, case_data)\n print(result.json())\n \n elif sql_type == &amp;quot;select&amp;quot;:\n select_result = db_fix.select(sql_data)\n print(&amp;quot;\u67e5\u8be2\u7ed3\u679c\u4e3a\uff1a&amp;quot;, select_result)\n case_data[update_key] = select_result\n \n result = req_fix.request_all(req_method, req_url, req_mime, case_data)\n print(result.json())\n \n \n else:\n result = req_fix.request_all(req_method, req_url, req_mime, case_data)\n print(result.json())\n \n try:\n for key in expect_data.keys():\n assert expect_data[key] == result.json().get(key)\n except:\n&amp;gt; raise AssertionError(&amp;quot;\u65ad\u8a00\u5931\u8d25&amp;quot;)\nE AssertionError: \u65ad\u8a00\u5931\u8d25\n\ntest_case\\test_bpm.py:41: AssertionError\n\n----------------------------- Captured stdout call -----------------------------\n{&amp;#x27;token&amp;#x27;: &amp;#x27;eyJhbGciOiJIUzUxMiJ9.eyJzdWIiOiJhZG1pbiIsInRlbmFudElkIjoiLTEiLCJleHAiOjE3MjEyMTU2MjcsImlhdCI6MTcyMTEyOTIyN30.GNO5mHQozP05xcLroe0LPY82pzrpj4wauEW87D01o5yAZdC7hkkxqFXW2dWqLiQ-KMu2EPdabHS7GUIcwzHIrw&amp;#x27;, &amp;#x27;username&amp;#x27;: &amp;#x27;\u8d85\u7ea7\u7ba1\u7406\u5458&amp;#x27;, &amp;#x27;account&amp;#x27;: &amp;#x27;admin&amp;#x27;, &amp;#x27;userId&amp;#x27;: &amp;#x27;1&amp;#x27;, &amp;#x27;expiration&amp;#x27;: 86400, &amp;#x27;loginStatus&amp;#x27;: True, &amp;#x27;userAttrs&amp;#x27;: {&amp;#x27;tenantId&amp;#x27;: &amp;#x27;-1&amp;#x27;}}\n&#34;}], &#34;test_case/test_bpm.py::TestBPM::test_request_bpm[GET-http://36.139.193.99:8088/refresh-None-None-expect_data8-None-None-None]&#34;: [{&#34;extras&#34;: [], &#34;result&#34;: &#34;Failed&#34;, &#34;testId&#34;: &#34;test_case/test_bpm.py::TestBPM::test_request_bpm[GET-http://36.139.193.99:8088/refresh-None-None-expect_data8-None-None-None]&#34;, &#34;duration&#34;: &#34;1 ms&#34;, &#34;resultsTableRow&#34;: [&#34;&lt;td class=\&#34;col-result\&#34;&gt;Failed&lt;/td&gt;&#34;, &#34;&lt;td class=\&#34;col-testId\&#34;&gt;test_case/test_bpm.py::TestBPM::test_request_bpm[GET-http://36.139.193.99:8088/refresh-None-None-expect_data8-None-None-None]&lt;/td&gt;&#34;, &#34;&lt;td class=\&#34;col-duration\&#34;&gt;1 ms&lt;/td&gt;&#34;, &#34;&lt;td class=\&#34;col-links\&#34;&gt;&lt;/td&gt;&#34;], &#34;log&#34;: &#34;self = &amp;lt;APIAutoTest_V2_1.test_case.test_bpm.TestBPM object at 0x000002B66C4F8F50&amp;gt;\nreq_fix = &amp;lt;APIAutoTest_V2_1.request_method.request_method.RequestMethod object at 0x000002B66BF59110&amp;gt;\ndb_fix = &amp;lt;APIAutoTest_V2_1.commen.db.DB object at 0x000002B66C048450&amp;gt;, req_method = &amp;#x27;GET&amp;#x27;, req_url = &amp;#x27;http://36.139.193.99:8088/refresh&amp;#x27;\nreq_mime = None, case_data = None, expect_data = {&amp;#x27;message&amp;#x27;: &amp;#x27;\u5237\u65b0\u6210\u529f&amp;#x27;}, sql_type = None, sql_data = None, update_key = None\n\n @pytest.mark.parametrize(&amp;quot;req_method, req_url, req_mime, case_data, expect_data, sql_type, sql_data, update_key&amp;quot;, ReadExcel().get_data_all())\n def test_request_bpm(self, req_fix, db_fix, req_method, req_url, req_mime, case_data, expect_data, sql_type, sql_data, update_key):\n # print(req_method, req_url, req_mime, case_data, expect_data, sql_type, sql_data, update_key)\n if sql_type == &amp;quot;delete&amp;quot;:\n db_fix.delete(sql_data)\n result = req_fix.request_all(req_method, req_url, req_mime, case_data)\n print(result.json())\n \n elif sql_type == &amp;quot;select&amp;quot;:\n select_result = db_fix.select(sql_data)\n print(&amp;quot;\u67e5\u8be2\u7ed3\u679c\u4e3a\uff1a&amp;quot;, select_result)\n case_data[update_key] = select_result\n \n result = req_fix.request_all(req_method, req_url, req_mime, case_data)\n print(result.json())\n \n \n else:\n&amp;gt; result = req_fix.request_all(req_method, req_url, req_mime, case_data)\n\ntest_case\\test_bpm.py:34: \n_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _\n\nself = &amp;lt;APIAutoTest_V2_1.request_method.request_method.RequestMethod object at 0x000002B66BF59110&amp;gt;, req_method = &amp;#x27;GET&amp;#x27;\nreq_url = &amp;#x27;http://36.139.193.99:8088/refresh&amp;#x27;, req_mime = None, case_data = None\n\n def request_all(self, req_method, req_url, req_mime, case_data):\n &amp;quot;&amp;quot;&amp;quot;\u6839\u636e\u5a92\u4f53\u7c7b\u578b\u7684\u4e0d\u540c\uff0c\u6765\u51b3\u5b9a\u8bf7\u6c42\u65b9\u5f0f&amp;quot;&amp;quot;&amp;quot;\n&amp;gt; req_mime = req_mime.lower()\nE AttributeError: &amp;#x27;NoneType&amp;#x27; object has no attribute &amp;#x27;lower&amp;#x27;\n\nrequest_method\\request_method.py:28: AttributeError\n&#34;}], &#34;test_case/test_bpm.py::TestBPM::test_request_bpm[post-http://36.139.193.99:8088/api/demension/v1/dem/addDem-json-case_data9-expect_data9-Delete-DELETE FROM uc_demension WHERE `CODE_`=\&#34;test_dem_xyz_123\&#34;;-None]&#34;: [{&#34;extras&#34;: [], &#34;result&#34;: &#34;Failed&#34;, &#34;testId&#34;: &#34;test_case/test_bpm.py::TestBPM::test_request_bpm[post-http://36.139.193.99:8088/api/demension/v1/dem/addDem-json-case_data9-expect_data9-Delete-DELETE FROM uc_demension WHERE `CODE_`=\&#34;test_dem_xyz_123\&#34;;-None]&#34;, &#34;duration&#34;: &#34;22 ms&#34;, &#34;resultsTableRow&#34;: [&#34;&lt;td class=\&#34;col-result\&#34;&gt;Failed&lt;/td&gt;&#34;, &#34;&lt;td class=\&#34;col-testId\&#34;&gt;test_case/test_bpm.py::TestBPM::test_request_bpm[post-http://36.139.193.99:8088/api/demension/v1/dem/addDem-json-case_data9-expect_data9-Delete-DELETE FROM uc_demension WHERE `CODE_`=\&#34;test_dem_xyz_123\&#34;;-None]&lt;/td&gt;&#34;, &#34;&lt;td class=\&#34;col-duration\&#34;&gt;22 ms&lt;/td&gt;&#34;, &#34;&lt;td class=\&#34;col-links\&#34;&gt;&lt;/td&gt;&#34;], &#34;log&#34;: &#34;self = &amp;lt;APIAutoTest_V2_1.test_case.test_bpm.TestBPM object at 0x000002B66C4F9F90&amp;gt;\nreq_fix = &amp;lt;APIAutoTest_V2_1.request_method.request_method.RequestMethod object at 0x000002B66BF59110&amp;gt;\ndb_fix = &amp;lt;APIAutoTest_V2_1.commen.db.DB object at 0x000002B66C048450&amp;gt;, req_method = &amp;#x27;post&amp;#x27;\nreq_url = &amp;#x27;http://36.139.193.99:8088/api/demension/v1/dem/addDem&amp;#x27;, req_mime = &amp;#x27;json&amp;#x27;\ncase_data = {&amp;#x27;code&amp;#x27;: &amp;#x27;test_dem_xyz_123&amp;#x27;, &amp;#x27;description&amp;#x27;: &amp;#x27;\u6d4b\u8bd5\u7ef4\u5ea6&amp;#x27;, &amp;#x27;isDefault&amp;#x27;: 0, &amp;#x27;name&amp;#x27;: &amp;#x27;xyz\u6d4b\u8bd5\u7ef4\u5ea6&amp;#x27;}, expect_data = {&amp;#x27;message&amp;#x27;: &amp;#x27;\u6dfb\u52a0\u7ef4\u5ea6\u6210\u529f\uff01&amp;#x27;}\nsql_type = &amp;#x27;Delete&amp;#x27;, sql_data = &amp;#x27;DELETE FROM uc_demension WHERE `CODE_`=&amp;quot;test_dem_xyz_123&amp;quot;;&amp;#x27;, update_key = None\n\n @pytest.mark.parametrize(&amp;quot;req_method, req_url, req_mime, case_data, expect_data, sql_type, sql_data, update_key&amp;quot;, ReadExcel().get_data_all())\n def test_request_bpm(self, req_fix, db_fix, req_method, req_url, req_mime, case_data, expect_data, sql_type, sql_data, update_key):\n # print(req_method, req_url, req_mime, case_data, expect_data, sql_type, sql_data, update_key)\n if sql_type == &amp;quot;delete&amp;quot;:\n db_fix.delete(sql_data)\n result = req_fix.request_all(req_method, req_url, req_mime, case_data)\n print(result.json())\n \n elif sql_type == &amp;quot;select&amp;quot;:\n select_result = db_fix.select(sql_data)\n print(&amp;quot;\u67e5\u8be2\u7ed3\u679c\u4e3a\uff1a&amp;quot;, select_result)\n case_data[update_key] = select_result\n \n result = req_fix.request_all(req_method, req_url, req_mime, case_data)\n print(result.json())\n \n \n else:\n result = req_fix.request_all(req_method, req_url, req_mime, case_data)\n print(result.json())\n \n try:\n for key in expect_data.keys():\n&amp;gt; assert expect_data[key] == result.json().get(key)\nE AssertionError: assert &amp;#x27;\u6dfb\u52a0\u7ef4\u5ea6\u6210\u529f\uff01&amp;#x27; == &amp;#x27;\u6dfb\u52a0\u7ef4\u5ea6\u5931\u8d25\uff0c\u7ef4\u5ea6\u522b\u540d\u3010test_dem_xyz_123\u3011\u5728\u7cfb\u7edf\u4e2d\u5df2\u5b58\u5728\uff01&amp;#x27;\nE \nE - \u6dfb\u52a0\u7ef4\u5ea6\u5931\u8d25\uff0c\u7ef4\u5ea6\u522b\u540d\u3010test_dem_xyz_123\u3011\u5728\u7cfb\u7edf\u4e2d\u5df2\u5b58\u5728\uff01\nE + \u6dfb\u52a0\u7ef4\u5ea6\u6210\u529f\uff01\n\ntest_case\\test_bpm.py:39: AssertionError\n\nDuring handling of the above exception, another exception occurred:\n\nself = &amp;lt;APIAutoTest_V2_1.test_case.test_bpm.TestBPM object at 0x000002B66C4F9F90&amp;gt;\nreq_fix = &amp;lt;APIAutoTest_V2_1.request_method.request_method.RequestMethod object at 0x000002B66BF59110&amp;gt;\ndb_fix = &amp;lt;APIAutoTest_V2_1.commen.db.DB object at 0x000002B66C048450&amp;gt;, req_method = &amp;#x27;post&amp;#x27;\nreq_url = &amp;#x27;http://36.139.193.99:8088/api/demension/v1/dem/addDem&amp;#x27;, req_mime = &amp;#x27;json&amp;#x27;\ncase_data = {&amp;#x27;code&amp;#x27;: &amp;#x27;test_dem_xyz_123&amp;#x27;, &amp;#x27;description&amp;#x27;: &amp;#x27;\u6d4b\u8bd5\u7ef4\u5ea6&amp;#x27;, &amp;#x27;isDefault&amp;#x27;: 0, &amp;#x27;name&amp;#x27;: &amp;#x27;xyz\u6d4b\u8bd5\u7ef4\u5ea6&amp;#x27;}, expect_data = {&amp;#x27;message&amp;#x27;: &amp;#x27;\u6dfb\u52a0\u7ef4\u5ea6\u6210\u529f\uff01&amp;#x27;}\nsql_type = &amp;#x27;Delete&amp;#x27;, sql_data = &amp;#x27;DELETE FROM uc_demension WHERE `CODE_`=&amp;quot;test_dem_xyz_123&amp;quot;;&amp;#x27;, update_key = None\n\n @pytest.mark.parametrize(&amp;quot;req_method, req_url, req_mime, case_data, expect_data, sql_type, sql_data, update_key&amp;quot;, ReadExcel().get_data_all())\n def test_request_bpm(self, req_fix, db_fix, req_method, req_url, req_mime, case_data, expect_data, sql_type, sql_data, update_key):\n # print(req_method, req_url, req_mime, case_data, expect_data, sql_type, sql_data, update_key)\n if sql_type == &amp;quot;delete&amp;quot;:\n db_fix.delete(sql_data)\n result = req_fix.request_all(req_method, req_url, req_mime, case_data)\n print(result.json())\n \n elif sql_type == &amp;quot;select&amp;quot;:\n select_result = db_fix.select(sql_data)\n print(&amp;quot;\u67e5\u8be2\u7ed3\u679c\u4e3a\uff1a&amp;quot;, select_result)\n case_data[update_key] = select_result\n \n result = req_fix.request_all(req_method, req_url, req_mime, case_data)\n print(result.json())\n \n \n else:\n result = req_fix.request_all(req_method, req_url, req_mime, case_data)\n print(result.json())\n \n try:\n for key in expect_data.keys():\n assert expect_data[key] == result.json().get(key)\n except:\n&amp;gt; raise AssertionError(&amp;quot;\u65ad\u8a00\u5931\u8d25&amp;quot;)\nE AssertionError: \u65ad\u8a00\u5931\u8d25\n\ntest_case\\test_bpm.py:41: AssertionError\n\n----------------------------- Captured stdout call -----------------------------\n{&amp;#x27;state&amp;#x27;: False, &amp;#x27;message&amp;#x27;: &amp;#x27;\u6dfb\u52a0\u7ef4\u5ea6\u5931\u8d25\uff0c\u7ef4\u5ea6\u522b\u540d\u3010test_dem_xyz_123\u3011\u5728\u7cfb\u7edf\u4e2d\u5df2\u5b58\u5728\uff01&amp;#x27;, &amp;#x27;value&amp;#x27;: &amp;#x27;&amp;#x27;, &amp;#x27;code&amp;#x27;: 200}\n&#34;}], &#34;test_case/test_bpm.py::TestBPM::test_request_bpm[PUT-http://36.139.193.99:8088/api/demension/v1/dem/setDefaultDem-query-case_data10-expect_data10-None-None-None]&#34;: [{&#34;extras&#34;: [], &#34;result&#34;: &#34;Failed&#34;, &#34;testId&#34;: &#34;test_case/test_bpm.py::TestBPM::test_request_bpm[PUT-http://36.139.193.99:8088/api/demension/v1/dem/setDefaultDem-query-case_data10-expect_data10-None-None-None]&#34;, &#34;duration&#34;: &#34;21 ms&#34;, &#34;resultsTableRow&#34;: [&#34;&lt;td class=\&#34;col-result\&#34;&gt;Failed&lt;/td&gt;&#34;, &#34;&lt;td class=\&#34;col-testId\&#34;&gt;test_case/test_bpm.py::TestBPM::test_request_bpm[PUT-http://36.139.193.99:8088/api/demension/v1/dem/setDefaultDem-query-case_data10-expect_data10-None-None-None]&lt;/td&gt;&#34;, &#34;&lt;td class=\&#34;col-duration\&#34;&gt;21 ms&lt;/td&gt;&#34;, &#34;&lt;td class=\&#34;col-links\&#34;&gt;&lt;/td&gt;&#34;], &#34;log&#34;: &#34;self = &amp;lt;APIAutoTest_V2_1.test_case.test_bpm.TestBPM object at 0x000002B66C4F8E10&amp;gt;\nreq_fix = &amp;lt;APIAutoTest_V2_1.request_method.request_method.RequestMethod object at 0x000002B66BF59110&amp;gt;\ndb_fix = &amp;lt;APIAutoTest_V2_1.commen.db.DB object at 0x000002B66C048450&amp;gt;, req_method = &amp;#x27;PUT&amp;#x27;\nreq_url = &amp;#x27;http://36.139.193.99:8088/api/demension/v1/dem/setDefaultDem&amp;#x27;, req_mime = &amp;#x27;query&amp;#x27;, case_data = {&amp;#x27;code&amp;#x27;: &amp;#x27;test_dem_xyz_123&amp;#x27;}\nexpect_data = {&amp;#x27;message&amp;#x27;: &amp;#x27;\u8bbe\u7f6e\u9ed8\u8ba4\u7ef4\u5ea6\u6210\u529f\uff01&amp;#x27;}, sql_type = None, sql_data = None, update_key = None\n\n @pytest.mark.parametrize(&amp;quot;req_method, req_url, req_mime, case_data, expect_data, sql_type, sql_data, update_key&amp;quot;, ReadExcel().get_data_all())\n def test_request_bpm(self, req_fix, db_fix, req_method, req_url, req_mime, case_data, expect_data, sql_type, sql_data, update_key):\n # print(req_method, req_url, req_mime, case_data, expect_data, sql_type, sql_data, update_key)\n if sql_type == &amp;quot;delete&amp;quot;:\n db_fix.delete(sql_data)\n result = req_fix.request_all(req_method, req_url, req_mime, case_data)\n print(result.json())\n \n elif sql_type == &amp;quot;select&amp;quot;:\n select_result = db_fix.select(sql_data)\n print(&amp;quot;\u67e5\u8be2\u7ed3\u679c\u4e3a\uff1a&amp;quot;, select_result)\n case_data[update_key] = select_result\n \n result = req_fix.request_all(req_method, req_url, req_mime, case_data)\n print(result.json())\n \n \n else:\n result = req_fix.request_all(req_method, req_url, req_mime, case_data)\n print(result.json())\n \n try:\n for key in expect_data.keys():\n&amp;gt; assert expect_data[key] == result.json().get(key)\nE AssertionError: assert &amp;#x27;\u8bbe\u7f6e\u9ed8\u8ba4\u7ef4\u5ea6\u6210\u529f\uff01&amp;#x27; == &amp;#x27;\u8bbe\u7f6e\u9ed8\u8ba4\u7ef4\u5ea6\u5931\u8d25\uff0c\u7ef4\u5ea6\u7f16\u7801\u3010test_dem_xyz_123\u3011\u4e0d\u5b58\u5728\uff01&amp;#x27;\nE \nE - \u8bbe\u7f6e\u9ed8\u8ba4\u7ef4\u5ea6\u5931\u8d25\uff0c\u7ef4\u5ea6\u7f16\u7801\u3010test_dem_xyz_123\u3011\u4e0d\u5b58\u5728\uff01\nE + \u8bbe\u7f6e\u9ed8\u8ba4\u7ef4\u5ea6\u6210\u529f\uff01\n\ntest_case\\test_bpm.py:39: AssertionError\n\nDuring handling of the above exception, another exception occurred:\n\nself = &amp;lt;APIAutoTest_V2_1.test_case.test_bpm.TestBPM object at 0x000002B66C4F8E10&amp;gt;\nreq_fix = &amp;lt;APIAutoTest_V2_1.request_method.request_method.RequestMethod object at 0x000002B66BF59110&amp;gt;\ndb_fix = &amp;lt;APIAutoTest_V2_1.commen.db.DB object at 0x000002B66C048450&amp;gt;, req_method = &amp;#x27;PUT&amp;#x27;\nreq_url = &amp;#x27;http://36.139.193.99:8088/api/demension/v1/dem/setDefaultDem&amp;#x27;, req_mime = &amp;#x27;query&amp;#x27;, case_data = {&amp;#x27;code&amp;#x27;: &amp;#x27;test_dem_xyz_123&amp;#x27;}\nexpect_data = {&amp;#x27;message&amp;#x27;: &amp;#x27;\u8bbe\u7f6e\u9ed8\u8ba4\u7ef4\u5ea6\u6210\u529f\uff01&amp;#x27;}, sql_type = None, sql_data = None, update_key = None\n\n @pytest.mark.parametrize(&amp;quot;req_method, req_url, req_mime, case_data, expect_data, sql_type, sql_data, update_key&amp;quot;, ReadExcel().get_data_all())\n def test_request_bpm(self, req_fix, db_fix, req_method, req_url, req_mime, case_data, expect_data, sql_type, sql_data, update_key):\n # print(req_method, req_url, req_mime, case_data, expect_data, sql_type, sql_data, update_key)\n if sql_type == &amp;quot;delete&amp;quot;:\n db_fix.delete(sql_data)\n result = req_fix.request_all(req_method, req_url, req_mime, case_data)\n print(result.json())\n \n elif sql_type == &amp;quot;select&amp;quot;:\n select_result = db_fix.select(sql_data)\n print(&amp;quot;\u67e5\u8be2\u7ed3\u679c\u4e3a\uff1a&amp;quot;, select_result)\n case_data[update_key] = select_result\n \n result = req_fix.request_all(req_method, req_url, req_mime, case_data)\n print(result.json())\n \n \n else:\n result = req_fix.request_all(req_method, req_url, req_mime, case_data)\n print(result.json())\n \n try:\n for key in expect_data.keys():\n assert expect_data[key] == result.json().get(key)\n except:\n&amp;gt; raise AssertionError(&amp;quot;\u65ad\u8a00\u5931\u8d25&amp;quot;)\nE AssertionError: \u65ad\u8a00\u5931\u8d25\n\ntest_case\\test_bpm.py:41: AssertionError\n\n----------------------------- Captured stdout call -----------------------------\n{&amp;#x27;state&amp;#x27;: False, &amp;#x27;message&amp;#x27;: &amp;#x27;\u8bbe\u7f6e\u9ed8\u8ba4\u7ef4\u5ea6\u5931\u8d25\uff0c\u7ef4\u5ea6\u7f16\u7801\u3010test_dem_xyz_123\u3011\u4e0d\u5b58\u5728\uff01&amp;#x27;, &amp;#x27;code&amp;#x27;: 200, &amp;#x27;logId&amp;#x27;: &amp;#x27;1813173516347482112&amp;#x27;}\n&#34;}], &#34;test_case/test_bpm.py::TestBPM::test_request_bpm[DELETE-http://36.139.193.99:8088/api/demension/v1/dem/deleteDemByIds-query-case_data11-expect_data11-select-SELECT ID_ FROM uc_demension WHERE `CODE_`=\&#34;test_dem_xyz_123\&#34;;-ids]&#34;: [{&#34;extras&#34;: [], &#34;result&#34;: &#34;Failed&#34;, &#34;testId&#34;: &#34;test_case/test_bpm.py::TestBPM::test_request_bpm[DELETE-http://36.139.193.99:8088/api/demension/v1/dem/deleteDemByIds-query-case_data11-expect_data11-select-SELECT ID_ FROM uc_demension WHERE `CODE_`=\&#34;test_dem_xyz_123\&#34;;-ids]&#34;, &#34;duration&#34;: &#34;36 ms&#34;, &#34;resultsTableRow&#34;: [&#34;&lt;td class=\&#34;col-result\&#34;&gt;Failed&lt;/td&gt;&#34;, &#34;&lt;td class=\&#34;col-testId\&#34;&gt;test_case/test_bpm.py::TestBPM::test_request_bpm[DELETE-http://36.139.193.99:8088/api/demension/v1/dem/deleteDemByIds-query-case_data11-expect_data11-select-SELECT ID_ FROM uc_demension WHERE `CODE_`=\&#34;test_dem_xyz_123\&#34;;-ids]&lt;/td&gt;&#34;, &#34;&lt;td class=\&#34;col-duration\&#34;&gt;36 ms&lt;/td&gt;&#34;, &#34;&lt;td class=\&#34;col-links\&#34;&gt;&lt;/td&gt;&#34;], &#34;log&#34;: &#34;self = &amp;lt;APIAutoTest_V2_1.test_case.test_bpm.TestBPM object at 0x000002B66C4FB250&amp;gt;\nreq_fix = &amp;lt;APIAutoTest_V2_1.request_method.request_method.RequestMethod object at 0x000002B66BF59110&amp;gt;\ndb_fix = &amp;lt;APIAutoTest_V2_1.commen.db.DB object at 0x000002B66C048450&amp;gt;, req_method = &amp;#x27;DELETE&amp;#x27;\nreq_url = &amp;#x27;http://36.139.193.99:8088/api/demension/v1/dem/deleteDemByIds&amp;#x27;, req_mime = &amp;#x27;query&amp;#x27;, case_data = {&amp;#x27;ids&amp;#x27;: &amp;#x27;1813173030038904832&amp;#x27;}\nexpect_data = {&amp;#x27;message&amp;#x27;: &amp;#x27;\u5220\u9664\u7ef4\u5ea6\u6210\u529f&amp;#x27;}, sql_type = &amp;#x27;select&amp;#x27;, sql_data = &amp;#x27;SELECT ID_ FROM uc_demension WHERE `CODE_`=&amp;quot;test_dem_xyz_123&amp;quot;;&amp;#x27;\nupdate_key = &amp;#x27;ids&amp;#x27;\n\n @pytest.mark.parametrize(&amp;quot;req_method, req_url, req_mime, case_data, expect_data, sql_type, sql_data, update_key&amp;quot;, ReadExcel().get_data_all())\n def test_request_bpm(self, req_fix, db_fix, req_method, req_url, req_mime, case_data, expect_data, sql_type, sql_data, update_key):\n # print(req_method, req_url, req_mime, case_data, expect_data, sql_type, sql_data, update_key)\n if sql_type == &amp;quot;delete&amp;quot;:\n db_fix.delete(sql_data)\n result = req_fix.request_all(req_method, req_url, req_mime, case_data)\n print(result.json())\n \n elif sql_type == &amp;quot;select&amp;quot;:\n select_result = db_fix.select(sql_data)\n print(&amp;quot;\u67e5\u8be2\u7ed3\u679c\u4e3a\uff1a&amp;quot;, select_result)\n case_data[update_key] = select_result\n \n result = req_fix.request_all(req_method, req_url, req_mime, case_data)\n print(result.json())\n \n \n else:\n result = req_fix.request_all(req_method, req_url, req_mime, case_data)\n print(result.json())\n \n try:\n for key in expect_data.keys():\n&amp;gt; assert expect_data[key] == result.json().get(key)\nE AssertionError: assert &amp;#x27;\u5220\u9664\u7ef4\u5ea6\u6210\u529f&amp;#x27; == &amp;#x27;&amp;#x27;\nE \nE + \u5220\u9664\u7ef4\u5ea6\u6210\u529f\n\ntest_case\\test_bpm.py:39: AssertionError\n\nDuring handling of the above exception, another exception occurred:\n\nself = &amp;lt;APIAutoTest_V2_1.test_case.test_bpm.TestBPM object at 0x000002B66C4FB250&amp;gt;\nreq_fix = &amp;lt;APIAutoTest_V2_1.request_method.request_method.RequestMethod object at 0x000002B66BF59110&amp;gt;\ndb_fix = &amp;lt;APIAutoTest_V2_1.commen.db.DB object at 0x000002B66C048450&amp;gt;, req_method = &amp;#x27;DELETE&amp;#x27;\nreq_url = &amp;#x27;http://36.139.193.99:8088/api/demension/v1/dem/deleteDemByIds&amp;#x27;, req_mime = &amp;#x27;query&amp;#x27;, case_data = {&amp;#x27;ids&amp;#x27;: &amp;#x27;1813173030038904832&amp;#x27;}\nexpect_data = {&amp;#x27;message&amp;#x27;: &amp;#x27;\u5220\u9664\u7ef4\u5ea6\u6210\u529f&amp;#x27;}, sql_type = &amp;#x27;select&amp;#x27;, sql_data = &amp;#x27;SELECT ID_ FROM uc_demension WHERE `CODE_`=&amp;quot;test_dem_xyz_123&amp;quot;;&amp;#x27;\nupdate_key = &amp;#x27;ids&amp;#x27;\n\n @pytest.mark.parametrize(&amp;quot;req_method, req_url, req_mime, case_data, expect_data, sql_type, sql_data, update_key&amp;quot;, ReadExcel().get_data_all())\n def test_request_bpm(self, req_fix, db_fix, req_method, req_url, req_mime, case_data, expect_data, sql_type, sql_data, update_key):\n # print(req_method, req_url, req_mime, case_data, expect_data, sql_type, sql_data, update_key)\n if sql_type == &amp;quot;delete&amp;quot;:\n db_fix.delete(sql_data)\n result = req_fix.request_all(req_method, req_url, req_mime, case_data)\n print(result.json())\n \n elif sql_type == &amp;quot;select&amp;quot;:\n select_result = db_fix.select(sql_data)\n print(&amp;quot;\u67e5\u8be2\u7ed3\u679c\u4e3a\uff1a&amp;quot;, select_result)\n case_data[update_key] = select_result\n \n result = req_fix.request_all(req_method, req_url, req_mime, case_data)\n print(result.json())\n \n \n else:\n result = req_fix.request_all(req_method, req_url, req_mime, case_data)\n print(result.json())\n \n try:\n for key in expect_data.keys():\n assert expect_data[key] == result.json().get(key)\n except:\n&amp;gt; raise AssertionError(&amp;quot;\u65ad\u8a00\u5931\u8d25&amp;quot;)\nE AssertionError: \u65ad\u8a00\u5931\u8d25\n\ntest_case\\test_bpm.py:41: AssertionError\n\n----------------------------- Captured stdout call -----------------------------\n\u67e5\u8be2\u7ed3\u679c\u4e3a\uff1a 1813173030038904832\n{&amp;#x27;state&amp;#x27;: False, &amp;#x27;message&amp;#x27;: &amp;#x27;&amp;#x27;, &amp;#x27;code&amp;#x27;: 200, &amp;#x27;logId&amp;#x27;: &amp;#x27;1813173516561391616&amp;#x27;}\n&#34;}]}, &#34;renderCollapsed&#34;: [&#34;passed&#34;], &#34;initialSort&#34;: &#34;result&#34;, &#34;title&#34;: &#34;bpm_report.html&#34;}"></div>
<script>
(function(){function r(e,n,t){function o(i,f){if(!n[i]){if(!e[i]){var c="function"==typeof require&&require;if(!f&&c)return c(i,!0);if(u)return u(i,!0);var a=new Error("Cannot find module '"+i+"'");throw a.code="MODULE_NOT_FOUND",a}var p=n[i]={exports:{}};e[i][0].call(p.exports,function(r){var n=e[i][1][r];return o(n||r)},p,p.exports,r,e,n,t)}return n[i].exports}for(var u="function"==typeof require&&require,i=0;i<t.length;i++)o(t[i]);return o}return r})()({1:[function(require,module,exports){
const { getCollapsedCategory, setCollapsedIds } = require('./storage.js')
class DataManager {
setManager(data) {
const collapsedCategories = [...getCollapsedCategory(data.renderCollapsed)]
const collapsedIds = []
const tests = Object.values(data.tests).flat().map((test, index) => {
const collapsed = collapsedCategories.includes(test.result.toLowerCase())
const id = `test_${index}`
if (collapsed) {
collapsedIds.push(id)
}
return {
...test,
id,
collapsed,
}
})
const dataBlob = { ...data, tests }
this.data = { ...dataBlob }
this.renderData = { ...dataBlob }
setCollapsedIds(collapsedIds)
}
get allData() {
return { ...this.data }
}
resetRender() {
this.renderData = { ...this.data }
}
setRender(data) {
this.renderData.tests = [...data]
}
toggleCollapsedItem(id) {
this.renderData.tests = this.renderData.tests.map((test) =>
test.id === id ? { ...test, collapsed: !test.collapsed } : test,
)
}
set allCollapsed(collapsed) {
this.renderData = { ...this.renderData, tests: [...this.renderData.tests.map((test) => (
{ ...test, collapsed }
))] }
}
get testSubset() {
return [...this.renderData.tests]
}
get environment() {
return this.renderData.environment
}
get initialSort() {
return this.data.initialSort
}
}
module.exports = {
manager: new DataManager(),
}
},{"./storage.js":8}],2:[function(require,module,exports){
const mediaViewer = require('./mediaviewer.js')
const templateEnvRow = document.getElementById('template_environment_row')
const templateResult = document.getElementById('template_results-table__tbody')
function htmlToElements(html) {
const temp = document.createElement('template')
temp.innerHTML = html
return temp.content.childNodes
}
const find = (selector, elem) => {
if (!elem) {
elem = document
}
return elem.querySelector(selector)
}
const findAll = (selector, elem) => {
if (!elem) {
elem = document
}
return [...elem.querySelectorAll(selector)]
}
const dom = {
getStaticRow: (key, value) => {
const envRow = templateEnvRow.content.cloneNode(true)
const isObj = typeof value === 'object' && value !== null
const values = isObj ? Object.keys(value).map((k) => `${k}: ${value[k]}`) : null
const valuesElement = htmlToElements(
values ? `<ul>${values.map((val) => `<li>${val}</li>`).join('')}<ul>` : `<div>${value}</div>`)[0]
const td = findAll('td', envRow)
td[0].textContent = key
td[1].appendChild(valuesElement)
return envRow
},
getResultTBody: ({ testId, id, log, extras, resultsTableRow, tableHtml, result, collapsed }) => {
const resultBody = templateResult.content.cloneNode(true)
resultBody.querySelector('tbody').classList.add(result.toLowerCase())
resultBody.querySelector('tbody').id = testId
resultBody.querySelector('.collapsible').dataset.id = id
resultsTableRow.forEach((html) => {
const t = document.createElement('template')
t.innerHTML = html
resultBody.querySelector('.collapsible').appendChild(t.content)
})
if (log) {
// Wrap lines starting with "E" with span.error to color those lines red
const wrappedLog = log.replace(/^E.*$/gm, (match) => `<span class="error">${match}</span>`)
resultBody.querySelector('.log').innerHTML = wrappedLog
} else {
resultBody.querySelector('.log').remove()
}
if (collapsed) {
resultBody.querySelector('.collapsible > td')?.classList.add('collapsed')
resultBody.querySelector('.extras-row').classList.add('hidden')
} else {
resultBody.querySelector('.collapsible > td')?.classList.remove('collapsed')
}
const media = []
extras?.forEach(({ name, format_type, content }) => {
if (['image', 'video'].includes(format_type)) {
media.push({ path: content, name, format_type })
}
if (format_type === 'html') {
resultBody.querySelector('.extraHTML').insertAdjacentHTML('beforeend', `<div>${content}</div>`)
}
})
mediaViewer.setup(resultBody, media)
// Add custom html from the pytest_html_results_table_html hook
tableHtml?.forEach((item) => {
resultBody.querySelector('td[class="extra"]').insertAdjacentHTML('beforeend', item)
})
return resultBody
},
}
module.exports = {
dom,
htmlToElements,
find,
findAll,
}
},{"./mediaviewer.js":6}],3:[function(require,module,exports){
const { manager } = require('./datamanager.js')
const { doSort } = require('./sort.js')
const storageModule = require('./storage.js')
const getFilteredSubSet = (filter) =>
manager.allData.tests.filter(({ result }) => filter.includes(result.toLowerCase()))
const doInitFilter = () => {
const currentFilter = storageModule.getVisible()
const filteredSubset = getFilteredSubSet(currentFilter)
manager.setRender(filteredSubset)
}
const doFilter = (type, show) => {
if (show) {
storageModule.showCategory(type)
} else {
storageModule.hideCategory(type)
}
const currentFilter = storageModule.getVisible()
const filteredSubset = getFilteredSubSet(currentFilter)
manager.setRender(filteredSubset)
const sortColumn = storageModule.getSort()
doSort(sortColumn, true)
}
module.exports = {
doFilter,
doInitFilter,
}
},{"./datamanager.js":1,"./sort.js":7,"./storage.js":8}],4:[function(require,module,exports){
const { redraw, bindEvents, renderStatic } = require('./main.js')
const { doInitFilter } = require('./filter.js')
const { doInitSort } = require('./sort.js')
const { manager } = require('./datamanager.js')
const data = JSON.parse(document.getElementById('data-container').dataset.jsonblob)
function init() {
manager.setManager(data)
doInitFilter()
doInitSort()
renderStatic()
redraw()
bindEvents()
}
init()
},{"./datamanager.js":1,"./filter.js":3,"./main.js":5,"./sort.js":7}],5:[function(require,module,exports){
const { dom, find, findAll } = require('./dom.js')
const { manager } = require('./datamanager.js')
const { doSort } = require('./sort.js')
const { doFilter } = require('./filter.js')
const {
getVisible,
getCollapsedIds,
setCollapsedIds,
getSort,
getSortDirection,
possibleFilters,
} = require('./storage.js')
const removeChildren = (node) => {
while (node.firstChild) {
node.removeChild(node.firstChild)
}
}
const renderStatic = () => {
const renderEnvironmentTable = () => {
const environment = manager.environment
const rows = Object.keys(environment).map((key) => dom.getStaticRow(key, environment[key]))
const table = document.getElementById('environment')
removeChildren(table)
rows.forEach((row) => table.appendChild(row))
}
renderEnvironmentTable()
}
const addItemToggleListener = (elem) => {
elem.addEventListener('click', ({ target }) => {
const id = target.parentElement.dataset.id
manager.toggleCollapsedItem(id)
const collapsedIds = getCollapsedIds()
if (collapsedIds.includes(id)) {
const updated = collapsedIds.filter((item) => item !== id)
setCollapsedIds(updated)
} else {
collapsedIds.push(id)
setCollapsedIds(collapsedIds)
}
redraw()
})
}
const renderContent = (tests) => {
const sortAttr = getSort(manager.initialSort)
const sortAsc = JSON.parse(getSortDirection())
const rows = tests.map(dom.getResultTBody)
const table = document.getElementById('results-table')
const tableHeader = document.getElementById('results-table-head')
const newTable = document.createElement('table')
newTable.id = 'results-table'
// remove all sorting classes and set the relevant
findAll('.sortable', tableHeader).forEach((elem) => elem.classList.remove('asc', 'desc'))
tableHeader.querySelector(`.sortable[data-column-type="${sortAttr}"]`)?.classList.add(sortAsc ? 'desc' : 'asc')
newTable.appendChild(tableHeader)
if (!rows.length) {
const emptyTable = document.getElementById('template_results-table__body--empty').content.cloneNode(true)
newTable.appendChild(emptyTable)
} else {
rows.forEach((row) => {
if (!!row) {
findAll('.collapsible td:not(.col-links', row).forEach(addItemToggleListener)
find('.logexpander', row).addEventListener('click',
(evt) => evt.target.parentNode.classList.toggle('expanded'),
)
newTable.appendChild(row)
}
})
}
table.replaceWith(newTable)
}
const renderDerived = () => {
const currentFilter = getVisible()
possibleFilters.forEach((result) => {
const input = document.querySelector(`input[data-test-result="${result}"]`)
input.checked = currentFilter.includes(result)
})
}
const bindEvents = () => {
const filterColumn = (evt) => {
const { target: element } = evt
const { testResult } = element.dataset
doFilter(testResult, element.checked)
const collapsedIds = getCollapsedIds()
const updated = manager.renderData.tests.map((test) => {
return {
...test,
collapsed: collapsedIds.includes(test.id),
}
})
manager.setRender(updated)
redraw()
}
const header = document.getElementById('environment-header')
header.addEventListener('click', () => {
const table = document.getElementById('environment')
table.classList.toggle('hidden')
header.classList.toggle('collapsed')
})
findAll('input[name="filter_checkbox"]').forEach((elem) => {
elem.addEventListener('click', filterColumn)
})
findAll('.sortable').forEach((elem) => {
elem.addEventListener('click', (evt) => {
const { target: element } = evt
const { columnType } = element.dataset
doSort(columnType)
redraw()
})
})
document.getElementById('show_all_details').addEventListener('click', () => {
manager.allCollapsed = false
setCollapsedIds([])
redraw()
})
document.getElementById('hide_all_details').addEventListener('click', () => {
manager.allCollapsed = true
const allIds = manager.renderData.tests.map((test) => test.id)
setCollapsedIds(allIds)
redraw()
})
}
const redraw = () => {
const { testSubset } = manager
renderContent(testSubset)
renderDerived()
}
module.exports = {
redraw,
bindEvents,
renderStatic,
}
},{"./datamanager.js":1,"./dom.js":2,"./filter.js":3,"./sort.js":7,"./storage.js":8}],6:[function(require,module,exports){
class MediaViewer {
constructor(assets) {
this.assets = assets
this.index = 0
}
nextActive() {
this.index = this.index === this.assets.length - 1 ? 0 : this.index + 1
return [this.activeFile, this.index]
}
prevActive() {
this.index = this.index === 0 ? this.assets.length - 1 : this.index -1
return [this.activeFile, this.index]
}
get currentIndex() {
return this.index
}
get activeFile() {
return this.assets[this.index]
}
}
const setup = (resultBody, assets) => {
if (!assets.length) {
resultBody.querySelector('.media').classList.add('hidden')
return
}
const mediaViewer = new MediaViewer(assets)
const container = resultBody.querySelector('.media-container')
const leftArrow = resultBody.querySelector('.media-container__nav--left')
const rightArrow = resultBody.querySelector('.media-container__nav--right')
const mediaName = resultBody.querySelector('.media__name')
const counter = resultBody.querySelector('.media__counter')
const imageEl = resultBody.querySelector('img')
const sourceEl = resultBody.querySelector('source')
const videoEl = resultBody.querySelector('video')
const setImg = (media, index) => {
if (media?.format_type === 'image') {
imageEl.src = media.path
imageEl.classList.remove('hidden')
videoEl.classList.add('hidden')
} else if (media?.format_type === 'video') {
sourceEl.src = media.path
videoEl.classList.remove('hidden')
imageEl.classList.add('hidden')
}
mediaName.innerText = media?.name
counter.innerText = `${index + 1} / ${assets.length}`
}
setImg(mediaViewer.activeFile, mediaViewer.currentIndex)
const moveLeft = () => {
const [media, index] = mediaViewer.prevActive()
setImg(media, index)
}
const doRight = () => {
const [media, index] = mediaViewer.nextActive()
setImg(media, index)
}
const openImg = () => {
window.open(mediaViewer.activeFile.path, '_blank')
}
if (assets.length === 1) {
container.classList.add('media-container--fullscreen')
} else {
leftArrow.addEventListener('click', moveLeft)
rightArrow.addEventListener('click', doRight)
}
imageEl.addEventListener('click', openImg)
}
module.exports = {
setup,
}
},{}],7:[function(require,module,exports){
const { manager } = require('./datamanager.js')
const storageModule = require('./storage.js')
const genericSort = (list, key, ascending, customOrder) => {
let sorted
if (customOrder) {
sorted = list.sort((a, b) => {
const aValue = a.result.toLowerCase()
const bValue = b.result.toLowerCase()
const aIndex = customOrder.findIndex((item) => item.toLowerCase() === aValue)
const bIndex = customOrder.findIndex((item) => item.toLowerCase() === bValue)
// Compare the indices to determine the sort order
return aIndex - bIndex
})
} else {
sorted = list.sort((a, b) => a[key] === b[key] ? 0 : a[key] > b[key] ? 1 : -1)
}
if (ascending) {
sorted.reverse()
}
return sorted
}
const durationSort = (list, ascending) => {
const parseDuration = (duration) => {
if (duration.includes(':')) {
// If it's in the format "HH:mm:ss"
const [hours, minutes, seconds] = duration.split(':').map(Number)
return (hours * 3600 + minutes * 60 + seconds) * 1000
} else {
// If it's in the format "nnn ms"
return parseInt(duration)
}
}
const sorted = list.sort((a, b) => parseDuration(a['duration']) - parseDuration(b['duration']))
if (ascending) {
sorted.reverse()
}
return sorted
}
const doInitSort = () => {
const type = storageModule.getSort(manager.initialSort)
const ascending = storageModule.getSortDirection()
const list = manager.testSubset
const initialOrder = ['Error', 'Failed', 'Rerun', 'XFailed', 'XPassed', 'Skipped', 'Passed']
storageModule.setSort(type)
storageModule.setSortDirection(ascending)
if (type?.toLowerCase() === 'original') {
manager.setRender(list)
} else {
let sortedList
switch (type) {
case 'duration':
sortedList = durationSort(list, ascending)
break
case 'result':
sortedList = genericSort(list, type, ascending, initialOrder)
break
default:
sortedList = genericSort(list, type, ascending)
break
}
manager.setRender(sortedList)
}
}
const doSort = (type, skipDirection) => {
const newSortType = storageModule.getSort(manager.initialSort) !== type
const currentAsc = storageModule.getSortDirection()
let ascending
if (skipDirection) {
ascending = currentAsc
} else {
ascending = newSortType ? false : !currentAsc
}
storageModule.setSort(type)
storageModule.setSortDirection(ascending)
const list = manager.testSubset
const sortedList = type === 'duration' ? durationSort(list, ascending) : genericSort(list, type, ascending)
manager.setRender(sortedList)
}
module.exports = {
doInitSort,
doSort,
}
},{"./datamanager.js":1,"./storage.js":8}],8:[function(require,module,exports){
const possibleFilters = [
'passed',
'skipped',
'failed',
'error',
'xfailed',
'xpassed',
'rerun',
]
const getVisible = () => {
const url = new URL(window.location.href)
const settings = new URLSearchParams(url.search).get('visible')
const lower = (item) => {
const lowerItem = item.toLowerCase()
if (possibleFilters.includes(lowerItem)) {
return lowerItem
}
return null
}
return settings === null ?
possibleFilters :
[...new Set(settings?.split(',').map(lower).filter((item) => item))]
}
const hideCategory = (categoryToHide) => {
const url = new URL(window.location.href)
const visibleParams = new URLSearchParams(url.search).get('visible')
const currentVisible = visibleParams ? visibleParams.split(',') : [...possibleFilters]
const settings = [...new Set(currentVisible)].filter((f) => f !== categoryToHide).join(',')
url.searchParams.set('visible', settings)
window.history.pushState({}, null, unescape(url.href))
}
const showCategory = (categoryToShow) => {
if (typeof window === 'undefined') {
return
}
const url = new URL(window.location.href)
const currentVisible = new URLSearchParams(url.search).get('visible')?.split(',').filter(Boolean) ||
[...possibleFilters]
const settings = [...new Set([categoryToShow, ...currentVisible])]
const noFilter = possibleFilters.length === settings.length || !settings.length
noFilter ? url.searchParams.delete('visible') : url.searchParams.set('visible', settings.join(','))
window.history.pushState({}, null, unescape(url.href))
}
const getSort = (initialSort) => {
const url = new URL(window.location.href)
let sort = new URLSearchParams(url.search).get('sort')
if (!sort) {
sort = initialSort || 'result'
}
return sort
}
const setSort = (type) => {
const url = new URL(window.location.href)
url.searchParams.set('sort', type)
window.history.pushState({}, null, unescape(url.href))
}
const getCollapsedCategory = (renderCollapsed) => {
let categories
if (typeof window !== 'undefined') {
const url = new URL(window.location.href)
const collapsedItems = new URLSearchParams(url.search).get('collapsed')
switch (true) {
case !renderCollapsed && collapsedItems === null:
categories = ['passed']
break
case collapsedItems?.length === 0 || /^["']{2}$/.test(collapsedItems):
categories = []
break
case /^all$/.test(collapsedItems) || collapsedItems === null && /^all$/.test(renderCollapsed):
categories = [...possibleFilters]
break
default:
categories = collapsedItems?.split(',').map((item) => item.toLowerCase()) || renderCollapsed
break
}
} else {
categories = []
}
return categories
}
const getSortDirection = () => JSON.parse(sessionStorage.getItem('sortAsc')) || false
const setSortDirection = (ascending) => sessionStorage.setItem('sortAsc', ascending)
const getCollapsedIds = () => JSON.parse(sessionStorage.getItem('collapsedIds')) || []
const setCollapsedIds = (list) => sessionStorage.setItem('collapsedIds', JSON.stringify(list))
module.exports = {
getVisible,
hideCategory,
showCategory,
getCollapsedIds,
setCollapsedIds,
getSort,
setSort,
getSortDirection,
setSortDirection,
getCollapsedCategory,
possibleFilters,
}
},{}]},{},[4]);
</script>
</footer>
</html>
\ No newline at end of file
# -*-coding:utf-8 -*- #
# ---------------------------------------------------------------------------
# ProjectName: pythonProject
# FileName: request_method.py
# Author: liulei
# Datetime: 2024/7/15 9:23
# Description:
#
# ---------------------------------------------------------------------------
import requests
from APIAutoTest_V2_1.commen.read_ini import ReadIni
class RequestMethod:
def __init__(self):
"""关联登录成功状态的token"""
ini = ReadIni()
login_data = {"username": "admin", "password": "F4/DVgPS/NEruLxVVRqHktsb1R2fVpw81t5VuGfFjwp0G7U4k6spHPr/ejPlw8XxIVilJ+SyIH0G5FbQStFEd/94mmI7+2Dw2c7MXXIERYKjd3XNe4gZR4ANJclCJHNGfE+mtnX5voprYwEo9m6ponCdmmXTMx9cWVEJ4K/nbR8="}
login_url = ini.get_url("test_host") + "/auth"
# 创建session对象
self.session = requests.sessions.Session()
token = self.session.request(method="post", url=login_url, json=login_data).json().get("token")
self.session.headers["Authorization"] = "Bearer " + token
def request_all(self, req_method, req_url, req_mime, case_data):
"""根据媒体类型的不同,来决定请求方式"""
req_mime = req_mime.lower()
if req_mime == "application/json" or req_mime == "json":
return self.session.request(method=req_method, url=req_url, json=case_data)
elif req_mime == "application/x-www-form-urlencoded" or req_mime == "x-www-form-urlencoded":
return self.session.request(method=req_method, url=req_url, data=case_data)
elif req_mime == "multipart/form-data" or req_mime == "form-data":
return self.session.request(method=req_method, url=req_url, files=case_data)
elif req_mime == "query" or req_mime == "params":
return self.session.request(method=req_method, url=req_url, params=case_data)
elif req_mime is None:
return self.session.request(method=req_method, url=req_url)
else:
raise ValueError("传入的参数错误")
\ No newline at end of file
# -*-coding:utf-8 -*- #
# ---------------------------------------------------------------------------
# ProjectName: pythonProject
# FileName: __init__.py
# Author: liulei
# Datetime: 2024/7/15 11:02
# Description:
#
# ---------------------------------------------------------------------------
# -*-coding:utf-8 -*- #
# ---------------------------------------------------------------------------
# ProjectName: pythonProject
# FileName: conftest.py
# Author: liulei
# Datetime: 2024/7/15 9:43
# Description:
#
# ---------------------------------------------------------------------------
import pytest
from APIAutoTest_V2_1.commen.db import DB
from APIAutoTest_V2_1.request_method.request_method import RequestMethod
@pytest.fixture(scope="session")
def req_fix():
req = RequestMethod()
yield req
@pytest.fixture(scope="session")
def db_fix():
db = DB()
yield db
db.close()
# -*-coding:utf-8 -*- #
# ---------------------------------------------------------------------------
# ProjectName: pythonProject
# FileName: test_bpm.py
# Author: liulei
# Datetime: 2024/7/15 9:23
# Description:
#
# ---------------------------------------------------------------------------
import pytest
from APIAutoTest_V2_1.commen.read_excel import ReadExcel
class TestBPM:
@pytest.mark.parametrize("req_method, req_url, req_mime, case_data, expect_data, sql_type, sql_data, update_key", ReadExcel().get_data_all())
def test_request_bpm(self, req_fix, db_fix, req_method, req_url, req_mime, case_data, expect_data, sql_type, sql_data, update_key):
# print(req_method, req_url, req_mime, case_data, expect_data, sql_type, sql_data, update_key)
if sql_type == "delete":
db_fix.delete(sql_data)
result = req_fix.request_all(req_method, req_url, req_mime, case_data)
print(result.json())
elif sql_type == "select":
select_result = db_fix.select(sql_data)
print("查询结果为:", select_result)
case_data[update_key] = select_result
result = req_fix.request_all(req_method, req_url, req_mime, case_data)
print(result.json())
else:
result = req_fix.request_all(req_method, req_url, req_mime, case_data)
print(result.json())
try:
for key in expect_data.keys():
assert expect_data[key] == result.json().get(key)
except:
raise AssertionError("断言失败")
else:
print("断言成功")
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