Commit 84382033 by gff

成功吧

parent 07356c48
# -*-coding:utf-8 -*- # # -*-coding:utf-8 -*- #
# --------------------------------------------------------------------------- # ---------------------------------------------------------------------------
# ProjectName: study_py # ProjectName: test_56
# FileName: db.py # FileName: db.py
# Author: gff # Author: xxxxxxx
# Datetime: 2023/8/7 18:45 # Datetime: 2023/8/7 15:26
# Description: # Description:
#
# --------------------------------------------------------------------------- # ---------------------------------------------------------------------------
import pymysql import pymysql
from APIAotu.day3.zx.common.read_ini import ReadIni from InterfaceAutoTest.common.read_ini import ReadIni
class DB: class DB:
def __init__(self): def __init__(self):
"""链接数据库"""
read_ini = ReadIni() read_ini = ReadIni()
self.conn = pymysql.connect(host=read_ini.get_sql_connect_message("host"), self.conn = pymysql.connect(
port=int(read_ini.get_sql_connect_message("port")), host=read_ini.get_sql_connect_message("host"),
user=read_ini.get_sql_connect_message("user"), port=int(read_ini.get_sql_connect_message("port")),
password=read_ini.get_sql_connect_message("pwd"), user=read_ini.get_sql_connect_message("user"),
database=read_ini.get_sql_connect_message("database"), password=read_ini.get_sql_connect_message("pwd"),
charset="utf8") database=read_ini.get_sql_connect_message("database"),
charset="utf8"
)
self.cursor = self.conn.cursor() self.cursor = self.conn.cursor()
def close(self): def close(self):
......
# -*-coding:utf-8 -*- # # -*-coding:utf-8 -*- #
# --------------------------------------------------------------------------- # ---------------------------------------------------------------------------
# ProjectName: study_py # ProjectName: test_56
# FileName: read_excel.py # FileName: read_excel.py
# Author: gff # Author: xxxxxxx
# Datetime: 2023/8/7 19:02 # Datetime: 2023/8/7 15:29
# Description: # Description:
#
# --------------------------------------------------------------------------- # ---------------------------------------------------------------------------
import openpyxl import openpyxl
from APIAotu.day3.zx.common.read_ini import ReadIni
from APIAotu.day3.zx.common.read_json import read_json from InterfaceAutoTest.common.read_ini import ReadIni
from APIAotu.day3.zx.data_config.settings import * from InterfaceAutoTest.common.read_json import read_json
from InterfaceAutoTest.data_config.settings import *
class ReadExcel: class ReadExcel:
def __init__(self): def __init__(self):
"""读取数据配置层中所有文件,除了ini文件"""
self.read_ini = ReadIni() self.read_ini = ReadIni()
case_data_path = self.read_ini.get_file_path(CASE) case_data_path = self.read_ini.get_file_path(CASE)
expect_data_path = self.read_ini.get_file_path(EXPECT) expect_data_path = self.read_ini.get_file_path(EXPECT)
sql_data_path = self.read_ini.get_file_path(SQL) sql_data_path = self.read_ini.get_file_path(SQL)
self.case_data_dict = read_json(case_data_path) self.case_data_dict = read_json(case_data_path)
self.expect_data_dict = read_json(expect_data_path) self.expect_data_dict = read_json(expect_data_path)
self.sql_data_dict = read_json(sql_data_path) self.sql_data_dict = read_json(sql_data_path)
excel_path = self.read_ini.get_file_path(EXCEL) excel_path = self.read_ini.get_file_path(EXCEL)
wb = openpyxl.load_workbook(excel_path) wb = openpyxl.load_workbook(excel_path)
table_name = self.read_ini.get_table_name(TABLE) self.ws = wb[self.read_ini.get_table_name(TABLE)]
self.ws = wb[table_name]
def __get_cell_value(self, column: str, row: int) -> str: def __get_cell_value(self, column: str, row: int) -> str:
value = self.ws[str(column)+str(row)].value value = self.ws[str(column)+str(row)].value
if value is None: if value is None:
return None return None
elif value.strip(): elif value.strip():
...@@ -51,11 +56,12 @@ class ReadExcel: ...@@ -51,11 +56,12 @@ class ReadExcel:
def case_url(self, row): def case_url(self, row):
host = self.read_ini.get_host(HOST) host = self.read_ini.get_host(HOST)
path = self.__get_cell_value(PATH, row)
return host+path return host+self.__get_cell_value(PATH, row)
def case_mime(self, row): def case_mime(self, row):
value = self.__get_cell_value(MIME, row) value = self.__get_cell_value(MIME, row)
if value: if value:
return value.lower() return value.lower()
...@@ -111,3 +117,7 @@ class ReadExcel: ...@@ -111,3 +117,7 @@ class ReadExcel:
if __name__ == '__main__': if __name__ == '__main__':
read_excel = ReadExcel() read_excel = ReadExcel()
print(read_excel.get_data()) print(read_excel.get_data())
# -*-coding:utf-8 -*- # # -*-coding:utf-8 -*- #
# --------------------------------------------------------------------------- # ---------------------------------------------------------------------------
# ProjectName: study_py # ProjectName: test_56
# FileName: read_ini.py # FileName: read_ini.py
# Author: gff # Author: xxxxxxx
# Datetime: 2023/8/7 18:25 # Datetime: 2023/8/7 15:21
# Description: # Description:
#
# --------------------------------------------------------------------------- # ---------------------------------------------------------------------------
import configparser import configparser
import os import os
...@@ -12,24 +13,26 @@ import os ...@@ -12,24 +13,26 @@ import os
class ReadIni: class ReadIni:
def __init__(self): def __init__(self):
"""读取ini文件"""
self.data_config_path = os.path.join(os.path.dirname(os.path.dirname(__file__)), "data_config") self.data_config_path = os.path.join(os.path.dirname(os.path.dirname(__file__)), "data_config")
ini_path = os.path.join(self.data_config_path, "config.ini") ini_path = os.path.join(self.data_config_path, 'config.ini')
self.conf = configparser.ConfigParser() self.conf = configparser.ConfigParser()
self.conf.read(ini_path, encoding="utf-8") self.conf.read(ini_path, encoding="utf-8")
def get_file_path(self, key): def get_file_path(self, key):
return os.path.join(self.data_config_path, self.conf.get("file", key)) return os.path.join(self.data_config_path, self.conf.get("file", key))
def get_host(self, key):
return self.conf.get("host", key)
def get_table_name(self, key): def get_table_name(self, key):
return self.conf.get("table_name", key) return self.conf.get("table_name", key)
def get_host(self, key):
return self.conf.get("host", key)
def get_sql_connect_message(self, key): def get_sql_connect_message(self, key):
return self.conf.get("sql", key) return self.conf.get("sql", key)
if __name__ == '__main__': if __name__ == '__main__':
read_ini = ReadIni() read_ini = ReadIni()
print(read_ini.get_file_path("excel")) print(read_ini.get_file_path("excel"))
\ No newline at end of file
# -*-coding:utf-8 -*- # # -*-coding:utf-8 -*- #
# --------------------------------------------------------------------------- # ---------------------------------------------------------------------------
# ProjectName: study_py # ProjectName: test_56
# FileName: read_json.py # FileName: read_json.py
# Author: gff # Author: xxxxxxx
# Datetime: 2023/8/7 18:43 # Datetime: 2023/8/7 15:25
# Description: # Description:
#
# --------------------------------------------------------------------------- # ---------------------------------------------------------------------------
import json import json
def read_json(filename): def read_json(filename):
with open(filename, mode="r", encoding="utf-8") as fp: with open(filename, mode="r", encoding="utf-8") as fp:
return json.load(fp) return json.load(fp)
\ No newline at end of file
...@@ -5,21 +5,21 @@ ...@@ -5,21 +5,21 @@
"LoginFailUsernameIsNone":{"password": "MTIzNDU2","username": ""}, "LoginFailUsernameIsNone":{"password": "MTIzNDU2","username": ""},
"LoginFailUsernameIsLong":{"password": "MTIzNDU2","username": "adminadminadminadminadminadminadminadminadmin"}, "LoginFailUsernameIsLong":{"password": "MTIzNDU2","username": "adminadminadminadminadminadminadminadminadmin"},
"LoginFailUsernameIsShort":{"password": "MTIzNDU2","username": "a"}, "LoginFailUsernameIsShort":{"password": "MTIzNDU2","username": "a"},
"LoginFailUsernameIsSpecialChar":{"password": "MTIzNDU2","username": "❀❁❀❁❀❁❀❁"}, "LoginFailUsernameIsSpecialChar":{"password": "MTIzNDU2","username": "▬♦◊◦☼♠♣"},
"LoginFailUsernameIsError":{"password": "MTIzNDU2","username": "tomcat"}, "LoginFailUsernameIsError":{"password": "MTIzNDU2","username": "tomcat"},
"LoginFailPWDIsNone":{"password": "","username": "admin"}, "LoginFailPWDIsNone":{"password": "","username": "admin"},
"LoginFailPWDIsLong":{"password": "MTIzNDU2MTIzNDU2MTIzNDU2MTIzNDU2MTIzNDU2MTIzNDU2","username": "admin"}, "LoginFailPWDIsLong":{"password": "MTIzNDU2MTIzNDU2MTIzNDU2MTIzNDU2MTIzNDU2MTIzNDU2","username": "admin"},
"LoginFailPWDIsShort":{"password": "1","username": "admin"}, "LoginFailPWDIsShort":{"password": "1","username": "admin"},
"LoginFailPWDIsSpecial":{"password": "❀❁❀❁❀❁❀❁","username": "admin"} "LoginFailPWDIsSpecial":{"password": "▬♦◊◦☼♠♣","username": "admin"}
} }
}, },
"维度管理": { "维度管理": {
"添加维度": { "添加维度": {
"AddDemSuccess": { "AddDemSuccess": {
"code": "hmjz", "code": "test56_dem",
"description": "黑猫警长", "description": "测试56期的维度",
"isDefault": 0, "isDefault": 0,
"name": "黑猫警长" "name": "测试56期的维度"
} }
}, },
"根据维度编码删除维度": { "根据维度编码删除维度": {
...@@ -29,23 +29,23 @@ ...@@ -29,23 +29,23 @@
"组织管理": { "组织管理": {
"添加组织": { "添加组织": {
"AddOrgSuccess": { "AddOrgSuccess": {
"code": "djn", "code": "test56_org",
"demId": "不知道", "demId": "不知道",
"exceedLimitNum": 0, "exceedLimitNum": 0,
"grade": "", "grade": "",
"limitNum": 0, "limitNum": 0,
"name": "大角牛", "name": "测试的组织",
"nowNum": 0, "nowNum": 0,
"orderNo": 0, "orderNo": 0,
"parentId": "0" "parentId": "0"
} }
}, },
"删除组织": { "删除组织": {
"DeleteOrgSuccess": "djn" "DeleteOrgSuccess": "test56_org"
}, },
"保存组织参数": { "保存组织参数": {
"SaveOrgParamSuccess": { "SaveOrgParamSuccess": {
"query": {"orgCode": "djn"}, "query": {"orgCode": "test56_org"},
"body": [ "body": [
{"alias":"sz","value":0}, {"alias":"sz","value":0},
{"alias":"zy","value":"math"}, {"alias":"zy","value":"math"},
......
[file] [file]
excel=APIAutoTest.xlsx excel=APIAutoTest.xlsx
excel1=APIAutoTest.xlsx
case=case_data.json case=case_data.json
expect=expect_data.json expect=expect_data.json
sql=sql.json sql=sql.json
......
...@@ -24,7 +24,7 @@ UPDATEKEY = "M" ...@@ -24,7 +24,7 @@ UPDATEKEY = "M"
"""配ini文件中file节点下的key""" """配ini文件中file节点下的key"""
EXCEL = "excel" EXCEL = "excel1"
CASE = "case" CASE = "case"
EXPECT = "expect" EXPECT = "expect"
SQL = "sql" SQL = "sql"
......
This source diff could not be displayed because it is too large. You can view the blob instead.
DEBUG--2023-08-07 17:03:43--http://120.46.172.186:8080 "POST /api/demension/v1/dem/addDem HTTP/1.1" 200 None
\ No newline at end of file
DEBUG--2023-08-07 17:03:37--Resetting dropped connection: 120.46.172.186
DEBUG--2023-08-07 17:03:37--http://120.46.172.186:8080 "POST /auth HTTP/1.1" 500 None
\ No newline at end of file
DEBUG--2023-08-07 17:03:36--Looking for locale `en_US` in provider `faker.providers.address`.
DEBUG--2023-08-07 17:03:36--Provider `faker.providers.address` has been localized to `en_US`.
DEBUG--2023-08-07 17:03:36--Looking for locale `en_US` in provider `faker.providers.automotive`.
DEBUG--2023-08-07 17:03:36--Provider `faker.providers.automotive` has been localized to `en_US`.
DEBUG--2023-08-07 17:03:36--Looking for locale `en_US` in provider `faker.providers.bank`.
DEBUG--2023-08-07 17:03:36--Specified locale `en_US` is not available for provider `faker.providers.bank`. Locale reset to `en_GB` for this provider.
DEBUG--2023-08-07 17:03:36--Looking for locale `en_US` in provider `faker.providers.barcode`.
DEBUG--2023-08-07 17:03:36--Provider `faker.providers.barcode` has been localized to `en_US`.
DEBUG--2023-08-07 17:03:36--Looking for locale `en_US` in provider `faker.providers.color`.
DEBUG--2023-08-07 17:03:36--Provider `faker.providers.color` has been localized to `en_US`.
DEBUG--2023-08-07 17:03:36--Looking for locale `en_US` in provider `faker.providers.company`.
DEBUG--2023-08-07 17:03:36--Provider `faker.providers.company` has been localized to `en_US`.
DEBUG--2023-08-07 17:03:36--Looking for locale `en_US` in provider `faker.providers.credit_card`.
DEBUG--2023-08-07 17:03:36--Provider `faker.providers.credit_card` has been localized to `en_US`.
DEBUG--2023-08-07 17:03:36--Looking for locale `en_US` in provider `faker.providers.currency`.
DEBUG--2023-08-07 17:03:36--Provider `faker.providers.currency` has been localized to `en_US`.
DEBUG--2023-08-07 17:03:36--Looking for locale `en_US` in provider `faker.providers.date_time`.
DEBUG--2023-08-07 17:03:36--Provider `faker.providers.date_time` has been localized to `en_US`.
DEBUG--2023-08-07 17:03:36--Provider `faker.providers.emoji` does not feature localization. Specified locale `en_US` is not utilized for this provider.
DEBUG--2023-08-07 17:03:36--Provider `faker.providers.file` does not feature localization. Specified locale `en_US` is not utilized for this provider.
DEBUG--2023-08-07 17:03:36--Looking for locale `en_US` in provider `faker.providers.geo`.
DEBUG--2023-08-07 17:03:36--Provider `faker.providers.geo` has been localized to `en_US`.
DEBUG--2023-08-07 17:03:36--Looking for locale `en_US` in provider `faker.providers.internet`.
DEBUG--2023-08-07 17:03:36--Provider `faker.providers.internet` has been localized to `en_US`.
DEBUG--2023-08-07 17:03:36--Provider `faker.providers.isbn` does not feature localization. Specified locale `en_US` is not utilized for this provider.
DEBUG--2023-08-07 17:03:36--Looking for locale `en_US` in provider `faker.providers.job`.
DEBUG--2023-08-07 17:03:36--Provider `faker.providers.job` has been localized to `en_US`.
DEBUG--2023-08-07 17:03:36--Looking for locale `en_US` in provider `faker.providers.lorem`.
DEBUG--2023-08-07 17:03:36--Provider `faker.providers.lorem` has been localized to `en_US`.
DEBUG--2023-08-07 17:03:36--Looking for locale `en_US` in provider `faker.providers.misc`.
DEBUG--2023-08-07 17:03:36--Provider `faker.providers.misc` has been localized to `en_US`.
DEBUG--2023-08-07 17:03:36--Looking for locale `en_US` in provider `faker.providers.passport`.
DEBUG--2023-08-07 17:03:36--Provider `faker.providers.passport` has been localized to `en_US`.
DEBUG--2023-08-07 17:03:36--Looking for locale `en_US` in provider `faker.providers.person`.
DEBUG--2023-08-07 17:03:36--Provider `faker.providers.person` has been localized to `en_US`.
DEBUG--2023-08-07 17:03:36--Looking for locale `en_US` in provider `faker.providers.phone_number`.
DEBUG--2023-08-07 17:03:36--Provider `faker.providers.phone_number` has been localized to `en_US`.
DEBUG--2023-08-07 17:03:36--Provider `faker.providers.profile` does not feature localization. Specified locale `en_US` is not utilized for this provider.
DEBUG--2023-08-07 17:03:36--Provider `faker.providers.python` does not feature localization. Specified locale `en_US` is not utilized for this provider.
DEBUG--2023-08-07 17:03:36--Provider `faker.providers.sbn` does not feature localization. Specified locale `en_US` is not utilized for this provider.
DEBUG--2023-08-07 17:03:36--Looking for locale `en_US` in provider `faker.providers.ssn`.
DEBUG--2023-08-07 17:03:36--Provider `faker.providers.ssn` has been localized to `en_US`.
DEBUG--2023-08-07 17:03:36--Provider `faker.providers.user_agent` does not feature localization. Specified locale `en_US` is not utilized for this provider.
DEBUG--2023-08-07 17:03:36--Starting new HTTP connection (1): 120.46.172.186:8080
DEBUG--2023-08-07 17:03:36--http://120.46.172.186:8080 "POST /auth HTTP/1.1" 200 None
DEBUG--2023-08-07 17:03:36--http://120.46.172.186:8080 "POST /auth HTTP/1.1" 200 None
\ No newline at end of file
DEBUG--2023-08-07 17:03:44--http://120.46.172.186:8080 "DELETE /api/demension/v1/dem/deleteDemByIds?ids=1688475997541777408 HTTP/1.1" 200 None
ERROR--2023-08-07 17:03:44--断言失败, 模块名称为:维度管理,接口名称为:根据维度编码删除维度,用例标题:正向用例,用例为:{'ids': '1688475997541777408'},期望结果为:{'state': True, 'message': '删除维度成功'},服务器返回数据为:{"state":true,"message":"删除维度成功!","value":""}
DEBUG--2023-08-07 17:03:45--http://120.46.172.186:8080 "DELETE /api/demension/v1/dem/deleteDemByIds?ids=1688475997541777408 HTTP/1.1" 500 None
ERROR--2023-08-07 17:03:45--断言失败, 模块名称为:维度管理,接口名称为:根据维度编码删除维度,用例标题:正向用例,用例为:{'ids': '1688475997541777408'},期望结果为:{'state': True, 'message': '删除维度成功'},服务器返回数据为:{"state":false,"message":"","logId":"1688476004198137856"}
\ No newline at end of file
断言失败
断言失败
断言失败
断言失败
DEBUG--2023-08-07 17:03:37--Resetting dropped connection: 120.46.172.186
DEBUG--2023-08-07 17:03:37--http://120.46.172.186:8080 "GET /refresh HTTP/1.1" 200 None
ERROR--2023-08-07 17:03:37--断言失败, 模块名称为:认证接口,接口名称为:刷新token,用例标题:正向用例,用例为:None,期望结果为:{'message': '刷新token成功'},服务器返回数据为:{"token":"eyJhbGciOiJIUzUxMiJ9.eyJzdWIiOiJhZG1pbiIsInRlbmFudElkIjoiLTEiLCJleHAiOjE2OTE0ODU0MTcsImlhdCI6MTY5MTM5OTAxN30.n-7NR1iCjIKHbeH-Djk8t1sRkJi_FVAwgVHcGFWP6kh4xOyu6c4rgNtn817qbxVK9O63Wo9-SnreSvMJI5L8Gw","username":"","account":"","userId":"","loginStatus":true,"userAttrs":{}}
DEBUG--2023-08-07 17:03:39--http://120.46.172.186:8080 "GET /refresh HTTP/1.1" 200 None
ERROR--2023-08-07 17:03:39--断言失败, 模块名称为:认证接口,接口名称为:刷新token,用例标题:正向用例,用例为:None,期望结果为:{'message': '刷新token成功'},服务器返回数据为:{"token":"eyJhbGciOiJIUzUxMiJ9.eyJzdWIiOiJhZG1pbiIsInRlbmFudElkIjoiLTEiLCJleHAiOjE2OTE0ODU0MTgsImlhdCI6MTY5MTM5OTAxOH0.Rb1x9O8uPZcXAfoDbWutU6f3taE2vMl0iRW4WVVwfeKYLS-zF9e0IFTyL2tUDstfMzs0ej7qYnsUg_CXR-qOHg","username":"","account":"","userId":"","loginStatus":true,"userAttrs":{}}
DEBUG--2023-08-07 17:03:40--http://120.46.172.186:8080 "GET /refresh HTTP/1.1" 200 None
ERROR--2023-08-07 17:03:40--断言失败, 模块名称为:认证接口,接口名称为:刷新token,用例标题:正向用例,用例为:None,期望结果为:{'message': '刷新token成功'},服务器返回数据为:{"token":"eyJhbGciOiJIUzUxMiJ9.eyJzdWIiOiJhZG1pbiIsInRlbmFudElkIjoiLTEiLCJleHAiOjE2OTE0ODU0MTksImlhdCI6MTY5MTM5OTAxOX0.WinKyHRVircLGP_CUX1F7Bnc8ppV_aESgAOwYpTrvsaosQKpSM4M310de-C_Isotv4UrWgQHE-a9qJeBxb3Kdw","username":"","account":"","userId":"","loginStatus":true,"userAttrs":{}}
DEBUG--2023-08-07 17:03:41--http://120.46.172.186:8080 "GET /refresh HTTP/1.1" 200 None
ERROR--2023-08-07 17:03:41--断言失败, 模块名称为:认证接口,接口名称为:刷新token,用例标题:正向用例,用例为:None,期望结果为:{'message': '刷新token成功'},服务器返回数据为:{"token":"eyJhbGciOiJIUzUxMiJ9.eyJzdWIiOiJhZG1pbiIsInRlbmFudElkIjoiLTEiLCJleHAiOjE2OTE0ODU0MjAsImlhdCI6MTY5MTM5OTAyMH0.UiLL8CbY6A0_NK2PFWF1YA_lOAuFH2tDwOk5-MP21rQb6-4POQAwoNYaJRF_6QfYBd60YGMTwyBEISUGe-EHXg","username":"","account":"","userId":"","loginStatus":true,"userAttrs":{}}
DEBUG--2023-08-07 17:03:42--http://120.46.172.186:8080 "GET /refresh HTTP/1.1" 200 None
ERROR--2023-08-07 17:03:42--断言失败, 模块名称为:认证接口,接口名称为:刷新token,用例标题:正向用例,用例为:None,期望结果为:{'message': '刷新token成功'},服务器返回数据为:{"token":"eyJhbGciOiJIUzUxMiJ9.eyJzdWIiOiJhZG1pbiIsInRlbmFudElkIjoiLTEiLCJleHAiOjE2OTE0ODU0MjEsImlhdCI6MTY5MTM5OTAyMX0.pk_DluVTDrByMdpsd0Q6k83GXAFpZIaFR_DE5EVzVT22EB9Z00TFxeBrL4zXrrgN3j1kroVm6pCtv7CWcF0ECg","username":"","account":"","userId":"","loginStatus":true,"userAttrs":{}}
DEBUG--2023-08-07 17:03:43--http://120.46.172.186:8080 "GET /refresh HTTP/1.1" 200 None
ERROR--2023-08-07 17:03:43--断言失败, 模块名称为:认证接口,接口名称为:刷新token,用例标题:正向用例,用例为:None,期望结果为:{'message': '刷新token成功'},服务器返回数据为:{"token":"eyJhbGciOiJIUzUxMiJ9.eyJzdWIiOiJhZG1pbiIsInRlbmFudElkIjoiLTEiLCJleHAiOjE2OTE0ODU0MjIsImlhdCI6MTY5MTM5OTAyMn0.AJb0b0Z7fh42A4W3fRFg03S264NwNu1fnWxlbJPlndwduuMj8ujr26RYm5ze6hzk9s5UPzd9oGBhiQAdYo5PRA","username":"","account":"","userId":"","loginStatus":true,"userAttrs":{}}
\ No newline at end of file
DEBUG--2023-08-07 17:03:44--http://120.46.172.186:8080 "DELETE /api/demension/v1/dem/deleteDemByIds?ids=1688475997541777408 HTTP/1.1" 200 None
ERROR--2023-08-07 17:03:44--断言失败, 模块名称为:维度管理,接口名称为:根据维度编码删除维度,用例标题:正向用例,用例为:{'ids': '1688475997541777408'},期望结果为:{'state': True, 'message': '删除维度成功'},服务器返回数据为:{"state":true,"message":"删除维度成功!","value":""}
DEBUG--2023-08-07 17:03:45--http://120.46.172.186:8080 "DELETE /api/demension/v1/dem/deleteDemByIds?ids=1688475997541777408 HTTP/1.1" 500 None
ERROR--2023-08-07 17:03:45--断言失败, 模块名称为:维度管理,接口名称为:根据维度编码删除维度,用例标题:正向用例,用例为:{'ids': '1688475997541777408'},期望结果为:{'state': True, 'message': '删除维度成功'},服务器返回数据为:{"state":false,"message":"","logId":"1688476004198137856"}
DEBUG--2023-08-07 17:03:46--Resetting dropped connection: 120.46.172.186
DEBUG--2023-08-07 17:03:46--http://120.46.172.186:8080 "DELETE /api/demension/v1/dem/deleteDemByIds?ids=1688475997541777408 HTTP/1.1" 500 None
ERROR--2023-08-07 17:03:46--断言失败, 模块名称为:维度管理,接口名称为:根据维度编码删除维度,用例标题:正向用例,用例为:{'ids': '1688475997541777408'},期望结果为:{'state': True, 'message': '删除维度成功'},服务器返回数据为:{"state":false,"message":"","logId":"1688476009176776704"}
DEBUG--2023-08-07 17:03:47--Resetting dropped connection: 120.46.172.186
DEBUG--2023-08-07 17:03:47--http://120.46.172.186:8080 "DELETE /api/demension/v1/dem/deleteDemByIds?ids=1688475997541777408 HTTP/1.1" 500 None
ERROR--2023-08-07 17:03:47--断言失败, 模块名称为:维度管理,接口名称为:根据维度编码删除维度,用例标题:正向用例,用例为:{'ids': '1688475997541777408'},期望结果为:{'state': True, 'message': '删除维度成功'},服务器返回数据为:{"state":false,"message":"","logId":"1688476014071529472"}
\ No newline at end of file
DEBUG--2023-08-07 17:03:36--http://120.46.172.186:8080 "POST /auth HTTP/1.1" 500 None
\ No newline at end of file
DEBUG--2023-08-07 17:03:44--http://120.46.172.186:8080 "DELETE /api/demension/v1/dem/deleteDemByIds?ids=1688475997541777408 HTTP/1.1" 200 None
ERROR--2023-08-07 17:03:44--断言失败, 模块名称为:维度管理,接口名称为:根据维度编码删除维度,用例标题:正向用例,用例为:{'ids': '1688475997541777408'},期望结果为:{'state': True, 'message': '删除维度成功'},服务器返回数据为:{"state":true,"message":"删除维度成功!","value":""}
DEBUG--2023-08-07 17:03:45--http://120.46.172.186:8080 "DELETE /api/demension/v1/dem/deleteDemByIds?ids=1688475997541777408 HTTP/1.1" 500 None
ERROR--2023-08-07 17:03:45--断言失败, 模块名称为:维度管理,接口名称为:根据维度编码删除维度,用例标题:正向用例,用例为:{'ids': '1688475997541777408'},期望结果为:{'state': True, 'message': '删除维度成功'},服务器返回数据为:{"state":false,"message":"","logId":"1688476004198137856"}
DEBUG--2023-08-07 17:03:46--Resetting dropped connection: 120.46.172.186
DEBUG--2023-08-07 17:03:46--http://120.46.172.186:8080 "DELETE /api/demension/v1/dem/deleteDemByIds?ids=1688475997541777408 HTTP/1.1" 500 None
ERROR--2023-08-07 17:03:46--断言失败, 模块名称为:维度管理,接口名称为:根据维度编码删除维度,用例标题:正向用例,用例为:{'ids': '1688475997541777408'},期望结果为:{'state': True, 'message': '删除维度成功'},服务器返回数据为:{"state":false,"message":"","logId":"1688476009176776704"}
DEBUG--2023-08-07 17:03:47--Resetting dropped connection: 120.46.172.186
DEBUG--2023-08-07 17:03:47--http://120.46.172.186:8080 "DELETE /api/demension/v1/dem/deleteDemByIds?ids=1688475997541777408 HTTP/1.1" 500 None
ERROR--2023-08-07 17:03:47--断言失败, 模块名称为:维度管理,接口名称为:根据维度编码删除维度,用例标题:正向用例,用例为:{'ids': '1688475997541777408'},期望结果为:{'state': True, 'message': '删除维度成功'},服务器返回数据为:{"state":false,"message":"","logId":"1688476014071529472"}
DEBUG--2023-08-07 17:03:48--Resetting dropped connection: 120.46.172.186
DEBUG--2023-08-07 17:03:48--http://120.46.172.186:8080 "DELETE /api/demension/v1/dem/deleteDemByIds?ids=1688475997541777408 HTTP/1.1" 500 None
ERROR--2023-08-07 17:03:48--断言失败, 模块名称为:维度管理,接口名称为:根据维度编码删除维度,用例标题:正向用例,用例为:{'ids': '1688475997541777408'},期望结果为:{'state': True, 'message': '删除维度成功'},服务器返回数据为:{"state":false,"message":"","logId":"1688476018974670848"}
\ No newline at end of file
断言失败
断言失败
断言失败
断言失败
DEBUG--2023-08-07 17:03:37--Resetting dropped connection: 120.46.172.186
DEBUG--2023-08-07 17:03:37--http://120.46.172.186:8080 "POST /auth HTTP/1.1" 500 None
\ No newline at end of file
DEBUG--2023-08-07 17:03:37--Resetting dropped connection: 120.46.172.186
DEBUG--2023-08-07 17:03:37--http://120.46.172.186:8080 "GET /refresh HTTP/1.1" 200 None
ERROR--2023-08-07 17:03:37--断言失败, 模块名称为:认证接口,接口名称为:刷新token,用例标题:正向用例,用例为:None,期望结果为:{'message': '刷新token成功'},服务器返回数据为:{"token":"eyJhbGciOiJIUzUxMiJ9.eyJzdWIiOiJhZG1pbiIsInRlbmFudElkIjoiLTEiLCJleHAiOjE2OTE0ODU0MTcsImlhdCI6MTY5MTM5OTAxN30.n-7NR1iCjIKHbeH-Djk8t1sRkJi_FVAwgVHcGFWP6kh4xOyu6c4rgNtn817qbxVK9O63Wo9-SnreSvMJI5L8Gw","username":"","account":"","userId":"","loginStatus":true,"userAttrs":{}}
DEBUG--2023-08-07 17:03:39--http://120.46.172.186:8080 "GET /refresh HTTP/1.1" 200 None
ERROR--2023-08-07 17:03:39--断言失败, 模块名称为:认证接口,接口名称为:刷新token,用例标题:正向用例,用例为:None,期望结果为:{'message': '刷新token成功'},服务器返回数据为:{"token":"eyJhbGciOiJIUzUxMiJ9.eyJzdWIiOiJhZG1pbiIsInRlbmFudElkIjoiLTEiLCJleHAiOjE2OTE0ODU0MTgsImlhdCI6MTY5MTM5OTAxOH0.Rb1x9O8uPZcXAfoDbWutU6f3taE2vMl0iRW4WVVwfeKYLS-zF9e0IFTyL2tUDstfMzs0ej7qYnsUg_CXR-qOHg","username":"","account":"","userId":"","loginStatus":true,"userAttrs":{}}
DEBUG--2023-08-07 17:03:40--http://120.46.172.186:8080 "GET /refresh HTTP/1.1" 200 None
ERROR--2023-08-07 17:03:40--断言失败, 模块名称为:认证接口,接口名称为:刷新token,用例标题:正向用例,用例为:None,期望结果为:{'message': '刷新token成功'},服务器返回数据为:{"token":"eyJhbGciOiJIUzUxMiJ9.eyJzdWIiOiJhZG1pbiIsInRlbmFudElkIjoiLTEiLCJleHAiOjE2OTE0ODU0MTksImlhdCI6MTY5MTM5OTAxOX0.WinKyHRVircLGP_CUX1F7Bnc8ppV_aESgAOwYpTrvsaosQKpSM4M310de-C_Isotv4UrWgQHE-a9qJeBxb3Kdw","username":"","account":"","userId":"","loginStatus":true,"userAttrs":{}}
DEBUG--2023-08-07 17:03:41--http://120.46.172.186:8080 "GET /refresh HTTP/1.1" 200 None
ERROR--2023-08-07 17:03:41--断言失败, 模块名称为:认证接口,接口名称为:刷新token,用例标题:正向用例,用例为:None,期望结果为:{'message': '刷新token成功'},服务器返回数据为:{"token":"eyJhbGciOiJIUzUxMiJ9.eyJzdWIiOiJhZG1pbiIsInRlbmFudElkIjoiLTEiLCJleHAiOjE2OTE0ODU0MjAsImlhdCI6MTY5MTM5OTAyMH0.UiLL8CbY6A0_NK2PFWF1YA_lOAuFH2tDwOk5-MP21rQb6-4POQAwoNYaJRF_6QfYBd60YGMTwyBEISUGe-EHXg","username":"","account":"","userId":"","loginStatus":true,"userAttrs":{}}
DEBUG--2023-08-07 17:03:42--http://120.46.172.186:8080 "GET /refresh HTTP/1.1" 200 None
ERROR--2023-08-07 17:03:42--断言失败, 模块名称为:认证接口,接口名称为:刷新token,用例标题:正向用例,用例为:None,期望结果为:{'message': '刷新token成功'},服务器返回数据为:{"token":"eyJhbGciOiJIUzUxMiJ9.eyJzdWIiOiJhZG1pbiIsInRlbmFudElkIjoiLTEiLCJleHAiOjE2OTE0ODU0MjEsImlhdCI6MTY5MTM5OTAyMX0.pk_DluVTDrByMdpsd0Q6k83GXAFpZIaFR_DE5EVzVT22EB9Z00TFxeBrL4zXrrgN3j1kroVm6pCtv7CWcF0ECg","username":"","account":"","userId":"","loginStatus":true,"userAttrs":{}}
\ No newline at end of file
断言失败
断言失败
断言失败
断言失败
断言失败
断言失败
DEBUG--2023-08-07 17:03:37--Resetting dropped connection: 120.46.172.186
DEBUG--2023-08-07 17:03:37--http://120.46.172.186:8080 "POST /auth HTTP/1.1" 500 None
\ No newline at end of file
DEBUG--2023-08-07 17:03:44--http://120.46.172.186:8080 "POST /api/org/v1/org/deleteOrg HTTP/1.1" 200 None
\ No newline at end of file
DEBUG--2023-08-07 17:03:37--Resetting dropped connection: 120.46.172.186
DEBUG--2023-08-07 17:03:37--http://120.46.172.186:8080 "POST /auth HTTP/1.1" 500 None
\ No newline at end of file
断言失败
断言失败
断言失败
断言失败
断言失败
断言失败
DEBUG--2023-08-07 17:03:44--http://120.46.172.186:8080 "DELETE /api/demension/v1/dem/deleteDemByIds?ids=1688475997541777408 HTTP/1.1" 200 None
ERROR--2023-08-07 17:03:44--断言失败, 模块名称为:维度管理,接口名称为:根据维度编码删除维度,用例标题:正向用例,用例为:{'ids': '1688475997541777408'},期望结果为:{'state': True, 'message': '删除维度成功'},服务器返回数据为:{"state":true,"message":"删除维度成功!","value":""}
DEBUG--2023-08-07 17:03:45--http://120.46.172.186:8080 "DELETE /api/demension/v1/dem/deleteDemByIds?ids=1688475997541777408 HTTP/1.1" 500 None
ERROR--2023-08-07 17:03:45--断言失败, 模块名称为:维度管理,接口名称为:根据维度编码删除维度,用例标题:正向用例,用例为:{'ids': '1688475997541777408'},期望结果为:{'state': True, 'message': '删除维度成功'},服务器返回数据为:{"state":false,"message":"","logId":"1688476004198137856"}
DEBUG--2023-08-07 17:03:46--Resetting dropped connection: 120.46.172.186
DEBUG--2023-08-07 17:03:46--http://120.46.172.186:8080 "DELETE /api/demension/v1/dem/deleteDemByIds?ids=1688475997541777408 HTTP/1.1" 500 None
ERROR--2023-08-07 17:03:46--断言失败, 模块名称为:维度管理,接口名称为:根据维度编码删除维度,用例标题:正向用例,用例为:{'ids': '1688475997541777408'},期望结果为:{'state': True, 'message': '删除维度成功'},服务器返回数据为:{"state":false,"message":"","logId":"1688476009176776704"}
DEBUG--2023-08-07 17:03:47--Resetting dropped connection: 120.46.172.186
DEBUG--2023-08-07 17:03:47--http://120.46.172.186:8080 "DELETE /api/demension/v1/dem/deleteDemByIds?ids=1688475997541777408 HTTP/1.1" 500 None
ERROR--2023-08-07 17:03:47--断言失败, 模块名称为:维度管理,接口名称为:根据维度编码删除维度,用例标题:正向用例,用例为:{'ids': '1688475997541777408'},期望结果为:{'state': True, 'message': '删除维度成功'},服务器返回数据为:{"state":false,"message":"","logId":"1688476014071529472"}
DEBUG--2023-08-07 17:03:48--Resetting dropped connection: 120.46.172.186
DEBUG--2023-08-07 17:03:48--http://120.46.172.186:8080 "DELETE /api/demension/v1/dem/deleteDemByIds?ids=1688475997541777408 HTTP/1.1" 500 None
ERROR--2023-08-07 17:03:48--断言失败, 模块名称为:维度管理,接口名称为:根据维度编码删除维度,用例标题:正向用例,用例为:{'ids': '1688475997541777408'},期望结果为:{'state': True, 'message': '删除维度成功'},服务器返回数据为:{"state":false,"message":"","logId":"1688476018974670848"}
DEBUG--2023-08-07 17:03:49--Resetting dropped connection: 120.46.172.186
DEBUG--2023-08-07 17:03:49--http://120.46.172.186:8080 "DELETE /api/demension/v1/dem/deleteDemByIds?ids=1688475997541777408 HTTP/1.1" 500 None
ERROR--2023-08-07 17:03:49--断言失败, 模块名称为:维度管理,接口名称为:根据维度编码删除维度,用例标题:正向用例,用例为:{'ids': '1688475997541777408'},期望结果为:{'state': True, 'message': '删除维度成功'},服务器返回数据为:{"state":false,"message":"","logId":"1688476023861035008"}
\ No newline at end of file
断言失败
断言失败
断言失败
断言失败
断言失败
DEBUG--2023-08-07 17:03:37--Resetting dropped connection: 120.46.172.186
DEBUG--2023-08-07 17:03:37--http://120.46.172.186:8080 "GET /refresh HTTP/1.1" 200 None
ERROR--2023-08-07 17:03:37--断言失败, 模块名称为:认证接口,接口名称为:刷新token,用例标题:正向用例,用例为:None,期望结果为:{'message': '刷新token成功'},服务器返回数据为:{"token":"eyJhbGciOiJIUzUxMiJ9.eyJzdWIiOiJhZG1pbiIsInRlbmFudElkIjoiLTEiLCJleHAiOjE2OTE0ODU0MTcsImlhdCI6MTY5MTM5OTAxN30.n-7NR1iCjIKHbeH-Djk8t1sRkJi_FVAwgVHcGFWP6kh4xOyu6c4rgNtn817qbxVK9O63Wo9-SnreSvMJI5L8Gw","username":"","account":"","userId":"","loginStatus":true,"userAttrs":{}}
DEBUG--2023-08-07 17:03:39--http://120.46.172.186:8080 "GET /refresh HTTP/1.1" 200 None
ERROR--2023-08-07 17:03:39--断言失败, 模块名称为:认证接口,接口名称为:刷新token,用例标题:正向用例,用例为:None,期望结果为:{'message': '刷新token成功'},服务器返回数据为:{"token":"eyJhbGciOiJIUzUxMiJ9.eyJzdWIiOiJhZG1pbiIsInRlbmFudElkIjoiLTEiLCJleHAiOjE2OTE0ODU0MTgsImlhdCI6MTY5MTM5OTAxOH0.Rb1x9O8uPZcXAfoDbWutU6f3taE2vMl0iRW4WVVwfeKYLS-zF9e0IFTyL2tUDstfMzs0ej7qYnsUg_CXR-qOHg","username":"","account":"","userId":"","loginStatus":true,"userAttrs":{}}
DEBUG--2023-08-07 17:03:40--http://120.46.172.186:8080 "GET /refresh HTTP/1.1" 200 None
ERROR--2023-08-07 17:03:40--断言失败, 模块名称为:认证接口,接口名称为:刷新token,用例标题:正向用例,用例为:None,期望结果为:{'message': '刷新token成功'},服务器返回数据为:{"token":"eyJhbGciOiJIUzUxMiJ9.eyJzdWIiOiJhZG1pbiIsInRlbmFudElkIjoiLTEiLCJleHAiOjE2OTE0ODU0MTksImlhdCI6MTY5MTM5OTAxOX0.WinKyHRVircLGP_CUX1F7Bnc8ppV_aESgAOwYpTrvsaosQKpSM4M310de-C_Isotv4UrWgQHE-a9qJeBxb3Kdw","username":"","account":"","userId":"","loginStatus":true,"userAttrs":{}}
DEBUG--2023-08-07 17:03:41--http://120.46.172.186:8080 "GET /refresh HTTP/1.1" 200 None
ERROR--2023-08-07 17:03:41--断言失败, 模块名称为:认证接口,接口名称为:刷新token,用例标题:正向用例,用例为:None,期望结果为:{'message': '刷新token成功'},服务器返回数据为:{"token":"eyJhbGciOiJIUzUxMiJ9.eyJzdWIiOiJhZG1pbiIsInRlbmFudElkIjoiLTEiLCJleHAiOjE2OTE0ODU0MjAsImlhdCI6MTY5MTM5OTAyMH0.UiLL8CbY6A0_NK2PFWF1YA_lOAuFH2tDwOk5-MP21rQb6-4POQAwoNYaJRF_6QfYBd60YGMTwyBEISUGe-EHXg","username":"","account":"","userId":"","loginStatus":true,"userAttrs":{}}
\ No newline at end of file
DEBUG--2023-08-07 17:03:36--Resetting dropped connection: 120.46.172.186
DEBUG--2023-08-07 17:03:37--http://120.46.172.186:8080 "POST /auth HTTP/1.1" 500 None
\ No newline at end of file
DEBUG--2023-08-07 17:03:44--http://120.46.172.186:8080 "DELETE /api/demension/v1/dem/deleteDemByIds?ids=1688475997541777408 HTTP/1.1" 200 None
ERROR--2023-08-07 17:03:44--断言失败, 模块名称为:维度管理,接口名称为:根据维度编码删除维度,用例标题:正向用例,用例为:{'ids': '1688475997541777408'},期望结果为:{'state': True, 'message': '删除维度成功'},服务器返回数据为:{"state":true,"message":"删除维度成功!","value":""}
DEBUG--2023-08-07 17:03:45--http://120.46.172.186:8080 "DELETE /api/demension/v1/dem/deleteDemByIds?ids=1688475997541777408 HTTP/1.1" 500 None
ERROR--2023-08-07 17:03:45--断言失败, 模块名称为:维度管理,接口名称为:根据维度编码删除维度,用例标题:正向用例,用例为:{'ids': '1688475997541777408'},期望结果为:{'state': True, 'message': '删除维度成功'},服务器返回数据为:{"state":false,"message":"","logId":"1688476004198137856"}
DEBUG--2023-08-07 17:03:46--Resetting dropped connection: 120.46.172.186
DEBUG--2023-08-07 17:03:46--http://120.46.172.186:8080 "DELETE /api/demension/v1/dem/deleteDemByIds?ids=1688475997541777408 HTTP/1.1" 500 None
ERROR--2023-08-07 17:03:46--断言失败, 模块名称为:维度管理,接口名称为:根据维度编码删除维度,用例标题:正向用例,用例为:{'ids': '1688475997541777408'},期望结果为:{'state': True, 'message': '删除维度成功'},服务器返回数据为:{"state":false,"message":"","logId":"1688476009176776704"}
\ No newline at end of file
DEBUG--2023-08-07 17:03:37--Resetting dropped connection: 120.46.172.186
DEBUG--2023-08-07 17:03:37--http://120.46.172.186:8080 "POST /auth HTTP/1.1" 500 None
\ No newline at end of file
DEBUG--2023-08-07 17:03:43--http://120.46.172.186:8080 "POST /api/org/v1/org/addOrg HTTP/1.1" 200 None
\ No newline at end of file
DEBUG--2023-08-07 17:03:37--Resetting dropped connection: 120.46.172.186
DEBUG--2023-08-07 17:03:37--http://120.46.172.186:8080 "GET /refresh HTTP/1.1" 200 None
ERROR--2023-08-07 17:03:37--断言失败, 模块名称为:认证接口,接口名称为:刷新token,用例标题:正向用例,用例为:None,期望结果为:{'message': '刷新token成功'},服务器返回数据为:{"token":"eyJhbGciOiJIUzUxMiJ9.eyJzdWIiOiJhZG1pbiIsInRlbmFudElkIjoiLTEiLCJleHAiOjE2OTE0ODU0MTcsImlhdCI6MTY5MTM5OTAxN30.n-7NR1iCjIKHbeH-Djk8t1sRkJi_FVAwgVHcGFWP6kh4xOyu6c4rgNtn817qbxVK9O63Wo9-SnreSvMJI5L8Gw","username":"","account":"","userId":"","loginStatus":true,"userAttrs":{}}
DEBUG--2023-08-07 17:03:39--http://120.46.172.186:8080 "GET /refresh HTTP/1.1" 200 None
ERROR--2023-08-07 17:03:39--断言失败, 模块名称为:认证接口,接口名称为:刷新token,用例标题:正向用例,用例为:None,期望结果为:{'message': '刷新token成功'},服务器返回数据为:{"token":"eyJhbGciOiJIUzUxMiJ9.eyJzdWIiOiJhZG1pbiIsInRlbmFudElkIjoiLTEiLCJleHAiOjE2OTE0ODU0MTgsImlhdCI6MTY5MTM5OTAxOH0.Rb1x9O8uPZcXAfoDbWutU6f3taE2vMl0iRW4WVVwfeKYLS-zF9e0IFTyL2tUDstfMzs0ej7qYnsUg_CXR-qOHg","username":"","account":"","userId":"","loginStatus":true,"userAttrs":{}}
\ No newline at end of file
DEBUG--2023-08-07 17:03:44--http://120.46.172.186:8080 "DELETE /api/demension/v1/dem/deleteDemByIds?ids=1688475997541777408 HTTP/1.1" 200 None
ERROR--2023-08-07 17:03:44--断言失败, 模块名称为:维度管理,接口名称为:根据维度编码删除维度,用例标题:正向用例,用例为:{'ids': '1688475997541777408'},期望结果为:{'state': True, 'message': '删除维度成功'},服务器返回数据为:{"state":true,"message":"删除维度成功!","value":""}
\ No newline at end of file
断言失败
断言失败
断言失败
断言失败
断言失败
DEBUG--2023-08-07 17:03:43--http://120.46.172.186:8080 "POST /api/org/v1/orgParam/saveOrgParams?orgCode=test56_org HTTP/1.1" 200 None
\ No newline at end of file
DEBUG--2023-08-07 17:03:37--Resetting dropped connection: 120.46.172.186
DEBUG--2023-08-07 17:03:37--http://120.46.172.186:8080 "POST /auth HTTP/1.1" 500 None
\ No newline at end of file
DEBUG--2023-08-07 17:03:37--Resetting dropped connection: 120.46.172.186
DEBUG--2023-08-07 17:03:37--http://120.46.172.186:8080 "POST /auth HTTP/1.1" 500 None
\ No newline at end of file
DEBUG--2023-08-07 17:03:37--Resetting dropped connection: 120.46.172.186
DEBUG--2023-08-07 17:03:37--http://120.46.172.186:8080 "GET /refresh HTTP/1.1" 200 None
ERROR--2023-08-07 17:03:37--断言失败, 模块名称为:认证接口,接口名称为:刷新token,用例标题:正向用例,用例为:None,期望结果为:{'message': '刷新token成功'},服务器返回数据为:{"token":"eyJhbGciOiJIUzUxMiJ9.eyJzdWIiOiJhZG1pbiIsInRlbmFudElkIjoiLTEiLCJleHAiOjE2OTE0ODU0MTcsImlhdCI6MTY5MTM5OTAxN30.n-7NR1iCjIKHbeH-Djk8t1sRkJi_FVAwgVHcGFWP6kh4xOyu6c4rgNtn817qbxVK9O63Wo9-SnreSvMJI5L8Gw","username":"","account":"","userId":"","loginStatus":true,"userAttrs":{}}
DEBUG--2023-08-07 17:03:39--http://120.46.172.186:8080 "GET /refresh HTTP/1.1" 200 None
ERROR--2023-08-07 17:03:39--断言失败, 模块名称为:认证接口,接口名称为:刷新token,用例标题:正向用例,用例为:None,期望结果为:{'message': '刷新token成功'},服务器返回数据为:{"token":"eyJhbGciOiJIUzUxMiJ9.eyJzdWIiOiJhZG1pbiIsInRlbmFudElkIjoiLTEiLCJleHAiOjE2OTE0ODU0MTgsImlhdCI6MTY5MTM5OTAxOH0.Rb1x9O8uPZcXAfoDbWutU6f3taE2vMl0iRW4WVVwfeKYLS-zF9e0IFTyL2tUDstfMzs0ej7qYnsUg_CXR-qOHg","username":"","account":"","userId":"","loginStatus":true,"userAttrs":{}}
DEBUG--2023-08-07 17:03:40--http://120.46.172.186:8080 "GET /refresh HTTP/1.1" 200 None
ERROR--2023-08-07 17:03:40--断言失败, 模块名称为:认证接口,接口名称为:刷新token,用例标题:正向用例,用例为:None,期望结果为:{'message': '刷新token成功'},服务器返回数据为:{"token":"eyJhbGciOiJIUzUxMiJ9.eyJzdWIiOiJhZG1pbiIsInRlbmFudElkIjoiLTEiLCJleHAiOjE2OTE0ODU0MTksImlhdCI6MTY5MTM5OTAxOX0.WinKyHRVircLGP_CUX1F7Bnc8ppV_aESgAOwYpTrvsaosQKpSM4M310de-C_Isotv4UrWgQHE-a9qJeBxb3Kdw","username":"","account":"","userId":"","loginStatus":true,"userAttrs":{}}
\ No newline at end of file
DEBUG--2023-08-07 17:03:37--Resetting dropped connection: 120.46.172.186
DEBUG--2023-08-07 17:03:37--http://120.46.172.186:8080 "GET /refresh HTTP/1.1" 200 None
ERROR--2023-08-07 17:03:37--断言失败, 模块名称为:认证接口,接口名称为:刷新token,用例标题:正向用例,用例为:None,期望结果为:{'message': '刷新token成功'},服务器返回数据为:{"token":"eyJhbGciOiJIUzUxMiJ9.eyJzdWIiOiJhZG1pbiIsInRlbmFudElkIjoiLTEiLCJleHAiOjE2OTE0ODU0MTcsImlhdCI6MTY5MTM5OTAxN30.n-7NR1iCjIKHbeH-Djk8t1sRkJi_FVAwgVHcGFWP6kh4xOyu6c4rgNtn817qbxVK9O63Wo9-SnreSvMJI5L8Gw","username":"","account":"","userId":"","loginStatus":true,"userAttrs":{}}
\ No newline at end of file
"Epic","Feature","Story","FAILED","BROKEN","PASSED","SKIPPED","UNKNOWN"
"BPM系统","认证接口","登录系统","0","0","10","0","0"
"BPM系统","组织管理","添加组织","0","0","1","0","0"
"BPM系统","组织管理","保存组织参数","0","0","1","0","0"
"BPM系统","认证接口","刷新token","1","0","0","0","0"
"BPM系统","维度管理","添加维度","0","0","1","0","0"
"BPM系统","维度管理","根据维度编码删除维度","1","0","0","0","0"
"BPM系统","组织管理","删除组织","0","0","1","0","0"
{
"uid" : "b1a8273437954620fa374b796ffaacdd",
"name" : "behaviors",
"children" : [ {
"name" : "BPM系统",
"children" : [ {
"name" : "认证接口",
"children" : [ {
"name" : "登录系统",
"children" : [ {
"name" : "正向用例",
"uid" : "35af4ef76050b260",
"parentUid" : "9eb19157a3426d8d3ab7067a14e9167f",
"status" : "passed",
"time" : {
"start" : 1691399016791,
"stop" : 1691399016848,
"duration" : 57
},
"flaky" : false,
"newFailed" : false,
"parameters" : [ "{'password': 'MTIzNDU2', 'username': 'admin'}", "{'username': '超级管理员', 'account': 'admin'}", "'登录系统'", "'高'", "'POST'", "'application/json'", "'认证接口'", "None", "None", "'正向用例'", "None", "'http://120.46.172.186:8080/auth'" ]
}, {
"name" : "反向用例-用户名为空",
"uid" : "e6de64866f470634",
"parentUid" : "9eb19157a3426d8d3ab7067a14e9167f",
"status" : "passed",
"time" : {
"start" : 1691399016872,
"stop" : 1691399016926,
"duration" : 54
},
"flaky" : false,
"newFailed" : false,
"parameters" : [ "{'password': 'MTIzNDU2', 'username': ''}", "{'state': False, 'message': '账号或密码错误'}", "'登录系统'", "'中'", "'POST'", "'application/json'", "'认证接口'", "None", "None", "'反向用例-用户名为空'", "None", "'http://120.46.172.186:8080/auth'" ]
}, {
"name" : "反向用例-用户名过长",
"uid" : "4846ba5e55af2bf1",
"parentUid" : "9eb19157a3426d8d3ab7067a14e9167f",
"status" : "passed",
"time" : {
"start" : 1691399016938,
"stop" : 1691399017031,
"duration" : 93
},
"flaky" : false,
"newFailed" : false,
"parameters" : [ "{'password': 'MTIzNDU2', 'username': 'adminadminadminadminadminadminadminadminadmin'}", "{'state': False, 'message': '账号或密码错误'}", "'登录系统'", "'中'", "'POST'", "'application/json'", "'认证接口'", "None", "None", "'反向用例-用户名过长'", "None", "'http://120.46.172.186:8080/auth'" ]
}, {
"name" : "反向用例-用户名过短",
"uid" : "876f7a309f93bdd4",
"parentUid" : "9eb19157a3426d8d3ab7067a14e9167f",
"status" : "passed",
"time" : {
"start" : 1691399017044,
"stop" : 1691399017142,
"duration" : 98
},
"flaky" : false,
"newFailed" : false,
"parameters" : [ "{'password': 'MTIzNDU2', 'username': 'a'}", "{'state': False, 'message': '账号或密码错误'}", "'登录系统'", "'中'", "'POST'", "'application/json'", "'认证接口'", "None", "None", "'反向用例-用户名过短'", "None", "'http://120.46.172.186:8080/auth'" ]
}, {
"name" : "反向用例-用户名特殊字符",
"uid" : "bfbb6ff6c978dd13",
"parentUid" : "9eb19157a3426d8d3ab7067a14e9167f",
"status" : "passed",
"time" : {
"start" : 1691399017156,
"stop" : 1691399017255,
"duration" : 99
},
"flaky" : false,
"newFailed" : false,
"parameters" : [ "{'password': 'MTIzNDU2', 'username': '▬♦◊◦☼♠♣'}", "{'state': False, 'message': '账号或密码错误'}", "'登录系统'", "'中'", "'POST'", "'application/json'", "'认证接口'", "None", "None", "'反向用例-用户名特殊字符'", "None", "'http://120.46.172.186:8080/auth'" ]
}, {
"name" : "反向用例-用户名错误",
"uid" : "7138d75998f57a3d",
"parentUid" : "9eb19157a3426d8d3ab7067a14e9167f",
"status" : "passed",
"time" : {
"start" : 1691399017270,
"stop" : 1691399017363,
"duration" : 93
},
"flaky" : false,
"newFailed" : false,
"parameters" : [ "{'password': 'MTIzNDU2', 'username': 'tomcat'}", "{'state': False, 'message': '账号或密码错误'}", "'登录系统'", "'中'", "'POST'", "'json'", "'认证接口'", "None", "None", "'反向用例-用户名错误'", "None", "'http://120.46.172.186:8080/auth'" ]
}, {
"name" : "反向用例-密码为空",
"uid" : "9262c97d3be172ea",
"parentUid" : "9eb19157a3426d8d3ab7067a14e9167f",
"status" : "passed",
"time" : {
"start" : 1691399017375,
"stop" : 1691399017467,
"duration" : 92
},
"flaky" : false,
"newFailed" : false,
"parameters" : [ "{'password': '', 'username': 'admin'}", "{'state': False, 'message': '账号或密码错误'}", "'登录系统'", "'中'", "'POST'", "'application/json'", "'认证接口'", "None", "None", "'反向用例-密码为空'", "None", "'http://120.46.172.186:8080/auth'" ]
}, {
"name" : "反向用例-密码为长",
"uid" : "744f2d6bfb921a07",
"parentUid" : "9eb19157a3426d8d3ab7067a14e9167f",
"status" : "passed",
"time" : {
"start" : 1691399017479,
"stop" : 1691399017576,
"duration" : 97
},
"flaky" : false,
"newFailed" : false,
"parameters" : [ "{'password': 'MTIzNDU2MTIzNDU2MTIzNDU2MTIzNDU2MTIzNDU2MTIzNDU2', 'username': 'admin'}", "{'state': False, 'message': '账号或密码错误'}", "'登录系统'", "'中'", "'POST'", "'application/json'", "'认证接口'", "None", "None", "'反向用例-密码为长'", "None", "'http://120.46.172.186:8080/auth'" ]
}, {
"name" : "反向用例-密码为过短",
"uid" : "48f2044be487dde3",
"parentUid" : "9eb19157a3426d8d3ab7067a14e9167f",
"status" : "passed",
"time" : {
"start" : 1691399017591,
"stop" : 1691399017687,
"duration" : 96
},
"flaky" : false,
"newFailed" : false,
"parameters" : [ "{'password': '1', 'username': 'admin'}", "{'state': False, 'message': '账号或密码错误'}", "'登录系统'", "'中'", "'PoST'", "'application/json'", "'认证接口'", "None", "None", "'反向用例-密码为过短'", "None", "'http://120.46.172.186:8080/auth'" ]
}, {
"name" : "反向用例-密码为特殊字符",
"uid" : "f99e365a0b702222",
"parentUid" : "9eb19157a3426d8d3ab7067a14e9167f",
"status" : "passed",
"time" : {
"start" : 1691399017699,
"stop" : 1691399017794,
"duration" : 95
},
"flaky" : false,
"newFailed" : false,
"parameters" : [ "{'password': '▬♦◊◦☼♠♣', 'username': 'admin'}", "{'state': False, 'message': '账号或密码错误'}", "'登录系统'", "'中'", "'POST'", "'application/json'", "'认证接口'", "None", "None", "'反向用例-密码为特殊字符'", "None", "'http://120.46.172.186:8080/auth'" ]
} ],
"uid" : "9eb19157a3426d8d3ab7067a14e9167f"
}, {
"name" : "刷新token",
"children" : [ {
"name" : "正向用例",
"uid" : "cc13490ee94aa27d",
"parentUid" : "a409e3a0b6634abcef404e6df31976c5",
"status" : "failed",
"time" : {
"start" : 1691399023476,
"stop" : 1691399023532,
"duration" : 56
},
"flaky" : false,
"newFailed" : false,
"parameters" : [ "None", "{'message': '刷新token成功'}", "'刷新token'", "'中'", "'get'", "None", "'认证接口'", "None", "None", "'正向用例'", "None", "'http://120.46.172.186:8080/refresh'" ]
} ],
"uid" : "a409e3a0b6634abcef404e6df31976c5"
} ],
"uid" : "daf4a81c8500143ac26c740652b2737a"
}, {
"name" : "维度管理",
"children" : [ {
"name" : "添加维度",
"children" : [ {
"name" : "正向用例",
"uid" : "342a24609b3996e0",
"parentUid" : "3b95457e3dff05384511589b8078699c",
"status" : "passed",
"time" : {
"start" : 1691399023560,
"stop" : 1691399023701,
"duration" : 141
},
"flaky" : false,
"newFailed" : false,
"parameters" : [ "{'code': 'test56_dem', 'description': '测试56期的维度', 'isDefault': 0, 'name': '测试56期的维度'}", "{'state': True, 'message': '添加维度成功!'}", "'添加维度'", "'高'", "'post'", "'application/json'", "'维度管理'", "'DELETE FROM uc_demension WHERE `CODE_`=\"test56_dem\";'", "'delete'", "'正向用例'", "None", "'http://120.46.172.186:8080/api/demension/v1/dem/addDem'" ]
} ],
"uid" : "3b95457e3dff05384511589b8078699c"
}, {
"name" : "根据维度编码删除维度",
"children" : [ {
"name" : "正向用例",
"uid" : "33375d4e860e5456",
"parentUid" : "44927dd409a65c91904e4c3a6b3c1d86",
"status" : "failed",
"time" : {
"start" : 1691399029838,
"stop" : 1691399029973,
"duration" : 135
},
"flaky" : false,
"newFailed" : false,
"parameters" : [ "{'ids': '1688475997541777408'}", "{'state': True, 'message': '删除维度成功'}", "'根据维度编码删除维度'", "'高'", "'DELETE'", "'query'", "'维度管理'", "'SELECT ID_ FROM uc_demension WHERE `CODE_`=\"test56_dem\";'", "'select'", "'正向用例'", "'ids'", "'http://120.46.172.186:8080/api/demension/v1/dem/deleteDemByIds'" ]
} ],
"uid" : "44927dd409a65c91904e4c3a6b3c1d86"
} ],
"uid" : "f491e726ab090b27f6eb774a22fe1587"
}, {
"name" : "组织管理",
"children" : [ {
"name" : "添加组织",
"children" : [ {
"name" : "正向用例",
"uid" : "995aa7bfe2ad2c36",
"parentUid" : "3d6644ef5d3e8c0186c93f4d11d89bd9",
"status" : "passed",
"time" : {
"start" : 1691399023717,
"stop" : 1691399023898,
"duration" : 181
},
"flaky" : false,
"newFailed" : false,
"parameters" : [ "{'code': 'test56_org', 'demId': '不知道', 'exceedLimitNum': 0, 'grade': '', 'limitNum': 0, 'name': '测试的组织', 'nowNum': 0, 'orderNo': 0, 'parentId': '0'}", "{'state': True, 'message': '添加组织成功!'}", "'添加组织'", "'高'", "'post'", "'application/json'", "'组织管理'", "{'select': 'SELECT ID_ FROM uc_demension WHERE `CODE_`=\"test56_dem\";', 'delete': 'DELETE FROM uc_org WHERE `CODE_`=\"test56_org\";'}", "'delete|select'", "'正向用例'", "'demId'", "'http://120.46.172.186:8080/api/org/v1/org/addOrg'" ]
} ],
"uid" : "3d6644ef5d3e8c0186c93f4d11d89bd9"
}, {
"name" : "保存组织参数",
"children" : [ {
"name" : "正向用例",
"uid" : "ca0f0da1fb5b1a9d",
"parentUid" : "778600cb26b8f8f7203250b2d93427cd",
"status" : "passed",
"time" : {
"start" : 1691399023909,
"stop" : 1691399023983,
"duration" : 74
},
"flaky" : false,
"newFailed" : false,
"parameters" : [ "{'query': {'orgCode': 'test56_org'}, 'body': [{'alias': 'sz', 'value': 0}, {'alias': 'zy', 'value': 'math'}, {'alias': 'rq', 'value': '2023-08-04T16:00:00.000Z'}, {'alias': 'ah', 'value': 'lq'}, {'alias': 'yyyy', 'value': '越高越好'}, {'alias': 'xb', 'value': '2'}]}", "{'state': True, 'message': '保存组织参数成功!'}", "'保存组织参数'", "'高'", "'post'", "'application/json|query'", "'组织管理'", "None", "None", "'正向用例'", "None", "'http://120.46.172.186:8080/api/org/v1/orgParam/saveOrgParams'" ]
} ],
"uid" : "778600cb26b8f8f7203250b2d93427cd"
}, {
"name" : "删除组织",
"children" : [ {
"name" : "正向用例",
"uid" : "9fdbdff7fbc9aba9",
"parentUid" : "90ce342b686b1926c1d90c881fb5b7b0",
"status" : "passed",
"time" : {
"start" : 1691399023993,
"stop" : 1691399024052,
"duration" : 59
},
"flaky" : false,
"newFailed" : false,
"parameters" : [ "'test56_org'", "{'state': True, 'message': '删除组织成功!'}", "'删除组织'", "'高'", "'post'", "'text/plain'", "'组织管理'", "None", "None", "'正向用例'", "None", "'http://120.46.172.186:8080/api/org/v1/org/deleteOrg'" ]
} ],
"uid" : "90ce342b686b1926c1d90c881fb5b7b0"
} ],
"uid" : "ef3f7033cd07ff8e9e952819ec88f312"
} ],
"uid" : "f2ae4690c9b2f3df492f4f543cc9c7a2"
} ]
}
\ No newline at end of file
"Category","FAILED","BROKEN","PASSED","SKIPPED","UNKNOWN"
"Product defects","2","0","0","0","0"
{
"uid" : "4b4757e66a1912dae1a509f688f20b0f",
"name" : "categories",
"children" : [ {
"name" : "Product defects",
"children" : [ {
"name" : "AssertionError: 断言失败",
"children" : [ {
"name" : "正向用例",
"uid" : "cc13490ee94aa27d",
"parentUid" : "19135fd4a1c65086de1dc2a02ed9d4e0",
"status" : "failed",
"time" : {
"start" : 1691399023476,
"stop" : 1691399023532,
"duration" : 56
},
"flaky" : false,
"newFailed" : false,
"parameters" : [ "None", "{'message': '刷新token成功'}", "'刷新token'", "'中'", "'get'", "None", "'认证接口'", "None", "None", "'正向用例'", "None", "'http://120.46.172.186:8080/refresh'" ]
}, {
"name" : "正向用例",
"uid" : "33375d4e860e5456",
"parentUid" : "19135fd4a1c65086de1dc2a02ed9d4e0",
"status" : "failed",
"time" : {
"start" : 1691399029838,
"stop" : 1691399029973,
"duration" : 135
},
"flaky" : false,
"newFailed" : false,
"parameters" : [ "{'ids': '1688475997541777408'}", "{'state': True, 'message': '删除维度成功'}", "'根据维度编码删除维度'", "'高'", "'DELETE'", "'query'", "'维度管理'", "'SELECT ID_ FROM uc_demension WHERE `CODE_`=\"test56_dem\";'", "'select'", "'正向用例'", "'ids'", "'http://120.46.172.186:8080/api/demension/v1/dem/deleteDemByIds'" ]
} ],
"uid" : "19135fd4a1c65086de1dc2a02ed9d4e0"
} ],
"uid" : "8fb3a91ba5aaf9de24cc8a92edc82b5d"
} ]
}
\ No newline at end of file
{
"uid" : "83edc06c07f9ae9e47eb6dd1b683e4e2",
"name" : "packages",
"children" : [ {
"name" : "test_bpm",
"children" : [ {
"name" : "正向用例",
"uid" : "35af4ef76050b260",
"parentUid" : "4a32e30797efccc00725261109ae2af4",
"status" : "passed",
"time" : {
"start" : 1691399016791,
"stop" : 1691399016848,
"duration" : 57
},
"flaky" : false,
"newFailed" : false,
"parameters" : [ "{'password': 'MTIzNDU2', 'username': 'admin'}", "{'username': '超级管理员', 'account': 'admin'}", "'登录系统'", "'高'", "'POST'", "'application/json'", "'认证接口'", "None", "None", "'正向用例'", "None", "'http://120.46.172.186:8080/auth'" ]
}, {
"name" : "反向用例-用户名为空",
"uid" : "e6de64866f470634",
"parentUid" : "4a32e30797efccc00725261109ae2af4",
"status" : "passed",
"time" : {
"start" : 1691399016872,
"stop" : 1691399016926,
"duration" : 54
},
"flaky" : false,
"newFailed" : false,
"parameters" : [ "{'password': 'MTIzNDU2', 'username': ''}", "{'state': False, 'message': '账号或密码错误'}", "'登录系统'", "'中'", "'POST'", "'application/json'", "'认证接口'", "None", "None", "'反向用例-用户名为空'", "None", "'http://120.46.172.186:8080/auth'" ]
}, {
"name" : "反向用例-用户名过长",
"uid" : "4846ba5e55af2bf1",
"parentUid" : "4a32e30797efccc00725261109ae2af4",
"status" : "passed",
"time" : {
"start" : 1691399016938,
"stop" : 1691399017031,
"duration" : 93
},
"flaky" : false,
"newFailed" : false,
"parameters" : [ "{'password': 'MTIzNDU2', 'username': 'adminadminadminadminadminadminadminadminadmin'}", "{'state': False, 'message': '账号或密码错误'}", "'登录系统'", "'中'", "'POST'", "'application/json'", "'认证接口'", "None", "None", "'反向用例-用户名过长'", "None", "'http://120.46.172.186:8080/auth'" ]
}, {
"name" : "反向用例-用户名过短",
"uid" : "876f7a309f93bdd4",
"parentUid" : "4a32e30797efccc00725261109ae2af4",
"status" : "passed",
"time" : {
"start" : 1691399017044,
"stop" : 1691399017142,
"duration" : 98
},
"flaky" : false,
"newFailed" : false,
"parameters" : [ "{'password': 'MTIzNDU2', 'username': 'a'}", "{'state': False, 'message': '账号或密码错误'}", "'登录系统'", "'中'", "'POST'", "'application/json'", "'认证接口'", "None", "None", "'反向用例-用户名过短'", "None", "'http://120.46.172.186:8080/auth'" ]
}, {
"name" : "反向用例-用户名特殊字符",
"uid" : "bfbb6ff6c978dd13",
"parentUid" : "4a32e30797efccc00725261109ae2af4",
"status" : "passed",
"time" : {
"start" : 1691399017156,
"stop" : 1691399017255,
"duration" : 99
},
"flaky" : false,
"newFailed" : false,
"parameters" : [ "{'password': 'MTIzNDU2', 'username': '▬♦◊◦☼♠♣'}", "{'state': False, 'message': '账号或密码错误'}", "'登录系统'", "'中'", "'POST'", "'application/json'", "'认证接口'", "None", "None", "'反向用例-用户名特殊字符'", "None", "'http://120.46.172.186:8080/auth'" ]
}, {
"name" : "反向用例-用户名错误",
"uid" : "7138d75998f57a3d",
"parentUid" : "4a32e30797efccc00725261109ae2af4",
"status" : "passed",
"time" : {
"start" : 1691399017270,
"stop" : 1691399017363,
"duration" : 93
},
"flaky" : false,
"newFailed" : false,
"parameters" : [ "{'password': 'MTIzNDU2', 'username': 'tomcat'}", "{'state': False, 'message': '账号或密码错误'}", "'登录系统'", "'中'", "'POST'", "'json'", "'认证接口'", "None", "None", "'反向用例-用户名错误'", "None", "'http://120.46.172.186:8080/auth'" ]
}, {
"name" : "反向用例-密码为空",
"uid" : "9262c97d3be172ea",
"parentUid" : "4a32e30797efccc00725261109ae2af4",
"status" : "passed",
"time" : {
"start" : 1691399017375,
"stop" : 1691399017467,
"duration" : 92
},
"flaky" : false,
"newFailed" : false,
"parameters" : [ "{'password': '', 'username': 'admin'}", "{'state': False, 'message': '账号或密码错误'}", "'登录系统'", "'中'", "'POST'", "'application/json'", "'认证接口'", "None", "None", "'反向用例-密码为空'", "None", "'http://120.46.172.186:8080/auth'" ]
}, {
"name" : "反向用例-密码为长",
"uid" : "744f2d6bfb921a07",
"parentUid" : "4a32e30797efccc00725261109ae2af4",
"status" : "passed",
"time" : {
"start" : 1691399017479,
"stop" : 1691399017576,
"duration" : 97
},
"flaky" : false,
"newFailed" : false,
"parameters" : [ "{'password': 'MTIzNDU2MTIzNDU2MTIzNDU2MTIzNDU2MTIzNDU2MTIzNDU2', 'username': 'admin'}", "{'state': False, 'message': '账号或密码错误'}", "'登录系统'", "'中'", "'POST'", "'application/json'", "'认证接口'", "None", "None", "'反向用例-密码为长'", "None", "'http://120.46.172.186:8080/auth'" ]
}, {
"name" : "反向用例-密码为过短",
"uid" : "48f2044be487dde3",
"parentUid" : "4a32e30797efccc00725261109ae2af4",
"status" : "passed",
"time" : {
"start" : 1691399017591,
"stop" : 1691399017687,
"duration" : 96
},
"flaky" : false,
"newFailed" : false,
"parameters" : [ "{'password': '1', 'username': 'admin'}", "{'state': False, 'message': '账号或密码错误'}", "'登录系统'", "'中'", "'PoST'", "'application/json'", "'认证接口'", "None", "None", "'反向用例-密码为过短'", "None", "'http://120.46.172.186:8080/auth'" ]
}, {
"name" : "反向用例-密码为特殊字符",
"uid" : "f99e365a0b702222",
"parentUid" : "4a32e30797efccc00725261109ae2af4",
"status" : "passed",
"time" : {
"start" : 1691399017699,
"stop" : 1691399017794,
"duration" : 95
},
"flaky" : false,
"newFailed" : false,
"parameters" : [ "{'password': '▬♦◊◦☼♠♣', 'username': 'admin'}", "{'state': False, 'message': '账号或密码错误'}", "'登录系统'", "'中'", "'POST'", "'application/json'", "'认证接口'", "None", "None", "'反向用例-密码为特殊字符'", "None", "'http://120.46.172.186:8080/auth'" ]
}, {
"name" : "正向用例",
"uid" : "cc13490ee94aa27d",
"parentUid" : "4a32e30797efccc00725261109ae2af4",
"status" : "failed",
"time" : {
"start" : 1691399023476,
"stop" : 1691399023532,
"duration" : 56
},
"flaky" : false,
"newFailed" : false,
"parameters" : [ "None", "{'message': '刷新token成功'}", "'刷新token'", "'中'", "'get'", "None", "'认证接口'", "None", "None", "'正向用例'", "None", "'http://120.46.172.186:8080/refresh'" ]
}, {
"name" : "正向用例",
"uid" : "342a24609b3996e0",
"parentUid" : "4a32e30797efccc00725261109ae2af4",
"status" : "passed",
"time" : {
"start" : 1691399023560,
"stop" : 1691399023701,
"duration" : 141
},
"flaky" : false,
"newFailed" : false,
"parameters" : [ "{'code': 'test56_dem', 'description': '测试56期的维度', 'isDefault': 0, 'name': '测试56期的维度'}", "{'state': True, 'message': '添加维度成功!'}", "'添加维度'", "'高'", "'post'", "'application/json'", "'维度管理'", "'DELETE FROM uc_demension WHERE `CODE_`=\"test56_dem\";'", "'delete'", "'正向用例'", "None", "'http://120.46.172.186:8080/api/demension/v1/dem/addDem'" ]
}, {
"name" : "正向用例",
"uid" : "995aa7bfe2ad2c36",
"parentUid" : "4a32e30797efccc00725261109ae2af4",
"status" : "passed",
"time" : {
"start" : 1691399023717,
"stop" : 1691399023898,
"duration" : 181
},
"flaky" : false,
"newFailed" : false,
"parameters" : [ "{'code': 'test56_org', 'demId': '不知道', 'exceedLimitNum': 0, 'grade': '', 'limitNum': 0, 'name': '测试的组织', 'nowNum': 0, 'orderNo': 0, 'parentId': '0'}", "{'state': True, 'message': '添加组织成功!'}", "'添加组织'", "'高'", "'post'", "'application/json'", "'组织管理'", "{'select': 'SELECT ID_ FROM uc_demension WHERE `CODE_`=\"test56_dem\";', 'delete': 'DELETE FROM uc_org WHERE `CODE_`=\"test56_org\";'}", "'delete|select'", "'正向用例'", "'demId'", "'http://120.46.172.186:8080/api/org/v1/org/addOrg'" ]
}, {
"name" : "正向用例",
"uid" : "ca0f0da1fb5b1a9d",
"parentUid" : "4a32e30797efccc00725261109ae2af4",
"status" : "passed",
"time" : {
"start" : 1691399023909,
"stop" : 1691399023983,
"duration" : 74
},
"flaky" : false,
"newFailed" : false,
"parameters" : [ "{'query': {'orgCode': 'test56_org'}, 'body': [{'alias': 'sz', 'value': 0}, {'alias': 'zy', 'value': 'math'}, {'alias': 'rq', 'value': '2023-08-04T16:00:00.000Z'}, {'alias': 'ah', 'value': 'lq'}, {'alias': 'yyyy', 'value': '越高越好'}, {'alias': 'xb', 'value': '2'}]}", "{'state': True, 'message': '保存组织参数成功!'}", "'保存组织参数'", "'高'", "'post'", "'application/json|query'", "'组织管理'", "None", "None", "'正向用例'", "None", "'http://120.46.172.186:8080/api/org/v1/orgParam/saveOrgParams'" ]
}, {
"name" : "正向用例",
"uid" : "9fdbdff7fbc9aba9",
"parentUid" : "4a32e30797efccc00725261109ae2af4",
"status" : "passed",
"time" : {
"start" : 1691399023993,
"stop" : 1691399024052,
"duration" : 59
},
"flaky" : false,
"newFailed" : false,
"parameters" : [ "'test56_org'", "{'state': True, 'message': '删除组织成功!'}", "'删除组织'", "'高'", "'post'", "'text/plain'", "'组织管理'", "None", "None", "'正向用例'", "None", "'http://120.46.172.186:8080/api/org/v1/org/deleteOrg'" ]
}, {
"name" : "正向用例",
"uid" : "33375d4e860e5456",
"parentUid" : "4a32e30797efccc00725261109ae2af4",
"status" : "failed",
"time" : {
"start" : 1691399029838,
"stop" : 1691399029973,
"duration" : 135
},
"flaky" : false,
"newFailed" : false,
"parameters" : [ "{'ids': '1688475997541777408'}", "{'state': True, 'message': '删除维度成功'}", "'根据维度编码删除维度'", "'高'", "'DELETE'", "'query'", "'维度管理'", "'SELECT ID_ FROM uc_demension WHERE `CODE_`=\"test56_dem\";'", "'select'", "'正向用例'", "'ids'", "'http://120.46.172.186:8080/api/demension/v1/dem/deleteDemByIds'" ]
} ],
"uid" : "4a32e30797efccc00725261109ae2af4"
} ]
}
\ No newline at end of file
"Status","Start Time","Stop Time","Duration in ms","Parent Suite","Suite","Sub Suite","Test Class","Test Method","Name","Description"
"passed","Mon Aug 07 17:03:37 SGT 2023","Mon Aug 07 17:03:37 SGT 2023","92","","test_bpm","TestBPM","","","反向用例-密码为空",""
"passed","Mon Aug 07 17:03:36 SGT 2023","Mon Aug 07 17:03:37 SGT 2023","93","","test_bpm","TestBPM","","","反向用例-用户名过长",""
"passed","Mon Aug 07 17:03:43 SGT 2023","Mon Aug 07 17:03:43 SGT 2023","181","","test_bpm","TestBPM","","","正向用例",""
"passed","Mon Aug 07 17:03:43 SGT 2023","Mon Aug 07 17:03:43 SGT 2023","74","","test_bpm","TestBPM","","","正向用例",""
"failed","Mon Aug 07 17:03:43 SGT 2023","Mon Aug 07 17:03:43 SGT 2023","56","","test_bpm","TestBPM","","","正向用例",""
"passed","Mon Aug 07 17:03:43 SGT 2023","Mon Aug 07 17:03:43 SGT 2023","141","","test_bpm","TestBPM","","","正向用例",""
"failed","Mon Aug 07 17:03:49 SGT 2023","Mon Aug 07 17:03:49 SGT 2023","135","","test_bpm","TestBPM","","","正向用例",""
"passed","Mon Aug 07 17:03:36 SGT 2023","Mon Aug 07 17:03:36 SGT 2023","57","","test_bpm","TestBPM","","","正向用例",""
"passed","Mon Aug 07 17:03:37 SGT 2023","Mon Aug 07 17:03:37 SGT 2023","98","","test_bpm","TestBPM","","","反向用例-用户名过短",""
"passed","Mon Aug 07 17:03:37 SGT 2023","Mon Aug 07 17:03:37 SGT 2023","96","","test_bpm","TestBPM","","","反向用例-密码为过短",""
"passed","Mon Aug 07 17:03:36 SGT 2023","Mon Aug 07 17:03:36 SGT 2023","54","","test_bpm","TestBPM","","","反向用例-用户名为空",""
"passed","Mon Aug 07 17:03:43 SGT 2023","Mon Aug 07 17:03:44 SGT 2023","59","","test_bpm","TestBPM","","","正向用例",""
"passed","Mon Aug 07 17:03:37 SGT 2023","Mon Aug 07 17:03:37 SGT 2023","99","","test_bpm","TestBPM","","","反向用例-用户名特殊字符",""
"passed","Mon Aug 07 17:03:37 SGT 2023","Mon Aug 07 17:03:37 SGT 2023","97","","test_bpm","TestBPM","","","反向用例-密码为长",""
"passed","Mon Aug 07 17:03:37 SGT 2023","Mon Aug 07 17:03:37 SGT 2023","95","","test_bpm","TestBPM","","","反向用例-密码为特殊字符",""
"passed","Mon Aug 07 17:03:37 SGT 2023","Mon Aug 07 17:03:37 SGT 2023","93","","test_bpm","TestBPM","","","反向用例-用户名错误",""
{
"uid" : "98d3104e051c652961429bf95fa0b5d6",
"name" : "suites",
"children" : [ {
"name" : "test_bpm",
"children" : [ {
"name" : "TestBPM",
"children" : [ {
"name" : "正向用例",
"uid" : "35af4ef76050b260",
"parentUid" : "9e2149d4e33ad22996308efb2c8b042b",
"status" : "passed",
"time" : {
"start" : 1691399016791,
"stop" : 1691399016848,
"duration" : 57
},
"flaky" : false,
"newFailed" : false,
"parameters" : [ "{'password': 'MTIzNDU2', 'username': 'admin'}", "{'username': '超级管理员', 'account': 'admin'}", "'登录系统'", "'高'", "'POST'", "'application/json'", "'认证接口'", "None", "None", "'正向用例'", "None", "'http://120.46.172.186:8080/auth'" ]
}, {
"name" : "反向用例-用户名为空",
"uid" : "e6de64866f470634",
"parentUid" : "9e2149d4e33ad22996308efb2c8b042b",
"status" : "passed",
"time" : {
"start" : 1691399016872,
"stop" : 1691399016926,
"duration" : 54
},
"flaky" : false,
"newFailed" : false,
"parameters" : [ "{'password': 'MTIzNDU2', 'username': ''}", "{'state': False, 'message': '账号或密码错误'}", "'登录系统'", "'中'", "'POST'", "'application/json'", "'认证接口'", "None", "None", "'反向用例-用户名为空'", "None", "'http://120.46.172.186:8080/auth'" ]
}, {
"name" : "反向用例-用户名过长",
"uid" : "4846ba5e55af2bf1",
"parentUid" : "9e2149d4e33ad22996308efb2c8b042b",
"status" : "passed",
"time" : {
"start" : 1691399016938,
"stop" : 1691399017031,
"duration" : 93
},
"flaky" : false,
"newFailed" : false,
"parameters" : [ "{'password': 'MTIzNDU2', 'username': 'adminadminadminadminadminadminadminadminadmin'}", "{'state': False, 'message': '账号或密码错误'}", "'登录系统'", "'中'", "'POST'", "'application/json'", "'认证接口'", "None", "None", "'反向用例-用户名过长'", "None", "'http://120.46.172.186:8080/auth'" ]
}, {
"name" : "反向用例-用户名过短",
"uid" : "876f7a309f93bdd4",
"parentUid" : "9e2149d4e33ad22996308efb2c8b042b",
"status" : "passed",
"time" : {
"start" : 1691399017044,
"stop" : 1691399017142,
"duration" : 98
},
"flaky" : false,
"newFailed" : false,
"parameters" : [ "{'password': 'MTIzNDU2', 'username': 'a'}", "{'state': False, 'message': '账号或密码错误'}", "'登录系统'", "'中'", "'POST'", "'application/json'", "'认证接口'", "None", "None", "'反向用例-用户名过短'", "None", "'http://120.46.172.186:8080/auth'" ]
}, {
"name" : "反向用例-用户名特殊字符",
"uid" : "bfbb6ff6c978dd13",
"parentUid" : "9e2149d4e33ad22996308efb2c8b042b",
"status" : "passed",
"time" : {
"start" : 1691399017156,
"stop" : 1691399017255,
"duration" : 99
},
"flaky" : false,
"newFailed" : false,
"parameters" : [ "{'password': 'MTIzNDU2', 'username': '▬♦◊◦☼♠♣'}", "{'state': False, 'message': '账号或密码错误'}", "'登录系统'", "'中'", "'POST'", "'application/json'", "'认证接口'", "None", "None", "'反向用例-用户名特殊字符'", "None", "'http://120.46.172.186:8080/auth'" ]
}, {
"name" : "反向用例-用户名错误",
"uid" : "7138d75998f57a3d",
"parentUid" : "9e2149d4e33ad22996308efb2c8b042b",
"status" : "passed",
"time" : {
"start" : 1691399017270,
"stop" : 1691399017363,
"duration" : 93
},
"flaky" : false,
"newFailed" : false,
"parameters" : [ "{'password': 'MTIzNDU2', 'username': 'tomcat'}", "{'state': False, 'message': '账号或密码错误'}", "'登录系统'", "'中'", "'POST'", "'json'", "'认证接口'", "None", "None", "'反向用例-用户名错误'", "None", "'http://120.46.172.186:8080/auth'" ]
}, {
"name" : "反向用例-密码为空",
"uid" : "9262c97d3be172ea",
"parentUid" : "9e2149d4e33ad22996308efb2c8b042b",
"status" : "passed",
"time" : {
"start" : 1691399017375,
"stop" : 1691399017467,
"duration" : 92
},
"flaky" : false,
"newFailed" : false,
"parameters" : [ "{'password': '', 'username': 'admin'}", "{'state': False, 'message': '账号或密码错误'}", "'登录系统'", "'中'", "'POST'", "'application/json'", "'认证接口'", "None", "None", "'反向用例-密码为空'", "None", "'http://120.46.172.186:8080/auth'" ]
}, {
"name" : "反向用例-密码为长",
"uid" : "744f2d6bfb921a07",
"parentUid" : "9e2149d4e33ad22996308efb2c8b042b",
"status" : "passed",
"time" : {
"start" : 1691399017479,
"stop" : 1691399017576,
"duration" : 97
},
"flaky" : false,
"newFailed" : false,
"parameters" : [ "{'password': 'MTIzNDU2MTIzNDU2MTIzNDU2MTIzNDU2MTIzNDU2MTIzNDU2', 'username': 'admin'}", "{'state': False, 'message': '账号或密码错误'}", "'登录系统'", "'中'", "'POST'", "'application/json'", "'认证接口'", "None", "None", "'反向用例-密码为长'", "None", "'http://120.46.172.186:8080/auth'" ]
}, {
"name" : "反向用例-密码为过短",
"uid" : "48f2044be487dde3",
"parentUid" : "9e2149d4e33ad22996308efb2c8b042b",
"status" : "passed",
"time" : {
"start" : 1691399017591,
"stop" : 1691399017687,
"duration" : 96
},
"flaky" : false,
"newFailed" : false,
"parameters" : [ "{'password': '1', 'username': 'admin'}", "{'state': False, 'message': '账号或密码错误'}", "'登录系统'", "'中'", "'PoST'", "'application/json'", "'认证接口'", "None", "None", "'反向用例-密码为过短'", "None", "'http://120.46.172.186:8080/auth'" ]
}, {
"name" : "反向用例-密码为特殊字符",
"uid" : "f99e365a0b702222",
"parentUid" : "9e2149d4e33ad22996308efb2c8b042b",
"status" : "passed",
"time" : {
"start" : 1691399017699,
"stop" : 1691399017794,
"duration" : 95
},
"flaky" : false,
"newFailed" : false,
"parameters" : [ "{'password': '▬♦◊◦☼♠♣', 'username': 'admin'}", "{'state': False, 'message': '账号或密码错误'}", "'登录系统'", "'中'", "'POST'", "'application/json'", "'认证接口'", "None", "None", "'反向用例-密码为特殊字符'", "None", "'http://120.46.172.186:8080/auth'" ]
}, {
"name" : "正向用例",
"uid" : "cc13490ee94aa27d",
"parentUid" : "9e2149d4e33ad22996308efb2c8b042b",
"status" : "failed",
"time" : {
"start" : 1691399023476,
"stop" : 1691399023532,
"duration" : 56
},
"flaky" : false,
"newFailed" : false,
"parameters" : [ "None", "{'message': '刷新token成功'}", "'刷新token'", "'中'", "'get'", "None", "'认证接口'", "None", "None", "'正向用例'", "None", "'http://120.46.172.186:8080/refresh'" ]
}, {
"name" : "正向用例",
"uid" : "342a24609b3996e0",
"parentUid" : "9e2149d4e33ad22996308efb2c8b042b",
"status" : "passed",
"time" : {
"start" : 1691399023560,
"stop" : 1691399023701,
"duration" : 141
},
"flaky" : false,
"newFailed" : false,
"parameters" : [ "{'code': 'test56_dem', 'description': '测试56期的维度', 'isDefault': 0, 'name': '测试56期的维度'}", "{'state': True, 'message': '添加维度成功!'}", "'添加维度'", "'高'", "'post'", "'application/json'", "'维度管理'", "'DELETE FROM uc_demension WHERE `CODE_`=\"test56_dem\";'", "'delete'", "'正向用例'", "None", "'http://120.46.172.186:8080/api/demension/v1/dem/addDem'" ]
}, {
"name" : "正向用例",
"uid" : "995aa7bfe2ad2c36",
"parentUid" : "9e2149d4e33ad22996308efb2c8b042b",
"status" : "passed",
"time" : {
"start" : 1691399023717,
"stop" : 1691399023898,
"duration" : 181
},
"flaky" : false,
"newFailed" : false,
"parameters" : [ "{'code': 'test56_org', 'demId': '不知道', 'exceedLimitNum': 0, 'grade': '', 'limitNum': 0, 'name': '测试的组织', 'nowNum': 0, 'orderNo': 0, 'parentId': '0'}", "{'state': True, 'message': '添加组织成功!'}", "'添加组织'", "'高'", "'post'", "'application/json'", "'组织管理'", "{'select': 'SELECT ID_ FROM uc_demension WHERE `CODE_`=\"test56_dem\";', 'delete': 'DELETE FROM uc_org WHERE `CODE_`=\"test56_org\";'}", "'delete|select'", "'正向用例'", "'demId'", "'http://120.46.172.186:8080/api/org/v1/org/addOrg'" ]
}, {
"name" : "正向用例",
"uid" : "ca0f0da1fb5b1a9d",
"parentUid" : "9e2149d4e33ad22996308efb2c8b042b",
"status" : "passed",
"time" : {
"start" : 1691399023909,
"stop" : 1691399023983,
"duration" : 74
},
"flaky" : false,
"newFailed" : false,
"parameters" : [ "{'query': {'orgCode': 'test56_org'}, 'body': [{'alias': 'sz', 'value': 0}, {'alias': 'zy', 'value': 'math'}, {'alias': 'rq', 'value': '2023-08-04T16:00:00.000Z'}, {'alias': 'ah', 'value': 'lq'}, {'alias': 'yyyy', 'value': '越高越好'}, {'alias': 'xb', 'value': '2'}]}", "{'state': True, 'message': '保存组织参数成功!'}", "'保存组织参数'", "'高'", "'post'", "'application/json|query'", "'组织管理'", "None", "None", "'正向用例'", "None", "'http://120.46.172.186:8080/api/org/v1/orgParam/saveOrgParams'" ]
}, {
"name" : "正向用例",
"uid" : "9fdbdff7fbc9aba9",
"parentUid" : "9e2149d4e33ad22996308efb2c8b042b",
"status" : "passed",
"time" : {
"start" : 1691399023993,
"stop" : 1691399024052,
"duration" : 59
},
"flaky" : false,
"newFailed" : false,
"parameters" : [ "'test56_org'", "{'state': True, 'message': '删除组织成功!'}", "'删除组织'", "'高'", "'post'", "'text/plain'", "'组织管理'", "None", "None", "'正向用例'", "None", "'http://120.46.172.186:8080/api/org/v1/org/deleteOrg'" ]
}, {
"name" : "正向用例",
"uid" : "33375d4e860e5456",
"parentUid" : "9e2149d4e33ad22996308efb2c8b042b",
"status" : "failed",
"time" : {
"start" : 1691399029838,
"stop" : 1691399029973,
"duration" : 135
},
"flaky" : false,
"newFailed" : false,
"parameters" : [ "{'ids': '1688475997541777408'}", "{'state': True, 'message': '删除维度成功'}", "'根据维度编码删除维度'", "'高'", "'DELETE'", "'query'", "'维度管理'", "'SELECT ID_ FROM uc_demension WHERE `CODE_`=\"test56_dem\";'", "'select'", "'正向用例'", "'ids'", "'http://120.46.172.186:8080/api/demension/v1/dem/deleteDemByIds'" ]
} ],
"uid" : "9e2149d4e33ad22996308efb2c8b042b"
} ],
"uid" : "10f50a925462c4c85491656d24b32ac1"
} ]
}
\ No newline at end of file
{
"uid" : "1c725e7f5e2da10d",
"name" : "正向用例",
"fullName" : "test_bpm.TestBPM#test_bpm",
"historyId" : "f37f5b35a33b0d851ad30e5c966f4068",
"time" : {
"start" : 1691399024065,
"stop" : 1691399024169,
"duration" : 104
},
"status" : "failed",
"statusMessage" : "AssertionError: 断言失败",
"statusTrace" : "self = <InterfaceAutoTest.test_case.test_bpm.TestBPM object at 0x00000257902F01C0>\nreq_fix = <InterfaceAutoTest.requests_method.requests_method.RequestsMethod object at 0x00000257902F0490>\ndb_fix = <InterfaceAutoTest.common.db.DB object at 0x00000257903D93D0>, module = '维度管理', interface = '根据维度编码删除维度', title = '正向用例'\nlevel = '高', method = 'DELETE', url = 'http://120.46.172.186:8080/api/demension/v1/dem/deleteDemByIds', mime = 'query'\ndata = {'ids': '1688475997541777408'}, expect = {'message': '删除维度成功', 'state': True}, sql_type = 'select'\nsql_sentence = 'SELECT ID_ FROM uc_demension WHERE `CODE_`=\"test56_dem\";', update_key = 'ids'\n\n @allure.epic(\"BPM系统\")\n @pytest.mark.parametrize(\"module, interface, title, level, method, url, mime, data, expect, sql_type, sql_sentence, update_key\", ReadExcel().get_data())\n def test_bpm(self, req_fix, db_fix, module, interface, title, level, method, url, mime, data, expect, sql_type, sql_sentence, update_key):\n allure.dynamic.feature(module)\n allure.dynamic.story(interface)\n allure.dynamic.title(title)\n allure.dynamic.severity(level)\n \n # 1.1:判断sql语句的类型是否为delete\n if sql_type == \"delete\":\n # 1.2 使用DB类对象,调用delete方法执行删除的sql语句\n db_fix.delete(sql_sentence)\n # # 1.3 使用RequestsMethod类对象调用request_all方法发送请求\n # result = req_fix.request_all(req_method=method, req_url=url, req_mime=mime, case_data=data)\n \n # 2.1 判断sql语句的类型是否为select\n elif sql_type == \"select\":\n # 2.2 使用DB类对象,调用select方法执行查询的sql语句,并接收查询结果\n select_result = db_fix.select(sql_sentence)\n # 2.3 将查询结果更新到用例数据中\n data[update_key] = select_result\n # # 2.3 使用RequestsMethod类对象调用request_all方法发送请求\n # result = req_fix.request_all(req_method=method, req_url=url, req_mime=mime, case_data=data)\n \n # 3.1 判断sql语句的类型是否delete|select或者为select|delete\n elif sql_type == \"delete|select\" or sql_type == \"select|delete\":\n # 3.2 使用DB类对象,调用delete方法执行删除的sql语句\n db_fix.delete(sql_sentence[\"delete\"])\n # 3.3 使用DB类对象,调用select方法执行查询的sql语句,并接收查询结果\n select_result = db_fix.select(sql_sentence[\"select\"])\n # 3.4 将查询结果更新到用例数据中\n data[update_key] = select_result\n # # 3.5 使用RequestsMethod类对象调用request_all方法发送请求\n # result = req_fix.request_all(req_method=method, req_url=url, req_mime=mime, case_data=data)\n #\n # else:\n # result = req_fix.request_all(req_method=method, req_url=url, req_mime=mime, case_data=data)\n \n result = req_fix.request_all(req_method=method, req_url=url, req_mime=mime, case_data=data)\n \n # 断言\n try:\n for key in expect:\n> assert expect[key] == result.json().get(key)\nE AssertionError: assert '删除维度成功' == '删除维度成功!'\nE - 删除维度成功!\nE ? -\nE + 删除维度成功\n\ntest_bpm.py:61: AssertionError\n\nDuring handling of the above exception, another exception occurred:\n\nself = <InterfaceAutoTest.test_case.test_bpm.TestBPM object at 0x00000257902F01C0>\nreq_fix = <InterfaceAutoTest.requests_method.requests_method.RequestsMethod object at 0x00000257902F0490>\ndb_fix = <InterfaceAutoTest.common.db.DB object at 0x00000257903D93D0>, module = '维度管理', interface = '根据维度编码删除维度', title = '正向用例'\nlevel = '高', method = 'DELETE', url = 'http://120.46.172.186:8080/api/demension/v1/dem/deleteDemByIds', mime = 'query'\ndata = {'ids': '1688475997541777408'}, expect = {'message': '删除维度成功', 'state': True}, sql_type = 'select'\nsql_sentence = 'SELECT ID_ FROM uc_demension WHERE `CODE_`=\"test56_dem\";', update_key = 'ids'\n\n @allure.epic(\"BPM系统\")\n @pytest.mark.parametrize(\"module, interface, title, level, method, url, mime, data, expect, sql_type, sql_sentence, update_key\", ReadExcel().get_data())\n def test_bpm(self, req_fix, db_fix, module, interface, title, level, method, url, mime, data, expect, sql_type, sql_sentence, update_key):\n allure.dynamic.feature(module)\n allure.dynamic.story(interface)\n allure.dynamic.title(title)\n allure.dynamic.severity(level)\n \n # 1.1:判断sql语句的类型是否为delete\n if sql_type == \"delete\":\n # 1.2 使用DB类对象,调用delete方法执行删除的sql语句\n db_fix.delete(sql_sentence)\n # # 1.3 使用RequestsMethod类对象调用request_all方法发送请求\n # result = req_fix.request_all(req_method=method, req_url=url, req_mime=mime, case_data=data)\n \n # 2.1 判断sql语句的类型是否为select\n elif sql_type == \"select\":\n # 2.2 使用DB类对象,调用select方法执行查询的sql语句,并接收查询结果\n select_result = db_fix.select(sql_sentence)\n # 2.3 将查询结果更新到用例数据中\n data[update_key] = select_result\n # # 2.3 使用RequestsMethod类对象调用request_all方法发送请求\n # result = req_fix.request_all(req_method=method, req_url=url, req_mime=mime, case_data=data)\n \n # 3.1 判断sql语句的类型是否delete|select或者为select|delete\n elif sql_type == \"delete|select\" or sql_type == \"select|delete\":\n # 3.2 使用DB类对象,调用delete方法执行删除的sql语句\n db_fix.delete(sql_sentence[\"delete\"])\n # 3.3 使用DB类对象,调用select方法执行查询的sql语句,并接收查询结果\n select_result = db_fix.select(sql_sentence[\"select\"])\n # 3.4 将查询结果更新到用例数据中\n data[update_key] = select_result\n # # 3.5 使用RequestsMethod类对象调用request_all方法发送请求\n # result = req_fix.request_all(req_method=method, req_url=url, req_mime=mime, case_data=data)\n #\n # else:\n # result = req_fix.request_all(req_method=method, req_url=url, req_mime=mime, case_data=data)\n \n result = req_fix.request_all(req_method=method, req_url=url, req_mime=mime, case_data=data)\n \n # 断言\n try:\n for key in expect:\n assert expect[key] == result.json().get(key)\n except:\n print(\"断言失败\")\n logging.error(\"断言失败, 模块名称为:{},接口名称为:{},用例标题:{},用例为:{},期望结果为:{},服务器返回数据为:{}\".format(module, interface, title, str(data), str(expect), result.text))\n> raise AssertionError(\"断言失败\")\nE AssertionError: 断言失败\n\ntest_bpm.py:65: AssertionError",
"flaky" : false,
"newFailed" : false,
"beforeStages" : [ {
"name" : "_session_faker",
"time" : {
"start" : 1691399016370,
"stop" : 1691399016483,
"duration" : 113
},
"status" : "passed",
"steps" : [ ],
"attachments" : [ ],
"parameters" : [ ],
"hasContent" : false,
"stepsCount" : 0,
"attachmentsCount" : 0,
"shouldDisplayMessage" : false
}, {
"name" : "req_fix",
"time" : {
"start" : 1691399016483,
"stop" : 1691399016584,
"duration" : 101
},
"status" : "passed",
"steps" : [ ],
"attachments" : [ ],
"parameters" : [ ],
"hasContent" : false,
"stepsCount" : 0,
"attachmentsCount" : 0,
"shouldDisplayMessage" : false
}, {
"name" : "db_fix",
"time" : {
"start" : 1691399016584,
"stop" : 1691399016789,
"duration" : 205
},
"status" : "passed",
"steps" : [ ],
"attachments" : [ ],
"parameters" : [ ],
"hasContent" : false,
"stepsCount" : 0,
"attachmentsCount" : 0,
"shouldDisplayMessage" : false
} ],
"testStage" : {
"status" : "failed",
"statusMessage" : "AssertionError: 断言失败",
"statusTrace" : "self = <InterfaceAutoTest.test_case.test_bpm.TestBPM object at 0x00000257902F01C0>\nreq_fix = <InterfaceAutoTest.requests_method.requests_method.RequestsMethod object at 0x00000257902F0490>\ndb_fix = <InterfaceAutoTest.common.db.DB object at 0x00000257903D93D0>, module = '维度管理', interface = '根据维度编码删除维度', title = '正向用例'\nlevel = '高', method = 'DELETE', url = 'http://120.46.172.186:8080/api/demension/v1/dem/deleteDemByIds', mime = 'query'\ndata = {'ids': '1688475997541777408'}, expect = {'message': '删除维度成功', 'state': True}, sql_type = 'select'\nsql_sentence = 'SELECT ID_ FROM uc_demension WHERE `CODE_`=\"test56_dem\";', update_key = 'ids'\n\n @allure.epic(\"BPM系统\")\n @pytest.mark.parametrize(\"module, interface, title, level, method, url, mime, data, expect, sql_type, sql_sentence, update_key\", ReadExcel().get_data())\n def test_bpm(self, req_fix, db_fix, module, interface, title, level, method, url, mime, data, expect, sql_type, sql_sentence, update_key):\n allure.dynamic.feature(module)\n allure.dynamic.story(interface)\n allure.dynamic.title(title)\n allure.dynamic.severity(level)\n \n # 1.1:判断sql语句的类型是否为delete\n if sql_type == \"delete\":\n # 1.2 使用DB类对象,调用delete方法执行删除的sql语句\n db_fix.delete(sql_sentence)\n # # 1.3 使用RequestsMethod类对象调用request_all方法发送请求\n # result = req_fix.request_all(req_method=method, req_url=url, req_mime=mime, case_data=data)\n \n # 2.1 判断sql语句的类型是否为select\n elif sql_type == \"select\":\n # 2.2 使用DB类对象,调用select方法执行查询的sql语句,并接收查询结果\n select_result = db_fix.select(sql_sentence)\n # 2.3 将查询结果更新到用例数据中\n data[update_key] = select_result\n # # 2.3 使用RequestsMethod类对象调用request_all方法发送请求\n # result = req_fix.request_all(req_method=method, req_url=url, req_mime=mime, case_data=data)\n \n # 3.1 判断sql语句的类型是否delete|select或者为select|delete\n elif sql_type == \"delete|select\" or sql_type == \"select|delete\":\n # 3.2 使用DB类对象,调用delete方法执行删除的sql语句\n db_fix.delete(sql_sentence[\"delete\"])\n # 3.3 使用DB类对象,调用select方法执行查询的sql语句,并接收查询结果\n select_result = db_fix.select(sql_sentence[\"select\"])\n # 3.4 将查询结果更新到用例数据中\n data[update_key] = select_result\n # # 3.5 使用RequestsMethod类对象调用request_all方法发送请求\n # result = req_fix.request_all(req_method=method, req_url=url, req_mime=mime, case_data=data)\n #\n # else:\n # result = req_fix.request_all(req_method=method, req_url=url, req_mime=mime, case_data=data)\n \n result = req_fix.request_all(req_method=method, req_url=url, req_mime=mime, case_data=data)\n \n # 断言\n try:\n for key in expect:\n> assert expect[key] == result.json().get(key)\nE AssertionError: assert '删除维度成功' == '删除维度成功!'\nE - 删除维度成功!\nE ? -\nE + 删除维度成功\n\ntest_bpm.py:61: AssertionError\n\nDuring handling of the above exception, another exception occurred:\n\nself = <InterfaceAutoTest.test_case.test_bpm.TestBPM object at 0x00000257902F01C0>\nreq_fix = <InterfaceAutoTest.requests_method.requests_method.RequestsMethod object at 0x00000257902F0490>\ndb_fix = <InterfaceAutoTest.common.db.DB object at 0x00000257903D93D0>, module = '维度管理', interface = '根据维度编码删除维度', title = '正向用例'\nlevel = '高', method = 'DELETE', url = 'http://120.46.172.186:8080/api/demension/v1/dem/deleteDemByIds', mime = 'query'\ndata = {'ids': '1688475997541777408'}, expect = {'message': '删除维度成功', 'state': True}, sql_type = 'select'\nsql_sentence = 'SELECT ID_ FROM uc_demension WHERE `CODE_`=\"test56_dem\";', update_key = 'ids'\n\n @allure.epic(\"BPM系统\")\n @pytest.mark.parametrize(\"module, interface, title, level, method, url, mime, data, expect, sql_type, sql_sentence, update_key\", ReadExcel().get_data())\n def test_bpm(self, req_fix, db_fix, module, interface, title, level, method, url, mime, data, expect, sql_type, sql_sentence, update_key):\n allure.dynamic.feature(module)\n allure.dynamic.story(interface)\n allure.dynamic.title(title)\n allure.dynamic.severity(level)\n \n # 1.1:判断sql语句的类型是否为delete\n if sql_type == \"delete\":\n # 1.2 使用DB类对象,调用delete方法执行删除的sql语句\n db_fix.delete(sql_sentence)\n # # 1.3 使用RequestsMethod类对象调用request_all方法发送请求\n # result = req_fix.request_all(req_method=method, req_url=url, req_mime=mime, case_data=data)\n \n # 2.1 判断sql语句的类型是否为select\n elif sql_type == \"select\":\n # 2.2 使用DB类对象,调用select方法执行查询的sql语句,并接收查询结果\n select_result = db_fix.select(sql_sentence)\n # 2.3 将查询结果更新到用例数据中\n data[update_key] = select_result\n # # 2.3 使用RequestsMethod类对象调用request_all方法发送请求\n # result = req_fix.request_all(req_method=method, req_url=url, req_mime=mime, case_data=data)\n \n # 3.1 判断sql语句的类型是否delete|select或者为select|delete\n elif sql_type == \"delete|select\" or sql_type == \"select|delete\":\n # 3.2 使用DB类对象,调用delete方法执行删除的sql语句\n db_fix.delete(sql_sentence[\"delete\"])\n # 3.3 使用DB类对象,调用select方法执行查询的sql语句,并接收查询结果\n select_result = db_fix.select(sql_sentence[\"select\"])\n # 3.4 将查询结果更新到用例数据中\n data[update_key] = select_result\n # # 3.5 使用RequestsMethod类对象调用request_all方法发送请求\n # result = req_fix.request_all(req_method=method, req_url=url, req_mime=mime, case_data=data)\n #\n # else:\n # result = req_fix.request_all(req_method=method, req_url=url, req_mime=mime, case_data=data)\n \n result = req_fix.request_all(req_method=method, req_url=url, req_mime=mime, case_data=data)\n \n # 断言\n try:\n for key in expect:\n assert expect[key] == result.json().get(key)\n except:\n print(\"断言失败\")\n logging.error(\"断言失败, 模块名称为:{},接口名称为:{},用例标题:{},用例为:{},期望结果为:{},服务器返回数据为:{}\".format(module, interface, title, str(data), str(expect), result.text))\n> raise AssertionError(\"断言失败\")\nE AssertionError: 断言失败\n\ntest_bpm.py:65: AssertionError",
"steps" : [ ],
"attachments" : [ {
"uid" : "a1b0c17e5df72a4c",
"name" : "log",
"source" : "a1b0c17e5df72a4c.txt",
"type" : "text/plain",
"size" : 521
}, {
"uid" : "91ee641ecec3ce73",
"name" : "stdout",
"source" : "91ee641ecec3ce73.txt",
"type" : "text/plain",
"size" : 13
} ],
"parameters" : [ ],
"hasContent" : true,
"stepsCount" : 0,
"attachmentsCount" : 2,
"shouldDisplayMessage" : true
},
"afterStages" : [ {
"name" : "req_fix::0",
"time" : {
"start" : 1691399029988,
"stop" : 1691399029988,
"duration" : 0
},
"status" : "passed",
"steps" : [ ],
"attachments" : [ ],
"parameters" : [ ],
"hasContent" : false,
"stepsCount" : 0,
"attachmentsCount" : 0,
"shouldDisplayMessage" : false
}, {
"name" : "db_fix::0",
"time" : {
"start" : 1691399029987,
"stop" : 1691399029987,
"duration" : 0
},
"status" : "passed",
"steps" : [ ],
"attachments" : [ ],
"parameters" : [ ],
"hasContent" : false,
"stepsCount" : 0,
"attachmentsCount" : 0,
"shouldDisplayMessage" : false
} ],
"labels" : [ {
"name" : "feature",
"value" : "维度管理"
}, {
"name" : "story",
"value" : "根据维度编码删除维度"
}, {
"name" : "severity",
"value" : "高"
}, {
"name" : "epic",
"value" : "BPM系统"
}, {
"name" : "suite",
"value" : "test_bpm"
}, {
"name" : "subSuite",
"value" : "TestBPM"
}, {
"name" : "host",
"value" : "LAPTOP-31V3JBFR"
}, {
"name" : "thread",
"value" : "6412-MainThread"
}, {
"name" : "framework",
"value" : "pytest"
}, {
"name" : "language",
"value" : "cpython3"
}, {
"name" : "package",
"value" : "test_bpm"
}, {
"name" : "resultFormat",
"value" : "allure2"
} ],
"parameters" : [ {
"name" : "data",
"value" : "{'ids': '不知道'}"
}, {
"name" : "expect",
"value" : "{'state': True, 'message': '删除维度成功'}"
}, {
"name" : "interface",
"value" : "'根据维度编码删除维度'"
}, {
"name" : "level",
"value" : "'高'"
}, {
"name" : "method",
"value" : "'DELETE'"
}, {
"name" : "mime",
"value" : "'query'"
}, {
"name" : "module",
"value" : "'维度管理'"
}, {
"name" : "sql_sentence",
"value" : "'SELECT ID_ FROM uc_demension WHERE `CODE_`=\"test56_dem\";'"
}, {
"name" : "sql_type",
"value" : "'select'"
}, {
"name" : "title",
"value" : "'正向用例'"
}, {
"name" : "update_key",
"value" : "'ids'"
}, {
"name" : "url",
"value" : "'http://120.46.172.186:8080/api/demension/v1/dem/deleteDemByIds'"
} ],
"links" : [ ],
"hidden" : true,
"retry" : true,
"extra" : {
"categories" : [ ],
"tags" : [ ]
},
"source" : "1c725e7f5e2da10d.json",
"parameterValues" : [ "{'ids': '不知道'}", "{'state': True, 'message': '删除维度成功'}", "'根据维度编码删除维度'", "'高'", "'DELETE'", "'query'", "'维度管理'", "'SELECT ID_ FROM uc_demension WHERE `CODE_`=\"test56_dem\";'", "'select'", "'正向用例'", "'ids'", "'http://120.46.172.186:8080/api/demension/v1/dem/deleteDemByIds'" ]
}
\ No newline at end of file
{
"uid" : "33375d4e860e5456",
"name" : "正向用例",
"fullName" : "test_bpm.TestBPM#test_bpm",
"historyId" : "f37f5b35a33b0d851ad30e5c966f4068",
"time" : {
"start" : 1691399029838,
"stop" : 1691399029973,
"duration" : 135
},
"status" : "failed",
"statusMessage" : "AssertionError: 断言失败",
"statusTrace" : "self = <InterfaceAutoTest.test_case.test_bpm.TestBPM object at 0x00000257902F01C0>\nreq_fix = <InterfaceAutoTest.requests_method.requests_method.RequestsMethod object at 0x00000257902F0490>\ndb_fix = <InterfaceAutoTest.common.db.DB object at 0x00000257903D93D0>, module = '维度管理', interface = '根据维度编码删除维度', title = '正向用例'\nlevel = '高', method = 'DELETE', url = 'http://120.46.172.186:8080/api/demension/v1/dem/deleteDemByIds', mime = 'query'\ndata = {'ids': '1688475997541777408'}, expect = {'message': '删除维度成功', 'state': True}, sql_type = 'select'\nsql_sentence = 'SELECT ID_ FROM uc_demension WHERE `CODE_`=\"test56_dem\";', update_key = 'ids'\n\n @allure.epic(\"BPM系统\")\n @pytest.mark.parametrize(\"module, interface, title, level, method, url, mime, data, expect, sql_type, sql_sentence, update_key\", ReadExcel().get_data())\n def test_bpm(self, req_fix, db_fix, module, interface, title, level, method, url, mime, data, expect, sql_type, sql_sentence, update_key):\n allure.dynamic.feature(module)\n allure.dynamic.story(interface)\n allure.dynamic.title(title)\n allure.dynamic.severity(level)\n \n # 1.1:判断sql语句的类型是否为delete\n if sql_type == \"delete\":\n # 1.2 使用DB类对象,调用delete方法执行删除的sql语句\n db_fix.delete(sql_sentence)\n # # 1.3 使用RequestsMethod类对象调用request_all方法发送请求\n # result = req_fix.request_all(req_method=method, req_url=url, req_mime=mime, case_data=data)\n \n # 2.1 判断sql语句的类型是否为select\n elif sql_type == \"select\":\n # 2.2 使用DB类对象,调用select方法执行查询的sql语句,并接收查询结果\n select_result = db_fix.select(sql_sentence)\n # 2.3 将查询结果更新到用例数据中\n data[update_key] = select_result\n # # 2.3 使用RequestsMethod类对象调用request_all方法发送请求\n # result = req_fix.request_all(req_method=method, req_url=url, req_mime=mime, case_data=data)\n \n # 3.1 判断sql语句的类型是否delete|select或者为select|delete\n elif sql_type == \"delete|select\" or sql_type == \"select|delete\":\n # 3.2 使用DB类对象,调用delete方法执行删除的sql语句\n db_fix.delete(sql_sentence[\"delete\"])\n # 3.3 使用DB类对象,调用select方法执行查询的sql语句,并接收查询结果\n select_result = db_fix.select(sql_sentence[\"select\"])\n # 3.4 将查询结果更新到用例数据中\n data[update_key] = select_result\n # # 3.5 使用RequestsMethod类对象调用request_all方法发送请求\n # result = req_fix.request_all(req_method=method, req_url=url, req_mime=mime, case_data=data)\n #\n # else:\n # result = req_fix.request_all(req_method=method, req_url=url, req_mime=mime, case_data=data)\n \n result = req_fix.request_all(req_method=method, req_url=url, req_mime=mime, case_data=data)\n \n # 断言\n try:\n for key in expect:\n> assert expect[key] == result.json().get(key)\nE AssertionError: assert True == False\nE + where False = <built-in method get of dict object at 0x0000025790493700>('state')\nE + where <built-in method get of dict object at 0x0000025790493700> = {'logId': '1688476023861035008', 'message': '', 'state': False}.get\nE + where {'logId': '1688476023861035008', 'message': '', 'state': False} = <bound method Response.json of <Response [500]>>()\nE + where <bound method Response.json of <Response [500]>> = <Response [500]>.json\n\ntest_bpm.py:61: AssertionError\n\nDuring handling of the above exception, another exception occurred:\n\nself = <InterfaceAutoTest.test_case.test_bpm.TestBPM object at 0x00000257902F01C0>\nreq_fix = <InterfaceAutoTest.requests_method.requests_method.RequestsMethod object at 0x00000257902F0490>\ndb_fix = <InterfaceAutoTest.common.db.DB object at 0x00000257903D93D0>, module = '维度管理', interface = '根据维度编码删除维度', title = '正向用例'\nlevel = '高', method = 'DELETE', url = 'http://120.46.172.186:8080/api/demension/v1/dem/deleteDemByIds', mime = 'query'\ndata = {'ids': '1688475997541777408'}, expect = {'message': '删除维度成功', 'state': True}, sql_type = 'select'\nsql_sentence = 'SELECT ID_ FROM uc_demension WHERE `CODE_`=\"test56_dem\";', update_key = 'ids'\n\n @allure.epic(\"BPM系统\")\n @pytest.mark.parametrize(\"module, interface, title, level, method, url, mime, data, expect, sql_type, sql_sentence, update_key\", ReadExcel().get_data())\n def test_bpm(self, req_fix, db_fix, module, interface, title, level, method, url, mime, data, expect, sql_type, sql_sentence, update_key):\n allure.dynamic.feature(module)\n allure.dynamic.story(interface)\n allure.dynamic.title(title)\n allure.dynamic.severity(level)\n \n # 1.1:判断sql语句的类型是否为delete\n if sql_type == \"delete\":\n # 1.2 使用DB类对象,调用delete方法执行删除的sql语句\n db_fix.delete(sql_sentence)\n # # 1.3 使用RequestsMethod类对象调用request_all方法发送请求\n # result = req_fix.request_all(req_method=method, req_url=url, req_mime=mime, case_data=data)\n \n # 2.1 判断sql语句的类型是否为select\n elif sql_type == \"select\":\n # 2.2 使用DB类对象,调用select方法执行查询的sql语句,并接收查询结果\n select_result = db_fix.select(sql_sentence)\n # 2.3 将查询结果更新到用例数据中\n data[update_key] = select_result\n # # 2.3 使用RequestsMethod类对象调用request_all方法发送请求\n # result = req_fix.request_all(req_method=method, req_url=url, req_mime=mime, case_data=data)\n \n # 3.1 判断sql语句的类型是否delete|select或者为select|delete\n elif sql_type == \"delete|select\" or sql_type == \"select|delete\":\n # 3.2 使用DB类对象,调用delete方法执行删除的sql语句\n db_fix.delete(sql_sentence[\"delete\"])\n # 3.3 使用DB类对象,调用select方法执行查询的sql语句,并接收查询结果\n select_result = db_fix.select(sql_sentence[\"select\"])\n # 3.4 将查询结果更新到用例数据中\n data[update_key] = select_result\n # # 3.5 使用RequestsMethod类对象调用request_all方法发送请求\n # result = req_fix.request_all(req_method=method, req_url=url, req_mime=mime, case_data=data)\n #\n # else:\n # result = req_fix.request_all(req_method=method, req_url=url, req_mime=mime, case_data=data)\n \n result = req_fix.request_all(req_method=method, req_url=url, req_mime=mime, case_data=data)\n \n # 断言\n try:\n for key in expect:\n assert expect[key] == result.json().get(key)\n except:\n print(\"断言失败\")\n logging.error(\"断言失败, 模块名称为:{},接口名称为:{},用例标题:{},用例为:{},期望结果为:{},服务器返回数据为:{}\".format(module, interface, title, str(data), str(expect), result.text))\n> raise AssertionError(\"断言失败\")\nE AssertionError: 断言失败\n\ntest_bpm.py:65: AssertionError",
"flaky" : false,
"newFailed" : false,
"beforeStages" : [ {
"name" : "_session_faker",
"time" : {
"start" : 1691399016370,
"stop" : 1691399016483,
"duration" : 113
},
"status" : "passed",
"steps" : [ ],
"attachments" : [ ],
"parameters" : [ ],
"hasContent" : false,
"stepsCount" : 0,
"attachmentsCount" : 0,
"shouldDisplayMessage" : false
}, {
"name" : "req_fix",
"time" : {
"start" : 1691399016483,
"stop" : 1691399016584,
"duration" : 101
},
"status" : "passed",
"steps" : [ ],
"attachments" : [ ],
"parameters" : [ ],
"hasContent" : false,
"stepsCount" : 0,
"attachmentsCount" : 0,
"shouldDisplayMessage" : false
}, {
"name" : "db_fix",
"time" : {
"start" : 1691399016584,
"stop" : 1691399016789,
"duration" : 205
},
"status" : "passed",
"steps" : [ ],
"attachments" : [ ],
"parameters" : [ ],
"hasContent" : false,
"stepsCount" : 0,
"attachmentsCount" : 0,
"shouldDisplayMessage" : false
} ],
"testStage" : {
"status" : "failed",
"statusMessage" : "AssertionError: 断言失败",
"statusTrace" : "self = <InterfaceAutoTest.test_case.test_bpm.TestBPM object at 0x00000257902F01C0>\nreq_fix = <InterfaceAutoTest.requests_method.requests_method.RequestsMethod object at 0x00000257902F0490>\ndb_fix = <InterfaceAutoTest.common.db.DB object at 0x00000257903D93D0>, module = '维度管理', interface = '根据维度编码删除维度', title = '正向用例'\nlevel = '高', method = 'DELETE', url = 'http://120.46.172.186:8080/api/demension/v1/dem/deleteDemByIds', mime = 'query'\ndata = {'ids': '1688475997541777408'}, expect = {'message': '删除维度成功', 'state': True}, sql_type = 'select'\nsql_sentence = 'SELECT ID_ FROM uc_demension WHERE `CODE_`=\"test56_dem\";', update_key = 'ids'\n\n @allure.epic(\"BPM系统\")\n @pytest.mark.parametrize(\"module, interface, title, level, method, url, mime, data, expect, sql_type, sql_sentence, update_key\", ReadExcel().get_data())\n def test_bpm(self, req_fix, db_fix, module, interface, title, level, method, url, mime, data, expect, sql_type, sql_sentence, update_key):\n allure.dynamic.feature(module)\n allure.dynamic.story(interface)\n allure.dynamic.title(title)\n allure.dynamic.severity(level)\n \n # 1.1:判断sql语句的类型是否为delete\n if sql_type == \"delete\":\n # 1.2 使用DB类对象,调用delete方法执行删除的sql语句\n db_fix.delete(sql_sentence)\n # # 1.3 使用RequestsMethod类对象调用request_all方法发送请求\n # result = req_fix.request_all(req_method=method, req_url=url, req_mime=mime, case_data=data)\n \n # 2.1 判断sql语句的类型是否为select\n elif sql_type == \"select\":\n # 2.2 使用DB类对象,调用select方法执行查询的sql语句,并接收查询结果\n select_result = db_fix.select(sql_sentence)\n # 2.3 将查询结果更新到用例数据中\n data[update_key] = select_result\n # # 2.3 使用RequestsMethod类对象调用request_all方法发送请求\n # result = req_fix.request_all(req_method=method, req_url=url, req_mime=mime, case_data=data)\n \n # 3.1 判断sql语句的类型是否delete|select或者为select|delete\n elif sql_type == \"delete|select\" or sql_type == \"select|delete\":\n # 3.2 使用DB类对象,调用delete方法执行删除的sql语句\n db_fix.delete(sql_sentence[\"delete\"])\n # 3.3 使用DB类对象,调用select方法执行查询的sql语句,并接收查询结果\n select_result = db_fix.select(sql_sentence[\"select\"])\n # 3.4 将查询结果更新到用例数据中\n data[update_key] = select_result\n # # 3.5 使用RequestsMethod类对象调用request_all方法发送请求\n # result = req_fix.request_all(req_method=method, req_url=url, req_mime=mime, case_data=data)\n #\n # else:\n # result = req_fix.request_all(req_method=method, req_url=url, req_mime=mime, case_data=data)\n \n result = req_fix.request_all(req_method=method, req_url=url, req_mime=mime, case_data=data)\n \n # 断言\n try:\n for key in expect:\n> assert expect[key] == result.json().get(key)\nE AssertionError: assert True == False\nE + where False = <built-in method get of dict object at 0x0000025790493700>('state')\nE + where <built-in method get of dict object at 0x0000025790493700> = {'logId': '1688476023861035008', 'message': '', 'state': False}.get\nE + where {'logId': '1688476023861035008', 'message': '', 'state': False} = <bound method Response.json of <Response [500]>>()\nE + where <bound method Response.json of <Response [500]>> = <Response [500]>.json\n\ntest_bpm.py:61: AssertionError\n\nDuring handling of the above exception, another exception occurred:\n\nself = <InterfaceAutoTest.test_case.test_bpm.TestBPM object at 0x00000257902F01C0>\nreq_fix = <InterfaceAutoTest.requests_method.requests_method.RequestsMethod object at 0x00000257902F0490>\ndb_fix = <InterfaceAutoTest.common.db.DB object at 0x00000257903D93D0>, module = '维度管理', interface = '根据维度编码删除维度', title = '正向用例'\nlevel = '高', method = 'DELETE', url = 'http://120.46.172.186:8080/api/demension/v1/dem/deleteDemByIds', mime = 'query'\ndata = {'ids': '1688475997541777408'}, expect = {'message': '删除维度成功', 'state': True}, sql_type = 'select'\nsql_sentence = 'SELECT ID_ FROM uc_demension WHERE `CODE_`=\"test56_dem\";', update_key = 'ids'\n\n @allure.epic(\"BPM系统\")\n @pytest.mark.parametrize(\"module, interface, title, level, method, url, mime, data, expect, sql_type, sql_sentence, update_key\", ReadExcel().get_data())\n def test_bpm(self, req_fix, db_fix, module, interface, title, level, method, url, mime, data, expect, sql_type, sql_sentence, update_key):\n allure.dynamic.feature(module)\n allure.dynamic.story(interface)\n allure.dynamic.title(title)\n allure.dynamic.severity(level)\n \n # 1.1:判断sql语句的类型是否为delete\n if sql_type == \"delete\":\n # 1.2 使用DB类对象,调用delete方法执行删除的sql语句\n db_fix.delete(sql_sentence)\n # # 1.3 使用RequestsMethod类对象调用request_all方法发送请求\n # result = req_fix.request_all(req_method=method, req_url=url, req_mime=mime, case_data=data)\n \n # 2.1 判断sql语句的类型是否为select\n elif sql_type == \"select\":\n # 2.2 使用DB类对象,调用select方法执行查询的sql语句,并接收查询结果\n select_result = db_fix.select(sql_sentence)\n # 2.3 将查询结果更新到用例数据中\n data[update_key] = select_result\n # # 2.3 使用RequestsMethod类对象调用request_all方法发送请求\n # result = req_fix.request_all(req_method=method, req_url=url, req_mime=mime, case_data=data)\n \n # 3.1 判断sql语句的类型是否delete|select或者为select|delete\n elif sql_type == \"delete|select\" or sql_type == \"select|delete\":\n # 3.2 使用DB类对象,调用delete方法执行删除的sql语句\n db_fix.delete(sql_sentence[\"delete\"])\n # 3.3 使用DB类对象,调用select方法执行查询的sql语句,并接收查询结果\n select_result = db_fix.select(sql_sentence[\"select\"])\n # 3.4 将查询结果更新到用例数据中\n data[update_key] = select_result\n # # 3.5 使用RequestsMethod类对象调用request_all方法发送请求\n # result = req_fix.request_all(req_method=method, req_url=url, req_mime=mime, case_data=data)\n #\n # else:\n # result = req_fix.request_all(req_method=method, req_url=url, req_mime=mime, case_data=data)\n \n result = req_fix.request_all(req_method=method, req_url=url, req_mime=mime, case_data=data)\n \n # 断言\n try:\n for key in expect:\n assert expect[key] == result.json().get(key)\n except:\n print(\"断言失败\")\n logging.error(\"断言失败, 模块名称为:{},接口名称为:{},用例标题:{},用例为:{},期望结果为:{},服务器返回数据为:{}\".format(module, interface, title, str(data), str(expect), result.text))\n> raise AssertionError(\"断言失败\")\nE AssertionError: 断言失败\n\ntest_bpm.py:65: AssertionError",
"steps" : [ ],
"attachments" : [ {
"uid" : "66a0989508395add",
"name" : "log",
"source" : "66a0989508395add.txt",
"type" : "text/plain",
"size" : 3454
}, {
"uid" : "664253d070694f93",
"name" : "stdout",
"source" : "664253d070694f93.txt",
"type" : "text/plain",
"size" : 78
} ],
"parameters" : [ ],
"hasContent" : true,
"stepsCount" : 0,
"attachmentsCount" : 2,
"shouldDisplayMessage" : true
},
"afterStages" : [ {
"name" : "req_fix::0",
"time" : {
"start" : 1691399029988,
"stop" : 1691399029988,
"duration" : 0
},
"status" : "passed",
"steps" : [ ],
"attachments" : [ ],
"parameters" : [ ],
"hasContent" : false,
"stepsCount" : 0,
"attachmentsCount" : 0,
"shouldDisplayMessage" : false
}, {
"name" : "db_fix::0",
"time" : {
"start" : 1691399029987,
"stop" : 1691399029987,
"duration" : 0
},
"status" : "passed",
"steps" : [ ],
"attachments" : [ ],
"parameters" : [ ],
"hasContent" : false,
"stepsCount" : 0,
"attachmentsCount" : 0,
"shouldDisplayMessage" : false
} ],
"labels" : [ {
"name" : "feature",
"value" : "维度管理"
}, {
"name" : "story",
"value" : "根据维度编码删除维度"
}, {
"name" : "severity",
"value" : "高"
}, {
"name" : "epic",
"value" : "BPM系统"
}, {
"name" : "suite",
"value" : "test_bpm"
}, {
"name" : "subSuite",
"value" : "TestBPM"
}, {
"name" : "host",
"value" : "LAPTOP-31V3JBFR"
}, {
"name" : "thread",
"value" : "6412-MainThread"
}, {
"name" : "framework",
"value" : "pytest"
}, {
"name" : "language",
"value" : "cpython3"
}, {
"name" : "package",
"value" : "test_bpm"
}, {
"name" : "resultFormat",
"value" : "allure2"
} ],
"parameters" : [ {
"name" : "data",
"value" : "{'ids': '1688475997541777408'}"
}, {
"name" : "expect",
"value" : "{'state': True, 'message': '删除维度成功'}"
}, {
"name" : "interface",
"value" : "'根据维度编码删除维度'"
}, {
"name" : "level",
"value" : "'高'"
}, {
"name" : "method",
"value" : "'DELETE'"
}, {
"name" : "mime",
"value" : "'query'"
}, {
"name" : "module",
"value" : "'维度管理'"
}, {
"name" : "sql_sentence",
"value" : "'SELECT ID_ FROM uc_demension WHERE `CODE_`=\"test56_dem\";'"
}, {
"name" : "sql_type",
"value" : "'select'"
}, {
"name" : "title",
"value" : "'正向用例'"
}, {
"name" : "update_key",
"value" : "'ids'"
}, {
"name" : "url",
"value" : "'http://120.46.172.186:8080/api/demension/v1/dem/deleteDemByIds'"
} ],
"links" : [ ],
"hidden" : false,
"retry" : false,
"extra" : {
"severity" : "normal",
"retries" : [ {
"uid" : "d167a8fc92917bcd",
"status" : "failed",
"statusDetails" : "AssertionError: 断言失败",
"time" : {
"start" : 1691399028670,
"stop" : 1691399028807,
"duration" : 137
}
}, {
"uid" : "e4242ec0f8914826",
"status" : "failed",
"statusDetails" : "AssertionError: 断言失败",
"time" : {
"start" : 1691399027504,
"stop" : 1691399027636,
"duration" : 132
}
}, {
"uid" : "6c5a76e5b58039b5",
"status" : "failed",
"statusDetails" : "AssertionError: 断言失败",
"time" : {
"start" : 1691399026336,
"stop" : 1691399026470,
"duration" : 134
}
}, {
"uid" : "7eb13a5ad0c76789",
"status" : "failed",
"statusDetails" : "AssertionError: 断言失败",
"time" : {
"start" : 1691399025190,
"stop" : 1691399025285,
"duration" : 95
}
}, {
"uid" : "1c725e7f5e2da10d",
"status" : "failed",
"statusDetails" : "AssertionError: 断言失败",
"time" : {
"start" : 1691399024065,
"stop" : 1691399024169,
"duration" : 104
}
} ],
"categories" : [ {
"name" : "Product defects",
"matchedStatuses" : [ ],
"flaky" : false
} ],
"tags" : [ ]
},
"source" : "33375d4e860e5456.json",
"parameterValues" : [ "{'ids': '1688475997541777408'}", "{'state': True, 'message': '删除维度成功'}", "'根据维度编码删除维度'", "'高'", "'DELETE'", "'query'", "'维度管理'", "'SELECT ID_ FROM uc_demension WHERE `CODE_`=\"test56_dem\";'", "'select'", "'正向用例'", "'ids'", "'http://120.46.172.186:8080/api/demension/v1/dem/deleteDemByIds'" ]
}
\ No newline at end of file
{
"uid" : "342a24609b3996e0",
"name" : "正向用例",
"fullName" : "test_bpm.TestBPM#test_bpm",
"historyId" : "4db60c6a5deceb5e4bfbe2c9fd4ed59b",
"time" : {
"start" : 1691399023560,
"stop" : 1691399023701,
"duration" : 141
},
"status" : "passed",
"flaky" : false,
"newFailed" : false,
"beforeStages" : [ {
"name" : "_session_faker",
"time" : {
"start" : 1691399016370,
"stop" : 1691399016483,
"duration" : 113
},
"status" : "passed",
"steps" : [ ],
"attachments" : [ ],
"parameters" : [ ],
"hasContent" : false,
"stepsCount" : 0,
"attachmentsCount" : 0,
"shouldDisplayMessage" : false
}, {
"name" : "req_fix",
"time" : {
"start" : 1691399016483,
"stop" : 1691399016584,
"duration" : 101
},
"status" : "passed",
"steps" : [ ],
"attachments" : [ ],
"parameters" : [ ],
"hasContent" : false,
"stepsCount" : 0,
"attachmentsCount" : 0,
"shouldDisplayMessage" : false
}, {
"name" : "db_fix",
"time" : {
"start" : 1691399016584,
"stop" : 1691399016789,
"duration" : 205
},
"status" : "passed",
"steps" : [ ],
"attachments" : [ ],
"parameters" : [ ],
"hasContent" : false,
"stepsCount" : 0,
"attachmentsCount" : 0,
"shouldDisplayMessage" : false
} ],
"testStage" : {
"status" : "passed",
"steps" : [ ],
"attachments" : [ {
"uid" : "12281a20ab8e5b1a",
"name" : "log",
"source" : "12281a20ab8e5b1a.txt",
"type" : "text/plain",
"size" : 117
}, {
"uid" : "b52477169b7b2256",
"name" : "stdout",
"source" : "b52477169b7b2256.txt",
"type" : "text/plain",
"size" : 13
} ],
"parameters" : [ ],
"hasContent" : true,
"stepsCount" : 0,
"attachmentsCount" : 2,
"shouldDisplayMessage" : false
},
"afterStages" : [ {
"name" : "req_fix::0",
"time" : {
"start" : 1691399029988,
"stop" : 1691399029988,
"duration" : 0
},
"status" : "passed",
"steps" : [ ],
"attachments" : [ ],
"parameters" : [ ],
"hasContent" : false,
"stepsCount" : 0,
"attachmentsCount" : 0,
"shouldDisplayMessage" : false
}, {
"name" : "db_fix::0",
"time" : {
"start" : 1691399029987,
"stop" : 1691399029987,
"duration" : 0
},
"status" : "passed",
"steps" : [ ],
"attachments" : [ ],
"parameters" : [ ],
"hasContent" : false,
"stepsCount" : 0,
"attachmentsCount" : 0,
"shouldDisplayMessage" : false
} ],
"labels" : [ {
"name" : "feature",
"value" : "维度管理"
}, {
"name" : "story",
"value" : "添加维度"
}, {
"name" : "severity",
"value" : "高"
}, {
"name" : "epic",
"value" : "BPM系统"
}, {
"name" : "suite",
"value" : "test_bpm"
}, {
"name" : "subSuite",
"value" : "TestBPM"
}, {
"name" : "host",
"value" : "LAPTOP-31V3JBFR"
}, {
"name" : "thread",
"value" : "6412-MainThread"
}, {
"name" : "framework",
"value" : "pytest"
}, {
"name" : "language",
"value" : "cpython3"
}, {
"name" : "package",
"value" : "test_bpm"
}, {
"name" : "resultFormat",
"value" : "allure2"
} ],
"parameters" : [ {
"name" : "data",
"value" : "{'code': 'test56_dem', 'description': '测试56期的维度', 'isDefault': 0, 'name': '测试56期的维度'}"
}, {
"name" : "expect",
"value" : "{'state': True, 'message': '添加维度成功!'}"
}, {
"name" : "interface",
"value" : "'添加维度'"
}, {
"name" : "level",
"value" : "'高'"
}, {
"name" : "method",
"value" : "'post'"
}, {
"name" : "mime",
"value" : "'application/json'"
}, {
"name" : "module",
"value" : "'维度管理'"
}, {
"name" : "sql_sentence",
"value" : "'DELETE FROM uc_demension WHERE `CODE_`=\"test56_dem\";'"
}, {
"name" : "sql_type",
"value" : "'delete'"
}, {
"name" : "title",
"value" : "'正向用例'"
}, {
"name" : "update_key",
"value" : "None"
}, {
"name" : "url",
"value" : "'http://120.46.172.186:8080/api/demension/v1/dem/addDem'"
} ],
"links" : [ ],
"hidden" : false,
"retry" : false,
"extra" : {
"severity" : "normal",
"retries" : [ ],
"categories" : [ ],
"tags" : [ ]
},
"source" : "342a24609b3996e0.json",
"parameterValues" : [ "{'code': 'test56_dem', 'description': '测试56期的维度', 'isDefault': 0, 'name': '测试56期的维度'}", "{'state': True, 'message': '添加维度成功!'}", "'添加维度'", "'高'", "'post'", "'application/json'", "'维度管理'", "'DELETE FROM uc_demension WHERE `CODE_`=\"test56_dem\";'", "'delete'", "'正向用例'", "None", "'http://120.46.172.186:8080/api/demension/v1/dem/addDem'" ]
}
\ No newline at end of file
{
"uid" : "35af4ef76050b260",
"name" : "正向用例",
"fullName" : "test_bpm.TestBPM#test_bpm",
"historyId" : "98357aace79429a96dcb36c173fbfa06",
"time" : {
"start" : 1691399016791,
"stop" : 1691399016848,
"duration" : 57
},
"status" : "passed",
"flaky" : false,
"newFailed" : false,
"beforeStages" : [ {
"name" : "_session_faker",
"time" : {
"start" : 1691399016370,
"stop" : 1691399016483,
"duration" : 113
},
"status" : "passed",
"steps" : [ ],
"attachments" : [ ],
"parameters" : [ ],
"hasContent" : false,
"stepsCount" : 0,
"attachmentsCount" : 0,
"shouldDisplayMessage" : false
}, {
"name" : "req_fix",
"time" : {
"start" : 1691399016483,
"stop" : 1691399016584,
"duration" : 101
},
"status" : "passed",
"steps" : [ ],
"attachments" : [ ],
"parameters" : [ ],
"hasContent" : false,
"stepsCount" : 0,
"attachmentsCount" : 0,
"shouldDisplayMessage" : false
}, {
"name" : "db_fix",
"time" : {
"start" : 1691399016584,
"stop" : 1691399016789,
"duration" : 205
},
"status" : "passed",
"steps" : [ ],
"attachments" : [ ],
"parameters" : [ ],
"hasContent" : false,
"stepsCount" : 0,
"attachmentsCount" : 0,
"shouldDisplayMessage" : false
} ],
"testStage" : {
"status" : "passed",
"steps" : [ ],
"attachments" : [ {
"uid" : "243f10173d905f06",
"name" : "log",
"source" : "243f10173d905f06.txt",
"type" : "text/plain",
"size" : 5166
}, {
"uid" : "3ada25a1590f64dc",
"name" : "stdout",
"source" : "3ada25a1590f64dc.txt",
"type" : "text/plain",
"size" : 13
} ],
"parameters" : [ ],
"hasContent" : true,
"stepsCount" : 0,
"attachmentsCount" : 2,
"shouldDisplayMessage" : false
},
"afterStages" : [ {
"name" : "req_fix::0",
"time" : {
"start" : 1691399029988,
"stop" : 1691399029988,
"duration" : 0
},
"status" : "passed",
"steps" : [ ],
"attachments" : [ ],
"parameters" : [ ],
"hasContent" : false,
"stepsCount" : 0,
"attachmentsCount" : 0,
"shouldDisplayMessage" : false
}, {
"name" : "db_fix::0",
"time" : {
"start" : 1691399029987,
"stop" : 1691399029987,
"duration" : 0
},
"status" : "passed",
"steps" : [ ],
"attachments" : [ ],
"parameters" : [ ],
"hasContent" : false,
"stepsCount" : 0,
"attachmentsCount" : 0,
"shouldDisplayMessage" : false
} ],
"labels" : [ {
"name" : "feature",
"value" : "认证接口"
}, {
"name" : "story",
"value" : "登录系统"
}, {
"name" : "severity",
"value" : "高"
}, {
"name" : "epic",
"value" : "BPM系统"
}, {
"name" : "suite",
"value" : "test_bpm"
}, {
"name" : "subSuite",
"value" : "TestBPM"
}, {
"name" : "host",
"value" : "LAPTOP-31V3JBFR"
}, {
"name" : "thread",
"value" : "6412-MainThread"
}, {
"name" : "framework",
"value" : "pytest"
}, {
"name" : "language",
"value" : "cpython3"
}, {
"name" : "package",
"value" : "test_bpm"
}, {
"name" : "resultFormat",
"value" : "allure2"
} ],
"parameters" : [ {
"name" : "data",
"value" : "{'password': 'MTIzNDU2', 'username': 'admin'}"
}, {
"name" : "expect",
"value" : "{'username': '超级管理员', 'account': 'admin'}"
}, {
"name" : "interface",
"value" : "'登录系统'"
}, {
"name" : "level",
"value" : "'高'"
}, {
"name" : "method",
"value" : "'POST'"
}, {
"name" : "mime",
"value" : "'application/json'"
}, {
"name" : "module",
"value" : "'认证接口'"
}, {
"name" : "sql_sentence",
"value" : "None"
}, {
"name" : "sql_type",
"value" : "None"
}, {
"name" : "title",
"value" : "'正向用例'"
}, {
"name" : "update_key",
"value" : "None"
}, {
"name" : "url",
"value" : "'http://120.46.172.186:8080/auth'"
} ],
"links" : [ ],
"hidden" : false,
"retry" : false,
"extra" : {
"severity" : "normal",
"retries" : [ ],
"categories" : [ ],
"tags" : [ ]
},
"source" : "35af4ef76050b260.json",
"parameterValues" : [ "{'password': 'MTIzNDU2', 'username': 'admin'}", "{'username': '超级管理员', 'account': 'admin'}", "'登录系统'", "'高'", "'POST'", "'application/json'", "'认证接口'", "None", "None", "'正向用例'", "None", "'http://120.46.172.186:8080/auth'" ]
}
\ No newline at end of file
{
"uid" : "3f71bbc6a20eada1",
"name" : "正向用例",
"fullName" : "test_bpm.TestBPM#test_bpm",
"historyId" : "f368301ce537f1bbd596e0d19f24f393",
"time" : {
"start" : 1691399017807,
"stop" : 1691399017907,
"duration" : 100
},
"status" : "failed",
"statusMessage" : "AssertionError: 断言失败",
"statusTrace" : "self = <InterfaceAutoTest.test_case.test_bpm.TestBPM object at 0x00000257902D2820>\nreq_fix = <InterfaceAutoTest.requests_method.requests_method.RequestsMethod object at 0x00000257902F0490>\ndb_fix = <InterfaceAutoTest.common.db.DB object at 0x00000257903D93D0>, module = '认证接口', interface = '刷新token', title = '正向用例'\nlevel = '中', method = 'get', url = 'http://120.46.172.186:8080/refresh', mime = None, data = None, expect = {'message': '刷新token成功'}\nsql_type = None, sql_sentence = None, update_key = None\n\n @allure.epic(\"BPM系统\")\n @pytest.mark.parametrize(\"module, interface, title, level, method, url, mime, data, expect, sql_type, sql_sentence, update_key\", ReadExcel().get_data())\n def test_bpm(self, req_fix, db_fix, module, interface, title, level, method, url, mime, data, expect, sql_type, sql_sentence, update_key):\n allure.dynamic.feature(module)\n allure.dynamic.story(interface)\n allure.dynamic.title(title)\n allure.dynamic.severity(level)\n \n # 1.1:判断sql语句的类型是否为delete\n if sql_type == \"delete\":\n # 1.2 使用DB类对象,调用delete方法执行删除的sql语句\n db_fix.delete(sql_sentence)\n # # 1.3 使用RequestsMethod类对象调用request_all方法发送请求\n # result = req_fix.request_all(req_method=method, req_url=url, req_mime=mime, case_data=data)\n \n # 2.1 判断sql语句的类型是否为select\n elif sql_type == \"select\":\n # 2.2 使用DB类对象,调用select方法执行查询的sql语句,并接收查询结果\n select_result = db_fix.select(sql_sentence)\n # 2.3 将查询结果更新到用例数据中\n data[update_key] = select_result\n # # 2.3 使用RequestsMethod类对象调用request_all方法发送请求\n # result = req_fix.request_all(req_method=method, req_url=url, req_mime=mime, case_data=data)\n \n # 3.1 判断sql语句的类型是否delete|select或者为select|delete\n elif sql_type == \"delete|select\" or sql_type == \"select|delete\":\n # 3.2 使用DB类对象,调用delete方法执行删除的sql语句\n db_fix.delete(sql_sentence[\"delete\"])\n # 3.3 使用DB类对象,调用select方法执行查询的sql语句,并接收查询结果\n select_result = db_fix.select(sql_sentence[\"select\"])\n # 3.4 将查询结果更新到用例数据中\n data[update_key] = select_result\n # # 3.5 使用RequestsMethod类对象调用request_all方法发送请求\n # result = req_fix.request_all(req_method=method, req_url=url, req_mime=mime, case_data=data)\n #\n # else:\n # result = req_fix.request_all(req_method=method, req_url=url, req_mime=mime, case_data=data)\n \n result = req_fix.request_all(req_method=method, req_url=url, req_mime=mime, case_data=data)\n \n # 断言\n try:\n for key in expect:\n> assert expect[key] == result.json().get(key)\nE AssertionError: assert '刷新token成功' == None\nE + where None = <built-in method get of dict object at 0x00000257902D4500>('message')\nE + where <built-in method get of dict object at 0x00000257902D4500> = {'account': '', 'loginStatus': True, 'token': 'eyJhbGciOiJIUzUxMiJ9.eyJzdWIiOiJhZG1pbiIsInRlbmFudElkIjoiLTEiLCJleHAiOjE2OTE0ODU0MTcsImlhdCI6MTY5MTM5OTAxN30.n-7NR1iCjIKHbeH-Djk8t1sRkJi_FVAwgVHcGFWP6kh4xOyu6c4rgNtn817qbxVK9O63Wo9-SnreSvMJI5L8Gw', 'userAttrs': {}, ...}.get\nE + where {'account': '', 'loginStatus': True, 'token': 'eyJhbGciOiJIUzUxMiJ9.eyJzdWIiOiJhZG1pbiIsInRlbmFudElkIjoiLTEiLCJleHAiOjE2OTE0ODU0MTcsImlhdCI6MTY5MTM5OTAxN30.n-7NR1iCjIKHbeH-Djk8t1sRkJi_FVAwgVHcGFWP6kh4xOyu6c4rgNtn817qbxVK9O63Wo9-SnreSvMJI5L8Gw', 'userAttrs': {}, ...} = <bound method Response.json of <Response [200]>>()\nE + where <bound method Response.json of <Response [200]>> = <Response [200]>.json\n\ntest_bpm.py:61: AssertionError\n\nDuring handling of the above exception, another exception occurred:\n\nself = <InterfaceAutoTest.test_case.test_bpm.TestBPM object at 0x00000257902D2820>\nreq_fix = <InterfaceAutoTest.requests_method.requests_method.RequestsMethod object at 0x00000257902F0490>\ndb_fix = <InterfaceAutoTest.common.db.DB object at 0x00000257903D93D0>, module = '认证接口', interface = '刷新token', title = '正向用例'\nlevel = '中', method = 'get', url = 'http://120.46.172.186:8080/refresh', mime = None, data = None, expect = {'message': '刷新token成功'}\nsql_type = None, sql_sentence = None, update_key = None\n\n @allure.epic(\"BPM系统\")\n @pytest.mark.parametrize(\"module, interface, title, level, method, url, mime, data, expect, sql_type, sql_sentence, update_key\", ReadExcel().get_data())\n def test_bpm(self, req_fix, db_fix, module, interface, title, level, method, url, mime, data, expect, sql_type, sql_sentence, update_key):\n allure.dynamic.feature(module)\n allure.dynamic.story(interface)\n allure.dynamic.title(title)\n allure.dynamic.severity(level)\n \n # 1.1:判断sql语句的类型是否为delete\n if sql_type == \"delete\":\n # 1.2 使用DB类对象,调用delete方法执行删除的sql语句\n db_fix.delete(sql_sentence)\n # # 1.3 使用RequestsMethod类对象调用request_all方法发送请求\n # result = req_fix.request_all(req_method=method, req_url=url, req_mime=mime, case_data=data)\n \n # 2.1 判断sql语句的类型是否为select\n elif sql_type == \"select\":\n # 2.2 使用DB类对象,调用select方法执行查询的sql语句,并接收查询结果\n select_result = db_fix.select(sql_sentence)\n # 2.3 将查询结果更新到用例数据中\n data[update_key] = select_result\n # # 2.3 使用RequestsMethod类对象调用request_all方法发送请求\n # result = req_fix.request_all(req_method=method, req_url=url, req_mime=mime, case_data=data)\n \n # 3.1 判断sql语句的类型是否delete|select或者为select|delete\n elif sql_type == \"delete|select\" or sql_type == \"select|delete\":\n # 3.2 使用DB类对象,调用delete方法执行删除的sql语句\n db_fix.delete(sql_sentence[\"delete\"])\n # 3.3 使用DB类对象,调用select方法执行查询的sql语句,并接收查询结果\n select_result = db_fix.select(sql_sentence[\"select\"])\n # 3.4 将查询结果更新到用例数据中\n data[update_key] = select_result\n # # 3.5 使用RequestsMethod类对象调用request_all方法发送请求\n # result = req_fix.request_all(req_method=method, req_url=url, req_mime=mime, case_data=data)\n #\n # else:\n # result = req_fix.request_all(req_method=method, req_url=url, req_mime=mime, case_data=data)\n \n result = req_fix.request_all(req_method=method, req_url=url, req_mime=mime, case_data=data)\n \n # 断言\n try:\n for key in expect:\n assert expect[key] == result.json().get(key)\n except:\n print(\"断言失败\")\n logging.error(\"断言失败, 模块名称为:{},接口名称为:{},用例标题:{},用例为:{},期望结果为:{},服务器返回数据为:{}\".format(module, interface, title, str(data), str(expect), result.text))\n> raise AssertionError(\"断言失败\")\nE AssertionError: 断言失败\n\ntest_bpm.py:65: AssertionError",
"flaky" : false,
"newFailed" : false,
"beforeStages" : [ {
"name" : "_session_faker",
"time" : {
"start" : 1691399016370,
"stop" : 1691399016483,
"duration" : 113
},
"status" : "passed",
"steps" : [ ],
"attachments" : [ ],
"parameters" : [ ],
"hasContent" : false,
"stepsCount" : 0,
"attachmentsCount" : 0,
"shouldDisplayMessage" : false
}, {
"name" : "req_fix",
"time" : {
"start" : 1691399016483,
"stop" : 1691399016584,
"duration" : 101
},
"status" : "passed",
"steps" : [ ],
"attachments" : [ ],
"parameters" : [ ],
"hasContent" : false,
"stepsCount" : 0,
"attachmentsCount" : 0,
"shouldDisplayMessage" : false
}, {
"name" : "db_fix",
"time" : {
"start" : 1691399016584,
"stop" : 1691399016789,
"duration" : 205
},
"status" : "passed",
"steps" : [ ],
"attachments" : [ ],
"parameters" : [ ],
"hasContent" : false,
"stepsCount" : 0,
"attachmentsCount" : 0,
"shouldDisplayMessage" : false
} ],
"testStage" : {
"status" : "failed",
"statusMessage" : "AssertionError: 断言失败",
"statusTrace" : "self = <InterfaceAutoTest.test_case.test_bpm.TestBPM object at 0x00000257902D2820>\nreq_fix = <InterfaceAutoTest.requests_method.requests_method.RequestsMethod object at 0x00000257902F0490>\ndb_fix = <InterfaceAutoTest.common.db.DB object at 0x00000257903D93D0>, module = '认证接口', interface = '刷新token', title = '正向用例'\nlevel = '中', method = 'get', url = 'http://120.46.172.186:8080/refresh', mime = None, data = None, expect = {'message': '刷新token成功'}\nsql_type = None, sql_sentence = None, update_key = None\n\n @allure.epic(\"BPM系统\")\n @pytest.mark.parametrize(\"module, interface, title, level, method, url, mime, data, expect, sql_type, sql_sentence, update_key\", ReadExcel().get_data())\n def test_bpm(self, req_fix, db_fix, module, interface, title, level, method, url, mime, data, expect, sql_type, sql_sentence, update_key):\n allure.dynamic.feature(module)\n allure.dynamic.story(interface)\n allure.dynamic.title(title)\n allure.dynamic.severity(level)\n \n # 1.1:判断sql语句的类型是否为delete\n if sql_type == \"delete\":\n # 1.2 使用DB类对象,调用delete方法执行删除的sql语句\n db_fix.delete(sql_sentence)\n # # 1.3 使用RequestsMethod类对象调用request_all方法发送请求\n # result = req_fix.request_all(req_method=method, req_url=url, req_mime=mime, case_data=data)\n \n # 2.1 判断sql语句的类型是否为select\n elif sql_type == \"select\":\n # 2.2 使用DB类对象,调用select方法执行查询的sql语句,并接收查询结果\n select_result = db_fix.select(sql_sentence)\n # 2.3 将查询结果更新到用例数据中\n data[update_key] = select_result\n # # 2.3 使用RequestsMethod类对象调用request_all方法发送请求\n # result = req_fix.request_all(req_method=method, req_url=url, req_mime=mime, case_data=data)\n \n # 3.1 判断sql语句的类型是否delete|select或者为select|delete\n elif sql_type == \"delete|select\" or sql_type == \"select|delete\":\n # 3.2 使用DB类对象,调用delete方法执行删除的sql语句\n db_fix.delete(sql_sentence[\"delete\"])\n # 3.3 使用DB类对象,调用select方法执行查询的sql语句,并接收查询结果\n select_result = db_fix.select(sql_sentence[\"select\"])\n # 3.4 将查询结果更新到用例数据中\n data[update_key] = select_result\n # # 3.5 使用RequestsMethod类对象调用request_all方法发送请求\n # result = req_fix.request_all(req_method=method, req_url=url, req_mime=mime, case_data=data)\n #\n # else:\n # result = req_fix.request_all(req_method=method, req_url=url, req_mime=mime, case_data=data)\n \n result = req_fix.request_all(req_method=method, req_url=url, req_mime=mime, case_data=data)\n \n # 断言\n try:\n for key in expect:\n> assert expect[key] == result.json().get(key)\nE AssertionError: assert '刷新token成功' == None\nE + where None = <built-in method get of dict object at 0x00000257902D4500>('message')\nE + where <built-in method get of dict object at 0x00000257902D4500> = {'account': '', 'loginStatus': True, 'token': 'eyJhbGciOiJIUzUxMiJ9.eyJzdWIiOiJhZG1pbiIsInRlbmFudElkIjoiLTEiLCJleHAiOjE2OTE0ODU0MTcsImlhdCI6MTY5MTM5OTAxN30.n-7NR1iCjIKHbeH-Djk8t1sRkJi_FVAwgVHcGFWP6kh4xOyu6c4rgNtn817qbxVK9O63Wo9-SnreSvMJI5L8Gw', 'userAttrs': {}, ...}.get\nE + where {'account': '', 'loginStatus': True, 'token': 'eyJhbGciOiJIUzUxMiJ9.eyJzdWIiOiJhZG1pbiIsInRlbmFudElkIjoiLTEiLCJleHAiOjE2OTE0ODU0MTcsImlhdCI6MTY5MTM5OTAxN30.n-7NR1iCjIKHbeH-Djk8t1sRkJi_FVAwgVHcGFWP6kh4xOyu6c4rgNtn817qbxVK9O63Wo9-SnreSvMJI5L8Gw', 'userAttrs': {}, ...} = <bound method Response.json of <Response [200]>>()\nE + where <bound method Response.json of <Response [200]>> = <Response [200]>.json\n\ntest_bpm.py:61: AssertionError\n\nDuring handling of the above exception, another exception occurred:\n\nself = <InterfaceAutoTest.test_case.test_bpm.TestBPM object at 0x00000257902D2820>\nreq_fix = <InterfaceAutoTest.requests_method.requests_method.RequestsMethod object at 0x00000257902F0490>\ndb_fix = <InterfaceAutoTest.common.db.DB object at 0x00000257903D93D0>, module = '认证接口', interface = '刷新token', title = '正向用例'\nlevel = '中', method = 'get', url = 'http://120.46.172.186:8080/refresh', mime = None, data = None, expect = {'message': '刷新token成功'}\nsql_type = None, sql_sentence = None, update_key = None\n\n @allure.epic(\"BPM系统\")\n @pytest.mark.parametrize(\"module, interface, title, level, method, url, mime, data, expect, sql_type, sql_sentence, update_key\", ReadExcel().get_data())\n def test_bpm(self, req_fix, db_fix, module, interface, title, level, method, url, mime, data, expect, sql_type, sql_sentence, update_key):\n allure.dynamic.feature(module)\n allure.dynamic.story(interface)\n allure.dynamic.title(title)\n allure.dynamic.severity(level)\n \n # 1.1:判断sql语句的类型是否为delete\n if sql_type == \"delete\":\n # 1.2 使用DB类对象,调用delete方法执行删除的sql语句\n db_fix.delete(sql_sentence)\n # # 1.3 使用RequestsMethod类对象调用request_all方法发送请求\n # result = req_fix.request_all(req_method=method, req_url=url, req_mime=mime, case_data=data)\n \n # 2.1 判断sql语句的类型是否为select\n elif sql_type == \"select\":\n # 2.2 使用DB类对象,调用select方法执行查询的sql语句,并接收查询结果\n select_result = db_fix.select(sql_sentence)\n # 2.3 将查询结果更新到用例数据中\n data[update_key] = select_result\n # # 2.3 使用RequestsMethod类对象调用request_all方法发送请求\n # result = req_fix.request_all(req_method=method, req_url=url, req_mime=mime, case_data=data)\n \n # 3.1 判断sql语句的类型是否delete|select或者为select|delete\n elif sql_type == \"delete|select\" or sql_type == \"select|delete\":\n # 3.2 使用DB类对象,调用delete方法执行删除的sql语句\n db_fix.delete(sql_sentence[\"delete\"])\n # 3.3 使用DB类对象,调用select方法执行查询的sql语句,并接收查询结果\n select_result = db_fix.select(sql_sentence[\"select\"])\n # 3.4 将查询结果更新到用例数据中\n data[update_key] = select_result\n # # 3.5 使用RequestsMethod类对象调用request_all方法发送请求\n # result = req_fix.request_all(req_method=method, req_url=url, req_mime=mime, case_data=data)\n #\n # else:\n # result = req_fix.request_all(req_method=method, req_url=url, req_mime=mime, case_data=data)\n \n result = req_fix.request_all(req_method=method, req_url=url, req_mime=mime, case_data=data)\n \n # 断言\n try:\n for key in expect:\n assert expect[key] == result.json().get(key)\n except:\n print(\"断言失败\")\n logging.error(\"断言失败, 模块名称为:{},接口名称为:{},用例标题:{},用例为:{},期望结果为:{},服务器返回数据为:{}\".format(module, interface, title, str(data), str(expect), result.text))\n> raise AssertionError(\"断言失败\")\nE AssertionError: 断言失败\n\ntest_bpm.py:65: AssertionError",
"steps" : [ ],
"attachments" : [ {
"uid" : "f082b1a02b03b9e5",
"name" : "log",
"source" : "f082b1a02b03b9e5.txt",
"type" : "text/plain",
"size" : 708
}, {
"uid" : "f82848906c91e7c6",
"name" : "stdout",
"source" : "f82848906c91e7c6.txt",
"type" : "text/plain",
"size" : 13
} ],
"parameters" : [ ],
"hasContent" : true,
"stepsCount" : 0,
"attachmentsCount" : 2,
"shouldDisplayMessage" : true
},
"afterStages" : [ {
"name" : "req_fix::0",
"time" : {
"start" : 1691399029988,
"stop" : 1691399029988,
"duration" : 0
},
"status" : "passed",
"steps" : [ ],
"attachments" : [ ],
"parameters" : [ ],
"hasContent" : false,
"stepsCount" : 0,
"attachmentsCount" : 0,
"shouldDisplayMessage" : false
}, {
"name" : "db_fix::0",
"time" : {
"start" : 1691399029987,
"stop" : 1691399029987,
"duration" : 0
},
"status" : "passed",
"steps" : [ ],
"attachments" : [ ],
"parameters" : [ ],
"hasContent" : false,
"stepsCount" : 0,
"attachmentsCount" : 0,
"shouldDisplayMessage" : false
} ],
"labels" : [ {
"name" : "feature",
"value" : "认证接口"
}, {
"name" : "story",
"value" : "刷新token"
}, {
"name" : "severity",
"value" : "中"
}, {
"name" : "epic",
"value" : "BPM系统"
}, {
"name" : "suite",
"value" : "test_bpm"
}, {
"name" : "subSuite",
"value" : "TestBPM"
}, {
"name" : "host",
"value" : "LAPTOP-31V3JBFR"
}, {
"name" : "thread",
"value" : "6412-MainThread"
}, {
"name" : "framework",
"value" : "pytest"
}, {
"name" : "language",
"value" : "cpython3"
}, {
"name" : "package",
"value" : "test_bpm"
}, {
"name" : "resultFormat",
"value" : "allure2"
} ],
"parameters" : [ {
"name" : "data",
"value" : "None"
}, {
"name" : "expect",
"value" : "{'message': '刷新token成功'}"
}, {
"name" : "interface",
"value" : "'刷新token'"
}, {
"name" : "level",
"value" : "'中'"
}, {
"name" : "method",
"value" : "'get'"
}, {
"name" : "mime",
"value" : "None"
}, {
"name" : "module",
"value" : "'认证接口'"
}, {
"name" : "sql_sentence",
"value" : "None"
}, {
"name" : "sql_type",
"value" : "None"
}, {
"name" : "title",
"value" : "'正向用例'"
}, {
"name" : "update_key",
"value" : "None"
}, {
"name" : "url",
"value" : "'http://120.46.172.186:8080/refresh'"
} ],
"links" : [ ],
"hidden" : true,
"retry" : true,
"extra" : {
"categories" : [ ],
"tags" : [ ]
},
"source" : "3f71bbc6a20eada1.json",
"parameterValues" : [ "None", "{'message': '刷新token成功'}", "'刷新token'", "'中'", "'get'", "None", "'认证接口'", "None", "None", "'正向用例'", "None", "'http://120.46.172.186:8080/refresh'" ]
}
\ No newline at end of file
{
"uid" : "4846ba5e55af2bf1",
"name" : "反向用例-用户名过长",
"fullName" : "test_bpm.TestBPM#test_bpm",
"historyId" : "db7f8347492d126be5aa0bc4cf128a49",
"time" : {
"start" : 1691399016938,
"stop" : 1691399017031,
"duration" : 93
},
"status" : "passed",
"flaky" : false,
"newFailed" : false,
"beforeStages" : [ {
"name" : "_session_faker",
"time" : {
"start" : 1691399016370,
"stop" : 1691399016483,
"duration" : 113
},
"status" : "passed",
"steps" : [ ],
"attachments" : [ ],
"parameters" : [ ],
"hasContent" : false,
"stepsCount" : 0,
"attachmentsCount" : 0,
"shouldDisplayMessage" : false
}, {
"name" : "req_fix",
"time" : {
"start" : 1691399016483,
"stop" : 1691399016584,
"duration" : 101
},
"status" : "passed",
"steps" : [ ],
"attachments" : [ ],
"parameters" : [ ],
"hasContent" : false,
"stepsCount" : 0,
"attachmentsCount" : 0,
"shouldDisplayMessage" : false
}, {
"name" : "db_fix",
"time" : {
"start" : 1691399016584,
"stop" : 1691399016789,
"duration" : 205
},
"status" : "passed",
"steps" : [ ],
"attachments" : [ ],
"parameters" : [ ],
"hasContent" : false,
"stepsCount" : 0,
"attachmentsCount" : 0,
"shouldDisplayMessage" : false
} ],
"testStage" : {
"status" : "passed",
"steps" : [ ],
"attachments" : [ {
"uid" : "75193bd7d034486a",
"name" : "log",
"source" : "75193bd7d034486a.txt",
"type" : "text/plain",
"size" : 176
}, {
"uid" : "f8069b83f8c954ba",
"name" : "stdout",
"source" : "f8069b83f8c954ba.txt",
"type" : "text/plain",
"size" : 13
} ],
"parameters" : [ ],
"hasContent" : true,
"stepsCount" : 0,
"attachmentsCount" : 2,
"shouldDisplayMessage" : false
},
"afterStages" : [ {
"name" : "req_fix::0",
"time" : {
"start" : 1691399029988,
"stop" : 1691399029988,
"duration" : 0
},
"status" : "passed",
"steps" : [ ],
"attachments" : [ ],
"parameters" : [ ],
"hasContent" : false,
"stepsCount" : 0,
"attachmentsCount" : 0,
"shouldDisplayMessage" : false
}, {
"name" : "db_fix::0",
"time" : {
"start" : 1691399029987,
"stop" : 1691399029987,
"duration" : 0
},
"status" : "passed",
"steps" : [ ],
"attachments" : [ ],
"parameters" : [ ],
"hasContent" : false,
"stepsCount" : 0,
"attachmentsCount" : 0,
"shouldDisplayMessage" : false
} ],
"labels" : [ {
"name" : "feature",
"value" : "认证接口"
}, {
"name" : "story",
"value" : "登录系统"
}, {
"name" : "severity",
"value" : "中"
}, {
"name" : "epic",
"value" : "BPM系统"
}, {
"name" : "suite",
"value" : "test_bpm"
}, {
"name" : "subSuite",
"value" : "TestBPM"
}, {
"name" : "host",
"value" : "LAPTOP-31V3JBFR"
}, {
"name" : "thread",
"value" : "6412-MainThread"
}, {
"name" : "framework",
"value" : "pytest"
}, {
"name" : "language",
"value" : "cpython3"
}, {
"name" : "package",
"value" : "test_bpm"
}, {
"name" : "resultFormat",
"value" : "allure2"
} ],
"parameters" : [ {
"name" : "data",
"value" : "{'password': 'MTIzNDU2', 'username': 'adminadminadminadminadminadminadminadminadmin'}"
}, {
"name" : "expect",
"value" : "{'state': False, 'message': '账号或密码错误'}"
}, {
"name" : "interface",
"value" : "'登录系统'"
}, {
"name" : "level",
"value" : "'中'"
}, {
"name" : "method",
"value" : "'POST'"
}, {
"name" : "mime",
"value" : "'application/json'"
}, {
"name" : "module",
"value" : "'认证接口'"
}, {
"name" : "sql_sentence",
"value" : "None"
}, {
"name" : "sql_type",
"value" : "None"
}, {
"name" : "title",
"value" : "'反向用例-用户名过长'"
}, {
"name" : "update_key",
"value" : "None"
}, {
"name" : "url",
"value" : "'http://120.46.172.186:8080/auth'"
} ],
"links" : [ ],
"hidden" : false,
"retry" : false,
"extra" : {
"severity" : "normal",
"retries" : [ ],
"categories" : [ ],
"tags" : [ ]
},
"source" : "4846ba5e55af2bf1.json",
"parameterValues" : [ "{'password': 'MTIzNDU2', 'username': 'adminadminadminadminadminadminadminadminadmin'}", "{'state': False, 'message': '账号或密码错误'}", "'登录系统'", "'中'", "'POST'", "'application/json'", "'认证接口'", "None", "None", "'反向用例-用户名过长'", "None", "'http://120.46.172.186:8080/auth'" ]
}
\ No newline at end of file
{
"uid" : "48f2044be487dde3",
"name" : "反向用例-密码为过短",
"fullName" : "test_bpm.TestBPM#test_bpm",
"historyId" : "1e00bd2cd85b6a0d93eb901ec3e350a3",
"time" : {
"start" : 1691399017591,
"stop" : 1691399017687,
"duration" : 96
},
"status" : "passed",
"flaky" : false,
"newFailed" : false,
"beforeStages" : [ {
"name" : "_session_faker",
"time" : {
"start" : 1691399016370,
"stop" : 1691399016483,
"duration" : 113
},
"status" : "passed",
"steps" : [ ],
"attachments" : [ ],
"parameters" : [ ],
"hasContent" : false,
"stepsCount" : 0,
"attachmentsCount" : 0,
"shouldDisplayMessage" : false
}, {
"name" : "req_fix",
"time" : {
"start" : 1691399016483,
"stop" : 1691399016584,
"duration" : 101
},
"status" : "passed",
"steps" : [ ],
"attachments" : [ ],
"parameters" : [ ],
"hasContent" : false,
"stepsCount" : 0,
"attachmentsCount" : 0,
"shouldDisplayMessage" : false
}, {
"name" : "db_fix",
"time" : {
"start" : 1691399016584,
"stop" : 1691399016789,
"duration" : 205
},
"status" : "passed",
"steps" : [ ],
"attachments" : [ ],
"parameters" : [ ],
"hasContent" : false,
"stepsCount" : 0,
"attachmentsCount" : 0,
"shouldDisplayMessage" : false
} ],
"testStage" : {
"status" : "passed",
"steps" : [ ],
"attachments" : [ {
"uid" : "99bf5928efcceaa3",
"name" : "log",
"source" : "99bf5928efcceaa3.txt",
"type" : "text/plain",
"size" : 176
}, {
"uid" : "8c09c4d55238aef9",
"name" : "stdout",
"source" : "8c09c4d55238aef9.txt",
"type" : "text/plain",
"size" : 13
} ],
"parameters" : [ ],
"hasContent" : true,
"stepsCount" : 0,
"attachmentsCount" : 2,
"shouldDisplayMessage" : false
},
"afterStages" : [ {
"name" : "req_fix::0",
"time" : {
"start" : 1691399029988,
"stop" : 1691399029988,
"duration" : 0
},
"status" : "passed",
"steps" : [ ],
"attachments" : [ ],
"parameters" : [ ],
"hasContent" : false,
"stepsCount" : 0,
"attachmentsCount" : 0,
"shouldDisplayMessage" : false
}, {
"name" : "db_fix::0",
"time" : {
"start" : 1691399029987,
"stop" : 1691399029987,
"duration" : 0
},
"status" : "passed",
"steps" : [ ],
"attachments" : [ ],
"parameters" : [ ],
"hasContent" : false,
"stepsCount" : 0,
"attachmentsCount" : 0,
"shouldDisplayMessage" : false
} ],
"labels" : [ {
"name" : "feature",
"value" : "认证接口"
}, {
"name" : "story",
"value" : "登录系统"
}, {
"name" : "severity",
"value" : "中"
}, {
"name" : "epic",
"value" : "BPM系统"
}, {
"name" : "suite",
"value" : "test_bpm"
}, {
"name" : "subSuite",
"value" : "TestBPM"
}, {
"name" : "host",
"value" : "LAPTOP-31V3JBFR"
}, {
"name" : "thread",
"value" : "6412-MainThread"
}, {
"name" : "framework",
"value" : "pytest"
}, {
"name" : "language",
"value" : "cpython3"
}, {
"name" : "package",
"value" : "test_bpm"
}, {
"name" : "resultFormat",
"value" : "allure2"
} ],
"parameters" : [ {
"name" : "data",
"value" : "{'password': '1', 'username': 'admin'}"
}, {
"name" : "expect",
"value" : "{'state': False, 'message': '账号或密码错误'}"
}, {
"name" : "interface",
"value" : "'登录系统'"
}, {
"name" : "level",
"value" : "'中'"
}, {
"name" : "method",
"value" : "'PoST'"
}, {
"name" : "mime",
"value" : "'application/json'"
}, {
"name" : "module",
"value" : "'认证接口'"
}, {
"name" : "sql_sentence",
"value" : "None"
}, {
"name" : "sql_type",
"value" : "None"
}, {
"name" : "title",
"value" : "'反向用例-密码为过短'"
}, {
"name" : "update_key",
"value" : "None"
}, {
"name" : "url",
"value" : "'http://120.46.172.186:8080/auth'"
} ],
"links" : [ ],
"hidden" : false,
"retry" : false,
"extra" : {
"severity" : "normal",
"retries" : [ ],
"categories" : [ ],
"tags" : [ ]
},
"source" : "48f2044be487dde3.json",
"parameterValues" : [ "{'password': '1', 'username': 'admin'}", "{'state': False, 'message': '账号或密码错误'}", "'登录系统'", "'中'", "'PoST'", "'application/json'", "'认证接口'", "None", "None", "'反向用例-密码为过短'", "None", "'http://120.46.172.186:8080/auth'" ]
}
\ No newline at end of file
{
"uid" : "6716e5503b45470b",
"name" : "正向用例",
"fullName" : "test_bpm.TestBPM#test_bpm",
"historyId" : "f368301ce537f1bbd596e0d19f24f393",
"time" : {
"start" : 1691399021306,
"stop" : 1691399021363,
"duration" : 57
},
"status" : "failed",
"statusMessage" : "AssertionError: 断言失败",
"statusTrace" : "self = <InterfaceAutoTest.test_case.test_bpm.TestBPM object at 0x00000257902D2820>\nreq_fix = <InterfaceAutoTest.requests_method.requests_method.RequestsMethod object at 0x00000257902F0490>\ndb_fix = <InterfaceAutoTest.common.db.DB object at 0x00000257903D93D0>, module = '认证接口', interface = '刷新token', title = '正向用例'\nlevel = '中', method = 'get', url = 'http://120.46.172.186:8080/refresh', mime = None, data = None, expect = {'message': '刷新token成功'}\nsql_type = None, sql_sentence = None, update_key = None\n\n @allure.epic(\"BPM系统\")\n @pytest.mark.parametrize(\"module, interface, title, level, method, url, mime, data, expect, sql_type, sql_sentence, update_key\", ReadExcel().get_data())\n def test_bpm(self, req_fix, db_fix, module, interface, title, level, method, url, mime, data, expect, sql_type, sql_sentence, update_key):\n allure.dynamic.feature(module)\n allure.dynamic.story(interface)\n allure.dynamic.title(title)\n allure.dynamic.severity(level)\n \n # 1.1:判断sql语句的类型是否为delete\n if sql_type == \"delete\":\n # 1.2 使用DB类对象,调用delete方法执行删除的sql语句\n db_fix.delete(sql_sentence)\n # # 1.3 使用RequestsMethod类对象调用request_all方法发送请求\n # result = req_fix.request_all(req_method=method, req_url=url, req_mime=mime, case_data=data)\n \n # 2.1 判断sql语句的类型是否为select\n elif sql_type == \"select\":\n # 2.2 使用DB类对象,调用select方法执行查询的sql语句,并接收查询结果\n select_result = db_fix.select(sql_sentence)\n # 2.3 将查询结果更新到用例数据中\n data[update_key] = select_result\n # # 2.3 使用RequestsMethod类对象调用request_all方法发送请求\n # result = req_fix.request_all(req_method=method, req_url=url, req_mime=mime, case_data=data)\n \n # 3.1 判断sql语句的类型是否delete|select或者为select|delete\n elif sql_type == \"delete|select\" or sql_type == \"select|delete\":\n # 3.2 使用DB类对象,调用delete方法执行删除的sql语句\n db_fix.delete(sql_sentence[\"delete\"])\n # 3.3 使用DB类对象,调用select方法执行查询的sql语句,并接收查询结果\n select_result = db_fix.select(sql_sentence[\"select\"])\n # 3.4 将查询结果更新到用例数据中\n data[update_key] = select_result\n # # 3.5 使用RequestsMethod类对象调用request_all方法发送请求\n # result = req_fix.request_all(req_method=method, req_url=url, req_mime=mime, case_data=data)\n #\n # else:\n # result = req_fix.request_all(req_method=method, req_url=url, req_mime=mime, case_data=data)\n \n result = req_fix.request_all(req_method=method, req_url=url, req_mime=mime, case_data=data)\n \n # 断言\n try:\n for key in expect:\n> assert expect[key] == result.json().get(key)\nE AssertionError: assert '刷新token成功' == None\nE + where None = <built-in method get of dict object at 0x000002579047D600>('message')\nE + where <built-in method get of dict object at 0x000002579047D600> = {'account': '', 'loginStatus': True, 'token': 'eyJhbGciOiJIUzUxMiJ9.eyJzdWIiOiJhZG1pbiIsInRlbmFudElkIjoiLTEiLCJleHAiOjE2OTE0ODU0MjAsImlhdCI6MTY5MTM5OTAyMH0.UiLL8CbY6A0_NK2PFWF1YA_lOAuFH2tDwOk5-MP21rQb6-4POQAwoNYaJRF_6QfYBd60YGMTwyBEISUGe-EHXg', 'userAttrs': {}, ...}.get\nE + where {'account': '', 'loginStatus': True, 'token': 'eyJhbGciOiJIUzUxMiJ9.eyJzdWIiOiJhZG1pbiIsInRlbmFudElkIjoiLTEiLCJleHAiOjE2OTE0ODU0MjAsImlhdCI6MTY5MTM5OTAyMH0.UiLL8CbY6A0_NK2PFWF1YA_lOAuFH2tDwOk5-MP21rQb6-4POQAwoNYaJRF_6QfYBd60YGMTwyBEISUGe-EHXg', 'userAttrs': {}, ...} = <bound method Response.json of <Response [200]>>()\nE + where <bound method Response.json of <Response [200]>> = <Response [200]>.json\n\ntest_bpm.py:61: AssertionError\n\nDuring handling of the above exception, another exception occurred:\n\nself = <InterfaceAutoTest.test_case.test_bpm.TestBPM object at 0x00000257902D2820>\nreq_fix = <InterfaceAutoTest.requests_method.requests_method.RequestsMethod object at 0x00000257902F0490>\ndb_fix = <InterfaceAutoTest.common.db.DB object at 0x00000257903D93D0>, module = '认证接口', interface = '刷新token', title = '正向用例'\nlevel = '中', method = 'get', url = 'http://120.46.172.186:8080/refresh', mime = None, data = None, expect = {'message': '刷新token成功'}\nsql_type = None, sql_sentence = None, update_key = None\n\n @allure.epic(\"BPM系统\")\n @pytest.mark.parametrize(\"module, interface, title, level, method, url, mime, data, expect, sql_type, sql_sentence, update_key\", ReadExcel().get_data())\n def test_bpm(self, req_fix, db_fix, module, interface, title, level, method, url, mime, data, expect, sql_type, sql_sentence, update_key):\n allure.dynamic.feature(module)\n allure.dynamic.story(interface)\n allure.dynamic.title(title)\n allure.dynamic.severity(level)\n \n # 1.1:判断sql语句的类型是否为delete\n if sql_type == \"delete\":\n # 1.2 使用DB类对象,调用delete方法执行删除的sql语句\n db_fix.delete(sql_sentence)\n # # 1.3 使用RequestsMethod类对象调用request_all方法发送请求\n # result = req_fix.request_all(req_method=method, req_url=url, req_mime=mime, case_data=data)\n \n # 2.1 判断sql语句的类型是否为select\n elif sql_type == \"select\":\n # 2.2 使用DB类对象,调用select方法执行查询的sql语句,并接收查询结果\n select_result = db_fix.select(sql_sentence)\n # 2.3 将查询结果更新到用例数据中\n data[update_key] = select_result\n # # 2.3 使用RequestsMethod类对象调用request_all方法发送请求\n # result = req_fix.request_all(req_method=method, req_url=url, req_mime=mime, case_data=data)\n \n # 3.1 判断sql语句的类型是否delete|select或者为select|delete\n elif sql_type == \"delete|select\" or sql_type == \"select|delete\":\n # 3.2 使用DB类对象,调用delete方法执行删除的sql语句\n db_fix.delete(sql_sentence[\"delete\"])\n # 3.3 使用DB类对象,调用select方法执行查询的sql语句,并接收查询结果\n select_result = db_fix.select(sql_sentence[\"select\"])\n # 3.4 将查询结果更新到用例数据中\n data[update_key] = select_result\n # # 3.5 使用RequestsMethod类对象调用request_all方法发送请求\n # result = req_fix.request_all(req_method=method, req_url=url, req_mime=mime, case_data=data)\n #\n # else:\n # result = req_fix.request_all(req_method=method, req_url=url, req_mime=mime, case_data=data)\n \n result = req_fix.request_all(req_method=method, req_url=url, req_mime=mime, case_data=data)\n \n # 断言\n try:\n for key in expect:\n assert expect[key] == result.json().get(key)\n except:\n print(\"断言失败\")\n logging.error(\"断言失败, 模块名称为:{},接口名称为:{},用例标题:{},用例为:{},期望结果为:{},服务器返回数据为:{}\".format(module, interface, title, str(data), str(expect), result.text))\n> raise AssertionError(\"断言失败\")\nE AssertionError: 断言失败\n\ntest_bpm.py:65: AssertionError",
"flaky" : false,
"newFailed" : false,
"beforeStages" : [ {
"name" : "_session_faker",
"time" : {
"start" : 1691399016370,
"stop" : 1691399016483,
"duration" : 113
},
"status" : "passed",
"steps" : [ ],
"attachments" : [ ],
"parameters" : [ ],
"hasContent" : false,
"stepsCount" : 0,
"attachmentsCount" : 0,
"shouldDisplayMessage" : false
}, {
"name" : "req_fix",
"time" : {
"start" : 1691399016483,
"stop" : 1691399016584,
"duration" : 101
},
"status" : "passed",
"steps" : [ ],
"attachments" : [ ],
"parameters" : [ ],
"hasContent" : false,
"stepsCount" : 0,
"attachmentsCount" : 0,
"shouldDisplayMessage" : false
}, {
"name" : "db_fix",
"time" : {
"start" : 1691399016584,
"stop" : 1691399016789,
"duration" : 205
},
"status" : "passed",
"steps" : [ ],
"attachments" : [ ],
"parameters" : [ ],
"hasContent" : false,
"stepsCount" : 0,
"attachmentsCount" : 0,
"shouldDisplayMessage" : false
} ],
"testStage" : {
"status" : "failed",
"statusMessage" : "AssertionError: 断言失败",
"statusTrace" : "self = <InterfaceAutoTest.test_case.test_bpm.TestBPM object at 0x00000257902D2820>\nreq_fix = <InterfaceAutoTest.requests_method.requests_method.RequestsMethod object at 0x00000257902F0490>\ndb_fix = <InterfaceAutoTest.common.db.DB object at 0x00000257903D93D0>, module = '认证接口', interface = '刷新token', title = '正向用例'\nlevel = '中', method = 'get', url = 'http://120.46.172.186:8080/refresh', mime = None, data = None, expect = {'message': '刷新token成功'}\nsql_type = None, sql_sentence = None, update_key = None\n\n @allure.epic(\"BPM系统\")\n @pytest.mark.parametrize(\"module, interface, title, level, method, url, mime, data, expect, sql_type, sql_sentence, update_key\", ReadExcel().get_data())\n def test_bpm(self, req_fix, db_fix, module, interface, title, level, method, url, mime, data, expect, sql_type, sql_sentence, update_key):\n allure.dynamic.feature(module)\n allure.dynamic.story(interface)\n allure.dynamic.title(title)\n allure.dynamic.severity(level)\n \n # 1.1:判断sql语句的类型是否为delete\n if sql_type == \"delete\":\n # 1.2 使用DB类对象,调用delete方法执行删除的sql语句\n db_fix.delete(sql_sentence)\n # # 1.3 使用RequestsMethod类对象调用request_all方法发送请求\n # result = req_fix.request_all(req_method=method, req_url=url, req_mime=mime, case_data=data)\n \n # 2.1 判断sql语句的类型是否为select\n elif sql_type == \"select\":\n # 2.2 使用DB类对象,调用select方法执行查询的sql语句,并接收查询结果\n select_result = db_fix.select(sql_sentence)\n # 2.3 将查询结果更新到用例数据中\n data[update_key] = select_result\n # # 2.3 使用RequestsMethod类对象调用request_all方法发送请求\n # result = req_fix.request_all(req_method=method, req_url=url, req_mime=mime, case_data=data)\n \n # 3.1 判断sql语句的类型是否delete|select或者为select|delete\n elif sql_type == \"delete|select\" or sql_type == \"select|delete\":\n # 3.2 使用DB类对象,调用delete方法执行删除的sql语句\n db_fix.delete(sql_sentence[\"delete\"])\n # 3.3 使用DB类对象,调用select方法执行查询的sql语句,并接收查询结果\n select_result = db_fix.select(sql_sentence[\"select\"])\n # 3.4 将查询结果更新到用例数据中\n data[update_key] = select_result\n # # 3.5 使用RequestsMethod类对象调用request_all方法发送请求\n # result = req_fix.request_all(req_method=method, req_url=url, req_mime=mime, case_data=data)\n #\n # else:\n # result = req_fix.request_all(req_method=method, req_url=url, req_mime=mime, case_data=data)\n \n result = req_fix.request_all(req_method=method, req_url=url, req_mime=mime, case_data=data)\n \n # 断言\n try:\n for key in expect:\n> assert expect[key] == result.json().get(key)\nE AssertionError: assert '刷新token成功' == None\nE + where None = <built-in method get of dict object at 0x000002579047D600>('message')\nE + where <built-in method get of dict object at 0x000002579047D600> = {'account': '', 'loginStatus': True, 'token': 'eyJhbGciOiJIUzUxMiJ9.eyJzdWIiOiJhZG1pbiIsInRlbmFudElkIjoiLTEiLCJleHAiOjE2OTE0ODU0MjAsImlhdCI6MTY5MTM5OTAyMH0.UiLL8CbY6A0_NK2PFWF1YA_lOAuFH2tDwOk5-MP21rQb6-4POQAwoNYaJRF_6QfYBd60YGMTwyBEISUGe-EHXg', 'userAttrs': {}, ...}.get\nE + where {'account': '', 'loginStatus': True, 'token': 'eyJhbGciOiJIUzUxMiJ9.eyJzdWIiOiJhZG1pbiIsInRlbmFudElkIjoiLTEiLCJleHAiOjE2OTE0ODU0MjAsImlhdCI6MTY5MTM5OTAyMH0.UiLL8CbY6A0_NK2PFWF1YA_lOAuFH2tDwOk5-MP21rQb6-4POQAwoNYaJRF_6QfYBd60YGMTwyBEISUGe-EHXg', 'userAttrs': {}, ...} = <bound method Response.json of <Response [200]>>()\nE + where <bound method Response.json of <Response [200]>> = <Response [200]>.json\n\ntest_bpm.py:61: AssertionError\n\nDuring handling of the above exception, another exception occurred:\n\nself = <InterfaceAutoTest.test_case.test_bpm.TestBPM object at 0x00000257902D2820>\nreq_fix = <InterfaceAutoTest.requests_method.requests_method.RequestsMethod object at 0x00000257902F0490>\ndb_fix = <InterfaceAutoTest.common.db.DB object at 0x00000257903D93D0>, module = '认证接口', interface = '刷新token', title = '正向用例'\nlevel = '中', method = 'get', url = 'http://120.46.172.186:8080/refresh', mime = None, data = None, expect = {'message': '刷新token成功'}\nsql_type = None, sql_sentence = None, update_key = None\n\n @allure.epic(\"BPM系统\")\n @pytest.mark.parametrize(\"module, interface, title, level, method, url, mime, data, expect, sql_type, sql_sentence, update_key\", ReadExcel().get_data())\n def test_bpm(self, req_fix, db_fix, module, interface, title, level, method, url, mime, data, expect, sql_type, sql_sentence, update_key):\n allure.dynamic.feature(module)\n allure.dynamic.story(interface)\n allure.dynamic.title(title)\n allure.dynamic.severity(level)\n \n # 1.1:判断sql语句的类型是否为delete\n if sql_type == \"delete\":\n # 1.2 使用DB类对象,调用delete方法执行删除的sql语句\n db_fix.delete(sql_sentence)\n # # 1.3 使用RequestsMethod类对象调用request_all方法发送请求\n # result = req_fix.request_all(req_method=method, req_url=url, req_mime=mime, case_data=data)\n \n # 2.1 判断sql语句的类型是否为select\n elif sql_type == \"select\":\n # 2.2 使用DB类对象,调用select方法执行查询的sql语句,并接收查询结果\n select_result = db_fix.select(sql_sentence)\n # 2.3 将查询结果更新到用例数据中\n data[update_key] = select_result\n # # 2.3 使用RequestsMethod类对象调用request_all方法发送请求\n # result = req_fix.request_all(req_method=method, req_url=url, req_mime=mime, case_data=data)\n \n # 3.1 判断sql语句的类型是否delete|select或者为select|delete\n elif sql_type == \"delete|select\" or sql_type == \"select|delete\":\n # 3.2 使用DB类对象,调用delete方法执行删除的sql语句\n db_fix.delete(sql_sentence[\"delete\"])\n # 3.3 使用DB类对象,调用select方法执行查询的sql语句,并接收查询结果\n select_result = db_fix.select(sql_sentence[\"select\"])\n # 3.4 将查询结果更新到用例数据中\n data[update_key] = select_result\n # # 3.5 使用RequestsMethod类对象调用request_all方法发送请求\n # result = req_fix.request_all(req_method=method, req_url=url, req_mime=mime, case_data=data)\n #\n # else:\n # result = req_fix.request_all(req_method=method, req_url=url, req_mime=mime, case_data=data)\n \n result = req_fix.request_all(req_method=method, req_url=url, req_mime=mime, case_data=data)\n \n # 断言\n try:\n for key in expect:\n assert expect[key] == result.json().get(key)\n except:\n print(\"断言失败\")\n logging.error(\"断言失败, 模块名称为:{},接口名称为:{},用例标题:{},用例为:{},期望结果为:{},服务器返回数据为:{}\".format(module, interface, title, str(data), str(expect), result.text))\n> raise AssertionError(\"断言失败\")\nE AssertionError: 断言失败\n\ntest_bpm.py:65: AssertionError",
"steps" : [ ],
"attachments" : [ {
"uid" : "74b4136c55c280c7",
"name" : "log",
"source" : "74b4136c55c280c7.txt",
"type" : "text/plain",
"size" : 2589
}, {
"uid" : "32c4b115aa0ca590",
"name" : "stdout",
"source" : "32c4b115aa0ca590.txt",
"type" : "text/plain",
"size" : 52
} ],
"parameters" : [ ],
"hasContent" : true,
"stepsCount" : 0,
"attachmentsCount" : 2,
"shouldDisplayMessage" : true
},
"afterStages" : [ {
"name" : "req_fix::0",
"time" : {
"start" : 1691399029988,
"stop" : 1691399029988,
"duration" : 0
},
"status" : "passed",
"steps" : [ ],
"attachments" : [ ],
"parameters" : [ ],
"hasContent" : false,
"stepsCount" : 0,
"attachmentsCount" : 0,
"shouldDisplayMessage" : false
}, {
"name" : "db_fix::0",
"time" : {
"start" : 1691399029987,
"stop" : 1691399029987,
"duration" : 0
},
"status" : "passed",
"steps" : [ ],
"attachments" : [ ],
"parameters" : [ ],
"hasContent" : false,
"stepsCount" : 0,
"attachmentsCount" : 0,
"shouldDisplayMessage" : false
} ],
"labels" : [ {
"name" : "feature",
"value" : "认证接口"
}, {
"name" : "story",
"value" : "刷新token"
}, {
"name" : "severity",
"value" : "中"
}, {
"name" : "epic",
"value" : "BPM系统"
}, {
"name" : "suite",
"value" : "test_bpm"
}, {
"name" : "subSuite",
"value" : "TestBPM"
}, {
"name" : "host",
"value" : "LAPTOP-31V3JBFR"
}, {
"name" : "thread",
"value" : "6412-MainThread"
}, {
"name" : "framework",
"value" : "pytest"
}, {
"name" : "language",
"value" : "cpython3"
}, {
"name" : "package",
"value" : "test_bpm"
}, {
"name" : "resultFormat",
"value" : "allure2"
} ],
"parameters" : [ {
"name" : "data",
"value" : "None"
}, {
"name" : "expect",
"value" : "{'message': '刷新token成功'}"
}, {
"name" : "interface",
"value" : "'刷新token'"
}, {
"name" : "level",
"value" : "'中'"
}, {
"name" : "method",
"value" : "'get'"
}, {
"name" : "mime",
"value" : "None"
}, {
"name" : "module",
"value" : "'认证接口'"
}, {
"name" : "sql_sentence",
"value" : "None"
}, {
"name" : "sql_type",
"value" : "None"
}, {
"name" : "title",
"value" : "'正向用例'"
}, {
"name" : "update_key",
"value" : "None"
}, {
"name" : "url",
"value" : "'http://120.46.172.186:8080/refresh'"
} ],
"links" : [ ],
"hidden" : true,
"retry" : true,
"extra" : {
"categories" : [ ],
"tags" : [ ]
},
"source" : "6716e5503b45470b.json",
"parameterValues" : [ "None", "{'message': '刷新token成功'}", "'刷新token'", "'中'", "'get'", "None", "'认证接口'", "None", "None", "'正向用例'", "None", "'http://120.46.172.186:8080/refresh'" ]
}
\ No newline at end of file
{
"uid" : "6c5a76e5b58039b5",
"name" : "正向用例",
"fullName" : "test_bpm.TestBPM#test_bpm",
"historyId" : "f37f5b35a33b0d851ad30e5c966f4068",
"time" : {
"start" : 1691399026336,
"stop" : 1691399026470,
"duration" : 134
},
"status" : "failed",
"statusMessage" : "AssertionError: 断言失败",
"statusTrace" : "self = <InterfaceAutoTest.test_case.test_bpm.TestBPM object at 0x00000257902F01C0>\nreq_fix = <InterfaceAutoTest.requests_method.requests_method.RequestsMethod object at 0x00000257902F0490>\ndb_fix = <InterfaceAutoTest.common.db.DB object at 0x00000257903D93D0>, module = '维度管理', interface = '根据维度编码删除维度', title = '正向用例'\nlevel = '高', method = 'DELETE', url = 'http://120.46.172.186:8080/api/demension/v1/dem/deleteDemByIds', mime = 'query'\ndata = {'ids': '1688475997541777408'}, expect = {'message': '删除维度成功', 'state': True}, sql_type = 'select'\nsql_sentence = 'SELECT ID_ FROM uc_demension WHERE `CODE_`=\"test56_dem\";', update_key = 'ids'\n\n @allure.epic(\"BPM系统\")\n @pytest.mark.parametrize(\"module, interface, title, level, method, url, mime, data, expect, sql_type, sql_sentence, update_key\", ReadExcel().get_data())\n def test_bpm(self, req_fix, db_fix, module, interface, title, level, method, url, mime, data, expect, sql_type, sql_sentence, update_key):\n allure.dynamic.feature(module)\n allure.dynamic.story(interface)\n allure.dynamic.title(title)\n allure.dynamic.severity(level)\n \n # 1.1:判断sql语句的类型是否为delete\n if sql_type == \"delete\":\n # 1.2 使用DB类对象,调用delete方法执行删除的sql语句\n db_fix.delete(sql_sentence)\n # # 1.3 使用RequestsMethod类对象调用request_all方法发送请求\n # result = req_fix.request_all(req_method=method, req_url=url, req_mime=mime, case_data=data)\n \n # 2.1 判断sql语句的类型是否为select\n elif sql_type == \"select\":\n # 2.2 使用DB类对象,调用select方法执行查询的sql语句,并接收查询结果\n select_result = db_fix.select(sql_sentence)\n # 2.3 将查询结果更新到用例数据中\n data[update_key] = select_result\n # # 2.3 使用RequestsMethod类对象调用request_all方法发送请求\n # result = req_fix.request_all(req_method=method, req_url=url, req_mime=mime, case_data=data)\n \n # 3.1 判断sql语句的类型是否delete|select或者为select|delete\n elif sql_type == \"delete|select\" or sql_type == \"select|delete\":\n # 3.2 使用DB类对象,调用delete方法执行删除的sql语句\n db_fix.delete(sql_sentence[\"delete\"])\n # 3.3 使用DB类对象,调用select方法执行查询的sql语句,并接收查询结果\n select_result = db_fix.select(sql_sentence[\"select\"])\n # 3.4 将查询结果更新到用例数据中\n data[update_key] = select_result\n # # 3.5 使用RequestsMethod类对象调用request_all方法发送请求\n # result = req_fix.request_all(req_method=method, req_url=url, req_mime=mime, case_data=data)\n #\n # else:\n # result = req_fix.request_all(req_method=method, req_url=url, req_mime=mime, case_data=data)\n \n result = req_fix.request_all(req_method=method, req_url=url, req_mime=mime, case_data=data)\n \n # 断言\n try:\n for key in expect:\n> assert expect[key] == result.json().get(key)\nE AssertionError: assert True == False\nE + where False = <built-in method get of dict object at 0x00000257904741C0>('state')\nE + where <built-in method get of dict object at 0x00000257904741C0> = {'logId': '1688476009176776704', 'message': '', 'state': False}.get\nE + where {'logId': '1688476009176776704', 'message': '', 'state': False} = <bound method Response.json of <Response [500]>>()\nE + where <bound method Response.json of <Response [500]>> = <Response [500]>.json\n\ntest_bpm.py:61: AssertionError\n\nDuring handling of the above exception, another exception occurred:\n\nself = <InterfaceAutoTest.test_case.test_bpm.TestBPM object at 0x00000257902F01C0>\nreq_fix = <InterfaceAutoTest.requests_method.requests_method.RequestsMethod object at 0x00000257902F0490>\ndb_fix = <InterfaceAutoTest.common.db.DB object at 0x00000257903D93D0>, module = '维度管理', interface = '根据维度编码删除维度', title = '正向用例'\nlevel = '高', method = 'DELETE', url = 'http://120.46.172.186:8080/api/demension/v1/dem/deleteDemByIds', mime = 'query'\ndata = {'ids': '1688475997541777408'}, expect = {'message': '删除维度成功', 'state': True}, sql_type = 'select'\nsql_sentence = 'SELECT ID_ FROM uc_demension WHERE `CODE_`=\"test56_dem\";', update_key = 'ids'\n\n @allure.epic(\"BPM系统\")\n @pytest.mark.parametrize(\"module, interface, title, level, method, url, mime, data, expect, sql_type, sql_sentence, update_key\", ReadExcel().get_data())\n def test_bpm(self, req_fix, db_fix, module, interface, title, level, method, url, mime, data, expect, sql_type, sql_sentence, update_key):\n allure.dynamic.feature(module)\n allure.dynamic.story(interface)\n allure.dynamic.title(title)\n allure.dynamic.severity(level)\n \n # 1.1:判断sql语句的类型是否为delete\n if sql_type == \"delete\":\n # 1.2 使用DB类对象,调用delete方法执行删除的sql语句\n db_fix.delete(sql_sentence)\n # # 1.3 使用RequestsMethod类对象调用request_all方法发送请求\n # result = req_fix.request_all(req_method=method, req_url=url, req_mime=mime, case_data=data)\n \n # 2.1 判断sql语句的类型是否为select\n elif sql_type == \"select\":\n # 2.2 使用DB类对象,调用select方法执行查询的sql语句,并接收查询结果\n select_result = db_fix.select(sql_sentence)\n # 2.3 将查询结果更新到用例数据中\n data[update_key] = select_result\n # # 2.3 使用RequestsMethod类对象调用request_all方法发送请求\n # result = req_fix.request_all(req_method=method, req_url=url, req_mime=mime, case_data=data)\n \n # 3.1 判断sql语句的类型是否delete|select或者为select|delete\n elif sql_type == \"delete|select\" or sql_type == \"select|delete\":\n # 3.2 使用DB类对象,调用delete方法执行删除的sql语句\n db_fix.delete(sql_sentence[\"delete\"])\n # 3.3 使用DB类对象,调用select方法执行查询的sql语句,并接收查询结果\n select_result = db_fix.select(sql_sentence[\"select\"])\n # 3.4 将查询结果更新到用例数据中\n data[update_key] = select_result\n # # 3.5 使用RequestsMethod类对象调用request_all方法发送请求\n # result = req_fix.request_all(req_method=method, req_url=url, req_mime=mime, case_data=data)\n #\n # else:\n # result = req_fix.request_all(req_method=method, req_url=url, req_mime=mime, case_data=data)\n \n result = req_fix.request_all(req_method=method, req_url=url, req_mime=mime, case_data=data)\n \n # 断言\n try:\n for key in expect:\n assert expect[key] == result.json().get(key)\n except:\n print(\"断言失败\")\n logging.error(\"断言失败, 模块名称为:{},接口名称为:{},用例标题:{},用例为:{},期望结果为:{},服务器返回数据为:{}\".format(module, interface, title, str(data), str(expect), result.text))\n> raise AssertionError(\"断言失败\")\nE AssertionError: 断言失败\n\ntest_bpm.py:65: AssertionError",
"flaky" : false,
"newFailed" : false,
"beforeStages" : [ {
"name" : "_session_faker",
"time" : {
"start" : 1691399016370,
"stop" : 1691399016483,
"duration" : 113
},
"status" : "passed",
"steps" : [ ],
"attachments" : [ ],
"parameters" : [ ],
"hasContent" : false,
"stepsCount" : 0,
"attachmentsCount" : 0,
"shouldDisplayMessage" : false
}, {
"name" : "req_fix",
"time" : {
"start" : 1691399016483,
"stop" : 1691399016584,
"duration" : 101
},
"status" : "passed",
"steps" : [ ],
"attachments" : [ ],
"parameters" : [ ],
"hasContent" : false,
"stepsCount" : 0,
"attachmentsCount" : 0,
"shouldDisplayMessage" : false
}, {
"name" : "db_fix",
"time" : {
"start" : 1691399016584,
"stop" : 1691399016789,
"duration" : 205
},
"status" : "passed",
"steps" : [ ],
"attachments" : [ ],
"parameters" : [ ],
"hasContent" : false,
"stepsCount" : 0,
"attachmentsCount" : 0,
"shouldDisplayMessage" : false
} ],
"testStage" : {
"status" : "failed",
"statusMessage" : "AssertionError: 断言失败",
"statusTrace" : "self = <InterfaceAutoTest.test_case.test_bpm.TestBPM object at 0x00000257902F01C0>\nreq_fix = <InterfaceAutoTest.requests_method.requests_method.RequestsMethod object at 0x00000257902F0490>\ndb_fix = <InterfaceAutoTest.common.db.DB object at 0x00000257903D93D0>, module = '维度管理', interface = '根据维度编码删除维度', title = '正向用例'\nlevel = '高', method = 'DELETE', url = 'http://120.46.172.186:8080/api/demension/v1/dem/deleteDemByIds', mime = 'query'\ndata = {'ids': '1688475997541777408'}, expect = {'message': '删除维度成功', 'state': True}, sql_type = 'select'\nsql_sentence = 'SELECT ID_ FROM uc_demension WHERE `CODE_`=\"test56_dem\";', update_key = 'ids'\n\n @allure.epic(\"BPM系统\")\n @pytest.mark.parametrize(\"module, interface, title, level, method, url, mime, data, expect, sql_type, sql_sentence, update_key\", ReadExcel().get_data())\n def test_bpm(self, req_fix, db_fix, module, interface, title, level, method, url, mime, data, expect, sql_type, sql_sentence, update_key):\n allure.dynamic.feature(module)\n allure.dynamic.story(interface)\n allure.dynamic.title(title)\n allure.dynamic.severity(level)\n \n # 1.1:判断sql语句的类型是否为delete\n if sql_type == \"delete\":\n # 1.2 使用DB类对象,调用delete方法执行删除的sql语句\n db_fix.delete(sql_sentence)\n # # 1.3 使用RequestsMethod类对象调用request_all方法发送请求\n # result = req_fix.request_all(req_method=method, req_url=url, req_mime=mime, case_data=data)\n \n # 2.1 判断sql语句的类型是否为select\n elif sql_type == \"select\":\n # 2.2 使用DB类对象,调用select方法执行查询的sql语句,并接收查询结果\n select_result = db_fix.select(sql_sentence)\n # 2.3 将查询结果更新到用例数据中\n data[update_key] = select_result\n # # 2.3 使用RequestsMethod类对象调用request_all方法发送请求\n # result = req_fix.request_all(req_method=method, req_url=url, req_mime=mime, case_data=data)\n \n # 3.1 判断sql语句的类型是否delete|select或者为select|delete\n elif sql_type == \"delete|select\" or sql_type == \"select|delete\":\n # 3.2 使用DB类对象,调用delete方法执行删除的sql语句\n db_fix.delete(sql_sentence[\"delete\"])\n # 3.3 使用DB类对象,调用select方法执行查询的sql语句,并接收查询结果\n select_result = db_fix.select(sql_sentence[\"select\"])\n # 3.4 将查询结果更新到用例数据中\n data[update_key] = select_result\n # # 3.5 使用RequestsMethod类对象调用request_all方法发送请求\n # result = req_fix.request_all(req_method=method, req_url=url, req_mime=mime, case_data=data)\n #\n # else:\n # result = req_fix.request_all(req_method=method, req_url=url, req_mime=mime, case_data=data)\n \n result = req_fix.request_all(req_method=method, req_url=url, req_mime=mime, case_data=data)\n \n # 断言\n try:\n for key in expect:\n> assert expect[key] == result.json().get(key)\nE AssertionError: assert True == False\nE + where False = <built-in method get of dict object at 0x00000257904741C0>('state')\nE + where <built-in method get of dict object at 0x00000257904741C0> = {'logId': '1688476009176776704', 'message': '', 'state': False}.get\nE + where {'logId': '1688476009176776704', 'message': '', 'state': False} = <bound method Response.json of <Response [500]>>()\nE + where <bound method Response.json of <Response [500]>> = <Response [500]>.json\n\ntest_bpm.py:61: AssertionError\n\nDuring handling of the above exception, another exception occurred:\n\nself = <InterfaceAutoTest.test_case.test_bpm.TestBPM object at 0x00000257902F01C0>\nreq_fix = <InterfaceAutoTest.requests_method.requests_method.RequestsMethod object at 0x00000257902F0490>\ndb_fix = <InterfaceAutoTest.common.db.DB object at 0x00000257903D93D0>, module = '维度管理', interface = '根据维度编码删除维度', title = '正向用例'\nlevel = '高', method = 'DELETE', url = 'http://120.46.172.186:8080/api/demension/v1/dem/deleteDemByIds', mime = 'query'\ndata = {'ids': '1688475997541777408'}, expect = {'message': '删除维度成功', 'state': True}, sql_type = 'select'\nsql_sentence = 'SELECT ID_ FROM uc_demension WHERE `CODE_`=\"test56_dem\";', update_key = 'ids'\n\n @allure.epic(\"BPM系统\")\n @pytest.mark.parametrize(\"module, interface, title, level, method, url, mime, data, expect, sql_type, sql_sentence, update_key\", ReadExcel().get_data())\n def test_bpm(self, req_fix, db_fix, module, interface, title, level, method, url, mime, data, expect, sql_type, sql_sentence, update_key):\n allure.dynamic.feature(module)\n allure.dynamic.story(interface)\n allure.dynamic.title(title)\n allure.dynamic.severity(level)\n \n # 1.1:判断sql语句的类型是否为delete\n if sql_type == \"delete\":\n # 1.2 使用DB类对象,调用delete方法执行删除的sql语句\n db_fix.delete(sql_sentence)\n # # 1.3 使用RequestsMethod类对象调用request_all方法发送请求\n # result = req_fix.request_all(req_method=method, req_url=url, req_mime=mime, case_data=data)\n \n # 2.1 判断sql语句的类型是否为select\n elif sql_type == \"select\":\n # 2.2 使用DB类对象,调用select方法执行查询的sql语句,并接收查询结果\n select_result = db_fix.select(sql_sentence)\n # 2.3 将查询结果更新到用例数据中\n data[update_key] = select_result\n # # 2.3 使用RequestsMethod类对象调用request_all方法发送请求\n # result = req_fix.request_all(req_method=method, req_url=url, req_mime=mime, case_data=data)\n \n # 3.1 判断sql语句的类型是否delete|select或者为select|delete\n elif sql_type == \"delete|select\" or sql_type == \"select|delete\":\n # 3.2 使用DB类对象,调用delete方法执行删除的sql语句\n db_fix.delete(sql_sentence[\"delete\"])\n # 3.3 使用DB类对象,调用select方法执行查询的sql语句,并接收查询结果\n select_result = db_fix.select(sql_sentence[\"select\"])\n # 3.4 将查询结果更新到用例数据中\n data[update_key] = select_result\n # # 3.5 使用RequestsMethod类对象调用request_all方法发送请求\n # result = req_fix.request_all(req_method=method, req_url=url, req_mime=mime, case_data=data)\n #\n # else:\n # result = req_fix.request_all(req_method=method, req_url=url, req_mime=mime, case_data=data)\n \n result = req_fix.request_all(req_method=method, req_url=url, req_mime=mime, case_data=data)\n \n # 断言\n try:\n for key in expect:\n assert expect[key] == result.json().get(key)\n except:\n print(\"断言失败\")\n logging.error(\"断言失败, 模块名称为:{},接口名称为:{},用例标题:{},用例为:{},期望结果为:{},服务器返回数据为:{}\".format(module, interface, title, str(data), str(expect), result.text))\n> raise AssertionError(\"断言失败\")\nE AssertionError: 断言失败\n\ntest_bpm.py:65: AssertionError",
"steps" : [ ],
"attachments" : [ {
"uid" : "8e6df2e1c5469dd6",
"name" : "log",
"source" : "8e6df2e1c5469dd6.txt",
"type" : "text/plain",
"size" : 1645
}, {
"uid" : "2b3dd41a55d0513",
"name" : "stdout",
"source" : "2b3dd41a55d0513.txt",
"type" : "text/plain",
"size" : 39
} ],
"parameters" : [ ],
"hasContent" : true,
"stepsCount" : 0,
"attachmentsCount" : 2,
"shouldDisplayMessage" : true
},
"afterStages" : [ {
"name" : "req_fix::0",
"time" : {
"start" : 1691399029988,
"stop" : 1691399029988,
"duration" : 0
},
"status" : "passed",
"steps" : [ ],
"attachments" : [ ],
"parameters" : [ ],
"hasContent" : false,
"stepsCount" : 0,
"attachmentsCount" : 0,
"shouldDisplayMessage" : false
}, {
"name" : "db_fix::0",
"time" : {
"start" : 1691399029987,
"stop" : 1691399029987,
"duration" : 0
},
"status" : "passed",
"steps" : [ ],
"attachments" : [ ],
"parameters" : [ ],
"hasContent" : false,
"stepsCount" : 0,
"attachmentsCount" : 0,
"shouldDisplayMessage" : false
} ],
"labels" : [ {
"name" : "feature",
"value" : "维度管理"
}, {
"name" : "story",
"value" : "根据维度编码删除维度"
}, {
"name" : "severity",
"value" : "高"
}, {
"name" : "epic",
"value" : "BPM系统"
}, {
"name" : "suite",
"value" : "test_bpm"
}, {
"name" : "subSuite",
"value" : "TestBPM"
}, {
"name" : "host",
"value" : "LAPTOP-31V3JBFR"
}, {
"name" : "thread",
"value" : "6412-MainThread"
}, {
"name" : "framework",
"value" : "pytest"
}, {
"name" : "language",
"value" : "cpython3"
}, {
"name" : "package",
"value" : "test_bpm"
}, {
"name" : "resultFormat",
"value" : "allure2"
} ],
"parameters" : [ {
"name" : "data",
"value" : "{'ids': '1688475997541777408'}"
}, {
"name" : "expect",
"value" : "{'state': True, 'message': '删除维度成功'}"
}, {
"name" : "interface",
"value" : "'根据维度编码删除维度'"
}, {
"name" : "level",
"value" : "'高'"
}, {
"name" : "method",
"value" : "'DELETE'"
}, {
"name" : "mime",
"value" : "'query'"
}, {
"name" : "module",
"value" : "'维度管理'"
}, {
"name" : "sql_sentence",
"value" : "'SELECT ID_ FROM uc_demension WHERE `CODE_`=\"test56_dem\";'"
}, {
"name" : "sql_type",
"value" : "'select'"
}, {
"name" : "title",
"value" : "'正向用例'"
}, {
"name" : "update_key",
"value" : "'ids'"
}, {
"name" : "url",
"value" : "'http://120.46.172.186:8080/api/demension/v1/dem/deleteDemByIds'"
} ],
"links" : [ ],
"hidden" : true,
"retry" : true,
"extra" : {
"categories" : [ ],
"tags" : [ ]
},
"source" : "6c5a76e5b58039b5.json",
"parameterValues" : [ "{'ids': '1688475997541777408'}", "{'state': True, 'message': '删除维度成功'}", "'根据维度编码删除维度'", "'高'", "'DELETE'", "'query'", "'维度管理'", "'SELECT ID_ FROM uc_demension WHERE `CODE_`=\"test56_dem\";'", "'select'", "'正向用例'", "'ids'", "'http://120.46.172.186:8080/api/demension/v1/dem/deleteDemByIds'" ]
}
\ No newline at end of file
{
"uid" : "7138d75998f57a3d",
"name" : "反向用例-用户名错误",
"fullName" : "test_bpm.TestBPM#test_bpm",
"historyId" : "0bc244764898381335e19a8275f4cc75",
"time" : {
"start" : 1691399017270,
"stop" : 1691399017363,
"duration" : 93
},
"status" : "passed",
"flaky" : false,
"newFailed" : false,
"beforeStages" : [ {
"name" : "_session_faker",
"time" : {
"start" : 1691399016370,
"stop" : 1691399016483,
"duration" : 113
},
"status" : "passed",
"steps" : [ ],
"attachments" : [ ],
"parameters" : [ ],
"hasContent" : false,
"stepsCount" : 0,
"attachmentsCount" : 0,
"shouldDisplayMessage" : false
}, {
"name" : "req_fix",
"time" : {
"start" : 1691399016483,
"stop" : 1691399016584,
"duration" : 101
},
"status" : "passed",
"steps" : [ ],
"attachments" : [ ],
"parameters" : [ ],
"hasContent" : false,
"stepsCount" : 0,
"attachmentsCount" : 0,
"shouldDisplayMessage" : false
}, {
"name" : "db_fix",
"time" : {
"start" : 1691399016584,
"stop" : 1691399016789,
"duration" : 205
},
"status" : "passed",
"steps" : [ ],
"attachments" : [ ],
"parameters" : [ ],
"hasContent" : false,
"stepsCount" : 0,
"attachmentsCount" : 0,
"shouldDisplayMessage" : false
} ],
"testStage" : {
"status" : "passed",
"steps" : [ ],
"attachments" : [ {
"uid" : "e772f894b621d25c",
"name" : "log",
"source" : "e772f894b621d25c.txt",
"type" : "text/plain",
"size" : 176
}, {
"uid" : "564fba0692264898",
"name" : "stdout",
"source" : "564fba0692264898.txt",
"type" : "text/plain",
"size" : 13
} ],
"parameters" : [ ],
"hasContent" : true,
"stepsCount" : 0,
"attachmentsCount" : 2,
"shouldDisplayMessage" : false
},
"afterStages" : [ {
"name" : "req_fix::0",
"time" : {
"start" : 1691399029988,
"stop" : 1691399029988,
"duration" : 0
},
"status" : "passed",
"steps" : [ ],
"attachments" : [ ],
"parameters" : [ ],
"hasContent" : false,
"stepsCount" : 0,
"attachmentsCount" : 0,
"shouldDisplayMessage" : false
}, {
"name" : "db_fix::0",
"time" : {
"start" : 1691399029987,
"stop" : 1691399029987,
"duration" : 0
},
"status" : "passed",
"steps" : [ ],
"attachments" : [ ],
"parameters" : [ ],
"hasContent" : false,
"stepsCount" : 0,
"attachmentsCount" : 0,
"shouldDisplayMessage" : false
} ],
"labels" : [ {
"name" : "feature",
"value" : "认证接口"
}, {
"name" : "story",
"value" : "登录系统"
}, {
"name" : "severity",
"value" : "中"
}, {
"name" : "epic",
"value" : "BPM系统"
}, {
"name" : "suite",
"value" : "test_bpm"
}, {
"name" : "subSuite",
"value" : "TestBPM"
}, {
"name" : "host",
"value" : "LAPTOP-31V3JBFR"
}, {
"name" : "thread",
"value" : "6412-MainThread"
}, {
"name" : "framework",
"value" : "pytest"
}, {
"name" : "language",
"value" : "cpython3"
}, {
"name" : "package",
"value" : "test_bpm"
}, {
"name" : "resultFormat",
"value" : "allure2"
} ],
"parameters" : [ {
"name" : "data",
"value" : "{'password': 'MTIzNDU2', 'username': 'tomcat'}"
}, {
"name" : "expect",
"value" : "{'state': False, 'message': '账号或密码错误'}"
}, {
"name" : "interface",
"value" : "'登录系统'"
}, {
"name" : "level",
"value" : "'中'"
}, {
"name" : "method",
"value" : "'POST'"
}, {
"name" : "mime",
"value" : "'json'"
}, {
"name" : "module",
"value" : "'认证接口'"
}, {
"name" : "sql_sentence",
"value" : "None"
}, {
"name" : "sql_type",
"value" : "None"
}, {
"name" : "title",
"value" : "'反向用例-用户名错误'"
}, {
"name" : "update_key",
"value" : "None"
}, {
"name" : "url",
"value" : "'http://120.46.172.186:8080/auth'"
} ],
"links" : [ ],
"hidden" : false,
"retry" : false,
"extra" : {
"severity" : "normal",
"retries" : [ ],
"categories" : [ ],
"tags" : [ ]
},
"source" : "7138d75998f57a3d.json",
"parameterValues" : [ "{'password': 'MTIzNDU2', 'username': 'tomcat'}", "{'state': False, 'message': '账号或密码错误'}", "'登录系统'", "'中'", "'POST'", "'json'", "'认证接口'", "None", "None", "'反向用例-用户名错误'", "None", "'http://120.46.172.186:8080/auth'" ]
}
\ No newline at end of file
{
"uid" : "744f2d6bfb921a07",
"name" : "反向用例-密码为长",
"fullName" : "test_bpm.TestBPM#test_bpm",
"historyId" : "1583d8257c325d21eabb5675af66c678",
"time" : {
"start" : 1691399017479,
"stop" : 1691399017576,
"duration" : 97
},
"status" : "passed",
"flaky" : false,
"newFailed" : false,
"beforeStages" : [ {
"name" : "_session_faker",
"time" : {
"start" : 1691399016370,
"stop" : 1691399016483,
"duration" : 113
},
"status" : "passed",
"steps" : [ ],
"attachments" : [ ],
"parameters" : [ ],
"hasContent" : false,
"stepsCount" : 0,
"attachmentsCount" : 0,
"shouldDisplayMessage" : false
}, {
"name" : "req_fix",
"time" : {
"start" : 1691399016483,
"stop" : 1691399016584,
"duration" : 101
},
"status" : "passed",
"steps" : [ ],
"attachments" : [ ],
"parameters" : [ ],
"hasContent" : false,
"stepsCount" : 0,
"attachmentsCount" : 0,
"shouldDisplayMessage" : false
}, {
"name" : "db_fix",
"time" : {
"start" : 1691399016584,
"stop" : 1691399016789,
"duration" : 205
},
"status" : "passed",
"steps" : [ ],
"attachments" : [ ],
"parameters" : [ ],
"hasContent" : false,
"stepsCount" : 0,
"attachmentsCount" : 0,
"shouldDisplayMessage" : false
} ],
"testStage" : {
"status" : "passed",
"steps" : [ ],
"attachments" : [ {
"uid" : "64e4484a01eba8f1",
"name" : "log",
"source" : "64e4484a01eba8f1.txt",
"type" : "text/plain",
"size" : 176
}, {
"uid" : "7eb7d1ac5bd76e4",
"name" : "stdout",
"source" : "7eb7d1ac5bd76e4.txt",
"type" : "text/plain",
"size" : 13
} ],
"parameters" : [ ],
"hasContent" : true,
"stepsCount" : 0,
"attachmentsCount" : 2,
"shouldDisplayMessage" : false
},
"afterStages" : [ {
"name" : "req_fix::0",
"time" : {
"start" : 1691399029988,
"stop" : 1691399029988,
"duration" : 0
},
"status" : "passed",
"steps" : [ ],
"attachments" : [ ],
"parameters" : [ ],
"hasContent" : false,
"stepsCount" : 0,
"attachmentsCount" : 0,
"shouldDisplayMessage" : false
}, {
"name" : "db_fix::0",
"time" : {
"start" : 1691399029987,
"stop" : 1691399029987,
"duration" : 0
},
"status" : "passed",
"steps" : [ ],
"attachments" : [ ],
"parameters" : [ ],
"hasContent" : false,
"stepsCount" : 0,
"attachmentsCount" : 0,
"shouldDisplayMessage" : false
} ],
"labels" : [ {
"name" : "feature",
"value" : "认证接口"
}, {
"name" : "story",
"value" : "登录系统"
}, {
"name" : "severity",
"value" : "中"
}, {
"name" : "epic",
"value" : "BPM系统"
}, {
"name" : "suite",
"value" : "test_bpm"
}, {
"name" : "subSuite",
"value" : "TestBPM"
}, {
"name" : "host",
"value" : "LAPTOP-31V3JBFR"
}, {
"name" : "thread",
"value" : "6412-MainThread"
}, {
"name" : "framework",
"value" : "pytest"
}, {
"name" : "language",
"value" : "cpython3"
}, {
"name" : "package",
"value" : "test_bpm"
}, {
"name" : "resultFormat",
"value" : "allure2"
} ],
"parameters" : [ {
"name" : "data",
"value" : "{'password': 'MTIzNDU2MTIzNDU2MTIzNDU2MTIzNDU2MTIzNDU2MTIzNDU2', 'username': 'admin'}"
}, {
"name" : "expect",
"value" : "{'state': False, 'message': '账号或密码错误'}"
}, {
"name" : "interface",
"value" : "'登录系统'"
}, {
"name" : "level",
"value" : "'中'"
}, {
"name" : "method",
"value" : "'POST'"
}, {
"name" : "mime",
"value" : "'application/json'"
}, {
"name" : "module",
"value" : "'认证接口'"
}, {
"name" : "sql_sentence",
"value" : "None"
}, {
"name" : "sql_type",
"value" : "None"
}, {
"name" : "title",
"value" : "'反向用例-密码为长'"
}, {
"name" : "update_key",
"value" : "None"
}, {
"name" : "url",
"value" : "'http://120.46.172.186:8080/auth'"
} ],
"links" : [ ],
"hidden" : false,
"retry" : false,
"extra" : {
"severity" : "normal",
"retries" : [ ],
"categories" : [ ],
"tags" : [ ]
},
"source" : "744f2d6bfb921a07.json",
"parameterValues" : [ "{'password': 'MTIzNDU2MTIzNDU2MTIzNDU2MTIzNDU2MTIzNDU2MTIzNDU2', 'username': 'admin'}", "{'state': False, 'message': '账号或密码错误'}", "'登录系统'", "'中'", "'POST'", "'application/json'", "'认证接口'", "None", "None", "'反向用例-密码为长'", "None", "'http://120.46.172.186:8080/auth'" ]
}
\ No newline at end of file
{
"uid" : "7e6a0a296e38c785",
"name" : "正向用例",
"fullName" : "test_bpm.TestBPM#test_bpm",
"historyId" : "f368301ce537f1bbd596e0d19f24f393",
"time" : {
"start" : 1691399019103,
"stop" : 1691399019159,
"duration" : 56
},
"status" : "failed",
"statusMessage" : "AssertionError: 断言失败",
"statusTrace" : "self = <InterfaceAutoTest.test_case.test_bpm.TestBPM object at 0x00000257902D2820>\nreq_fix = <InterfaceAutoTest.requests_method.requests_method.RequestsMethod object at 0x00000257902F0490>\ndb_fix = <InterfaceAutoTest.common.db.DB object at 0x00000257903D93D0>, module = '认证接口', interface = '刷新token', title = '正向用例'\nlevel = '中', method = 'get', url = 'http://120.46.172.186:8080/refresh', mime = None, data = None, expect = {'message': '刷新token成功'}\nsql_type = None, sql_sentence = None, update_key = None\n\n @allure.epic(\"BPM系统\")\n @pytest.mark.parametrize(\"module, interface, title, level, method, url, mime, data, expect, sql_type, sql_sentence, update_key\", ReadExcel().get_data())\n def test_bpm(self, req_fix, db_fix, module, interface, title, level, method, url, mime, data, expect, sql_type, sql_sentence, update_key):\n allure.dynamic.feature(module)\n allure.dynamic.story(interface)\n allure.dynamic.title(title)\n allure.dynamic.severity(level)\n \n # 1.1:判断sql语句的类型是否为delete\n if sql_type == \"delete\":\n # 1.2 使用DB类对象,调用delete方法执行删除的sql语句\n db_fix.delete(sql_sentence)\n # # 1.3 使用RequestsMethod类对象调用request_all方法发送请求\n # result = req_fix.request_all(req_method=method, req_url=url, req_mime=mime, case_data=data)\n \n # 2.1 判断sql语句的类型是否为select\n elif sql_type == \"select\":\n # 2.2 使用DB类对象,调用select方法执行查询的sql语句,并接收查询结果\n select_result = db_fix.select(sql_sentence)\n # 2.3 将查询结果更新到用例数据中\n data[update_key] = select_result\n # # 2.3 使用RequestsMethod类对象调用request_all方法发送请求\n # result = req_fix.request_all(req_method=method, req_url=url, req_mime=mime, case_data=data)\n \n # 3.1 判断sql语句的类型是否delete|select或者为select|delete\n elif sql_type == \"delete|select\" or sql_type == \"select|delete\":\n # 3.2 使用DB类对象,调用delete方法执行删除的sql语句\n db_fix.delete(sql_sentence[\"delete\"])\n # 3.3 使用DB类对象,调用select方法执行查询的sql语句,并接收查询结果\n select_result = db_fix.select(sql_sentence[\"select\"])\n # 3.4 将查询结果更新到用例数据中\n data[update_key] = select_result\n # # 3.5 使用RequestsMethod类对象调用request_all方法发送请求\n # result = req_fix.request_all(req_method=method, req_url=url, req_mime=mime, case_data=data)\n #\n # else:\n # result = req_fix.request_all(req_method=method, req_url=url, req_mime=mime, case_data=data)\n \n result = req_fix.request_all(req_method=method, req_url=url, req_mime=mime, case_data=data)\n \n # 断言\n try:\n for key in expect:\n> assert expect[key] == result.json().get(key)\nE AssertionError: assert '刷新token成功' == None\nE + where None = <built-in method get of dict object at 0x0000025790477140>('message')\nE + where <built-in method get of dict object at 0x0000025790477140> = {'account': '', 'loginStatus': True, 'token': 'eyJhbGciOiJIUzUxMiJ9.eyJzdWIiOiJhZG1pbiIsInRlbmFudElkIjoiLTEiLCJleHAiOjE2OTE0ODU0MTgsImlhdCI6MTY5MTM5OTAxOH0.Rb1x9O8uPZcXAfoDbWutU6f3taE2vMl0iRW4WVVwfeKYLS-zF9e0IFTyL2tUDstfMzs0ej7qYnsUg_CXR-qOHg', 'userAttrs': {}, ...}.get\nE + where {'account': '', 'loginStatus': True, 'token': 'eyJhbGciOiJIUzUxMiJ9.eyJzdWIiOiJhZG1pbiIsInRlbmFudElkIjoiLTEiLCJleHAiOjE2OTE0ODU0MTgsImlhdCI6MTY5MTM5OTAxOH0.Rb1x9O8uPZcXAfoDbWutU6f3taE2vMl0iRW4WVVwfeKYLS-zF9e0IFTyL2tUDstfMzs0ej7qYnsUg_CXR-qOHg', 'userAttrs': {}, ...} = <bound method Response.json of <Response [200]>>()\nE + where <bound method Response.json of <Response [200]>> = <Response [200]>.json\n\ntest_bpm.py:61: AssertionError\n\nDuring handling of the above exception, another exception occurred:\n\nself = <InterfaceAutoTest.test_case.test_bpm.TestBPM object at 0x00000257902D2820>\nreq_fix = <InterfaceAutoTest.requests_method.requests_method.RequestsMethod object at 0x00000257902F0490>\ndb_fix = <InterfaceAutoTest.common.db.DB object at 0x00000257903D93D0>, module = '认证接口', interface = '刷新token', title = '正向用例'\nlevel = '中', method = 'get', url = 'http://120.46.172.186:8080/refresh', mime = None, data = None, expect = {'message': '刷新token成功'}\nsql_type = None, sql_sentence = None, update_key = None\n\n @allure.epic(\"BPM系统\")\n @pytest.mark.parametrize(\"module, interface, title, level, method, url, mime, data, expect, sql_type, sql_sentence, update_key\", ReadExcel().get_data())\n def test_bpm(self, req_fix, db_fix, module, interface, title, level, method, url, mime, data, expect, sql_type, sql_sentence, update_key):\n allure.dynamic.feature(module)\n allure.dynamic.story(interface)\n allure.dynamic.title(title)\n allure.dynamic.severity(level)\n \n # 1.1:判断sql语句的类型是否为delete\n if sql_type == \"delete\":\n # 1.2 使用DB类对象,调用delete方法执行删除的sql语句\n db_fix.delete(sql_sentence)\n # # 1.3 使用RequestsMethod类对象调用request_all方法发送请求\n # result = req_fix.request_all(req_method=method, req_url=url, req_mime=mime, case_data=data)\n \n # 2.1 判断sql语句的类型是否为select\n elif sql_type == \"select\":\n # 2.2 使用DB类对象,调用select方法执行查询的sql语句,并接收查询结果\n select_result = db_fix.select(sql_sentence)\n # 2.3 将查询结果更新到用例数据中\n data[update_key] = select_result\n # # 2.3 使用RequestsMethod类对象调用request_all方法发送请求\n # result = req_fix.request_all(req_method=method, req_url=url, req_mime=mime, case_data=data)\n \n # 3.1 判断sql语句的类型是否delete|select或者为select|delete\n elif sql_type == \"delete|select\" or sql_type == \"select|delete\":\n # 3.2 使用DB类对象,调用delete方法执行删除的sql语句\n db_fix.delete(sql_sentence[\"delete\"])\n # 3.3 使用DB类对象,调用select方法执行查询的sql语句,并接收查询结果\n select_result = db_fix.select(sql_sentence[\"select\"])\n # 3.4 将查询结果更新到用例数据中\n data[update_key] = select_result\n # # 3.5 使用RequestsMethod类对象调用request_all方法发送请求\n # result = req_fix.request_all(req_method=method, req_url=url, req_mime=mime, case_data=data)\n #\n # else:\n # result = req_fix.request_all(req_method=method, req_url=url, req_mime=mime, case_data=data)\n \n result = req_fix.request_all(req_method=method, req_url=url, req_mime=mime, case_data=data)\n \n # 断言\n try:\n for key in expect:\n assert expect[key] == result.json().get(key)\n except:\n print(\"断言失败\")\n logging.error(\"断言失败, 模块名称为:{},接口名称为:{},用例标题:{},用例为:{},期望结果为:{},服务器返回数据为:{}\".format(module, interface, title, str(data), str(expect), result.text))\n> raise AssertionError(\"断言失败\")\nE AssertionError: 断言失败\n\ntest_bpm.py:65: AssertionError",
"flaky" : false,
"newFailed" : false,
"beforeStages" : [ {
"name" : "_session_faker",
"time" : {
"start" : 1691399016370,
"stop" : 1691399016483,
"duration" : 113
},
"status" : "passed",
"steps" : [ ],
"attachments" : [ ],
"parameters" : [ ],
"hasContent" : false,
"stepsCount" : 0,
"attachmentsCount" : 0,
"shouldDisplayMessage" : false
}, {
"name" : "req_fix",
"time" : {
"start" : 1691399016483,
"stop" : 1691399016584,
"duration" : 101
},
"status" : "passed",
"steps" : [ ],
"attachments" : [ ],
"parameters" : [ ],
"hasContent" : false,
"stepsCount" : 0,
"attachmentsCount" : 0,
"shouldDisplayMessage" : false
}, {
"name" : "db_fix",
"time" : {
"start" : 1691399016584,
"stop" : 1691399016789,
"duration" : 205
},
"status" : "passed",
"steps" : [ ],
"attachments" : [ ],
"parameters" : [ ],
"hasContent" : false,
"stepsCount" : 0,
"attachmentsCount" : 0,
"shouldDisplayMessage" : false
} ],
"testStage" : {
"status" : "failed",
"statusMessage" : "AssertionError: 断言失败",
"statusTrace" : "self = <InterfaceAutoTest.test_case.test_bpm.TestBPM object at 0x00000257902D2820>\nreq_fix = <InterfaceAutoTest.requests_method.requests_method.RequestsMethod object at 0x00000257902F0490>\ndb_fix = <InterfaceAutoTest.common.db.DB object at 0x00000257903D93D0>, module = '认证接口', interface = '刷新token', title = '正向用例'\nlevel = '中', method = 'get', url = 'http://120.46.172.186:8080/refresh', mime = None, data = None, expect = {'message': '刷新token成功'}\nsql_type = None, sql_sentence = None, update_key = None\n\n @allure.epic(\"BPM系统\")\n @pytest.mark.parametrize(\"module, interface, title, level, method, url, mime, data, expect, sql_type, sql_sentence, update_key\", ReadExcel().get_data())\n def test_bpm(self, req_fix, db_fix, module, interface, title, level, method, url, mime, data, expect, sql_type, sql_sentence, update_key):\n allure.dynamic.feature(module)\n allure.dynamic.story(interface)\n allure.dynamic.title(title)\n allure.dynamic.severity(level)\n \n # 1.1:判断sql语句的类型是否为delete\n if sql_type == \"delete\":\n # 1.2 使用DB类对象,调用delete方法执行删除的sql语句\n db_fix.delete(sql_sentence)\n # # 1.3 使用RequestsMethod类对象调用request_all方法发送请求\n # result = req_fix.request_all(req_method=method, req_url=url, req_mime=mime, case_data=data)\n \n # 2.1 判断sql语句的类型是否为select\n elif sql_type == \"select\":\n # 2.2 使用DB类对象,调用select方法执行查询的sql语句,并接收查询结果\n select_result = db_fix.select(sql_sentence)\n # 2.3 将查询结果更新到用例数据中\n data[update_key] = select_result\n # # 2.3 使用RequestsMethod类对象调用request_all方法发送请求\n # result = req_fix.request_all(req_method=method, req_url=url, req_mime=mime, case_data=data)\n \n # 3.1 判断sql语句的类型是否delete|select或者为select|delete\n elif sql_type == \"delete|select\" or sql_type == \"select|delete\":\n # 3.2 使用DB类对象,调用delete方法执行删除的sql语句\n db_fix.delete(sql_sentence[\"delete\"])\n # 3.3 使用DB类对象,调用select方法执行查询的sql语句,并接收查询结果\n select_result = db_fix.select(sql_sentence[\"select\"])\n # 3.4 将查询结果更新到用例数据中\n data[update_key] = select_result\n # # 3.5 使用RequestsMethod类对象调用request_all方法发送请求\n # result = req_fix.request_all(req_method=method, req_url=url, req_mime=mime, case_data=data)\n #\n # else:\n # result = req_fix.request_all(req_method=method, req_url=url, req_mime=mime, case_data=data)\n \n result = req_fix.request_all(req_method=method, req_url=url, req_mime=mime, case_data=data)\n \n # 断言\n try:\n for key in expect:\n> assert expect[key] == result.json().get(key)\nE AssertionError: assert '刷新token成功' == None\nE + where None = <built-in method get of dict object at 0x0000025790477140>('message')\nE + where <built-in method get of dict object at 0x0000025790477140> = {'account': '', 'loginStatus': True, 'token': 'eyJhbGciOiJIUzUxMiJ9.eyJzdWIiOiJhZG1pbiIsInRlbmFudElkIjoiLTEiLCJleHAiOjE2OTE0ODU0MTgsImlhdCI6MTY5MTM5OTAxOH0.Rb1x9O8uPZcXAfoDbWutU6f3taE2vMl0iRW4WVVwfeKYLS-zF9e0IFTyL2tUDstfMzs0ej7qYnsUg_CXR-qOHg', 'userAttrs': {}, ...}.get\nE + where {'account': '', 'loginStatus': True, 'token': 'eyJhbGciOiJIUzUxMiJ9.eyJzdWIiOiJhZG1pbiIsInRlbmFudElkIjoiLTEiLCJleHAiOjE2OTE0ODU0MTgsImlhdCI6MTY5MTM5OTAxOH0.Rb1x9O8uPZcXAfoDbWutU6f3taE2vMl0iRW4WVVwfeKYLS-zF9e0IFTyL2tUDstfMzs0ej7qYnsUg_CXR-qOHg', 'userAttrs': {}, ...} = <bound method Response.json of <Response [200]>>()\nE + where <bound method Response.json of <Response [200]>> = <Response [200]>.json\n\ntest_bpm.py:61: AssertionError\n\nDuring handling of the above exception, another exception occurred:\n\nself = <InterfaceAutoTest.test_case.test_bpm.TestBPM object at 0x00000257902D2820>\nreq_fix = <InterfaceAutoTest.requests_method.requests_method.RequestsMethod object at 0x00000257902F0490>\ndb_fix = <InterfaceAutoTest.common.db.DB object at 0x00000257903D93D0>, module = '认证接口', interface = '刷新token', title = '正向用例'\nlevel = '中', method = 'get', url = 'http://120.46.172.186:8080/refresh', mime = None, data = None, expect = {'message': '刷新token成功'}\nsql_type = None, sql_sentence = None, update_key = None\n\n @allure.epic(\"BPM系统\")\n @pytest.mark.parametrize(\"module, interface, title, level, method, url, mime, data, expect, sql_type, sql_sentence, update_key\", ReadExcel().get_data())\n def test_bpm(self, req_fix, db_fix, module, interface, title, level, method, url, mime, data, expect, sql_type, sql_sentence, update_key):\n allure.dynamic.feature(module)\n allure.dynamic.story(interface)\n allure.dynamic.title(title)\n allure.dynamic.severity(level)\n \n # 1.1:判断sql语句的类型是否为delete\n if sql_type == \"delete\":\n # 1.2 使用DB类对象,调用delete方法执行删除的sql语句\n db_fix.delete(sql_sentence)\n # # 1.3 使用RequestsMethod类对象调用request_all方法发送请求\n # result = req_fix.request_all(req_method=method, req_url=url, req_mime=mime, case_data=data)\n \n # 2.1 判断sql语句的类型是否为select\n elif sql_type == \"select\":\n # 2.2 使用DB类对象,调用select方法执行查询的sql语句,并接收查询结果\n select_result = db_fix.select(sql_sentence)\n # 2.3 将查询结果更新到用例数据中\n data[update_key] = select_result\n # # 2.3 使用RequestsMethod类对象调用request_all方法发送请求\n # result = req_fix.request_all(req_method=method, req_url=url, req_mime=mime, case_data=data)\n \n # 3.1 判断sql语句的类型是否delete|select或者为select|delete\n elif sql_type == \"delete|select\" or sql_type == \"select|delete\":\n # 3.2 使用DB类对象,调用delete方法执行删除的sql语句\n db_fix.delete(sql_sentence[\"delete\"])\n # 3.3 使用DB类对象,调用select方法执行查询的sql语句,并接收查询结果\n select_result = db_fix.select(sql_sentence[\"select\"])\n # 3.4 将查询结果更新到用例数据中\n data[update_key] = select_result\n # # 3.5 使用RequestsMethod类对象调用request_all方法发送请求\n # result = req_fix.request_all(req_method=method, req_url=url, req_mime=mime, case_data=data)\n #\n # else:\n # result = req_fix.request_all(req_method=method, req_url=url, req_mime=mime, case_data=data)\n \n result = req_fix.request_all(req_method=method, req_url=url, req_mime=mime, case_data=data)\n \n # 断言\n try:\n for key in expect:\n assert expect[key] == result.json().get(key)\n except:\n print(\"断言失败\")\n logging.error(\"断言失败, 模块名称为:{},接口名称为:{},用例标题:{},用例为:{},期望结果为:{},服务器返回数据为:{}\".format(module, interface, title, str(data), str(expect), result.text))\n> raise AssertionError(\"断言失败\")\nE AssertionError: 断言失败\n\ntest_bpm.py:65: AssertionError",
"steps" : [ ],
"attachments" : [ {
"uid" : "a0f1a231ae167dc8",
"name" : "log",
"source" : "a0f1a231ae167dc8.txt",
"type" : "text/plain",
"size" : 1335
}, {
"uid" : "8ed9116c4e293b",
"name" : "stdout",
"source" : "8ed9116c4e293b.txt",
"type" : "text/plain",
"size" : 26
} ],
"parameters" : [ ],
"hasContent" : true,
"stepsCount" : 0,
"attachmentsCount" : 2,
"shouldDisplayMessage" : true
},
"afterStages" : [ {
"name" : "req_fix::0",
"time" : {
"start" : 1691399029988,
"stop" : 1691399029988,
"duration" : 0
},
"status" : "passed",
"steps" : [ ],
"attachments" : [ ],
"parameters" : [ ],
"hasContent" : false,
"stepsCount" : 0,
"attachmentsCount" : 0,
"shouldDisplayMessage" : false
}, {
"name" : "db_fix::0",
"time" : {
"start" : 1691399029987,
"stop" : 1691399029987,
"duration" : 0
},
"status" : "passed",
"steps" : [ ],
"attachments" : [ ],
"parameters" : [ ],
"hasContent" : false,
"stepsCount" : 0,
"attachmentsCount" : 0,
"shouldDisplayMessage" : false
} ],
"labels" : [ {
"name" : "feature",
"value" : "认证接口"
}, {
"name" : "story",
"value" : "刷新token"
}, {
"name" : "severity",
"value" : "中"
}, {
"name" : "epic",
"value" : "BPM系统"
}, {
"name" : "suite",
"value" : "test_bpm"
}, {
"name" : "subSuite",
"value" : "TestBPM"
}, {
"name" : "host",
"value" : "LAPTOP-31V3JBFR"
}, {
"name" : "thread",
"value" : "6412-MainThread"
}, {
"name" : "framework",
"value" : "pytest"
}, {
"name" : "language",
"value" : "cpython3"
}, {
"name" : "package",
"value" : "test_bpm"
}, {
"name" : "resultFormat",
"value" : "allure2"
} ],
"parameters" : [ {
"name" : "data",
"value" : "None"
}, {
"name" : "expect",
"value" : "{'message': '刷新token成功'}"
}, {
"name" : "interface",
"value" : "'刷新token'"
}, {
"name" : "level",
"value" : "'中'"
}, {
"name" : "method",
"value" : "'get'"
}, {
"name" : "mime",
"value" : "None"
}, {
"name" : "module",
"value" : "'认证接口'"
}, {
"name" : "sql_sentence",
"value" : "None"
}, {
"name" : "sql_type",
"value" : "None"
}, {
"name" : "title",
"value" : "'正向用例'"
}, {
"name" : "update_key",
"value" : "None"
}, {
"name" : "url",
"value" : "'http://120.46.172.186:8080/refresh'"
} ],
"links" : [ ],
"hidden" : true,
"retry" : true,
"extra" : {
"categories" : [ ],
"tags" : [ ]
},
"source" : "7e6a0a296e38c785.json",
"parameterValues" : [ "None", "{'message': '刷新token成功'}", "'刷新token'", "'中'", "'get'", "None", "'认证接口'", "None", "None", "'正向用例'", "None", "'http://120.46.172.186:8080/refresh'" ]
}
\ No newline at end of file
{
"uid" : "7eb13a5ad0c76789",
"name" : "正向用例",
"fullName" : "test_bpm.TestBPM#test_bpm",
"historyId" : "f37f5b35a33b0d851ad30e5c966f4068",
"time" : {
"start" : 1691399025190,
"stop" : 1691399025285,
"duration" : 95
},
"status" : "failed",
"statusMessage" : "AssertionError: 断言失败",
"statusTrace" : "self = <InterfaceAutoTest.test_case.test_bpm.TestBPM object at 0x00000257902F01C0>\nreq_fix = <InterfaceAutoTest.requests_method.requests_method.RequestsMethod object at 0x00000257902F0490>\ndb_fix = <InterfaceAutoTest.common.db.DB object at 0x00000257903D93D0>, module = '维度管理', interface = '根据维度编码删除维度', title = '正向用例'\nlevel = '高', method = 'DELETE', url = 'http://120.46.172.186:8080/api/demension/v1/dem/deleteDemByIds', mime = 'query'\ndata = {'ids': '1688475997541777408'}, expect = {'message': '删除维度成功', 'state': True}, sql_type = 'select'\nsql_sentence = 'SELECT ID_ FROM uc_demension WHERE `CODE_`=\"test56_dem\";', update_key = 'ids'\n\n @allure.epic(\"BPM系统\")\n @pytest.mark.parametrize(\"module, interface, title, level, method, url, mime, data, expect, sql_type, sql_sentence, update_key\", ReadExcel().get_data())\n def test_bpm(self, req_fix, db_fix, module, interface, title, level, method, url, mime, data, expect, sql_type, sql_sentence, update_key):\n allure.dynamic.feature(module)\n allure.dynamic.story(interface)\n allure.dynamic.title(title)\n allure.dynamic.severity(level)\n \n # 1.1:判断sql语句的类型是否为delete\n if sql_type == \"delete\":\n # 1.2 使用DB类对象,调用delete方法执行删除的sql语句\n db_fix.delete(sql_sentence)\n # # 1.3 使用RequestsMethod类对象调用request_all方法发送请求\n # result = req_fix.request_all(req_method=method, req_url=url, req_mime=mime, case_data=data)\n \n # 2.1 判断sql语句的类型是否为select\n elif sql_type == \"select\":\n # 2.2 使用DB类对象,调用select方法执行查询的sql语句,并接收查询结果\n select_result = db_fix.select(sql_sentence)\n # 2.3 将查询结果更新到用例数据中\n data[update_key] = select_result\n # # 2.3 使用RequestsMethod类对象调用request_all方法发送请求\n # result = req_fix.request_all(req_method=method, req_url=url, req_mime=mime, case_data=data)\n \n # 3.1 判断sql语句的类型是否delete|select或者为select|delete\n elif sql_type == \"delete|select\" or sql_type == \"select|delete\":\n # 3.2 使用DB类对象,调用delete方法执行删除的sql语句\n db_fix.delete(sql_sentence[\"delete\"])\n # 3.3 使用DB类对象,调用select方法执行查询的sql语句,并接收查询结果\n select_result = db_fix.select(sql_sentence[\"select\"])\n # 3.4 将查询结果更新到用例数据中\n data[update_key] = select_result\n # # 3.5 使用RequestsMethod类对象调用request_all方法发送请求\n # result = req_fix.request_all(req_method=method, req_url=url, req_mime=mime, case_data=data)\n #\n # else:\n # result = req_fix.request_all(req_method=method, req_url=url, req_mime=mime, case_data=data)\n \n result = req_fix.request_all(req_method=method, req_url=url, req_mime=mime, case_data=data)\n \n # 断言\n try:\n for key in expect:\n> assert expect[key] == result.json().get(key)\nE AssertionError: assert True == False\nE + where False = <built-in method get of dict object at 0x00000257902C1A40>('state')\nE + where <built-in method get of dict object at 0x00000257902C1A40> = {'logId': '1688476004198137856', 'message': '', 'state': False}.get\nE + where {'logId': '1688476004198137856', 'message': '', 'state': False} = <bound method Response.json of <Response [500]>>()\nE + where <bound method Response.json of <Response [500]>> = <Response [500]>.json\n\ntest_bpm.py:61: AssertionError\n\nDuring handling of the above exception, another exception occurred:\n\nself = <InterfaceAutoTest.test_case.test_bpm.TestBPM object at 0x00000257902F01C0>\nreq_fix = <InterfaceAutoTest.requests_method.requests_method.RequestsMethod object at 0x00000257902F0490>\ndb_fix = <InterfaceAutoTest.common.db.DB object at 0x00000257903D93D0>, module = '维度管理', interface = '根据维度编码删除维度', title = '正向用例'\nlevel = '高', method = 'DELETE', url = 'http://120.46.172.186:8080/api/demension/v1/dem/deleteDemByIds', mime = 'query'\ndata = {'ids': '1688475997541777408'}, expect = {'message': '删除维度成功', 'state': True}, sql_type = 'select'\nsql_sentence = 'SELECT ID_ FROM uc_demension WHERE `CODE_`=\"test56_dem\";', update_key = 'ids'\n\n @allure.epic(\"BPM系统\")\n @pytest.mark.parametrize(\"module, interface, title, level, method, url, mime, data, expect, sql_type, sql_sentence, update_key\", ReadExcel().get_data())\n def test_bpm(self, req_fix, db_fix, module, interface, title, level, method, url, mime, data, expect, sql_type, sql_sentence, update_key):\n allure.dynamic.feature(module)\n allure.dynamic.story(interface)\n allure.dynamic.title(title)\n allure.dynamic.severity(level)\n \n # 1.1:判断sql语句的类型是否为delete\n if sql_type == \"delete\":\n # 1.2 使用DB类对象,调用delete方法执行删除的sql语句\n db_fix.delete(sql_sentence)\n # # 1.3 使用RequestsMethod类对象调用request_all方法发送请求\n # result = req_fix.request_all(req_method=method, req_url=url, req_mime=mime, case_data=data)\n \n # 2.1 判断sql语句的类型是否为select\n elif sql_type == \"select\":\n # 2.2 使用DB类对象,调用select方法执行查询的sql语句,并接收查询结果\n select_result = db_fix.select(sql_sentence)\n # 2.3 将查询结果更新到用例数据中\n data[update_key] = select_result\n # # 2.3 使用RequestsMethod类对象调用request_all方法发送请求\n # result = req_fix.request_all(req_method=method, req_url=url, req_mime=mime, case_data=data)\n \n # 3.1 判断sql语句的类型是否delete|select或者为select|delete\n elif sql_type == \"delete|select\" or sql_type == \"select|delete\":\n # 3.2 使用DB类对象,调用delete方法执行删除的sql语句\n db_fix.delete(sql_sentence[\"delete\"])\n # 3.3 使用DB类对象,调用select方法执行查询的sql语句,并接收查询结果\n select_result = db_fix.select(sql_sentence[\"select\"])\n # 3.4 将查询结果更新到用例数据中\n data[update_key] = select_result\n # # 3.5 使用RequestsMethod类对象调用request_all方法发送请求\n # result = req_fix.request_all(req_method=method, req_url=url, req_mime=mime, case_data=data)\n #\n # else:\n # result = req_fix.request_all(req_method=method, req_url=url, req_mime=mime, case_data=data)\n \n result = req_fix.request_all(req_method=method, req_url=url, req_mime=mime, case_data=data)\n \n # 断言\n try:\n for key in expect:\n assert expect[key] == result.json().get(key)\n except:\n print(\"断言失败\")\n logging.error(\"断言失败, 模块名称为:{},接口名称为:{},用例标题:{},用例为:{},期望结果为:{},服务器返回数据为:{}\".format(module, interface, title, str(data), str(expect), result.text))\n> raise AssertionError(\"断言失败\")\nE AssertionError: 断言失败\n\ntest_bpm.py:65: AssertionError",
"flaky" : false,
"newFailed" : false,
"beforeStages" : [ {
"name" : "_session_faker",
"time" : {
"start" : 1691399016370,
"stop" : 1691399016483,
"duration" : 113
},
"status" : "passed",
"steps" : [ ],
"attachments" : [ ],
"parameters" : [ ],
"hasContent" : false,
"stepsCount" : 0,
"attachmentsCount" : 0,
"shouldDisplayMessage" : false
}, {
"name" : "req_fix",
"time" : {
"start" : 1691399016483,
"stop" : 1691399016584,
"duration" : 101
},
"status" : "passed",
"steps" : [ ],
"attachments" : [ ],
"parameters" : [ ],
"hasContent" : false,
"stepsCount" : 0,
"attachmentsCount" : 0,
"shouldDisplayMessage" : false
}, {
"name" : "db_fix",
"time" : {
"start" : 1691399016584,
"stop" : 1691399016789,
"duration" : 205
},
"status" : "passed",
"steps" : [ ],
"attachments" : [ ],
"parameters" : [ ],
"hasContent" : false,
"stepsCount" : 0,
"attachmentsCount" : 0,
"shouldDisplayMessage" : false
} ],
"testStage" : {
"status" : "failed",
"statusMessage" : "AssertionError: 断言失败",
"statusTrace" : "self = <InterfaceAutoTest.test_case.test_bpm.TestBPM object at 0x00000257902F01C0>\nreq_fix = <InterfaceAutoTest.requests_method.requests_method.RequestsMethod object at 0x00000257902F0490>\ndb_fix = <InterfaceAutoTest.common.db.DB object at 0x00000257903D93D0>, module = '维度管理', interface = '根据维度编码删除维度', title = '正向用例'\nlevel = '高', method = 'DELETE', url = 'http://120.46.172.186:8080/api/demension/v1/dem/deleteDemByIds', mime = 'query'\ndata = {'ids': '1688475997541777408'}, expect = {'message': '删除维度成功', 'state': True}, sql_type = 'select'\nsql_sentence = 'SELECT ID_ FROM uc_demension WHERE `CODE_`=\"test56_dem\";', update_key = 'ids'\n\n @allure.epic(\"BPM系统\")\n @pytest.mark.parametrize(\"module, interface, title, level, method, url, mime, data, expect, sql_type, sql_sentence, update_key\", ReadExcel().get_data())\n def test_bpm(self, req_fix, db_fix, module, interface, title, level, method, url, mime, data, expect, sql_type, sql_sentence, update_key):\n allure.dynamic.feature(module)\n allure.dynamic.story(interface)\n allure.dynamic.title(title)\n allure.dynamic.severity(level)\n \n # 1.1:判断sql语句的类型是否为delete\n if sql_type == \"delete\":\n # 1.2 使用DB类对象,调用delete方法执行删除的sql语句\n db_fix.delete(sql_sentence)\n # # 1.3 使用RequestsMethod类对象调用request_all方法发送请求\n # result = req_fix.request_all(req_method=method, req_url=url, req_mime=mime, case_data=data)\n \n # 2.1 判断sql语句的类型是否为select\n elif sql_type == \"select\":\n # 2.2 使用DB类对象,调用select方法执行查询的sql语句,并接收查询结果\n select_result = db_fix.select(sql_sentence)\n # 2.3 将查询结果更新到用例数据中\n data[update_key] = select_result\n # # 2.3 使用RequestsMethod类对象调用request_all方法发送请求\n # result = req_fix.request_all(req_method=method, req_url=url, req_mime=mime, case_data=data)\n \n # 3.1 判断sql语句的类型是否delete|select或者为select|delete\n elif sql_type == \"delete|select\" or sql_type == \"select|delete\":\n # 3.2 使用DB类对象,调用delete方法执行删除的sql语句\n db_fix.delete(sql_sentence[\"delete\"])\n # 3.3 使用DB类对象,调用select方法执行查询的sql语句,并接收查询结果\n select_result = db_fix.select(sql_sentence[\"select\"])\n # 3.4 将查询结果更新到用例数据中\n data[update_key] = select_result\n # # 3.5 使用RequestsMethod类对象调用request_all方法发送请求\n # result = req_fix.request_all(req_method=method, req_url=url, req_mime=mime, case_data=data)\n #\n # else:\n # result = req_fix.request_all(req_method=method, req_url=url, req_mime=mime, case_data=data)\n \n result = req_fix.request_all(req_method=method, req_url=url, req_mime=mime, case_data=data)\n \n # 断言\n try:\n for key in expect:\n> assert expect[key] == result.json().get(key)\nE AssertionError: assert True == False\nE + where False = <built-in method get of dict object at 0x00000257902C1A40>('state')\nE + where <built-in method get of dict object at 0x00000257902C1A40> = {'logId': '1688476004198137856', 'message': '', 'state': False}.get\nE + where {'logId': '1688476004198137856', 'message': '', 'state': False} = <bound method Response.json of <Response [500]>>()\nE + where <bound method Response.json of <Response [500]>> = <Response [500]>.json\n\ntest_bpm.py:61: AssertionError\n\nDuring handling of the above exception, another exception occurred:\n\nself = <InterfaceAutoTest.test_case.test_bpm.TestBPM object at 0x00000257902F01C0>\nreq_fix = <InterfaceAutoTest.requests_method.requests_method.RequestsMethod object at 0x00000257902F0490>\ndb_fix = <InterfaceAutoTest.common.db.DB object at 0x00000257903D93D0>, module = '维度管理', interface = '根据维度编码删除维度', title = '正向用例'\nlevel = '高', method = 'DELETE', url = 'http://120.46.172.186:8080/api/demension/v1/dem/deleteDemByIds', mime = 'query'\ndata = {'ids': '1688475997541777408'}, expect = {'message': '删除维度成功', 'state': True}, sql_type = 'select'\nsql_sentence = 'SELECT ID_ FROM uc_demension WHERE `CODE_`=\"test56_dem\";', update_key = 'ids'\n\n @allure.epic(\"BPM系统\")\n @pytest.mark.parametrize(\"module, interface, title, level, method, url, mime, data, expect, sql_type, sql_sentence, update_key\", ReadExcel().get_data())\n def test_bpm(self, req_fix, db_fix, module, interface, title, level, method, url, mime, data, expect, sql_type, sql_sentence, update_key):\n allure.dynamic.feature(module)\n allure.dynamic.story(interface)\n allure.dynamic.title(title)\n allure.dynamic.severity(level)\n \n # 1.1:判断sql语句的类型是否为delete\n if sql_type == \"delete\":\n # 1.2 使用DB类对象,调用delete方法执行删除的sql语句\n db_fix.delete(sql_sentence)\n # # 1.3 使用RequestsMethod类对象调用request_all方法发送请求\n # result = req_fix.request_all(req_method=method, req_url=url, req_mime=mime, case_data=data)\n \n # 2.1 判断sql语句的类型是否为select\n elif sql_type == \"select\":\n # 2.2 使用DB类对象,调用select方法执行查询的sql语句,并接收查询结果\n select_result = db_fix.select(sql_sentence)\n # 2.3 将查询结果更新到用例数据中\n data[update_key] = select_result\n # # 2.3 使用RequestsMethod类对象调用request_all方法发送请求\n # result = req_fix.request_all(req_method=method, req_url=url, req_mime=mime, case_data=data)\n \n # 3.1 判断sql语句的类型是否delete|select或者为select|delete\n elif sql_type == \"delete|select\" or sql_type == \"select|delete\":\n # 3.2 使用DB类对象,调用delete方法执行删除的sql语句\n db_fix.delete(sql_sentence[\"delete\"])\n # 3.3 使用DB类对象,调用select方法执行查询的sql语句,并接收查询结果\n select_result = db_fix.select(sql_sentence[\"select\"])\n # 3.4 将查询结果更新到用例数据中\n data[update_key] = select_result\n # # 3.5 使用RequestsMethod类对象调用request_all方法发送请求\n # result = req_fix.request_all(req_method=method, req_url=url, req_mime=mime, case_data=data)\n #\n # else:\n # result = req_fix.request_all(req_method=method, req_url=url, req_mime=mime, case_data=data)\n \n result = req_fix.request_all(req_method=method, req_url=url, req_mime=mime, case_data=data)\n \n # 断言\n try:\n for key in expect:\n assert expect[key] == result.json().get(key)\n except:\n print(\"断言失败\")\n logging.error(\"断言失败, 模块名称为:{},接口名称为:{},用例标题:{},用例为:{},期望结果为:{},服务器返回数据为:{}\".format(module, interface, title, str(data), str(expect), result.text))\n> raise AssertionError(\"断言失败\")\nE AssertionError: 断言失败\n\ntest_bpm.py:65: AssertionError",
"steps" : [ ],
"attachments" : [ {
"uid" : "31e6ca33ce058e3b",
"name" : "log",
"source" : "31e6ca33ce058e3b.txt",
"type" : "text/plain",
"size" : 1042
}, {
"uid" : "4b48474c80935c2",
"name" : "stdout",
"source" : "4b48474c80935c2.txt",
"type" : "text/plain",
"size" : 26
} ],
"parameters" : [ ],
"hasContent" : true,
"stepsCount" : 0,
"attachmentsCount" : 2,
"shouldDisplayMessage" : true
},
"afterStages" : [ {
"name" : "req_fix::0",
"time" : {
"start" : 1691399029988,
"stop" : 1691399029988,
"duration" : 0
},
"status" : "passed",
"steps" : [ ],
"attachments" : [ ],
"parameters" : [ ],
"hasContent" : false,
"stepsCount" : 0,
"attachmentsCount" : 0,
"shouldDisplayMessage" : false
}, {
"name" : "db_fix::0",
"time" : {
"start" : 1691399029987,
"stop" : 1691399029987,
"duration" : 0
},
"status" : "passed",
"steps" : [ ],
"attachments" : [ ],
"parameters" : [ ],
"hasContent" : false,
"stepsCount" : 0,
"attachmentsCount" : 0,
"shouldDisplayMessage" : false
} ],
"labels" : [ {
"name" : "feature",
"value" : "维度管理"
}, {
"name" : "story",
"value" : "根据维度编码删除维度"
}, {
"name" : "severity",
"value" : "高"
}, {
"name" : "epic",
"value" : "BPM系统"
}, {
"name" : "suite",
"value" : "test_bpm"
}, {
"name" : "subSuite",
"value" : "TestBPM"
}, {
"name" : "host",
"value" : "LAPTOP-31V3JBFR"
}, {
"name" : "thread",
"value" : "6412-MainThread"
}, {
"name" : "framework",
"value" : "pytest"
}, {
"name" : "language",
"value" : "cpython3"
}, {
"name" : "package",
"value" : "test_bpm"
}, {
"name" : "resultFormat",
"value" : "allure2"
} ],
"parameters" : [ {
"name" : "data",
"value" : "{'ids': '1688475997541777408'}"
}, {
"name" : "expect",
"value" : "{'state': True, 'message': '删除维度成功'}"
}, {
"name" : "interface",
"value" : "'根据维度编码删除维度'"
}, {
"name" : "level",
"value" : "'高'"
}, {
"name" : "method",
"value" : "'DELETE'"
}, {
"name" : "mime",
"value" : "'query'"
}, {
"name" : "module",
"value" : "'维度管理'"
}, {
"name" : "sql_sentence",
"value" : "'SELECT ID_ FROM uc_demension WHERE `CODE_`=\"test56_dem\";'"
}, {
"name" : "sql_type",
"value" : "'select'"
}, {
"name" : "title",
"value" : "'正向用例'"
}, {
"name" : "update_key",
"value" : "'ids'"
}, {
"name" : "url",
"value" : "'http://120.46.172.186:8080/api/demension/v1/dem/deleteDemByIds'"
} ],
"links" : [ ],
"hidden" : true,
"retry" : true,
"extra" : {
"categories" : [ ],
"tags" : [ ]
},
"source" : "7eb13a5ad0c76789.json",
"parameterValues" : [ "{'ids': '1688475997541777408'}", "{'state': True, 'message': '删除维度成功'}", "'根据维度编码删除维度'", "'高'", "'DELETE'", "'query'", "'维度管理'", "'SELECT ID_ FROM uc_demension WHERE `CODE_`=\"test56_dem\";'", "'select'", "'正向用例'", "'ids'", "'http://120.46.172.186:8080/api/demension/v1/dem/deleteDemByIds'" ]
}
\ No newline at end of file
{
"uid" : "876f7a309f93bdd4",
"name" : "反向用例-用户名过短",
"fullName" : "test_bpm.TestBPM#test_bpm",
"historyId" : "a630861595e4d5075fdcba67048830da",
"time" : {
"start" : 1691399017044,
"stop" : 1691399017142,
"duration" : 98
},
"status" : "passed",
"flaky" : false,
"newFailed" : false,
"beforeStages" : [ {
"name" : "_session_faker",
"time" : {
"start" : 1691399016370,
"stop" : 1691399016483,
"duration" : 113
},
"status" : "passed",
"steps" : [ ],
"attachments" : [ ],
"parameters" : [ ],
"hasContent" : false,
"stepsCount" : 0,
"attachmentsCount" : 0,
"shouldDisplayMessage" : false
}, {
"name" : "req_fix",
"time" : {
"start" : 1691399016483,
"stop" : 1691399016584,
"duration" : 101
},
"status" : "passed",
"steps" : [ ],
"attachments" : [ ],
"parameters" : [ ],
"hasContent" : false,
"stepsCount" : 0,
"attachmentsCount" : 0,
"shouldDisplayMessage" : false
}, {
"name" : "db_fix",
"time" : {
"start" : 1691399016584,
"stop" : 1691399016789,
"duration" : 205
},
"status" : "passed",
"steps" : [ ],
"attachments" : [ ],
"parameters" : [ ],
"hasContent" : false,
"stepsCount" : 0,
"attachmentsCount" : 0,
"shouldDisplayMessage" : false
} ],
"testStage" : {
"status" : "passed",
"steps" : [ ],
"attachments" : [ {
"uid" : "5aa156bf13fa38a4",
"name" : "log",
"source" : "5aa156bf13fa38a4.txt",
"type" : "text/plain",
"size" : 176
}, {
"uid" : "b4df5c907707945a",
"name" : "stdout",
"source" : "b4df5c907707945a.txt",
"type" : "text/plain",
"size" : 13
} ],
"parameters" : [ ],
"hasContent" : true,
"stepsCount" : 0,
"attachmentsCount" : 2,
"shouldDisplayMessage" : false
},
"afterStages" : [ {
"name" : "req_fix::0",
"time" : {
"start" : 1691399029988,
"stop" : 1691399029988,
"duration" : 0
},
"status" : "passed",
"steps" : [ ],
"attachments" : [ ],
"parameters" : [ ],
"hasContent" : false,
"stepsCount" : 0,
"attachmentsCount" : 0,
"shouldDisplayMessage" : false
}, {
"name" : "db_fix::0",
"time" : {
"start" : 1691399029987,
"stop" : 1691399029987,
"duration" : 0
},
"status" : "passed",
"steps" : [ ],
"attachments" : [ ],
"parameters" : [ ],
"hasContent" : false,
"stepsCount" : 0,
"attachmentsCount" : 0,
"shouldDisplayMessage" : false
} ],
"labels" : [ {
"name" : "feature",
"value" : "认证接口"
}, {
"name" : "story",
"value" : "登录系统"
}, {
"name" : "severity",
"value" : "中"
}, {
"name" : "epic",
"value" : "BPM系统"
}, {
"name" : "suite",
"value" : "test_bpm"
}, {
"name" : "subSuite",
"value" : "TestBPM"
}, {
"name" : "host",
"value" : "LAPTOP-31V3JBFR"
}, {
"name" : "thread",
"value" : "6412-MainThread"
}, {
"name" : "framework",
"value" : "pytest"
}, {
"name" : "language",
"value" : "cpython3"
}, {
"name" : "package",
"value" : "test_bpm"
}, {
"name" : "resultFormat",
"value" : "allure2"
} ],
"parameters" : [ {
"name" : "data",
"value" : "{'password': 'MTIzNDU2', 'username': 'a'}"
}, {
"name" : "expect",
"value" : "{'state': False, 'message': '账号或密码错误'}"
}, {
"name" : "interface",
"value" : "'登录系统'"
}, {
"name" : "level",
"value" : "'中'"
}, {
"name" : "method",
"value" : "'POST'"
}, {
"name" : "mime",
"value" : "'application/json'"
}, {
"name" : "module",
"value" : "'认证接口'"
}, {
"name" : "sql_sentence",
"value" : "None"
}, {
"name" : "sql_type",
"value" : "None"
}, {
"name" : "title",
"value" : "'反向用例-用户名过短'"
}, {
"name" : "update_key",
"value" : "None"
}, {
"name" : "url",
"value" : "'http://120.46.172.186:8080/auth'"
} ],
"links" : [ ],
"hidden" : false,
"retry" : false,
"extra" : {
"severity" : "normal",
"retries" : [ ],
"categories" : [ ],
"tags" : [ ]
},
"source" : "876f7a309f93bdd4.json",
"parameterValues" : [ "{'password': 'MTIzNDU2', 'username': 'a'}", "{'state': False, 'message': '账号或密码错误'}", "'登录系统'", "'中'", "'POST'", "'application/json'", "'认证接口'", "None", "None", "'反向用例-用户名过短'", "None", "'http://120.46.172.186:8080/auth'" ]
}
\ No newline at end of file
{
"uid" : "9262c97d3be172ea",
"name" : "反向用例-密码为空",
"fullName" : "test_bpm.TestBPM#test_bpm",
"historyId" : "89cd3935e143f1777c5d98d06870bd50",
"time" : {
"start" : 1691399017375,
"stop" : 1691399017467,
"duration" : 92
},
"status" : "passed",
"flaky" : false,
"newFailed" : false,
"beforeStages" : [ {
"name" : "_session_faker",
"time" : {
"start" : 1691399016370,
"stop" : 1691399016483,
"duration" : 113
},
"status" : "passed",
"steps" : [ ],
"attachments" : [ ],
"parameters" : [ ],
"hasContent" : false,
"stepsCount" : 0,
"attachmentsCount" : 0,
"shouldDisplayMessage" : false
}, {
"name" : "req_fix",
"time" : {
"start" : 1691399016483,
"stop" : 1691399016584,
"duration" : 101
},
"status" : "passed",
"steps" : [ ],
"attachments" : [ ],
"parameters" : [ ],
"hasContent" : false,
"stepsCount" : 0,
"attachmentsCount" : 0,
"shouldDisplayMessage" : false
}, {
"name" : "db_fix",
"time" : {
"start" : 1691399016584,
"stop" : 1691399016789,
"duration" : 205
},
"status" : "passed",
"steps" : [ ],
"attachments" : [ ],
"parameters" : [ ],
"hasContent" : false,
"stepsCount" : 0,
"attachmentsCount" : 0,
"shouldDisplayMessage" : false
} ],
"testStage" : {
"status" : "passed",
"steps" : [ ],
"attachments" : [ {
"uid" : "1e3aad5e7cf22134",
"name" : "log",
"source" : "1e3aad5e7cf22134.txt",
"type" : "text/plain",
"size" : 176
}, {
"uid" : "3df4293823f51504",
"name" : "stdout",
"source" : "3df4293823f51504.txt",
"type" : "text/plain",
"size" : 13
} ],
"parameters" : [ ],
"hasContent" : true,
"stepsCount" : 0,
"attachmentsCount" : 2,
"shouldDisplayMessage" : false
},
"afterStages" : [ {
"name" : "req_fix::0",
"time" : {
"start" : 1691399029988,
"stop" : 1691399029988,
"duration" : 0
},
"status" : "passed",
"steps" : [ ],
"attachments" : [ ],
"parameters" : [ ],
"hasContent" : false,
"stepsCount" : 0,
"attachmentsCount" : 0,
"shouldDisplayMessage" : false
}, {
"name" : "db_fix::0",
"time" : {
"start" : 1691399029987,
"stop" : 1691399029987,
"duration" : 0
},
"status" : "passed",
"steps" : [ ],
"attachments" : [ ],
"parameters" : [ ],
"hasContent" : false,
"stepsCount" : 0,
"attachmentsCount" : 0,
"shouldDisplayMessage" : false
} ],
"labels" : [ {
"name" : "feature",
"value" : "认证接口"
}, {
"name" : "story",
"value" : "登录系统"
}, {
"name" : "severity",
"value" : "中"
}, {
"name" : "epic",
"value" : "BPM系统"
}, {
"name" : "suite",
"value" : "test_bpm"
}, {
"name" : "subSuite",
"value" : "TestBPM"
}, {
"name" : "host",
"value" : "LAPTOP-31V3JBFR"
}, {
"name" : "thread",
"value" : "6412-MainThread"
}, {
"name" : "framework",
"value" : "pytest"
}, {
"name" : "language",
"value" : "cpython3"
}, {
"name" : "package",
"value" : "test_bpm"
}, {
"name" : "resultFormat",
"value" : "allure2"
} ],
"parameters" : [ {
"name" : "data",
"value" : "{'password': '', 'username': 'admin'}"
}, {
"name" : "expect",
"value" : "{'state': False, 'message': '账号或密码错误'}"
}, {
"name" : "interface",
"value" : "'登录系统'"
}, {
"name" : "level",
"value" : "'中'"
}, {
"name" : "method",
"value" : "'POST'"
}, {
"name" : "mime",
"value" : "'application/json'"
}, {
"name" : "module",
"value" : "'认证接口'"
}, {
"name" : "sql_sentence",
"value" : "None"
}, {
"name" : "sql_type",
"value" : "None"
}, {
"name" : "title",
"value" : "'反向用例-密码为空'"
}, {
"name" : "update_key",
"value" : "None"
}, {
"name" : "url",
"value" : "'http://120.46.172.186:8080/auth'"
} ],
"links" : [ ],
"hidden" : false,
"retry" : false,
"extra" : {
"severity" : "normal",
"retries" : [ ],
"categories" : [ ],
"tags" : [ ]
},
"source" : "9262c97d3be172ea.json",
"parameterValues" : [ "{'password': '', 'username': 'admin'}", "{'state': False, 'message': '账号或密码错误'}", "'登录系统'", "'中'", "'POST'", "'application/json'", "'认证接口'", "None", "None", "'反向用例-密码为空'", "None", "'http://120.46.172.186:8080/auth'" ]
}
\ No newline at end of file
{
"uid" : "995aa7bfe2ad2c36",
"name" : "正向用例",
"fullName" : "test_bpm.TestBPM#test_bpm",
"historyId" : "c565057f2ed8e19b5ad50c11894312ab",
"time" : {
"start" : 1691399023717,
"stop" : 1691399023898,
"duration" : 181
},
"status" : "passed",
"flaky" : false,
"newFailed" : false,
"beforeStages" : [ {
"name" : "_session_faker",
"time" : {
"start" : 1691399016370,
"stop" : 1691399016483,
"duration" : 113
},
"status" : "passed",
"steps" : [ ],
"attachments" : [ ],
"parameters" : [ ],
"hasContent" : false,
"stepsCount" : 0,
"attachmentsCount" : 0,
"shouldDisplayMessage" : false
}, {
"name" : "req_fix",
"time" : {
"start" : 1691399016483,
"stop" : 1691399016584,
"duration" : 101
},
"status" : "passed",
"steps" : [ ],
"attachments" : [ ],
"parameters" : [ ],
"hasContent" : false,
"stepsCount" : 0,
"attachmentsCount" : 0,
"shouldDisplayMessage" : false
}, {
"name" : "db_fix",
"time" : {
"start" : 1691399016584,
"stop" : 1691399016789,
"duration" : 205
},
"status" : "passed",
"steps" : [ ],
"attachments" : [ ],
"parameters" : [ ],
"hasContent" : false,
"stepsCount" : 0,
"attachmentsCount" : 0,
"shouldDisplayMessage" : false
} ],
"testStage" : {
"status" : "passed",
"steps" : [ ],
"attachments" : [ {
"uid" : "9d092d014f073dd",
"name" : "log",
"source" : "9d092d014f073dd.txt",
"type" : "text/plain",
"size" : 111
}, {
"uid" : "399d14673dae65d6",
"name" : "stdout",
"source" : "399d14673dae65d6.txt",
"type" : "text/plain",
"size" : 13
} ],
"parameters" : [ ],
"hasContent" : true,
"stepsCount" : 0,
"attachmentsCount" : 2,
"shouldDisplayMessage" : false
},
"afterStages" : [ {
"name" : "req_fix::0",
"time" : {
"start" : 1691399029988,
"stop" : 1691399029988,
"duration" : 0
},
"status" : "passed",
"steps" : [ ],
"attachments" : [ ],
"parameters" : [ ],
"hasContent" : false,
"stepsCount" : 0,
"attachmentsCount" : 0,
"shouldDisplayMessage" : false
}, {
"name" : "db_fix::0",
"time" : {
"start" : 1691399029987,
"stop" : 1691399029987,
"duration" : 0
},
"status" : "passed",
"steps" : [ ],
"attachments" : [ ],
"parameters" : [ ],
"hasContent" : false,
"stepsCount" : 0,
"attachmentsCount" : 0,
"shouldDisplayMessage" : false
} ],
"labels" : [ {
"name" : "feature",
"value" : "组织管理"
}, {
"name" : "story",
"value" : "添加组织"
}, {
"name" : "severity",
"value" : "高"
}, {
"name" : "epic",
"value" : "BPM系统"
}, {
"name" : "suite",
"value" : "test_bpm"
}, {
"name" : "subSuite",
"value" : "TestBPM"
}, {
"name" : "host",
"value" : "LAPTOP-31V3JBFR"
}, {
"name" : "thread",
"value" : "6412-MainThread"
}, {
"name" : "framework",
"value" : "pytest"
}, {
"name" : "language",
"value" : "cpython3"
}, {
"name" : "package",
"value" : "test_bpm"
}, {
"name" : "resultFormat",
"value" : "allure2"
} ],
"parameters" : [ {
"name" : "data",
"value" : "{'code': 'test56_org', 'demId': '不知道', 'exceedLimitNum': 0, 'grade': '', 'limitNum': 0, 'name': '测试的组织', 'nowNum': 0, 'orderNo': 0, 'parentId': '0'}"
}, {
"name" : "expect",
"value" : "{'state': True, 'message': '添加组织成功!'}"
}, {
"name" : "interface",
"value" : "'添加组织'"
}, {
"name" : "level",
"value" : "'高'"
}, {
"name" : "method",
"value" : "'post'"
}, {
"name" : "mime",
"value" : "'application/json'"
}, {
"name" : "module",
"value" : "'组织管理'"
}, {
"name" : "sql_sentence",
"value" : "{'select': 'SELECT ID_ FROM uc_demension WHERE `CODE_`=\"test56_dem\";', 'delete': 'DELETE FROM uc_org WHERE `CODE_`=\"test56_org\";'}"
}, {
"name" : "sql_type",
"value" : "'delete|select'"
}, {
"name" : "title",
"value" : "'正向用例'"
}, {
"name" : "update_key",
"value" : "'demId'"
}, {
"name" : "url",
"value" : "'http://120.46.172.186:8080/api/org/v1/org/addOrg'"
} ],
"links" : [ ],
"hidden" : false,
"retry" : false,
"extra" : {
"severity" : "normal",
"retries" : [ ],
"categories" : [ ],
"tags" : [ ]
},
"source" : "995aa7bfe2ad2c36.json",
"parameterValues" : [ "{'code': 'test56_org', 'demId': '不知道', 'exceedLimitNum': 0, 'grade': '', 'limitNum': 0, 'name': '测试的组织', 'nowNum': 0, 'orderNo': 0, 'parentId': '0'}", "{'state': True, 'message': '添加组织成功!'}", "'添加组织'", "'高'", "'post'", "'application/json'", "'组织管理'", "{'select': 'SELECT ID_ FROM uc_demension WHERE `CODE_`=\"test56_dem\";', 'delete': 'DELETE FROM uc_org WHERE `CODE_`=\"test56_org\";'}", "'delete|select'", "'正向用例'", "'demId'", "'http://120.46.172.186:8080/api/org/v1/org/addOrg'" ]
}
\ No newline at end of file
{
"uid" : "9fdbdff7fbc9aba9",
"name" : "正向用例",
"fullName" : "test_bpm.TestBPM#test_bpm",
"historyId" : "036385e6c5707e95e98d58f17aa52abc",
"time" : {
"start" : 1691399023993,
"stop" : 1691399024052,
"duration" : 59
},
"status" : "passed",
"flaky" : false,
"newFailed" : false,
"beforeStages" : [ {
"name" : "_session_faker",
"time" : {
"start" : 1691399016370,
"stop" : 1691399016483,
"duration" : 113
},
"status" : "passed",
"steps" : [ ],
"attachments" : [ ],
"parameters" : [ ],
"hasContent" : false,
"stepsCount" : 0,
"attachmentsCount" : 0,
"shouldDisplayMessage" : false
}, {
"name" : "req_fix",
"time" : {
"start" : 1691399016483,
"stop" : 1691399016584,
"duration" : 101
},
"status" : "passed",
"steps" : [ ],
"attachments" : [ ],
"parameters" : [ ],
"hasContent" : false,
"stepsCount" : 0,
"attachmentsCount" : 0,
"shouldDisplayMessage" : false
}, {
"name" : "db_fix",
"time" : {
"start" : 1691399016584,
"stop" : 1691399016789,
"duration" : 205
},
"status" : "passed",
"steps" : [ ],
"attachments" : [ ],
"parameters" : [ ],
"hasContent" : false,
"stepsCount" : 0,
"attachmentsCount" : 0,
"shouldDisplayMessage" : false
} ],
"testStage" : {
"status" : "passed",
"steps" : [ ],
"attachments" : [ {
"uid" : "5f3c9dbb317b112e",
"name" : "log",
"source" : "5f3c9dbb317b112e.txt",
"type" : "text/plain",
"size" : 114
}, {
"uid" : "c7a2213dfdae3609",
"name" : "stdout",
"source" : "c7a2213dfdae3609.txt",
"type" : "text/plain",
"size" : 13
} ],
"parameters" : [ ],
"hasContent" : true,
"stepsCount" : 0,
"attachmentsCount" : 2,
"shouldDisplayMessage" : false
},
"afterStages" : [ {
"name" : "req_fix::0",
"time" : {
"start" : 1691399029988,
"stop" : 1691399029988,
"duration" : 0
},
"status" : "passed",
"steps" : [ ],
"attachments" : [ ],
"parameters" : [ ],
"hasContent" : false,
"stepsCount" : 0,
"attachmentsCount" : 0,
"shouldDisplayMessage" : false
}, {
"name" : "db_fix::0",
"time" : {
"start" : 1691399029987,
"stop" : 1691399029987,
"duration" : 0
},
"status" : "passed",
"steps" : [ ],
"attachments" : [ ],
"parameters" : [ ],
"hasContent" : false,
"stepsCount" : 0,
"attachmentsCount" : 0,
"shouldDisplayMessage" : false
} ],
"labels" : [ {
"name" : "feature",
"value" : "组织管理"
}, {
"name" : "story",
"value" : "删除组织"
}, {
"name" : "severity",
"value" : "高"
}, {
"name" : "epic",
"value" : "BPM系统"
}, {
"name" : "suite",
"value" : "test_bpm"
}, {
"name" : "subSuite",
"value" : "TestBPM"
}, {
"name" : "host",
"value" : "LAPTOP-31V3JBFR"
}, {
"name" : "thread",
"value" : "6412-MainThread"
}, {
"name" : "framework",
"value" : "pytest"
}, {
"name" : "language",
"value" : "cpython3"
}, {
"name" : "package",
"value" : "test_bpm"
}, {
"name" : "resultFormat",
"value" : "allure2"
} ],
"parameters" : [ {
"name" : "data",
"value" : "'test56_org'"
}, {
"name" : "expect",
"value" : "{'state': True, 'message': '删除组织成功!'}"
}, {
"name" : "interface",
"value" : "'删除组织'"
}, {
"name" : "level",
"value" : "'高'"
}, {
"name" : "method",
"value" : "'post'"
}, {
"name" : "mime",
"value" : "'text/plain'"
}, {
"name" : "module",
"value" : "'组织管理'"
}, {
"name" : "sql_sentence",
"value" : "None"
}, {
"name" : "sql_type",
"value" : "None"
}, {
"name" : "title",
"value" : "'正向用例'"
}, {
"name" : "update_key",
"value" : "None"
}, {
"name" : "url",
"value" : "'http://120.46.172.186:8080/api/org/v1/org/deleteOrg'"
} ],
"links" : [ ],
"hidden" : false,
"retry" : false,
"extra" : {
"severity" : "normal",
"retries" : [ ],
"categories" : [ ],
"tags" : [ ]
},
"source" : "9fdbdff7fbc9aba9.json",
"parameterValues" : [ "'test56_org'", "{'state': True, 'message': '删除组织成功!'}", "'删除组织'", "'高'", "'post'", "'text/plain'", "'组织管理'", "None", "None", "'正向用例'", "None", "'http://120.46.172.186:8080/api/org/v1/org/deleteOrg'" ]
}
\ No newline at end of file
{
"uid" : "a87914af7f1df918",
"name" : "正向用例",
"fullName" : "test_bpm.TestBPM#test_bpm",
"historyId" : "f368301ce537f1bbd596e0d19f24f393",
"time" : {
"start" : 1691399022389,
"stop" : 1691399022444,
"duration" : 55
},
"status" : "failed",
"statusMessage" : "AssertionError: 断言失败",
"statusTrace" : "self = <InterfaceAutoTest.test_case.test_bpm.TestBPM object at 0x00000257902D2820>\nreq_fix = <InterfaceAutoTest.requests_method.requests_method.RequestsMethod object at 0x00000257902F0490>\ndb_fix = <InterfaceAutoTest.common.db.DB object at 0x00000257903D93D0>, module = '认证接口', interface = '刷新token', title = '正向用例'\nlevel = '中', method = 'get', url = 'http://120.46.172.186:8080/refresh', mime = None, data = None, expect = {'message': '刷新token成功'}\nsql_type = None, sql_sentence = None, update_key = None\n\n @allure.epic(\"BPM系统\")\n @pytest.mark.parametrize(\"module, interface, title, level, method, url, mime, data, expect, sql_type, sql_sentence, update_key\", ReadExcel().get_data())\n def test_bpm(self, req_fix, db_fix, module, interface, title, level, method, url, mime, data, expect, sql_type, sql_sentence, update_key):\n allure.dynamic.feature(module)\n allure.dynamic.story(interface)\n allure.dynamic.title(title)\n allure.dynamic.severity(level)\n \n # 1.1:判断sql语句的类型是否为delete\n if sql_type == \"delete\":\n # 1.2 使用DB类对象,调用delete方法执行删除的sql语句\n db_fix.delete(sql_sentence)\n # # 1.3 使用RequestsMethod类对象调用request_all方法发送请求\n # result = req_fix.request_all(req_method=method, req_url=url, req_mime=mime, case_data=data)\n \n # 2.1 判断sql语句的类型是否为select\n elif sql_type == \"select\":\n # 2.2 使用DB类对象,调用select方法执行查询的sql语句,并接收查询结果\n select_result = db_fix.select(sql_sentence)\n # 2.3 将查询结果更新到用例数据中\n data[update_key] = select_result\n # # 2.3 使用RequestsMethod类对象调用request_all方法发送请求\n # result = req_fix.request_all(req_method=method, req_url=url, req_mime=mime, case_data=data)\n \n # 3.1 判断sql语句的类型是否delete|select或者为select|delete\n elif sql_type == \"delete|select\" or sql_type == \"select|delete\":\n # 3.2 使用DB类对象,调用delete方法执行删除的sql语句\n db_fix.delete(sql_sentence[\"delete\"])\n # 3.3 使用DB类对象,调用select方法执行查询的sql语句,并接收查询结果\n select_result = db_fix.select(sql_sentence[\"select\"])\n # 3.4 将查询结果更新到用例数据中\n data[update_key] = select_result\n # # 3.5 使用RequestsMethod类对象调用request_all方法发送请求\n # result = req_fix.request_all(req_method=method, req_url=url, req_mime=mime, case_data=data)\n #\n # else:\n # result = req_fix.request_all(req_method=method, req_url=url, req_mime=mime, case_data=data)\n \n result = req_fix.request_all(req_method=method, req_url=url, req_mime=mime, case_data=data)\n \n # 断言\n try:\n for key in expect:\n> assert expect[key] == result.json().get(key)\nE AssertionError: assert '刷新token成功' == None\nE + where None = <built-in method get of dict object at 0x000002579047D880>('message')\nE + where <built-in method get of dict object at 0x000002579047D880> = {'account': '', 'loginStatus': True, 'token': 'eyJhbGciOiJIUzUxMiJ9.eyJzdWIiOiJhZG1pbiIsInRlbmFudElkIjoiLTEiLCJleHAiOjE2OTE0ODU0MjEsImlhdCI6MTY5MTM5OTAyMX0.pk_DluVTDrByMdpsd0Q6k83GXAFpZIaFR_DE5EVzVT22EB9Z00TFxeBrL4zXrrgN3j1kroVm6pCtv7CWcF0ECg', 'userAttrs': {}, ...}.get\nE + where {'account': '', 'loginStatus': True, 'token': 'eyJhbGciOiJIUzUxMiJ9.eyJzdWIiOiJhZG1pbiIsInRlbmFudElkIjoiLTEiLCJleHAiOjE2OTE0ODU0MjEsImlhdCI6MTY5MTM5OTAyMX0.pk_DluVTDrByMdpsd0Q6k83GXAFpZIaFR_DE5EVzVT22EB9Z00TFxeBrL4zXrrgN3j1kroVm6pCtv7CWcF0ECg', 'userAttrs': {}, ...} = <bound method Response.json of <Response [200]>>()\nE + where <bound method Response.json of <Response [200]>> = <Response [200]>.json\n\ntest_bpm.py:61: AssertionError\n\nDuring handling of the above exception, another exception occurred:\n\nself = <InterfaceAutoTest.test_case.test_bpm.TestBPM object at 0x00000257902D2820>\nreq_fix = <InterfaceAutoTest.requests_method.requests_method.RequestsMethod object at 0x00000257902F0490>\ndb_fix = <InterfaceAutoTest.common.db.DB object at 0x00000257903D93D0>, module = '认证接口', interface = '刷新token', title = '正向用例'\nlevel = '中', method = 'get', url = 'http://120.46.172.186:8080/refresh', mime = None, data = None, expect = {'message': '刷新token成功'}\nsql_type = None, sql_sentence = None, update_key = None\n\n @allure.epic(\"BPM系统\")\n @pytest.mark.parametrize(\"module, interface, title, level, method, url, mime, data, expect, sql_type, sql_sentence, update_key\", ReadExcel().get_data())\n def test_bpm(self, req_fix, db_fix, module, interface, title, level, method, url, mime, data, expect, sql_type, sql_sentence, update_key):\n allure.dynamic.feature(module)\n allure.dynamic.story(interface)\n allure.dynamic.title(title)\n allure.dynamic.severity(level)\n \n # 1.1:判断sql语句的类型是否为delete\n if sql_type == \"delete\":\n # 1.2 使用DB类对象,调用delete方法执行删除的sql语句\n db_fix.delete(sql_sentence)\n # # 1.3 使用RequestsMethod类对象调用request_all方法发送请求\n # result = req_fix.request_all(req_method=method, req_url=url, req_mime=mime, case_data=data)\n \n # 2.1 判断sql语句的类型是否为select\n elif sql_type == \"select\":\n # 2.2 使用DB类对象,调用select方法执行查询的sql语句,并接收查询结果\n select_result = db_fix.select(sql_sentence)\n # 2.3 将查询结果更新到用例数据中\n data[update_key] = select_result\n # # 2.3 使用RequestsMethod类对象调用request_all方法发送请求\n # result = req_fix.request_all(req_method=method, req_url=url, req_mime=mime, case_data=data)\n \n # 3.1 判断sql语句的类型是否delete|select或者为select|delete\n elif sql_type == \"delete|select\" or sql_type == \"select|delete\":\n # 3.2 使用DB类对象,调用delete方法执行删除的sql语句\n db_fix.delete(sql_sentence[\"delete\"])\n # 3.3 使用DB类对象,调用select方法执行查询的sql语句,并接收查询结果\n select_result = db_fix.select(sql_sentence[\"select\"])\n # 3.4 将查询结果更新到用例数据中\n data[update_key] = select_result\n # # 3.5 使用RequestsMethod类对象调用request_all方法发送请求\n # result = req_fix.request_all(req_method=method, req_url=url, req_mime=mime, case_data=data)\n #\n # else:\n # result = req_fix.request_all(req_method=method, req_url=url, req_mime=mime, case_data=data)\n \n result = req_fix.request_all(req_method=method, req_url=url, req_mime=mime, case_data=data)\n \n # 断言\n try:\n for key in expect:\n assert expect[key] == result.json().get(key)\n except:\n print(\"断言失败\")\n logging.error(\"断言失败, 模块名称为:{},接口名称为:{},用例标题:{},用例为:{},期望结果为:{},服务器返回数据为:{}\".format(module, interface, title, str(data), str(expect), result.text))\n> raise AssertionError(\"断言失败\")\nE AssertionError: 断言失败\n\ntest_bpm.py:65: AssertionError",
"flaky" : false,
"newFailed" : false,
"beforeStages" : [ {
"name" : "_session_faker",
"time" : {
"start" : 1691399016370,
"stop" : 1691399016483,
"duration" : 113
},
"status" : "passed",
"steps" : [ ],
"attachments" : [ ],
"parameters" : [ ],
"hasContent" : false,
"stepsCount" : 0,
"attachmentsCount" : 0,
"shouldDisplayMessage" : false
}, {
"name" : "req_fix",
"time" : {
"start" : 1691399016483,
"stop" : 1691399016584,
"duration" : 101
},
"status" : "passed",
"steps" : [ ],
"attachments" : [ ],
"parameters" : [ ],
"hasContent" : false,
"stepsCount" : 0,
"attachmentsCount" : 0,
"shouldDisplayMessage" : false
}, {
"name" : "db_fix",
"time" : {
"start" : 1691399016584,
"stop" : 1691399016789,
"duration" : 205
},
"status" : "passed",
"steps" : [ ],
"attachments" : [ ],
"parameters" : [ ],
"hasContent" : false,
"stepsCount" : 0,
"attachmentsCount" : 0,
"shouldDisplayMessage" : false
} ],
"testStage" : {
"status" : "failed",
"statusMessage" : "AssertionError: 断言失败",
"statusTrace" : "self = <InterfaceAutoTest.test_case.test_bpm.TestBPM object at 0x00000257902D2820>\nreq_fix = <InterfaceAutoTest.requests_method.requests_method.RequestsMethod object at 0x00000257902F0490>\ndb_fix = <InterfaceAutoTest.common.db.DB object at 0x00000257903D93D0>, module = '认证接口', interface = '刷新token', title = '正向用例'\nlevel = '中', method = 'get', url = 'http://120.46.172.186:8080/refresh', mime = None, data = None, expect = {'message': '刷新token成功'}\nsql_type = None, sql_sentence = None, update_key = None\n\n @allure.epic(\"BPM系统\")\n @pytest.mark.parametrize(\"module, interface, title, level, method, url, mime, data, expect, sql_type, sql_sentence, update_key\", ReadExcel().get_data())\n def test_bpm(self, req_fix, db_fix, module, interface, title, level, method, url, mime, data, expect, sql_type, sql_sentence, update_key):\n allure.dynamic.feature(module)\n allure.dynamic.story(interface)\n allure.dynamic.title(title)\n allure.dynamic.severity(level)\n \n # 1.1:判断sql语句的类型是否为delete\n if sql_type == \"delete\":\n # 1.2 使用DB类对象,调用delete方法执行删除的sql语句\n db_fix.delete(sql_sentence)\n # # 1.3 使用RequestsMethod类对象调用request_all方法发送请求\n # result = req_fix.request_all(req_method=method, req_url=url, req_mime=mime, case_data=data)\n \n # 2.1 判断sql语句的类型是否为select\n elif sql_type == \"select\":\n # 2.2 使用DB类对象,调用select方法执行查询的sql语句,并接收查询结果\n select_result = db_fix.select(sql_sentence)\n # 2.3 将查询结果更新到用例数据中\n data[update_key] = select_result\n # # 2.3 使用RequestsMethod类对象调用request_all方法发送请求\n # result = req_fix.request_all(req_method=method, req_url=url, req_mime=mime, case_data=data)\n \n # 3.1 判断sql语句的类型是否delete|select或者为select|delete\n elif sql_type == \"delete|select\" or sql_type == \"select|delete\":\n # 3.2 使用DB类对象,调用delete方法执行删除的sql语句\n db_fix.delete(sql_sentence[\"delete\"])\n # 3.3 使用DB类对象,调用select方法执行查询的sql语句,并接收查询结果\n select_result = db_fix.select(sql_sentence[\"select\"])\n # 3.4 将查询结果更新到用例数据中\n data[update_key] = select_result\n # # 3.5 使用RequestsMethod类对象调用request_all方法发送请求\n # result = req_fix.request_all(req_method=method, req_url=url, req_mime=mime, case_data=data)\n #\n # else:\n # result = req_fix.request_all(req_method=method, req_url=url, req_mime=mime, case_data=data)\n \n result = req_fix.request_all(req_method=method, req_url=url, req_mime=mime, case_data=data)\n \n # 断言\n try:\n for key in expect:\n> assert expect[key] == result.json().get(key)\nE AssertionError: assert '刷新token成功' == None\nE + where None = <built-in method get of dict object at 0x000002579047D880>('message')\nE + where <built-in method get of dict object at 0x000002579047D880> = {'account': '', 'loginStatus': True, 'token': 'eyJhbGciOiJIUzUxMiJ9.eyJzdWIiOiJhZG1pbiIsInRlbmFudElkIjoiLTEiLCJleHAiOjE2OTE0ODU0MjEsImlhdCI6MTY5MTM5OTAyMX0.pk_DluVTDrByMdpsd0Q6k83GXAFpZIaFR_DE5EVzVT22EB9Z00TFxeBrL4zXrrgN3j1kroVm6pCtv7CWcF0ECg', 'userAttrs': {}, ...}.get\nE + where {'account': '', 'loginStatus': True, 'token': 'eyJhbGciOiJIUzUxMiJ9.eyJzdWIiOiJhZG1pbiIsInRlbmFudElkIjoiLTEiLCJleHAiOjE2OTE0ODU0MjEsImlhdCI6MTY5MTM5OTAyMX0.pk_DluVTDrByMdpsd0Q6k83GXAFpZIaFR_DE5EVzVT22EB9Z00TFxeBrL4zXrrgN3j1kroVm6pCtv7CWcF0ECg', 'userAttrs': {}, ...} = <bound method Response.json of <Response [200]>>()\nE + where <bound method Response.json of <Response [200]>> = <Response [200]>.json\n\ntest_bpm.py:61: AssertionError\n\nDuring handling of the above exception, another exception occurred:\n\nself = <InterfaceAutoTest.test_case.test_bpm.TestBPM object at 0x00000257902D2820>\nreq_fix = <InterfaceAutoTest.requests_method.requests_method.RequestsMethod object at 0x00000257902F0490>\ndb_fix = <InterfaceAutoTest.common.db.DB object at 0x00000257903D93D0>, module = '认证接口', interface = '刷新token', title = '正向用例'\nlevel = '中', method = 'get', url = 'http://120.46.172.186:8080/refresh', mime = None, data = None, expect = {'message': '刷新token成功'}\nsql_type = None, sql_sentence = None, update_key = None\n\n @allure.epic(\"BPM系统\")\n @pytest.mark.parametrize(\"module, interface, title, level, method, url, mime, data, expect, sql_type, sql_sentence, update_key\", ReadExcel().get_data())\n def test_bpm(self, req_fix, db_fix, module, interface, title, level, method, url, mime, data, expect, sql_type, sql_sentence, update_key):\n allure.dynamic.feature(module)\n allure.dynamic.story(interface)\n allure.dynamic.title(title)\n allure.dynamic.severity(level)\n \n # 1.1:判断sql语句的类型是否为delete\n if sql_type == \"delete\":\n # 1.2 使用DB类对象,调用delete方法执行删除的sql语句\n db_fix.delete(sql_sentence)\n # # 1.3 使用RequestsMethod类对象调用request_all方法发送请求\n # result = req_fix.request_all(req_method=method, req_url=url, req_mime=mime, case_data=data)\n \n # 2.1 判断sql语句的类型是否为select\n elif sql_type == \"select\":\n # 2.2 使用DB类对象,调用select方法执行查询的sql语句,并接收查询结果\n select_result = db_fix.select(sql_sentence)\n # 2.3 将查询结果更新到用例数据中\n data[update_key] = select_result\n # # 2.3 使用RequestsMethod类对象调用request_all方法发送请求\n # result = req_fix.request_all(req_method=method, req_url=url, req_mime=mime, case_data=data)\n \n # 3.1 判断sql语句的类型是否delete|select或者为select|delete\n elif sql_type == \"delete|select\" or sql_type == \"select|delete\":\n # 3.2 使用DB类对象,调用delete方法执行删除的sql语句\n db_fix.delete(sql_sentence[\"delete\"])\n # 3.3 使用DB类对象,调用select方法执行查询的sql语句,并接收查询结果\n select_result = db_fix.select(sql_sentence[\"select\"])\n # 3.4 将查询结果更新到用例数据中\n data[update_key] = select_result\n # # 3.5 使用RequestsMethod类对象调用request_all方法发送请求\n # result = req_fix.request_all(req_method=method, req_url=url, req_mime=mime, case_data=data)\n #\n # else:\n # result = req_fix.request_all(req_method=method, req_url=url, req_mime=mime, case_data=data)\n \n result = req_fix.request_all(req_method=method, req_url=url, req_mime=mime, case_data=data)\n \n # 断言\n try:\n for key in expect:\n assert expect[key] == result.json().get(key)\n except:\n print(\"断言失败\")\n logging.error(\"断言失败, 模块名称为:{},接口名称为:{},用例标题:{},用例为:{},期望结果为:{},服务器返回数据为:{}\".format(module, interface, title, str(data), str(expect), result.text))\n> raise AssertionError(\"断言失败\")\nE AssertionError: 断言失败\n\ntest_bpm.py:65: AssertionError",
"steps" : [ ],
"attachments" : [ {
"uid" : "553be23f0722e607",
"name" : "log",
"source" : "553be23f0722e607.txt",
"type" : "text/plain",
"size" : 3216
}, {
"uid" : "724b60d4fdf815f8",
"name" : "stdout",
"source" : "724b60d4fdf815f8.txt",
"type" : "text/plain",
"size" : 65
} ],
"parameters" : [ ],
"hasContent" : true,
"stepsCount" : 0,
"attachmentsCount" : 2,
"shouldDisplayMessage" : true
},
"afterStages" : [ {
"name" : "req_fix::0",
"time" : {
"start" : 1691399029988,
"stop" : 1691399029988,
"duration" : 0
},
"status" : "passed",
"steps" : [ ],
"attachments" : [ ],
"parameters" : [ ],
"hasContent" : false,
"stepsCount" : 0,
"attachmentsCount" : 0,
"shouldDisplayMessage" : false
}, {
"name" : "db_fix::0",
"time" : {
"start" : 1691399029987,
"stop" : 1691399029987,
"duration" : 0
},
"status" : "passed",
"steps" : [ ],
"attachments" : [ ],
"parameters" : [ ],
"hasContent" : false,
"stepsCount" : 0,
"attachmentsCount" : 0,
"shouldDisplayMessage" : false
} ],
"labels" : [ {
"name" : "feature",
"value" : "认证接口"
}, {
"name" : "story",
"value" : "刷新token"
}, {
"name" : "severity",
"value" : "中"
}, {
"name" : "epic",
"value" : "BPM系统"
}, {
"name" : "suite",
"value" : "test_bpm"
}, {
"name" : "subSuite",
"value" : "TestBPM"
}, {
"name" : "host",
"value" : "LAPTOP-31V3JBFR"
}, {
"name" : "thread",
"value" : "6412-MainThread"
}, {
"name" : "framework",
"value" : "pytest"
}, {
"name" : "language",
"value" : "cpython3"
}, {
"name" : "package",
"value" : "test_bpm"
}, {
"name" : "resultFormat",
"value" : "allure2"
} ],
"parameters" : [ {
"name" : "data",
"value" : "None"
}, {
"name" : "expect",
"value" : "{'message': '刷新token成功'}"
}, {
"name" : "interface",
"value" : "'刷新token'"
}, {
"name" : "level",
"value" : "'中'"
}, {
"name" : "method",
"value" : "'get'"
}, {
"name" : "mime",
"value" : "None"
}, {
"name" : "module",
"value" : "'认证接口'"
}, {
"name" : "sql_sentence",
"value" : "None"
}, {
"name" : "sql_type",
"value" : "None"
}, {
"name" : "title",
"value" : "'正向用例'"
}, {
"name" : "update_key",
"value" : "None"
}, {
"name" : "url",
"value" : "'http://120.46.172.186:8080/refresh'"
} ],
"links" : [ ],
"hidden" : true,
"retry" : true,
"extra" : {
"categories" : [ ],
"tags" : [ ]
},
"source" : "a87914af7f1df918.json",
"parameterValues" : [ "None", "{'message': '刷新token成功'}", "'刷新token'", "'中'", "'get'", "None", "'认证接口'", "None", "None", "'正向用例'", "None", "'http://120.46.172.186:8080/refresh'" ]
}
\ No newline at end of file
{
"uid" : "bfbb6ff6c978dd13",
"name" : "反向用例-用户名特殊字符",
"fullName" : "test_bpm.TestBPM#test_bpm",
"historyId" : "a0502452da70d924dbdea3f536ad8015",
"time" : {
"start" : 1691399017156,
"stop" : 1691399017255,
"duration" : 99
},
"status" : "passed",
"flaky" : false,
"newFailed" : false,
"beforeStages" : [ {
"name" : "_session_faker",
"time" : {
"start" : 1691399016370,
"stop" : 1691399016483,
"duration" : 113
},
"status" : "passed",
"steps" : [ ],
"attachments" : [ ],
"parameters" : [ ],
"hasContent" : false,
"stepsCount" : 0,
"attachmentsCount" : 0,
"shouldDisplayMessage" : false
}, {
"name" : "req_fix",
"time" : {
"start" : 1691399016483,
"stop" : 1691399016584,
"duration" : 101
},
"status" : "passed",
"steps" : [ ],
"attachments" : [ ],
"parameters" : [ ],
"hasContent" : false,
"stepsCount" : 0,
"attachmentsCount" : 0,
"shouldDisplayMessage" : false
}, {
"name" : "db_fix",
"time" : {
"start" : 1691399016584,
"stop" : 1691399016789,
"duration" : 205
},
"status" : "passed",
"steps" : [ ],
"attachments" : [ ],
"parameters" : [ ],
"hasContent" : false,
"stepsCount" : 0,
"attachmentsCount" : 0,
"shouldDisplayMessage" : false
} ],
"testStage" : {
"status" : "passed",
"steps" : [ ],
"attachments" : [ {
"uid" : "e5acd6a6086f55b1",
"name" : "log",
"source" : "e5acd6a6086f55b1.txt",
"type" : "text/plain",
"size" : 176
}, {
"uid" : "bd484923ba2b9e8e",
"name" : "stdout",
"source" : "bd484923ba2b9e8e.txt",
"type" : "text/plain",
"size" : 13
} ],
"parameters" : [ ],
"hasContent" : true,
"stepsCount" : 0,
"attachmentsCount" : 2,
"shouldDisplayMessage" : false
},
"afterStages" : [ {
"name" : "req_fix::0",
"time" : {
"start" : 1691399029988,
"stop" : 1691399029988,
"duration" : 0
},
"status" : "passed",
"steps" : [ ],
"attachments" : [ ],
"parameters" : [ ],
"hasContent" : false,
"stepsCount" : 0,
"attachmentsCount" : 0,
"shouldDisplayMessage" : false
}, {
"name" : "db_fix::0",
"time" : {
"start" : 1691399029987,
"stop" : 1691399029987,
"duration" : 0
},
"status" : "passed",
"steps" : [ ],
"attachments" : [ ],
"parameters" : [ ],
"hasContent" : false,
"stepsCount" : 0,
"attachmentsCount" : 0,
"shouldDisplayMessage" : false
} ],
"labels" : [ {
"name" : "feature",
"value" : "认证接口"
}, {
"name" : "story",
"value" : "登录系统"
}, {
"name" : "severity",
"value" : "中"
}, {
"name" : "epic",
"value" : "BPM系统"
}, {
"name" : "suite",
"value" : "test_bpm"
}, {
"name" : "subSuite",
"value" : "TestBPM"
}, {
"name" : "host",
"value" : "LAPTOP-31V3JBFR"
}, {
"name" : "thread",
"value" : "6412-MainThread"
}, {
"name" : "framework",
"value" : "pytest"
}, {
"name" : "language",
"value" : "cpython3"
}, {
"name" : "package",
"value" : "test_bpm"
}, {
"name" : "resultFormat",
"value" : "allure2"
} ],
"parameters" : [ {
"name" : "data",
"value" : "{'password': 'MTIzNDU2', 'username': '▬♦◊◦☼♠♣'}"
}, {
"name" : "expect",
"value" : "{'state': False, 'message': '账号或密码错误'}"
}, {
"name" : "interface",
"value" : "'登录系统'"
}, {
"name" : "level",
"value" : "'中'"
}, {
"name" : "method",
"value" : "'POST'"
}, {
"name" : "mime",
"value" : "'application/json'"
}, {
"name" : "module",
"value" : "'认证接口'"
}, {
"name" : "sql_sentence",
"value" : "None"
}, {
"name" : "sql_type",
"value" : "None"
}, {
"name" : "title",
"value" : "'反向用例-用户名特殊字符'"
}, {
"name" : "update_key",
"value" : "None"
}, {
"name" : "url",
"value" : "'http://120.46.172.186:8080/auth'"
} ],
"links" : [ ],
"hidden" : false,
"retry" : false,
"extra" : {
"severity" : "normal",
"retries" : [ ],
"categories" : [ ],
"tags" : [ ]
},
"source" : "bfbb6ff6c978dd13.json",
"parameterValues" : [ "{'password': 'MTIzNDU2', 'username': '▬♦◊◦☼♠♣'}", "{'state': False, 'message': '账号或密码错误'}", "'登录系统'", "'中'", "'POST'", "'application/json'", "'认证接口'", "None", "None", "'反向用例-用户名特殊字符'", "None", "'http://120.46.172.186:8080/auth'" ]
}
\ No newline at end of file
{
"uid" : "ca0f0da1fb5b1a9d",
"name" : "正向用例",
"fullName" : "test_bpm.TestBPM#test_bpm",
"historyId" : "74e8920fe95c2c7a6d36157ccbacbeb9",
"time" : {
"start" : 1691399023909,
"stop" : 1691399023983,
"duration" : 74
},
"status" : "passed",
"flaky" : false,
"newFailed" : false,
"beforeStages" : [ {
"name" : "_session_faker",
"time" : {
"start" : 1691399016370,
"stop" : 1691399016483,
"duration" : 113
},
"status" : "passed",
"steps" : [ ],
"attachments" : [ ],
"parameters" : [ ],
"hasContent" : false,
"stepsCount" : 0,
"attachmentsCount" : 0,
"shouldDisplayMessage" : false
}, {
"name" : "req_fix",
"time" : {
"start" : 1691399016483,
"stop" : 1691399016584,
"duration" : 101
},
"status" : "passed",
"steps" : [ ],
"attachments" : [ ],
"parameters" : [ ],
"hasContent" : false,
"stepsCount" : 0,
"attachmentsCount" : 0,
"shouldDisplayMessage" : false
}, {
"name" : "db_fix",
"time" : {
"start" : 1691399016584,
"stop" : 1691399016789,
"duration" : 205
},
"status" : "passed",
"steps" : [ ],
"attachments" : [ ],
"parameters" : [ ],
"hasContent" : false,
"stepsCount" : 0,
"attachmentsCount" : 0,
"shouldDisplayMessage" : false
} ],
"testStage" : {
"status" : "passed",
"steps" : [ ],
"attachments" : [ {
"uid" : "d7db4c321dffa3fd",
"name" : "log",
"source" : "d7db4c321dffa3fd.txt",
"type" : "text/plain",
"size" : 142
}, {
"uid" : "f7a48e4c25f2aab9",
"name" : "stdout",
"source" : "f7a48e4c25f2aab9.txt",
"type" : "text/plain",
"size" : 13
} ],
"parameters" : [ ],
"hasContent" : true,
"stepsCount" : 0,
"attachmentsCount" : 2,
"shouldDisplayMessage" : false
},
"afterStages" : [ {
"name" : "req_fix::0",
"time" : {
"start" : 1691399029988,
"stop" : 1691399029988,
"duration" : 0
},
"status" : "passed",
"steps" : [ ],
"attachments" : [ ],
"parameters" : [ ],
"hasContent" : false,
"stepsCount" : 0,
"attachmentsCount" : 0,
"shouldDisplayMessage" : false
}, {
"name" : "db_fix::0",
"time" : {
"start" : 1691399029987,
"stop" : 1691399029987,
"duration" : 0
},
"status" : "passed",
"steps" : [ ],
"attachments" : [ ],
"parameters" : [ ],
"hasContent" : false,
"stepsCount" : 0,
"attachmentsCount" : 0,
"shouldDisplayMessage" : false
} ],
"labels" : [ {
"name" : "feature",
"value" : "组织管理"
}, {
"name" : "story",
"value" : "保存组织参数"
}, {
"name" : "severity",
"value" : "高"
}, {
"name" : "epic",
"value" : "BPM系统"
}, {
"name" : "suite",
"value" : "test_bpm"
}, {
"name" : "subSuite",
"value" : "TestBPM"
}, {
"name" : "host",
"value" : "LAPTOP-31V3JBFR"
}, {
"name" : "thread",
"value" : "6412-MainThread"
}, {
"name" : "framework",
"value" : "pytest"
}, {
"name" : "language",
"value" : "cpython3"
}, {
"name" : "package",
"value" : "test_bpm"
}, {
"name" : "resultFormat",
"value" : "allure2"
} ],
"parameters" : [ {
"name" : "data",
"value" : "{'query': {'orgCode': 'test56_org'}, 'body': [{'alias': 'sz', 'value': 0}, {'alias': 'zy', 'value': 'math'}, {'alias': 'rq', 'value': '2023-08-04T16:00:00.000Z'}, {'alias': 'ah', 'value': 'lq'}, {'alias': 'yyyy', 'value': '越高越好'}, {'alias': 'xb', 'value': '2'}]}"
}, {
"name" : "expect",
"value" : "{'state': True, 'message': '保存组织参数成功!'}"
}, {
"name" : "interface",
"value" : "'保存组织参数'"
}, {
"name" : "level",
"value" : "'高'"
}, {
"name" : "method",
"value" : "'post'"
}, {
"name" : "mime",
"value" : "'application/json|query'"
}, {
"name" : "module",
"value" : "'组织管理'"
}, {
"name" : "sql_sentence",
"value" : "None"
}, {
"name" : "sql_type",
"value" : "None"
}, {
"name" : "title",
"value" : "'正向用例'"
}, {
"name" : "update_key",
"value" : "None"
}, {
"name" : "url",
"value" : "'http://120.46.172.186:8080/api/org/v1/orgParam/saveOrgParams'"
} ],
"links" : [ ],
"hidden" : false,
"retry" : false,
"extra" : {
"severity" : "normal",
"retries" : [ ],
"categories" : [ ],
"tags" : [ ]
},
"source" : "ca0f0da1fb5b1a9d.json",
"parameterValues" : [ "{'query': {'orgCode': 'test56_org'}, 'body': [{'alias': 'sz', 'value': 0}, {'alias': 'zy', 'value': 'math'}, {'alias': 'rq', 'value': '2023-08-04T16:00:00.000Z'}, {'alias': 'ah', 'value': 'lq'}, {'alias': 'yyyy', 'value': '越高越好'}, {'alias': 'xb', 'value': '2'}]}", "{'state': True, 'message': '保存组织参数成功!'}", "'保存组织参数'", "'高'", "'post'", "'application/json|query'", "'组织管理'", "None", "None", "'正向用例'", "None", "'http://120.46.172.186:8080/api/org/v1/orgParam/saveOrgParams'" ]
}
\ No newline at end of file
{
"uid" : "cc13490ee94aa27d",
"name" : "正向用例",
"fullName" : "test_bpm.TestBPM#test_bpm",
"historyId" : "f368301ce537f1bbd596e0d19f24f393",
"time" : {
"start" : 1691399023476,
"stop" : 1691399023532,
"duration" : 56
},
"status" : "failed",
"statusMessage" : "AssertionError: 断言失败",
"statusTrace" : "self = <InterfaceAutoTest.test_case.test_bpm.TestBPM object at 0x00000257902D2820>\nreq_fix = <InterfaceAutoTest.requests_method.requests_method.RequestsMethod object at 0x00000257902F0490>\ndb_fix = <InterfaceAutoTest.common.db.DB object at 0x00000257903D93D0>, module = '认证接口', interface = '刷新token', title = '正向用例'\nlevel = '中', method = 'get', url = 'http://120.46.172.186:8080/refresh', mime = None, data = None, expect = {'message': '刷新token成功'}\nsql_type = None, sql_sentence = None, update_key = None\n\n @allure.epic(\"BPM系统\")\n @pytest.mark.parametrize(\"module, interface, title, level, method, url, mime, data, expect, sql_type, sql_sentence, update_key\", ReadExcel().get_data())\n def test_bpm(self, req_fix, db_fix, module, interface, title, level, method, url, mime, data, expect, sql_type, sql_sentence, update_key):\n allure.dynamic.feature(module)\n allure.dynamic.story(interface)\n allure.dynamic.title(title)\n allure.dynamic.severity(level)\n \n # 1.1:判断sql语句的类型是否为delete\n if sql_type == \"delete\":\n # 1.2 使用DB类对象,调用delete方法执行删除的sql语句\n db_fix.delete(sql_sentence)\n # # 1.3 使用RequestsMethod类对象调用request_all方法发送请求\n # result = req_fix.request_all(req_method=method, req_url=url, req_mime=mime, case_data=data)\n \n # 2.1 判断sql语句的类型是否为select\n elif sql_type == \"select\":\n # 2.2 使用DB类对象,调用select方法执行查询的sql语句,并接收查询结果\n select_result = db_fix.select(sql_sentence)\n # 2.3 将查询结果更新到用例数据中\n data[update_key] = select_result\n # # 2.3 使用RequestsMethod类对象调用request_all方法发送请求\n # result = req_fix.request_all(req_method=method, req_url=url, req_mime=mime, case_data=data)\n \n # 3.1 判断sql语句的类型是否delete|select或者为select|delete\n elif sql_type == \"delete|select\" or sql_type == \"select|delete\":\n # 3.2 使用DB类对象,调用delete方法执行删除的sql语句\n db_fix.delete(sql_sentence[\"delete\"])\n # 3.3 使用DB类对象,调用select方法执行查询的sql语句,并接收查询结果\n select_result = db_fix.select(sql_sentence[\"select\"])\n # 3.4 将查询结果更新到用例数据中\n data[update_key] = select_result\n # # 3.5 使用RequestsMethod类对象调用request_all方法发送请求\n # result = req_fix.request_all(req_method=method, req_url=url, req_mime=mime, case_data=data)\n #\n # else:\n # result = req_fix.request_all(req_method=method, req_url=url, req_mime=mime, case_data=data)\n \n result = req_fix.request_all(req_method=method, req_url=url, req_mime=mime, case_data=data)\n \n # 断言\n try:\n for key in expect:\n> assert expect[key] == result.json().get(key)\nE AssertionError: assert '刷新token成功' == None\nE + where None = <built-in method get of dict object at 0x00000257904930C0>('message')\nE + where <built-in method get of dict object at 0x00000257904930C0> = {'account': '', 'loginStatus': True, 'token': 'eyJhbGciOiJIUzUxMiJ9.eyJzdWIiOiJhZG1pbiIsInRlbmFudElkIjoiLTEiLCJleHAiOjE2OTE0ODU0MjIsImlhdCI6MTY5MTM5OTAyMn0.AJb0b0Z7fh42A4W3fRFg03S264NwNu1fnWxlbJPlndwduuMj8ujr26RYm5ze6hzk9s5UPzd9oGBhiQAdYo5PRA', 'userAttrs': {}, ...}.get\nE + where {'account': '', 'loginStatus': True, 'token': 'eyJhbGciOiJIUzUxMiJ9.eyJzdWIiOiJhZG1pbiIsInRlbmFudElkIjoiLTEiLCJleHAiOjE2OTE0ODU0MjIsImlhdCI6MTY5MTM5OTAyMn0.AJb0b0Z7fh42A4W3fRFg03S264NwNu1fnWxlbJPlndwduuMj8ujr26RYm5ze6hzk9s5UPzd9oGBhiQAdYo5PRA', 'userAttrs': {}, ...} = <bound method Response.json of <Response [200]>>()\nE + where <bound method Response.json of <Response [200]>> = <Response [200]>.json\n\ntest_bpm.py:61: AssertionError\n\nDuring handling of the above exception, another exception occurred:\n\nself = <InterfaceAutoTest.test_case.test_bpm.TestBPM object at 0x00000257902D2820>\nreq_fix = <InterfaceAutoTest.requests_method.requests_method.RequestsMethod object at 0x00000257902F0490>\ndb_fix = <InterfaceAutoTest.common.db.DB object at 0x00000257903D93D0>, module = '认证接口', interface = '刷新token', title = '正向用例'\nlevel = '中', method = 'get', url = 'http://120.46.172.186:8080/refresh', mime = None, data = None, expect = {'message': '刷新token成功'}\nsql_type = None, sql_sentence = None, update_key = None\n\n @allure.epic(\"BPM系统\")\n @pytest.mark.parametrize(\"module, interface, title, level, method, url, mime, data, expect, sql_type, sql_sentence, update_key\", ReadExcel().get_data())\n def test_bpm(self, req_fix, db_fix, module, interface, title, level, method, url, mime, data, expect, sql_type, sql_sentence, update_key):\n allure.dynamic.feature(module)\n allure.dynamic.story(interface)\n allure.dynamic.title(title)\n allure.dynamic.severity(level)\n \n # 1.1:判断sql语句的类型是否为delete\n if sql_type == \"delete\":\n # 1.2 使用DB类对象,调用delete方法执行删除的sql语句\n db_fix.delete(sql_sentence)\n # # 1.3 使用RequestsMethod类对象调用request_all方法发送请求\n # result = req_fix.request_all(req_method=method, req_url=url, req_mime=mime, case_data=data)\n \n # 2.1 判断sql语句的类型是否为select\n elif sql_type == \"select\":\n # 2.2 使用DB类对象,调用select方法执行查询的sql语句,并接收查询结果\n select_result = db_fix.select(sql_sentence)\n # 2.3 将查询结果更新到用例数据中\n data[update_key] = select_result\n # # 2.3 使用RequestsMethod类对象调用request_all方法发送请求\n # result = req_fix.request_all(req_method=method, req_url=url, req_mime=mime, case_data=data)\n \n # 3.1 判断sql语句的类型是否delete|select或者为select|delete\n elif sql_type == \"delete|select\" or sql_type == \"select|delete\":\n # 3.2 使用DB类对象,调用delete方法执行删除的sql语句\n db_fix.delete(sql_sentence[\"delete\"])\n # 3.3 使用DB类对象,调用select方法执行查询的sql语句,并接收查询结果\n select_result = db_fix.select(sql_sentence[\"select\"])\n # 3.4 将查询结果更新到用例数据中\n data[update_key] = select_result\n # # 3.5 使用RequestsMethod类对象调用request_all方法发送请求\n # result = req_fix.request_all(req_method=method, req_url=url, req_mime=mime, case_data=data)\n #\n # else:\n # result = req_fix.request_all(req_method=method, req_url=url, req_mime=mime, case_data=data)\n \n result = req_fix.request_all(req_method=method, req_url=url, req_mime=mime, case_data=data)\n \n # 断言\n try:\n for key in expect:\n assert expect[key] == result.json().get(key)\n except:\n print(\"断言失败\")\n logging.error(\"断言失败, 模块名称为:{},接口名称为:{},用例标题:{},用例为:{},期望结果为:{},服务器返回数据为:{}\".format(module, interface, title, str(data), str(expect), result.text))\n> raise AssertionError(\"断言失败\")\nE AssertionError: 断言失败\n\ntest_bpm.py:65: AssertionError",
"flaky" : false,
"newFailed" : false,
"beforeStages" : [ {
"name" : "_session_faker",
"time" : {
"start" : 1691399016370,
"stop" : 1691399016483,
"duration" : 113
},
"status" : "passed",
"steps" : [ ],
"attachments" : [ ],
"parameters" : [ ],
"hasContent" : false,
"stepsCount" : 0,
"attachmentsCount" : 0,
"shouldDisplayMessage" : false
}, {
"name" : "req_fix",
"time" : {
"start" : 1691399016483,
"stop" : 1691399016584,
"duration" : 101
},
"status" : "passed",
"steps" : [ ],
"attachments" : [ ],
"parameters" : [ ],
"hasContent" : false,
"stepsCount" : 0,
"attachmentsCount" : 0,
"shouldDisplayMessage" : false
}, {
"name" : "db_fix",
"time" : {
"start" : 1691399016584,
"stop" : 1691399016789,
"duration" : 205
},
"status" : "passed",
"steps" : [ ],
"attachments" : [ ],
"parameters" : [ ],
"hasContent" : false,
"stepsCount" : 0,
"attachmentsCount" : 0,
"shouldDisplayMessage" : false
} ],
"testStage" : {
"status" : "failed",
"statusMessage" : "AssertionError: 断言失败",
"statusTrace" : "self = <InterfaceAutoTest.test_case.test_bpm.TestBPM object at 0x00000257902D2820>\nreq_fix = <InterfaceAutoTest.requests_method.requests_method.RequestsMethod object at 0x00000257902F0490>\ndb_fix = <InterfaceAutoTest.common.db.DB object at 0x00000257903D93D0>, module = '认证接口', interface = '刷新token', title = '正向用例'\nlevel = '中', method = 'get', url = 'http://120.46.172.186:8080/refresh', mime = None, data = None, expect = {'message': '刷新token成功'}\nsql_type = None, sql_sentence = None, update_key = None\n\n @allure.epic(\"BPM系统\")\n @pytest.mark.parametrize(\"module, interface, title, level, method, url, mime, data, expect, sql_type, sql_sentence, update_key\", ReadExcel().get_data())\n def test_bpm(self, req_fix, db_fix, module, interface, title, level, method, url, mime, data, expect, sql_type, sql_sentence, update_key):\n allure.dynamic.feature(module)\n allure.dynamic.story(interface)\n allure.dynamic.title(title)\n allure.dynamic.severity(level)\n \n # 1.1:判断sql语句的类型是否为delete\n if sql_type == \"delete\":\n # 1.2 使用DB类对象,调用delete方法执行删除的sql语句\n db_fix.delete(sql_sentence)\n # # 1.3 使用RequestsMethod类对象调用request_all方法发送请求\n # result = req_fix.request_all(req_method=method, req_url=url, req_mime=mime, case_data=data)\n \n # 2.1 判断sql语句的类型是否为select\n elif sql_type == \"select\":\n # 2.2 使用DB类对象,调用select方法执行查询的sql语句,并接收查询结果\n select_result = db_fix.select(sql_sentence)\n # 2.3 将查询结果更新到用例数据中\n data[update_key] = select_result\n # # 2.3 使用RequestsMethod类对象调用request_all方法发送请求\n # result = req_fix.request_all(req_method=method, req_url=url, req_mime=mime, case_data=data)\n \n # 3.1 判断sql语句的类型是否delete|select或者为select|delete\n elif sql_type == \"delete|select\" or sql_type == \"select|delete\":\n # 3.2 使用DB类对象,调用delete方法执行删除的sql语句\n db_fix.delete(sql_sentence[\"delete\"])\n # 3.3 使用DB类对象,调用select方法执行查询的sql语句,并接收查询结果\n select_result = db_fix.select(sql_sentence[\"select\"])\n # 3.4 将查询结果更新到用例数据中\n data[update_key] = select_result\n # # 3.5 使用RequestsMethod类对象调用request_all方法发送请求\n # result = req_fix.request_all(req_method=method, req_url=url, req_mime=mime, case_data=data)\n #\n # else:\n # result = req_fix.request_all(req_method=method, req_url=url, req_mime=mime, case_data=data)\n \n result = req_fix.request_all(req_method=method, req_url=url, req_mime=mime, case_data=data)\n \n # 断言\n try:\n for key in expect:\n> assert expect[key] == result.json().get(key)\nE AssertionError: assert '刷新token成功' == None\nE + where None = <built-in method get of dict object at 0x00000257904930C0>('message')\nE + where <built-in method get of dict object at 0x00000257904930C0> = {'account': '', 'loginStatus': True, 'token': 'eyJhbGciOiJIUzUxMiJ9.eyJzdWIiOiJhZG1pbiIsInRlbmFudElkIjoiLTEiLCJleHAiOjE2OTE0ODU0MjIsImlhdCI6MTY5MTM5OTAyMn0.AJb0b0Z7fh42A4W3fRFg03S264NwNu1fnWxlbJPlndwduuMj8ujr26RYm5ze6hzk9s5UPzd9oGBhiQAdYo5PRA', 'userAttrs': {}, ...}.get\nE + where {'account': '', 'loginStatus': True, 'token': 'eyJhbGciOiJIUzUxMiJ9.eyJzdWIiOiJhZG1pbiIsInRlbmFudElkIjoiLTEiLCJleHAiOjE2OTE0ODU0MjIsImlhdCI6MTY5MTM5OTAyMn0.AJb0b0Z7fh42A4W3fRFg03S264NwNu1fnWxlbJPlndwduuMj8ujr26RYm5ze6hzk9s5UPzd9oGBhiQAdYo5PRA', 'userAttrs': {}, ...} = <bound method Response.json of <Response [200]>>()\nE + where <bound method Response.json of <Response [200]>> = <Response [200]>.json\n\ntest_bpm.py:61: AssertionError\n\nDuring handling of the above exception, another exception occurred:\n\nself = <InterfaceAutoTest.test_case.test_bpm.TestBPM object at 0x00000257902D2820>\nreq_fix = <InterfaceAutoTest.requests_method.requests_method.RequestsMethod object at 0x00000257902F0490>\ndb_fix = <InterfaceAutoTest.common.db.DB object at 0x00000257903D93D0>, module = '认证接口', interface = '刷新token', title = '正向用例'\nlevel = '中', method = 'get', url = 'http://120.46.172.186:8080/refresh', mime = None, data = None, expect = {'message': '刷新token成功'}\nsql_type = None, sql_sentence = None, update_key = None\n\n @allure.epic(\"BPM系统\")\n @pytest.mark.parametrize(\"module, interface, title, level, method, url, mime, data, expect, sql_type, sql_sentence, update_key\", ReadExcel().get_data())\n def test_bpm(self, req_fix, db_fix, module, interface, title, level, method, url, mime, data, expect, sql_type, sql_sentence, update_key):\n allure.dynamic.feature(module)\n allure.dynamic.story(interface)\n allure.dynamic.title(title)\n allure.dynamic.severity(level)\n \n # 1.1:判断sql语句的类型是否为delete\n if sql_type == \"delete\":\n # 1.2 使用DB类对象,调用delete方法执行删除的sql语句\n db_fix.delete(sql_sentence)\n # # 1.3 使用RequestsMethod类对象调用request_all方法发送请求\n # result = req_fix.request_all(req_method=method, req_url=url, req_mime=mime, case_data=data)\n \n # 2.1 判断sql语句的类型是否为select\n elif sql_type == \"select\":\n # 2.2 使用DB类对象,调用select方法执行查询的sql语句,并接收查询结果\n select_result = db_fix.select(sql_sentence)\n # 2.3 将查询结果更新到用例数据中\n data[update_key] = select_result\n # # 2.3 使用RequestsMethod类对象调用request_all方法发送请求\n # result = req_fix.request_all(req_method=method, req_url=url, req_mime=mime, case_data=data)\n \n # 3.1 判断sql语句的类型是否delete|select或者为select|delete\n elif sql_type == \"delete|select\" or sql_type == \"select|delete\":\n # 3.2 使用DB类对象,调用delete方法执行删除的sql语句\n db_fix.delete(sql_sentence[\"delete\"])\n # 3.3 使用DB类对象,调用select方法执行查询的sql语句,并接收查询结果\n select_result = db_fix.select(sql_sentence[\"select\"])\n # 3.4 将查询结果更新到用例数据中\n data[update_key] = select_result\n # # 3.5 使用RequestsMethod类对象调用request_all方法发送请求\n # result = req_fix.request_all(req_method=method, req_url=url, req_mime=mime, case_data=data)\n #\n # else:\n # result = req_fix.request_all(req_method=method, req_url=url, req_mime=mime, case_data=data)\n \n result = req_fix.request_all(req_method=method, req_url=url, req_mime=mime, case_data=data)\n \n # 断言\n try:\n for key in expect:\n assert expect[key] == result.json().get(key)\n except:\n print(\"断言失败\")\n logging.error(\"断言失败, 模块名称为:{},接口名称为:{},用例标题:{},用例为:{},期望结果为:{},服务器返回数据为:{}\".format(module, interface, title, str(data), str(expect), result.text))\n> raise AssertionError(\"断言失败\")\nE AssertionError: 断言失败\n\ntest_bpm.py:65: AssertionError",
"steps" : [ ],
"attachments" : [ {
"uid" : "337c284391b1c655",
"name" : "log",
"source" : "337c284391b1c655.txt",
"type" : "text/plain",
"size" : 3843
}, {
"uid" : "577cb4c088330e07",
"name" : "stdout",
"source" : "577cb4c088330e07.txt",
"type" : "text/plain",
"size" : 78
} ],
"parameters" : [ ],
"hasContent" : true,
"stepsCount" : 0,
"attachmentsCount" : 2,
"shouldDisplayMessage" : true
},
"afterStages" : [ {
"name" : "req_fix::0",
"time" : {
"start" : 1691399029988,
"stop" : 1691399029988,
"duration" : 0
},
"status" : "passed",
"steps" : [ ],
"attachments" : [ ],
"parameters" : [ ],
"hasContent" : false,
"stepsCount" : 0,
"attachmentsCount" : 0,
"shouldDisplayMessage" : false
}, {
"name" : "db_fix::0",
"time" : {
"start" : 1691399029987,
"stop" : 1691399029987,
"duration" : 0
},
"status" : "passed",
"steps" : [ ],
"attachments" : [ ],
"parameters" : [ ],
"hasContent" : false,
"stepsCount" : 0,
"attachmentsCount" : 0,
"shouldDisplayMessage" : false
} ],
"labels" : [ {
"name" : "feature",
"value" : "认证接口"
}, {
"name" : "story",
"value" : "刷新token"
}, {
"name" : "severity",
"value" : "中"
}, {
"name" : "epic",
"value" : "BPM系统"
}, {
"name" : "suite",
"value" : "test_bpm"
}, {
"name" : "subSuite",
"value" : "TestBPM"
}, {
"name" : "host",
"value" : "LAPTOP-31V3JBFR"
}, {
"name" : "thread",
"value" : "6412-MainThread"
}, {
"name" : "framework",
"value" : "pytest"
}, {
"name" : "language",
"value" : "cpython3"
}, {
"name" : "package",
"value" : "test_bpm"
}, {
"name" : "resultFormat",
"value" : "allure2"
} ],
"parameters" : [ {
"name" : "data",
"value" : "None"
}, {
"name" : "expect",
"value" : "{'message': '刷新token成功'}"
}, {
"name" : "interface",
"value" : "'刷新token'"
}, {
"name" : "level",
"value" : "'中'"
}, {
"name" : "method",
"value" : "'get'"
}, {
"name" : "mime",
"value" : "None"
}, {
"name" : "module",
"value" : "'认证接口'"
}, {
"name" : "sql_sentence",
"value" : "None"
}, {
"name" : "sql_type",
"value" : "None"
}, {
"name" : "title",
"value" : "'正向用例'"
}, {
"name" : "update_key",
"value" : "None"
}, {
"name" : "url",
"value" : "'http://120.46.172.186:8080/refresh'"
} ],
"links" : [ ],
"hidden" : false,
"retry" : false,
"extra" : {
"severity" : "normal",
"retries" : [ {
"uid" : "a87914af7f1df918",
"status" : "failed",
"statusDetails" : "AssertionError: 断言失败",
"time" : {
"start" : 1691399022389,
"stop" : 1691399022444,
"duration" : 55
}
}, {
"uid" : "6716e5503b45470b",
"status" : "failed",
"statusDetails" : "AssertionError: 断言失败",
"time" : {
"start" : 1691399021306,
"stop" : 1691399021363,
"duration" : 57
}
}, {
"uid" : "f0728c13556903da",
"status" : "failed",
"statusDetails" : "AssertionError: 断言失败",
"time" : {
"start" : 1691399020198,
"stop" : 1691399020267,
"duration" : 69
}
}, {
"uid" : "7e6a0a296e38c785",
"status" : "failed",
"statusDetails" : "AssertionError: 断言失败",
"time" : {
"start" : 1691399019103,
"stop" : 1691399019159,
"duration" : 56
}
}, {
"uid" : "3f71bbc6a20eada1",
"status" : "failed",
"statusDetails" : "AssertionError: 断言失败",
"time" : {
"start" : 1691399017807,
"stop" : 1691399017907,
"duration" : 100
}
} ],
"categories" : [ {
"name" : "Product defects",
"matchedStatuses" : [ ],
"flaky" : false
} ],
"tags" : [ ]
},
"source" : "cc13490ee94aa27d.json",
"parameterValues" : [ "None", "{'message': '刷新token成功'}", "'刷新token'", "'中'", "'get'", "None", "'认证接口'", "None", "None", "'正向用例'", "None", "'http://120.46.172.186:8080/refresh'" ]
}
\ No newline at end of file
{
"uid" : "d167a8fc92917bcd",
"name" : "正向用例",
"fullName" : "test_bpm.TestBPM#test_bpm",
"historyId" : "f37f5b35a33b0d851ad30e5c966f4068",
"time" : {
"start" : 1691399028670,
"stop" : 1691399028807,
"duration" : 137
},
"status" : "failed",
"statusMessage" : "AssertionError: 断言失败",
"statusTrace" : "self = <InterfaceAutoTest.test_case.test_bpm.TestBPM object at 0x00000257902F01C0>\nreq_fix = <InterfaceAutoTest.requests_method.requests_method.RequestsMethod object at 0x00000257902F0490>\ndb_fix = <InterfaceAutoTest.common.db.DB object at 0x00000257903D93D0>, module = '维度管理', interface = '根据维度编码删除维度', title = '正向用例'\nlevel = '高', method = 'DELETE', url = 'http://120.46.172.186:8080/api/demension/v1/dem/deleteDemByIds', mime = 'query'\ndata = {'ids': '1688475997541777408'}, expect = {'message': '删除维度成功', 'state': True}, sql_type = 'select'\nsql_sentence = 'SELECT ID_ FROM uc_demension WHERE `CODE_`=\"test56_dem\";', update_key = 'ids'\n\n @allure.epic(\"BPM系统\")\n @pytest.mark.parametrize(\"module, interface, title, level, method, url, mime, data, expect, sql_type, sql_sentence, update_key\", ReadExcel().get_data())\n def test_bpm(self, req_fix, db_fix, module, interface, title, level, method, url, mime, data, expect, sql_type, sql_sentence, update_key):\n allure.dynamic.feature(module)\n allure.dynamic.story(interface)\n allure.dynamic.title(title)\n allure.dynamic.severity(level)\n \n # 1.1:判断sql语句的类型是否为delete\n if sql_type == \"delete\":\n # 1.2 使用DB类对象,调用delete方法执行删除的sql语句\n db_fix.delete(sql_sentence)\n # # 1.3 使用RequestsMethod类对象调用request_all方法发送请求\n # result = req_fix.request_all(req_method=method, req_url=url, req_mime=mime, case_data=data)\n \n # 2.1 判断sql语句的类型是否为select\n elif sql_type == \"select\":\n # 2.2 使用DB类对象,调用select方法执行查询的sql语句,并接收查询结果\n select_result = db_fix.select(sql_sentence)\n # 2.3 将查询结果更新到用例数据中\n data[update_key] = select_result\n # # 2.3 使用RequestsMethod类对象调用request_all方法发送请求\n # result = req_fix.request_all(req_method=method, req_url=url, req_mime=mime, case_data=data)\n \n # 3.1 判断sql语句的类型是否delete|select或者为select|delete\n elif sql_type == \"delete|select\" or sql_type == \"select|delete\":\n # 3.2 使用DB类对象,调用delete方法执行删除的sql语句\n db_fix.delete(sql_sentence[\"delete\"])\n # 3.3 使用DB类对象,调用select方法执行查询的sql语句,并接收查询结果\n select_result = db_fix.select(sql_sentence[\"select\"])\n # 3.4 将查询结果更新到用例数据中\n data[update_key] = select_result\n # # 3.5 使用RequestsMethod类对象调用request_all方法发送请求\n # result = req_fix.request_all(req_method=method, req_url=url, req_mime=mime, case_data=data)\n #\n # else:\n # result = req_fix.request_all(req_method=method, req_url=url, req_mime=mime, case_data=data)\n \n result = req_fix.request_all(req_method=method, req_url=url, req_mime=mime, case_data=data)\n \n # 断言\n try:\n for key in expect:\n> assert expect[key] == result.json().get(key)\nE AssertionError: assert True == False\nE + where False = <built-in method get of dict object at 0x000002579047D040>('state')\nE + where <built-in method get of dict object at 0x000002579047D040> = {'logId': '1688476018974670848', 'message': '', 'state': False}.get\nE + where {'logId': '1688476018974670848', 'message': '', 'state': False} = <bound method Response.json of <Response [500]>>()\nE + where <bound method Response.json of <Response [500]>> = <Response [500]>.json\n\ntest_bpm.py:61: AssertionError\n\nDuring handling of the above exception, another exception occurred:\n\nself = <InterfaceAutoTest.test_case.test_bpm.TestBPM object at 0x00000257902F01C0>\nreq_fix = <InterfaceAutoTest.requests_method.requests_method.RequestsMethod object at 0x00000257902F0490>\ndb_fix = <InterfaceAutoTest.common.db.DB object at 0x00000257903D93D0>, module = '维度管理', interface = '根据维度编码删除维度', title = '正向用例'\nlevel = '高', method = 'DELETE', url = 'http://120.46.172.186:8080/api/demension/v1/dem/deleteDemByIds', mime = 'query'\ndata = {'ids': '1688475997541777408'}, expect = {'message': '删除维度成功', 'state': True}, sql_type = 'select'\nsql_sentence = 'SELECT ID_ FROM uc_demension WHERE `CODE_`=\"test56_dem\";', update_key = 'ids'\n\n @allure.epic(\"BPM系统\")\n @pytest.mark.parametrize(\"module, interface, title, level, method, url, mime, data, expect, sql_type, sql_sentence, update_key\", ReadExcel().get_data())\n def test_bpm(self, req_fix, db_fix, module, interface, title, level, method, url, mime, data, expect, sql_type, sql_sentence, update_key):\n allure.dynamic.feature(module)\n allure.dynamic.story(interface)\n allure.dynamic.title(title)\n allure.dynamic.severity(level)\n \n # 1.1:判断sql语句的类型是否为delete\n if sql_type == \"delete\":\n # 1.2 使用DB类对象,调用delete方法执行删除的sql语句\n db_fix.delete(sql_sentence)\n # # 1.3 使用RequestsMethod类对象调用request_all方法发送请求\n # result = req_fix.request_all(req_method=method, req_url=url, req_mime=mime, case_data=data)\n \n # 2.1 判断sql语句的类型是否为select\n elif sql_type == \"select\":\n # 2.2 使用DB类对象,调用select方法执行查询的sql语句,并接收查询结果\n select_result = db_fix.select(sql_sentence)\n # 2.3 将查询结果更新到用例数据中\n data[update_key] = select_result\n # # 2.3 使用RequestsMethod类对象调用request_all方法发送请求\n # result = req_fix.request_all(req_method=method, req_url=url, req_mime=mime, case_data=data)\n \n # 3.1 判断sql语句的类型是否delete|select或者为select|delete\n elif sql_type == \"delete|select\" or sql_type == \"select|delete\":\n # 3.2 使用DB类对象,调用delete方法执行删除的sql语句\n db_fix.delete(sql_sentence[\"delete\"])\n # 3.3 使用DB类对象,调用select方法执行查询的sql语句,并接收查询结果\n select_result = db_fix.select(sql_sentence[\"select\"])\n # 3.4 将查询结果更新到用例数据中\n data[update_key] = select_result\n # # 3.5 使用RequestsMethod类对象调用request_all方法发送请求\n # result = req_fix.request_all(req_method=method, req_url=url, req_mime=mime, case_data=data)\n #\n # else:\n # result = req_fix.request_all(req_method=method, req_url=url, req_mime=mime, case_data=data)\n \n result = req_fix.request_all(req_method=method, req_url=url, req_mime=mime, case_data=data)\n \n # 断言\n try:\n for key in expect:\n assert expect[key] == result.json().get(key)\n except:\n print(\"断言失败\")\n logging.error(\"断言失败, 模块名称为:{},接口名称为:{},用例标题:{},用例为:{},期望结果为:{},服务器返回数据为:{}\".format(module, interface, title, str(data), str(expect), result.text))\n> raise AssertionError(\"断言失败\")\nE AssertionError: 断言失败\n\ntest_bpm.py:65: AssertionError",
"flaky" : false,
"newFailed" : false,
"beforeStages" : [ {
"name" : "_session_faker",
"time" : {
"start" : 1691399016370,
"stop" : 1691399016483,
"duration" : 113
},
"status" : "passed",
"steps" : [ ],
"attachments" : [ ],
"parameters" : [ ],
"hasContent" : false,
"stepsCount" : 0,
"attachmentsCount" : 0,
"shouldDisplayMessage" : false
}, {
"name" : "req_fix",
"time" : {
"start" : 1691399016483,
"stop" : 1691399016584,
"duration" : 101
},
"status" : "passed",
"steps" : [ ],
"attachments" : [ ],
"parameters" : [ ],
"hasContent" : false,
"stepsCount" : 0,
"attachmentsCount" : 0,
"shouldDisplayMessage" : false
}, {
"name" : "db_fix",
"time" : {
"start" : 1691399016584,
"stop" : 1691399016789,
"duration" : 205
},
"status" : "passed",
"steps" : [ ],
"attachments" : [ ],
"parameters" : [ ],
"hasContent" : false,
"stepsCount" : 0,
"attachmentsCount" : 0,
"shouldDisplayMessage" : false
} ],
"testStage" : {
"status" : "failed",
"statusMessage" : "AssertionError: 断言失败",
"statusTrace" : "self = <InterfaceAutoTest.test_case.test_bpm.TestBPM object at 0x00000257902F01C0>\nreq_fix = <InterfaceAutoTest.requests_method.requests_method.RequestsMethod object at 0x00000257902F0490>\ndb_fix = <InterfaceAutoTest.common.db.DB object at 0x00000257903D93D0>, module = '维度管理', interface = '根据维度编码删除维度', title = '正向用例'\nlevel = '高', method = 'DELETE', url = 'http://120.46.172.186:8080/api/demension/v1/dem/deleteDemByIds', mime = 'query'\ndata = {'ids': '1688475997541777408'}, expect = {'message': '删除维度成功', 'state': True}, sql_type = 'select'\nsql_sentence = 'SELECT ID_ FROM uc_demension WHERE `CODE_`=\"test56_dem\";', update_key = 'ids'\n\n @allure.epic(\"BPM系统\")\n @pytest.mark.parametrize(\"module, interface, title, level, method, url, mime, data, expect, sql_type, sql_sentence, update_key\", ReadExcel().get_data())\n def test_bpm(self, req_fix, db_fix, module, interface, title, level, method, url, mime, data, expect, sql_type, sql_sentence, update_key):\n allure.dynamic.feature(module)\n allure.dynamic.story(interface)\n allure.dynamic.title(title)\n allure.dynamic.severity(level)\n \n # 1.1:判断sql语句的类型是否为delete\n if sql_type == \"delete\":\n # 1.2 使用DB类对象,调用delete方法执行删除的sql语句\n db_fix.delete(sql_sentence)\n # # 1.3 使用RequestsMethod类对象调用request_all方法发送请求\n # result = req_fix.request_all(req_method=method, req_url=url, req_mime=mime, case_data=data)\n \n # 2.1 判断sql语句的类型是否为select\n elif sql_type == \"select\":\n # 2.2 使用DB类对象,调用select方法执行查询的sql语句,并接收查询结果\n select_result = db_fix.select(sql_sentence)\n # 2.3 将查询结果更新到用例数据中\n data[update_key] = select_result\n # # 2.3 使用RequestsMethod类对象调用request_all方法发送请求\n # result = req_fix.request_all(req_method=method, req_url=url, req_mime=mime, case_data=data)\n \n # 3.1 判断sql语句的类型是否delete|select或者为select|delete\n elif sql_type == \"delete|select\" or sql_type == \"select|delete\":\n # 3.2 使用DB类对象,调用delete方法执行删除的sql语句\n db_fix.delete(sql_sentence[\"delete\"])\n # 3.3 使用DB类对象,调用select方法执行查询的sql语句,并接收查询结果\n select_result = db_fix.select(sql_sentence[\"select\"])\n # 3.4 将查询结果更新到用例数据中\n data[update_key] = select_result\n # # 3.5 使用RequestsMethod类对象调用request_all方法发送请求\n # result = req_fix.request_all(req_method=method, req_url=url, req_mime=mime, case_data=data)\n #\n # else:\n # result = req_fix.request_all(req_method=method, req_url=url, req_mime=mime, case_data=data)\n \n result = req_fix.request_all(req_method=method, req_url=url, req_mime=mime, case_data=data)\n \n # 断言\n try:\n for key in expect:\n> assert expect[key] == result.json().get(key)\nE AssertionError: assert True == False\nE + where False = <built-in method get of dict object at 0x000002579047D040>('state')\nE + where <built-in method get of dict object at 0x000002579047D040> = {'logId': '1688476018974670848', 'message': '', 'state': False}.get\nE + where {'logId': '1688476018974670848', 'message': '', 'state': False} = <bound method Response.json of <Response [500]>>()\nE + where <bound method Response.json of <Response [500]>> = <Response [500]>.json\n\ntest_bpm.py:61: AssertionError\n\nDuring handling of the above exception, another exception occurred:\n\nself = <InterfaceAutoTest.test_case.test_bpm.TestBPM object at 0x00000257902F01C0>\nreq_fix = <InterfaceAutoTest.requests_method.requests_method.RequestsMethod object at 0x00000257902F0490>\ndb_fix = <InterfaceAutoTest.common.db.DB object at 0x00000257903D93D0>, module = '维度管理', interface = '根据维度编码删除维度', title = '正向用例'\nlevel = '高', method = 'DELETE', url = 'http://120.46.172.186:8080/api/demension/v1/dem/deleteDemByIds', mime = 'query'\ndata = {'ids': '1688475997541777408'}, expect = {'message': '删除维度成功', 'state': True}, sql_type = 'select'\nsql_sentence = 'SELECT ID_ FROM uc_demension WHERE `CODE_`=\"test56_dem\";', update_key = 'ids'\n\n @allure.epic(\"BPM系统\")\n @pytest.mark.parametrize(\"module, interface, title, level, method, url, mime, data, expect, sql_type, sql_sentence, update_key\", ReadExcel().get_data())\n def test_bpm(self, req_fix, db_fix, module, interface, title, level, method, url, mime, data, expect, sql_type, sql_sentence, update_key):\n allure.dynamic.feature(module)\n allure.dynamic.story(interface)\n allure.dynamic.title(title)\n allure.dynamic.severity(level)\n \n # 1.1:判断sql语句的类型是否为delete\n if sql_type == \"delete\":\n # 1.2 使用DB类对象,调用delete方法执行删除的sql语句\n db_fix.delete(sql_sentence)\n # # 1.3 使用RequestsMethod类对象调用request_all方法发送请求\n # result = req_fix.request_all(req_method=method, req_url=url, req_mime=mime, case_data=data)\n \n # 2.1 判断sql语句的类型是否为select\n elif sql_type == \"select\":\n # 2.2 使用DB类对象,调用select方法执行查询的sql语句,并接收查询结果\n select_result = db_fix.select(sql_sentence)\n # 2.3 将查询结果更新到用例数据中\n data[update_key] = select_result\n # # 2.3 使用RequestsMethod类对象调用request_all方法发送请求\n # result = req_fix.request_all(req_method=method, req_url=url, req_mime=mime, case_data=data)\n \n # 3.1 判断sql语句的类型是否delete|select或者为select|delete\n elif sql_type == \"delete|select\" or sql_type == \"select|delete\":\n # 3.2 使用DB类对象,调用delete方法执行删除的sql语句\n db_fix.delete(sql_sentence[\"delete\"])\n # 3.3 使用DB类对象,调用select方法执行查询的sql语句,并接收查询结果\n select_result = db_fix.select(sql_sentence[\"select\"])\n # 3.4 将查询结果更新到用例数据中\n data[update_key] = select_result\n # # 3.5 使用RequestsMethod类对象调用request_all方法发送请求\n # result = req_fix.request_all(req_method=method, req_url=url, req_mime=mime, case_data=data)\n #\n # else:\n # result = req_fix.request_all(req_method=method, req_url=url, req_mime=mime, case_data=data)\n \n result = req_fix.request_all(req_method=method, req_url=url, req_mime=mime, case_data=data)\n \n # 断言\n try:\n for key in expect:\n assert expect[key] == result.json().get(key)\n except:\n print(\"断言失败\")\n logging.error(\"断言失败, 模块名称为:{},接口名称为:{},用例标题:{},用例为:{},期望结果为:{},服务器返回数据为:{}\".format(module, interface, title, str(data), str(expect), result.text))\n> raise AssertionError(\"断言失败\")\nE AssertionError: 断言失败\n\ntest_bpm.py:65: AssertionError",
"steps" : [ ],
"attachments" : [ {
"uid" : "42e522108c3b0f17",
"name" : "log",
"source" : "42e522108c3b0f17.txt",
"type" : "text/plain",
"size" : 2851
}, {
"uid" : "a990f89b36c9470c",
"name" : "stdout",
"source" : "a990f89b36c9470c.txt",
"type" : "text/plain",
"size" : 65
} ],
"parameters" : [ ],
"hasContent" : true,
"stepsCount" : 0,
"attachmentsCount" : 2,
"shouldDisplayMessage" : true
},
"afterStages" : [ {
"name" : "req_fix::0",
"time" : {
"start" : 1691399029988,
"stop" : 1691399029988,
"duration" : 0
},
"status" : "passed",
"steps" : [ ],
"attachments" : [ ],
"parameters" : [ ],
"hasContent" : false,
"stepsCount" : 0,
"attachmentsCount" : 0,
"shouldDisplayMessage" : false
}, {
"name" : "db_fix::0",
"time" : {
"start" : 1691399029987,
"stop" : 1691399029987,
"duration" : 0
},
"status" : "passed",
"steps" : [ ],
"attachments" : [ ],
"parameters" : [ ],
"hasContent" : false,
"stepsCount" : 0,
"attachmentsCount" : 0,
"shouldDisplayMessage" : false
} ],
"labels" : [ {
"name" : "feature",
"value" : "维度管理"
}, {
"name" : "story",
"value" : "根据维度编码删除维度"
}, {
"name" : "severity",
"value" : "高"
}, {
"name" : "epic",
"value" : "BPM系统"
}, {
"name" : "suite",
"value" : "test_bpm"
}, {
"name" : "subSuite",
"value" : "TestBPM"
}, {
"name" : "host",
"value" : "LAPTOP-31V3JBFR"
}, {
"name" : "thread",
"value" : "6412-MainThread"
}, {
"name" : "framework",
"value" : "pytest"
}, {
"name" : "language",
"value" : "cpython3"
}, {
"name" : "package",
"value" : "test_bpm"
}, {
"name" : "resultFormat",
"value" : "allure2"
} ],
"parameters" : [ {
"name" : "data",
"value" : "{'ids': '1688475997541777408'}"
}, {
"name" : "expect",
"value" : "{'state': True, 'message': '删除维度成功'}"
}, {
"name" : "interface",
"value" : "'根据维度编码删除维度'"
}, {
"name" : "level",
"value" : "'高'"
}, {
"name" : "method",
"value" : "'DELETE'"
}, {
"name" : "mime",
"value" : "'query'"
}, {
"name" : "module",
"value" : "'维度管理'"
}, {
"name" : "sql_sentence",
"value" : "'SELECT ID_ FROM uc_demension WHERE `CODE_`=\"test56_dem\";'"
}, {
"name" : "sql_type",
"value" : "'select'"
}, {
"name" : "title",
"value" : "'正向用例'"
}, {
"name" : "update_key",
"value" : "'ids'"
}, {
"name" : "url",
"value" : "'http://120.46.172.186:8080/api/demension/v1/dem/deleteDemByIds'"
} ],
"links" : [ ],
"hidden" : true,
"retry" : true,
"extra" : {
"categories" : [ ],
"tags" : [ ]
},
"source" : "d167a8fc92917bcd.json",
"parameterValues" : [ "{'ids': '1688475997541777408'}", "{'state': True, 'message': '删除维度成功'}", "'根据维度编码删除维度'", "'高'", "'DELETE'", "'query'", "'维度管理'", "'SELECT ID_ FROM uc_demension WHERE `CODE_`=\"test56_dem\";'", "'select'", "'正向用例'", "'ids'", "'http://120.46.172.186:8080/api/demension/v1/dem/deleteDemByIds'" ]
}
\ No newline at end of file
{
"uid" : "e4242ec0f8914826",
"name" : "正向用例",
"fullName" : "test_bpm.TestBPM#test_bpm",
"historyId" : "f37f5b35a33b0d851ad30e5c966f4068",
"time" : {
"start" : 1691399027504,
"stop" : 1691399027636,
"duration" : 132
},
"status" : "failed",
"statusMessage" : "AssertionError: 断言失败",
"statusTrace" : "self = <InterfaceAutoTest.test_case.test_bpm.TestBPM object at 0x00000257902F01C0>\nreq_fix = <InterfaceAutoTest.requests_method.requests_method.RequestsMethod object at 0x00000257902F0490>\ndb_fix = <InterfaceAutoTest.common.db.DB object at 0x00000257903D93D0>, module = '维度管理', interface = '根据维度编码删除维度', title = '正向用例'\nlevel = '高', method = 'DELETE', url = 'http://120.46.172.186:8080/api/demension/v1/dem/deleteDemByIds', mime = 'query'\ndata = {'ids': '1688475997541777408'}, expect = {'message': '删除维度成功', 'state': True}, sql_type = 'select'\nsql_sentence = 'SELECT ID_ FROM uc_demension WHERE `CODE_`=\"test56_dem\";', update_key = 'ids'\n\n @allure.epic(\"BPM系统\")\n @pytest.mark.parametrize(\"module, interface, title, level, method, url, mime, data, expect, sql_type, sql_sentence, update_key\", ReadExcel().get_data())\n def test_bpm(self, req_fix, db_fix, module, interface, title, level, method, url, mime, data, expect, sql_type, sql_sentence, update_key):\n allure.dynamic.feature(module)\n allure.dynamic.story(interface)\n allure.dynamic.title(title)\n allure.dynamic.severity(level)\n \n # 1.1:判断sql语句的类型是否为delete\n if sql_type == \"delete\":\n # 1.2 使用DB类对象,调用delete方法执行删除的sql语句\n db_fix.delete(sql_sentence)\n # # 1.3 使用RequestsMethod类对象调用request_all方法发送请求\n # result = req_fix.request_all(req_method=method, req_url=url, req_mime=mime, case_data=data)\n \n # 2.1 判断sql语句的类型是否为select\n elif sql_type == \"select\":\n # 2.2 使用DB类对象,调用select方法执行查询的sql语句,并接收查询结果\n select_result = db_fix.select(sql_sentence)\n # 2.3 将查询结果更新到用例数据中\n data[update_key] = select_result\n # # 2.3 使用RequestsMethod类对象调用request_all方法发送请求\n # result = req_fix.request_all(req_method=method, req_url=url, req_mime=mime, case_data=data)\n \n # 3.1 判断sql语句的类型是否delete|select或者为select|delete\n elif sql_type == \"delete|select\" or sql_type == \"select|delete\":\n # 3.2 使用DB类对象,调用delete方法执行删除的sql语句\n db_fix.delete(sql_sentence[\"delete\"])\n # 3.3 使用DB类对象,调用select方法执行查询的sql语句,并接收查询结果\n select_result = db_fix.select(sql_sentence[\"select\"])\n # 3.4 将查询结果更新到用例数据中\n data[update_key] = select_result\n # # 3.5 使用RequestsMethod类对象调用request_all方法发送请求\n # result = req_fix.request_all(req_method=method, req_url=url, req_mime=mime, case_data=data)\n #\n # else:\n # result = req_fix.request_all(req_method=method, req_url=url, req_mime=mime, case_data=data)\n \n result = req_fix.request_all(req_method=method, req_url=url, req_mime=mime, case_data=data)\n \n # 断言\n try:\n for key in expect:\n> assert expect[key] == result.json().get(key)\nE AssertionError: assert True == False\nE + where False = <built-in method get of dict object at 0x0000025790486600>('state')\nE + where <built-in method get of dict object at 0x0000025790486600> = {'logId': '1688476014071529472', 'message': '', 'state': False}.get\nE + where {'logId': '1688476014071529472', 'message': '', 'state': False} = <bound method Response.json of <Response [500]>>()\nE + where <bound method Response.json of <Response [500]>> = <Response [500]>.json\n\ntest_bpm.py:61: AssertionError\n\nDuring handling of the above exception, another exception occurred:\n\nself = <InterfaceAutoTest.test_case.test_bpm.TestBPM object at 0x00000257902F01C0>\nreq_fix = <InterfaceAutoTest.requests_method.requests_method.RequestsMethod object at 0x00000257902F0490>\ndb_fix = <InterfaceAutoTest.common.db.DB object at 0x00000257903D93D0>, module = '维度管理', interface = '根据维度编码删除维度', title = '正向用例'\nlevel = '高', method = 'DELETE', url = 'http://120.46.172.186:8080/api/demension/v1/dem/deleteDemByIds', mime = 'query'\ndata = {'ids': '1688475997541777408'}, expect = {'message': '删除维度成功', 'state': True}, sql_type = 'select'\nsql_sentence = 'SELECT ID_ FROM uc_demension WHERE `CODE_`=\"test56_dem\";', update_key = 'ids'\n\n @allure.epic(\"BPM系统\")\n @pytest.mark.parametrize(\"module, interface, title, level, method, url, mime, data, expect, sql_type, sql_sentence, update_key\", ReadExcel().get_data())\n def test_bpm(self, req_fix, db_fix, module, interface, title, level, method, url, mime, data, expect, sql_type, sql_sentence, update_key):\n allure.dynamic.feature(module)\n allure.dynamic.story(interface)\n allure.dynamic.title(title)\n allure.dynamic.severity(level)\n \n # 1.1:判断sql语句的类型是否为delete\n if sql_type == \"delete\":\n # 1.2 使用DB类对象,调用delete方法执行删除的sql语句\n db_fix.delete(sql_sentence)\n # # 1.3 使用RequestsMethod类对象调用request_all方法发送请求\n # result = req_fix.request_all(req_method=method, req_url=url, req_mime=mime, case_data=data)\n \n # 2.1 判断sql语句的类型是否为select\n elif sql_type == \"select\":\n # 2.2 使用DB类对象,调用select方法执行查询的sql语句,并接收查询结果\n select_result = db_fix.select(sql_sentence)\n # 2.3 将查询结果更新到用例数据中\n data[update_key] = select_result\n # # 2.3 使用RequestsMethod类对象调用request_all方法发送请求\n # result = req_fix.request_all(req_method=method, req_url=url, req_mime=mime, case_data=data)\n \n # 3.1 判断sql语句的类型是否delete|select或者为select|delete\n elif sql_type == \"delete|select\" or sql_type == \"select|delete\":\n # 3.2 使用DB类对象,调用delete方法执行删除的sql语句\n db_fix.delete(sql_sentence[\"delete\"])\n # 3.3 使用DB类对象,调用select方法执行查询的sql语句,并接收查询结果\n select_result = db_fix.select(sql_sentence[\"select\"])\n # 3.4 将查询结果更新到用例数据中\n data[update_key] = select_result\n # # 3.5 使用RequestsMethod类对象调用request_all方法发送请求\n # result = req_fix.request_all(req_method=method, req_url=url, req_mime=mime, case_data=data)\n #\n # else:\n # result = req_fix.request_all(req_method=method, req_url=url, req_mime=mime, case_data=data)\n \n result = req_fix.request_all(req_method=method, req_url=url, req_mime=mime, case_data=data)\n \n # 断言\n try:\n for key in expect:\n assert expect[key] == result.json().get(key)\n except:\n print(\"断言失败\")\n logging.error(\"断言失败, 模块名称为:{},接口名称为:{},用例标题:{},用例为:{},期望结果为:{},服务器返回数据为:{}\".format(module, interface, title, str(data), str(expect), result.text))\n> raise AssertionError(\"断言失败\")\nE AssertionError: 断言失败\n\ntest_bpm.py:65: AssertionError",
"flaky" : false,
"newFailed" : false,
"beforeStages" : [ {
"name" : "_session_faker",
"time" : {
"start" : 1691399016370,
"stop" : 1691399016483,
"duration" : 113
},
"status" : "passed",
"steps" : [ ],
"attachments" : [ ],
"parameters" : [ ],
"hasContent" : false,
"stepsCount" : 0,
"attachmentsCount" : 0,
"shouldDisplayMessage" : false
}, {
"name" : "req_fix",
"time" : {
"start" : 1691399016483,
"stop" : 1691399016584,
"duration" : 101
},
"status" : "passed",
"steps" : [ ],
"attachments" : [ ],
"parameters" : [ ],
"hasContent" : false,
"stepsCount" : 0,
"attachmentsCount" : 0,
"shouldDisplayMessage" : false
}, {
"name" : "db_fix",
"time" : {
"start" : 1691399016584,
"stop" : 1691399016789,
"duration" : 205
},
"status" : "passed",
"steps" : [ ],
"attachments" : [ ],
"parameters" : [ ],
"hasContent" : false,
"stepsCount" : 0,
"attachmentsCount" : 0,
"shouldDisplayMessage" : false
} ],
"testStage" : {
"status" : "failed",
"statusMessage" : "AssertionError: 断言失败",
"statusTrace" : "self = <InterfaceAutoTest.test_case.test_bpm.TestBPM object at 0x00000257902F01C0>\nreq_fix = <InterfaceAutoTest.requests_method.requests_method.RequestsMethod object at 0x00000257902F0490>\ndb_fix = <InterfaceAutoTest.common.db.DB object at 0x00000257903D93D0>, module = '维度管理', interface = '根据维度编码删除维度', title = '正向用例'\nlevel = '高', method = 'DELETE', url = 'http://120.46.172.186:8080/api/demension/v1/dem/deleteDemByIds', mime = 'query'\ndata = {'ids': '1688475997541777408'}, expect = {'message': '删除维度成功', 'state': True}, sql_type = 'select'\nsql_sentence = 'SELECT ID_ FROM uc_demension WHERE `CODE_`=\"test56_dem\";', update_key = 'ids'\n\n @allure.epic(\"BPM系统\")\n @pytest.mark.parametrize(\"module, interface, title, level, method, url, mime, data, expect, sql_type, sql_sentence, update_key\", ReadExcel().get_data())\n def test_bpm(self, req_fix, db_fix, module, interface, title, level, method, url, mime, data, expect, sql_type, sql_sentence, update_key):\n allure.dynamic.feature(module)\n allure.dynamic.story(interface)\n allure.dynamic.title(title)\n allure.dynamic.severity(level)\n \n # 1.1:判断sql语句的类型是否为delete\n if sql_type == \"delete\":\n # 1.2 使用DB类对象,调用delete方法执行删除的sql语句\n db_fix.delete(sql_sentence)\n # # 1.3 使用RequestsMethod类对象调用request_all方法发送请求\n # result = req_fix.request_all(req_method=method, req_url=url, req_mime=mime, case_data=data)\n \n # 2.1 判断sql语句的类型是否为select\n elif sql_type == \"select\":\n # 2.2 使用DB类对象,调用select方法执行查询的sql语句,并接收查询结果\n select_result = db_fix.select(sql_sentence)\n # 2.3 将查询结果更新到用例数据中\n data[update_key] = select_result\n # # 2.3 使用RequestsMethod类对象调用request_all方法发送请求\n # result = req_fix.request_all(req_method=method, req_url=url, req_mime=mime, case_data=data)\n \n # 3.1 判断sql语句的类型是否delete|select或者为select|delete\n elif sql_type == \"delete|select\" or sql_type == \"select|delete\":\n # 3.2 使用DB类对象,调用delete方法执行删除的sql语句\n db_fix.delete(sql_sentence[\"delete\"])\n # 3.3 使用DB类对象,调用select方法执行查询的sql语句,并接收查询结果\n select_result = db_fix.select(sql_sentence[\"select\"])\n # 3.4 将查询结果更新到用例数据中\n data[update_key] = select_result\n # # 3.5 使用RequestsMethod类对象调用request_all方法发送请求\n # result = req_fix.request_all(req_method=method, req_url=url, req_mime=mime, case_data=data)\n #\n # else:\n # result = req_fix.request_all(req_method=method, req_url=url, req_mime=mime, case_data=data)\n \n result = req_fix.request_all(req_method=method, req_url=url, req_mime=mime, case_data=data)\n \n # 断言\n try:\n for key in expect:\n> assert expect[key] == result.json().get(key)\nE AssertionError: assert True == False\nE + where False = <built-in method get of dict object at 0x0000025790486600>('state')\nE + where <built-in method get of dict object at 0x0000025790486600> = {'logId': '1688476014071529472', 'message': '', 'state': False}.get\nE + where {'logId': '1688476014071529472', 'message': '', 'state': False} = <bound method Response.json of <Response [500]>>()\nE + where <bound method Response.json of <Response [500]>> = <Response [500]>.json\n\ntest_bpm.py:61: AssertionError\n\nDuring handling of the above exception, another exception occurred:\n\nself = <InterfaceAutoTest.test_case.test_bpm.TestBPM object at 0x00000257902F01C0>\nreq_fix = <InterfaceAutoTest.requests_method.requests_method.RequestsMethod object at 0x00000257902F0490>\ndb_fix = <InterfaceAutoTest.common.db.DB object at 0x00000257903D93D0>, module = '维度管理', interface = '根据维度编码删除维度', title = '正向用例'\nlevel = '高', method = 'DELETE', url = 'http://120.46.172.186:8080/api/demension/v1/dem/deleteDemByIds', mime = 'query'\ndata = {'ids': '1688475997541777408'}, expect = {'message': '删除维度成功', 'state': True}, sql_type = 'select'\nsql_sentence = 'SELECT ID_ FROM uc_demension WHERE `CODE_`=\"test56_dem\";', update_key = 'ids'\n\n @allure.epic(\"BPM系统\")\n @pytest.mark.parametrize(\"module, interface, title, level, method, url, mime, data, expect, sql_type, sql_sentence, update_key\", ReadExcel().get_data())\n def test_bpm(self, req_fix, db_fix, module, interface, title, level, method, url, mime, data, expect, sql_type, sql_sentence, update_key):\n allure.dynamic.feature(module)\n allure.dynamic.story(interface)\n allure.dynamic.title(title)\n allure.dynamic.severity(level)\n \n # 1.1:判断sql语句的类型是否为delete\n if sql_type == \"delete\":\n # 1.2 使用DB类对象,调用delete方法执行删除的sql语句\n db_fix.delete(sql_sentence)\n # # 1.3 使用RequestsMethod类对象调用request_all方法发送请求\n # result = req_fix.request_all(req_method=method, req_url=url, req_mime=mime, case_data=data)\n \n # 2.1 判断sql语句的类型是否为select\n elif sql_type == \"select\":\n # 2.2 使用DB类对象,调用select方法执行查询的sql语句,并接收查询结果\n select_result = db_fix.select(sql_sentence)\n # 2.3 将查询结果更新到用例数据中\n data[update_key] = select_result\n # # 2.3 使用RequestsMethod类对象调用request_all方法发送请求\n # result = req_fix.request_all(req_method=method, req_url=url, req_mime=mime, case_data=data)\n \n # 3.1 判断sql语句的类型是否delete|select或者为select|delete\n elif sql_type == \"delete|select\" or sql_type == \"select|delete\":\n # 3.2 使用DB类对象,调用delete方法执行删除的sql语句\n db_fix.delete(sql_sentence[\"delete\"])\n # 3.3 使用DB类对象,调用select方法执行查询的sql语句,并接收查询结果\n select_result = db_fix.select(sql_sentence[\"select\"])\n # 3.4 将查询结果更新到用例数据中\n data[update_key] = select_result\n # # 3.5 使用RequestsMethod类对象调用request_all方法发送请求\n # result = req_fix.request_all(req_method=method, req_url=url, req_mime=mime, case_data=data)\n #\n # else:\n # result = req_fix.request_all(req_method=method, req_url=url, req_mime=mime, case_data=data)\n \n result = req_fix.request_all(req_method=method, req_url=url, req_mime=mime, case_data=data)\n \n # 断言\n try:\n for key in expect:\n assert expect[key] == result.json().get(key)\n except:\n print(\"断言失败\")\n logging.error(\"断言失败, 模块名称为:{},接口名称为:{},用例标题:{},用例为:{},期望结果为:{},服务器返回数据为:{}\".format(module, interface, title, str(data), str(expect), result.text))\n> raise AssertionError(\"断言失败\")\nE AssertionError: 断言失败\n\ntest_bpm.py:65: AssertionError",
"steps" : [ ],
"attachments" : [ {
"uid" : "3d95e7a75e1ef022",
"name" : "log",
"source" : "3d95e7a75e1ef022.txt",
"type" : "text/plain",
"size" : 2248
}, {
"uid" : "4533b1c1cb1a1ab4",
"name" : "stdout",
"source" : "4533b1c1cb1a1ab4.txt",
"type" : "text/plain",
"size" : 52
} ],
"parameters" : [ ],
"hasContent" : true,
"stepsCount" : 0,
"attachmentsCount" : 2,
"shouldDisplayMessage" : true
},
"afterStages" : [ {
"name" : "req_fix::0",
"time" : {
"start" : 1691399029988,
"stop" : 1691399029988,
"duration" : 0
},
"status" : "passed",
"steps" : [ ],
"attachments" : [ ],
"parameters" : [ ],
"hasContent" : false,
"stepsCount" : 0,
"attachmentsCount" : 0,
"shouldDisplayMessage" : false
}, {
"name" : "db_fix::0",
"time" : {
"start" : 1691399029987,
"stop" : 1691399029987,
"duration" : 0
},
"status" : "passed",
"steps" : [ ],
"attachments" : [ ],
"parameters" : [ ],
"hasContent" : false,
"stepsCount" : 0,
"attachmentsCount" : 0,
"shouldDisplayMessage" : false
} ],
"labels" : [ {
"name" : "feature",
"value" : "维度管理"
}, {
"name" : "story",
"value" : "根据维度编码删除维度"
}, {
"name" : "severity",
"value" : "高"
}, {
"name" : "epic",
"value" : "BPM系统"
}, {
"name" : "suite",
"value" : "test_bpm"
}, {
"name" : "subSuite",
"value" : "TestBPM"
}, {
"name" : "host",
"value" : "LAPTOP-31V3JBFR"
}, {
"name" : "thread",
"value" : "6412-MainThread"
}, {
"name" : "framework",
"value" : "pytest"
}, {
"name" : "language",
"value" : "cpython3"
}, {
"name" : "package",
"value" : "test_bpm"
}, {
"name" : "resultFormat",
"value" : "allure2"
} ],
"parameters" : [ {
"name" : "data",
"value" : "{'ids': '1688475997541777408'}"
}, {
"name" : "expect",
"value" : "{'state': True, 'message': '删除维度成功'}"
}, {
"name" : "interface",
"value" : "'根据维度编码删除维度'"
}, {
"name" : "level",
"value" : "'高'"
}, {
"name" : "method",
"value" : "'DELETE'"
}, {
"name" : "mime",
"value" : "'query'"
}, {
"name" : "module",
"value" : "'维度管理'"
}, {
"name" : "sql_sentence",
"value" : "'SELECT ID_ FROM uc_demension WHERE `CODE_`=\"test56_dem\";'"
}, {
"name" : "sql_type",
"value" : "'select'"
}, {
"name" : "title",
"value" : "'正向用例'"
}, {
"name" : "update_key",
"value" : "'ids'"
}, {
"name" : "url",
"value" : "'http://120.46.172.186:8080/api/demension/v1/dem/deleteDemByIds'"
} ],
"links" : [ ],
"hidden" : true,
"retry" : true,
"extra" : {
"categories" : [ ],
"tags" : [ ]
},
"source" : "e4242ec0f8914826.json",
"parameterValues" : [ "{'ids': '1688475997541777408'}", "{'state': True, 'message': '删除维度成功'}", "'根据维度编码删除维度'", "'高'", "'DELETE'", "'query'", "'维度管理'", "'SELECT ID_ FROM uc_demension WHERE `CODE_`=\"test56_dem\";'", "'select'", "'正向用例'", "'ids'", "'http://120.46.172.186:8080/api/demension/v1/dem/deleteDemByIds'" ]
}
\ No newline at end of file
{
"uid" : "e6de64866f470634",
"name" : "反向用例-用户名为空",
"fullName" : "test_bpm.TestBPM#test_bpm",
"historyId" : "cb6bc4824561a6cdbaeea7fbbc0b0fca",
"time" : {
"start" : 1691399016872,
"stop" : 1691399016926,
"duration" : 54
},
"status" : "passed",
"flaky" : false,
"newFailed" : false,
"beforeStages" : [ {
"name" : "_session_faker",
"time" : {
"start" : 1691399016370,
"stop" : 1691399016483,
"duration" : 113
},
"status" : "passed",
"steps" : [ ],
"attachments" : [ ],
"parameters" : [ ],
"hasContent" : false,
"stepsCount" : 0,
"attachmentsCount" : 0,
"shouldDisplayMessage" : false
}, {
"name" : "req_fix",
"time" : {
"start" : 1691399016483,
"stop" : 1691399016584,
"duration" : 101
},
"status" : "passed",
"steps" : [ ],
"attachments" : [ ],
"parameters" : [ ],
"hasContent" : false,
"stepsCount" : 0,
"attachmentsCount" : 0,
"shouldDisplayMessage" : false
}, {
"name" : "db_fix",
"time" : {
"start" : 1691399016584,
"stop" : 1691399016789,
"duration" : 205
},
"status" : "passed",
"steps" : [ ],
"attachments" : [ ],
"parameters" : [ ],
"hasContent" : false,
"stepsCount" : 0,
"attachmentsCount" : 0,
"shouldDisplayMessage" : false
} ],
"testStage" : {
"status" : "passed",
"steps" : [ ],
"attachments" : [ {
"uid" : "3e0c4c4d4b0e9d39",
"name" : "log",
"source" : "3e0c4c4d4b0e9d39.txt",
"type" : "text/plain",
"size" : 94
}, {
"uid" : "e44c1858665d624e",
"name" : "stdout",
"source" : "e44c1858665d624e.txt",
"type" : "text/plain",
"size" : 13
} ],
"parameters" : [ ],
"hasContent" : true,
"stepsCount" : 0,
"attachmentsCount" : 2,
"shouldDisplayMessage" : false
},
"afterStages" : [ {
"name" : "req_fix::0",
"time" : {
"start" : 1691399029988,
"stop" : 1691399029988,
"duration" : 0
},
"status" : "passed",
"steps" : [ ],
"attachments" : [ ],
"parameters" : [ ],
"hasContent" : false,
"stepsCount" : 0,
"attachmentsCount" : 0,
"shouldDisplayMessage" : false
}, {
"name" : "db_fix::0",
"time" : {
"start" : 1691399029987,
"stop" : 1691399029987,
"duration" : 0
},
"status" : "passed",
"steps" : [ ],
"attachments" : [ ],
"parameters" : [ ],
"hasContent" : false,
"stepsCount" : 0,
"attachmentsCount" : 0,
"shouldDisplayMessage" : false
} ],
"labels" : [ {
"name" : "feature",
"value" : "认证接口"
}, {
"name" : "story",
"value" : "登录系统"
}, {
"name" : "severity",
"value" : "中"
}, {
"name" : "epic",
"value" : "BPM系统"
}, {
"name" : "suite",
"value" : "test_bpm"
}, {
"name" : "subSuite",
"value" : "TestBPM"
}, {
"name" : "host",
"value" : "LAPTOP-31V3JBFR"
}, {
"name" : "thread",
"value" : "6412-MainThread"
}, {
"name" : "framework",
"value" : "pytest"
}, {
"name" : "language",
"value" : "cpython3"
}, {
"name" : "package",
"value" : "test_bpm"
}, {
"name" : "resultFormat",
"value" : "allure2"
} ],
"parameters" : [ {
"name" : "data",
"value" : "{'password': 'MTIzNDU2', 'username': ''}"
}, {
"name" : "expect",
"value" : "{'state': False, 'message': '账号或密码错误'}"
}, {
"name" : "interface",
"value" : "'登录系统'"
}, {
"name" : "level",
"value" : "'中'"
}, {
"name" : "method",
"value" : "'POST'"
}, {
"name" : "mime",
"value" : "'application/json'"
}, {
"name" : "module",
"value" : "'认证接口'"
}, {
"name" : "sql_sentence",
"value" : "None"
}, {
"name" : "sql_type",
"value" : "None"
}, {
"name" : "title",
"value" : "'反向用例-用户名为空'"
}, {
"name" : "update_key",
"value" : "None"
}, {
"name" : "url",
"value" : "'http://120.46.172.186:8080/auth'"
} ],
"links" : [ ],
"hidden" : false,
"retry" : false,
"extra" : {
"severity" : "normal",
"retries" : [ ],
"categories" : [ ],
"tags" : [ ]
},
"source" : "e6de64866f470634.json",
"parameterValues" : [ "{'password': 'MTIzNDU2', 'username': ''}", "{'state': False, 'message': '账号或密码错误'}", "'登录系统'", "'中'", "'POST'", "'application/json'", "'认证接口'", "None", "None", "'反向用例-用户名为空'", "None", "'http://120.46.172.186:8080/auth'" ]
}
\ No newline at end of file
{
"uid" : "f0728c13556903da",
"name" : "正向用例",
"fullName" : "test_bpm.TestBPM#test_bpm",
"historyId" : "f368301ce537f1bbd596e0d19f24f393",
"time" : {
"start" : 1691399020198,
"stop" : 1691399020267,
"duration" : 69
},
"status" : "failed",
"statusMessage" : "AssertionError: 断言失败",
"statusTrace" : "self = <InterfaceAutoTest.test_case.test_bpm.TestBPM object at 0x00000257902D2820>\nreq_fix = <InterfaceAutoTest.requests_method.requests_method.RequestsMethod object at 0x00000257902F0490>\ndb_fix = <InterfaceAutoTest.common.db.DB object at 0x00000257903D93D0>, module = '认证接口', interface = '刷新token', title = '正向用例'\nlevel = '中', method = 'get', url = 'http://120.46.172.186:8080/refresh', mime = None, data = None, expect = {'message': '刷新token成功'}\nsql_type = None, sql_sentence = None, update_key = None\n\n @allure.epic(\"BPM系统\")\n @pytest.mark.parametrize(\"module, interface, title, level, method, url, mime, data, expect, sql_type, sql_sentence, update_key\", ReadExcel().get_data())\n def test_bpm(self, req_fix, db_fix, module, interface, title, level, method, url, mime, data, expect, sql_type, sql_sentence, update_key):\n allure.dynamic.feature(module)\n allure.dynamic.story(interface)\n allure.dynamic.title(title)\n allure.dynamic.severity(level)\n \n # 1.1:判断sql语句的类型是否为delete\n if sql_type == \"delete\":\n # 1.2 使用DB类对象,调用delete方法执行删除的sql语句\n db_fix.delete(sql_sentence)\n # # 1.3 使用RequestsMethod类对象调用request_all方法发送请求\n # result = req_fix.request_all(req_method=method, req_url=url, req_mime=mime, case_data=data)\n \n # 2.1 判断sql语句的类型是否为select\n elif sql_type == \"select\":\n # 2.2 使用DB类对象,调用select方法执行查询的sql语句,并接收查询结果\n select_result = db_fix.select(sql_sentence)\n # 2.3 将查询结果更新到用例数据中\n data[update_key] = select_result\n # # 2.3 使用RequestsMethod类对象调用request_all方法发送请求\n # result = req_fix.request_all(req_method=method, req_url=url, req_mime=mime, case_data=data)\n \n # 3.1 判断sql语句的类型是否delete|select或者为select|delete\n elif sql_type == \"delete|select\" or sql_type == \"select|delete\":\n # 3.2 使用DB类对象,调用delete方法执行删除的sql语句\n db_fix.delete(sql_sentence[\"delete\"])\n # 3.3 使用DB类对象,调用select方法执行查询的sql语句,并接收查询结果\n select_result = db_fix.select(sql_sentence[\"select\"])\n # 3.4 将查询结果更新到用例数据中\n data[update_key] = select_result\n # # 3.5 使用RequestsMethod类对象调用request_all方法发送请求\n # result = req_fix.request_all(req_method=method, req_url=url, req_mime=mime, case_data=data)\n #\n # else:\n # result = req_fix.request_all(req_method=method, req_url=url, req_mime=mime, case_data=data)\n \n result = req_fix.request_all(req_method=method, req_url=url, req_mime=mime, case_data=data)\n \n # 断言\n try:\n for key in expect:\n> assert expect[key] == result.json().get(key)\nE AssertionError: assert '刷新token成功' == None\nE + where None = <built-in method get of dict object at 0x0000025790479240>('message')\nE + where <built-in method get of dict object at 0x0000025790479240> = {'account': '', 'loginStatus': True, 'token': 'eyJhbGciOiJIUzUxMiJ9.eyJzdWIiOiJhZG1pbiIsInRlbmFudElkIjoiLTEiLCJleHAiOjE2OTE0ODU0MTksImlhdCI6MTY5MTM5OTAxOX0.WinKyHRVircLGP_CUX1F7Bnc8ppV_aESgAOwYpTrvsaosQKpSM4M310de-C_Isotv4UrWgQHE-a9qJeBxb3Kdw', 'userAttrs': {}, ...}.get\nE + where {'account': '', 'loginStatus': True, 'token': 'eyJhbGciOiJIUzUxMiJ9.eyJzdWIiOiJhZG1pbiIsInRlbmFudElkIjoiLTEiLCJleHAiOjE2OTE0ODU0MTksImlhdCI6MTY5MTM5OTAxOX0.WinKyHRVircLGP_CUX1F7Bnc8ppV_aESgAOwYpTrvsaosQKpSM4M310de-C_Isotv4UrWgQHE-a9qJeBxb3Kdw', 'userAttrs': {}, ...} = <bound method Response.json of <Response [200]>>()\nE + where <bound method Response.json of <Response [200]>> = <Response [200]>.json\n\ntest_bpm.py:61: AssertionError\n\nDuring handling of the above exception, another exception occurred:\n\nself = <InterfaceAutoTest.test_case.test_bpm.TestBPM object at 0x00000257902D2820>\nreq_fix = <InterfaceAutoTest.requests_method.requests_method.RequestsMethod object at 0x00000257902F0490>\ndb_fix = <InterfaceAutoTest.common.db.DB object at 0x00000257903D93D0>, module = '认证接口', interface = '刷新token', title = '正向用例'\nlevel = '中', method = 'get', url = 'http://120.46.172.186:8080/refresh', mime = None, data = None, expect = {'message': '刷新token成功'}\nsql_type = None, sql_sentence = None, update_key = None\n\n @allure.epic(\"BPM系统\")\n @pytest.mark.parametrize(\"module, interface, title, level, method, url, mime, data, expect, sql_type, sql_sentence, update_key\", ReadExcel().get_data())\n def test_bpm(self, req_fix, db_fix, module, interface, title, level, method, url, mime, data, expect, sql_type, sql_sentence, update_key):\n allure.dynamic.feature(module)\n allure.dynamic.story(interface)\n allure.dynamic.title(title)\n allure.dynamic.severity(level)\n \n # 1.1:判断sql语句的类型是否为delete\n if sql_type == \"delete\":\n # 1.2 使用DB类对象,调用delete方法执行删除的sql语句\n db_fix.delete(sql_sentence)\n # # 1.3 使用RequestsMethod类对象调用request_all方法发送请求\n # result = req_fix.request_all(req_method=method, req_url=url, req_mime=mime, case_data=data)\n \n # 2.1 判断sql语句的类型是否为select\n elif sql_type == \"select\":\n # 2.2 使用DB类对象,调用select方法执行查询的sql语句,并接收查询结果\n select_result = db_fix.select(sql_sentence)\n # 2.3 将查询结果更新到用例数据中\n data[update_key] = select_result\n # # 2.3 使用RequestsMethod类对象调用request_all方法发送请求\n # result = req_fix.request_all(req_method=method, req_url=url, req_mime=mime, case_data=data)\n \n # 3.1 判断sql语句的类型是否delete|select或者为select|delete\n elif sql_type == \"delete|select\" or sql_type == \"select|delete\":\n # 3.2 使用DB类对象,调用delete方法执行删除的sql语句\n db_fix.delete(sql_sentence[\"delete\"])\n # 3.3 使用DB类对象,调用select方法执行查询的sql语句,并接收查询结果\n select_result = db_fix.select(sql_sentence[\"select\"])\n # 3.4 将查询结果更新到用例数据中\n data[update_key] = select_result\n # # 3.5 使用RequestsMethod类对象调用request_all方法发送请求\n # result = req_fix.request_all(req_method=method, req_url=url, req_mime=mime, case_data=data)\n #\n # else:\n # result = req_fix.request_all(req_method=method, req_url=url, req_mime=mime, case_data=data)\n \n result = req_fix.request_all(req_method=method, req_url=url, req_mime=mime, case_data=data)\n \n # 断言\n try:\n for key in expect:\n assert expect[key] == result.json().get(key)\n except:\n print(\"断言失败\")\n logging.error(\"断言失败, 模块名称为:{},接口名称为:{},用例标题:{},用例为:{},期望结果为:{},服务器返回数据为:{}\".format(module, interface, title, str(data), str(expect), result.text))\n> raise AssertionError(\"断言失败\")\nE AssertionError: 断言失败\n\ntest_bpm.py:65: AssertionError",
"flaky" : false,
"newFailed" : false,
"beforeStages" : [ {
"name" : "_session_faker",
"time" : {
"start" : 1691399016370,
"stop" : 1691399016483,
"duration" : 113
},
"status" : "passed",
"steps" : [ ],
"attachments" : [ ],
"parameters" : [ ],
"hasContent" : false,
"stepsCount" : 0,
"attachmentsCount" : 0,
"shouldDisplayMessage" : false
}, {
"name" : "req_fix",
"time" : {
"start" : 1691399016483,
"stop" : 1691399016584,
"duration" : 101
},
"status" : "passed",
"steps" : [ ],
"attachments" : [ ],
"parameters" : [ ],
"hasContent" : false,
"stepsCount" : 0,
"attachmentsCount" : 0,
"shouldDisplayMessage" : false
}, {
"name" : "db_fix",
"time" : {
"start" : 1691399016584,
"stop" : 1691399016789,
"duration" : 205
},
"status" : "passed",
"steps" : [ ],
"attachments" : [ ],
"parameters" : [ ],
"hasContent" : false,
"stepsCount" : 0,
"attachmentsCount" : 0,
"shouldDisplayMessage" : false
} ],
"testStage" : {
"status" : "failed",
"statusMessage" : "AssertionError: 断言失败",
"statusTrace" : "self = <InterfaceAutoTest.test_case.test_bpm.TestBPM object at 0x00000257902D2820>\nreq_fix = <InterfaceAutoTest.requests_method.requests_method.RequestsMethod object at 0x00000257902F0490>\ndb_fix = <InterfaceAutoTest.common.db.DB object at 0x00000257903D93D0>, module = '认证接口', interface = '刷新token', title = '正向用例'\nlevel = '中', method = 'get', url = 'http://120.46.172.186:8080/refresh', mime = None, data = None, expect = {'message': '刷新token成功'}\nsql_type = None, sql_sentence = None, update_key = None\n\n @allure.epic(\"BPM系统\")\n @pytest.mark.parametrize(\"module, interface, title, level, method, url, mime, data, expect, sql_type, sql_sentence, update_key\", ReadExcel().get_data())\n def test_bpm(self, req_fix, db_fix, module, interface, title, level, method, url, mime, data, expect, sql_type, sql_sentence, update_key):\n allure.dynamic.feature(module)\n allure.dynamic.story(interface)\n allure.dynamic.title(title)\n allure.dynamic.severity(level)\n \n # 1.1:判断sql语句的类型是否为delete\n if sql_type == \"delete\":\n # 1.2 使用DB类对象,调用delete方法执行删除的sql语句\n db_fix.delete(sql_sentence)\n # # 1.3 使用RequestsMethod类对象调用request_all方法发送请求\n # result = req_fix.request_all(req_method=method, req_url=url, req_mime=mime, case_data=data)\n \n # 2.1 判断sql语句的类型是否为select\n elif sql_type == \"select\":\n # 2.2 使用DB类对象,调用select方法执行查询的sql语句,并接收查询结果\n select_result = db_fix.select(sql_sentence)\n # 2.3 将查询结果更新到用例数据中\n data[update_key] = select_result\n # # 2.3 使用RequestsMethod类对象调用request_all方法发送请求\n # result = req_fix.request_all(req_method=method, req_url=url, req_mime=mime, case_data=data)\n \n # 3.1 判断sql语句的类型是否delete|select或者为select|delete\n elif sql_type == \"delete|select\" or sql_type == \"select|delete\":\n # 3.2 使用DB类对象,调用delete方法执行删除的sql语句\n db_fix.delete(sql_sentence[\"delete\"])\n # 3.3 使用DB类对象,调用select方法执行查询的sql语句,并接收查询结果\n select_result = db_fix.select(sql_sentence[\"select\"])\n # 3.4 将查询结果更新到用例数据中\n data[update_key] = select_result\n # # 3.5 使用RequestsMethod类对象调用request_all方法发送请求\n # result = req_fix.request_all(req_method=method, req_url=url, req_mime=mime, case_data=data)\n #\n # else:\n # result = req_fix.request_all(req_method=method, req_url=url, req_mime=mime, case_data=data)\n \n result = req_fix.request_all(req_method=method, req_url=url, req_mime=mime, case_data=data)\n \n # 断言\n try:\n for key in expect:\n> assert expect[key] == result.json().get(key)\nE AssertionError: assert '刷新token成功' == None\nE + where None = <built-in method get of dict object at 0x0000025790479240>('message')\nE + where <built-in method get of dict object at 0x0000025790479240> = {'account': '', 'loginStatus': True, 'token': 'eyJhbGciOiJIUzUxMiJ9.eyJzdWIiOiJhZG1pbiIsInRlbmFudElkIjoiLTEiLCJleHAiOjE2OTE0ODU0MTksImlhdCI6MTY5MTM5OTAxOX0.WinKyHRVircLGP_CUX1F7Bnc8ppV_aESgAOwYpTrvsaosQKpSM4M310de-C_Isotv4UrWgQHE-a9qJeBxb3Kdw', 'userAttrs': {}, ...}.get\nE + where {'account': '', 'loginStatus': True, 'token': 'eyJhbGciOiJIUzUxMiJ9.eyJzdWIiOiJhZG1pbiIsInRlbmFudElkIjoiLTEiLCJleHAiOjE2OTE0ODU0MTksImlhdCI6MTY5MTM5OTAxOX0.WinKyHRVircLGP_CUX1F7Bnc8ppV_aESgAOwYpTrvsaosQKpSM4M310de-C_Isotv4UrWgQHE-a9qJeBxb3Kdw', 'userAttrs': {}, ...} = <bound method Response.json of <Response [200]>>()\nE + where <bound method Response.json of <Response [200]>> = <Response [200]>.json\n\ntest_bpm.py:61: AssertionError\n\nDuring handling of the above exception, another exception occurred:\n\nself = <InterfaceAutoTest.test_case.test_bpm.TestBPM object at 0x00000257902D2820>\nreq_fix = <InterfaceAutoTest.requests_method.requests_method.RequestsMethod object at 0x00000257902F0490>\ndb_fix = <InterfaceAutoTest.common.db.DB object at 0x00000257903D93D0>, module = '认证接口', interface = '刷新token', title = '正向用例'\nlevel = '中', method = 'get', url = 'http://120.46.172.186:8080/refresh', mime = None, data = None, expect = {'message': '刷新token成功'}\nsql_type = None, sql_sentence = None, update_key = None\n\n @allure.epic(\"BPM系统\")\n @pytest.mark.parametrize(\"module, interface, title, level, method, url, mime, data, expect, sql_type, sql_sentence, update_key\", ReadExcel().get_data())\n def test_bpm(self, req_fix, db_fix, module, interface, title, level, method, url, mime, data, expect, sql_type, sql_sentence, update_key):\n allure.dynamic.feature(module)\n allure.dynamic.story(interface)\n allure.dynamic.title(title)\n allure.dynamic.severity(level)\n \n # 1.1:判断sql语句的类型是否为delete\n if sql_type == \"delete\":\n # 1.2 使用DB类对象,调用delete方法执行删除的sql语句\n db_fix.delete(sql_sentence)\n # # 1.3 使用RequestsMethod类对象调用request_all方法发送请求\n # result = req_fix.request_all(req_method=method, req_url=url, req_mime=mime, case_data=data)\n \n # 2.1 判断sql语句的类型是否为select\n elif sql_type == \"select\":\n # 2.2 使用DB类对象,调用select方法执行查询的sql语句,并接收查询结果\n select_result = db_fix.select(sql_sentence)\n # 2.3 将查询结果更新到用例数据中\n data[update_key] = select_result\n # # 2.3 使用RequestsMethod类对象调用request_all方法发送请求\n # result = req_fix.request_all(req_method=method, req_url=url, req_mime=mime, case_data=data)\n \n # 3.1 判断sql语句的类型是否delete|select或者为select|delete\n elif sql_type == \"delete|select\" or sql_type == \"select|delete\":\n # 3.2 使用DB类对象,调用delete方法执行删除的sql语句\n db_fix.delete(sql_sentence[\"delete\"])\n # 3.3 使用DB类对象,调用select方法执行查询的sql语句,并接收查询结果\n select_result = db_fix.select(sql_sentence[\"select\"])\n # 3.4 将查询结果更新到用例数据中\n data[update_key] = select_result\n # # 3.5 使用RequestsMethod类对象调用request_all方法发送请求\n # result = req_fix.request_all(req_method=method, req_url=url, req_mime=mime, case_data=data)\n #\n # else:\n # result = req_fix.request_all(req_method=method, req_url=url, req_mime=mime, case_data=data)\n \n result = req_fix.request_all(req_method=method, req_url=url, req_mime=mime, case_data=data)\n \n # 断言\n try:\n for key in expect:\n assert expect[key] == result.json().get(key)\n except:\n print(\"断言失败\")\n logging.error(\"断言失败, 模块名称为:{},接口名称为:{},用例标题:{},用例为:{},期望结果为:{},服务器返回数据为:{}\".format(module, interface, title, str(data), str(expect), result.text))\n> raise AssertionError(\"断言失败\")\nE AssertionError: 断言失败\n\ntest_bpm.py:65: AssertionError",
"steps" : [ ],
"attachments" : [ {
"uid" : "ec6e114e1fbe0237",
"name" : "log",
"source" : "ec6e114e1fbe0237.txt",
"type" : "text/plain",
"size" : 1962
}, {
"uid" : "c5a3b893e5f5ab40",
"name" : "stdout",
"source" : "c5a3b893e5f5ab40.txt",
"type" : "text/plain",
"size" : 39
} ],
"parameters" : [ ],
"hasContent" : true,
"stepsCount" : 0,
"attachmentsCount" : 2,
"shouldDisplayMessage" : true
},
"afterStages" : [ {
"name" : "req_fix::0",
"time" : {
"start" : 1691399029988,
"stop" : 1691399029988,
"duration" : 0
},
"status" : "passed",
"steps" : [ ],
"attachments" : [ ],
"parameters" : [ ],
"hasContent" : false,
"stepsCount" : 0,
"attachmentsCount" : 0,
"shouldDisplayMessage" : false
}, {
"name" : "db_fix::0",
"time" : {
"start" : 1691399029987,
"stop" : 1691399029987,
"duration" : 0
},
"status" : "passed",
"steps" : [ ],
"attachments" : [ ],
"parameters" : [ ],
"hasContent" : false,
"stepsCount" : 0,
"attachmentsCount" : 0,
"shouldDisplayMessage" : false
} ],
"labels" : [ {
"name" : "feature",
"value" : "认证接口"
}, {
"name" : "story",
"value" : "刷新token"
}, {
"name" : "severity",
"value" : "中"
}, {
"name" : "epic",
"value" : "BPM系统"
}, {
"name" : "suite",
"value" : "test_bpm"
}, {
"name" : "subSuite",
"value" : "TestBPM"
}, {
"name" : "host",
"value" : "LAPTOP-31V3JBFR"
}, {
"name" : "thread",
"value" : "6412-MainThread"
}, {
"name" : "framework",
"value" : "pytest"
}, {
"name" : "language",
"value" : "cpython3"
}, {
"name" : "package",
"value" : "test_bpm"
}, {
"name" : "resultFormat",
"value" : "allure2"
} ],
"parameters" : [ {
"name" : "data",
"value" : "None"
}, {
"name" : "expect",
"value" : "{'message': '刷新token成功'}"
}, {
"name" : "interface",
"value" : "'刷新token'"
}, {
"name" : "level",
"value" : "'中'"
}, {
"name" : "method",
"value" : "'get'"
}, {
"name" : "mime",
"value" : "None"
}, {
"name" : "module",
"value" : "'认证接口'"
}, {
"name" : "sql_sentence",
"value" : "None"
}, {
"name" : "sql_type",
"value" : "None"
}, {
"name" : "title",
"value" : "'正向用例'"
}, {
"name" : "update_key",
"value" : "None"
}, {
"name" : "url",
"value" : "'http://120.46.172.186:8080/refresh'"
} ],
"links" : [ ],
"hidden" : true,
"retry" : true,
"extra" : {
"categories" : [ ],
"tags" : [ ]
},
"source" : "f0728c13556903da.json",
"parameterValues" : [ "None", "{'message': '刷新token成功'}", "'刷新token'", "'中'", "'get'", "None", "'认证接口'", "None", "None", "'正向用例'", "None", "'http://120.46.172.186:8080/refresh'" ]
}
\ No newline at end of file
{
"uid" : "f99e365a0b702222",
"name" : "反向用例-密码为特殊字符",
"fullName" : "test_bpm.TestBPM#test_bpm",
"historyId" : "d47f225f414cd52cd2c4be15166397b9",
"time" : {
"start" : 1691399017699,
"stop" : 1691399017794,
"duration" : 95
},
"status" : "passed",
"flaky" : false,
"newFailed" : false,
"beforeStages" : [ {
"name" : "_session_faker",
"time" : {
"start" : 1691399016370,
"stop" : 1691399016483,
"duration" : 113
},
"status" : "passed",
"steps" : [ ],
"attachments" : [ ],
"parameters" : [ ],
"hasContent" : false,
"stepsCount" : 0,
"attachmentsCount" : 0,
"shouldDisplayMessage" : false
}, {
"name" : "req_fix",
"time" : {
"start" : 1691399016483,
"stop" : 1691399016584,
"duration" : 101
},
"status" : "passed",
"steps" : [ ],
"attachments" : [ ],
"parameters" : [ ],
"hasContent" : false,
"stepsCount" : 0,
"attachmentsCount" : 0,
"shouldDisplayMessage" : false
}, {
"name" : "db_fix",
"time" : {
"start" : 1691399016584,
"stop" : 1691399016789,
"duration" : 205
},
"status" : "passed",
"steps" : [ ],
"attachments" : [ ],
"parameters" : [ ],
"hasContent" : false,
"stepsCount" : 0,
"attachmentsCount" : 0,
"shouldDisplayMessage" : false
} ],
"testStage" : {
"status" : "passed",
"steps" : [ ],
"attachments" : [ {
"uid" : "498a987aa182321c",
"name" : "log",
"source" : "498a987aa182321c.txt",
"type" : "text/plain",
"size" : 176
}, {
"uid" : "f5bf2bf474b999bb",
"name" : "stdout",
"source" : "f5bf2bf474b999bb.txt",
"type" : "text/plain",
"size" : 13
} ],
"parameters" : [ ],
"hasContent" : true,
"stepsCount" : 0,
"attachmentsCount" : 2,
"shouldDisplayMessage" : false
},
"afterStages" : [ {
"name" : "req_fix::0",
"time" : {
"start" : 1691399029988,
"stop" : 1691399029988,
"duration" : 0
},
"status" : "passed",
"steps" : [ ],
"attachments" : [ ],
"parameters" : [ ],
"hasContent" : false,
"stepsCount" : 0,
"attachmentsCount" : 0,
"shouldDisplayMessage" : false
}, {
"name" : "db_fix::0",
"time" : {
"start" : 1691399029987,
"stop" : 1691399029987,
"duration" : 0
},
"status" : "passed",
"steps" : [ ],
"attachments" : [ ],
"parameters" : [ ],
"hasContent" : false,
"stepsCount" : 0,
"attachmentsCount" : 0,
"shouldDisplayMessage" : false
} ],
"labels" : [ {
"name" : "feature",
"value" : "认证接口"
}, {
"name" : "story",
"value" : "登录系统"
}, {
"name" : "severity",
"value" : "中"
}, {
"name" : "epic",
"value" : "BPM系统"
}, {
"name" : "suite",
"value" : "test_bpm"
}, {
"name" : "subSuite",
"value" : "TestBPM"
}, {
"name" : "host",
"value" : "LAPTOP-31V3JBFR"
}, {
"name" : "thread",
"value" : "6412-MainThread"
}, {
"name" : "framework",
"value" : "pytest"
}, {
"name" : "language",
"value" : "cpython3"
}, {
"name" : "package",
"value" : "test_bpm"
}, {
"name" : "resultFormat",
"value" : "allure2"
} ],
"parameters" : [ {
"name" : "data",
"value" : "{'password': '▬♦◊◦☼♠♣', 'username': 'admin'}"
}, {
"name" : "expect",
"value" : "{'state': False, 'message': '账号或密码错误'}"
}, {
"name" : "interface",
"value" : "'登录系统'"
}, {
"name" : "level",
"value" : "'中'"
}, {
"name" : "method",
"value" : "'POST'"
}, {
"name" : "mime",
"value" : "'application/json'"
}, {
"name" : "module",
"value" : "'认证接口'"
}, {
"name" : "sql_sentence",
"value" : "None"
}, {
"name" : "sql_type",
"value" : "None"
}, {
"name" : "title",
"value" : "'反向用例-密码为特殊字符'"
}, {
"name" : "update_key",
"value" : "None"
}, {
"name" : "url",
"value" : "'http://120.46.172.186:8080/auth'"
} ],
"links" : [ ],
"hidden" : false,
"retry" : false,
"extra" : {
"severity" : "normal",
"retries" : [ ],
"categories" : [ ],
"tags" : [ ]
},
"source" : "f99e365a0b702222.json",
"parameterValues" : [ "{'password': '▬♦◊◦☼♠♣', 'username': 'admin'}", "{'state': False, 'message': '账号或密码错误'}", "'登录系统'", "'中'", "'POST'", "'application/json'", "'认证接口'", "None", "None", "'反向用例-密码为特殊字符'", "None", "'http://120.46.172.186:8080/auth'" ]
}
\ No newline at end of file
{
"uid" : "ab17fc5a4eb3bca4b216b548c7f9fcbc",
"name" : "timeline",
"children" : [ {
"name" : "LAPTOP-31V3JBFR",
"children" : [ {
"name" : "6412-MainThread",
"children" : [ {
"name" : "正向用例",
"uid" : "33375d4e860e5456",
"parentUid" : "ba8dcd5791f336e8c93918666b624b90",
"status" : "failed",
"time" : {
"start" : 1691399029838,
"stop" : 1691399029973,
"duration" : 135
},
"flaky" : false,
"newFailed" : false,
"parameters" : [ "{'ids': '1688475997541777408'}", "{'state': True, 'message': '删除维度成功'}", "'根据维度编码删除维度'", "'高'", "'DELETE'", "'query'", "'维度管理'", "'SELECT ID_ FROM uc_demension WHERE `CODE_`=\"test56_dem\";'", "'select'", "'正向用例'", "'ids'", "'http://120.46.172.186:8080/api/demension/v1/dem/deleteDemByIds'" ]
}, {
"name" : "反向用例-密码为空",
"uid" : "9262c97d3be172ea",
"parentUid" : "ba8dcd5791f336e8c93918666b624b90",
"status" : "passed",
"time" : {
"start" : 1691399017375,
"stop" : 1691399017467,
"duration" : 92
},
"flaky" : false,
"newFailed" : false,
"parameters" : [ "{'password': '', 'username': 'admin'}", "{'state': False, 'message': '账号或密码错误'}", "'登录系统'", "'中'", "'POST'", "'application/json'", "'认证接口'", "None", "None", "'反向用例-密码为空'", "None", "'http://120.46.172.186:8080/auth'" ]
}, {
"name" : "反向用例-用户名过长",
"uid" : "4846ba5e55af2bf1",
"parentUid" : "ba8dcd5791f336e8c93918666b624b90",
"status" : "passed",
"time" : {
"start" : 1691399016938,
"stop" : 1691399017031,
"duration" : 93
},
"flaky" : false,
"newFailed" : false,
"parameters" : [ "{'password': 'MTIzNDU2', 'username': 'adminadminadminadminadminadminadminadminadmin'}", "{'state': False, 'message': '账号或密码错误'}", "'登录系统'", "'中'", "'POST'", "'application/json'", "'认证接口'", "None", "None", "'反向用例-用户名过长'", "None", "'http://120.46.172.186:8080/auth'" ]
}, {
"name" : "反向用例-密码为特殊字符",
"uid" : "f99e365a0b702222",
"parentUid" : "ba8dcd5791f336e8c93918666b624b90",
"status" : "passed",
"time" : {
"start" : 1691399017699,
"stop" : 1691399017794,
"duration" : 95
},
"flaky" : false,
"newFailed" : false,
"parameters" : [ "{'password': '▬♦◊◦☼♠♣', 'username': 'admin'}", "{'state': False, 'message': '账号或密码错误'}", "'登录系统'", "'中'", "'POST'", "'application/json'", "'认证接口'", "None", "None", "'反向用例-密码为特殊字符'", "None", "'http://120.46.172.186:8080/auth'" ]
}, {
"name" : "正向用例",
"uid" : "e4242ec0f8914826",
"parentUid" : "ba8dcd5791f336e8c93918666b624b90",
"status" : "failed",
"time" : {
"start" : 1691399027504,
"stop" : 1691399027636,
"duration" : 132
},
"flaky" : false,
"newFailed" : false,
"parameters" : [ "{'ids': '1688475997541777408'}", "{'state': True, 'message': '删除维度成功'}", "'根据维度编码删除维度'", "'高'", "'DELETE'", "'query'", "'维度管理'", "'SELECT ID_ FROM uc_demension WHERE `CODE_`=\"test56_dem\";'", "'select'", "'正向用例'", "'ids'", "'http://120.46.172.186:8080/api/demension/v1/dem/deleteDemByIds'" ]
}, {
"name" : "反向用例-用户名特殊字符",
"uid" : "bfbb6ff6c978dd13",
"parentUid" : "ba8dcd5791f336e8c93918666b624b90",
"status" : "passed",
"time" : {
"start" : 1691399017156,
"stop" : 1691399017255,
"duration" : 99
},
"flaky" : false,
"newFailed" : false,
"parameters" : [ "{'password': 'MTIzNDU2', 'username': '▬♦◊◦☼♠♣'}", "{'state': False, 'message': '账号或密码错误'}", "'登录系统'", "'中'", "'POST'", "'application/json'", "'认证接口'", "None", "None", "'反向用例-用户名特殊字符'", "None", "'http://120.46.172.186:8080/auth'" ]
}, {
"name" : "正向用例",
"uid" : "3f71bbc6a20eada1",
"parentUid" : "ba8dcd5791f336e8c93918666b624b90",
"status" : "failed",
"time" : {
"start" : 1691399017807,
"stop" : 1691399017907,
"duration" : 100
},
"flaky" : false,
"newFailed" : false,
"parameters" : [ "None", "{'message': '刷新token成功'}", "'刷新token'", "'中'", "'get'", "None", "'认证接口'", "None", "None", "'正向用例'", "None", "'http://120.46.172.186:8080/refresh'" ]
}, {
"name" : "正向用例",
"uid" : "7e6a0a296e38c785",
"parentUid" : "ba8dcd5791f336e8c93918666b624b90",
"status" : "failed",
"time" : {
"start" : 1691399019103,
"stop" : 1691399019159,
"duration" : 56
},
"flaky" : false,
"newFailed" : false,
"parameters" : [ "None", "{'message': '刷新token成功'}", "'刷新token'", "'中'", "'get'", "None", "'认证接口'", "None", "None", "'正向用例'", "None", "'http://120.46.172.186:8080/refresh'" ]
}, {
"name" : "正向用例",
"uid" : "f0728c13556903da",
"parentUid" : "ba8dcd5791f336e8c93918666b624b90",
"status" : "failed",
"time" : {
"start" : 1691399020198,
"stop" : 1691399020267,
"duration" : 69
},
"flaky" : false,
"newFailed" : false,
"parameters" : [ "None", "{'message': '刷新token成功'}", "'刷新token'", "'中'", "'get'", "None", "'认证接口'", "None", "None", "'正向用例'", "None", "'http://120.46.172.186:8080/refresh'" ]
}, {
"name" : "正向用例",
"uid" : "995aa7bfe2ad2c36",
"parentUid" : "ba8dcd5791f336e8c93918666b624b90",
"status" : "passed",
"time" : {
"start" : 1691399023717,
"stop" : 1691399023898,
"duration" : 181
},
"flaky" : false,
"newFailed" : false,
"parameters" : [ "{'code': 'test56_org', 'demId': '不知道', 'exceedLimitNum': 0, 'grade': '', 'limitNum': 0, 'name': '测试的组织', 'nowNum': 0, 'orderNo': 0, 'parentId': '0'}", "{'state': True, 'message': '添加组织成功!'}", "'添加组织'", "'高'", "'post'", "'application/json'", "'组织管理'", "{'select': 'SELECT ID_ FROM uc_demension WHERE `CODE_`=\"test56_dem\";', 'delete': 'DELETE FROM uc_org WHERE `CODE_`=\"test56_org\";'}", "'delete|select'", "'正向用例'", "'demId'", "'http://120.46.172.186:8080/api/org/v1/org/addOrg'" ]
}, {
"name" : "正向用例",
"uid" : "35af4ef76050b260",
"parentUid" : "ba8dcd5791f336e8c93918666b624b90",
"status" : "passed",
"time" : {
"start" : 1691399016791,
"stop" : 1691399016848,
"duration" : 57
},
"flaky" : false,
"newFailed" : false,
"parameters" : [ "{'password': 'MTIzNDU2', 'username': 'admin'}", "{'username': '超级管理员', 'account': 'admin'}", "'登录系统'", "'高'", "'POST'", "'application/json'", "'认证接口'", "None", "None", "'正向用例'", "None", "'http://120.46.172.186:8080/auth'" ]
}, {
"name" : "正向用例",
"uid" : "342a24609b3996e0",
"parentUid" : "ba8dcd5791f336e8c93918666b624b90",
"status" : "passed",
"time" : {
"start" : 1691399023560,
"stop" : 1691399023701,
"duration" : 141
},
"flaky" : false,
"newFailed" : false,
"parameters" : [ "{'code': 'test56_dem', 'description': '测试56期的维度', 'isDefault': 0, 'name': '测试56期的维度'}", "{'state': True, 'message': '添加维度成功!'}", "'添加维度'", "'高'", "'post'", "'application/json'", "'维度管理'", "'DELETE FROM uc_demension WHERE `CODE_`=\"test56_dem\";'", "'delete'", "'正向用例'", "None", "'http://120.46.172.186:8080/api/demension/v1/dem/addDem'" ]
}, {
"name" : "正向用例",
"uid" : "ca0f0da1fb5b1a9d",
"parentUid" : "ba8dcd5791f336e8c93918666b624b90",
"status" : "passed",
"time" : {
"start" : 1691399023909,
"stop" : 1691399023983,
"duration" : 74
},
"flaky" : false,
"newFailed" : false,
"parameters" : [ "{'query': {'orgCode': 'test56_org'}, 'body': [{'alias': 'sz', 'value': 0}, {'alias': 'zy', 'value': 'math'}, {'alias': 'rq', 'value': '2023-08-04T16:00:00.000Z'}, {'alias': 'ah', 'value': 'lq'}, {'alias': 'yyyy', 'value': '越高越好'}, {'alias': 'xb', 'value': '2'}]}", "{'state': True, 'message': '保存组织参数成功!'}", "'保存组织参数'", "'高'", "'post'", "'application/json|query'", "'组织管理'", "None", "None", "'正向用例'", "None", "'http://120.46.172.186:8080/api/org/v1/orgParam/saveOrgParams'" ]
}, {
"name" : "反向用例-用户名为空",
"uid" : "e6de64866f470634",
"parentUid" : "ba8dcd5791f336e8c93918666b624b90",
"status" : "passed",
"time" : {
"start" : 1691399016872,
"stop" : 1691399016926,
"duration" : 54
},
"flaky" : false,
"newFailed" : false,
"parameters" : [ "{'password': 'MTIzNDU2', 'username': ''}", "{'state': False, 'message': '账号或密码错误'}", "'登录系统'", "'中'", "'POST'", "'application/json'", "'认证接口'", "None", "None", "'反向用例-用户名为空'", "None", "'http://120.46.172.186:8080/auth'" ]
}, {
"name" : "反向用例-用户名过短",
"uid" : "876f7a309f93bdd4",
"parentUid" : "ba8dcd5791f336e8c93918666b624b90",
"status" : "passed",
"time" : {
"start" : 1691399017044,
"stop" : 1691399017142,
"duration" : 98
},
"flaky" : false,
"newFailed" : false,
"parameters" : [ "{'password': 'MTIzNDU2', 'username': 'a'}", "{'state': False, 'message': '账号或密码错误'}", "'登录系统'", "'中'", "'POST'", "'application/json'", "'认证接口'", "None", "None", "'反向用例-用户名过短'", "None", "'http://120.46.172.186:8080/auth'" ]
}, {
"name" : "正向用例",
"uid" : "a87914af7f1df918",
"parentUid" : "ba8dcd5791f336e8c93918666b624b90",
"status" : "failed",
"time" : {
"start" : 1691399022389,
"stop" : 1691399022444,
"duration" : 55
},
"flaky" : false,
"newFailed" : false,
"parameters" : [ "None", "{'message': '刷新token成功'}", "'刷新token'", "'中'", "'get'", "None", "'认证接口'", "None", "None", "'正向用例'", "None", "'http://120.46.172.186:8080/refresh'" ]
}, {
"name" : "正向用例",
"uid" : "1c725e7f5e2da10d",
"parentUid" : "ba8dcd5791f336e8c93918666b624b90",
"status" : "failed",
"time" : {
"start" : 1691399024065,
"stop" : 1691399024169,
"duration" : 104
},
"flaky" : false,
"newFailed" : false,
"parameters" : [ "{'ids': '不知道'}", "{'state': True, 'message': '删除维度成功'}", "'根据维度编码删除维度'", "'高'", "'DELETE'", "'query'", "'维度管理'", "'SELECT ID_ FROM uc_demension WHERE `CODE_`=\"test56_dem\";'", "'select'", "'正向用例'", "'ids'", "'http://120.46.172.186:8080/api/demension/v1/dem/deleteDemByIds'" ]
}, {
"name" : "正向用例",
"uid" : "6716e5503b45470b",
"parentUid" : "ba8dcd5791f336e8c93918666b624b90",
"status" : "failed",
"time" : {
"start" : 1691399021306,
"stop" : 1691399021363,
"duration" : 57
},
"flaky" : false,
"newFailed" : false,
"parameters" : [ "None", "{'message': '刷新token成功'}", "'刷新token'", "'中'", "'get'", "None", "'认证接口'", "None", "None", "'正向用例'", "None", "'http://120.46.172.186:8080/refresh'" ]
}, {
"name" : "反向用例-密码为过短",
"uid" : "48f2044be487dde3",
"parentUid" : "ba8dcd5791f336e8c93918666b624b90",
"status" : "passed",
"time" : {
"start" : 1691399017591,
"stop" : 1691399017687,
"duration" : 96
},
"flaky" : false,
"newFailed" : false,
"parameters" : [ "{'password': '1', 'username': 'admin'}", "{'state': False, 'message': '账号或密码错误'}", "'登录系统'", "'中'", "'PoST'", "'application/json'", "'认证接口'", "None", "None", "'反向用例-密码为过短'", "None", "'http://120.46.172.186:8080/auth'" ]
}, {
"name" : "正向用例",
"uid" : "cc13490ee94aa27d",
"parentUid" : "ba8dcd5791f336e8c93918666b624b90",
"status" : "failed",
"time" : {
"start" : 1691399023476,
"stop" : 1691399023532,
"duration" : 56
},
"flaky" : false,
"newFailed" : false,
"parameters" : [ "None", "{'message': '刷新token成功'}", "'刷新token'", "'中'", "'get'", "None", "'认证接口'", "None", "None", "'正向用例'", "None", "'http://120.46.172.186:8080/refresh'" ]
}, {
"name" : "正向用例",
"uid" : "6c5a76e5b58039b5",
"parentUid" : "ba8dcd5791f336e8c93918666b624b90",
"status" : "failed",
"time" : {
"start" : 1691399026336,
"stop" : 1691399026470,
"duration" : 134
},
"flaky" : false,
"newFailed" : false,
"parameters" : [ "{'ids': '1688475997541777408'}", "{'state': True, 'message': '删除维度成功'}", "'根据维度编码删除维度'", "'高'", "'DELETE'", "'query'", "'维度管理'", "'SELECT ID_ FROM uc_demension WHERE `CODE_`=\"test56_dem\";'", "'select'", "'正向用例'", "'ids'", "'http://120.46.172.186:8080/api/demension/v1/dem/deleteDemByIds'" ]
}, {
"name" : "正向用例",
"uid" : "d167a8fc92917bcd",
"parentUid" : "ba8dcd5791f336e8c93918666b624b90",
"status" : "failed",
"time" : {
"start" : 1691399028670,
"stop" : 1691399028807,
"duration" : 137
},
"flaky" : false,
"newFailed" : false,
"parameters" : [ "{'ids': '1688475997541777408'}", "{'state': True, 'message': '删除维度成功'}", "'根据维度编码删除维度'", "'高'", "'DELETE'", "'query'", "'维度管理'", "'SELECT ID_ FROM uc_demension WHERE `CODE_`=\"test56_dem\";'", "'select'", "'正向用例'", "'ids'", "'http://120.46.172.186:8080/api/demension/v1/dem/deleteDemByIds'" ]
}, {
"name" : "正向用例",
"uid" : "9fdbdff7fbc9aba9",
"parentUid" : "ba8dcd5791f336e8c93918666b624b90",
"status" : "passed",
"time" : {
"start" : 1691399023993,
"stop" : 1691399024052,
"duration" : 59
},
"flaky" : false,
"newFailed" : false,
"parameters" : [ "'test56_org'", "{'state': True, 'message': '删除组织成功!'}", "'删除组织'", "'高'", "'post'", "'text/plain'", "'组织管理'", "None", "None", "'正向用例'", "None", "'http://120.46.172.186:8080/api/org/v1/org/deleteOrg'" ]
}, {
"name" : "反向用例-用户名错误",
"uid" : "7138d75998f57a3d",
"parentUid" : "ba8dcd5791f336e8c93918666b624b90",
"status" : "passed",
"time" : {
"start" : 1691399017270,
"stop" : 1691399017363,
"duration" : 93
},
"flaky" : false,
"newFailed" : false,
"parameters" : [ "{'password': 'MTIzNDU2', 'username': 'tomcat'}", "{'state': False, 'message': '账号或密码错误'}", "'登录系统'", "'中'", "'POST'", "'json'", "'认证接口'", "None", "None", "'反向用例-用户名错误'", "None", "'http://120.46.172.186:8080/auth'" ]
}, {
"name" : "正向用例",
"uid" : "7eb13a5ad0c76789",
"parentUid" : "ba8dcd5791f336e8c93918666b624b90",
"status" : "failed",
"time" : {
"start" : 1691399025190,
"stop" : 1691399025285,
"duration" : 95
},
"flaky" : false,
"newFailed" : false,
"parameters" : [ "{'ids': '1688475997541777408'}", "{'state': True, 'message': '删除维度成功'}", "'根据维度编码删除维度'", "'高'", "'DELETE'", "'query'", "'维度管理'", "'SELECT ID_ FROM uc_demension WHERE `CODE_`=\"test56_dem\";'", "'select'", "'正向用例'", "'ids'", "'http://120.46.172.186:8080/api/demension/v1/dem/deleteDemByIds'" ]
}, {
"name" : "反向用例-密码为长",
"uid" : "744f2d6bfb921a07",
"parentUid" : "ba8dcd5791f336e8c93918666b624b90",
"status" : "passed",
"time" : {
"start" : 1691399017479,
"stop" : 1691399017576,
"duration" : 97
},
"flaky" : false,
"newFailed" : false,
"parameters" : [ "{'password': 'MTIzNDU2MTIzNDU2MTIzNDU2MTIzNDU2MTIzNDU2MTIzNDU2', 'username': 'admin'}", "{'state': False, 'message': '账号或密码错误'}", "'登录系统'", "'中'", "'POST'", "'application/json'", "'认证接口'", "None", "None", "'反向用例-密码为长'", "None", "'http://120.46.172.186:8080/auth'" ]
} ],
"uid" : "ba8dcd5791f336e8c93918666b624b90"
} ],
"uid" : "7bb26dd0fc124662eb74dae2ac303271"
} ]
}
\ No newline at end of file
launch_status failed=2 1691399092000000000
launch_status broken=0 1691399092000000000
launch_status passed=14 1691399092000000000
launch_status skipped=0 1691399092000000000
launch_status unknown=0 1691399092000000000
launch_time duration=13182 1691399092000000000
launch_time min_duration=54 1691399092000000000
launch_time max_duration=181 1691399092000000000
launch_time sum_duration=1520 1691399092000000000
launch_problems product_defects=2 1691399092000000000
launch_retries retries=10 1691399092000000000
launch_retries run=16 1691399092000000000
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>Allure Report summary mail</title>
</head>
<body>
Mail body
</body>
</html>
launch_status_failed 2
launch_status_broken 0
launch_status_passed 14
launch_status_skipped 0
launch_status_unknown 0
launch_time_duration 13182
launch_time_min_duration 54
launch_time_max_duration 181
launch_time_sum_duration 1520
launch_problems_product_defects 2
launch_retries_retries 10
launch_retries_run 16
module.exports = __webpack_public_path__ + "favicon.ico";
\ No newline at end of file
[ {
"data" : {
"Product defects" : 2
}
} ]
\ No newline at end of file
[ {
"data" : {
"duration" : 13182
}
} ]
\ No newline at end of file
[ {
"data" : {
"failed" : 2,
"broken" : 0,
"skipped" : 0,
"passed" : 14,
"unknown" : 0,
"total" : 16
}
} ]
\ No newline at end of file
{
"4db60c6a5deceb5e4bfbe2c9fd4ed59b" : {
"statistic" : {
"failed" : 0,
"broken" : 0,
"skipped" : 0,
"passed" : 1,
"unknown" : 0,
"total" : 1
},
"items" : [ {
"uid" : "342a24609b3996e0",
"status" : "passed",
"time" : {
"start" : 1691399023560,
"stop" : 1691399023701,
"duration" : 141
}
} ]
},
"a0502452da70d924dbdea3f536ad8015" : {
"statistic" : {
"failed" : 0,
"broken" : 0,
"skipped" : 0,
"passed" : 1,
"unknown" : 0,
"total" : 1
},
"items" : [ {
"uid" : "bfbb6ff6c978dd13",
"status" : "passed",
"time" : {
"start" : 1691399017156,
"stop" : 1691399017255,
"duration" : 99
}
} ]
},
"89cd3935e143f1777c5d98d06870bd50" : {
"statistic" : {
"failed" : 0,
"broken" : 0,
"skipped" : 0,
"passed" : 1,
"unknown" : 0,
"total" : 1
},
"items" : [ {
"uid" : "9262c97d3be172ea",
"status" : "passed",
"time" : {
"start" : 1691399017375,
"stop" : 1691399017467,
"duration" : 92
}
} ]
},
"74e8920fe95c2c7a6d36157ccbacbeb9" : {
"statistic" : {
"failed" : 0,
"broken" : 0,
"skipped" : 0,
"passed" : 1,
"unknown" : 0,
"total" : 1
},
"items" : [ {
"uid" : "ca0f0da1fb5b1a9d",
"status" : "passed",
"time" : {
"start" : 1691399023909,
"stop" : 1691399023983,
"duration" : 74
}
} ]
},
"d47f225f414cd52cd2c4be15166397b9" : {
"statistic" : {
"failed" : 0,
"broken" : 0,
"skipped" : 0,
"passed" : 1,
"unknown" : 0,
"total" : 1
},
"items" : [ {
"uid" : "f99e365a0b702222",
"status" : "passed",
"time" : {
"start" : 1691399017699,
"stop" : 1691399017794,
"duration" : 95
}
} ]
},
"036385e6c5707e95e98d58f17aa52abc" : {
"statistic" : {
"failed" : 0,
"broken" : 0,
"skipped" : 0,
"passed" : 1,
"unknown" : 0,
"total" : 1
},
"items" : [ {
"uid" : "9fdbdff7fbc9aba9",
"status" : "passed",
"time" : {
"start" : 1691399023993,
"stop" : 1691399024052,
"duration" : 59
}
} ]
},
"1e00bd2cd85b6a0d93eb901ec3e350a3" : {
"statistic" : {
"failed" : 0,
"broken" : 0,
"skipped" : 0,
"passed" : 1,
"unknown" : 0,
"total" : 1
},
"items" : [ {
"uid" : "48f2044be487dde3",
"status" : "passed",
"time" : {
"start" : 1691399017591,
"stop" : 1691399017687,
"duration" : 96
}
} ]
},
"0bc244764898381335e19a8275f4cc75" : {
"statistic" : {
"failed" : 0,
"broken" : 0,
"skipped" : 0,
"passed" : 1,
"unknown" : 0,
"total" : 1
},
"items" : [ {
"uid" : "7138d75998f57a3d",
"status" : "passed",
"time" : {
"start" : 1691399017270,
"stop" : 1691399017363,
"duration" : 93
}
} ]
},
"f368301ce537f1bbd596e0d19f24f393" : {
"statistic" : {
"failed" : 1,
"broken" : 0,
"skipped" : 0,
"passed" : 0,
"unknown" : 0,
"total" : 1
},
"items" : [ {
"uid" : "cc13490ee94aa27d",
"status" : "failed",
"statusDetails" : "AssertionError: 断言失败",
"time" : {
"start" : 1691399023476,
"stop" : 1691399023532,
"duration" : 56
}
} ]
},
"a630861595e4d5075fdcba67048830da" : {
"statistic" : {
"failed" : 0,
"broken" : 0,
"skipped" : 0,
"passed" : 1,
"unknown" : 0,
"total" : 1
},
"items" : [ {
"uid" : "876f7a309f93bdd4",
"status" : "passed",
"time" : {
"start" : 1691399017044,
"stop" : 1691399017142,
"duration" : 98
}
} ]
},
"cb6bc4824561a6cdbaeea7fbbc0b0fca" : {
"statistic" : {
"failed" : 0,
"broken" : 0,
"skipped" : 0,
"passed" : 1,
"unknown" : 0,
"total" : 1
},
"items" : [ {
"uid" : "e6de64866f470634",
"status" : "passed",
"time" : {
"start" : 1691399016872,
"stop" : 1691399016926,
"duration" : 54
}
} ]
},
"f37f5b35a33b0d851ad30e5c966f4068" : {
"statistic" : {
"failed" : 1,
"broken" : 0,
"skipped" : 0,
"passed" : 0,
"unknown" : 0,
"total" : 1
},
"items" : [ {
"uid" : "33375d4e860e5456",
"status" : "failed",
"statusDetails" : "AssertionError: 断言失败",
"time" : {
"start" : 1691399029838,
"stop" : 1691399029973,
"duration" : 135
}
} ]
},
"98357aace79429a96dcb36c173fbfa06" : {
"statistic" : {
"failed" : 0,
"broken" : 0,
"skipped" : 0,
"passed" : 1,
"unknown" : 0,
"total" : 1
},
"items" : [ {
"uid" : "35af4ef76050b260",
"status" : "passed",
"time" : {
"start" : 1691399016791,
"stop" : 1691399016848,
"duration" : 57
}
} ]
},
"db7f8347492d126be5aa0bc4cf128a49" : {
"statistic" : {
"failed" : 0,
"broken" : 0,
"skipped" : 0,
"passed" : 1,
"unknown" : 0,
"total" : 1
},
"items" : [ {
"uid" : "4846ba5e55af2bf1",
"status" : "passed",
"time" : {
"start" : 1691399016938,
"stop" : 1691399017031,
"duration" : 93
}
} ]
},
"c565057f2ed8e19b5ad50c11894312ab" : {
"statistic" : {
"failed" : 0,
"broken" : 0,
"skipped" : 0,
"passed" : 1,
"unknown" : 0,
"total" : 1
},
"items" : [ {
"uid" : "995aa7bfe2ad2c36",
"status" : "passed",
"time" : {
"start" : 1691399023717,
"stop" : 1691399023898,
"duration" : 181
}
} ]
},
"1583d8257c325d21eabb5675af66c678" : {
"statistic" : {
"failed" : 0,
"broken" : 0,
"skipped" : 0,
"passed" : 1,
"unknown" : 0,
"total" : 1
},
"items" : [ {
"uid" : "744f2d6bfb921a07",
"status" : "passed",
"time" : {
"start" : 1691399017479,
"stop" : 1691399017576,
"duration" : 97
}
} ]
}
}
\ No newline at end of file
[ {
"data" : {
"run" : 16,
"retry" : 10
}
} ]
\ No newline at end of file
<!DOCTYPE html>
<html dir="ltr">
<head>
<meta charset="utf-8">
<title>Allure Report</title>
<link rel="favicon" href="favicon.ico?v=2">
<link rel="stylesheet" href="styles.css">
<link rel="stylesheet" href="plugins/screen-diff/styles.css">
</head>
<body>
<div id="alert"></div>
<div id="content">
<span class="spinner">
<span class="spinner__circle"></span>
</span>
</div>
<div id="popup"></div>
<script src="app.js"></script>
<script src="plugins/behaviors/index.js"></script>
<script src="plugins/packages/index.js"></script>
<script src="plugins/screen-diff/index.js"></script>
</body>
</html>
'use strict';
allure.api.addTranslation('en', {
tab: {
behaviors: {
name: 'Behaviors'
}
},
widget: {
behaviors: {
name: 'Features by stories',
showAll: 'show all'
}
}
});
allure.api.addTranslation('ru', {
tab: {
behaviors: {
name: 'Функциональность'
}
},
widget: {
behaviors: {
name: 'Функциональность',
showAll: 'показать все'
}
}
});
allure.api.addTranslation('zh', {
tab: {
behaviors: {
name: '功能'
}
},
widget: {
behaviors: {
name: '特性场景',
showAll: '显示所有'
}
}
});
allure.api.addTranslation('de', {
tab: {
behaviors: {
name: 'Verhalten'
}
},
widget: {
behaviors: {
name: 'Features nach Stories',
showAll: 'Zeige alle'
}
}
});
allure.api.addTranslation('nl', {
tab: {
behaviors: {
name: 'Functionaliteit'
}
},
widget: {
behaviors: {
name: 'Features en story’s',
showAll: 'Toon alle'
}
}
});
allure.api.addTranslation('he', {
tab: {
behaviors: {
name: 'התנהגויות'
}
},
widget: {
behaviors: {
name: 'תכונות לפי סיפורי משתמש',
showAll: 'הצג הכול'
}
}
});
allure.api.addTranslation('br', {
tab: {
behaviors: {
name: 'Comportamentos'
}
},
widget: {
behaviors: {
name: 'Funcionalidades por história',
showAll: 'Mostrar tudo'
}
}
});
allure.api.addTranslation('ja', {
tab: {
behaviors: {
name: '振る舞い'
}
},
widget: {
behaviors: {
name: 'ストーリー別の機能',
showAll: '全て表示'
}
}
});
allure.api.addTranslation('es', {
tab: {
behaviors: {
name: 'Funcionalidades'
}
},
widget: {
behaviors: {
name: 'Funcionalidades por Historias de Usuario',
showAll: 'mostrar todo'
}
}
});
allure.api.addTranslation('kr', {
tab: {
behaviors: {
name: '동작'
}
},
widget: {
behaviors: {
name: '스토리별 기능',
showAll: '전체 보기'
}
}
});
allure.api.addTranslation('fr', {
tab: {
behaviors: {
name: 'Comportements'
}
},
widget: {
behaviors: {
name: 'Thèmes par histoires',
showAll: 'Montrer tout'
}
}
});
allure.api.addTab('behaviors', {
title: 'tab.behaviors.name', icon: 'fa fa-list',
route: 'behaviors(/)(:testGroup)(/)(:testResult)(/)(:testResultTab)(/)',
onEnter: (function (testGroup, testResult, testResultTab) {
return new allure.components.TreeLayout({
testGroup: testGroup,
testResult: testResult,
testResultTab: testResultTab,
tabName: 'tab.behaviors.name',
baseUrl: 'behaviors',
url: 'data/behaviors.json',
csvUrl: 'data/behaviors.csv'
});
})
});
allure.api.addWidget('widgets', 'behaviors', allure.components.WidgetStatusView.extend({
rowTag: 'a',
title: 'widget.behaviors.name',
baseUrl: 'behaviors',
showLinks: true
}));
'use strict';
allure.api.addTranslation('en', {
tab: {
packages: {
name: 'Packages'
}
}
});
allure.api.addTranslation('ru', {
tab: {
packages: {
name: 'Пакеты'
}
}
});
allure.api.addTranslation('zh', {
tab: {
packages: {
name: '包'
}
}
});
allure.api.addTranslation('de', {
tab: {
packages: {
name: 'Pakete'
}
}
});
allure.api.addTranslation('nl', {
tab: {
packages: {
name: 'Packages'
}
}
});
allure.api.addTranslation('he', {
tab: {
packages: {
name: 'חבילות'
}
}
});
allure.api.addTranslation('br', {
tab: {
packages: {
name: 'Pacotes'
}
}
});
allure.api.addTranslation('ja', {
tab: {
packages: {
name: 'パッケージ'
}
}
});
allure.api.addTranslation('es', {
tab: {
packages: {
name: 'Paquetes'
}
}
});
allure.api.addTranslation('kr', {
tab: {
packages: {
name: '패키지'
}
}
});
allure.api.addTranslation('fr', {
tab: {
packages: {
name: 'Paquets'
}
}
});
allure.api.addTab('packages', {
title: 'tab.packages.name', icon: 'fa fa-align-left',
route: 'packages(/)(:testGroup)(/)(:testResult)(/)(:testResultTab)(/)',
onEnter: (function (testGroup, testResult, testResultTab) {
return new allure.components.TreeLayout({
testGroup: testGroup,
testResult: testResult,
testResultTab: testResultTab,
tabName: 'tab.packages.name',
baseUrl: 'packages',
url: 'data/packages.json'
});
})
});
(function () {
var settings = allure.getPluginSettings('screen-diff', { diffType: 'diff' });
function renderImage(src) {
return (
'<div class="screen-diff__container">' +
'<img class="screen-diff__image" src="' +
src +
'">' +
'</div>'
);
}
function findImage(data, name) {
if (data.testStage && data.testStage.attachments) {
var matchedImage = data.testStage.attachments.filter(function (attachment) {
return attachment.name === name;
})[0];
if (matchedImage) {
return 'data/attachments/' + matchedImage.source;
}
}
return null;
}
function renderDiffContent(type, diffImage, actualImage, expectedImage) {
if (type === 'diff') {
if (diffImage) {
return renderImage(diffImage);
}
}
if (type === 'overlay' && expectedImage) {
return (
'<div class="screen-diff__overlay screen-diff__container">' +
'<img class="screen-diff__image" src="' +
expectedImage +
'">' +
'<div class="screen-diff__image-over">' +
'<img class="screen-diff__image" src="' +
actualImage +
'">' +
'</div>' +
'</div>'
);
}
if (actualImage) {
return renderImage(actualImage);
}
return 'No diff data provided';
}
var TestResultView = Backbone.Marionette.View.extend({
regions: {
subView: '.screen-diff-view',
},
template: function () {
return '<div class="screen-diff-view"></div>';
},
onRender: function () {
var data = this.model.toJSON();
var testType = data.labels.filter(function (label) {
return label.name === 'testType';
})[0];
var diffImage = findImage(data, 'diff');
var actualImage = findImage(data, 'actual');
var expectedImage = findImage(data, 'expected');
if (!testType || testType.value !== 'screenshotDiff') {
return;
}
this.showChildView(
'subView',
new ScreenDiffView({
diffImage: diffImage,
actualImage: actualImage,
expectedImage: expectedImage,
}),
);
},
});
var ErrorView = Backbone.Marionette.View.extend({
templateContext: function () {
return this.options;
},
template: function (data) {
return '<pre class="screen-diff-error">' + data.error + '</pre>';
},
});
var AttachmentView = Backbone.Marionette.View.extend({
regions: {
subView: '.screen-diff-view',
},
template: function () {
return '<div class="screen-diff-view"></div>';
},
onRender: function () {
jQuery
.getJSON(this.options.sourceUrl)
.then(this.renderScreenDiffView.bind(this), this.renderErrorView.bind(this));
},
renderErrorView: function (error) {
console.log(error);
this.showChildView(
'subView',
new ErrorView({
error: error.statusText,
}),
);
},
renderScreenDiffView: function (data) {
this.showChildView(
'subView',
new ScreenDiffView({
diffImage: data.diff,
actualImage: data.actual,
expectedImage: data.expected,
}),
);
},
});
var ScreenDiffView = Backbone.Marionette.View.extend({
className: 'pane__section',
events: function () {
return {
['click [name="screen-diff-type-' + this.cid + '"]']: 'onDiffTypeChange',
'mousemove .screen-diff__overlay': 'onOverlayMove',
};
},
initialize: function (options) {
this.diffImage = options.diffImage;
this.actualImage = options.actualImage;
this.expectedImage = options.expectedImage;
this.radioName = 'screen-diff-type-' + this.cid;
},
templateContext: function () {
return {
diffType: settings.get('diffType'),
diffImage: this.diffImage,
actualImage: this.actualImage,
expectedImage: this.expectedImage,
radioName: this.radioName,
};
},
template: function (data) {
if (!data.diffImage && !data.actualImage && !data.expectedImage) {
return '';
}
return (
'<h3 class="pane__section-title">Screen Diff</h3>' +
'<div class="screen-diff__content">' +
'<div class="screen-diff__switchers">' +
'<label><input type="radio" name="' +
data.radioName +
'" value="diff"> Show diff</label>' +
'<label><input type="radio" name="' +
data.radioName +
'" value="overlay"> Show overlay</label>' +
'</div>' +
renderDiffContent(
data.diffType,
data.diffImage,
data.actualImage,
data.expectedImage,
) +
'</div>'
);
},
adjustImageSize: function (event) {
var overImage = this.$(event.target);
overImage.width(overImage.width());
},
onRender: function () {
const diffType = settings.get('diffType');
this.$('[name="' + this.radioName + '"][value="' + diffType + '"]').prop(
'checked',
true,
);
if (diffType === 'overlay') {
this.$('.screen-diff__image-over img').on('load', this.adjustImageSize.bind(this));
}
},
onOverlayMove: function (event) {
var pageX = event.pageX;
var containerScroll = this.$('.screen-diff__container').scrollLeft();
var elementX = event.currentTarget.getBoundingClientRect().left;
var delta = pageX - elementX + containerScroll;
this.$('.screen-diff__image-over').width(delta);
},
onDiffTypeChange: function (event) {
settings.save('diffType', event.target.value);
this.render();
},
});
allure.api.addTestResultBlock(TestResultView, { position: 'before' });
allure.api.addAttachmentViewer('application/vnd.allure.image.diff', {
View: AttachmentView,
icon: 'fa fa-exchange',
});
})();
.screen-diff__switchers {
margin-bottom: 1em;
}
.screen-diff__switchers label + label {
margin-left: 1em;
}
.screen-diff__overlay {
position: relative;
cursor: col-resize;
}
.screen-diff__container {
overflow-x: auto;
}
.screen-diff__image-over {
top: 0;
left: 0;
bottom: 0;
background: #fff;
position: absolute;
overflow: hidden;
box-shadow: 2px 0 1px -1px #aaa;
}
.screen-diff-error {
color: #fd5a3e;
}
This source diff could not be displayed because it is too large. You can view the blob instead.
{
"total" : 1,
"items" : [ {
"uid" : "f2ae4690c9b2f3df492f4f543cc9c7a2",
"name" : "BPM系统",
"statistic" : {
"failed" : 2,
"broken" : 0,
"skipped" : 0,
"passed" : 1,
"unknown" : 0,
"total" : 3
}
} ]
}
\ No newline at end of file
[ {
"data" : {
"Product defects" : 2
}
} ]
\ No newline at end of file
{
"total" : 1,
"items" : [ {
"uid" : "8fb3a91ba5aaf9de24cc8a92edc82b5d",
"name" : "Product defects",
"statistic" : {
"failed" : 2,
"broken" : 0,
"skipped" : 0,
"passed" : 0,
"unknown" : 0,
"total" : 2
}
} ]
}
\ No newline at end of file
[ {
"data" : {
"duration" : 13182
}
} ]
\ No newline at end of file
[ {
"uid" : "9262c97d3be172ea",
"name" : "反向用例-密码为空",
"time" : {
"start" : 1691399017375,
"stop" : 1691399017467,
"duration" : 92
},
"status" : "passed",
"severity" : "normal"
}, {
"uid" : "4846ba5e55af2bf1",
"name" : "反向用例-用户名过长",
"time" : {
"start" : 1691399016938,
"stop" : 1691399017031,
"duration" : 93
},
"status" : "passed",
"severity" : "normal"
}, {
"uid" : "995aa7bfe2ad2c36",
"name" : "正向用例",
"time" : {
"start" : 1691399023717,
"stop" : 1691399023898,
"duration" : 181
},
"status" : "passed",
"severity" : "normal"
}, {
"uid" : "ca0f0da1fb5b1a9d",
"name" : "正向用例",
"time" : {
"start" : 1691399023909,
"stop" : 1691399023983,
"duration" : 74
},
"status" : "passed",
"severity" : "normal"
}, {
"uid" : "cc13490ee94aa27d",
"name" : "正向用例",
"time" : {
"start" : 1691399023476,
"stop" : 1691399023532,
"duration" : 56
},
"status" : "failed",
"severity" : "normal"
}, {
"uid" : "342a24609b3996e0",
"name" : "正向用例",
"time" : {
"start" : 1691399023560,
"stop" : 1691399023701,
"duration" : 141
},
"status" : "passed",
"severity" : "normal"
}, {
"uid" : "33375d4e860e5456",
"name" : "正向用例",
"time" : {
"start" : 1691399029838,
"stop" : 1691399029973,
"duration" : 135
},
"status" : "failed",
"severity" : "normal"
}, {
"uid" : "35af4ef76050b260",
"name" : "正向用例",
"time" : {
"start" : 1691399016791,
"stop" : 1691399016848,
"duration" : 57
},
"status" : "passed",
"severity" : "normal"
}, {
"uid" : "876f7a309f93bdd4",
"name" : "反向用例-用户名过短",
"time" : {
"start" : 1691399017044,
"stop" : 1691399017142,
"duration" : 98
},
"status" : "passed",
"severity" : "normal"
}, {
"uid" : "48f2044be487dde3",
"name" : "反向用例-密码为过短",
"time" : {
"start" : 1691399017591,
"stop" : 1691399017687,
"duration" : 96
},
"status" : "passed",
"severity" : "normal"
}, {
"uid" : "e6de64866f470634",
"name" : "反向用例-用户名为空",
"time" : {
"start" : 1691399016872,
"stop" : 1691399016926,
"duration" : 54
},
"status" : "passed",
"severity" : "normal"
}, {
"uid" : "9fdbdff7fbc9aba9",
"name" : "正向用例",
"time" : {
"start" : 1691399023993,
"stop" : 1691399024052,
"duration" : 59
},
"status" : "passed",
"severity" : "normal"
}, {
"uid" : "bfbb6ff6c978dd13",
"name" : "反向用例-用户名特殊字符",
"time" : {
"start" : 1691399017156,
"stop" : 1691399017255,
"duration" : 99
},
"status" : "passed",
"severity" : "normal"
}, {
"uid" : "744f2d6bfb921a07",
"name" : "反向用例-密码为长",
"time" : {
"start" : 1691399017479,
"stop" : 1691399017576,
"duration" : 97
},
"status" : "passed",
"severity" : "normal"
}, {
"uid" : "f99e365a0b702222",
"name" : "反向用例-密码为特殊字符",
"time" : {
"start" : 1691399017699,
"stop" : 1691399017794,
"duration" : 95
},
"status" : "passed",
"severity" : "normal"
}, {
"uid" : "7138d75998f57a3d",
"name" : "反向用例-用户名错误",
"time" : {
"start" : 1691399017270,
"stop" : 1691399017363,
"duration" : 93
},
"status" : "passed",
"severity" : "normal"
} ]
\ No newline at end of file
[ {
"data" : {
"failed" : 2,
"broken" : 0,
"skipped" : 0,
"passed" : 14,
"unknown" : 0,
"total" : 16
}
} ]
\ No newline at end of file
[ {
"data" : {
"run" : 16,
"retry" : 10
}
} ]
\ No newline at end of file
[ {
"uid" : "744f2d6bfb921a07",
"name" : "反向用例-密码为长",
"time" : {
"start" : 1691399017479,
"stop" : 1691399017576,
"duration" : 97
},
"status" : "passed",
"severity" : "normal"
}, {
"uid" : "33375d4e860e5456",
"name" : "正向用例",
"time" : {
"start" : 1691399029838,
"stop" : 1691399029973,
"duration" : 135
},
"status" : "failed",
"severity" : "normal"
}, {
"uid" : "bfbb6ff6c978dd13",
"name" : "反向用例-用户名特殊字符",
"time" : {
"start" : 1691399017156,
"stop" : 1691399017255,
"duration" : 99
},
"status" : "passed",
"severity" : "normal"
}, {
"uid" : "cc13490ee94aa27d",
"name" : "正向用例",
"time" : {
"start" : 1691399023476,
"stop" : 1691399023532,
"duration" : 56
},
"status" : "failed",
"severity" : "normal"
}, {
"uid" : "e6de64866f470634",
"name" : "反向用例-用户名为空",
"time" : {
"start" : 1691399016872,
"stop" : 1691399016926,
"duration" : 54
},
"status" : "passed",
"severity" : "normal"
}, {
"uid" : "7138d75998f57a3d",
"name" : "反向用例-用户名错误",
"time" : {
"start" : 1691399017270,
"stop" : 1691399017363,
"duration" : 93
},
"status" : "passed",
"severity" : "normal"
}, {
"uid" : "35af4ef76050b260",
"name" : "正向用例",
"time" : {
"start" : 1691399016791,
"stop" : 1691399016848,
"duration" : 57
},
"status" : "passed",
"severity" : "normal"
}, {
"uid" : "48f2044be487dde3",
"name" : "反向用例-密码为过短",
"time" : {
"start" : 1691399017591,
"stop" : 1691399017687,
"duration" : 96
},
"status" : "passed",
"severity" : "normal"
}, {
"uid" : "9262c97d3be172ea",
"name" : "反向用例-密码为空",
"time" : {
"start" : 1691399017375,
"stop" : 1691399017467,
"duration" : 92
},
"status" : "passed",
"severity" : "normal"
}, {
"uid" : "342a24609b3996e0",
"name" : "正向用例",
"time" : {
"start" : 1691399023560,
"stop" : 1691399023701,
"duration" : 141
},
"status" : "passed",
"severity" : "normal"
}, {
"uid" : "876f7a309f93bdd4",
"name" : "反向用例-用户名过短",
"time" : {
"start" : 1691399017044,
"stop" : 1691399017142,
"duration" : 98
},
"status" : "passed",
"severity" : "normal"
}, {
"uid" : "f99e365a0b702222",
"name" : "反向用例-密码为特殊字符",
"time" : {
"start" : 1691399017699,
"stop" : 1691399017794,
"duration" : 95
},
"status" : "passed",
"severity" : "normal"
}, {
"uid" : "ca0f0da1fb5b1a9d",
"name" : "正向用例",
"time" : {
"start" : 1691399023909,
"stop" : 1691399023983,
"duration" : 74
},
"status" : "passed",
"severity" : "normal"
}, {
"uid" : "995aa7bfe2ad2c36",
"name" : "正向用例",
"time" : {
"start" : 1691399023717,
"stop" : 1691399023898,
"duration" : 181
},
"status" : "passed",
"severity" : "normal"
}, {
"uid" : "4846ba5e55af2bf1",
"name" : "反向用例-用户名过长",
"time" : {
"start" : 1691399016938,
"stop" : 1691399017031,
"duration" : 93
},
"status" : "passed",
"severity" : "normal"
}, {
"uid" : "9fdbdff7fbc9aba9",
"name" : "正向用例",
"time" : {
"start" : 1691399023993,
"stop" : 1691399024052,
"duration" : 59
},
"status" : "passed",
"severity" : "normal"
} ]
\ No newline at end of file
[ {
"uid" : "9262c97d3be172ea",
"name" : "反向用例-密码为空",
"time" : {
"start" : 1691399017375,
"stop" : 1691399017467,
"duration" : 92
},
"status" : "passed",
"severity" : "normal"
}, {
"uid" : "4846ba5e55af2bf1",
"name" : "反向用例-用户名过长",
"time" : {
"start" : 1691399016938,
"stop" : 1691399017031,
"duration" : 93
},
"status" : "passed",
"severity" : "normal"
}, {
"uid" : "995aa7bfe2ad2c36",
"name" : "正向用例",
"time" : {
"start" : 1691399023717,
"stop" : 1691399023898,
"duration" : 181
},
"status" : "passed",
"severity" : "normal"
}, {
"uid" : "ca0f0da1fb5b1a9d",
"name" : "正向用例",
"time" : {
"start" : 1691399023909,
"stop" : 1691399023983,
"duration" : 74
},
"status" : "passed",
"severity" : "normal"
}, {
"uid" : "cc13490ee94aa27d",
"name" : "正向用例",
"time" : {
"start" : 1691399023476,
"stop" : 1691399023532,
"duration" : 56
},
"status" : "failed",
"severity" : "normal"
}, {
"uid" : "342a24609b3996e0",
"name" : "正向用例",
"time" : {
"start" : 1691399023560,
"stop" : 1691399023701,
"duration" : 141
},
"status" : "passed",
"severity" : "normal"
}, {
"uid" : "33375d4e860e5456",
"name" : "正向用例",
"time" : {
"start" : 1691399029838,
"stop" : 1691399029973,
"duration" : 135
},
"status" : "failed",
"severity" : "normal"
}, {
"uid" : "35af4ef76050b260",
"name" : "正向用例",
"time" : {
"start" : 1691399016791,
"stop" : 1691399016848,
"duration" : 57
},
"status" : "passed",
"severity" : "normal"
}, {
"uid" : "876f7a309f93bdd4",
"name" : "反向用例-用户名过短",
"time" : {
"start" : 1691399017044,
"stop" : 1691399017142,
"duration" : 98
},
"status" : "passed",
"severity" : "normal"
}, {
"uid" : "48f2044be487dde3",
"name" : "反向用例-密码为过短",
"time" : {
"start" : 1691399017591,
"stop" : 1691399017687,
"duration" : 96
},
"status" : "passed",
"severity" : "normal"
}, {
"uid" : "e6de64866f470634",
"name" : "反向用例-用户名为空",
"time" : {
"start" : 1691399016872,
"stop" : 1691399016926,
"duration" : 54
},
"status" : "passed",
"severity" : "normal"
}, {
"uid" : "9fdbdff7fbc9aba9",
"name" : "正向用例",
"time" : {
"start" : 1691399023993,
"stop" : 1691399024052,
"duration" : 59
},
"status" : "passed",
"severity" : "normal"
}, {
"uid" : "bfbb6ff6c978dd13",
"name" : "反向用例-用户名特殊字符",
"time" : {
"start" : 1691399017156,
"stop" : 1691399017255,
"duration" : 99
},
"status" : "passed",
"severity" : "normal"
}, {
"uid" : "744f2d6bfb921a07",
"name" : "反向用例-密码为长",
"time" : {
"start" : 1691399017479,
"stop" : 1691399017576,
"duration" : 97
},
"status" : "passed",
"severity" : "normal"
}, {
"uid" : "f99e365a0b702222",
"name" : "反向用例-密码为特殊字符",
"time" : {
"start" : 1691399017699,
"stop" : 1691399017794,
"duration" : 95
},
"status" : "passed",
"severity" : "normal"
}, {
"uid" : "7138d75998f57a3d",
"name" : "反向用例-用户名错误",
"time" : {
"start" : 1691399017270,
"stop" : 1691399017363,
"duration" : 93
},
"status" : "passed",
"severity" : "normal"
} ]
\ No newline at end of file
{
"total" : 1,
"items" : [ {
"uid" : "10f50a925462c4c85491656d24b32ac1",
"name" : "test_bpm",
"statistic" : {
"failed" : 2,
"broken" : 0,
"skipped" : 0,
"passed" : 14,
"unknown" : 0,
"total" : 16
}
} ]
}
\ No newline at end of file
{
"reportName" : "Allure Report",
"testRuns" : [ ],
"statistic" : {
"failed" : 2,
"broken" : 0,
"skipped" : 0,
"passed" : 14,
"unknown" : 0,
"total" : 16
},
"time" : {
"start" : 1691399016791,
"stop" : 1691399029973,
"duration" : 13182,
"minDuration" : 54,
"maxDuration" : 181,
"sumDuration" : 1520
}
}
\ No newline at end of file
{"uuid": "2dbf44d0-15bd-49b9-86de-2e6182905486", "befores": [{"name": "url", "status": "passed", "start": 1691399023992, "stop": 1691399023992}], "start": 1691399023992, "stop": 1691399024057}
\ No newline at end of file
{"uuid": "36fc83f4-4bdc-4aa0-b8c9-15b7317bd188", "befores": [{"name": "module", "status": "passed", "start": 1691399016789, "stop": 1691399016789}], "start": 1691399016789, "stop": 1691399016865}
\ No newline at end of file
{"uuid": "58e6c9dc-aa13-419c-b84e-6c6ce48c6c95", "befores": [{"name": "method", "status": "passed", "start": 1691399028669, "stop": 1691399028670}], "start": 1691399028669, "stop": 1691399028817}
\ No newline at end of file
{"uuid": "20758e75-d310-4baf-b9e0-9e6fa67af8d1", "befores": [{"name": "update_key", "status": "passed", "start": 1691399023993, "stop": 1691399023993}], "start": 1691399023993, "stop": 1691399024052}
\ No newline at end of file
{"uuid": "682ad721-2bd1-48e8-95e2-e84a55cdc40e", "befores": [{"name": "module", "status": "passed", "start": 1691399017155, "stop": 1691399017155}], "start": 1691399017155, "stop": 1691399017263}
\ No newline at end of file
{"uuid": "f4c951ad-095b-470b-8273-fb543eaab694", "befores": [{"name": "data", "status": "passed", "start": 1691399028670, "stop": 1691399028670}], "start": 1691399028670, "stop": 1691399028816}
\ No newline at end of file
{"name": "正向用例", "status": "passed", "attachments": [{"name": "log", "source": "8407bb8d-5eb8-4135-9076-e7b47b368524-attachment.txt", "type": "text/plain"}, {"name": "stdout", "source": "309b4e56-f2fc-4561-91f8-0106cd6b8e6f-attachment.txt", "type": "text/plain"}], "parameters": [{"name": "module", "value": "'组织管理'"}, {"name": "interface", "value": "'保存组织参数'"}, {"name": "title", "value": "'正向用例'"}, {"name": "level", "value": "'高'"}, {"name": "method", "value": "'post'"}, {"name": "url", "value": "'http://120.46.172.186:8080/api/org/v1/orgParam/saveOrgParams'"}, {"name": "mime", "value": "'application/json|query'"}, {"name": "data", "value": "{'query': {'orgCode': 'test56_org'}, 'body': [{'alias': 'sz', 'value': 0}, {'alias': 'zy', 'value': 'math'}, {'alias': 'rq', 'value': '2023-08-04T16:00:00.000Z'}, {'alias': 'ah', 'value': 'lq'}, {'alias': 'yyyy', 'value': '越高越好'}, {'alias': 'xb', 'value': '2'}]}"}, {"name": "expect", "value": "{'state': True, 'message': '保存组织参数成功!'}"}, {"name": "sql_type", "value": "None"}, {"name": "sql_sentence", "value": "None"}, {"name": "update_key", "value": "None"}], "start": 1691399023909, "stop": 1691399023983, "uuid": "0bab2203-77fb-4b87-8152-b8a52b3890d2", "historyId": "74e8920fe95c2c7a6d36157ccbacbeb9", "testCaseId": "0abeaba8f176b6785a0334bed7c1bdad", "fullName": "test_bpm.TestBPM#test_bpm", "labels": [{"name": "feature", "value": "组织管理"}, {"name": "story", "value": "保存组织参数"}, {"name": "severity", "value": "高"}, {"name": "epic", "value": "BPM系统"}, {"name": "suite", "value": "test_bpm"}, {"name": "subSuite", "value": "TestBPM"}, {"name": "host", "value": "LAPTOP-31V3JBFR"}, {"name": "thread", "value": "6412-MainThread"}, {"name": "framework", "value": "pytest"}, {"name": "language", "value": "cpython3"}, {"name": "package", "value": "test_bpm"}]}
\ No newline at end of file
{"uuid": "db8b8893-14e3-46b6-87a8-6e1bdd32c885", "befores": [{"name": "sql_sentence", "status": "passed", "start": 1691399023560, "stop": 1691399023560}], "start": 1691399023560, "stop": 1691399023702}
\ No newline at end of file
{"uuid": "fa8c1cad-b203-4bac-bfc7-f46757595b36", "befores": [{"name": "title", "status": "passed", "start": 1691399017699, "stop": 1691399017699}], "start": 1691399017699, "stop": 1691399017799}
\ No newline at end of file
{"uuid": "500aa2b8-b15c-409a-8821-426dac3f2c48", "befores": [{"name": "title", "status": "passed", "start": 1691399023716, "stop": 1691399023716}], "start": 1691399023716, "stop": 1691399023903}
\ No newline at end of file
{"uuid": "066ea15b-dc43-4832-a50c-736de9409db5", "befores": [{"name": "method", "status": "passed", "start": 1691399017588, "stop": 1691399017588}], "start": 1691399017588, "stop": 1691399017692}
\ No newline at end of file
{"uuid": "55b7792d-3818-4e6f-aaa5-c4e551e49283", "befores": [{"name": "sql_sentence", "status": "passed", "start": 1691399016872, "stop": 1691399016872}], "start": 1691399016872, "stop": 1691399016926}
\ No newline at end of file
{"uuid": "0ea8b3df-bbff-4ad0-8b0b-aa9b83b73df2", "befores": [{"name": "sql_sentence", "status": "passed", "start": 1691399028670, "stop": 1691399028670}], "start": 1691399028670, "stop": 1691399028814}
\ No newline at end of file
{"uuid": "ed3390cb-d02a-4f1e-ae56-d597a46332a3", "befores": [{"name": "mime", "status": "passed", "start": 1691399017806, "stop": 1691399017807}], "start": 1691399017806, "stop": 1691399018083}
\ No newline at end of file
{"uuid": "77fe8eeb-31da-4b59-99c3-07c519d81e22", "befores": [{"name": "data", "status": "passed", "start": 1691399024064, "stop": 1691399024064}], "start": 1691399024064, "stop": 1691399024177}
\ No newline at end of file
{"uuid": "846630b7-ca21-4e70-932e-c05210b7a547", "befores": [{"name": "sql_sentence", "status": "passed", "start": 1691399017374, "stop": 1691399017374}], "start": 1691399017374, "stop": 1691399017468}
\ No newline at end of file
{"uuid": "ca6d93bc-f24e-4bcf-93e9-1c14db9fde8e", "befores": [{"name": "update_key", "status": "passed", "start": 1691399017807, "stop": 1691399017807}], "start": 1691399017807, "stop": 1691399018071}
\ No newline at end of file
{"uuid": "3594bde0-3a35-4f93-bb5e-13710b0ceb0e", "befores": [{"name": "expect", "status": "passed", "start": 1691399017374, "stop": 1691399017374}], "start": 1691399017374, "stop": 1691399017469}
\ No newline at end of file
{"uuid": "2d1f90da-97a5-4420-b77d-2b7897563b07", "befores": [{"name": "module", "status": "passed", "start": 1691399024064, "stop": 1691399024064}], "start": 1691399024064, "stop": 1691399024181}
\ No newline at end of file
{"uuid": "45862d35-3109-459e-bcbb-f68716c80d59", "befores": [{"name": "sql_type", "status": "passed", "start": 1691399016790, "stop": 1691399016790}], "start": 1691399016790, "stop": 1691399016849}
\ No newline at end of file
{"uuid": "fd25ae2d-2de0-43c4-9b3a-935c5687800b", "befores": [{"name": "interface", "status": "passed", "start": 1691399024064, "stop": 1691399024064}], "start": 1691399024064, "stop": 1691399024180}
\ No newline at end of file
DEBUG--2023-08-07 17:03:37--Resetting dropped connection: 120.46.172.186
DEBUG--2023-08-07 17:03:37--http://120.46.172.186:8080 "POST /auth HTTP/1.1" 500 None
\ No newline at end of file
{"uuid": "04fbd1d3-7de2-4c88-8b30-4c3fb93efc3b", "befores": [{"name": "url", "status": "passed", "start": 1691399016790, "stop": 1691399016790}], "start": 1691399016790, "stop": 1691399016861}
\ No newline at end of file
{"uuid": "366ffe88-caf0-4a83-85a1-85030aaf1e7d", "befores": [{"name": "mime", "status": "passed", "start": 1691399023559, "stop": 1691399023559}], "start": 1691399023559, "stop": 1691399023705}
\ No newline at end of file
{"uuid": "0b5769b8-aa09-4261-b77e-ba5e27fac479", "befores": [{"name": "update_key", "status": "passed", "start": 1691399017699, "stop": 1691399017699}], "start": 1691399017699, "stop": 1691399017794}
\ No newline at end of file
{"uuid": "ef52f1aa-107f-4195-85cd-cc575dba5032", "befores": [{"name": "sql_type", "status": "passed", "start": 1691399023717, "stop": 1691399023717}], "start": 1691399023717, "stop": 1691399023900}
\ No newline at end of file
DEBUG--2023-08-07 17:03:44--http://120.46.172.186:8080 "DELETE /api/demension/v1/dem/deleteDemByIds?ids=1688475997541777408 HTTP/1.1" 200 None
ERROR--2023-08-07 17:03:44--断言失败, 模块名称为:维度管理,接口名称为:根据维度编码删除维度,用例标题:正向用例,用例为:{'ids': '1688475997541777408'},期望结果为:{'state': True, 'message': '删除维度成功'},服务器返回数据为:{"state":true,"message":"删除维度成功!","value":""}
DEBUG--2023-08-07 17:03:45--http://120.46.172.186:8080 "DELETE /api/demension/v1/dem/deleteDemByIds?ids=1688475997541777408 HTTP/1.1" 500 None
ERROR--2023-08-07 17:03:45--断言失败, 模块名称为:维度管理,接口名称为:根据维度编码删除维度,用例标题:正向用例,用例为:{'ids': '1688475997541777408'},期望结果为:{'state': True, 'message': '删除维度成功'},服务器返回数据为:{"state":false,"message":"","logId":"1688476004198137856"}
DEBUG--2023-08-07 17:03:46--Resetting dropped connection: 120.46.172.186
DEBUG--2023-08-07 17:03:46--http://120.46.172.186:8080 "DELETE /api/demension/v1/dem/deleteDemByIds?ids=1688475997541777408 HTTP/1.1" 500 None
ERROR--2023-08-07 17:03:46--断言失败, 模块名称为:维度管理,接口名称为:根据维度编码删除维度,用例标题:正向用例,用例为:{'ids': '1688475997541777408'},期望结果为:{'state': True, 'message': '删除维度成功'},服务器返回数据为:{"state":false,"message":"","logId":"1688476009176776704"}
DEBUG--2023-08-07 17:03:47--Resetting dropped connection: 120.46.172.186
DEBUG--2023-08-07 17:03:47--http://120.46.172.186:8080 "DELETE /api/demension/v1/dem/deleteDemByIds?ids=1688475997541777408 HTTP/1.1" 500 None
ERROR--2023-08-07 17:03:47--断言失败, 模块名称为:维度管理,接口名称为:根据维度编码删除维度,用例标题:正向用例,用例为:{'ids': '1688475997541777408'},期望结果为:{'state': True, 'message': '删除维度成功'},服务器返回数据为:{"state":false,"message":"","logId":"1688476014071529472"}
DEBUG--2023-08-07 17:03:48--Resetting dropped connection: 120.46.172.186
DEBUG--2023-08-07 17:03:48--http://120.46.172.186:8080 "DELETE /api/demension/v1/dem/deleteDemByIds?ids=1688475997541777408 HTTP/1.1" 500 None
ERROR--2023-08-07 17:03:48--断言失败, 模块名称为:维度管理,接口名称为:根据维度编码删除维度,用例标题:正向用例,用例为:{'ids': '1688475997541777408'},期望结果为:{'state': True, 'message': '删除维度成功'},服务器返回数据为:{"state":false,"message":"","logId":"1688476018974670848"}
\ No newline at end of file
{"uuid": "3352df78-d0c1-410a-8c9f-0c06dfc6d05f", "befores": [{"name": "interface", "status": "passed", "start": 1691399017806, "stop": 1691399017806}], "start": 1691399017806, "stop": 1691399018086}
\ No newline at end of file
{"uuid": "f5dc9634-2198-45e4-8ca5-04308d216869", "befores": [{"name": "sql_sentence", "status": "passed", "start": 1691399021306, "stop": 1691399021306}], "start": 1691399021306, "stop": 1691399021374}
\ No newline at end of file
{"uuid": "aa52d830-463c-4d75-ae4a-ee2f1ad2152f", "befores": [{"name": "module", "status": "passed", "start": 1691399017477, "stop": 1691399017477}], "start": 1691399017477, "stop": 1691399017583}
\ No newline at end of file
{"uuid": "297eab17-c968-469e-a7cb-126b6502cd58", "befores": [{"name": "mime", "status": "passed", "start": 1691399023717, "stop": 1691399023717}], "start": 1691399023717, "stop": 1691399023901}
\ No newline at end of file
{"uuid": "a3b83db2-bf4d-499f-81c9-e465c6b22487", "befores": [{"name": "expect", "status": "passed", "start": 1691399017043, "stop": 1691399017043}], "start": 1691399017043, "stop": 1691399017145}
\ No newline at end of file
{"uuid": "fa3a1b5c-7484-410b-80a5-9dab138f679b", "befores": [{"name": "module", "status": "passed", "start": 1691399029836, "stop": 1691399029836}], "start": 1691399029836, "stop": 1691399029985}
\ No newline at end of file
{"uuid": "dc85889c-89c4-4096-a9f9-6c4b4c213f25", "befores": [{"name": "sql_type", "status": "passed", "start": 1691399017807, "stop": 1691399017807}], "start": 1691399017807, "stop": 1691399018082}
\ No newline at end of file
{"uuid": "9e9f7d63-bfed-4bae-855b-d1ba7506f4e7", "befores": [{"name": "mime", "status": "passed", "start": 1691399017478, "stop": 1691399017478}], "start": 1691399017478, "stop": 1691399017580}
\ No newline at end of file
{"uuid": "e9842d2a-3974-4f35-a398-24c4bf002c4a", "befores": [{"name": "interface", "status": "passed", "start": 1691399022388, "stop": 1691399022388}], "start": 1691399022388, "stop": 1691399022456}
\ No newline at end of file
DEBUG--2023-08-07 17:03:37--Resetting dropped connection: 120.46.172.186
DEBUG--2023-08-07 17:03:37--http://120.46.172.186:8080 "POST /auth HTTP/1.1" 500 None
\ No newline at end of file
{"uuid": "67a6d2b7-a07d-407f-95c5-9087a6de8f66", "befores": [{"name": "interface", "status": "passed", "start": 1691399020197, "stop": 1691399020197}], "start": 1691399020197, "stop": 1691399020277}
\ No newline at end of file
{"uuid": "0dd094c8-aec9-4db0-b0e6-d4ea9bed8d74", "befores": [{"name": "sql_sentence", "status": "passed", "start": 1691399017589, "stop": 1691399017589}], "start": 1691399017589, "stop": 1691399017688}
\ No newline at end of file
{"name": "正向用例", "status": "failed", "statusDetails": {"message": "AssertionError: 断言失败", "trace": "self = <InterfaceAutoTest.test_case.test_bpm.TestBPM object at 0x00000257902F01C0>\nreq_fix = <InterfaceAutoTest.requests_method.requests_method.RequestsMethod object at 0x00000257902F0490>\ndb_fix = <InterfaceAutoTest.common.db.DB object at 0x00000257903D93D0>, module = '维度管理', interface = '根据维度编码删除维度', title = '正向用例'\nlevel = '高', method = 'DELETE', url = 'http://120.46.172.186:8080/api/demension/v1/dem/deleteDemByIds', mime = 'query'\ndata = {'ids': '1688475997541777408'}, expect = {'message': '删除维度成功', 'state': True}, sql_type = 'select'\nsql_sentence = 'SELECT ID_ FROM uc_demension WHERE `CODE_`=\"test56_dem\";', update_key = 'ids'\n\n @allure.epic(\"BPM系统\")\n @pytest.mark.parametrize(\"module, interface, title, level, method, url, mime, data, expect, sql_type, sql_sentence, update_key\", ReadExcel().get_data())\n def test_bpm(self, req_fix, db_fix, module, interface, title, level, method, url, mime, data, expect, sql_type, sql_sentence, update_key):\n allure.dynamic.feature(module)\n allure.dynamic.story(interface)\n allure.dynamic.title(title)\n allure.dynamic.severity(level)\n \n # 1.1:判断sql语句的类型是否为delete\n if sql_type == \"delete\":\n # 1.2 使用DB类对象,调用delete方法执行删除的sql语句\n db_fix.delete(sql_sentence)\n # # 1.3 使用RequestsMethod类对象调用request_all方法发送请求\n # result = req_fix.request_all(req_method=method, req_url=url, req_mime=mime, case_data=data)\n \n # 2.1 判断sql语句的类型是否为select\n elif sql_type == \"select\":\n # 2.2 使用DB类对象,调用select方法执行查询的sql语句,并接收查询结果\n select_result = db_fix.select(sql_sentence)\n # 2.3 将查询结果更新到用例数据中\n data[update_key] = select_result\n # # 2.3 使用RequestsMethod类对象调用request_all方法发送请求\n # result = req_fix.request_all(req_method=method, req_url=url, req_mime=mime, case_data=data)\n \n # 3.1 判断sql语句的类型是否delete|select或者为select|delete\n elif sql_type == \"delete|select\" or sql_type == \"select|delete\":\n # 3.2 使用DB类对象,调用delete方法执行删除的sql语句\n db_fix.delete(sql_sentence[\"delete\"])\n # 3.3 使用DB类对象,调用select方法执行查询的sql语句,并接收查询结果\n select_result = db_fix.select(sql_sentence[\"select\"])\n # 3.4 将查询结果更新到用例数据中\n data[update_key] = select_result\n # # 3.5 使用RequestsMethod类对象调用request_all方法发送请求\n # result = req_fix.request_all(req_method=method, req_url=url, req_mime=mime, case_data=data)\n #\n # else:\n # result = req_fix.request_all(req_method=method, req_url=url, req_mime=mime, case_data=data)\n \n result = req_fix.request_all(req_method=method, req_url=url, req_mime=mime, case_data=data)\n \n # 断言\n try:\n for key in expect:\n> assert expect[key] == result.json().get(key)\nE AssertionError: assert True == False\nE + where False = <built-in method get of dict object at 0x00000257902C1A40>('state')\nE + where <built-in method get of dict object at 0x00000257902C1A40> = {'logId': '1688476004198137856', 'message': '', 'state': False}.get\nE + where {'logId': '1688476004198137856', 'message': '', 'state': False} = <bound method Response.json of <Response [500]>>()\nE + where <bound method Response.json of <Response [500]>> = <Response [500]>.json\n\ntest_bpm.py:61: AssertionError\n\nDuring handling of the above exception, another exception occurred:\n\nself = <InterfaceAutoTest.test_case.test_bpm.TestBPM object at 0x00000257902F01C0>\nreq_fix = <InterfaceAutoTest.requests_method.requests_method.RequestsMethod object at 0x00000257902F0490>\ndb_fix = <InterfaceAutoTest.common.db.DB object at 0x00000257903D93D0>, module = '维度管理', interface = '根据维度编码删除维度', title = '正向用例'\nlevel = '高', method = 'DELETE', url = 'http://120.46.172.186:8080/api/demension/v1/dem/deleteDemByIds', mime = 'query'\ndata = {'ids': '1688475997541777408'}, expect = {'message': '删除维度成功', 'state': True}, sql_type = 'select'\nsql_sentence = 'SELECT ID_ FROM uc_demension WHERE `CODE_`=\"test56_dem\";', update_key = 'ids'\n\n @allure.epic(\"BPM系统\")\n @pytest.mark.parametrize(\"module, interface, title, level, method, url, mime, data, expect, sql_type, sql_sentence, update_key\", ReadExcel().get_data())\n def test_bpm(self, req_fix, db_fix, module, interface, title, level, method, url, mime, data, expect, sql_type, sql_sentence, update_key):\n allure.dynamic.feature(module)\n allure.dynamic.story(interface)\n allure.dynamic.title(title)\n allure.dynamic.severity(level)\n \n # 1.1:判断sql语句的类型是否为delete\n if sql_type == \"delete\":\n # 1.2 使用DB类对象,调用delete方法执行删除的sql语句\n db_fix.delete(sql_sentence)\n # # 1.3 使用RequestsMethod类对象调用request_all方法发送请求\n # result = req_fix.request_all(req_method=method, req_url=url, req_mime=mime, case_data=data)\n \n # 2.1 判断sql语句的类型是否为select\n elif sql_type == \"select\":\n # 2.2 使用DB类对象,调用select方法执行查询的sql语句,并接收查询结果\n select_result = db_fix.select(sql_sentence)\n # 2.3 将查询结果更新到用例数据中\n data[update_key] = select_result\n # # 2.3 使用RequestsMethod类对象调用request_all方法发送请求\n # result = req_fix.request_all(req_method=method, req_url=url, req_mime=mime, case_data=data)\n \n # 3.1 判断sql语句的类型是否delete|select或者为select|delete\n elif sql_type == \"delete|select\" or sql_type == \"select|delete\":\n # 3.2 使用DB类对象,调用delete方法执行删除的sql语句\n db_fix.delete(sql_sentence[\"delete\"])\n # 3.3 使用DB类对象,调用select方法执行查询的sql语句,并接收查询结果\n select_result = db_fix.select(sql_sentence[\"select\"])\n # 3.4 将查询结果更新到用例数据中\n data[update_key] = select_result\n # # 3.5 使用RequestsMethod类对象调用request_all方法发送请求\n # result = req_fix.request_all(req_method=method, req_url=url, req_mime=mime, case_data=data)\n #\n # else:\n # result = req_fix.request_all(req_method=method, req_url=url, req_mime=mime, case_data=data)\n \n result = req_fix.request_all(req_method=method, req_url=url, req_mime=mime, case_data=data)\n \n # 断言\n try:\n for key in expect:\n assert expect[key] == result.json().get(key)\n except:\n print(\"断言失败\")\n logging.error(\"断言失败, 模块名称为:{},接口名称为:{},用例标题:{},用例为:{},期望结果为:{},服务器返回数据为:{}\".format(module, interface, title, str(data), str(expect), result.text))\n> raise AssertionError(\"断言失败\")\nE AssertionError: 断言失败\n\ntest_bpm.py:65: AssertionError"}, "attachments": [{"name": "log", "source": "de8f2496-850c-4df0-9e7f-f935d114206a-attachment.txt", "type": "text/plain"}, {"name": "stdout", "source": "d8657218-1c30-4744-b510-959f53b1308c-attachment.txt", "type": "text/plain"}], "parameters": [{"name": "module", "value": "'维度管理'"}, {"name": "interface", "value": "'根据维度编码删除维度'"}, {"name": "title", "value": "'正向用例'"}, {"name": "level", "value": "'高'"}, {"name": "method", "value": "'DELETE'"}, {"name": "url", "value": "'http://120.46.172.186:8080/api/demension/v1/dem/deleteDemByIds'"}, {"name": "mime", "value": "'query'"}, {"name": "data", "value": "{'ids': '1688475997541777408'}"}, {"name": "expect", "value": "{'state': True, 'message': '删除维度成功'}"}, {"name": "sql_type", "value": "'select'"}, {"name": "sql_sentence", "value": "'SELECT ID_ FROM uc_demension WHERE `CODE_`=\"test56_dem\";'"}, {"name": "update_key", "value": "'ids'"}], "start": 1691399025190, "stop": 1691399025285, "uuid": "3cb9afc3-7898-4d5e-a032-6bbf64f87e1c", "historyId": "f37f5b35a33b0d851ad30e5c966f4068", "testCaseId": "0abeaba8f176b6785a0334bed7c1bdad", "fullName": "test_bpm.TestBPM#test_bpm", "labels": [{"name": "feature", "value": "维度管理"}, {"name": "story", "value": "根据维度编码删除维度"}, {"name": "severity", "value": "高"}, {"name": "epic", "value": "BPM系统"}, {"name": "suite", "value": "test_bpm"}, {"name": "subSuite", "value": "TestBPM"}, {"name": "host", "value": "LAPTOP-31V3JBFR"}, {"name": "thread", "value": "6412-MainThread"}, {"name": "framework", "value": "pytest"}, {"name": "language", "value": "cpython3"}, {"name": "package", "value": "test_bpm"}]}
\ No newline at end of file
DEBUG--2023-08-07 17:03:37--Resetting dropped connection: 120.46.172.186
DEBUG--2023-08-07 17:03:37--http://120.46.172.186:8080 "GET /refresh HTTP/1.1" 200 None
ERROR--2023-08-07 17:03:37--断言失败, 模块名称为:认证接口,接口名称为:刷新token,用例标题:正向用例,用例为:None,期望结果为:{'message': '刷新token成功'},服务器返回数据为:{"token":"eyJhbGciOiJIUzUxMiJ9.eyJzdWIiOiJhZG1pbiIsInRlbmFudElkIjoiLTEiLCJleHAiOjE2OTE0ODU0MTcsImlhdCI6MTY5MTM5OTAxN30.n-7NR1iCjIKHbeH-Djk8t1sRkJi_FVAwgVHcGFWP6kh4xOyu6c4rgNtn817qbxVK9O63Wo9-SnreSvMJI5L8Gw","username":"","account":"","userId":"","loginStatus":true,"userAttrs":{}}
DEBUG--2023-08-07 17:03:39--http://120.46.172.186:8080 "GET /refresh HTTP/1.1" 200 None
ERROR--2023-08-07 17:03:39--断言失败, 模块名称为:认证接口,接口名称为:刷新token,用例标题:正向用例,用例为:None,期望结果为:{'message': '刷新token成功'},服务器返回数据为:{"token":"eyJhbGciOiJIUzUxMiJ9.eyJzdWIiOiJhZG1pbiIsInRlbmFudElkIjoiLTEiLCJleHAiOjE2OTE0ODU0MTgsImlhdCI6MTY5MTM5OTAxOH0.Rb1x9O8uPZcXAfoDbWutU6f3taE2vMl0iRW4WVVwfeKYLS-zF9e0IFTyL2tUDstfMzs0ej7qYnsUg_CXR-qOHg","username":"","account":"","userId":"","loginStatus":true,"userAttrs":{}}
\ No newline at end of file
{"uuid": "faffcf7c-462c-43e6-a658-8f0c4c113a9f", "befores": [{"name": "module", "status": "passed", "start": 1691399021306, "stop": 1691399021306}], "start": 1691399021305, "stop": 1691399021378}
\ No newline at end of file
{"uuid": "573ced93-a9fe-427b-af6f-3cad25f6d24a", "befores": [{"name": "module", "status": "passed", "start": 1691399020196, "stop": 1691399020197}], "start": 1691399020196, "stop": 1691399020277}
\ No newline at end of file
{"uuid": "7b01fa08-1407-41dd-ac80-8186e80bfca7", "befores": [{"name": "interface", "status": "passed", "start": 1691399017588, "stop": 1691399017588}], "start": 1691399017588, "stop": 1691399017694}
\ No newline at end of file
{"uuid": "37aed01d-baec-4854-b38a-54e8b7ebebfb", "befores": [{"name": "title", "status": "passed", "start": 1691399016871, "stop": 1691399016871}], "start": 1691399016871, "stop": 1691399016932}
\ No newline at end of file
DEBUG--2023-08-07 17:03:37--Resetting dropped connection: 120.46.172.186
DEBUG--2023-08-07 17:03:37--http://120.46.172.186:8080 "GET /refresh HTTP/1.1" 200 None
ERROR--2023-08-07 17:03:37--断言失败, 模块名称为:认证接口,接口名称为:刷新token,用例标题:正向用例,用例为:None,期望结果为:{'message': '刷新token成功'},服务器返回数据为:{"token":"eyJhbGciOiJIUzUxMiJ9.eyJzdWIiOiJhZG1pbiIsInRlbmFudElkIjoiLTEiLCJleHAiOjE2OTE0ODU0MTcsImlhdCI6MTY5MTM5OTAxN30.n-7NR1iCjIKHbeH-Djk8t1sRkJi_FVAwgVHcGFWP6kh4xOyu6c4rgNtn817qbxVK9O63Wo9-SnreSvMJI5L8Gw","username":"","account":"","userId":"","loginStatus":true,"userAttrs":{}}
DEBUG--2023-08-07 17:03:39--http://120.46.172.186:8080 "GET /refresh HTTP/1.1" 200 None
ERROR--2023-08-07 17:03:39--断言失败, 模块名称为:认证接口,接口名称为:刷新token,用例标题:正向用例,用例为:None,期望结果为:{'message': '刷新token成功'},服务器返回数据为:{"token":"eyJhbGciOiJIUzUxMiJ9.eyJzdWIiOiJhZG1pbiIsInRlbmFudElkIjoiLTEiLCJleHAiOjE2OTE0ODU0MTgsImlhdCI6MTY5MTM5OTAxOH0.Rb1x9O8uPZcXAfoDbWutU6f3taE2vMl0iRW4WVVwfeKYLS-zF9e0IFTyL2tUDstfMzs0ej7qYnsUg_CXR-qOHg","username":"","account":"","userId":"","loginStatus":true,"userAttrs":{}}
DEBUG--2023-08-07 17:03:40--http://120.46.172.186:8080 "GET /refresh HTTP/1.1" 200 None
ERROR--2023-08-07 17:03:40--断言失败, 模块名称为:认证接口,接口名称为:刷新token,用例标题:正向用例,用例为:None,期望结果为:{'message': '刷新token成功'},服务器返回数据为:{"token":"eyJhbGciOiJIUzUxMiJ9.eyJzdWIiOiJhZG1pbiIsInRlbmFudElkIjoiLTEiLCJleHAiOjE2OTE0ODU0MTksImlhdCI6MTY5MTM5OTAxOX0.WinKyHRVircLGP_CUX1F7Bnc8ppV_aESgAOwYpTrvsaosQKpSM4M310de-C_Isotv4UrWgQHE-a9qJeBxb3Kdw","username":"","account":"","userId":"","loginStatus":true,"userAttrs":{}}
DEBUG--2023-08-07 17:03:41--http://120.46.172.186:8080 "GET /refresh HTTP/1.1" 200 None
ERROR--2023-08-07 17:03:41--断言失败, 模块名称为:认证接口,接口名称为:刷新token,用例标题:正向用例,用例为:None,期望结果为:{'message': '刷新token成功'},服务器返回数据为:{"token":"eyJhbGciOiJIUzUxMiJ9.eyJzdWIiOiJhZG1pbiIsInRlbmFudElkIjoiLTEiLCJleHAiOjE2OTE0ODU0MjAsImlhdCI6MTY5MTM5OTAyMH0.UiLL8CbY6A0_NK2PFWF1YA_lOAuFH2tDwOk5-MP21rQb6-4POQAwoNYaJRF_6QfYBd60YGMTwyBEISUGe-EHXg","username":"","account":"","userId":"","loginStatus":true,"userAttrs":{}}
\ No newline at end of file
{"uuid": "765fa804-f5d4-4f33-a822-e1da7809bc8b", "befores": [{"name": "sql_sentence", "status": "passed", "start": 1691399017269, "stop": 1691399017269}], "start": 1691399017269, "stop": 1691399017364}
\ No newline at end of file
{"uuid": "8e4ace34-e21c-4b08-a7ce-10334a3e43ba", "befores": [{"name": "expect", "status": "passed", "start": 1691399017269, "stop": 1691399017269}], "start": 1691399017269, "stop": 1691399017366}
\ No newline at end of file
{"name": "反向用例-密码为过短", "status": "passed", "attachments": [{"name": "log", "source": "db0cb0bd-29d6-4724-a2be-a45daed876a0-attachment.txt", "type": "text/plain"}, {"name": "stdout", "source": "fd56ed9e-4f2e-4a44-81bb-9526c6d73f0d-attachment.txt", "type": "text/plain"}], "parameters": [{"name": "module", "value": "'认证接口'"}, {"name": "interface", "value": "'登录系统'"}, {"name": "title", "value": "'反向用例-密码为过短'"}, {"name": "level", "value": "'中'"}, {"name": "method", "value": "'PoST'"}, {"name": "url", "value": "'http://120.46.172.186:8080/auth'"}, {"name": "mime", "value": "'application/json'"}, {"name": "data", "value": "{'password': '1', 'username': 'admin'}"}, {"name": "expect", "value": "{'state': False, 'message': '账号或密码错误'}"}, {"name": "sql_type", "value": "None"}, {"name": "sql_sentence", "value": "None"}, {"name": "update_key", "value": "None"}], "start": 1691399017591, "stop": 1691399017687, "uuid": "5f099801-3b79-4f3c-8804-448e7f026b17", "historyId": "1e00bd2cd85b6a0d93eb901ec3e350a3", "testCaseId": "0abeaba8f176b6785a0334bed7c1bdad", "fullName": "test_bpm.TestBPM#test_bpm", "labels": [{"name": "feature", "value": "认证接口"}, {"name": "story", "value": "登录系统"}, {"name": "severity", "value": "中"}, {"name": "epic", "value": "BPM系统"}, {"name": "suite", "value": "test_bpm"}, {"name": "subSuite", "value": "TestBPM"}, {"name": "host", "value": "LAPTOP-31V3JBFR"}, {"name": "thread", "value": "6412-MainThread"}, {"name": "framework", "value": "pytest"}, {"name": "language", "value": "cpython3"}, {"name": "package", "value": "test_bpm"}]}
\ No newline at end of file
{"name": "正向用例", "status": "passed", "attachments": [{"name": "log", "source": "5bf90a04-33d7-45fb-acf5-3994d2eebd13-attachment.txt", "type": "text/plain"}, {"name": "stdout", "source": "f5c8376b-5d76-4ddc-bbba-a7f00cbcb192-attachment.txt", "type": "text/plain"}], "parameters": [{"name": "module", "value": "'组织管理'"}, {"name": "interface", "value": "'删除组织'"}, {"name": "title", "value": "'正向用例'"}, {"name": "level", "value": "'高'"}, {"name": "method", "value": "'post'"}, {"name": "url", "value": "'http://120.46.172.186:8080/api/org/v1/org/deleteOrg'"}, {"name": "mime", "value": "'text/plain'"}, {"name": "data", "value": "'test56_org'"}, {"name": "expect", "value": "{'state': True, 'message': '删除组织成功!'}"}, {"name": "sql_type", "value": "None"}, {"name": "sql_sentence", "value": "None"}, {"name": "update_key", "value": "None"}], "start": 1691399023993, "stop": 1691399024052, "uuid": "cf620890-3260-459b-a1c2-c3dd2751a90b", "historyId": "036385e6c5707e95e98d58f17aa52abc", "testCaseId": "0abeaba8f176b6785a0334bed7c1bdad", "fullName": "test_bpm.TestBPM#test_bpm", "labels": [{"name": "feature", "value": "组织管理"}, {"name": "story", "value": "删除组织"}, {"name": "severity", "value": "高"}, {"name": "epic", "value": "BPM系统"}, {"name": "suite", "value": "test_bpm"}, {"name": "subSuite", "value": "TestBPM"}, {"name": "host", "value": "LAPTOP-31V3JBFR"}, {"name": "thread", "value": "6412-MainThread"}, {"name": "framework", "value": "pytest"}, {"name": "language", "value": "cpython3"}, {"name": "package", "value": "test_bpm"}]}
\ No newline at end of file
{"uuid": "f31497d9-37e6-43d4-b8d9-1a5c43b73c20", "befores": [{"name": "data", "status": "passed", "start": 1691399025190, "stop": 1691399025190}], "start": 1691399025190, "stop": 1691399025308}
\ No newline at end of file
断言失败
断言失败
断言失败
断言失败
断言失败
断言失败
{"uuid": "e0572c06-411f-4286-b555-14045a00f7cf", "befores": [{"name": "data", "status": "passed", "start": 1691399021306, "stop": 1691399021306}], "start": 1691399021306, "stop": 1691399021375}
\ No newline at end of file
断言失败
断言失败
断言失败
断言失败
断言失败
断言失败
{"uuid": "6df03c7b-6192-42be-8ee3-f77b5389f8f5", "befores": [{"name": "method", "status": "passed", "start": 1691399016871, "stop": 1691399016871}], "start": 1691399016871, "stop": 1691399016930}
\ No newline at end of file
{"uuid": "e24492de-17dd-42f6-b4d9-8a7b12bd4d90", "befores": [{"name": "sql_sentence", "status": "passed", "start": 1691399024064, "stop": 1691399024065}], "start": 1691399024064, "stop": 1691399024176}
\ No newline at end of file
{"uuid": "d212d179-16f6-4331-a168-8b2273b08fe5", "befores": [{"name": "title", "status": "passed", "start": 1691399029836, "stop": 1691399029836}], "start": 1691399029836, "stop": 1691399029985}
\ No newline at end of file
{"name": "反向用例-密码为空", "status": "passed", "attachments": [{"name": "log", "source": "e78fcb88-db45-4f7e-9b28-cec4be307568-attachment.txt", "type": "text/plain"}, {"name": "stdout", "source": "22cb056c-9a7f-4f99-9fdf-7124af2369ee-attachment.txt", "type": "text/plain"}], "parameters": [{"name": "module", "value": "'认证接口'"}, {"name": "interface", "value": "'登录系统'"}, {"name": "title", "value": "'反向用例-密码为空'"}, {"name": "level", "value": "'中'"}, {"name": "method", "value": "'POST'"}, {"name": "url", "value": "'http://120.46.172.186:8080/auth'"}, {"name": "mime", "value": "'application/json'"}, {"name": "data", "value": "{'password': '', 'username': 'admin'}"}, {"name": "expect", "value": "{'state': False, 'message': '账号或密码错误'}"}, {"name": "sql_type", "value": "None"}, {"name": "sql_sentence", "value": "None"}, {"name": "update_key", "value": "None"}], "start": 1691399017375, "stop": 1691399017467, "uuid": "5a29fcea-3685-4c85-8d5a-a16599622308", "historyId": "89cd3935e143f1777c5d98d06870bd50", "testCaseId": "0abeaba8f176b6785a0334bed7c1bdad", "fullName": "test_bpm.TestBPM#test_bpm", "labels": [{"name": "feature", "value": "认证接口"}, {"name": "story", "value": "登录系统"}, {"name": "severity", "value": "中"}, {"name": "epic", "value": "BPM系统"}, {"name": "suite", "value": "test_bpm"}, {"name": "subSuite", "value": "TestBPM"}, {"name": "host", "value": "LAPTOP-31V3JBFR"}, {"name": "thread", "value": "6412-MainThread"}, {"name": "framework", "value": "pytest"}, {"name": "language", "value": "cpython3"}, {"name": "package", "value": "test_bpm"}]}
\ No newline at end of file
{"uuid": "b170e38c-12c6-4742-860e-2865f37cbdf9", "befores": [{"name": "interface", "status": "passed", "start": 1691399019101, "stop": 1691399019101}], "start": 1691399019101, "stop": 1691399019171}
\ No newline at end of file
{"uuid": "a3a798ff-1fe0-4d6e-aec8-442d080f1a65", "befores": [{"name": "level", "status": "passed", "start": 1691399017478, "stop": 1691399017478}], "start": 1691399017478, "stop": 1691399017583}
\ No newline at end of file
{"uuid": "e22d825f-0517-4596-b5be-b6c7182bb671", "befores": [{"name": "interface", "status": "passed", "start": 1691399023559, "stop": 1691399023559}], "start": 1691399023559, "stop": 1691399023708}
\ No newline at end of file
{"uuid": "590ad4fa-f560-4f78-94c8-0e0cd8ecd8ae", "befores": [{"name": "sql_sentence", "status": "passed", "start": 1691399017043, "stop": 1691399017043}], "start": 1691399017043, "stop": 1691399017144}
\ No newline at end of file
{"uuid": "982e781b-dc75-4e16-b244-6e4f9fa115f5", "befores": [{"name": "sql_type", "status": "passed", "start": 1691399028670, "stop": 1691399028670}], "start": 1691399028670, "stop": 1691399028815}
\ No newline at end of file
DEBUG--2023-08-07 17:03:37--Resetting dropped connection: 120.46.172.186
DEBUG--2023-08-07 17:03:37--http://120.46.172.186:8080 "POST /auth HTTP/1.1" 500 None
\ No newline at end of file
{"uuid": "adc0dc9c-e5e1-49d5-ada3-ef0aecabc8a9", "befores": [{"name": "sql_type", "status": "passed", "start": 1691399024064, "stop": 1691399024064}], "start": 1691399024064, "stop": 1691399024176}
\ No newline at end of file
{"uuid": "6295ab1a-4597-411d-ac9e-37a815b704a9", "befores": [{"name": "level", "status": "passed", "start": 1691399023908, "stop": 1691399023908}], "start": 1691399023908, "stop": 1691399023987}
\ No newline at end of file
{"uuid": "ce3326e3-83d2-4043-a2e0-fd8699f33097", "befores": [{"name": "level", "status": "passed", "start": 1691399017043, "stop": 1691399017043}], "start": 1691399017043, "stop": 1691399017148}
\ No newline at end of file
{"name": "反向用例-密码为特殊字符", "status": "passed", "attachments": [{"name": "log", "source": "10175808-9f63-49fd-b970-093e7cc8e6cd-attachment.txt", "type": "text/plain"}, {"name": "stdout", "source": "438e68bc-1808-4fdc-9aad-21e75deded1d-attachment.txt", "type": "text/plain"}], "parameters": [{"name": "module", "value": "'认证接口'"}, {"name": "interface", "value": "'登录系统'"}, {"name": "title", "value": "'反向用例-密码为特殊字符'"}, {"name": "level", "value": "'中'"}, {"name": "method", "value": "'POST'"}, {"name": "url", "value": "'http://120.46.172.186:8080/auth'"}, {"name": "mime", "value": "'application/json'"}, {"name": "data", "value": "{'password': '▬♦◊◦☼♠♣', 'username': 'admin'}"}, {"name": "expect", "value": "{'state': False, 'message': '账号或密码错误'}"}, {"name": "sql_type", "value": "None"}, {"name": "sql_sentence", "value": "None"}, {"name": "update_key", "value": "None"}], "start": 1691399017699, "stop": 1691399017794, "uuid": "6eb477af-a35a-4e36-b6ad-9f8959100781", "historyId": "d47f225f414cd52cd2c4be15166397b9", "testCaseId": "0abeaba8f176b6785a0334bed7c1bdad", "fullName": "test_bpm.TestBPM#test_bpm", "labels": [{"name": "feature", "value": "认证接口"}, {"name": "story", "value": "登录系统"}, {"name": "severity", "value": "中"}, {"name": "epic", "value": "BPM系统"}, {"name": "suite", "value": "test_bpm"}, {"name": "subSuite", "value": "TestBPM"}, {"name": "host", "value": "LAPTOP-31V3JBFR"}, {"name": "thread", "value": "6412-MainThread"}, {"name": "framework", "value": "pytest"}, {"name": "language", "value": "cpython3"}, {"name": "package", "value": "test_bpm"}]}
\ No newline at end of file
{"uuid": "09b2b294-8f02-4019-8645-e5c193d6cf1d", "befores": [{"name": "mime", "status": "passed", "start": 1691399026336, "stop": 1691399026336}], "start": 1691399026336, "stop": 1691399026480}
\ No newline at end of file
{"uuid": "302be334-8c12-42ee-94c8-61abe6bf305e", "befores": [{"name": "title", "status": "passed", "start": 1691399017374, "stop": 1691399017374}], "start": 1691399017374, "stop": 1691399017473}
\ No newline at end of file
{"uuid": "350728ba-04f7-49c1-adfd-2b68304192f1", "befores": [{"name": "module", "status": "passed", "start": 1691399022388, "stop": 1691399022388}], "start": 1691399022388, "stop": 1691399022456}
\ No newline at end of file
{"uuid": "d88f9843-955f-4465-be75-ebc98f04044b", "befores": [{"name": "title", "status": "passed", "start": 1691399017155, "stop": 1691399017155}], "start": 1691399017155, "stop": 1691399017262}
\ No newline at end of file
{"uuid": "975e2574-d0ab-4083-b949-20b60aad07bd", "befores": [{"name": "interface", "status": "passed", "start": 1691399028669, "stop": 1691399028669}], "start": 1691399028669, "stop": 1691399028819}
\ No newline at end of file
{"uuid": "4c97b2d6-9295-4546-943e-29a5885549f6", "befores": [{"name": "module", "status": "passed", "start": 1691399023715, "stop": 1691399023715}], "start": 1691399023715, "stop": 1691399023905}
\ No newline at end of file
{"name": "正向用例", "status": "failed", "statusDetails": {"message": "AssertionError: 断言失败", "trace": "self = <InterfaceAutoTest.test_case.test_bpm.TestBPM object at 0x00000257902D2820>\nreq_fix = <InterfaceAutoTest.requests_method.requests_method.RequestsMethod object at 0x00000257902F0490>\ndb_fix = <InterfaceAutoTest.common.db.DB object at 0x00000257903D93D0>, module = '认证接口', interface = '刷新token', title = '正向用例'\nlevel = '中', method = 'get', url = 'http://120.46.172.186:8080/refresh', mime = None, data = None, expect = {'message': '刷新token成功'}\nsql_type = None, sql_sentence = None, update_key = None\n\n @allure.epic(\"BPM系统\")\n @pytest.mark.parametrize(\"module, interface, title, level, method, url, mime, data, expect, sql_type, sql_sentence, update_key\", ReadExcel().get_data())\n def test_bpm(self, req_fix, db_fix, module, interface, title, level, method, url, mime, data, expect, sql_type, sql_sentence, update_key):\n allure.dynamic.feature(module)\n allure.dynamic.story(interface)\n allure.dynamic.title(title)\n allure.dynamic.severity(level)\n \n # 1.1:判断sql语句的类型是否为delete\n if sql_type == \"delete\":\n # 1.2 使用DB类对象,调用delete方法执行删除的sql语句\n db_fix.delete(sql_sentence)\n # # 1.3 使用RequestsMethod类对象调用request_all方法发送请求\n # result = req_fix.request_all(req_method=method, req_url=url, req_mime=mime, case_data=data)\n \n # 2.1 判断sql语句的类型是否为select\n elif sql_type == \"select\":\n # 2.2 使用DB类对象,调用select方法执行查询的sql语句,并接收查询结果\n select_result = db_fix.select(sql_sentence)\n # 2.3 将查询结果更新到用例数据中\n data[update_key] = select_result\n # # 2.3 使用RequestsMethod类对象调用request_all方法发送请求\n # result = req_fix.request_all(req_method=method, req_url=url, req_mime=mime, case_data=data)\n \n # 3.1 判断sql语句的类型是否delete|select或者为select|delete\n elif sql_type == \"delete|select\" or sql_type == \"select|delete\":\n # 3.2 使用DB类对象,调用delete方法执行删除的sql语句\n db_fix.delete(sql_sentence[\"delete\"])\n # 3.3 使用DB类对象,调用select方法执行查询的sql语句,并接收查询结果\n select_result = db_fix.select(sql_sentence[\"select\"])\n # 3.4 将查询结果更新到用例数据中\n data[update_key] = select_result\n # # 3.5 使用RequestsMethod类对象调用request_all方法发送请求\n # result = req_fix.request_all(req_method=method, req_url=url, req_mime=mime, case_data=data)\n #\n # else:\n # result = req_fix.request_all(req_method=method, req_url=url, req_mime=mime, case_data=data)\n \n result = req_fix.request_all(req_method=method, req_url=url, req_mime=mime, case_data=data)\n \n # 断言\n try:\n for key in expect:\n> assert expect[key] == result.json().get(key)\nE AssertionError: assert '刷新token成功' == None\nE + where None = <built-in method get of dict object at 0x0000025790477140>('message')\nE + where <built-in method get of dict object at 0x0000025790477140> = {'account': '', 'loginStatus': True, 'token': 'eyJhbGciOiJIUzUxMiJ9.eyJzdWIiOiJhZG1pbiIsInRlbmFudElkIjoiLTEiLCJleHAiOjE2OTE0ODU0MTgsImlhdCI6MTY5MTM5OTAxOH0.Rb1x9O8uPZcXAfoDbWutU6f3taE2vMl0iRW4WVVwfeKYLS-zF9e0IFTyL2tUDstfMzs0ej7qYnsUg_CXR-qOHg', 'userAttrs': {}, ...}.get\nE + where {'account': '', 'loginStatus': True, 'token': 'eyJhbGciOiJIUzUxMiJ9.eyJzdWIiOiJhZG1pbiIsInRlbmFudElkIjoiLTEiLCJleHAiOjE2OTE0ODU0MTgsImlhdCI6MTY5MTM5OTAxOH0.Rb1x9O8uPZcXAfoDbWutU6f3taE2vMl0iRW4WVVwfeKYLS-zF9e0IFTyL2tUDstfMzs0ej7qYnsUg_CXR-qOHg', 'userAttrs': {}, ...} = <bound method Response.json of <Response [200]>>()\nE + where <bound method Response.json of <Response [200]>> = <Response [200]>.json\n\ntest_bpm.py:61: AssertionError\n\nDuring handling of the above exception, another exception occurred:\n\nself = <InterfaceAutoTest.test_case.test_bpm.TestBPM object at 0x00000257902D2820>\nreq_fix = <InterfaceAutoTest.requests_method.requests_method.RequestsMethod object at 0x00000257902F0490>\ndb_fix = <InterfaceAutoTest.common.db.DB object at 0x00000257903D93D0>, module = '认证接口', interface = '刷新token', title = '正向用例'\nlevel = '中', method = 'get', url = 'http://120.46.172.186:8080/refresh', mime = None, data = None, expect = {'message': '刷新token成功'}\nsql_type = None, sql_sentence = None, update_key = None\n\n @allure.epic(\"BPM系统\")\n @pytest.mark.parametrize(\"module, interface, title, level, method, url, mime, data, expect, sql_type, sql_sentence, update_key\", ReadExcel().get_data())\n def test_bpm(self, req_fix, db_fix, module, interface, title, level, method, url, mime, data, expect, sql_type, sql_sentence, update_key):\n allure.dynamic.feature(module)\n allure.dynamic.story(interface)\n allure.dynamic.title(title)\n allure.dynamic.severity(level)\n \n # 1.1:判断sql语句的类型是否为delete\n if sql_type == \"delete\":\n # 1.2 使用DB类对象,调用delete方法执行删除的sql语句\n db_fix.delete(sql_sentence)\n # # 1.3 使用RequestsMethod类对象调用request_all方法发送请求\n # result = req_fix.request_all(req_method=method, req_url=url, req_mime=mime, case_data=data)\n \n # 2.1 判断sql语句的类型是否为select\n elif sql_type == \"select\":\n # 2.2 使用DB类对象,调用select方法执行查询的sql语句,并接收查询结果\n select_result = db_fix.select(sql_sentence)\n # 2.3 将查询结果更新到用例数据中\n data[update_key] = select_result\n # # 2.3 使用RequestsMethod类对象调用request_all方法发送请求\n # result = req_fix.request_all(req_method=method, req_url=url, req_mime=mime, case_data=data)\n \n # 3.1 判断sql语句的类型是否delete|select或者为select|delete\n elif sql_type == \"delete|select\" or sql_type == \"select|delete\":\n # 3.2 使用DB类对象,调用delete方法执行删除的sql语句\n db_fix.delete(sql_sentence[\"delete\"])\n # 3.3 使用DB类对象,调用select方法执行查询的sql语句,并接收查询结果\n select_result = db_fix.select(sql_sentence[\"select\"])\n # 3.4 将查询结果更新到用例数据中\n data[update_key] = select_result\n # # 3.5 使用RequestsMethod类对象调用request_all方法发送请求\n # result = req_fix.request_all(req_method=method, req_url=url, req_mime=mime, case_data=data)\n #\n # else:\n # result = req_fix.request_all(req_method=method, req_url=url, req_mime=mime, case_data=data)\n \n result = req_fix.request_all(req_method=method, req_url=url, req_mime=mime, case_data=data)\n \n # 断言\n try:\n for key in expect:\n assert expect[key] == result.json().get(key)\n except:\n print(\"断言失败\")\n logging.error(\"断言失败, 模块名称为:{},接口名称为:{},用例标题:{},用例为:{},期望结果为:{},服务器返回数据为:{}\".format(module, interface, title, str(data), str(expect), result.text))\n> raise AssertionError(\"断言失败\")\nE AssertionError: 断言失败\n\ntest_bpm.py:65: AssertionError"}, "attachments": [{"name": "log", "source": "1ea421af-036c-4890-a7dc-0b161d5bbabb-attachment.txt", "type": "text/plain"}, {"name": "stdout", "source": "22da4251-0198-4cc3-93bb-222b5120749c-attachment.txt", "type": "text/plain"}], "parameters": [{"name": "module", "value": "'认证接口'"}, {"name": "interface", "value": "'刷新token'"}, {"name": "title", "value": "'正向用例'"}, {"name": "level", "value": "'中'"}, {"name": "method", "value": "'get'"}, {"name": "url", "value": "'http://120.46.172.186:8080/refresh'"}, {"name": "mime", "value": "None"}, {"name": "data", "value": "None"}, {"name": "expect", "value": "{'message': '刷新token成功'}"}, {"name": "sql_type", "value": "None"}, {"name": "sql_sentence", "value": "None"}, {"name": "update_key", "value": "None"}], "start": 1691399019103, "stop": 1691399019159, "uuid": "fdb731ac-01a3-4051-9403-de6edeb3914f", "historyId": "f368301ce537f1bbd596e0d19f24f393", "testCaseId": "0abeaba8f176b6785a0334bed7c1bdad", "fullName": "test_bpm.TestBPM#test_bpm", "labels": [{"name": "feature", "value": "认证接口"}, {"name": "story", "value": "刷新token"}, {"name": "severity", "value": "中"}, {"name": "epic", "value": "BPM系统"}, {"name": "suite", "value": "test_bpm"}, {"name": "subSuite", "value": "TestBPM"}, {"name": "host", "value": "LAPTOP-31V3JBFR"}, {"name": "thread", "value": "6412-MainThread"}, {"name": "framework", "value": "pytest"}, {"name": "language", "value": "cpython3"}, {"name": "package", "value": "test_bpm"}]}
\ No newline at end of file
{"uuid": "6ceb0ce8-9763-4bc3-b717-d4784e9f9f57", "befores": [{"name": "level", "status": "passed", "start": 1691399024064, "stop": 1691399024064}], "start": 1691399024064, "stop": 1691399024179}
\ No newline at end of file
{"uuid": "bcf79cc2-4a15-4a52-bba0-24079477a241", "befores": [{"name": "update_key", "status": "passed", "start": 1691399021306, "stop": 1691399021306}], "start": 1691399021306, "stop": 1691399021373}
\ No newline at end of file
{"uuid": "c920b4e3-fe08-4bf8-b868-a22273c0ab45", "befores": [{"name": "mime", "status": "passed", "start": 1691399023992, "stop": 1691399023992}], "start": 1691399023992, "stop": 1691399024057}
\ No newline at end of file
{"uuid": "cb91172c-e0f4-4b37-8508-654d5d0d9a4e", "befores": [{"name": "module", "status": "passed", "start": 1691399017043, "stop": 1691399017043}], "start": 1691399017043, "stop": 1691399017150}
\ No newline at end of file
{"uuid": "c8f19dc1-6e4a-4506-b560-00ebe6d0cbdd", "befores": [{"name": "update_key", "status": "passed", "start": 1691399020197, "stop": 1691399020197}], "start": 1691399020197, "stop": 1691399020272}
\ No newline at end of file
{"uuid": "5fae3caf-baef-4139-8c2a-47c4d54607fc", "befores": [{"name": "update_key", "status": "passed", "start": 1691399016872, "stop": 1691399016872}], "start": 1691399016872, "stop": 1691399016926}
\ No newline at end of file
{"uuid": "f849a046-ade9-404a-a02e-49281e8305a6", "befores": [{"name": "update_key", "status": "passed", "start": 1691399016790, "stop": 1691399016790}], "start": 1691399016790, "stop": 1691399016848}
\ No newline at end of file
{"uuid": "d69a1e18-ea4b-470d-8e87-52c92a14274f", "befores": [{"name": "level", "status": "passed", "start": 1691399016790, "stop": 1691399016790}], "start": 1691399016790, "stop": 1691399016862}
\ No newline at end of file
DEBUG--2023-08-07 17:03:37--Resetting dropped connection: 120.46.172.186
DEBUG--2023-08-07 17:03:37--http://120.46.172.186:8080 "GET /refresh HTTP/1.1" 200 None
ERROR--2023-08-07 17:03:37--断言失败, 模块名称为:认证接口,接口名称为:刷新token,用例标题:正向用例,用例为:None,期望结果为:{'message': '刷新token成功'},服务器返回数据为:{"token":"eyJhbGciOiJIUzUxMiJ9.eyJzdWIiOiJhZG1pbiIsInRlbmFudElkIjoiLTEiLCJleHAiOjE2OTE0ODU0MTcsImlhdCI6MTY5MTM5OTAxN30.n-7NR1iCjIKHbeH-Djk8t1sRkJi_FVAwgVHcGFWP6kh4xOyu6c4rgNtn817qbxVK9O63Wo9-SnreSvMJI5L8Gw","username":"","account":"","userId":"","loginStatus":true,"userAttrs":{}}
DEBUG--2023-08-07 17:03:39--http://120.46.172.186:8080 "GET /refresh HTTP/1.1" 200 None
ERROR--2023-08-07 17:03:39--断言失败, 模块名称为:认证接口,接口名称为:刷新token,用例标题:正向用例,用例为:None,期望结果为:{'message': '刷新token成功'},服务器返回数据为:{"token":"eyJhbGciOiJIUzUxMiJ9.eyJzdWIiOiJhZG1pbiIsInRlbmFudElkIjoiLTEiLCJleHAiOjE2OTE0ODU0MTgsImlhdCI6MTY5MTM5OTAxOH0.Rb1x9O8uPZcXAfoDbWutU6f3taE2vMl0iRW4WVVwfeKYLS-zF9e0IFTyL2tUDstfMzs0ej7qYnsUg_CXR-qOHg","username":"","account":"","userId":"","loginStatus":true,"userAttrs":{}}
DEBUG--2023-08-07 17:03:40--http://120.46.172.186:8080 "GET /refresh HTTP/1.1" 200 None
ERROR--2023-08-07 17:03:40--断言失败, 模块名称为:认证接口,接口名称为:刷新token,用例标题:正向用例,用例为:None,期望结果为:{'message': '刷新token成功'},服务器返回数据为:{"token":"eyJhbGciOiJIUzUxMiJ9.eyJzdWIiOiJhZG1pbiIsInRlbmFudElkIjoiLTEiLCJleHAiOjE2OTE0ODU0MTksImlhdCI6MTY5MTM5OTAxOX0.WinKyHRVircLGP_CUX1F7Bnc8ppV_aESgAOwYpTrvsaosQKpSM4M310de-C_Isotv4UrWgQHE-a9qJeBxb3Kdw","username":"","account":"","userId":"","loginStatus":true,"userAttrs":{}}
\ No newline at end of file
{"uuid": "9259b86f-79e1-4753-99eb-c242ba022693", "befores": [{"name": "sql_sentence", "status": "passed", "start": 1691399023717, "stop": 1691399023717}], "start": 1691399023717, "stop": 1691399023899}
\ No newline at end of file
{"uuid": "4269fa75-ace3-411a-b4f1-f1a5df770e31", "befores": [{"name": "method", "status": "passed", "start": 1691399017269, "stop": 1691399017269}], "start": 1691399017269, "stop": 1691399017367}
\ No newline at end of file
{"uuid": "6073de81-ec80-4ee8-8760-9a78a6b74a02", "befores": [{"name": "sql_type", "status": "passed", "start": 1691399016938, "stop": 1691399016938}], "start": 1691399016938, "stop": 1691399017033}
\ No newline at end of file
{"uuid": "e47e7172-7dde-47ed-af14-f6a51dba19e2", "befores": [{"name": "data", "status": "passed", "start": 1691399017374, "stop": 1691399017374}], "start": 1691399017374, "stop": 1691399017470}
\ No newline at end of file
{"uuid": "09c4296e-a951-4c19-b7de-f0899531af74", "befores": [{"name": "title", "status": "passed", "start": 1691399022388, "stop": 1691399022388}], "start": 1691399022388, "stop": 1691399022455}
\ No newline at end of file
DEBUG--2023-08-07 17:03:37--Resetting dropped connection: 120.46.172.186
DEBUG--2023-08-07 17:03:37--http://120.46.172.186:8080 "POST /auth HTTP/1.1" 500 None
\ No newline at end of file
{"uuid": "66253adb-c7d3-44bb-aba4-9a948aa478c6", "befores": [{"name": "sql_sentence", "status": "passed", "start": 1691399020197, "stop": 1691399020197}], "start": 1691399020197, "stop": 1691399020273}
\ No newline at end of file
{"uuid": "8380169a-e4bc-48e7-aaed-a9c6947dfd10", "befores": [{"name": "interface", "status": "passed", "start": 1691399027503, "stop": 1691399027503}], "start": 1691399027503, "stop": 1691399027658}
\ No newline at end of file
断言失败
断言失败
断言失败
断言失败
断言失败
{"uuid": "8e9304a0-2714-4132-9c0d-bb0ee256009b", "befores": [{"name": "data", "status": "passed", "start": 1691399016790, "stop": 1691399016790}], "start": 1691399016790, "stop": 1691399016860}
\ No newline at end of file
{"uuid": "1caddb89-26f9-4cf3-8bf4-081e2662a6f1", "befores": [{"name": "interface", "status": "passed", "start": 1691399016789, "stop": 1691399016789}], "start": 1691399016789, "stop": 1691399016864}
\ No newline at end of file
DEBUG--2023-08-07 17:03:44--http://120.46.172.186:8080 "DELETE /api/demension/v1/dem/deleteDemByIds?ids=1688475997541777408 HTTP/1.1" 200 None
ERROR--2023-08-07 17:03:44--断言失败, 模块名称为:维度管理,接口名称为:根据维度编码删除维度,用例标题:正向用例,用例为:{'ids': '1688475997541777408'},期望结果为:{'state': True, 'message': '删除维度成功'},服务器返回数据为:{"state":true,"message":"删除维度成功!","value":""}
DEBUG--2023-08-07 17:03:45--http://120.46.172.186:8080 "DELETE /api/demension/v1/dem/deleteDemByIds?ids=1688475997541777408 HTTP/1.1" 500 None
ERROR--2023-08-07 17:03:45--断言失败, 模块名称为:维度管理,接口名称为:根据维度编码删除维度,用例标题:正向用例,用例为:{'ids': '1688475997541777408'},期望结果为:{'state': True, 'message': '删除维度成功'},服务器返回数据为:{"state":false,"message":"","logId":"1688476004198137856"}
DEBUG--2023-08-07 17:03:46--Resetting dropped connection: 120.46.172.186
DEBUG--2023-08-07 17:03:46--http://120.46.172.186:8080 "DELETE /api/demension/v1/dem/deleteDemByIds?ids=1688475997541777408 HTTP/1.1" 500 None
ERROR--2023-08-07 17:03:46--断言失败, 模块名称为:维度管理,接口名称为:根据维度编码删除维度,用例标题:正向用例,用例为:{'ids': '1688475997541777408'},期望结果为:{'state': True, 'message': '删除维度成功'},服务器返回数据为:{"state":false,"message":"","logId":"1688476009176776704"}
DEBUG--2023-08-07 17:03:47--Resetting dropped connection: 120.46.172.186
DEBUG--2023-08-07 17:03:47--http://120.46.172.186:8080 "DELETE /api/demension/v1/dem/deleteDemByIds?ids=1688475997541777408 HTTP/1.1" 500 None
ERROR--2023-08-07 17:03:47--断言失败, 模块名称为:维度管理,接口名称为:根据维度编码删除维度,用例标题:正向用例,用例为:{'ids': '1688475997541777408'},期望结果为:{'state': True, 'message': '删除维度成功'},服务器返回数据为:{"state":false,"message":"","logId":"1688476014071529472"}
\ No newline at end of file
{"uuid": "6ba65def-4104-455a-b7e7-a10c81473044", "befores": [{"name": "mime", "status": "passed", "start": 1691399016790, "stop": 1691399016790}], "start": 1691399016790, "stop": 1691399016861}
\ No newline at end of file
{"uuid": "8b9417fd-5fc5-48cc-99a7-e529eb3f3dc1", "befores": [{"name": "url", "status": "passed", "start": 1691399023559, "stop": 1691399023559}], "start": 1691399023559, "stop": 1691399023706}
\ No newline at end of file
{"uuid": "2f3eb7eb-54a7-42c2-9ef9-913e75205d26", "befores": [{"name": "title", "status": "passed", "start": 1691399017269, "stop": 1691399017269}], "start": 1691399017269, "stop": 1691399017369}
\ No newline at end of file
{"uuid": "1a8d2fb8-43f0-471a-b07e-bb083252ea3c", "befores": [{"name": "title", "status": "passed", "start": 1691399017588, "stop": 1691399017588}], "start": 1691399017588, "stop": 1691399017694}
\ No newline at end of file
{"uuid": "4e46d8d7-6318-44dc-ae3f-98fd668e4df9", "befores": [{"name": "expect", "status": "passed", "start": 1691399027504, "stop": 1691399027504}], "start": 1691399027504, "stop": 1691399027654}
\ No newline at end of file
{"uuid": "702515fc-d686-4c3f-a79f-14f7b5dd1413", "befores": [{"name": "mime", "status": "passed", "start": 1691399022389, "stop": 1691399022389}], "start": 1691399022389, "stop": 1691399022453}
\ No newline at end of file
{"uuid": "8b44d771-3c0d-4b12-8bdd-683b38bf85ba", "befores": [{"name": "sql_type", "status": "passed", "start": 1691399023560, "stop": 1691399023560}], "start": 1691399023560, "stop": 1691399023703}
\ No newline at end of file
{"uuid": "b6016809-5f26-4462-a42e-93e883eb5fbd", "befores": [{"name": "expect", "status": "passed", "start": 1691399026336, "stop": 1691399026336}], "start": 1691399026336, "stop": 1691399026479}
\ No newline at end of file
{"uuid": "22576dcc-c08a-44b9-af9a-b5e571177a0e", "befores": [{"name": "sql_sentence", "status": "passed", "start": 1691399017478, "stop": 1691399017478}], "start": 1691399017478, "stop": 1691399017577}
\ No newline at end of file
{"uuid": "c0854641-7dd6-4192-8073-7b87b4470f95", "befores": [{"name": "interface", "status": "passed", "start": 1691399017269, "stop": 1691399017269}], "start": 1691399017269, "stop": 1691399017369}
\ No newline at end of file
{"uuid": "d39bc703-e5ba-438b-92c5-cae5adc5b1f3", "befores": [{"name": "method", "status": "passed", "start": 1691399029836, "stop": 1691399029836}], "start": 1691399029836, "stop": 1691399029983}
\ No newline at end of file
{"uuid": "e56c44e4-9c6f-433e-baa9-2d19e67bc7e9", "befores": [{"name": "data", "status": "passed", "start": 1691399016938, "stop": 1691399016938}], "start": 1691399016938, "stop": 1691399017034}
\ No newline at end of file
{"uuid": "3277dce3-7ed3-48ef-9e68-3208e611f383", "befores": [{"name": "method", "status": "passed", "start": 1691399016790, "stop": 1691399016790}], "start": 1691399016790, "stop": 1691399016862}
\ No newline at end of file
{"uuid": "db7c3689-ed04-4dac-9d97-2d52dd97f407", "befores": [{"name": "level", "status": "passed", "start": 1691399023475, "stop": 1691399023475}], "start": 1691399023475, "stop": 1691399023552}
\ No newline at end of file
{"uuid": "7136a127-8c94-44c2-9254-0283b59639ae", "befores": [{"name": "module", "status": "passed", "start": 1691399027503, "stop": 1691399027503}], "start": 1691399027503, "stop": 1691399027660}
\ No newline at end of file
{"uuid": "a3b8704e-3454-4b02-af80-5fb9d8535842", "befores": [{"name": "interface", "status": "passed", "start": 1691399021306, "stop": 1691399021306}], "start": 1691399021306, "stop": 1691399021378}
\ No newline at end of file
{"uuid": "3046ae34-12f9-4b27-8511-821a1e555331", "befores": [{"name": "sql_sentence", "status": "passed", "start": 1691399023909, "stop": 1691399023909}], "start": 1691399023909, "stop": 1691399023984}
\ No newline at end of file
{"uuid": "8abaa150-3680-4e87-b6fb-0f6b001a462c", "befores": [{"name": "level", "status": "passed", "start": 1691399028669, "stop": 1691399028669}], "start": 1691399028669, "stop": 1691399028818}
\ No newline at end of file
{"uuid": "6ecaec67-11b7-4a13-ade3-fac4cfe15584", "befores": [{"name": "sql_type", "status": "passed", "start": 1691399025190, "stop": 1691399025190}], "start": 1691399025190, "stop": 1691399025296}
\ No newline at end of file
{"uuid": "42dc27b6-fff5-4858-a6f2-764d1208c6a8", "befores": [{"name": "url", "status": "passed", "start": 1691399023475, "stop": 1691399023475}], "start": 1691399023475, "stop": 1691399023552}
\ No newline at end of file
{"uuid": "531804aa-85ed-428a-b503-9e2fd37c82ee", "befores": [{"name": "sql_type", "status": "passed", "start": 1691399027504, "stop": 1691399027504}], "start": 1691399027504, "stop": 1691399027654}
\ No newline at end of file
{"name": "反向用例-用户名为空", "status": "passed", "attachments": [{"name": "log", "source": "e663294b-f478-457f-845a-b179cf56db56-attachment.txt", "type": "text/plain"}, {"name": "stdout", "source": "93e0ae30-7a72-46b3-aeda-544839cabd06-attachment.txt", "type": "text/plain"}], "parameters": [{"name": "module", "value": "'认证接口'"}, {"name": "interface", "value": "'登录系统'"}, {"name": "title", "value": "'反向用例-用户名为空'"}, {"name": "level", "value": "'中'"}, {"name": "method", "value": "'POST'"}, {"name": "url", "value": "'http://120.46.172.186:8080/auth'"}, {"name": "mime", "value": "'application/json'"}, {"name": "data", "value": "{'password': 'MTIzNDU2', 'username': ''}"}, {"name": "expect", "value": "{'state': False, 'message': '账号或密码错误'}"}, {"name": "sql_type", "value": "None"}, {"name": "sql_sentence", "value": "None"}, {"name": "update_key", "value": "None"}], "start": 1691399016872, "stop": 1691399016926, "uuid": "7ddb01fc-6c54-4a09-b494-95564a55fde4", "historyId": "cb6bc4824561a6cdbaeea7fbbc0b0fca", "testCaseId": "0abeaba8f176b6785a0334bed7c1bdad", "fullName": "test_bpm.TestBPM#test_bpm", "labels": [{"name": "feature", "value": "认证接口"}, {"name": "story", "value": "登录系统"}, {"name": "severity", "value": "中"}, {"name": "epic", "value": "BPM系统"}, {"name": "suite", "value": "test_bpm"}, {"name": "subSuite", "value": "TestBPM"}, {"name": "host", "value": "LAPTOP-31V3JBFR"}, {"name": "thread", "value": "6412-MainThread"}, {"name": "framework", "value": "pytest"}, {"name": "language", "value": "cpython3"}, {"name": "package", "value": "test_bpm"}]}
\ No newline at end of file
{"uuid": "abcbf0a7-1d9e-459e-933c-40f8298926ee", "befores": [{"name": "level", "status": "passed", "start": 1691399017699, "stop": 1691399017699}], "start": 1691399017699, "stop": 1691399017799}
\ No newline at end of file
{"uuid": "b61fa07a-1f3f-47e1-a365-d02dd9171ca9", "befores": [{"name": "title", "status": "passed", "start": 1691399026335, "stop": 1691399026335}], "start": 1691399026335, "stop": 1691399026483}
\ No newline at end of file
{"name": "正向用例", "status": "failed", "statusDetails": {"message": "AssertionError: 断言失败", "trace": "self = <InterfaceAutoTest.test_case.test_bpm.TestBPM object at 0x00000257902F01C0>\nreq_fix = <InterfaceAutoTest.requests_method.requests_method.RequestsMethod object at 0x00000257902F0490>\ndb_fix = <InterfaceAutoTest.common.db.DB object at 0x00000257903D93D0>, module = '维度管理', interface = '根据维度编码删除维度', title = '正向用例'\nlevel = '高', method = 'DELETE', url = 'http://120.46.172.186:8080/api/demension/v1/dem/deleteDemByIds', mime = 'query'\ndata = {'ids': '1688475997541777408'}, expect = {'message': '删除维度成功', 'state': True}, sql_type = 'select'\nsql_sentence = 'SELECT ID_ FROM uc_demension WHERE `CODE_`=\"test56_dem\";', update_key = 'ids'\n\n @allure.epic(\"BPM系统\")\n @pytest.mark.parametrize(\"module, interface, title, level, method, url, mime, data, expect, sql_type, sql_sentence, update_key\", ReadExcel().get_data())\n def test_bpm(self, req_fix, db_fix, module, interface, title, level, method, url, mime, data, expect, sql_type, sql_sentence, update_key):\n allure.dynamic.feature(module)\n allure.dynamic.story(interface)\n allure.dynamic.title(title)\n allure.dynamic.severity(level)\n \n # 1.1:判断sql语句的类型是否为delete\n if sql_type == \"delete\":\n # 1.2 使用DB类对象,调用delete方法执行删除的sql语句\n db_fix.delete(sql_sentence)\n # # 1.3 使用RequestsMethod类对象调用request_all方法发送请求\n # result = req_fix.request_all(req_method=method, req_url=url, req_mime=mime, case_data=data)\n \n # 2.1 判断sql语句的类型是否为select\n elif sql_type == \"select\":\n # 2.2 使用DB类对象,调用select方法执行查询的sql语句,并接收查询结果\n select_result = db_fix.select(sql_sentence)\n # 2.3 将查询结果更新到用例数据中\n data[update_key] = select_result\n # # 2.3 使用RequestsMethod类对象调用request_all方法发送请求\n # result = req_fix.request_all(req_method=method, req_url=url, req_mime=mime, case_data=data)\n \n # 3.1 判断sql语句的类型是否delete|select或者为select|delete\n elif sql_type == \"delete|select\" or sql_type == \"select|delete\":\n # 3.2 使用DB类对象,调用delete方法执行删除的sql语句\n db_fix.delete(sql_sentence[\"delete\"])\n # 3.3 使用DB类对象,调用select方法执行查询的sql语句,并接收查询结果\n select_result = db_fix.select(sql_sentence[\"select\"])\n # 3.4 将查询结果更新到用例数据中\n data[update_key] = select_result\n # # 3.5 使用RequestsMethod类对象调用request_all方法发送请求\n # result = req_fix.request_all(req_method=method, req_url=url, req_mime=mime, case_data=data)\n #\n # else:\n # result = req_fix.request_all(req_method=method, req_url=url, req_mime=mime, case_data=data)\n \n result = req_fix.request_all(req_method=method, req_url=url, req_mime=mime, case_data=data)\n \n # 断言\n try:\n for key in expect:\n> assert expect[key] == result.json().get(key)\nE AssertionError: assert '删除维度成功' == '删除维度成功!'\nE - 删除维度成功!\nE ? -\nE + 删除维度成功\n\ntest_bpm.py:61: AssertionError\n\nDuring handling of the above exception, another exception occurred:\n\nself = <InterfaceAutoTest.test_case.test_bpm.TestBPM object at 0x00000257902F01C0>\nreq_fix = <InterfaceAutoTest.requests_method.requests_method.RequestsMethod object at 0x00000257902F0490>\ndb_fix = <InterfaceAutoTest.common.db.DB object at 0x00000257903D93D0>, module = '维度管理', interface = '根据维度编码删除维度', title = '正向用例'\nlevel = '高', method = 'DELETE', url = 'http://120.46.172.186:8080/api/demension/v1/dem/deleteDemByIds', mime = 'query'\ndata = {'ids': '1688475997541777408'}, expect = {'message': '删除维度成功', 'state': True}, sql_type = 'select'\nsql_sentence = 'SELECT ID_ FROM uc_demension WHERE `CODE_`=\"test56_dem\";', update_key = 'ids'\n\n @allure.epic(\"BPM系统\")\n @pytest.mark.parametrize(\"module, interface, title, level, method, url, mime, data, expect, sql_type, sql_sentence, update_key\", ReadExcel().get_data())\n def test_bpm(self, req_fix, db_fix, module, interface, title, level, method, url, mime, data, expect, sql_type, sql_sentence, update_key):\n allure.dynamic.feature(module)\n allure.dynamic.story(interface)\n allure.dynamic.title(title)\n allure.dynamic.severity(level)\n \n # 1.1:判断sql语句的类型是否为delete\n if sql_type == \"delete\":\n # 1.2 使用DB类对象,调用delete方法执行删除的sql语句\n db_fix.delete(sql_sentence)\n # # 1.3 使用RequestsMethod类对象调用request_all方法发送请求\n # result = req_fix.request_all(req_method=method, req_url=url, req_mime=mime, case_data=data)\n \n # 2.1 判断sql语句的类型是否为select\n elif sql_type == \"select\":\n # 2.2 使用DB类对象,调用select方法执行查询的sql语句,并接收查询结果\n select_result = db_fix.select(sql_sentence)\n # 2.3 将查询结果更新到用例数据中\n data[update_key] = select_result\n # # 2.3 使用RequestsMethod类对象调用request_all方法发送请求\n # result = req_fix.request_all(req_method=method, req_url=url, req_mime=mime, case_data=data)\n \n # 3.1 判断sql语句的类型是否delete|select或者为select|delete\n elif sql_type == \"delete|select\" or sql_type == \"select|delete\":\n # 3.2 使用DB类对象,调用delete方法执行删除的sql语句\n db_fix.delete(sql_sentence[\"delete\"])\n # 3.3 使用DB类对象,调用select方法执行查询的sql语句,并接收查询结果\n select_result = db_fix.select(sql_sentence[\"select\"])\n # 3.4 将查询结果更新到用例数据中\n data[update_key] = select_result\n # # 3.5 使用RequestsMethod类对象调用request_all方法发送请求\n # result = req_fix.request_all(req_method=method, req_url=url, req_mime=mime, case_data=data)\n #\n # else:\n # result = req_fix.request_all(req_method=method, req_url=url, req_mime=mime, case_data=data)\n \n result = req_fix.request_all(req_method=method, req_url=url, req_mime=mime, case_data=data)\n \n # 断言\n try:\n for key in expect:\n assert expect[key] == result.json().get(key)\n except:\n print(\"断言失败\")\n logging.error(\"断言失败, 模块名称为:{},接口名称为:{},用例标题:{},用例为:{},期望结果为:{},服务器返回数据为:{}\".format(module, interface, title, str(data), str(expect), result.text))\n> raise AssertionError(\"断言失败\")\nE AssertionError: 断言失败\n\ntest_bpm.py:65: AssertionError"}, "attachments": [{"name": "log", "source": "76146fe0-2db4-40b6-a783-1df30e0ca89e-attachment.txt", "type": "text/plain"}, {"name": "stdout", "source": "084c97bf-9374-4b16-9430-5b6be96a9a54-attachment.txt", "type": "text/plain"}], "parameters": [{"name": "module", "value": "'维度管理'"}, {"name": "interface", "value": "'根据维度编码删除维度'"}, {"name": "title", "value": "'正向用例'"}, {"name": "level", "value": "'高'"}, {"name": "method", "value": "'DELETE'"}, {"name": "url", "value": "'http://120.46.172.186:8080/api/demension/v1/dem/deleteDemByIds'"}, {"name": "mime", "value": "'query'"}, {"name": "data", "value": "{'ids': '不知道'}"}, {"name": "expect", "value": "{'state': True, 'message': '删除维度成功'}"}, {"name": "sql_type", "value": "'select'"}, {"name": "sql_sentence", "value": "'SELECT ID_ FROM uc_demension WHERE `CODE_`=\"test56_dem\";'"}, {"name": "update_key", "value": "'ids'"}], "start": 1691399024065, "stop": 1691399024169, "uuid": "8edf008a-61fa-4527-8826-32436fa6095e", "historyId": "f37f5b35a33b0d851ad30e5c966f4068", "testCaseId": "0abeaba8f176b6785a0334bed7c1bdad", "fullName": "test_bpm.TestBPM#test_bpm", "labels": [{"name": "feature", "value": "维度管理"}, {"name": "story", "value": "根据维度编码删除维度"}, {"name": "severity", "value": "高"}, {"name": "epic", "value": "BPM系统"}, {"name": "suite", "value": "test_bpm"}, {"name": "subSuite", "value": "TestBPM"}, {"name": "host", "value": "LAPTOP-31V3JBFR"}, {"name": "thread", "value": "6412-MainThread"}, {"name": "framework", "value": "pytest"}, {"name": "language", "value": "cpython3"}, {"name": "package", "value": "test_bpm"}]}
\ No newline at end of file
{"uuid": "a693e9b7-1124-47f7-bd27-d84d4e641132", "befores": [{"name": "expect", "status": "passed", "start": 1691399017155, "stop": 1691399017155}], "start": 1691399017155, "stop": 1691399017259}
\ No newline at end of file
{"uuid": "c482c254-431b-4d48-abd8-df5322ff2ac7", "befores": [{"name": "level", "status": "passed", "start": 1691399017806, "stop": 1691399017806}], "start": 1691399017806, "stop": 1691399018085}
\ No newline at end of file
{"uuid": "34634ab9-fa61-4b1d-af48-b3257775e6e9", "befores": [{"name": "mime", "status": "passed", "start": 1691399017699, "stop": 1691399017699}], "start": 1691399017699, "stop": 1691399017798}
\ No newline at end of file
{"uuid": "ba22a365-c3df-4921-8440-d45c8eb6bf66", "befores": [{"name": "module", "status": "passed", "start": 1691399023559, "stop": 1691399023559}], "start": 1691399023559, "stop": 1691399023709}
\ No newline at end of file
{"uuid": "0b435e9b-3163-49fe-a7e8-3b44130a50a9", "befores": [{"name": "title", "status": "passed", "start": 1691399027503, "stop": 1691399027503}], "start": 1691399027503, "stop": 1691399027657}
\ No newline at end of file
{"uuid": "3e562a98-bccb-4647-8c75-db1f188d0d52", "befores": [{"name": "level", "status": "passed", "start": 1691399017588, "stop": 1691399017588}], "start": 1691399017588, "stop": 1691399017693}
\ No newline at end of file
{"uuid": "ec3e0229-f482-4ef2-991d-24be8bcda2bc", "befores": [{"name": "mime", "status": "passed", "start": 1691399023908, "stop": 1691399023908}], "start": 1691399023908, "stop": 1691399023985}
\ No newline at end of file
{"uuid": "1dddf259-4198-4d4b-98c9-ee4237161135", "befores": [{"name": "method", "status": "passed", "start": 1691399023475, "stop": 1691399023475}], "start": 1691399023475, "stop": 1691399023552}
\ No newline at end of file
{"uuid": "c7639e58-8231-4529-8e65-5f2d1e96c927", "befores": [{"name": "method", "status": "passed", "start": 1691399017374, "stop": 1691399017374}], "start": 1691399017374, "stop": 1691399017471}
\ No newline at end of file
{"uuid": "94df77a3-a492-4efb-a5ef-2440bdfd2043", "befores": [{"name": "data", "status": "passed", "start": 1691399026336, "stop": 1691399026336}], "start": 1691399026336, "stop": 1691399026479}
\ No newline at end of file
{"uuid": "bfae56a3-2142-44fe-9877-e6ed818cfc73", "befores": [{"name": "expect", "status": "passed", "start": 1691399028670, "stop": 1691399028670}], "start": 1691399028670, "stop": 1691399028815}
\ No newline at end of file
DEBUG--2023-08-07 17:03:44--http://120.46.172.186:8080 "POST /api/org/v1/org/deleteOrg HTTP/1.1" 200 None
\ No newline at end of file
{"uuid": "3b7ee2f2-fcb8-4362-8f16-f47e86bb0487", "children": ["5783b43e-e54b-4660-adfe-2079911bd915", "7ddb01fc-6c54-4a09-b494-95564a55fde4", "963e5976-d7e0-4af0-9e7a-5ae341b84b3b", "e6fa6f52-6621-4392-a26f-d322709886a9", "75ea1d5d-84d6-4761-bf9b-2df77f0984b2", "0c1a3536-afbf-43c1-bb8b-a5dc59188d23", "5a29fcea-3685-4c85-8d5a-a16599622308", "52024e49-fb81-4dd6-9841-9b0d6d682a76", "5f099801-3b79-4f3c-8804-448e7f026b17", "6eb477af-a35a-4e36-b6ad-9f8959100781", "a72ab66a-e601-438e-8f94-6bfa578cd4df", "fdb731ac-01a3-4051-9403-de6edeb3914f", "49c770ae-ea71-47bf-92e5-b36ca8bf3830", "00a9f16b-f9dc-4d6f-a4fb-c691d83e165b", "fdc69955-1b96-4a9a-a8e9-22bc1edcc13b", "45f212f5-f272-4eb1-b69d-45a966faa567", "f1093db1-23cd-4e4d-90d7-4a7765da3e6c", "f6d1231c-c1da-4a32-905b-cef5ec7c5f09", "0bab2203-77fb-4b87-8152-b8a52b3890d2", "cf620890-3260-459b-a1c2-c3dd2751a90b", "8edf008a-61fa-4527-8826-32436fa6095e", "3cb9afc3-7898-4d5e-a032-6bbf64f87e1c", "13282a84-553b-4953-bcbb-837a60003d28", "450068c0-41cc-4275-ab84-9c8d779354b9", "3cb15ddf-a24f-4b89-83d1-24078763326d", "8f27cff9-e779-4c79-b2d6-3d20ce5946f2"], "befores": [{"name": "_session_faker", "status": "passed", "start": 1691399016370, "stop": 1691399016483}], "start": 1691399016370, "stop": 1691399029988}
\ No newline at end of file
{"uuid": "af0811fb-ebf4-43ba-9900-1b7ce983e354", "befores": [{"name": "url", "status": "passed", "start": 1691399023908, "stop": 1691399023908}], "start": 1691399023908, "stop": 1691399023986}
\ No newline at end of file
{"uuid": "e1cd0494-9ee5-47b7-8814-1136d495e463", "befores": [{"name": "level", "status": "passed", "start": 1691399017155, "stop": 1691399017155}], "start": 1691399017155, "stop": 1691399017262}
\ No newline at end of file
{"uuid": "3a3f50d7-2adc-40a3-9dcd-a6b5a470523a", "befores": [{"name": "sql_type", "status": "passed", "start": 1691399017043, "stop": 1691399017043}], "start": 1691399017043, "stop": 1691399017145}
\ No newline at end of file
{"uuid": "e9cef6b9-3aa6-47af-8ac9-08e3a2b605c6", "befores": [{"name": "method", "status": "passed", "start": 1691399019101, "stop": 1691399019101}], "start": 1691399019101, "stop": 1691399019169}
\ No newline at end of file
{"uuid": "b534d723-8480-4c65-97a1-c297a31aa9e0", "befores": [{"name": "title", "status": "passed", "start": 1691399017806, "stop": 1691399017806}], "start": 1691399017806, "stop": 1691399018085}
\ No newline at end of file
{"uuid": "345119e3-9b18-4899-bef3-5943b1595672", "befores": [{"name": "interface", "status": "passed", "start": 1691399016937, "stop": 1691399016937}], "start": 1691399016937, "stop": 1691399017037}
\ No newline at end of file
{"uuid": "2b942d65-974c-4e2a-b203-9bdd2886d06f", "befores": [{"name": "data", "status": "passed", "start": 1691399020197, "stop": 1691399020197}], "start": 1691399020197, "stop": 1691399020274}
\ No newline at end of file
{"uuid": "ea682745-6cfc-4f8d-a1b9-9475730b2ad9", "befores": [{"name": "url", "status": "passed", "start": 1691399029836, "stop": 1691399029837}], "start": 1691399029836, "stop": 1691399029983}
\ No newline at end of file
{"uuid": "899e2424-a722-44fc-af8c-17f1958f0983", "befores": [{"name": "sql_sentence", "status": "passed", "start": 1691399017807, "stop": 1691399017807}], "start": 1691399017807, "stop": 1691399018071}
\ No newline at end of file
{"uuid": "9f87f76b-27fe-4d52-9c2a-0ac90279bd98", "befores": [{"name": "sql_type", "status": "passed", "start": 1691399017589, "stop": 1691399017589}], "start": 1691399017589, "stop": 1691399017688}
\ No newline at end of file
{"uuid": "e0090143-c799-4418-ae89-bcf251a501d3", "befores": [{"name": "interface", "status": "passed", "start": 1691399029836, "stop": 1691399029836}], "start": 1691399029836, "stop": 1691399029985}
\ No newline at end of file
{"uuid": "b008276a-cbb0-459c-a194-95fcfd7d4ddf", "children": ["5783b43e-e54b-4660-adfe-2079911bd915", "7ddb01fc-6c54-4a09-b494-95564a55fde4", "963e5976-d7e0-4af0-9e7a-5ae341b84b3b", "e6fa6f52-6621-4392-a26f-d322709886a9", "75ea1d5d-84d6-4761-bf9b-2df77f0984b2", "0c1a3536-afbf-43c1-bb8b-a5dc59188d23", "5a29fcea-3685-4c85-8d5a-a16599622308", "52024e49-fb81-4dd6-9841-9b0d6d682a76", "5f099801-3b79-4f3c-8804-448e7f026b17", "6eb477af-a35a-4e36-b6ad-9f8959100781", "a72ab66a-e601-438e-8f94-6bfa578cd4df", "fdb731ac-01a3-4051-9403-de6edeb3914f", "49c770ae-ea71-47bf-92e5-b36ca8bf3830", "00a9f16b-f9dc-4d6f-a4fb-c691d83e165b", "fdc69955-1b96-4a9a-a8e9-22bc1edcc13b", "45f212f5-f272-4eb1-b69d-45a966faa567", "f1093db1-23cd-4e4d-90d7-4a7765da3e6c", "f6d1231c-c1da-4a32-905b-cef5ec7c5f09", "0bab2203-77fb-4b87-8152-b8a52b3890d2", "cf620890-3260-459b-a1c2-c3dd2751a90b", "8edf008a-61fa-4527-8826-32436fa6095e", "3cb9afc3-7898-4d5e-a032-6bbf64f87e1c", "13282a84-553b-4953-bcbb-837a60003d28", "450068c0-41cc-4275-ab84-9c8d779354b9", "3cb15ddf-a24f-4b89-83d1-24078763326d", "8f27cff9-e779-4c79-b2d6-3d20ce5946f2"], "befores": [{"name": "req_fix", "status": "passed", "start": 1691399016483, "stop": 1691399016584}], "afters": [{"name": "req_fix::0", "status": "passed", "start": 1691399029988, "stop": 1691399029988}], "start": 1691399016483, "stop": 1691399029988}
\ No newline at end of file
{"uuid": "d3af8368-7c58-4bac-97ad-b0c16c451ae1", "befores": [{"name": "method", "status": "passed", "start": 1691399017699, "stop": 1691399017699}], "start": 1691399017699, "stop": 1691399017799}
\ No newline at end of file
{"uuid": "cfbf5ec8-a4dc-4b12-8bae-14f5743fdd92", "befores": [{"name": "interface", "status": "passed", "start": 1691399017374, "stop": 1691399017374}], "start": 1691399017374, "stop": 1691399017473}
\ No newline at end of file
{"uuid": "9b899a1e-3ab1-4db8-a44b-756336704448", "befores": [{"name": "level", "status": "passed", "start": 1691399017374, "stop": 1691399017374}], "start": 1691399017374, "stop": 1691399017471}
\ No newline at end of file
{"uuid": "67b044e4-8822-466e-a313-48ce1aa625f3", "befores": [{"name": "data", "status": "passed", "start": 1691399017589, "stop": 1691399017589}], "start": 1691399017589, "stop": 1691399017690}
\ No newline at end of file
{"uuid": "f87429bc-e420-4517-885c-5bb2b53dd2a2", "befores": [{"name": "sql_type", "status": "passed", "start": 1691399023993, "stop": 1691399023993}], "start": 1691399023992, "stop": 1691399024055}
\ No newline at end of file
{"uuid": "166b6a75-9a46-4ae4-b28b-944326772ab0", "befores": [{"name": "sql_sentence", "status": "passed", "start": 1691399025190, "stop": 1691399025190}], "start": 1691399025190, "stop": 1691399025296}
\ No newline at end of file
{"uuid": "3b714ddc-cf2b-4daa-a643-32feeda75e1e", "befores": [{"name": "sql_type", "status": "passed", "start": 1691399017478, "stop": 1691399017478}], "start": 1691399017478, "stop": 1691399017578}
\ No newline at end of file
{"uuid": "e5dd4319-08c0-468d-859e-4c0b87887680", "befores": [{"name": "title", "status": "passed", "start": 1691399019101, "stop": 1691399019101}], "start": 1691399019101, "stop": 1691399019171}
\ No newline at end of file
{"uuid": "6792296d-88a1-45c1-a72c-9fd7d4c620aa", "befores": [{"name": "mime", "status": "passed", "start": 1691399017374, "stop": 1691399017374}], "start": 1691399017374, "stop": 1691399017470}
\ No newline at end of file
{"uuid": "9b3fa810-207b-423b-919a-45ae75bdf80e", "befores": [{"name": "method", "status": "passed", "start": 1691399016938, "stop": 1691399016938}], "start": 1691399016938, "stop": 1691399017036}
\ No newline at end of file
{"name": "正向用例", "status": "failed", "statusDetails": {"message": "AssertionError: 断言失败", "trace": "self = <InterfaceAutoTest.test_case.test_bpm.TestBPM object at 0x00000257902D2820>\nreq_fix = <InterfaceAutoTest.requests_method.requests_method.RequestsMethod object at 0x00000257902F0490>\ndb_fix = <InterfaceAutoTest.common.db.DB object at 0x00000257903D93D0>, module = '认证接口', interface = '刷新token', title = '正向用例'\nlevel = '中', method = 'get', url = 'http://120.46.172.186:8080/refresh', mime = None, data = None, expect = {'message': '刷新token成功'}\nsql_type = None, sql_sentence = None, update_key = None\n\n @allure.epic(\"BPM系统\")\n @pytest.mark.parametrize(\"module, interface, title, level, method, url, mime, data, expect, sql_type, sql_sentence, update_key\", ReadExcel().get_data())\n def test_bpm(self, req_fix, db_fix, module, interface, title, level, method, url, mime, data, expect, sql_type, sql_sentence, update_key):\n allure.dynamic.feature(module)\n allure.dynamic.story(interface)\n allure.dynamic.title(title)\n allure.dynamic.severity(level)\n \n # 1.1:判断sql语句的类型是否为delete\n if sql_type == \"delete\":\n # 1.2 使用DB类对象,调用delete方法执行删除的sql语句\n db_fix.delete(sql_sentence)\n # # 1.3 使用RequestsMethod类对象调用request_all方法发送请求\n # result = req_fix.request_all(req_method=method, req_url=url, req_mime=mime, case_data=data)\n \n # 2.1 判断sql语句的类型是否为select\n elif sql_type == \"select\":\n # 2.2 使用DB类对象,调用select方法执行查询的sql语句,并接收查询结果\n select_result = db_fix.select(sql_sentence)\n # 2.3 将查询结果更新到用例数据中\n data[update_key] = select_result\n # # 2.3 使用RequestsMethod类对象调用request_all方法发送请求\n # result = req_fix.request_all(req_method=method, req_url=url, req_mime=mime, case_data=data)\n \n # 3.1 判断sql语句的类型是否delete|select或者为select|delete\n elif sql_type == \"delete|select\" or sql_type == \"select|delete\":\n # 3.2 使用DB类对象,调用delete方法执行删除的sql语句\n db_fix.delete(sql_sentence[\"delete\"])\n # 3.3 使用DB类对象,调用select方法执行查询的sql语句,并接收查询结果\n select_result = db_fix.select(sql_sentence[\"select\"])\n # 3.4 将查询结果更新到用例数据中\n data[update_key] = select_result\n # # 3.5 使用RequestsMethod类对象调用request_all方法发送请求\n # result = req_fix.request_all(req_method=method, req_url=url, req_mime=mime, case_data=data)\n #\n # else:\n # result = req_fix.request_all(req_method=method, req_url=url, req_mime=mime, case_data=data)\n \n result = req_fix.request_all(req_method=method, req_url=url, req_mime=mime, case_data=data)\n \n # 断言\n try:\n for key in expect:\n> assert expect[key] == result.json().get(key)\nE AssertionError: assert '刷新token成功' == None\nE + where None = <built-in method get of dict object at 0x000002579047D600>('message')\nE + where <built-in method get of dict object at 0x000002579047D600> = {'account': '', 'loginStatus': True, 'token': 'eyJhbGciOiJIUzUxMiJ9.eyJzdWIiOiJhZG1pbiIsInRlbmFudElkIjoiLTEiLCJleHAiOjE2OTE0ODU0MjAsImlhdCI6MTY5MTM5OTAyMH0.UiLL8CbY6A0_NK2PFWF1YA_lOAuFH2tDwOk5-MP21rQb6-4POQAwoNYaJRF_6QfYBd60YGMTwyBEISUGe-EHXg', 'userAttrs': {}, ...}.get\nE + where {'account': '', 'loginStatus': True, 'token': 'eyJhbGciOiJIUzUxMiJ9.eyJzdWIiOiJhZG1pbiIsInRlbmFudElkIjoiLTEiLCJleHAiOjE2OTE0ODU0MjAsImlhdCI6MTY5MTM5OTAyMH0.UiLL8CbY6A0_NK2PFWF1YA_lOAuFH2tDwOk5-MP21rQb6-4POQAwoNYaJRF_6QfYBd60YGMTwyBEISUGe-EHXg', 'userAttrs': {}, ...} = <bound method Response.json of <Response [200]>>()\nE + where <bound method Response.json of <Response [200]>> = <Response [200]>.json\n\ntest_bpm.py:61: AssertionError\n\nDuring handling of the above exception, another exception occurred:\n\nself = <InterfaceAutoTest.test_case.test_bpm.TestBPM object at 0x00000257902D2820>\nreq_fix = <InterfaceAutoTest.requests_method.requests_method.RequestsMethod object at 0x00000257902F0490>\ndb_fix = <InterfaceAutoTest.common.db.DB object at 0x00000257903D93D0>, module = '认证接口', interface = '刷新token', title = '正向用例'\nlevel = '中', method = 'get', url = 'http://120.46.172.186:8080/refresh', mime = None, data = None, expect = {'message': '刷新token成功'}\nsql_type = None, sql_sentence = None, update_key = None\n\n @allure.epic(\"BPM系统\")\n @pytest.mark.parametrize(\"module, interface, title, level, method, url, mime, data, expect, sql_type, sql_sentence, update_key\", ReadExcel().get_data())\n def test_bpm(self, req_fix, db_fix, module, interface, title, level, method, url, mime, data, expect, sql_type, sql_sentence, update_key):\n allure.dynamic.feature(module)\n allure.dynamic.story(interface)\n allure.dynamic.title(title)\n allure.dynamic.severity(level)\n \n # 1.1:判断sql语句的类型是否为delete\n if sql_type == \"delete\":\n # 1.2 使用DB类对象,调用delete方法执行删除的sql语句\n db_fix.delete(sql_sentence)\n # # 1.3 使用RequestsMethod类对象调用request_all方法发送请求\n # result = req_fix.request_all(req_method=method, req_url=url, req_mime=mime, case_data=data)\n \n # 2.1 判断sql语句的类型是否为select\n elif sql_type == \"select\":\n # 2.2 使用DB类对象,调用select方法执行查询的sql语句,并接收查询结果\n select_result = db_fix.select(sql_sentence)\n # 2.3 将查询结果更新到用例数据中\n data[update_key] = select_result\n # # 2.3 使用RequestsMethod类对象调用request_all方法发送请求\n # result = req_fix.request_all(req_method=method, req_url=url, req_mime=mime, case_data=data)\n \n # 3.1 判断sql语句的类型是否delete|select或者为select|delete\n elif sql_type == \"delete|select\" or sql_type == \"select|delete\":\n # 3.2 使用DB类对象,调用delete方法执行删除的sql语句\n db_fix.delete(sql_sentence[\"delete\"])\n # 3.3 使用DB类对象,调用select方法执行查询的sql语句,并接收查询结果\n select_result = db_fix.select(sql_sentence[\"select\"])\n # 3.4 将查询结果更新到用例数据中\n data[update_key] = select_result\n # # 3.5 使用RequestsMethod类对象调用request_all方法发送请求\n # result = req_fix.request_all(req_method=method, req_url=url, req_mime=mime, case_data=data)\n #\n # else:\n # result = req_fix.request_all(req_method=method, req_url=url, req_mime=mime, case_data=data)\n \n result = req_fix.request_all(req_method=method, req_url=url, req_mime=mime, case_data=data)\n \n # 断言\n try:\n for key in expect:\n assert expect[key] == result.json().get(key)\n except:\n print(\"断言失败\")\n logging.error(\"断言失败, 模块名称为:{},接口名称为:{},用例标题:{},用例为:{},期望结果为:{},服务器返回数据为:{}\".format(module, interface, title, str(data), str(expect), result.text))\n> raise AssertionError(\"断言失败\")\nE AssertionError: 断言失败\n\ntest_bpm.py:65: AssertionError"}, "attachments": [{"name": "log", "source": "218a9da2-a720-423d-b39e-7c0643b73173-attachment.txt", "type": "text/plain"}, {"name": "stdout", "source": "b73961f6-4fd5-41ac-ac56-c8f6819fb33f-attachment.txt", "type": "text/plain"}], "parameters": [{"name": "module", "value": "'认证接口'"}, {"name": "interface", "value": "'刷新token'"}, {"name": "title", "value": "'正向用例'"}, {"name": "level", "value": "'中'"}, {"name": "method", "value": "'get'"}, {"name": "url", "value": "'http://120.46.172.186:8080/refresh'"}, {"name": "mime", "value": "None"}, {"name": "data", "value": "None"}, {"name": "expect", "value": "{'message': '刷新token成功'}"}, {"name": "sql_type", "value": "None"}, {"name": "sql_sentence", "value": "None"}, {"name": "update_key", "value": "None"}], "start": 1691399021306, "stop": 1691399021363, "uuid": "00a9f16b-f9dc-4d6f-a4fb-c691d83e165b", "historyId": "f368301ce537f1bbd596e0d19f24f393", "testCaseId": "0abeaba8f176b6785a0334bed7c1bdad", "fullName": "test_bpm.TestBPM#test_bpm", "labels": [{"name": "feature", "value": "认证接口"}, {"name": "story", "value": "刷新token"}, {"name": "severity", "value": "中"}, {"name": "epic", "value": "BPM系统"}, {"name": "suite", "value": "test_bpm"}, {"name": "subSuite", "value": "TestBPM"}, {"name": "host", "value": "LAPTOP-31V3JBFR"}, {"name": "thread", "value": "6412-MainThread"}, {"name": "framework", "value": "pytest"}, {"name": "language", "value": "cpython3"}, {"name": "package", "value": "test_bpm"}]}
\ No newline at end of file
{"uuid": "60c4e051-2907-42e8-9448-017789421a71", "befores": [{"name": "url", "status": "passed", "start": 1691399028670, "stop": 1691399028670}], "start": 1691399028670, "stop": 1691399028817}
\ No newline at end of file
{"name": "正向用例", "status": "failed", "statusDetails": {"message": "AssertionError: 断言失败", "trace": "self = <InterfaceAutoTest.test_case.test_bpm.TestBPM object at 0x00000257902F01C0>\nreq_fix = <InterfaceAutoTest.requests_method.requests_method.RequestsMethod object at 0x00000257902F0490>\ndb_fix = <InterfaceAutoTest.common.db.DB object at 0x00000257903D93D0>, module = '维度管理', interface = '根据维度编码删除维度', title = '正向用例'\nlevel = '高', method = 'DELETE', url = 'http://120.46.172.186:8080/api/demension/v1/dem/deleteDemByIds', mime = 'query'\ndata = {'ids': '1688475997541777408'}, expect = {'message': '删除维度成功', 'state': True}, sql_type = 'select'\nsql_sentence = 'SELECT ID_ FROM uc_demension WHERE `CODE_`=\"test56_dem\";', update_key = 'ids'\n\n @allure.epic(\"BPM系统\")\n @pytest.mark.parametrize(\"module, interface, title, level, method, url, mime, data, expect, sql_type, sql_sentence, update_key\", ReadExcel().get_data())\n def test_bpm(self, req_fix, db_fix, module, interface, title, level, method, url, mime, data, expect, sql_type, sql_sentence, update_key):\n allure.dynamic.feature(module)\n allure.dynamic.story(interface)\n allure.dynamic.title(title)\n allure.dynamic.severity(level)\n \n # 1.1:判断sql语句的类型是否为delete\n if sql_type == \"delete\":\n # 1.2 使用DB类对象,调用delete方法执行删除的sql语句\n db_fix.delete(sql_sentence)\n # # 1.3 使用RequestsMethod类对象调用request_all方法发送请求\n # result = req_fix.request_all(req_method=method, req_url=url, req_mime=mime, case_data=data)\n \n # 2.1 判断sql语句的类型是否为select\n elif sql_type == \"select\":\n # 2.2 使用DB类对象,调用select方法执行查询的sql语句,并接收查询结果\n select_result = db_fix.select(sql_sentence)\n # 2.3 将查询结果更新到用例数据中\n data[update_key] = select_result\n # # 2.3 使用RequestsMethod类对象调用request_all方法发送请求\n # result = req_fix.request_all(req_method=method, req_url=url, req_mime=mime, case_data=data)\n \n # 3.1 判断sql语句的类型是否delete|select或者为select|delete\n elif sql_type == \"delete|select\" or sql_type == \"select|delete\":\n # 3.2 使用DB类对象,调用delete方法执行删除的sql语句\n db_fix.delete(sql_sentence[\"delete\"])\n # 3.3 使用DB类对象,调用select方法执行查询的sql语句,并接收查询结果\n select_result = db_fix.select(sql_sentence[\"select\"])\n # 3.4 将查询结果更新到用例数据中\n data[update_key] = select_result\n # # 3.5 使用RequestsMethod类对象调用request_all方法发送请求\n # result = req_fix.request_all(req_method=method, req_url=url, req_mime=mime, case_data=data)\n #\n # else:\n # result = req_fix.request_all(req_method=method, req_url=url, req_mime=mime, case_data=data)\n \n result = req_fix.request_all(req_method=method, req_url=url, req_mime=mime, case_data=data)\n \n # 断言\n try:\n for key in expect:\n> assert expect[key] == result.json().get(key)\nE AssertionError: assert True == False\nE + where False = <built-in method get of dict object at 0x000002579047D040>('state')\nE + where <built-in method get of dict object at 0x000002579047D040> = {'logId': '1688476018974670848', 'message': '', 'state': False}.get\nE + where {'logId': '1688476018974670848', 'message': '', 'state': False} = <bound method Response.json of <Response [500]>>()\nE + where <bound method Response.json of <Response [500]>> = <Response [500]>.json\n\ntest_bpm.py:61: AssertionError\n\nDuring handling of the above exception, another exception occurred:\n\nself = <InterfaceAutoTest.test_case.test_bpm.TestBPM object at 0x00000257902F01C0>\nreq_fix = <InterfaceAutoTest.requests_method.requests_method.RequestsMethod object at 0x00000257902F0490>\ndb_fix = <InterfaceAutoTest.common.db.DB object at 0x00000257903D93D0>, module = '维度管理', interface = '根据维度编码删除维度', title = '正向用例'\nlevel = '高', method = 'DELETE', url = 'http://120.46.172.186:8080/api/demension/v1/dem/deleteDemByIds', mime = 'query'\ndata = {'ids': '1688475997541777408'}, expect = {'message': '删除维度成功', 'state': True}, sql_type = 'select'\nsql_sentence = 'SELECT ID_ FROM uc_demension WHERE `CODE_`=\"test56_dem\";', update_key = 'ids'\n\n @allure.epic(\"BPM系统\")\n @pytest.mark.parametrize(\"module, interface, title, level, method, url, mime, data, expect, sql_type, sql_sentence, update_key\", ReadExcel().get_data())\n def test_bpm(self, req_fix, db_fix, module, interface, title, level, method, url, mime, data, expect, sql_type, sql_sentence, update_key):\n allure.dynamic.feature(module)\n allure.dynamic.story(interface)\n allure.dynamic.title(title)\n allure.dynamic.severity(level)\n \n # 1.1:判断sql语句的类型是否为delete\n if sql_type == \"delete\":\n # 1.2 使用DB类对象,调用delete方法执行删除的sql语句\n db_fix.delete(sql_sentence)\n # # 1.3 使用RequestsMethod类对象调用request_all方法发送请求\n # result = req_fix.request_all(req_method=method, req_url=url, req_mime=mime, case_data=data)\n \n # 2.1 判断sql语句的类型是否为select\n elif sql_type == \"select\":\n # 2.2 使用DB类对象,调用select方法执行查询的sql语句,并接收查询结果\n select_result = db_fix.select(sql_sentence)\n # 2.3 将查询结果更新到用例数据中\n data[update_key] = select_result\n # # 2.3 使用RequestsMethod类对象调用request_all方法发送请求\n # result = req_fix.request_all(req_method=method, req_url=url, req_mime=mime, case_data=data)\n \n # 3.1 判断sql语句的类型是否delete|select或者为select|delete\n elif sql_type == \"delete|select\" or sql_type == \"select|delete\":\n # 3.2 使用DB类对象,调用delete方法执行删除的sql语句\n db_fix.delete(sql_sentence[\"delete\"])\n # 3.3 使用DB类对象,调用select方法执行查询的sql语句,并接收查询结果\n select_result = db_fix.select(sql_sentence[\"select\"])\n # 3.4 将查询结果更新到用例数据中\n data[update_key] = select_result\n # # 3.5 使用RequestsMethod类对象调用request_all方法发送请求\n # result = req_fix.request_all(req_method=method, req_url=url, req_mime=mime, case_data=data)\n #\n # else:\n # result = req_fix.request_all(req_method=method, req_url=url, req_mime=mime, case_data=data)\n \n result = req_fix.request_all(req_method=method, req_url=url, req_mime=mime, case_data=data)\n \n # 断言\n try:\n for key in expect:\n assert expect[key] == result.json().get(key)\n except:\n print(\"断言失败\")\n logging.error(\"断言失败, 模块名称为:{},接口名称为:{},用例标题:{},用例为:{},期望结果为:{},服务器返回数据为:{}\".format(module, interface, title, str(data), str(expect), result.text))\n> raise AssertionError(\"断言失败\")\nE AssertionError: 断言失败\n\ntest_bpm.py:65: AssertionError"}, "attachments": [{"name": "log", "source": "1367eae4-1904-4af4-bf9b-73fda78110fd-attachment.txt", "type": "text/plain"}, {"name": "stdout", "source": "bd6edfe3-84b9-4297-9ff9-a89236ee3100-attachment.txt", "type": "text/plain"}], "parameters": [{"name": "module", "value": "'维度管理'"}, {"name": "interface", "value": "'根据维度编码删除维度'"}, {"name": "title", "value": "'正向用例'"}, {"name": "level", "value": "'高'"}, {"name": "method", "value": "'DELETE'"}, {"name": "url", "value": "'http://120.46.172.186:8080/api/demension/v1/dem/deleteDemByIds'"}, {"name": "mime", "value": "'query'"}, {"name": "data", "value": "{'ids': '1688475997541777408'}"}, {"name": "expect", "value": "{'state': True, 'message': '删除维度成功'}"}, {"name": "sql_type", "value": "'select'"}, {"name": "sql_sentence", "value": "'SELECT ID_ FROM uc_demension WHERE `CODE_`=\"test56_dem\";'"}, {"name": "update_key", "value": "'ids'"}], "start": 1691399028670, "stop": 1691399028807, "uuid": "3cb15ddf-a24f-4b89-83d1-24078763326d", "historyId": "f37f5b35a33b0d851ad30e5c966f4068", "testCaseId": "0abeaba8f176b6785a0334bed7c1bdad", "fullName": "test_bpm.TestBPM#test_bpm", "labels": [{"name": "feature", "value": "维度管理"}, {"name": "story", "value": "根据维度编码删除维度"}, {"name": "severity", "value": "高"}, {"name": "epic", "value": "BPM系统"}, {"name": "suite", "value": "test_bpm"}, {"name": "subSuite", "value": "TestBPM"}, {"name": "host", "value": "LAPTOP-31V3JBFR"}, {"name": "thread", "value": "6412-MainThread"}, {"name": "framework", "value": "pytest"}, {"name": "language", "value": "cpython3"}, {"name": "package", "value": "test_bpm"}]}
\ No newline at end of file
{"uuid": "df106739-ab74-493f-99c8-6050f8717f3c", "befores": [{"name": "interface", "status": "passed", "start": 1691399023475, "stop": 1691399023475}], "start": 1691399023475, "stop": 1691399023554}
\ No newline at end of file
{"uuid": "e1fa808e-31d6-4e9b-919a-14e723d7cbd4", "befores": [{"name": "expect", "status": "passed", "start": 1691399016938, "stop": 1691399016938}], "start": 1691399016938, "stop": 1691399017033}
\ No newline at end of file
{"uuid": "a2663d95-4bbd-4cd7-84a2-753a66953bb2", "befores": [{"name": "mime", "status": "passed", "start": 1691399025190, "stop": 1691399025190}], "start": 1691399025190, "stop": 1691399025308}
\ No newline at end of file
{"uuid": "e5f98046-fd7f-48c0-bb2f-6574ea72f1b1", "befores": [{"name": "expect", "status": "passed", "start": 1691399016871, "stop": 1691399016871}], "start": 1691399016871, "stop": 1691399016927}
\ No newline at end of file
{"uuid": "b9388525-f98d-4f44-a340-38d0fffbe111", "befores": [{"name": "expect", "status": "passed", "start": 1691399022389, "stop": 1691399022389}], "start": 1691399022389, "stop": 1691399022452}
\ No newline at end of file
{"uuid": "3b4bfa60-beef-4720-9aec-036524058f33", "befores": [{"name": "url", "status": "passed", "start": 1691399017589, "stop": 1691399017589}], "start": 1691399017589, "stop": 1691399017691}
\ No newline at end of file
{"uuid": "cb201e66-0cb4-473d-bb79-c57b92090ab6", "befores": [{"name": "title", "status": "passed", "start": 1691399028669, "stop": 1691399028669}], "start": 1691399028669, "stop": 1691399028818}
\ No newline at end of file
{"uuid": "71de2467-4ddf-411b-93c9-e1a18d6fca82", "befores": [{"name": "url", "status": "passed", "start": 1691399017043, "stop": 1691399017043}], "start": 1691399017043, "stop": 1691399017147}
\ No newline at end of file
{"uuid": "bba75447-44d4-45ac-ad44-c0b204646c34", "befores": [{"name": "method", "status": "passed", "start": 1691399023992, "stop": 1691399023992}], "start": 1691399023992, "stop": 1691399024058}
\ No newline at end of file
{"uuid": "24a3fa92-fc6b-4071-928c-68424b3b8fda", "befores": [{"name": "url", "status": "passed", "start": 1691399025190, "stop": 1691399025190}], "start": 1691399025190, "stop": 1691399025309}
\ No newline at end of file
{"name": "正向用例", "status": "failed", "statusDetails": {"message": "AssertionError: 断言失败", "trace": "self = <InterfaceAutoTest.test_case.test_bpm.TestBPM object at 0x00000257902D2820>\nreq_fix = <InterfaceAutoTest.requests_method.requests_method.RequestsMethod object at 0x00000257902F0490>\ndb_fix = <InterfaceAutoTest.common.db.DB object at 0x00000257903D93D0>, module = '认证接口', interface = '刷新token', title = '正向用例'\nlevel = '中', method = 'get', url = 'http://120.46.172.186:8080/refresh', mime = None, data = None, expect = {'message': '刷新token成功'}\nsql_type = None, sql_sentence = None, update_key = None\n\n @allure.epic(\"BPM系统\")\n @pytest.mark.parametrize(\"module, interface, title, level, method, url, mime, data, expect, sql_type, sql_sentence, update_key\", ReadExcel().get_data())\n def test_bpm(self, req_fix, db_fix, module, interface, title, level, method, url, mime, data, expect, sql_type, sql_sentence, update_key):\n allure.dynamic.feature(module)\n allure.dynamic.story(interface)\n allure.dynamic.title(title)\n allure.dynamic.severity(level)\n \n # 1.1:判断sql语句的类型是否为delete\n if sql_type == \"delete\":\n # 1.2 使用DB类对象,调用delete方法执行删除的sql语句\n db_fix.delete(sql_sentence)\n # # 1.3 使用RequestsMethod类对象调用request_all方法发送请求\n # result = req_fix.request_all(req_method=method, req_url=url, req_mime=mime, case_data=data)\n \n # 2.1 判断sql语句的类型是否为select\n elif sql_type == \"select\":\n # 2.2 使用DB类对象,调用select方法执行查询的sql语句,并接收查询结果\n select_result = db_fix.select(sql_sentence)\n # 2.3 将查询结果更新到用例数据中\n data[update_key] = select_result\n # # 2.3 使用RequestsMethod类对象调用request_all方法发送请求\n # result = req_fix.request_all(req_method=method, req_url=url, req_mime=mime, case_data=data)\n \n # 3.1 判断sql语句的类型是否delete|select或者为select|delete\n elif sql_type == \"delete|select\" or sql_type == \"select|delete\":\n # 3.2 使用DB类对象,调用delete方法执行删除的sql语句\n db_fix.delete(sql_sentence[\"delete\"])\n # 3.3 使用DB类对象,调用select方法执行查询的sql语句,并接收查询结果\n select_result = db_fix.select(sql_sentence[\"select\"])\n # 3.4 将查询结果更新到用例数据中\n data[update_key] = select_result\n # # 3.5 使用RequestsMethod类对象调用request_all方法发送请求\n # result = req_fix.request_all(req_method=method, req_url=url, req_mime=mime, case_data=data)\n #\n # else:\n # result = req_fix.request_all(req_method=method, req_url=url, req_mime=mime, case_data=data)\n \n result = req_fix.request_all(req_method=method, req_url=url, req_mime=mime, case_data=data)\n \n # 断言\n try:\n for key in expect:\n> assert expect[key] == result.json().get(key)\nE AssertionError: assert '刷新token成功' == None\nE + where None = <built-in method get of dict object at 0x00000257902D4500>('message')\nE + where <built-in method get of dict object at 0x00000257902D4500> = {'account': '', 'loginStatus': True, 'token': 'eyJhbGciOiJIUzUxMiJ9.eyJzdWIiOiJhZG1pbiIsInRlbmFudElkIjoiLTEiLCJleHAiOjE2OTE0ODU0MTcsImlhdCI6MTY5MTM5OTAxN30.n-7NR1iCjIKHbeH-Djk8t1sRkJi_FVAwgVHcGFWP6kh4xOyu6c4rgNtn817qbxVK9O63Wo9-SnreSvMJI5L8Gw', 'userAttrs': {}, ...}.get\nE + where {'account': '', 'loginStatus': True, 'token': 'eyJhbGciOiJIUzUxMiJ9.eyJzdWIiOiJhZG1pbiIsInRlbmFudElkIjoiLTEiLCJleHAiOjE2OTE0ODU0MTcsImlhdCI6MTY5MTM5OTAxN30.n-7NR1iCjIKHbeH-Djk8t1sRkJi_FVAwgVHcGFWP6kh4xOyu6c4rgNtn817qbxVK9O63Wo9-SnreSvMJI5L8Gw', 'userAttrs': {}, ...} = <bound method Response.json of <Response [200]>>()\nE + where <bound method Response.json of <Response [200]>> = <Response [200]>.json\n\ntest_bpm.py:61: AssertionError\n\nDuring handling of the above exception, another exception occurred:\n\nself = <InterfaceAutoTest.test_case.test_bpm.TestBPM object at 0x00000257902D2820>\nreq_fix = <InterfaceAutoTest.requests_method.requests_method.RequestsMethod object at 0x00000257902F0490>\ndb_fix = <InterfaceAutoTest.common.db.DB object at 0x00000257903D93D0>, module = '认证接口', interface = '刷新token', title = '正向用例'\nlevel = '中', method = 'get', url = 'http://120.46.172.186:8080/refresh', mime = None, data = None, expect = {'message': '刷新token成功'}\nsql_type = None, sql_sentence = None, update_key = None\n\n @allure.epic(\"BPM系统\")\n @pytest.mark.parametrize(\"module, interface, title, level, method, url, mime, data, expect, sql_type, sql_sentence, update_key\", ReadExcel().get_data())\n def test_bpm(self, req_fix, db_fix, module, interface, title, level, method, url, mime, data, expect, sql_type, sql_sentence, update_key):\n allure.dynamic.feature(module)\n allure.dynamic.story(interface)\n allure.dynamic.title(title)\n allure.dynamic.severity(level)\n \n # 1.1:判断sql语句的类型是否为delete\n if sql_type == \"delete\":\n # 1.2 使用DB类对象,调用delete方法执行删除的sql语句\n db_fix.delete(sql_sentence)\n # # 1.3 使用RequestsMethod类对象调用request_all方法发送请求\n # result = req_fix.request_all(req_method=method, req_url=url, req_mime=mime, case_data=data)\n \n # 2.1 判断sql语句的类型是否为select\n elif sql_type == \"select\":\n # 2.2 使用DB类对象,调用select方法执行查询的sql语句,并接收查询结果\n select_result = db_fix.select(sql_sentence)\n # 2.3 将查询结果更新到用例数据中\n data[update_key] = select_result\n # # 2.3 使用RequestsMethod类对象调用request_all方法发送请求\n # result = req_fix.request_all(req_method=method, req_url=url, req_mime=mime, case_data=data)\n \n # 3.1 判断sql语句的类型是否delete|select或者为select|delete\n elif sql_type == \"delete|select\" or sql_type == \"select|delete\":\n # 3.2 使用DB类对象,调用delete方法执行删除的sql语句\n db_fix.delete(sql_sentence[\"delete\"])\n # 3.3 使用DB类对象,调用select方法执行查询的sql语句,并接收查询结果\n select_result = db_fix.select(sql_sentence[\"select\"])\n # 3.4 将查询结果更新到用例数据中\n data[update_key] = select_result\n # # 3.5 使用RequestsMethod类对象调用request_all方法发送请求\n # result = req_fix.request_all(req_method=method, req_url=url, req_mime=mime, case_data=data)\n #\n # else:\n # result = req_fix.request_all(req_method=method, req_url=url, req_mime=mime, case_data=data)\n \n result = req_fix.request_all(req_method=method, req_url=url, req_mime=mime, case_data=data)\n \n # 断言\n try:\n for key in expect:\n assert expect[key] == result.json().get(key)\n except:\n print(\"断言失败\")\n logging.error(\"断言失败, 模块名称为:{},接口名称为:{},用例标题:{},用例为:{},期望结果为:{},服务器返回数据为:{}\".format(module, interface, title, str(data), str(expect), result.text))\n> raise AssertionError(\"断言失败\")\nE AssertionError: 断言失败\n\ntest_bpm.py:65: AssertionError"}, "attachments": [{"name": "log", "source": "be1305c3-d44a-49a9-8c31-c18644ff5cb8-attachment.txt", "type": "text/plain"}, {"name": "stdout", "source": "7adac537-401a-4188-bc2b-ce1d33eb08b7-attachment.txt", "type": "text/plain"}], "parameters": [{"name": "module", "value": "'认证接口'"}, {"name": "interface", "value": "'刷新token'"}, {"name": "title", "value": "'正向用例'"}, {"name": "level", "value": "'中'"}, {"name": "method", "value": "'get'"}, {"name": "url", "value": "'http://120.46.172.186:8080/refresh'"}, {"name": "mime", "value": "None"}, {"name": "data", "value": "None"}, {"name": "expect", "value": "{'message': '刷新token成功'}"}, {"name": "sql_type", "value": "None"}, {"name": "sql_sentence", "value": "None"}, {"name": "update_key", "value": "None"}], "start": 1691399017807, "stop": 1691399017907, "uuid": "a72ab66a-e601-438e-8f94-6bfa578cd4df", "historyId": "f368301ce537f1bbd596e0d19f24f393", "testCaseId": "0abeaba8f176b6785a0334bed7c1bdad", "fullName": "test_bpm.TestBPM#test_bpm", "labels": [{"name": "feature", "value": "认证接口"}, {"name": "story", "value": "刷新token"}, {"name": "severity", "value": "中"}, {"name": "epic", "value": "BPM系统"}, {"name": "suite", "value": "test_bpm"}, {"name": "subSuite", "value": "TestBPM"}, {"name": "host", "value": "LAPTOP-31V3JBFR"}, {"name": "thread", "value": "6412-MainThread"}, {"name": "framework", "value": "pytest"}, {"name": "language", "value": "cpython3"}, {"name": "package", "value": "test_bpm"}]}
\ No newline at end of file
{"name": "反向用例-用户名错误", "status": "passed", "attachments": [{"name": "log", "source": "31a45608-d173-46a1-875d-008f90f5eca5-attachment.txt", "type": "text/plain"}, {"name": "stdout", "source": "fbdcdb56-8cd3-4ca5-982f-c4689b5ce00c-attachment.txt", "type": "text/plain"}], "parameters": [{"name": "module", "value": "'认证接口'"}, {"name": "interface", "value": "'登录系统'"}, {"name": "title", "value": "'反向用例-用户名错误'"}, {"name": "level", "value": "'中'"}, {"name": "method", "value": "'POST'"}, {"name": "url", "value": "'http://120.46.172.186:8080/auth'"}, {"name": "mime", "value": "'json'"}, {"name": "data", "value": "{'password': 'MTIzNDU2', 'username': 'tomcat'}"}, {"name": "expect", "value": "{'state': False, 'message': '账号或密码错误'}"}, {"name": "sql_type", "value": "None"}, {"name": "sql_sentence", "value": "None"}, {"name": "update_key", "value": "None"}], "start": 1691399017270, "stop": 1691399017363, "uuid": "0c1a3536-afbf-43c1-bb8b-a5dc59188d23", "historyId": "0bc244764898381335e19a8275f4cc75", "testCaseId": "0abeaba8f176b6785a0334bed7c1bdad", "fullName": "test_bpm.TestBPM#test_bpm", "labels": [{"name": "feature", "value": "认证接口"}, {"name": "story", "value": "登录系统"}, {"name": "severity", "value": "中"}, {"name": "epic", "value": "BPM系统"}, {"name": "suite", "value": "test_bpm"}, {"name": "subSuite", "value": "TestBPM"}, {"name": "host", "value": "LAPTOP-31V3JBFR"}, {"name": "thread", "value": "6412-MainThread"}, {"name": "framework", "value": "pytest"}, {"name": "language", "value": "cpython3"}, {"name": "package", "value": "test_bpm"}]}
\ No newline at end of file
{"uuid": "7488f4ae-802e-47b3-b0fa-cae163277db3", "befores": [{"name": "mime", "status": "passed", "start": 1691399021306, "stop": 1691399021306}], "start": 1691399021306, "stop": 1691399021376}
\ No newline at end of file
DEBUG--2023-08-07 17:03:44--http://120.46.172.186:8080 "DELETE /api/demension/v1/dem/deleteDemByIds?ids=1688475997541777408 HTTP/1.1" 200 None
ERROR--2023-08-07 17:03:44--断言失败, 模块名称为:维度管理,接口名称为:根据维度编码删除维度,用例标题:正向用例,用例为:{'ids': '1688475997541777408'},期望结果为:{'state': True, 'message': '删除维度成功'},服务器返回数据为:{"state":true,"message":"删除维度成功!","value":""}
\ No newline at end of file
{"uuid": "892231a3-d743-477e-b523-b96e6ab7042f", "befores": [{"name": "mime", "status": "passed", "start": 1691399019101, "stop": 1691399019102}], "start": 1691399019101, "stop": 1691399019169}
\ No newline at end of file
{"uuid": "a26a03f0-eea3-44b1-8489-3da1ee17f576", "befores": [{"name": "url", "status": "passed", "start": 1691399024064, "stop": 1691399024064}], "start": 1691399024064, "stop": 1691399024179}
\ No newline at end of file
DEBUG--2023-08-07 17:03:44--http://120.46.172.186:8080 "DELETE /api/demension/v1/dem/deleteDemByIds?ids=1688475997541777408 HTTP/1.1" 200 None
ERROR--2023-08-07 17:03:44--断言失败, 模块名称为:维度管理,接口名称为:根据维度编码删除维度,用例标题:正向用例,用例为:{'ids': '1688475997541777408'},期望结果为:{'state': True, 'message': '删除维度成功'},服务器返回数据为:{"state":true,"message":"删除维度成功!","value":""}
DEBUG--2023-08-07 17:03:45--http://120.46.172.186:8080 "DELETE /api/demension/v1/dem/deleteDemByIds?ids=1688475997541777408 HTTP/1.1" 500 None
ERROR--2023-08-07 17:03:45--断言失败, 模块名称为:维度管理,接口名称为:根据维度编码删除维度,用例标题:正向用例,用例为:{'ids': '1688475997541777408'},期望结果为:{'state': True, 'message': '删除维度成功'},服务器返回数据为:{"state":false,"message":"","logId":"1688476004198137856"}
DEBUG--2023-08-07 17:03:46--Resetting dropped connection: 120.46.172.186
DEBUG--2023-08-07 17:03:46--http://120.46.172.186:8080 "DELETE /api/demension/v1/dem/deleteDemByIds?ids=1688475997541777408 HTTP/1.1" 500 None
ERROR--2023-08-07 17:03:46--断言失败, 模块名称为:维度管理,接口名称为:根据维度编码删除维度,用例标题:正向用例,用例为:{'ids': '1688475997541777408'},期望结果为:{'state': True, 'message': '删除维度成功'},服务器返回数据为:{"state":false,"message":"","logId":"1688476009176776704"}
\ No newline at end of file
{"uuid": "95581f73-686f-4ef0-9df3-93fef1aebd40", "befores": [{"name": "module", "status": "passed", "start": 1691399017588, "stop": 1691399017588}], "start": 1691399017588, "stop": 1691399017694}
\ No newline at end of file
{"uuid": "ccaac024-e734-4863-8551-b0c3ff7d28be", "befores": [{"name": "title", "status": "passed", "start": 1691399017043, "stop": 1691399017043}], "start": 1691399017043, "stop": 1691399017149}
\ No newline at end of file
{"uuid": "d1d67db0-fd1b-43eb-8a4c-efa75e5fd7ba", "befores": [{"name": "sql_sentence", "status": "passed", "start": 1691399023475, "stop": 1691399023475}], "start": 1691399023475, "stop": 1691399023549}
\ No newline at end of file
{"uuid": "bee14252-d4d3-48c1-9b25-2230e4f75a00", "befores": [{"name": "data", "status": "passed", "start": 1691399016871, "stop": 1691399016871}], "start": 1691399016871, "stop": 1691399016929}
\ No newline at end of file
{"uuid": "34368a18-fa51-468f-a417-d0c90e565044", "befores": [{"name": "expect", "status": "passed", "start": 1691399016790, "stop": 1691399016790}], "start": 1691399016790, "stop": 1691399016850}
\ No newline at end of file
{"uuid": "ce46ba3e-426a-4f14-bd91-5c13c2ffffea", "befores": [{"name": "sql_type", "status": "passed", "start": 1691399026336, "stop": 1691399026336}], "start": 1691399026336, "stop": 1691399026478}
\ No newline at end of file
{"uuid": "4b6daef4-2770-4e58-8674-26c42f9af17d", "befores": [{"name": "update_key", "status": "passed", "start": 1691399023909, "stop": 1691399023909}], "start": 1691399023909, "stop": 1691399023983}
\ No newline at end of file
{"uuid": "32f395eb-24ee-43da-a134-494a6d4fa3ea", "befores": [{"name": "method", "status": "passed", "start": 1691399017043, "stop": 1691399017043}], "start": 1691399017043, "stop": 1691399017148}
\ No newline at end of file
{"uuid": "7c0cc328-4589-4b6a-bfea-9bdf22e7f0b1", "befores": [{"name": "level", "status": "passed", "start": 1691399023992, "stop": 1691399023992}], "start": 1691399023992, "stop": 1691399024058}
\ No newline at end of file
{"uuid": "e252f216-3ae2-4b22-a4b1-26f8d70faf22", "befores": [{"name": "mime", "status": "passed", "start": 1691399028670, "stop": 1691399028670}], "start": 1691399028670, "stop": 1691399028816}
\ No newline at end of file
{"uuid": "43650302-1915-42e3-b2f1-e30c9f63273b", "befores": [{"name": "method", "status": "passed", "start": 1691399024064, "stop": 1691399024064}], "start": 1691399024064, "stop": 1691399024179}
\ No newline at end of file
{"uuid": "f4b8a340-a6d6-4253-9904-ba6887b89c94", "befores": [{"name": "sql_type", "status": "passed", "start": 1691399022389, "stop": 1691399022389}], "start": 1691399022389, "stop": 1691399022452}
\ No newline at end of file
{"uuid": "2357b06d-6042-47b5-9bb6-d4d29d22a6e0", "befores": [{"name": "update_key", "status": "passed", "start": 1691399016938, "stop": 1691399016938}], "start": 1691399016938, "stop": 1691399017031}
\ No newline at end of file
{"uuid": "b7c45575-dae6-4827-9048-ebee20d3a5a1", "befores": [{"name": "data", "status": "passed", "start": 1691399017269, "stop": 1691399017269}], "start": 1691399017269, "stop": 1691399017366}
\ No newline at end of file
{"uuid": "d4583708-4f25-442b-9282-33d55633a6e9", "befores": [{"name": "method", "status": "passed", "start": 1691399017806, "stop": 1691399017806}], "start": 1691399017806, "stop": 1691399018084}
\ No newline at end of file
{"uuid": "d59851a8-8c30-4c33-bf18-4fb2d6028246", "befores": [{"name": "sql_type", "status": "passed", "start": 1691399017269, "stop": 1691399017269}], "start": 1691399017269, "stop": 1691399017366}
\ No newline at end of file
{"uuid": "03fa4c3c-0803-4662-9cf5-3cc4cf4a4609", "befores": [{"name": "expect", "status": "passed", "start": 1691399023717, "stop": 1691399023717}], "start": 1691399023717, "stop": 1691399023900}
\ No newline at end of file
{"uuid": "a1663607-85e9-45fc-a6c0-013817565d82", "befores": [{"name": "update_key", "status": "passed", "start": 1691399019102, "stop": 1691399019102}], "start": 1691399019102, "stop": 1691399019166}
\ No newline at end of file
{"uuid": "fcbcfa33-3333-4bc4-9de4-c055e96f0c7f", "befores": [{"name": "url", "status": "passed", "start": 1691399017806, "stop": 1691399017806}], "start": 1691399017806, "stop": 1691399018084}
\ No newline at end of file
DEBUG--2023-08-07 17:03:37--Resetting dropped connection: 120.46.172.186
DEBUG--2023-08-07 17:03:37--http://120.46.172.186:8080 "POST /auth HTTP/1.1" 500 None
\ No newline at end of file
DEBUG--2023-08-07 17:03:43--http://120.46.172.186:8080 "POST /api/org/v1/orgParam/saveOrgParams?orgCode=test56_org HTTP/1.1" 200 None
\ No newline at end of file
{"uuid": "45688519-deec-4dda-8138-f5c328dec4b1", "befores": [{"name": "update_key", "status": "passed", "start": 1691399017155, "stop": 1691399017155}], "start": 1691399017155, "stop": 1691399017255}
\ No newline at end of file
{"name": "正向用例", "status": "failed", "statusDetails": {"message": "AssertionError: 断言失败", "trace": "self = <InterfaceAutoTest.test_case.test_bpm.TestBPM object at 0x00000257902F01C0>\nreq_fix = <InterfaceAutoTest.requests_method.requests_method.RequestsMethod object at 0x00000257902F0490>\ndb_fix = <InterfaceAutoTest.common.db.DB object at 0x00000257903D93D0>, module = '维度管理', interface = '根据维度编码删除维度', title = '正向用例'\nlevel = '高', method = 'DELETE', url = 'http://120.46.172.186:8080/api/demension/v1/dem/deleteDemByIds', mime = 'query'\ndata = {'ids': '1688475997541777408'}, expect = {'message': '删除维度成功', 'state': True}, sql_type = 'select'\nsql_sentence = 'SELECT ID_ FROM uc_demension WHERE `CODE_`=\"test56_dem\";', update_key = 'ids'\n\n @allure.epic(\"BPM系统\")\n @pytest.mark.parametrize(\"module, interface, title, level, method, url, mime, data, expect, sql_type, sql_sentence, update_key\", ReadExcel().get_data())\n def test_bpm(self, req_fix, db_fix, module, interface, title, level, method, url, mime, data, expect, sql_type, sql_sentence, update_key):\n allure.dynamic.feature(module)\n allure.dynamic.story(interface)\n allure.dynamic.title(title)\n allure.dynamic.severity(level)\n \n # 1.1:判断sql语句的类型是否为delete\n if sql_type == \"delete\":\n # 1.2 使用DB类对象,调用delete方法执行删除的sql语句\n db_fix.delete(sql_sentence)\n # # 1.3 使用RequestsMethod类对象调用request_all方法发送请求\n # result = req_fix.request_all(req_method=method, req_url=url, req_mime=mime, case_data=data)\n \n # 2.1 判断sql语句的类型是否为select\n elif sql_type == \"select\":\n # 2.2 使用DB类对象,调用select方法执行查询的sql语句,并接收查询结果\n select_result = db_fix.select(sql_sentence)\n # 2.3 将查询结果更新到用例数据中\n data[update_key] = select_result\n # # 2.3 使用RequestsMethod类对象调用request_all方法发送请求\n # result = req_fix.request_all(req_method=method, req_url=url, req_mime=mime, case_data=data)\n \n # 3.1 判断sql语句的类型是否delete|select或者为select|delete\n elif sql_type == \"delete|select\" or sql_type == \"select|delete\":\n # 3.2 使用DB类对象,调用delete方法执行删除的sql语句\n db_fix.delete(sql_sentence[\"delete\"])\n # 3.3 使用DB类对象,调用select方法执行查询的sql语句,并接收查询结果\n select_result = db_fix.select(sql_sentence[\"select\"])\n # 3.4 将查询结果更新到用例数据中\n data[update_key] = select_result\n # # 3.5 使用RequestsMethod类对象调用request_all方法发送请求\n # result = req_fix.request_all(req_method=method, req_url=url, req_mime=mime, case_data=data)\n #\n # else:\n # result = req_fix.request_all(req_method=method, req_url=url, req_mime=mime, case_data=data)\n \n result = req_fix.request_all(req_method=method, req_url=url, req_mime=mime, case_data=data)\n \n # 断言\n try:\n for key in expect:\n> assert expect[key] == result.json().get(key)\nE AssertionError: assert True == False\nE + where False = <built-in method get of dict object at 0x0000025790486600>('state')\nE + where <built-in method get of dict object at 0x0000025790486600> = {'logId': '1688476014071529472', 'message': '', 'state': False}.get\nE + where {'logId': '1688476014071529472', 'message': '', 'state': False} = <bound method Response.json of <Response [500]>>()\nE + where <bound method Response.json of <Response [500]>> = <Response [500]>.json\n\ntest_bpm.py:61: AssertionError\n\nDuring handling of the above exception, another exception occurred:\n\nself = <InterfaceAutoTest.test_case.test_bpm.TestBPM object at 0x00000257902F01C0>\nreq_fix = <InterfaceAutoTest.requests_method.requests_method.RequestsMethod object at 0x00000257902F0490>\ndb_fix = <InterfaceAutoTest.common.db.DB object at 0x00000257903D93D0>, module = '维度管理', interface = '根据维度编码删除维度', title = '正向用例'\nlevel = '高', method = 'DELETE', url = 'http://120.46.172.186:8080/api/demension/v1/dem/deleteDemByIds', mime = 'query'\ndata = {'ids': '1688475997541777408'}, expect = {'message': '删除维度成功', 'state': True}, sql_type = 'select'\nsql_sentence = 'SELECT ID_ FROM uc_demension WHERE `CODE_`=\"test56_dem\";', update_key = 'ids'\n\n @allure.epic(\"BPM系统\")\n @pytest.mark.parametrize(\"module, interface, title, level, method, url, mime, data, expect, sql_type, sql_sentence, update_key\", ReadExcel().get_data())\n def test_bpm(self, req_fix, db_fix, module, interface, title, level, method, url, mime, data, expect, sql_type, sql_sentence, update_key):\n allure.dynamic.feature(module)\n allure.dynamic.story(interface)\n allure.dynamic.title(title)\n allure.dynamic.severity(level)\n \n # 1.1:判断sql语句的类型是否为delete\n if sql_type == \"delete\":\n # 1.2 使用DB类对象,调用delete方法执行删除的sql语句\n db_fix.delete(sql_sentence)\n # # 1.3 使用RequestsMethod类对象调用request_all方法发送请求\n # result = req_fix.request_all(req_method=method, req_url=url, req_mime=mime, case_data=data)\n \n # 2.1 判断sql语句的类型是否为select\n elif sql_type == \"select\":\n # 2.2 使用DB类对象,调用select方法执行查询的sql语句,并接收查询结果\n select_result = db_fix.select(sql_sentence)\n # 2.3 将查询结果更新到用例数据中\n data[update_key] = select_result\n # # 2.3 使用RequestsMethod类对象调用request_all方法发送请求\n # result = req_fix.request_all(req_method=method, req_url=url, req_mime=mime, case_data=data)\n \n # 3.1 判断sql语句的类型是否delete|select或者为select|delete\n elif sql_type == \"delete|select\" or sql_type == \"select|delete\":\n # 3.2 使用DB类对象,调用delete方法执行删除的sql语句\n db_fix.delete(sql_sentence[\"delete\"])\n # 3.3 使用DB类对象,调用select方法执行查询的sql语句,并接收查询结果\n select_result = db_fix.select(sql_sentence[\"select\"])\n # 3.4 将查询结果更新到用例数据中\n data[update_key] = select_result\n # # 3.5 使用RequestsMethod类对象调用request_all方法发送请求\n # result = req_fix.request_all(req_method=method, req_url=url, req_mime=mime, case_data=data)\n #\n # else:\n # result = req_fix.request_all(req_method=method, req_url=url, req_mime=mime, case_data=data)\n \n result = req_fix.request_all(req_method=method, req_url=url, req_mime=mime, case_data=data)\n \n # 断言\n try:\n for key in expect:\n assert expect[key] == result.json().get(key)\n except:\n print(\"断言失败\")\n logging.error(\"断言失败, 模块名称为:{},接口名称为:{},用例标题:{},用例为:{},期望结果为:{},服务器返回数据为:{}\".format(module, interface, title, str(data), str(expect), result.text))\n> raise AssertionError(\"断言失败\")\nE AssertionError: 断言失败\n\ntest_bpm.py:65: AssertionError"}, "attachments": [{"name": "log", "source": "45f0a347-e463-479c-92f7-d372a734cba3-attachment.txt", "type": "text/plain"}, {"name": "stdout", "source": "97d18df6-5c6a-4b00-b4a4-9f32edf81831-attachment.txt", "type": "text/plain"}], "parameters": [{"name": "module", "value": "'维度管理'"}, {"name": "interface", "value": "'根据维度编码删除维度'"}, {"name": "title", "value": "'正向用例'"}, {"name": "level", "value": "'高'"}, {"name": "method", "value": "'DELETE'"}, {"name": "url", "value": "'http://120.46.172.186:8080/api/demension/v1/dem/deleteDemByIds'"}, {"name": "mime", "value": "'query'"}, {"name": "data", "value": "{'ids': '1688475997541777408'}"}, {"name": "expect", "value": "{'state': True, 'message': '删除维度成功'}"}, {"name": "sql_type", "value": "'select'"}, {"name": "sql_sentence", "value": "'SELECT ID_ FROM uc_demension WHERE `CODE_`=\"test56_dem\";'"}, {"name": "update_key", "value": "'ids'"}], "start": 1691399027504, "stop": 1691399027636, "uuid": "450068c0-41cc-4275-ab84-9c8d779354b9", "historyId": "f37f5b35a33b0d851ad30e5c966f4068", "testCaseId": "0abeaba8f176b6785a0334bed7c1bdad", "fullName": "test_bpm.TestBPM#test_bpm", "labels": [{"name": "feature", "value": "维度管理"}, {"name": "story", "value": "根据维度编码删除维度"}, {"name": "severity", "value": "高"}, {"name": "epic", "value": "BPM系统"}, {"name": "suite", "value": "test_bpm"}, {"name": "subSuite", "value": "TestBPM"}, {"name": "host", "value": "LAPTOP-31V3JBFR"}, {"name": "thread", "value": "6412-MainThread"}, {"name": "framework", "value": "pytest"}, {"name": "language", "value": "cpython3"}, {"name": "package", "value": "test_bpm"}]}
\ No newline at end of file
{"uuid": "32bc031e-ebb7-4448-a943-3d9ab676d7ee", "befores": [{"name": "data", "status": "passed", "start": 1691399023475, "stop": 1691399023475}], "start": 1691399023475, "stop": 1691399023551}
\ No newline at end of file
{"uuid": "2c678f50-919e-4097-acfb-02047bccfe09", "befores": [{"name": "sql_sentence", "status": "passed", "start": 1691399023993, "stop": 1691399023993}], "start": 1691399023993, "stop": 1691399024054}
\ No newline at end of file
{"uuid": "23abbead-c1eb-49b4-aabf-bf5460eef479", "befores": [{"name": "data", "status": "passed", "start": 1691399023717, "stop": 1691399023717}], "start": 1691399023717, "stop": 1691399023901}
\ No newline at end of file
{"uuid": "c8b21b97-dba6-462b-8c68-0dbd0c49da70", "befores": [{"name": "url", "status": "passed", "start": 1691399017699, "stop": 1691399017699}], "start": 1691399017699, "stop": 1691399017798}
\ No newline at end of file
{"uuid": "626c9d28-b6df-4642-9807-8ee09c8c4a71", "befores": [{"name": "url", "status": "passed", "start": 1691399019101, "stop": 1691399019101}], "start": 1691399019101, "stop": 1691399019169}
\ No newline at end of file
{"uuid": "74dd86cb-8a3e-4254-a345-cf572f11627e", "befores": [{"name": "url", "status": "passed", "start": 1691399026336, "stop": 1691399026336}], "start": 1691399026336, "stop": 1691399026480}
\ No newline at end of file
{"uuid": "005a4528-b512-4226-a613-b911a2b86775", "befores": [{"name": "interface", "status": "passed", "start": 1691399026335, "stop": 1691399026335}], "start": 1691399026335, "stop": 1691399026483}
\ No newline at end of file
{"uuid": "9463a1f2-bcc8-4ff0-83eb-de4bfa20343a", "befores": [{"name": "sql_type", "status": "passed", "start": 1691399017699, "stop": 1691399017699}], "start": 1691399017699, "stop": 1691399017796}
\ No newline at end of file
{"uuid": "05540c75-a8e4-4f8d-901e-a6168fb9e95a", "befores": [{"name": "update_key", "status": "passed", "start": 1691399024065, "stop": 1691399024065}], "start": 1691399024065, "stop": 1691399024175}
\ No newline at end of file
{"uuid": "9db16a78-517c-4183-bd65-e424fdba86d8", "befores": [{"name": "mime", "status": "passed", "start": 1691399027504, "stop": 1691399027504}], "start": 1691399027504, "stop": 1691399027655}
\ No newline at end of file
{"uuid": "8441a5c2-46df-4368-bd93-ecb55cf7f1c4", "befores": [{"name": "mime", "status": "passed", "start": 1691399024064, "stop": 1691399024064}], "start": 1691399024064, "stop": 1691399024178}
\ No newline at end of file
{"uuid": "1097480a-2574-4aa6-8efe-e7188f65d208", "befores": [{"name": "sql_sentence", "status": "passed", "start": 1691399029837, "stop": 1691399029837}], "start": 1691399029837, "stop": 1691399029980}
\ No newline at end of file
{"uuid": "4aa4de45-e283-4b02-a2e4-3d2a4faad44a", "befores": [{"name": "method", "status": "passed", "start": 1691399023559, "stop": 1691399023559}], "start": 1691399023559, "stop": 1691399023707}
\ No newline at end of file
{"uuid": "c4e14f88-9cb5-4ca7-aec3-2f5a896116f2", "befores": [{"name": "sql_sentence", "status": "passed", "start": 1691399017155, "stop": 1691399017155}], "start": 1691399017155, "stop": 1691399017256}
\ No newline at end of file
{"uuid": "b0309349-d010-4442-91b3-61871d674531", "befores": [{"name": "sql_sentence", "status": "passed", "start": 1691399016790, "stop": 1691399016790}], "start": 1691399016790, "stop": 1691399016849}
\ No newline at end of file
{"uuid": "50c5ef26-3109-4e4c-9fef-4da39e6d5e28", "befores": [{"name": "expect", "status": "passed", "start": 1691399021306, "stop": 1691399021306}], "start": 1691399021306, "stop": 1691399021375}
\ No newline at end of file
DEBUG--2023-08-07 17:03:36--Resetting dropped connection: 120.46.172.186
DEBUG--2023-08-07 17:03:37--http://120.46.172.186:8080 "POST /auth HTTP/1.1" 500 None
\ No newline at end of file
{"uuid": "0115d3e3-e167-42c9-a365-26be0449e116", "befores": [{"name": "update_key", "status": "passed", "start": 1691399023475, "stop": 1691399023475}], "start": 1691399023475, "stop": 1691399023539}
\ No newline at end of file
{"uuid": "3023c1fc-3af3-4b76-b9d0-e88f2002939a", "befores": [{"name": "method", "status": "passed", "start": 1691399026336, "stop": 1691399026336}], "start": 1691399026336, "stop": 1691399026482}
\ No newline at end of file
{"uuid": "0f3f32d5-aa71-4c77-8115-c0b21863d775", "children": ["5783b43e-e54b-4660-adfe-2079911bd915", "7ddb01fc-6c54-4a09-b494-95564a55fde4", "963e5976-d7e0-4af0-9e7a-5ae341b84b3b", "e6fa6f52-6621-4392-a26f-d322709886a9", "75ea1d5d-84d6-4761-bf9b-2df77f0984b2", "0c1a3536-afbf-43c1-bb8b-a5dc59188d23", "5a29fcea-3685-4c85-8d5a-a16599622308", "52024e49-fb81-4dd6-9841-9b0d6d682a76", "5f099801-3b79-4f3c-8804-448e7f026b17", "6eb477af-a35a-4e36-b6ad-9f8959100781", "a72ab66a-e601-438e-8f94-6bfa578cd4df", "fdb731ac-01a3-4051-9403-de6edeb3914f", "49c770ae-ea71-47bf-92e5-b36ca8bf3830", "00a9f16b-f9dc-4d6f-a4fb-c691d83e165b", "fdc69955-1b96-4a9a-a8e9-22bc1edcc13b", "45f212f5-f272-4eb1-b69d-45a966faa567", "f1093db1-23cd-4e4d-90d7-4a7765da3e6c", "f6d1231c-c1da-4a32-905b-cef5ec7c5f09", "0bab2203-77fb-4b87-8152-b8a52b3890d2", "cf620890-3260-459b-a1c2-c3dd2751a90b", "8edf008a-61fa-4527-8826-32436fa6095e", "3cb9afc3-7898-4d5e-a032-6bbf64f87e1c", "13282a84-553b-4953-bcbb-837a60003d28", "450068c0-41cc-4275-ab84-9c8d779354b9", "3cb15ddf-a24f-4b89-83d1-24078763326d", "8f27cff9-e779-4c79-b2d6-3d20ce5946f2"], "befores": [{"name": "db_fix", "status": "passed", "start": 1691399016584, "stop": 1691399016789}], "afters": [{"name": "db_fix::0", "status": "passed", "start": 1691399029987, "stop": 1691399029987}], "start": 1691399016584, "stop": 1691399029987}
\ No newline at end of file
{"name": "反向用例-密码为长", "status": "passed", "attachments": [{"name": "log", "source": "4225f019-43f7-44de-90da-41eab9f378b8-attachment.txt", "type": "text/plain"}, {"name": "stdout", "source": "e9f36eb8-3f64-4d6a-bc2f-bbfffd6b16ec-attachment.txt", "type": "text/plain"}], "parameters": [{"name": "module", "value": "'认证接口'"}, {"name": "interface", "value": "'登录系统'"}, {"name": "title", "value": "'反向用例-密码为长'"}, {"name": "level", "value": "'中'"}, {"name": "method", "value": "'POST'"}, {"name": "url", "value": "'http://120.46.172.186:8080/auth'"}, {"name": "mime", "value": "'application/json'"}, {"name": "data", "value": "{'password': 'MTIzNDU2MTIzNDU2MTIzNDU2MTIzNDU2MTIzNDU2MTIzNDU2', 'username': 'admin'}"}, {"name": "expect", "value": "{'state': False, 'message': '账号或密码错误'}"}, {"name": "sql_type", "value": "None"}, {"name": "sql_sentence", "value": "None"}, {"name": "update_key", "value": "None"}], "start": 1691399017479, "stop": 1691399017576, "uuid": "52024e49-fb81-4dd6-9841-9b0d6d682a76", "historyId": "1583d8257c325d21eabb5675af66c678", "testCaseId": "0abeaba8f176b6785a0334bed7c1bdad", "fullName": "test_bpm.TestBPM#test_bpm", "labels": [{"name": "feature", "value": "认证接口"}, {"name": "story", "value": "登录系统"}, {"name": "severity", "value": "中"}, {"name": "epic", "value": "BPM系统"}, {"name": "suite", "value": "test_bpm"}, {"name": "subSuite", "value": "TestBPM"}, {"name": "host", "value": "LAPTOP-31V3JBFR"}, {"name": "thread", "value": "6412-MainThread"}, {"name": "framework", "value": "pytest"}, {"name": "language", "value": "cpython3"}, {"name": "package", "value": "test_bpm"}]}
\ No newline at end of file
{"uuid": "8e072c7e-5c16-49c8-b817-eb3a1fa26129", "befores": [{"name": "level", "status": "passed", "start": 1691399016871, "stop": 1691399016871}], "start": 1691399016871, "stop": 1691399016931}
\ No newline at end of file
{"uuid": "7cf2b3d0-a6e9-4853-bd90-5f16f1920454", "befores": [{"name": "url", "status": "passed", "start": 1691399016871, "stop": 1691399016871}], "start": 1691399016871, "stop": 1691399016929}
\ No newline at end of file
{"uuid": "69caf2bf-6952-449c-94bc-71f8079c4efb", "befores": [{"name": "level", "status": "passed", "start": 1691399025190, "stop": 1691399025190}], "start": 1691399025190, "stop": 1691399025310}
\ No newline at end of file
{"uuid": "548baf7d-0ae2-483c-889f-50ea9b2edf86", "befores": [{"name": "interface", "status": "passed", "start": 1691399023715, "stop": 1691399023715}], "start": 1691399023715, "stop": 1691399023903}
\ No newline at end of file
{"uuid": "8b26fc3d-7de4-4fbd-8fb6-9d4f1296e341", "befores": [{"name": "data", "status": "passed", "start": 1691399017155, "stop": 1691399017155}], "start": 1691399017155, "stop": 1691399017260}
\ No newline at end of file
{"uuid": "df57c84f-226d-410c-a547-1c46132a7df0", "befores": [{"name": "update_key", "status": "passed", "start": 1691399017374, "stop": 1691399017374}], "start": 1691399017374, "stop": 1691399017467}
\ No newline at end of file
{"uuid": "51a5d2d1-2dfc-4dd4-a935-763c630a2243", "befores": [{"name": "module", "status": "passed", "start": 1691399023475, "stop": 1691399023475}], "start": 1691399023475, "stop": 1691399023554}
\ No newline at end of file
{"name": "反向用例-用户名过长", "status": "passed", "attachments": [{"name": "log", "source": "91bfa8a4-6536-4998-9d77-da59a62b7614-attachment.txt", "type": "text/plain"}, {"name": "stdout", "source": "c05a6569-f975-4e08-aa19-fc57df154d5a-attachment.txt", "type": "text/plain"}], "parameters": [{"name": "module", "value": "'认证接口'"}, {"name": "interface", "value": "'登录系统'"}, {"name": "title", "value": "'反向用例-用户名过长'"}, {"name": "level", "value": "'中'"}, {"name": "method", "value": "'POST'"}, {"name": "url", "value": "'http://120.46.172.186:8080/auth'"}, {"name": "mime", "value": "'application/json'"}, {"name": "data", "value": "{'password': 'MTIzNDU2', 'username': 'adminadminadminadminadminadminadminadminadmin'}"}, {"name": "expect", "value": "{'state': False, 'message': '账号或密码错误'}"}, {"name": "sql_type", "value": "None"}, {"name": "sql_sentence", "value": "None"}, {"name": "update_key", "value": "None"}], "start": 1691399016938, "stop": 1691399017031, "uuid": "963e5976-d7e0-4af0-9e7a-5ae341b84b3b", "historyId": "db7f8347492d126be5aa0bc4cf128a49", "testCaseId": "0abeaba8f176b6785a0334bed7c1bdad", "fullName": "test_bpm.TestBPM#test_bpm", "labels": [{"name": "feature", "value": "认证接口"}, {"name": "story", "value": "登录系统"}, {"name": "severity", "value": "中"}, {"name": "epic", "value": "BPM系统"}, {"name": "suite", "value": "test_bpm"}, {"name": "subSuite", "value": "TestBPM"}, {"name": "host", "value": "LAPTOP-31V3JBFR"}, {"name": "thread", "value": "6412-MainThread"}, {"name": "framework", "value": "pytest"}, {"name": "language", "value": "cpython3"}, {"name": "package", "value": "test_bpm"}]}
\ No newline at end of file
{"uuid": "45896891-caa5-4836-a677-9d8028977725", "befores": [{"name": "method", "status": "passed", "start": 1691399025190, "stop": 1691399025190}], "start": 1691399025190, "stop": 1691399025310}
\ No newline at end of file
{"name": "反向用例-用户名特殊字符", "status": "passed", "attachments": [{"name": "log", "source": "836258de-49c7-40f5-811c-97cf36ff73ea-attachment.txt", "type": "text/plain"}, {"name": "stdout", "source": "8b01b3ab-3c0d-40f8-9f77-a7a814f13a03-attachment.txt", "type": "text/plain"}], "parameters": [{"name": "module", "value": "'认证接口'"}, {"name": "interface", "value": "'登录系统'"}, {"name": "title", "value": "'反向用例-用户名特殊字符'"}, {"name": "level", "value": "'中'"}, {"name": "method", "value": "'POST'"}, {"name": "url", "value": "'http://120.46.172.186:8080/auth'"}, {"name": "mime", "value": "'application/json'"}, {"name": "data", "value": "{'password': 'MTIzNDU2', 'username': '▬♦◊◦☼♠♣'}"}, {"name": "expect", "value": "{'state': False, 'message': '账号或密码错误'}"}, {"name": "sql_type", "value": "None"}, {"name": "sql_sentence", "value": "None"}, {"name": "update_key", "value": "None"}], "start": 1691399017156, "stop": 1691399017255, "uuid": "75ea1d5d-84d6-4761-bf9b-2df77f0984b2", "historyId": "a0502452da70d924dbdea3f536ad8015", "testCaseId": "0abeaba8f176b6785a0334bed7c1bdad", "fullName": "test_bpm.TestBPM#test_bpm", "labels": [{"name": "feature", "value": "认证接口"}, {"name": "story", "value": "登录系统"}, {"name": "severity", "value": "中"}, {"name": "epic", "value": "BPM系统"}, {"name": "suite", "value": "test_bpm"}, {"name": "subSuite", "value": "TestBPM"}, {"name": "host", "value": "LAPTOP-31V3JBFR"}, {"name": "thread", "value": "6412-MainThread"}, {"name": "framework", "value": "pytest"}, {"name": "language", "value": "cpython3"}, {"name": "package", "value": "test_bpm"}]}
\ No newline at end of file
{"uuid": "f8bcf144-c188-470c-862b-318bfd4ca6e8", "befores": [{"name": "expect", "status": "passed", "start": 1691399017699, "stop": 1691399017699}], "start": 1691399017699, "stop": 1691399017797}
\ No newline at end of file
{"uuid": "1d398d32-f1a8-46aa-a62b-ddb8bf53e39b", "befores": [{"name": "title", "status": "passed", "start": 1691399023475, "stop": 1691399023475}], "start": 1691399023475, "stop": 1691399023553}
\ No newline at end of file
{"uuid": "ed65badb-8aeb-4eb9-a32f-e8a160ce7c98", "befores": [{"name": "method", "status": "passed", "start": 1691399020197, "stop": 1691399020197}], "start": 1691399020197, "stop": 1691399020276}
\ No newline at end of file
{"uuid": "236d6147-8371-4d07-aaa8-40b84463e223", "befores": [{"name": "expect", "status": "passed", "start": 1691399017589, "stop": 1691399017589}], "start": 1691399017589, "stop": 1691399017690}
\ No newline at end of file
{"uuid": "37c19db0-15a5-4227-845e-0b83c80a7969", "befores": [{"name": "data", "status": "passed", "start": 1691399017043, "stop": 1691399017043}], "start": 1691399017043, "stop": 1691399017146}
\ No newline at end of file
{"uuid": "876da7f3-8bfb-4927-8592-63d132b79d1e", "befores": [{"name": "expect", "status": "passed", "start": 1691399023909, "stop": 1691399023909}], "start": 1691399023909, "stop": 1691399023985}
\ No newline at end of file
{"uuid": "aed180ae-5340-4e93-95a4-78168afd9bc1", "befores": [{"name": "data", "status": "passed", "start": 1691399022389, "stop": 1691399022389}], "start": 1691399022389, "stop": 1691399022453}
\ No newline at end of file
{"uuid": "43c3f8de-0d3d-48a6-92b5-16d540866204", "befores": [{"name": "level", "status": "passed", "start": 1691399022388, "stop": 1691399022388}], "start": 1691399022388, "stop": 1691399022454}
\ No newline at end of file
{"uuid": "e4ebdde8-b4e1-4e61-a4f0-f01c96bb5505", "befores": [{"name": "sql_sentence", "status": "passed", "start": 1691399027504, "stop": 1691399027504}], "start": 1691399027504, "stop": 1691399027653}
\ No newline at end of file
{"uuid": "0aa2c9d4-aee5-4e63-8baf-59c0e1d50d8f", "befores": [{"name": "sql_type", "status": "passed", "start": 1691399029837, "stop": 1691399029837}], "start": 1691399029837, "stop": 1691399029980}
\ No newline at end of file
{"uuid": "3e14f047-5685-42fb-9ff6-05ac5d7f8a04", "befores": [{"name": "level", "status": "passed", "start": 1691399017269, "stop": 1691399017269}], "start": 1691399017269, "stop": 1691399017368}
\ No newline at end of file
{"uuid": "42b4e51f-c385-463f-b716-a6c364b4516b", "befores": [{"name": "expect", "status": "passed", "start": 1691399019102, "stop": 1691399019102}], "start": 1691399019102, "stop": 1691399019168}
\ No newline at end of file
{"uuid": "c7ca1785-a0de-499a-875e-112b1e6f1a3b", "befores": [{"name": "sql_sentence", "status": "passed", "start": 1691399017699, "stop": 1691399017699}], "start": 1691399017699, "stop": 1691399017796}
\ No newline at end of file
{"uuid": "83e3e7f3-7eca-4699-a896-dfe560827647", "befores": [{"name": "data", "status": "passed", "start": 1691399023992, "stop": 1691399023992}], "start": 1691399023992, "stop": 1691399024056}
\ No newline at end of file
DEBUG--2023-08-07 17:03:44--http://120.46.172.186:8080 "DELETE /api/demension/v1/dem/deleteDemByIds?ids=1688475997541777408 HTTP/1.1" 200 None
ERROR--2023-08-07 17:03:44--断言失败, 模块名称为:维度管理,接口名称为:根据维度编码删除维度,用例标题:正向用例,用例为:{'ids': '1688475997541777408'},期望结果为:{'state': True, 'message': '删除维度成功'},服务器返回数据为:{"state":true,"message":"删除维度成功!","value":""}
DEBUG--2023-08-07 17:03:45--http://120.46.172.186:8080 "DELETE /api/demension/v1/dem/deleteDemByIds?ids=1688475997541777408 HTTP/1.1" 500 None
ERROR--2023-08-07 17:03:45--断言失败, 模块名称为:维度管理,接口名称为:根据维度编码删除维度,用例标题:正向用例,用例为:{'ids': '1688475997541777408'},期望结果为:{'state': True, 'message': '删除维度成功'},服务器返回数据为:{"state":false,"message":"","logId":"1688476004198137856"}
DEBUG--2023-08-07 17:03:46--Resetting dropped connection: 120.46.172.186
DEBUG--2023-08-07 17:03:46--http://120.46.172.186:8080 "DELETE /api/demension/v1/dem/deleteDemByIds?ids=1688475997541777408 HTTP/1.1" 500 None
ERROR--2023-08-07 17:03:46--断言失败, 模块名称为:维度管理,接口名称为:根据维度编码删除维度,用例标题:正向用例,用例为:{'ids': '1688475997541777408'},期望结果为:{'state': True, 'message': '删除维度成功'},服务器返回数据为:{"state":false,"message":"","logId":"1688476009176776704"}
DEBUG--2023-08-07 17:03:47--Resetting dropped connection: 120.46.172.186
DEBUG--2023-08-07 17:03:47--http://120.46.172.186:8080 "DELETE /api/demension/v1/dem/deleteDemByIds?ids=1688475997541777408 HTTP/1.1" 500 None
ERROR--2023-08-07 17:03:47--断言失败, 模块名称为:维度管理,接口名称为:根据维度编码删除维度,用例标题:正向用例,用例为:{'ids': '1688475997541777408'},期望结果为:{'state': True, 'message': '删除维度成功'},服务器返回数据为:{"state":false,"message":"","logId":"1688476014071529472"}
DEBUG--2023-08-07 17:03:48--Resetting dropped connection: 120.46.172.186
DEBUG--2023-08-07 17:03:48--http://120.46.172.186:8080 "DELETE /api/demension/v1/dem/deleteDemByIds?ids=1688475997541777408 HTTP/1.1" 500 None
ERROR--2023-08-07 17:03:48--断言失败, 模块名称为:维度管理,接口名称为:根据维度编码删除维度,用例标题:正向用例,用例为:{'ids': '1688475997541777408'},期望结果为:{'state': True, 'message': '删除维度成功'},服务器返回数据为:{"state":false,"message":"","logId":"1688476018974670848"}
DEBUG--2023-08-07 17:03:49--Resetting dropped connection: 120.46.172.186
DEBUG--2023-08-07 17:03:49--http://120.46.172.186:8080 "DELETE /api/demension/v1/dem/deleteDemByIds?ids=1688475997541777408 HTTP/1.1" 500 None
ERROR--2023-08-07 17:03:49--断言失败, 模块名称为:维度管理,接口名称为:根据维度编码删除维度,用例标题:正向用例,用例为:{'ids': '1688475997541777408'},期望结果为:{'state': True, 'message': '删除维度成功'},服务器返回数据为:{"state":false,"message":"","logId":"1688476023861035008"}
\ No newline at end of file
{"uuid": "0114cd7c-ebd3-4299-a867-ca9165c0231c", "befores": [{"name": "level", "status": "passed", "start": 1691399023559, "stop": 1691399023559}], "start": 1691399023559, "stop": 1691399023707}
\ No newline at end of file
{"uuid": "84101480-2cb7-4a22-9c02-ae157d52507e", "befores": [{"name": "interface", "status": "passed", "start": 1691399023908, "stop": 1691399023908}], "start": 1691399023908, "stop": 1691399023987}
\ No newline at end of file
{"uuid": "674caabd-bc04-49f1-8dba-dc46ffa985b5", "befores": [{"name": "url", "status": "passed", "start": 1691399017478, "stop": 1691399017478}], "start": 1691399017478, "stop": 1691399017581}
\ No newline at end of file
{"uuid": "b3a38966-3dc8-454f-ae8a-fa0a49be877a", "befores": [{"name": "module", "status": "passed", "start": 1691399017374, "stop": 1691399017374}], "start": 1691399017374, "stop": 1691399017474}
\ No newline at end of file
{"uuid": "45cac12c-210d-40ed-bf75-b4815653c51f", "befores": [{"name": "title", "status": "passed", "start": 1691399016937, "stop": 1691399016937}], "start": 1691399016937, "stop": 1691399017036}
\ No newline at end of file
{"uuid": "c6c74381-92fa-4f12-88e3-2e50ae57c709", "befores": [{"name": "interface", "status": "passed", "start": 1691399017698, "stop": 1691399017699}], "start": 1691399017698, "stop": 1691399017801}
\ No newline at end of file
{"uuid": "2891d1fc-4b26-4fc9-9982-5be61950fa4c", "befores": [{"name": "sql_type", "status": "passed", "start": 1691399016871, "stop": 1691399016872}], "start": 1691399016871, "stop": 1691399016927}
\ No newline at end of file
{"uuid": "157f2664-12ca-4132-9431-5cb7e6b80cd6", "befores": [{"name": "module", "status": "passed", "start": 1691399026335, "stop": 1691399026335}], "start": 1691399026335, "stop": 1691399026484}
\ No newline at end of file
{"uuid": "71cd69fd-d739-4cad-bd2e-ddda283fd0e5", "befores": [{"name": "url", "status": "passed", "start": 1691399017155, "stop": 1691399017155}], "start": 1691399017155, "stop": 1691399017261}
\ No newline at end of file
{"uuid": "68f7c02c-624f-4c0e-8f32-42d1bad3e189", "befores": [{"name": "module", "status": "passed", "start": 1691399023908, "stop": 1691399023908}], "start": 1691399023908, "stop": 1691399023988}
\ No newline at end of file
{"name": "正向用例", "status": "passed", "attachments": [{"name": "log", "source": "d27ed1a8-caf8-4f6c-8aad-8639c49c88a3-attachment.txt", "type": "text/plain"}, {"name": "stdout", "source": "3653bc84-c15e-42e5-b092-1665bebef7f2-attachment.txt", "type": "text/plain"}], "parameters": [{"name": "module", "value": "'组织管理'"}, {"name": "interface", "value": "'添加组织'"}, {"name": "title", "value": "'正向用例'"}, {"name": "level", "value": "'高'"}, {"name": "method", "value": "'post'"}, {"name": "url", "value": "'http://120.46.172.186:8080/api/org/v1/org/addOrg'"}, {"name": "mime", "value": "'application/json'"}, {"name": "data", "value": "{'code': 'test56_org', 'demId': '不知道', 'exceedLimitNum': 0, 'grade': '', 'limitNum': 0, 'name': '测试的组织', 'nowNum': 0, 'orderNo': 0, 'parentId': '0'}"}, {"name": "expect", "value": "{'state': True, 'message': '添加组织成功!'}"}, {"name": "sql_type", "value": "'delete|select'"}, {"name": "sql_sentence", "value": "{'select': 'SELECT ID_ FROM uc_demension WHERE `CODE_`=\"test56_dem\";', 'delete': 'DELETE FROM uc_org WHERE `CODE_`=\"test56_org\";'}"}, {"name": "update_key", "value": "'demId'"}], "start": 1691399023717, "stop": 1691399023898, "uuid": "f6d1231c-c1da-4a32-905b-cef5ec7c5f09", "historyId": "c565057f2ed8e19b5ad50c11894312ab", "testCaseId": "0abeaba8f176b6785a0334bed7c1bdad", "fullName": "test_bpm.TestBPM#test_bpm", "labels": [{"name": "feature", "value": "组织管理"}, {"name": "story", "value": "添加组织"}, {"name": "severity", "value": "高"}, {"name": "epic", "value": "BPM系统"}, {"name": "suite", "value": "test_bpm"}, {"name": "subSuite", "value": "TestBPM"}, {"name": "host", "value": "LAPTOP-31V3JBFR"}, {"name": "thread", "value": "6412-MainThread"}, {"name": "framework", "value": "pytest"}, {"name": "language", "value": "cpython3"}, {"name": "package", "value": "test_bpm"}]}
\ No newline at end of file
{"uuid": "cbb6c9af-2e1a-484e-b6dc-b309baed6b69", "befores": [{"name": "title", "status": "passed", "start": 1691399023559, "stop": 1691399023559}], "start": 1691399023559, "stop": 1691399023708}
\ No newline at end of file
{"uuid": "137fd9c5-79cb-447f-a925-95902b4dba8b", "befores": [{"name": "sql_sentence", "status": "passed", "start": 1691399019102, "stop": 1691399019102}], "start": 1691399019102, "stop": 1691399019166}
\ No newline at end of file
{"uuid": "0e2b8359-3058-48b2-bbbe-6caf17366c35", "befores": [{"name": "data", "status": "passed", "start": 1691399029837, "stop": 1691399029837}], "start": 1691399029837, "stop": 1691399029982}
\ No newline at end of file
{"uuid": "af4c72fc-27af-4cb7-889e-8acaa47e176a", "befores": [{"name": "mime", "status": "passed", "start": 1691399020197, "stop": 1691399020197}], "start": 1691399020197, "stop": 1691399020275}
\ No newline at end of file
{"uuid": "b90f5f08-c9ab-4ccc-acc8-1da2db20b234", "befores": [{"name": "interface", "status": "passed", "start": 1691399025189, "stop": 1691399025190}], "start": 1691399025189, "stop": 1691399025311}
\ No newline at end of file
{"uuid": "f9f4b7e9-d314-496b-ac30-21d5cda74095", "befores": [{"name": "update_key", "status": "passed", "start": 1691399025190, "stop": 1691399025190}], "start": 1691399025190, "stop": 1691399025295}
\ No newline at end of file
{"uuid": "22c10b73-97d4-4edd-9e7f-ccc8a8228a2d", "befores": [{"name": "method", "status": "passed", "start": 1691399027503, "stop": 1691399027503}], "start": 1691399027503, "stop": 1691399027656}
\ No newline at end of file
{"uuid": "1d4c1073-9fb7-4d7b-81e6-6a6fc84d33c5", "befores": [{"name": "method", "status": "passed", "start": 1691399021306, "stop": 1691399021306}], "start": 1691399021306, "stop": 1691399021376}
\ No newline at end of file
{"uuid": "cfd9025a-834f-48e8-aa04-7b99ee8a364f", "befores": [{"name": "update_key", "status": "passed", "start": 1691399022389, "stop": 1691399022389}], "start": 1691399022389, "stop": 1691399022451}
\ No newline at end of file
{"uuid": "dd59b47f-d748-4d69-a74b-8fca3009dbc6", "befores": [{"name": "expect", "status": "passed", "start": 1691399029837, "stop": 1691399029837}], "start": 1691399029837, "stop": 1691399029982}
\ No newline at end of file
{"uuid": "47fe3cdf-f355-4419-972c-9f96b3556cfa", "befores": [{"name": "method", "status": "passed", "start": 1691399017478, "stop": 1691399017478}], "start": 1691399017478, "stop": 1691399017581}
\ No newline at end of file
{"uuid": "281bf129-f6d7-49ef-99ed-fefeea7dd180", "befores": [{"name": "sql_type", "status": "passed", "start": 1691399021306, "stop": 1691399021306}], "start": 1691399021306, "stop": 1691399021374}
\ No newline at end of file
{"name": "反向用例-用户名过短", "status": "passed", "attachments": [{"name": "log", "source": "1b24171c-b44e-45ef-8061-af89634fb69b-attachment.txt", "type": "text/plain"}, {"name": "stdout", "source": "e5888934-f186-48c9-8f14-ee05e5591c39-attachment.txt", "type": "text/plain"}], "parameters": [{"name": "module", "value": "'认证接口'"}, {"name": "interface", "value": "'登录系统'"}, {"name": "title", "value": "'反向用例-用户名过短'"}, {"name": "level", "value": "'中'"}, {"name": "method", "value": "'POST'"}, {"name": "url", "value": "'http://120.46.172.186:8080/auth'"}, {"name": "mime", "value": "'application/json'"}, {"name": "data", "value": "{'password': 'MTIzNDU2', 'username': 'a'}"}, {"name": "expect", "value": "{'state': False, 'message': '账号或密码错误'}"}, {"name": "sql_type", "value": "None"}, {"name": "sql_sentence", "value": "None"}, {"name": "update_key", "value": "None"}], "start": 1691399017044, "stop": 1691399017142, "uuid": "e6fa6f52-6621-4392-a26f-d322709886a9", "historyId": "a630861595e4d5075fdcba67048830da", "testCaseId": "0abeaba8f176b6785a0334bed7c1bdad", "fullName": "test_bpm.TestBPM#test_bpm", "labels": [{"name": "feature", "value": "认证接口"}, {"name": "story", "value": "登录系统"}, {"name": "severity", "value": "中"}, {"name": "epic", "value": "BPM系统"}, {"name": "suite", "value": "test_bpm"}, {"name": "subSuite", "value": "TestBPM"}, {"name": "host", "value": "LAPTOP-31V3JBFR"}, {"name": "thread", "value": "6412-MainThread"}, {"name": "framework", "value": "pytest"}, {"name": "language", "value": "cpython3"}, {"name": "package", "value": "test_bpm"}]}
\ No newline at end of file
断言失败
断言失败
断言失败
断言失败
断言失败
{"uuid": "ed855698-7d54-42b9-93b2-d9334d2cdcba", "befores": [{"name": "module", "status": "passed", "start": 1691399028669, "stop": 1691399028669}], "start": 1691399028669, "stop": 1691399028819}
\ No newline at end of file
DEBUG--2023-08-07 17:03:37--Resetting dropped connection: 120.46.172.186
DEBUG--2023-08-07 17:03:37--http://120.46.172.186:8080 "GET /refresh HTTP/1.1" 200 None
ERROR--2023-08-07 17:03:37--断言失败, 模块名称为:认证接口,接口名称为:刷新token,用例标题:正向用例,用例为:None,期望结果为:{'message': '刷新token成功'},服务器返回数据为:{"token":"eyJhbGciOiJIUzUxMiJ9.eyJzdWIiOiJhZG1pbiIsInRlbmFudElkIjoiLTEiLCJleHAiOjE2OTE0ODU0MTcsImlhdCI6MTY5MTM5OTAxN30.n-7NR1iCjIKHbeH-Djk8t1sRkJi_FVAwgVHcGFWP6kh4xOyu6c4rgNtn817qbxVK9O63Wo9-SnreSvMJI5L8Gw","username":"","account":"","userId":"","loginStatus":true,"userAttrs":{}}
\ No newline at end of file
{"uuid": "79d33e4b-4b17-40a5-bfe1-db739c0dc018", "befores": [{"name": "sql_sentence", "status": "passed", "start": 1691399022389, "stop": 1691399022389}], "start": 1691399022389, "stop": 1691399022451}
\ No newline at end of file
{"uuid": "6bfc7413-a726-4045-a890-866f6596264f", "befores": [{"name": "url", "status": "passed", "start": 1691399017374, "stop": 1691399017374}], "start": 1691399017374, "stop": 1691399017470}
\ No newline at end of file
{"uuid": "dc0ab901-957d-44d6-81a5-8b029fe7fbfe", "befores": [{"name": "interface", "status": "passed", "start": 1691399017477, "stop": 1691399017477}], "start": 1691399017477, "stop": 1691399017583}
\ No newline at end of file
{"uuid": "4c2c7e81-2c4e-4be7-b74a-8112429f6895", "befores": [{"name": "update_key", "status": "passed", "start": 1691399023717, "stop": 1691399023717}], "start": 1691399023717, "stop": 1691399023899}
\ No newline at end of file
{"name": "正向用例", "status": "failed", "statusDetails": {"message": "AssertionError: 断言失败", "trace": "self = <InterfaceAutoTest.test_case.test_bpm.TestBPM object at 0x00000257902D2820>\nreq_fix = <InterfaceAutoTest.requests_method.requests_method.RequestsMethod object at 0x00000257902F0490>\ndb_fix = <InterfaceAutoTest.common.db.DB object at 0x00000257903D93D0>, module = '认证接口', interface = '刷新token', title = '正向用例'\nlevel = '中', method = 'get', url = 'http://120.46.172.186:8080/refresh', mime = None, data = None, expect = {'message': '刷新token成功'}\nsql_type = None, sql_sentence = None, update_key = None\n\n @allure.epic(\"BPM系统\")\n @pytest.mark.parametrize(\"module, interface, title, level, method, url, mime, data, expect, sql_type, sql_sentence, update_key\", ReadExcel().get_data())\n def test_bpm(self, req_fix, db_fix, module, interface, title, level, method, url, mime, data, expect, sql_type, sql_sentence, update_key):\n allure.dynamic.feature(module)\n allure.dynamic.story(interface)\n allure.dynamic.title(title)\n allure.dynamic.severity(level)\n \n # 1.1:判断sql语句的类型是否为delete\n if sql_type == \"delete\":\n # 1.2 使用DB类对象,调用delete方法执行删除的sql语句\n db_fix.delete(sql_sentence)\n # # 1.3 使用RequestsMethod类对象调用request_all方法发送请求\n # result = req_fix.request_all(req_method=method, req_url=url, req_mime=mime, case_data=data)\n \n # 2.1 判断sql语句的类型是否为select\n elif sql_type == \"select\":\n # 2.2 使用DB类对象,调用select方法执行查询的sql语句,并接收查询结果\n select_result = db_fix.select(sql_sentence)\n # 2.3 将查询结果更新到用例数据中\n data[update_key] = select_result\n # # 2.3 使用RequestsMethod类对象调用request_all方法发送请求\n # result = req_fix.request_all(req_method=method, req_url=url, req_mime=mime, case_data=data)\n \n # 3.1 判断sql语句的类型是否delete|select或者为select|delete\n elif sql_type == \"delete|select\" or sql_type == \"select|delete\":\n # 3.2 使用DB类对象,调用delete方法执行删除的sql语句\n db_fix.delete(sql_sentence[\"delete\"])\n # 3.3 使用DB类对象,调用select方法执行查询的sql语句,并接收查询结果\n select_result = db_fix.select(sql_sentence[\"select\"])\n # 3.4 将查询结果更新到用例数据中\n data[update_key] = select_result\n # # 3.5 使用RequestsMethod类对象调用request_all方法发送请求\n # result = req_fix.request_all(req_method=method, req_url=url, req_mime=mime, case_data=data)\n #\n # else:\n # result = req_fix.request_all(req_method=method, req_url=url, req_mime=mime, case_data=data)\n \n result = req_fix.request_all(req_method=method, req_url=url, req_mime=mime, case_data=data)\n \n # 断言\n try:\n for key in expect:\n> assert expect[key] == result.json().get(key)\nE AssertionError: assert '刷新token成功' == None\nE + where None = <built-in method get of dict object at 0x0000025790479240>('message')\nE + where <built-in method get of dict object at 0x0000025790479240> = {'account': '', 'loginStatus': True, 'token': 'eyJhbGciOiJIUzUxMiJ9.eyJzdWIiOiJhZG1pbiIsInRlbmFudElkIjoiLTEiLCJleHAiOjE2OTE0ODU0MTksImlhdCI6MTY5MTM5OTAxOX0.WinKyHRVircLGP_CUX1F7Bnc8ppV_aESgAOwYpTrvsaosQKpSM4M310de-C_Isotv4UrWgQHE-a9qJeBxb3Kdw', 'userAttrs': {}, ...}.get\nE + where {'account': '', 'loginStatus': True, 'token': 'eyJhbGciOiJIUzUxMiJ9.eyJzdWIiOiJhZG1pbiIsInRlbmFudElkIjoiLTEiLCJleHAiOjE2OTE0ODU0MTksImlhdCI6MTY5MTM5OTAxOX0.WinKyHRVircLGP_CUX1F7Bnc8ppV_aESgAOwYpTrvsaosQKpSM4M310de-C_Isotv4UrWgQHE-a9qJeBxb3Kdw', 'userAttrs': {}, ...} = <bound method Response.json of <Response [200]>>()\nE + where <bound method Response.json of <Response [200]>> = <Response [200]>.json\n\ntest_bpm.py:61: AssertionError\n\nDuring handling of the above exception, another exception occurred:\n\nself = <InterfaceAutoTest.test_case.test_bpm.TestBPM object at 0x00000257902D2820>\nreq_fix = <InterfaceAutoTest.requests_method.requests_method.RequestsMethod object at 0x00000257902F0490>\ndb_fix = <InterfaceAutoTest.common.db.DB object at 0x00000257903D93D0>, module = '认证接口', interface = '刷新token', title = '正向用例'\nlevel = '中', method = 'get', url = 'http://120.46.172.186:8080/refresh', mime = None, data = None, expect = {'message': '刷新token成功'}\nsql_type = None, sql_sentence = None, update_key = None\n\n @allure.epic(\"BPM系统\")\n @pytest.mark.parametrize(\"module, interface, title, level, method, url, mime, data, expect, sql_type, sql_sentence, update_key\", ReadExcel().get_data())\n def test_bpm(self, req_fix, db_fix, module, interface, title, level, method, url, mime, data, expect, sql_type, sql_sentence, update_key):\n allure.dynamic.feature(module)\n allure.dynamic.story(interface)\n allure.dynamic.title(title)\n allure.dynamic.severity(level)\n \n # 1.1:判断sql语句的类型是否为delete\n if sql_type == \"delete\":\n # 1.2 使用DB类对象,调用delete方法执行删除的sql语句\n db_fix.delete(sql_sentence)\n # # 1.3 使用RequestsMethod类对象调用request_all方法发送请求\n # result = req_fix.request_all(req_method=method, req_url=url, req_mime=mime, case_data=data)\n \n # 2.1 判断sql语句的类型是否为select\n elif sql_type == \"select\":\n # 2.2 使用DB类对象,调用select方法执行查询的sql语句,并接收查询结果\n select_result = db_fix.select(sql_sentence)\n # 2.3 将查询结果更新到用例数据中\n data[update_key] = select_result\n # # 2.3 使用RequestsMethod类对象调用request_all方法发送请求\n # result = req_fix.request_all(req_method=method, req_url=url, req_mime=mime, case_data=data)\n \n # 3.1 判断sql语句的类型是否delete|select或者为select|delete\n elif sql_type == \"delete|select\" or sql_type == \"select|delete\":\n # 3.2 使用DB类对象,调用delete方法执行删除的sql语句\n db_fix.delete(sql_sentence[\"delete\"])\n # 3.3 使用DB类对象,调用select方法执行查询的sql语句,并接收查询结果\n select_result = db_fix.select(sql_sentence[\"select\"])\n # 3.4 将查询结果更新到用例数据中\n data[update_key] = select_result\n # # 3.5 使用RequestsMethod类对象调用request_all方法发送请求\n # result = req_fix.request_all(req_method=method, req_url=url, req_mime=mime, case_data=data)\n #\n # else:\n # result = req_fix.request_all(req_method=method, req_url=url, req_mime=mime, case_data=data)\n \n result = req_fix.request_all(req_method=method, req_url=url, req_mime=mime, case_data=data)\n \n # 断言\n try:\n for key in expect:\n assert expect[key] == result.json().get(key)\n except:\n print(\"断言失败\")\n logging.error(\"断言失败, 模块名称为:{},接口名称为:{},用例标题:{},用例为:{},期望结果为:{},服务器返回数据为:{}\".format(module, interface, title, str(data), str(expect), result.text))\n> raise AssertionError(\"断言失败\")\nE AssertionError: 断言失败\n\ntest_bpm.py:65: AssertionError"}, "attachments": [{"name": "log", "source": "3f1faa5f-acf8-4519-adaf-eca18ceb0aa9-attachment.txt", "type": "text/plain"}, {"name": "stdout", "source": "fb358e8f-6c08-495a-a395-49afe65f6712-attachment.txt", "type": "text/plain"}], "parameters": [{"name": "module", "value": "'认证接口'"}, {"name": "interface", "value": "'刷新token'"}, {"name": "title", "value": "'正向用例'"}, {"name": "level", "value": "'中'"}, {"name": "method", "value": "'get'"}, {"name": "url", "value": "'http://120.46.172.186:8080/refresh'"}, {"name": "mime", "value": "None"}, {"name": "data", "value": "None"}, {"name": "expect", "value": "{'message': '刷新token成功'}"}, {"name": "sql_type", "value": "None"}, {"name": "sql_sentence", "value": "None"}, {"name": "update_key", "value": "None"}], "start": 1691399020198, "stop": 1691399020267, "uuid": "49c770ae-ea71-47bf-92e5-b36ca8bf3830", "historyId": "f368301ce537f1bbd596e0d19f24f393", "testCaseId": "0abeaba8f176b6785a0334bed7c1bdad", "fullName": "test_bpm.TestBPM#test_bpm", "labels": [{"name": "feature", "value": "认证接口"}, {"name": "story", "value": "刷新token"}, {"name": "severity", "value": "中"}, {"name": "epic", "value": "BPM系统"}, {"name": "suite", "value": "test_bpm"}, {"name": "subSuite", "value": "TestBPM"}, {"name": "host", "value": "LAPTOP-31V3JBFR"}, {"name": "thread", "value": "6412-MainThread"}, {"name": "framework", "value": "pytest"}, {"name": "language", "value": "cpython3"}, {"name": "package", "value": "test_bpm"}]}
\ No newline at end of file
{"uuid": "548bb404-d0bf-4f74-875f-c292b76aafb9", "befores": [{"name": "module", "status": "passed", "start": 1691399017269, "stop": 1691399017269}], "start": 1691399017269, "stop": 1691399017369}
\ No newline at end of file
{"uuid": "a5c93c43-ef34-4ca6-9381-144cc9604486", "befores": [{"name": "interface", "status": "passed", "start": 1691399016871, "stop": 1691399016871}], "start": 1691399016871, "stop": 1691399016932}
\ No newline at end of file
{"uuid": "14cfa131-e39e-4e1c-a5a9-cf27bebffb2b", "befores": [{"name": "expect", "status": "passed", "start": 1691399020197, "stop": 1691399020197}], "start": 1691399020197, "stop": 1691399020274}
\ No newline at end of file
DEBUG--2023-08-07 17:03:43--http://120.46.172.186:8080 "POST /api/demension/v1/dem/addDem HTTP/1.1" 200 None
\ No newline at end of file
{"uuid": "1b79bdfc-1e99-4318-b15a-e3da8543f7ac", "befores": [{"name": "url", "status": "passed", "start": 1691399017269, "stop": 1691399017269}], "start": 1691399017269, "stop": 1691399017367}
\ No newline at end of file
{"uuid": "0a7fac94-6db5-4046-974d-15bab7604374", "befores": [{"name": "url", "status": "passed", "start": 1691399022389, "stop": 1691399022389}], "start": 1691399022389, "stop": 1691399022453}
\ No newline at end of file
DEBUG--2023-08-07 17:03:37--Resetting dropped connection: 120.46.172.186
DEBUG--2023-08-07 17:03:37--http://120.46.172.186:8080 "GET /refresh HTTP/1.1" 200 None
ERROR--2023-08-07 17:03:37--断言失败, 模块名称为:认证接口,接口名称为:刷新token,用例标题:正向用例,用例为:None,期望结果为:{'message': '刷新token成功'},服务器返回数据为:{"token":"eyJhbGciOiJIUzUxMiJ9.eyJzdWIiOiJhZG1pbiIsInRlbmFudElkIjoiLTEiLCJleHAiOjE2OTE0ODU0MTcsImlhdCI6MTY5MTM5OTAxN30.n-7NR1iCjIKHbeH-Djk8t1sRkJi_FVAwgVHcGFWP6kh4xOyu6c4rgNtn817qbxVK9O63Wo9-SnreSvMJI5L8Gw","username":"","account":"","userId":"","loginStatus":true,"userAttrs":{}}
DEBUG--2023-08-07 17:03:39--http://120.46.172.186:8080 "GET /refresh HTTP/1.1" 200 None
ERROR--2023-08-07 17:03:39--断言失败, 模块名称为:认证接口,接口名称为:刷新token,用例标题:正向用例,用例为:None,期望结果为:{'message': '刷新token成功'},服务器返回数据为:{"token":"eyJhbGciOiJIUzUxMiJ9.eyJzdWIiOiJhZG1pbiIsInRlbmFudElkIjoiLTEiLCJleHAiOjE2OTE0ODU0MTgsImlhdCI6MTY5MTM5OTAxOH0.Rb1x9O8uPZcXAfoDbWutU6f3taE2vMl0iRW4WVVwfeKYLS-zF9e0IFTyL2tUDstfMzs0ej7qYnsUg_CXR-qOHg","username":"","account":"","userId":"","loginStatus":true,"userAttrs":{}}
DEBUG--2023-08-07 17:03:40--http://120.46.172.186:8080 "GET /refresh HTTP/1.1" 200 None
ERROR--2023-08-07 17:03:40--断言失败, 模块名称为:认证接口,接口名称为:刷新token,用例标题:正向用例,用例为:None,期望结果为:{'message': '刷新token成功'},服务器返回数据为:{"token":"eyJhbGciOiJIUzUxMiJ9.eyJzdWIiOiJhZG1pbiIsInRlbmFudElkIjoiLTEiLCJleHAiOjE2OTE0ODU0MTksImlhdCI6MTY5MTM5OTAxOX0.WinKyHRVircLGP_CUX1F7Bnc8ppV_aESgAOwYpTrvsaosQKpSM4M310de-C_Isotv4UrWgQHE-a9qJeBxb3Kdw","username":"","account":"","userId":"","loginStatus":true,"userAttrs":{}}
DEBUG--2023-08-07 17:03:41--http://120.46.172.186:8080 "GET /refresh HTTP/1.1" 200 None
ERROR--2023-08-07 17:03:41--断言失败, 模块名称为:认证接口,接口名称为:刷新token,用例标题:正向用例,用例为:None,期望结果为:{'message': '刷新token成功'},服务器返回数据为:{"token":"eyJhbGciOiJIUzUxMiJ9.eyJzdWIiOiJhZG1pbiIsInRlbmFudElkIjoiLTEiLCJleHAiOjE2OTE0ODU0MjAsImlhdCI6MTY5MTM5OTAyMH0.UiLL8CbY6A0_NK2PFWF1YA_lOAuFH2tDwOk5-MP21rQb6-4POQAwoNYaJRF_6QfYBd60YGMTwyBEISUGe-EHXg","username":"","account":"","userId":"","loginStatus":true,"userAttrs":{}}
DEBUG--2023-08-07 17:03:42--http://120.46.172.186:8080 "GET /refresh HTTP/1.1" 200 None
ERROR--2023-08-07 17:03:42--断言失败, 模块名称为:认证接口,接口名称为:刷新token,用例标题:正向用例,用例为:None,期望结果为:{'message': '刷新token成功'},服务器返回数据为:{"token":"eyJhbGciOiJIUzUxMiJ9.eyJzdWIiOiJhZG1pbiIsInRlbmFudElkIjoiLTEiLCJleHAiOjE2OTE0ODU0MjEsImlhdCI6MTY5MTM5OTAyMX0.pk_DluVTDrByMdpsd0Q6k83GXAFpZIaFR_DE5EVzVT22EB9Z00TFxeBrL4zXrrgN3j1kroVm6pCtv7CWcF0ECg","username":"","account":"","userId":"","loginStatus":true,"userAttrs":{}}
\ No newline at end of file
{"uuid": "5f8d5505-3968-4a06-bdbb-c9df320dfae1", "befores": [{"name": "sql_type", "status": "passed", "start": 1691399020197, "stop": 1691399020197}], "start": 1691399020197, "stop": 1691399020273}
\ No newline at end of file
{"uuid": "e99e23da-e61a-489a-bcbf-d8ea33553baa", "befores": [{"name": "sql_type", "status": "passed", "start": 1691399023475, "stop": 1691399023475}], "start": 1691399023475, "stop": 1691399023550}
\ No newline at end of file
{"name": "正向用例", "status": "failed", "statusDetails": {"message": "AssertionError: 断言失败", "trace": "self = <InterfaceAutoTest.test_case.test_bpm.TestBPM object at 0x00000257902F01C0>\nreq_fix = <InterfaceAutoTest.requests_method.requests_method.RequestsMethod object at 0x00000257902F0490>\ndb_fix = <InterfaceAutoTest.common.db.DB object at 0x00000257903D93D0>, module = '维度管理', interface = '根据维度编码删除维度', title = '正向用例'\nlevel = '高', method = 'DELETE', url = 'http://120.46.172.186:8080/api/demension/v1/dem/deleteDemByIds', mime = 'query'\ndata = {'ids': '1688475997541777408'}, expect = {'message': '删除维度成功', 'state': True}, sql_type = 'select'\nsql_sentence = 'SELECT ID_ FROM uc_demension WHERE `CODE_`=\"test56_dem\";', update_key = 'ids'\n\n @allure.epic(\"BPM系统\")\n @pytest.mark.parametrize(\"module, interface, title, level, method, url, mime, data, expect, sql_type, sql_sentence, update_key\", ReadExcel().get_data())\n def test_bpm(self, req_fix, db_fix, module, interface, title, level, method, url, mime, data, expect, sql_type, sql_sentence, update_key):\n allure.dynamic.feature(module)\n allure.dynamic.story(interface)\n allure.dynamic.title(title)\n allure.dynamic.severity(level)\n \n # 1.1:判断sql语句的类型是否为delete\n if sql_type == \"delete\":\n # 1.2 使用DB类对象,调用delete方法执行删除的sql语句\n db_fix.delete(sql_sentence)\n # # 1.3 使用RequestsMethod类对象调用request_all方法发送请求\n # result = req_fix.request_all(req_method=method, req_url=url, req_mime=mime, case_data=data)\n \n # 2.1 判断sql语句的类型是否为select\n elif sql_type == \"select\":\n # 2.2 使用DB类对象,调用select方法执行查询的sql语句,并接收查询结果\n select_result = db_fix.select(sql_sentence)\n # 2.3 将查询结果更新到用例数据中\n data[update_key] = select_result\n # # 2.3 使用RequestsMethod类对象调用request_all方法发送请求\n # result = req_fix.request_all(req_method=method, req_url=url, req_mime=mime, case_data=data)\n \n # 3.1 判断sql语句的类型是否delete|select或者为select|delete\n elif sql_type == \"delete|select\" or sql_type == \"select|delete\":\n # 3.2 使用DB类对象,调用delete方法执行删除的sql语句\n db_fix.delete(sql_sentence[\"delete\"])\n # 3.3 使用DB类对象,调用select方法执行查询的sql语句,并接收查询结果\n select_result = db_fix.select(sql_sentence[\"select\"])\n # 3.4 将查询结果更新到用例数据中\n data[update_key] = select_result\n # # 3.5 使用RequestsMethod类对象调用request_all方法发送请求\n # result = req_fix.request_all(req_method=method, req_url=url, req_mime=mime, case_data=data)\n #\n # else:\n # result = req_fix.request_all(req_method=method, req_url=url, req_mime=mime, case_data=data)\n \n result = req_fix.request_all(req_method=method, req_url=url, req_mime=mime, case_data=data)\n \n # 断言\n try:\n for key in expect:\n> assert expect[key] == result.json().get(key)\nE AssertionError: assert True == False\nE + where False = <built-in method get of dict object at 0x0000025790493700>('state')\nE + where <built-in method get of dict object at 0x0000025790493700> = {'logId': '1688476023861035008', 'message': '', 'state': False}.get\nE + where {'logId': '1688476023861035008', 'message': '', 'state': False} = <bound method Response.json of <Response [500]>>()\nE + where <bound method Response.json of <Response [500]>> = <Response [500]>.json\n\ntest_bpm.py:61: AssertionError\n\nDuring handling of the above exception, another exception occurred:\n\nself = <InterfaceAutoTest.test_case.test_bpm.TestBPM object at 0x00000257902F01C0>\nreq_fix = <InterfaceAutoTest.requests_method.requests_method.RequestsMethod object at 0x00000257902F0490>\ndb_fix = <InterfaceAutoTest.common.db.DB object at 0x00000257903D93D0>, module = '维度管理', interface = '根据维度编码删除维度', title = '正向用例'\nlevel = '高', method = 'DELETE', url = 'http://120.46.172.186:8080/api/demension/v1/dem/deleteDemByIds', mime = 'query'\ndata = {'ids': '1688475997541777408'}, expect = {'message': '删除维度成功', 'state': True}, sql_type = 'select'\nsql_sentence = 'SELECT ID_ FROM uc_demension WHERE `CODE_`=\"test56_dem\";', update_key = 'ids'\n\n @allure.epic(\"BPM系统\")\n @pytest.mark.parametrize(\"module, interface, title, level, method, url, mime, data, expect, sql_type, sql_sentence, update_key\", ReadExcel().get_data())\n def test_bpm(self, req_fix, db_fix, module, interface, title, level, method, url, mime, data, expect, sql_type, sql_sentence, update_key):\n allure.dynamic.feature(module)\n allure.dynamic.story(interface)\n allure.dynamic.title(title)\n allure.dynamic.severity(level)\n \n # 1.1:判断sql语句的类型是否为delete\n if sql_type == \"delete\":\n # 1.2 使用DB类对象,调用delete方法执行删除的sql语句\n db_fix.delete(sql_sentence)\n # # 1.3 使用RequestsMethod类对象调用request_all方法发送请求\n # result = req_fix.request_all(req_method=method, req_url=url, req_mime=mime, case_data=data)\n \n # 2.1 判断sql语句的类型是否为select\n elif sql_type == \"select\":\n # 2.2 使用DB类对象,调用select方法执行查询的sql语句,并接收查询结果\n select_result = db_fix.select(sql_sentence)\n # 2.3 将查询结果更新到用例数据中\n data[update_key] = select_result\n # # 2.3 使用RequestsMethod类对象调用request_all方法发送请求\n # result = req_fix.request_all(req_method=method, req_url=url, req_mime=mime, case_data=data)\n \n # 3.1 判断sql语句的类型是否delete|select或者为select|delete\n elif sql_type == \"delete|select\" or sql_type == \"select|delete\":\n # 3.2 使用DB类对象,调用delete方法执行删除的sql语句\n db_fix.delete(sql_sentence[\"delete\"])\n # 3.3 使用DB类对象,调用select方法执行查询的sql语句,并接收查询结果\n select_result = db_fix.select(sql_sentence[\"select\"])\n # 3.4 将查询结果更新到用例数据中\n data[update_key] = select_result\n # # 3.5 使用RequestsMethod类对象调用request_all方法发送请求\n # result = req_fix.request_all(req_method=method, req_url=url, req_mime=mime, case_data=data)\n #\n # else:\n # result = req_fix.request_all(req_method=method, req_url=url, req_mime=mime, case_data=data)\n \n result = req_fix.request_all(req_method=method, req_url=url, req_mime=mime, case_data=data)\n \n # 断言\n try:\n for key in expect:\n assert expect[key] == result.json().get(key)\n except:\n print(\"断言失败\")\n logging.error(\"断言失败, 模块名称为:{},接口名称为:{},用例标题:{},用例为:{},期望结果为:{},服务器返回数据为:{}\".format(module, interface, title, str(data), str(expect), result.text))\n> raise AssertionError(\"断言失败\")\nE AssertionError: 断言失败\n\ntest_bpm.py:65: AssertionError"}, "attachments": [{"name": "log", "source": "a9bec9eb-cc95-4630-8893-08d8df96ae51-attachment.txt", "type": "text/plain"}, {"name": "stdout", "source": "2837bab4-66cd-4634-8f38-c30d7180cece-attachment.txt", "type": "text/plain"}], "parameters": [{"name": "module", "value": "'维度管理'"}, {"name": "interface", "value": "'根据维度编码删除维度'"}, {"name": "title", "value": "'正向用例'"}, {"name": "level", "value": "'高'"}, {"name": "method", "value": "'DELETE'"}, {"name": "url", "value": "'http://120.46.172.186:8080/api/demension/v1/dem/deleteDemByIds'"}, {"name": "mime", "value": "'query'"}, {"name": "data", "value": "{'ids': '1688475997541777408'}"}, {"name": "expect", "value": "{'state': True, 'message': '删除维度成功'}"}, {"name": "sql_type", "value": "'select'"}, {"name": "sql_sentence", "value": "'SELECT ID_ FROM uc_demension WHERE `CODE_`=\"test56_dem\";'"}, {"name": "update_key", "value": "'ids'"}], "start": 1691399029838, "stop": 1691399029973, "uuid": "8f27cff9-e779-4c79-b2d6-3d20ce5946f2", "historyId": "f37f5b35a33b0d851ad30e5c966f4068", "testCaseId": "0abeaba8f176b6785a0334bed7c1bdad", "fullName": "test_bpm.TestBPM#test_bpm", "labels": [{"name": "feature", "value": "维度管理"}, {"name": "story", "value": "根据维度编码删除维度"}, {"name": "severity", "value": "高"}, {"name": "epic", "value": "BPM系统"}, {"name": "suite", "value": "test_bpm"}, {"name": "subSuite", "value": "TestBPM"}, {"name": "host", "value": "LAPTOP-31V3JBFR"}, {"name": "thread", "value": "6412-MainThread"}, {"name": "framework", "value": "pytest"}, {"name": "language", "value": "cpython3"}, {"name": "package", "value": "test_bpm"}]}
\ No newline at end of file
{"uuid": "314176aa-c604-48cd-9570-98ae02619e9a", "befores": [{"name": "url", "status": "passed", "start": 1691399021306, "stop": 1691399021306}], "start": 1691399021306, "stop": 1691399021376}
\ No newline at end of file
{"uuid": "fbc90149-3ff2-4613-bcf3-cee83a80a3c5", "befores": [{"name": "data", "status": "passed", "start": 1691399027504, "stop": 1691399027504}], "start": 1691399027504, "stop": 1691399027654}
\ No newline at end of file
{"uuid": "db53e63e-9239-4d6f-95fe-209679e218ed", "befores": [{"name": "update_key", "status": "passed", "start": 1691399029837, "stop": 1691399029837}], "start": 1691399029837, "stop": 1691399029979}
\ No newline at end of file
{"uuid": "c580a44a-8748-415d-9034-0b1d6038d098", "befores": [{"name": "interface", "status": "passed", "start": 1691399017043, "stop": 1691399017043}], "start": 1691399017043, "stop": 1691399017149}
\ No newline at end of file
{"uuid": "a5cb3e6d-aedf-4ac6-a6b3-16fa180ced0b", "befores": [{"name": "module", "status": "passed", "start": 1691399025189, "stop": 1691399025189}], "start": 1691399025189, "stop": 1691399025312}
\ No newline at end of file
{"uuid": "a028e25c-5f27-4db4-802b-668edc65cc54", "befores": [{"name": "data", "status": "passed", "start": 1691399017478, "stop": 1691399017478}], "start": 1691399017478, "stop": 1691399017579}
\ No newline at end of file
DEBUG--2023-08-07 17:03:37--Resetting dropped connection: 120.46.172.186
DEBUG--2023-08-07 17:03:37--http://120.46.172.186:8080 "GET /refresh HTTP/1.1" 200 None
ERROR--2023-08-07 17:03:37--断言失败, 模块名称为:认证接口,接口名称为:刷新token,用例标题:正向用例,用例为:None,期望结果为:{'message': '刷新token成功'},服务器返回数据为:{"token":"eyJhbGciOiJIUzUxMiJ9.eyJzdWIiOiJhZG1pbiIsInRlbmFudElkIjoiLTEiLCJleHAiOjE2OTE0ODU0MTcsImlhdCI6MTY5MTM5OTAxN30.n-7NR1iCjIKHbeH-Djk8t1sRkJi_FVAwgVHcGFWP6kh4xOyu6c4rgNtn817qbxVK9O63Wo9-SnreSvMJI5L8Gw","username":"","account":"","userId":"","loginStatus":true,"userAttrs":{}}
DEBUG--2023-08-07 17:03:39--http://120.46.172.186:8080 "GET /refresh HTTP/1.1" 200 None
ERROR--2023-08-07 17:03:39--断言失败, 模块名称为:认证接口,接口名称为:刷新token,用例标题:正向用例,用例为:None,期望结果为:{'message': '刷新token成功'},服务器返回数据为:{"token":"eyJhbGciOiJIUzUxMiJ9.eyJzdWIiOiJhZG1pbiIsInRlbmFudElkIjoiLTEiLCJleHAiOjE2OTE0ODU0MTgsImlhdCI6MTY5MTM5OTAxOH0.Rb1x9O8uPZcXAfoDbWutU6f3taE2vMl0iRW4WVVwfeKYLS-zF9e0IFTyL2tUDstfMzs0ej7qYnsUg_CXR-qOHg","username":"","account":"","userId":"","loginStatus":true,"userAttrs":{}}
DEBUG--2023-08-07 17:03:40--http://120.46.172.186:8080 "GET /refresh HTTP/1.1" 200 None
ERROR--2023-08-07 17:03:40--断言失败, 模块名称为:认证接口,接口名称为:刷新token,用例标题:正向用例,用例为:None,期望结果为:{'message': '刷新token成功'},服务器返回数据为:{"token":"eyJhbGciOiJIUzUxMiJ9.eyJzdWIiOiJhZG1pbiIsInRlbmFudElkIjoiLTEiLCJleHAiOjE2OTE0ODU0MTksImlhdCI6MTY5MTM5OTAxOX0.WinKyHRVircLGP_CUX1F7Bnc8ppV_aESgAOwYpTrvsaosQKpSM4M310de-C_Isotv4UrWgQHE-a9qJeBxb3Kdw","username":"","account":"","userId":"","loginStatus":true,"userAttrs":{}}
DEBUG--2023-08-07 17:03:41--http://120.46.172.186:8080 "GET /refresh HTTP/1.1" 200 None
ERROR--2023-08-07 17:03:41--断言失败, 模块名称为:认证接口,接口名称为:刷新token,用例标题:正向用例,用例为:None,期望结果为:{'message': '刷新token成功'},服务器返回数据为:{"token":"eyJhbGciOiJIUzUxMiJ9.eyJzdWIiOiJhZG1pbiIsInRlbmFudElkIjoiLTEiLCJleHAiOjE2OTE0ODU0MjAsImlhdCI6MTY5MTM5OTAyMH0.UiLL8CbY6A0_NK2PFWF1YA_lOAuFH2tDwOk5-MP21rQb6-4POQAwoNYaJRF_6QfYBd60YGMTwyBEISUGe-EHXg","username":"","account":"","userId":"","loginStatus":true,"userAttrs":{}}
DEBUG--2023-08-07 17:03:42--http://120.46.172.186:8080 "GET /refresh HTTP/1.1" 200 None
ERROR--2023-08-07 17:03:42--断言失败, 模块名称为:认证接口,接口名称为:刷新token,用例标题:正向用例,用例为:None,期望结果为:{'message': '刷新token成功'},服务器返回数据为:{"token":"eyJhbGciOiJIUzUxMiJ9.eyJzdWIiOiJhZG1pbiIsInRlbmFudElkIjoiLTEiLCJleHAiOjE2OTE0ODU0MjEsImlhdCI6MTY5MTM5OTAyMX0.pk_DluVTDrByMdpsd0Q6k83GXAFpZIaFR_DE5EVzVT22EB9Z00TFxeBrL4zXrrgN3j1kroVm6pCtv7CWcF0ECg","username":"","account":"","userId":"","loginStatus":true,"userAttrs":{}}
DEBUG--2023-08-07 17:03:43--http://120.46.172.186:8080 "GET /refresh HTTP/1.1" 200 None
ERROR--2023-08-07 17:03:43--断言失败, 模块名称为:认证接口,接口名称为:刷新token,用例标题:正向用例,用例为:None,期望结果为:{'message': '刷新token成功'},服务器返回数据为:{"token":"eyJhbGciOiJIUzUxMiJ9.eyJzdWIiOiJhZG1pbiIsInRlbmFudElkIjoiLTEiLCJleHAiOjE2OTE0ODU0MjIsImlhdCI6MTY5MTM5OTAyMn0.AJb0b0Z7fh42A4W3fRFg03S264NwNu1fnWxlbJPlndwduuMj8ujr26RYm5ze6hzk9s5UPzd9oGBhiQAdYo5PRA","username":"","account":"","userId":"","loginStatus":true,"userAttrs":{}}
\ No newline at end of file
{"uuid": "1bc9beba-6230-4a3a-adba-07d619a756fc", "befores": [{"name": "title", "status": "passed", "start": 1691399023908, "stop": 1691399023908}], "start": 1691399023908, "stop": 1691399023987}
\ No newline at end of file
{"uuid": "eb76b07d-4a52-4a99-9934-aa13dab3b2be", "befores": [{"name": "update_key", "status": "passed", "start": 1691399028670, "stop": 1691399028670}], "start": 1691399028670, "stop": 1691399028813}
\ No newline at end of file
{"uuid": "0f4797dd-d2c9-44b7-8943-f4d685037735", "befores": [{"name": "module", "status": "passed", "start": 1691399017806, "stop": 1691399017806}], "start": 1691399017806, "stop": 1691399018086}
\ No newline at end of file
{"uuid": "12a02e70-3149-4441-991c-3326502c14e5", "befores": [{"name": "method", "status": "passed", "start": 1691399023716, "stop": 1691399023716}], "start": 1691399023716, "stop": 1691399023902}
\ No newline at end of file
{"uuid": "f7b0ebdb-13ac-48d9-b4f3-dce2ef8f0753", "befores": [{"name": "mime", "status": "passed", "start": 1691399017589, "stop": 1691399017589}], "start": 1691399017589, "stop": 1691399017691}
\ No newline at end of file
DEBUG--2023-08-07 17:03:43--http://120.46.172.186:8080 "POST /api/org/v1/org/addOrg HTTP/1.1" 200 None
\ No newline at end of file
{"uuid": "1f14dc12-31d0-45ff-a193-6088a6d8b54e", "befores": [{"name": "sql_type", "status": "passed", "start": 1691399023909, "stop": 1691399023909}], "start": 1691399023909, "stop": 1691399023984}
\ No newline at end of file
{"uuid": "0188b27b-eb43-47b9-8f1b-e34784903f46", "befores": [{"name": "title", "status": "passed", "start": 1691399017478, "stop": 1691399017478}], "start": 1691399017478, "stop": 1691399017583}
\ No newline at end of file
{"uuid": "687ff696-43ce-4dbc-afe3-c29cf3af80d3", "befores": [{"name": "title", "status": "passed", "start": 1691399016789, "stop": 1691399016789}], "start": 1691399016789, "stop": 1691399016864}
\ No newline at end of file
{"uuid": "7038cf3f-5348-4e37-a8c9-ef93d8ab896f", "befores": [{"name": "method", "status": "passed", "start": 1691399022389, "stop": 1691399022389}], "start": 1691399022389, "stop": 1691399022454}
\ No newline at end of file
{"uuid": "4aacc7e6-cac8-4106-a810-2e3253bfb1ee", "befores": [{"name": "expect", "status": "passed", "start": 1691399025190, "stop": 1691399025190}], "start": 1691399025190, "stop": 1691399025307}
\ No newline at end of file
{"name": "正向用例", "status": "failed", "statusDetails": {"message": "AssertionError: 断言失败", "trace": "self = <InterfaceAutoTest.test_case.test_bpm.TestBPM object at 0x00000257902D2820>\nreq_fix = <InterfaceAutoTest.requests_method.requests_method.RequestsMethod object at 0x00000257902F0490>\ndb_fix = <InterfaceAutoTest.common.db.DB object at 0x00000257903D93D0>, module = '认证接口', interface = '刷新token', title = '正向用例'\nlevel = '中', method = 'get', url = 'http://120.46.172.186:8080/refresh', mime = None, data = None, expect = {'message': '刷新token成功'}\nsql_type = None, sql_sentence = None, update_key = None\n\n @allure.epic(\"BPM系统\")\n @pytest.mark.parametrize(\"module, interface, title, level, method, url, mime, data, expect, sql_type, sql_sentence, update_key\", ReadExcel().get_data())\n def test_bpm(self, req_fix, db_fix, module, interface, title, level, method, url, mime, data, expect, sql_type, sql_sentence, update_key):\n allure.dynamic.feature(module)\n allure.dynamic.story(interface)\n allure.dynamic.title(title)\n allure.dynamic.severity(level)\n \n # 1.1:判断sql语句的类型是否为delete\n if sql_type == \"delete\":\n # 1.2 使用DB类对象,调用delete方法执行删除的sql语句\n db_fix.delete(sql_sentence)\n # # 1.3 使用RequestsMethod类对象调用request_all方法发送请求\n # result = req_fix.request_all(req_method=method, req_url=url, req_mime=mime, case_data=data)\n \n # 2.1 判断sql语句的类型是否为select\n elif sql_type == \"select\":\n # 2.2 使用DB类对象,调用select方法执行查询的sql语句,并接收查询结果\n select_result = db_fix.select(sql_sentence)\n # 2.3 将查询结果更新到用例数据中\n data[update_key] = select_result\n # # 2.3 使用RequestsMethod类对象调用request_all方法发送请求\n # result = req_fix.request_all(req_method=method, req_url=url, req_mime=mime, case_data=data)\n \n # 3.1 判断sql语句的类型是否delete|select或者为select|delete\n elif sql_type == \"delete|select\" or sql_type == \"select|delete\":\n # 3.2 使用DB类对象,调用delete方法执行删除的sql语句\n db_fix.delete(sql_sentence[\"delete\"])\n # 3.3 使用DB类对象,调用select方法执行查询的sql语句,并接收查询结果\n select_result = db_fix.select(sql_sentence[\"select\"])\n # 3.4 将查询结果更新到用例数据中\n data[update_key] = select_result\n # # 3.5 使用RequestsMethod类对象调用request_all方法发送请求\n # result = req_fix.request_all(req_method=method, req_url=url, req_mime=mime, case_data=data)\n #\n # else:\n # result = req_fix.request_all(req_method=method, req_url=url, req_mime=mime, case_data=data)\n \n result = req_fix.request_all(req_method=method, req_url=url, req_mime=mime, case_data=data)\n \n # 断言\n try:\n for key in expect:\n> assert expect[key] == result.json().get(key)\nE AssertionError: assert '刷新token成功' == None\nE + where None = <built-in method get of dict object at 0x000002579047D880>('message')\nE + where <built-in method get of dict object at 0x000002579047D880> = {'account': '', 'loginStatus': True, 'token': 'eyJhbGciOiJIUzUxMiJ9.eyJzdWIiOiJhZG1pbiIsInRlbmFudElkIjoiLTEiLCJleHAiOjE2OTE0ODU0MjEsImlhdCI6MTY5MTM5OTAyMX0.pk_DluVTDrByMdpsd0Q6k83GXAFpZIaFR_DE5EVzVT22EB9Z00TFxeBrL4zXrrgN3j1kroVm6pCtv7CWcF0ECg', 'userAttrs': {}, ...}.get\nE + where {'account': '', 'loginStatus': True, 'token': 'eyJhbGciOiJIUzUxMiJ9.eyJzdWIiOiJhZG1pbiIsInRlbmFudElkIjoiLTEiLCJleHAiOjE2OTE0ODU0MjEsImlhdCI6MTY5MTM5OTAyMX0.pk_DluVTDrByMdpsd0Q6k83GXAFpZIaFR_DE5EVzVT22EB9Z00TFxeBrL4zXrrgN3j1kroVm6pCtv7CWcF0ECg', 'userAttrs': {}, ...} = <bound method Response.json of <Response [200]>>()\nE + where <bound method Response.json of <Response [200]>> = <Response [200]>.json\n\ntest_bpm.py:61: AssertionError\n\nDuring handling of the above exception, another exception occurred:\n\nself = <InterfaceAutoTest.test_case.test_bpm.TestBPM object at 0x00000257902D2820>\nreq_fix = <InterfaceAutoTest.requests_method.requests_method.RequestsMethod object at 0x00000257902F0490>\ndb_fix = <InterfaceAutoTest.common.db.DB object at 0x00000257903D93D0>, module = '认证接口', interface = '刷新token', title = '正向用例'\nlevel = '中', method = 'get', url = 'http://120.46.172.186:8080/refresh', mime = None, data = None, expect = {'message': '刷新token成功'}\nsql_type = None, sql_sentence = None, update_key = None\n\n @allure.epic(\"BPM系统\")\n @pytest.mark.parametrize(\"module, interface, title, level, method, url, mime, data, expect, sql_type, sql_sentence, update_key\", ReadExcel().get_data())\n def test_bpm(self, req_fix, db_fix, module, interface, title, level, method, url, mime, data, expect, sql_type, sql_sentence, update_key):\n allure.dynamic.feature(module)\n allure.dynamic.story(interface)\n allure.dynamic.title(title)\n allure.dynamic.severity(level)\n \n # 1.1:判断sql语句的类型是否为delete\n if sql_type == \"delete\":\n # 1.2 使用DB类对象,调用delete方法执行删除的sql语句\n db_fix.delete(sql_sentence)\n # # 1.3 使用RequestsMethod类对象调用request_all方法发送请求\n # result = req_fix.request_all(req_method=method, req_url=url, req_mime=mime, case_data=data)\n \n # 2.1 判断sql语句的类型是否为select\n elif sql_type == \"select\":\n # 2.2 使用DB类对象,调用select方法执行查询的sql语句,并接收查询结果\n select_result = db_fix.select(sql_sentence)\n # 2.3 将查询结果更新到用例数据中\n data[update_key] = select_result\n # # 2.3 使用RequestsMethod类对象调用request_all方法发送请求\n # result = req_fix.request_all(req_method=method, req_url=url, req_mime=mime, case_data=data)\n \n # 3.1 判断sql语句的类型是否delete|select或者为select|delete\n elif sql_type == \"delete|select\" or sql_type == \"select|delete\":\n # 3.2 使用DB类对象,调用delete方法执行删除的sql语句\n db_fix.delete(sql_sentence[\"delete\"])\n # 3.3 使用DB类对象,调用select方法执行查询的sql语句,并接收查询结果\n select_result = db_fix.select(sql_sentence[\"select\"])\n # 3.4 将查询结果更新到用例数据中\n data[update_key] = select_result\n # # 3.5 使用RequestsMethod类对象调用request_all方法发送请求\n # result = req_fix.request_all(req_method=method, req_url=url, req_mime=mime, case_data=data)\n #\n # else:\n # result = req_fix.request_all(req_method=method, req_url=url, req_mime=mime, case_data=data)\n \n result = req_fix.request_all(req_method=method, req_url=url, req_mime=mime, case_data=data)\n \n # 断言\n try:\n for key in expect:\n assert expect[key] == result.json().get(key)\n except:\n print(\"断言失败\")\n logging.error(\"断言失败, 模块名称为:{},接口名称为:{},用例标题:{},用例为:{},期望结果为:{},服务器返回数据为:{}\".format(module, interface, title, str(data), str(expect), result.text))\n> raise AssertionError(\"断言失败\")\nE AssertionError: 断言失败\n\ntest_bpm.py:65: AssertionError"}, "attachments": [{"name": "log", "source": "c72d6b96-8924-4722-abc3-c12ecb6d330b-attachment.txt", "type": "text/plain"}, {"name": "stdout", "source": "43b601c1-982b-4362-8719-b612ea3e51b1-attachment.txt", "type": "text/plain"}], "parameters": [{"name": "module", "value": "'认证接口'"}, {"name": "interface", "value": "'刷新token'"}, {"name": "title", "value": "'正向用例'"}, {"name": "level", "value": "'中'"}, {"name": "method", "value": "'get'"}, {"name": "url", "value": "'http://120.46.172.186:8080/refresh'"}, {"name": "mime", "value": "None"}, {"name": "data", "value": "None"}, {"name": "expect", "value": "{'message': '刷新token成功'}"}, {"name": "sql_type", "value": "None"}, {"name": "sql_sentence", "value": "None"}, {"name": "update_key", "value": "None"}], "start": 1691399022389, "stop": 1691399022444, "uuid": "fdc69955-1b96-4a9a-a8e9-22bc1edcc13b", "historyId": "f368301ce537f1bbd596e0d19f24f393", "testCaseId": "0abeaba8f176b6785a0334bed7c1bdad", "fullName": "test_bpm.TestBPM#test_bpm", "labels": [{"name": "feature", "value": "认证接口"}, {"name": "story", "value": "刷新token"}, {"name": "severity", "value": "中"}, {"name": "epic", "value": "BPM系统"}, {"name": "suite", "value": "test_bpm"}, {"name": "subSuite", "value": "TestBPM"}, {"name": "host", "value": "LAPTOP-31V3JBFR"}, {"name": "thread", "value": "6412-MainThread"}, {"name": "framework", "value": "pytest"}, {"name": "language", "value": "cpython3"}, {"name": "package", "value": "test_bpm"}]}
\ No newline at end of file
{"uuid": "8efe9fce-4424-4087-b959-cb0c75dd2a06", "befores": [{"name": "level", "status": "passed", "start": 1691399023716, "stop": 1691399023716}], "start": 1691399023716, "stop": 1691399023903}
\ No newline at end of file
{"name": "正向用例", "status": "failed", "statusDetails": {"message": "AssertionError: 断言失败", "trace": "self = <InterfaceAutoTest.test_case.test_bpm.TestBPM object at 0x00000257902D2820>\nreq_fix = <InterfaceAutoTest.requests_method.requests_method.RequestsMethod object at 0x00000257902F0490>\ndb_fix = <InterfaceAutoTest.common.db.DB object at 0x00000257903D93D0>, module = '认证接口', interface = '刷新token', title = '正向用例'\nlevel = '中', method = 'get', url = 'http://120.46.172.186:8080/refresh', mime = None, data = None, expect = {'message': '刷新token成功'}\nsql_type = None, sql_sentence = None, update_key = None\n\n @allure.epic(\"BPM系统\")\n @pytest.mark.parametrize(\"module, interface, title, level, method, url, mime, data, expect, sql_type, sql_sentence, update_key\", ReadExcel().get_data())\n def test_bpm(self, req_fix, db_fix, module, interface, title, level, method, url, mime, data, expect, sql_type, sql_sentence, update_key):\n allure.dynamic.feature(module)\n allure.dynamic.story(interface)\n allure.dynamic.title(title)\n allure.dynamic.severity(level)\n \n # 1.1:判断sql语句的类型是否为delete\n if sql_type == \"delete\":\n # 1.2 使用DB类对象,调用delete方法执行删除的sql语句\n db_fix.delete(sql_sentence)\n # # 1.3 使用RequestsMethod类对象调用request_all方法发送请求\n # result = req_fix.request_all(req_method=method, req_url=url, req_mime=mime, case_data=data)\n \n # 2.1 判断sql语句的类型是否为select\n elif sql_type == \"select\":\n # 2.2 使用DB类对象,调用select方法执行查询的sql语句,并接收查询结果\n select_result = db_fix.select(sql_sentence)\n # 2.3 将查询结果更新到用例数据中\n data[update_key] = select_result\n # # 2.3 使用RequestsMethod类对象调用request_all方法发送请求\n # result = req_fix.request_all(req_method=method, req_url=url, req_mime=mime, case_data=data)\n \n # 3.1 判断sql语句的类型是否delete|select或者为select|delete\n elif sql_type == \"delete|select\" or sql_type == \"select|delete\":\n # 3.2 使用DB类对象,调用delete方法执行删除的sql语句\n db_fix.delete(sql_sentence[\"delete\"])\n # 3.3 使用DB类对象,调用select方法执行查询的sql语句,并接收查询结果\n select_result = db_fix.select(sql_sentence[\"select\"])\n # 3.4 将查询结果更新到用例数据中\n data[update_key] = select_result\n # # 3.5 使用RequestsMethod类对象调用request_all方法发送请求\n # result = req_fix.request_all(req_method=method, req_url=url, req_mime=mime, case_data=data)\n #\n # else:\n # result = req_fix.request_all(req_method=method, req_url=url, req_mime=mime, case_data=data)\n \n result = req_fix.request_all(req_method=method, req_url=url, req_mime=mime, case_data=data)\n \n # 断言\n try:\n for key in expect:\n> assert expect[key] == result.json().get(key)\nE AssertionError: assert '刷新token成功' == None\nE + where None = <built-in method get of dict object at 0x00000257904930C0>('message')\nE + where <built-in method get of dict object at 0x00000257904930C0> = {'account': '', 'loginStatus': True, 'token': 'eyJhbGciOiJIUzUxMiJ9.eyJzdWIiOiJhZG1pbiIsInRlbmFudElkIjoiLTEiLCJleHAiOjE2OTE0ODU0MjIsImlhdCI6MTY5MTM5OTAyMn0.AJb0b0Z7fh42A4W3fRFg03S264NwNu1fnWxlbJPlndwduuMj8ujr26RYm5ze6hzk9s5UPzd9oGBhiQAdYo5PRA', 'userAttrs': {}, ...}.get\nE + where {'account': '', 'loginStatus': True, 'token': 'eyJhbGciOiJIUzUxMiJ9.eyJzdWIiOiJhZG1pbiIsInRlbmFudElkIjoiLTEiLCJleHAiOjE2OTE0ODU0MjIsImlhdCI6MTY5MTM5OTAyMn0.AJb0b0Z7fh42A4W3fRFg03S264NwNu1fnWxlbJPlndwduuMj8ujr26RYm5ze6hzk9s5UPzd9oGBhiQAdYo5PRA', 'userAttrs': {}, ...} = <bound method Response.json of <Response [200]>>()\nE + where <bound method Response.json of <Response [200]>> = <Response [200]>.json\n\ntest_bpm.py:61: AssertionError\n\nDuring handling of the above exception, another exception occurred:\n\nself = <InterfaceAutoTest.test_case.test_bpm.TestBPM object at 0x00000257902D2820>\nreq_fix = <InterfaceAutoTest.requests_method.requests_method.RequestsMethod object at 0x00000257902F0490>\ndb_fix = <InterfaceAutoTest.common.db.DB object at 0x00000257903D93D0>, module = '认证接口', interface = '刷新token', title = '正向用例'\nlevel = '中', method = 'get', url = 'http://120.46.172.186:8080/refresh', mime = None, data = None, expect = {'message': '刷新token成功'}\nsql_type = None, sql_sentence = None, update_key = None\n\n @allure.epic(\"BPM系统\")\n @pytest.mark.parametrize(\"module, interface, title, level, method, url, mime, data, expect, sql_type, sql_sentence, update_key\", ReadExcel().get_data())\n def test_bpm(self, req_fix, db_fix, module, interface, title, level, method, url, mime, data, expect, sql_type, sql_sentence, update_key):\n allure.dynamic.feature(module)\n allure.dynamic.story(interface)\n allure.dynamic.title(title)\n allure.dynamic.severity(level)\n \n # 1.1:判断sql语句的类型是否为delete\n if sql_type == \"delete\":\n # 1.2 使用DB类对象,调用delete方法执行删除的sql语句\n db_fix.delete(sql_sentence)\n # # 1.3 使用RequestsMethod类对象调用request_all方法发送请求\n # result = req_fix.request_all(req_method=method, req_url=url, req_mime=mime, case_data=data)\n \n # 2.1 判断sql语句的类型是否为select\n elif sql_type == \"select\":\n # 2.2 使用DB类对象,调用select方法执行查询的sql语句,并接收查询结果\n select_result = db_fix.select(sql_sentence)\n # 2.3 将查询结果更新到用例数据中\n data[update_key] = select_result\n # # 2.3 使用RequestsMethod类对象调用request_all方法发送请求\n # result = req_fix.request_all(req_method=method, req_url=url, req_mime=mime, case_data=data)\n \n # 3.1 判断sql语句的类型是否delete|select或者为select|delete\n elif sql_type == \"delete|select\" or sql_type == \"select|delete\":\n # 3.2 使用DB类对象,调用delete方法执行删除的sql语句\n db_fix.delete(sql_sentence[\"delete\"])\n # 3.3 使用DB类对象,调用select方法执行查询的sql语句,并接收查询结果\n select_result = db_fix.select(sql_sentence[\"select\"])\n # 3.4 将查询结果更新到用例数据中\n data[update_key] = select_result\n # # 3.5 使用RequestsMethod类对象调用request_all方法发送请求\n # result = req_fix.request_all(req_method=method, req_url=url, req_mime=mime, case_data=data)\n #\n # else:\n # result = req_fix.request_all(req_method=method, req_url=url, req_mime=mime, case_data=data)\n \n result = req_fix.request_all(req_method=method, req_url=url, req_mime=mime, case_data=data)\n \n # 断言\n try:\n for key in expect:\n assert expect[key] == result.json().get(key)\n except:\n print(\"断言失败\")\n logging.error(\"断言失败, 模块名称为:{},接口名称为:{},用例标题:{},用例为:{},期望结果为:{},服务器返回数据为:{}\".format(module, interface, title, str(data), str(expect), result.text))\n> raise AssertionError(\"断言失败\")\nE AssertionError: 断言失败\n\ntest_bpm.py:65: AssertionError"}, "attachments": [{"name": "log", "source": "cf5ae6e1-dd5d-4362-949c-8b5bad6b3d16-attachment.txt", "type": "text/plain"}, {"name": "stdout", "source": "23997563-251a-490d-ba25-9448602e8867-attachment.txt", "type": "text/plain"}], "parameters": [{"name": "module", "value": "'认证接口'"}, {"name": "interface", "value": "'刷新token'"}, {"name": "title", "value": "'正向用例'"}, {"name": "level", "value": "'中'"}, {"name": "method", "value": "'get'"}, {"name": "url", "value": "'http://120.46.172.186:8080/refresh'"}, {"name": "mime", "value": "None"}, {"name": "data", "value": "None"}, {"name": "expect", "value": "{'message': '刷新token成功'}"}, {"name": "sql_type", "value": "None"}, {"name": "sql_sentence", "value": "None"}, {"name": "update_key", "value": "None"}], "start": 1691399023476, "stop": 1691399023532, "uuid": "45f212f5-f272-4eb1-b69d-45a966faa567", "historyId": "f368301ce537f1bbd596e0d19f24f393", "testCaseId": "0abeaba8f176b6785a0334bed7c1bdad", "fullName": "test_bpm.TestBPM#test_bpm", "labels": [{"name": "feature", "value": "认证接口"}, {"name": "story", "value": "刷新token"}, {"name": "severity", "value": "中"}, {"name": "epic", "value": "BPM系统"}, {"name": "suite", "value": "test_bpm"}, {"name": "subSuite", "value": "TestBPM"}, {"name": "host", "value": "LAPTOP-31V3JBFR"}, {"name": "thread", "value": "6412-MainThread"}, {"name": "framework", "value": "pytest"}, {"name": "language", "value": "cpython3"}, {"name": "package", "value": "test_bpm"}]}
\ No newline at end of file
{"uuid": "9dda22bc-4529-4426-b31c-e7a5cf0ed021", "befores": [{"name": "update_key", "status": "passed", "start": 1691399017590, "stop": 1691399017590}], "start": 1691399017590, "stop": 1691399017688}
\ No newline at end of file
{"uuid": "fd131fb3-21f8-498c-979f-77483850f812", "befores": [{"name": "data", "status": "passed", "start": 1691399023909, "stop": 1691399023909}], "start": 1691399023909, "stop": 1691399023985}
\ No newline at end of file
{"uuid": "446b450a-911a-4bf0-b791-aa80d342df0a", "befores": [{"name": "level", "status": "passed", "start": 1691399029836, "stop": 1691399029836}], "start": 1691399029836, "stop": 1691399029984}
\ No newline at end of file
{"uuid": "7d2e5e38-7cbd-458b-8878-aa705a8b0ff6", "befores": [{"name": "level", "status": "passed", "start": 1691399026335, "stop": 1691399026335}], "start": 1691399026335, "stop": 1691399026483}
\ No newline at end of file
{"uuid": "057ddd26-d5cf-43e0-805a-c03ff33eab8a", "befores": [{"name": "expect", "status": "passed", "start": 1691399023475, "stop": 1691399023475}], "start": 1691399023475, "stop": 1691399023550}
\ No newline at end of file
{"uuid": "0f85b218-68c3-46e0-a8cd-15cf4de2c549", "befores": [{"name": "update_key", "status": "passed", "start": 1691399017043, "stop": 1691399017043}], "start": 1691399017043, "stop": 1691399017142}
\ No newline at end of file
DEBUG--2023-08-07 17:03:37--Resetting dropped connection: 120.46.172.186
DEBUG--2023-08-07 17:03:37--http://120.46.172.186:8080 "POST /auth HTTP/1.1" 500 None
\ No newline at end of file
{"uuid": "e21ac951-7971-4e2b-8e86-7f141403e9f6", "befores": [{"name": "update_key", "status": "passed", "start": 1691399017269, "stop": 1691399017269}], "start": 1691399017269, "stop": 1691399017364}
\ No newline at end of file
{"uuid": "a643b6c6-13a2-497b-9c44-fe741a6ec96e", "befores": [{"name": "url", "status": "passed", "start": 1691399016938, "stop": 1691399016938}], "start": 1691399016938, "stop": 1691399017035}
\ No newline at end of file
{"uuid": "382945e0-0140-473a-a406-72ff01c1705b", "befores": [{"name": "update_key", "status": "passed", "start": 1691399023560, "stop": 1691399023560}], "start": 1691399023560, "stop": 1691399023702}
\ No newline at end of file
{"uuid": "068fbccb-3fdf-48da-aad1-482e0ce384a7", "befores": [{"name": "level", "status": "passed", "start": 1691399021306, "stop": 1691399021306}], "start": 1691399021306, "stop": 1691399021377}
\ No newline at end of file
{"uuid": "34a926e6-cb15-4ae6-b287-6a96da224608", "befores": [{"name": "title", "status": "passed", "start": 1691399023992, "stop": 1691399023992}], "start": 1691399023992, "stop": 1691399024059}
\ No newline at end of file
{"uuid": "234dac90-5565-44af-9b6c-d608d36b084c", "befores": [{"name": "title", "status": "passed", "start": 1691399025190, "stop": 1691399025190}], "start": 1691399025190, "stop": 1691399025311}
\ No newline at end of file
DEBUG--2023-08-07 17:03:44--http://120.46.172.186:8080 "DELETE /api/demension/v1/dem/deleteDemByIds?ids=1688475997541777408 HTTP/1.1" 200 None
ERROR--2023-08-07 17:03:44--断言失败, 模块名称为:维度管理,接口名称为:根据维度编码删除维度,用例标题:正向用例,用例为:{'ids': '1688475997541777408'},期望结果为:{'state': True, 'message': '删除维度成功'},服务器返回数据为:{"state":true,"message":"删除维度成功!","value":""}
DEBUG--2023-08-07 17:03:45--http://120.46.172.186:8080 "DELETE /api/demension/v1/dem/deleteDemByIds?ids=1688475997541777408 HTTP/1.1" 500 None
ERROR--2023-08-07 17:03:45--断言失败, 模块名称为:维度管理,接口名称为:根据维度编码删除维度,用例标题:正向用例,用例为:{'ids': '1688475997541777408'},期望结果为:{'state': True, 'message': '删除维度成功'},服务器返回数据为:{"state":false,"message":"","logId":"1688476004198137856"}
\ No newline at end of file
{"uuid": "dbd4c9be-7097-468c-b876-315a134ffda4", "befores": [{"name": "expect", "status": "passed", "start": 1691399024064, "stop": 1691399024064}], "start": 1691399024064, "stop": 1691399024177}
\ No newline at end of file
{"uuid": "0ade4ac6-f8eb-43e5-8a1c-b1104d76746a", "befores": [{"name": "level", "status": "passed", "start": 1691399016937, "stop": 1691399016937}], "start": 1691399016937, "stop": 1691399017036}
\ No newline at end of file
{"uuid": "54130189-801d-4f3c-9876-d27bf6a92f8d", "befores": [{"name": "expect", "status": "passed", "start": 1691399017478, "stop": 1691399017478}], "start": 1691399017478, "stop": 1691399017579}
\ No newline at end of file
{"name": "正向用例", "status": "passed", "attachments": [{"name": "log", "source": "c4cf6841-3b06-4d14-99b2-dbf07a2eaaf7-attachment.txt", "type": "text/plain"}, {"name": "stdout", "source": "e3b960eb-e13e-4661-804d-d9cc6d4b8bbd-attachment.txt", "type": "text/plain"}], "parameters": [{"name": "module", "value": "'维度管理'"}, {"name": "interface", "value": "'添加维度'"}, {"name": "title", "value": "'正向用例'"}, {"name": "level", "value": "'高'"}, {"name": "method", "value": "'post'"}, {"name": "url", "value": "'http://120.46.172.186:8080/api/demension/v1/dem/addDem'"}, {"name": "mime", "value": "'application/json'"}, {"name": "data", "value": "{'code': 'test56_dem', 'description': '测试56期的维度', 'isDefault': 0, 'name': '测试56期的维度'}"}, {"name": "expect", "value": "{'state': True, 'message': '添加维度成功!'}"}, {"name": "sql_type", "value": "'delete'"}, {"name": "sql_sentence", "value": "'DELETE FROM uc_demension WHERE `CODE_`=\"test56_dem\";'"}, {"name": "update_key", "value": "None"}], "start": 1691399023560, "stop": 1691399023701, "uuid": "f1093db1-23cd-4e4d-90d7-4a7765da3e6c", "historyId": "4db60c6a5deceb5e4bfbe2c9fd4ed59b", "testCaseId": "0abeaba8f176b6785a0334bed7c1bdad", "fullName": "test_bpm.TestBPM#test_bpm", "labels": [{"name": "feature", "value": "维度管理"}, {"name": "story", "value": "添加维度"}, {"name": "severity", "value": "高"}, {"name": "epic", "value": "BPM系统"}, {"name": "suite", "value": "test_bpm"}, {"name": "subSuite", "value": "TestBPM"}, {"name": "host", "value": "LAPTOP-31V3JBFR"}, {"name": "thread", "value": "6412-MainThread"}, {"name": "framework", "value": "pytest"}, {"name": "language", "value": "cpython3"}, {"name": "package", "value": "test_bpm"}]}
\ No newline at end of file
{"uuid": "2f1d6db9-5edb-4cbd-bc58-22259decafaa", "befores": [{"name": "interface", "status": "passed", "start": 1691399023992, "stop": 1691399023992}], "start": 1691399023992, "stop": 1691399024059}
\ No newline at end of file
{"uuid": "ade1de44-e1c0-416b-8747-ae291111833c", "befores": [{"name": "update_key", "status": "passed", "start": 1691399026336, "stop": 1691399026336}], "start": 1691399026336, "stop": 1691399026477}
\ No newline at end of file
{"uuid": "a1c68907-6a5f-4673-a96f-56baee74b162", "befores": [{"name": "interface", "status": "passed", "start": 1691399017155, "stop": 1691399017155}], "start": 1691399017155, "stop": 1691399017263}
\ No newline at end of file
{"uuid": "4deb6af8-84ce-439a-bcb5-79a975bf3feb", "befores": [{"name": "url", "status": "passed", "start": 1691399020197, "stop": 1691399020197}], "start": 1691399020197, "stop": 1691399020275}
\ No newline at end of file
{"uuid": "c780dff9-47fe-4851-b01b-716224122ed3", "befores": [{"name": "data", "status": "passed", "start": 1691399017807, "stop": 1691399017807}], "start": 1691399017807, "stop": 1691399018083}
\ No newline at end of file
{"uuid": "be867a06-43c7-4299-9007-521fdea696a0", "befores": [{"name": "mime", "status": "passed", "start": 1691399023475, "stop": 1691399023475}], "start": 1691399023475, "stop": 1691399023551}
\ No newline at end of file
{"uuid": "cdb585c3-8ee4-419f-85e4-eb5c7e03e376", "befores": [{"name": "expect", "status": "passed", "start": 1691399023559, "stop": 1691399023559}], "start": 1691399023559, "stop": 1691399023704}
\ No newline at end of file
DEBUG--2023-08-07 17:03:36--http://120.46.172.186:8080 "POST /auth HTTP/1.1" 500 None
\ No newline at end of file
{"uuid": "9c6db673-f4a1-4dda-adc9-5614b5fde146", "befores": [{"name": "module", "status": "passed", "start": 1691399019101, "stop": 1691399019101}], "start": 1691399019101, "stop": 1691399019172}
\ No newline at end of file
{"uuid": "5396f24a-fc1d-412e-8c19-834e57b9adae", "befores": [{"name": "expect", "status": "passed", "start": 1691399017807, "stop": 1691399017807}], "start": 1691399017807, "stop": 1691399018082}
\ No newline at end of file
{"uuid": "23ed237c-cb09-4bf9-acee-04d8d66bb494", "befores": [{"name": "title", "status": "passed", "start": 1691399024064, "stop": 1691399024064}], "start": 1691399024064, "stop": 1691399024180}
\ No newline at end of file
{"uuid": "1d3d14f8-f39d-47da-89bc-772d6a8b9e05", "befores": [{"name": "mime", "status": "passed", "start": 1691399016871, "stop": 1691399016871}], "start": 1691399016871, "stop": 1691399016929}
\ No newline at end of file
DEBUG--2023-08-07 17:03:37--Resetting dropped connection: 120.46.172.186
DEBUG--2023-08-07 17:03:37--http://120.46.172.186:8080 "POST /auth HTTP/1.1" 500 None
\ No newline at end of file
{"uuid": "b8b93ddf-ad12-4c93-99bf-01d552e7b549", "befores": [{"name": "mime", "status": "passed", "start": 1691399017269, "stop": 1691399017269}], "start": 1691399017269, "stop": 1691399017367}
\ No newline at end of file
{"uuid": "c2cbba40-519d-45a1-8cb1-29391ed2fdee", "befores": [{"name": "update_key", "status": "passed", "start": 1691399017478, "stop": 1691399017478}], "start": 1691399017478, "stop": 1691399017576}
\ No newline at end of file
{"uuid": "138d3f78-6788-480b-afd4-04534a9ae0b5", "befores": [{"name": "level", "status": "passed", "start": 1691399020197, "stop": 1691399020197}], "start": 1691399020197, "stop": 1691399020276}
\ No newline at end of file
{"uuid": "4f2dcb0e-d460-4a05-82ef-5fa07bbe683e", "befores": [{"name": "mime", "status": "passed", "start": 1691399017155, "stop": 1691399017155}], "start": 1691399017155, "stop": 1691399017260}
\ No newline at end of file
{"uuid": "8603b179-df2e-4d90-9e2c-aefed8713341", "befores": [{"name": "update_key", "status": "passed", "start": 1691399027504, "stop": 1691399027504}], "start": 1691399027504, "stop": 1691399027643}
\ No newline at end of file
{"uuid": "df1d1052-6db5-4469-86ef-d15f66323f24", "befores": [{"name": "mime", "status": "passed", "start": 1691399029837, "stop": 1691399029837}], "start": 1691399029837, "stop": 1691399029983}
\ No newline at end of file
{"uuid": "3ebfc885-38ff-4909-bde0-b68bf8ed8cc0", "befores": [{"name": "sql_type", "status": "passed", "start": 1691399017374, "stop": 1691399017374}], "start": 1691399017374, "stop": 1691399017468}
\ No newline at end of file
{"uuid": "a6d8c0b0-9d07-4f4f-9056-8bf1d80d1e4e", "befores": [{"name": "mime", "status": "passed", "start": 1691399017043, "stop": 1691399017043}], "start": 1691399017043, "stop": 1691399017147}
\ No newline at end of file
{"uuid": "1fa7530c-9bbb-4094-972d-b994de7f90e5", "befores": [{"name": "title", "status": "passed", "start": 1691399021306, "stop": 1691399021306}], "start": 1691399021306, "stop": 1691399021377}
\ No newline at end of file
DEBUG--2023-08-07 17:03:36--Looking for locale `en_US` in provider `faker.providers.address`.
DEBUG--2023-08-07 17:03:36--Provider `faker.providers.address` has been localized to `en_US`.
DEBUG--2023-08-07 17:03:36--Looking for locale `en_US` in provider `faker.providers.automotive`.
DEBUG--2023-08-07 17:03:36--Provider `faker.providers.automotive` has been localized to `en_US`.
DEBUG--2023-08-07 17:03:36--Looking for locale `en_US` in provider `faker.providers.bank`.
DEBUG--2023-08-07 17:03:36--Specified locale `en_US` is not available for provider `faker.providers.bank`. Locale reset to `en_GB` for this provider.
DEBUG--2023-08-07 17:03:36--Looking for locale `en_US` in provider `faker.providers.barcode`.
DEBUG--2023-08-07 17:03:36--Provider `faker.providers.barcode` has been localized to `en_US`.
DEBUG--2023-08-07 17:03:36--Looking for locale `en_US` in provider `faker.providers.color`.
DEBUG--2023-08-07 17:03:36--Provider `faker.providers.color` has been localized to `en_US`.
DEBUG--2023-08-07 17:03:36--Looking for locale `en_US` in provider `faker.providers.company`.
DEBUG--2023-08-07 17:03:36--Provider `faker.providers.company` has been localized to `en_US`.
DEBUG--2023-08-07 17:03:36--Looking for locale `en_US` in provider `faker.providers.credit_card`.
DEBUG--2023-08-07 17:03:36--Provider `faker.providers.credit_card` has been localized to `en_US`.
DEBUG--2023-08-07 17:03:36--Looking for locale `en_US` in provider `faker.providers.currency`.
DEBUG--2023-08-07 17:03:36--Provider `faker.providers.currency` has been localized to `en_US`.
DEBUG--2023-08-07 17:03:36--Looking for locale `en_US` in provider `faker.providers.date_time`.
DEBUG--2023-08-07 17:03:36--Provider `faker.providers.date_time` has been localized to `en_US`.
DEBUG--2023-08-07 17:03:36--Provider `faker.providers.emoji` does not feature localization. Specified locale `en_US` is not utilized for this provider.
DEBUG--2023-08-07 17:03:36--Provider `faker.providers.file` does not feature localization. Specified locale `en_US` is not utilized for this provider.
DEBUG--2023-08-07 17:03:36--Looking for locale `en_US` in provider `faker.providers.geo`.
DEBUG--2023-08-07 17:03:36--Provider `faker.providers.geo` has been localized to `en_US`.
DEBUG--2023-08-07 17:03:36--Looking for locale `en_US` in provider `faker.providers.internet`.
DEBUG--2023-08-07 17:03:36--Provider `faker.providers.internet` has been localized to `en_US`.
DEBUG--2023-08-07 17:03:36--Provider `faker.providers.isbn` does not feature localization. Specified locale `en_US` is not utilized for this provider.
DEBUG--2023-08-07 17:03:36--Looking for locale `en_US` in provider `faker.providers.job`.
DEBUG--2023-08-07 17:03:36--Provider `faker.providers.job` has been localized to `en_US`.
DEBUG--2023-08-07 17:03:36--Looking for locale `en_US` in provider `faker.providers.lorem`.
DEBUG--2023-08-07 17:03:36--Provider `faker.providers.lorem` has been localized to `en_US`.
DEBUG--2023-08-07 17:03:36--Looking for locale `en_US` in provider `faker.providers.misc`.
DEBUG--2023-08-07 17:03:36--Provider `faker.providers.misc` has been localized to `en_US`.
DEBUG--2023-08-07 17:03:36--Looking for locale `en_US` in provider `faker.providers.passport`.
DEBUG--2023-08-07 17:03:36--Provider `faker.providers.passport` has been localized to `en_US`.
DEBUG--2023-08-07 17:03:36--Looking for locale `en_US` in provider `faker.providers.person`.
DEBUG--2023-08-07 17:03:36--Provider `faker.providers.person` has been localized to `en_US`.
DEBUG--2023-08-07 17:03:36--Looking for locale `en_US` in provider `faker.providers.phone_number`.
DEBUG--2023-08-07 17:03:36--Provider `faker.providers.phone_number` has been localized to `en_US`.
DEBUG--2023-08-07 17:03:36--Provider `faker.providers.profile` does not feature localization. Specified locale `en_US` is not utilized for this provider.
DEBUG--2023-08-07 17:03:36--Provider `faker.providers.python` does not feature localization. Specified locale `en_US` is not utilized for this provider.
DEBUG--2023-08-07 17:03:36--Provider `faker.providers.sbn` does not feature localization. Specified locale `en_US` is not utilized for this provider.
DEBUG--2023-08-07 17:03:36--Looking for locale `en_US` in provider `faker.providers.ssn`.
DEBUG--2023-08-07 17:03:36--Provider `faker.providers.ssn` has been localized to `en_US`.
DEBUG--2023-08-07 17:03:36--Provider `faker.providers.user_agent` does not feature localization. Specified locale `en_US` is not utilized for this provider.
DEBUG--2023-08-07 17:03:36--Starting new HTTP connection (1): 120.46.172.186:8080
DEBUG--2023-08-07 17:03:36--http://120.46.172.186:8080 "POST /auth HTTP/1.1" 200 None
DEBUG--2023-08-07 17:03:36--http://120.46.172.186:8080 "POST /auth HTTP/1.1" 200 None
\ No newline at end of file
{"uuid": "459d82ef-9012-46d3-bbc5-4065e9f98f55", "befores": [{"name": "module", "status": "passed", "start": 1691399016937, "stop": 1691399016937}], "start": 1691399016937, "stop": 1691399017038}
\ No newline at end of file
{"uuid": "8807e286-ea29-4d88-b7be-95e1da973158", "befores": [{"name": "sql_sentence", "status": "passed", "start": 1691399016938, "stop": 1691399016938}], "start": 1691399016938, "stop": 1691399017032}
\ No newline at end of file
{"uuid": "29bbf0eb-b3d8-4be0-bd2f-5b782ba21f9b", "befores": [{"name": "data", "status": "passed", "start": 1691399023559, "stop": 1691399023559}], "start": 1691399023559, "stop": 1691399023704}
\ No newline at end of file
{"uuid": "6d266fdf-6484-4971-a16f-2b7304a2b5c4", "befores": [{"name": "level", "status": "passed", "start": 1691399019101, "stop": 1691399019101}], "start": 1691399019101, "stop": 1691399019171}
\ No newline at end of file
{"uuid": "4df9bbdc-77e8-490f-9621-23c04d662d6d", "befores": [{"name": "data", "status": "passed", "start": 1691399017699, "stop": 1691399017699}], "start": 1691399017699, "stop": 1691399017797}
\ No newline at end of file
{"uuid": "e597eb61-f810-4b35-af69-c7a78f4c630c", "befores": [{"name": "url", "status": "passed", "start": 1691399023716, "stop": 1691399023717}], "start": 1691399023716, "stop": 1691399023902}
\ No newline at end of file
{"uuid": "703dfec7-ba73-47ab-9d8e-039adebe69be", "befores": [{"name": "url", "status": "passed", "start": 1691399027503, "stop": 1691399027504}], "start": 1691399027503, "stop": 1691399027656}
\ No newline at end of file
{"name": "正向用例", "status": "passed", "attachments": [{"name": "log", "source": "ed56e382-348a-4d00-931b-41507937c5da-attachment.txt", "type": "text/plain"}, {"name": "stdout", "source": "9b5226d4-6adc-44bd-a963-a113a77a27bb-attachment.txt", "type": "text/plain"}], "parameters": [{"name": "module", "value": "'认证接口'"}, {"name": "interface", "value": "'登录系统'"}, {"name": "title", "value": "'正向用例'"}, {"name": "level", "value": "'高'"}, {"name": "method", "value": "'POST'"}, {"name": "url", "value": "'http://120.46.172.186:8080/auth'"}, {"name": "mime", "value": "'application/json'"}, {"name": "data", "value": "{'password': 'MTIzNDU2', 'username': 'admin'}"}, {"name": "expect", "value": "{'username': '超级管理员', 'account': 'admin'}"}, {"name": "sql_type", "value": "None"}, {"name": "sql_sentence", "value": "None"}, {"name": "update_key", "value": "None"}], "start": 1691399016791, "stop": 1691399016848, "uuid": "5783b43e-e54b-4660-adfe-2079911bd915", "historyId": "98357aace79429a96dcb36c173fbfa06", "testCaseId": "0abeaba8f176b6785a0334bed7c1bdad", "fullName": "test_bpm.TestBPM#test_bpm", "labels": [{"name": "feature", "value": "认证接口"}, {"name": "story", "value": "登录系统"}, {"name": "severity", "value": "高"}, {"name": "epic", "value": "BPM系统"}, {"name": "suite", "value": "test_bpm"}, {"name": "subSuite", "value": "TestBPM"}, {"name": "host", "value": "LAPTOP-31V3JBFR"}, {"name": "thread", "value": "6412-MainThread"}, {"name": "framework", "value": "pytest"}, {"name": "language", "value": "cpython3"}, {"name": "package", "value": "test_bpm"}]}
\ No newline at end of file
{"uuid": "e897efc4-7ac6-43d9-9855-da322d9216f0", "befores": [{"name": "module", "status": "passed", "start": 1691399017698, "stop": 1691399017698}], "start": 1691399017698, "stop": 1691399017801}
\ No newline at end of file
{"uuid": "85700331-eae7-487d-816a-0d16cd226035", "befores": [{"name": "level", "status": "passed", "start": 1691399027503, "stop": 1691399027503}], "start": 1691399027503, "stop": 1691399027656}
\ No newline at end of file
{"uuid": "684289de-283a-4b48-81f1-6941b6e4ac69", "befores": [{"name": "expect", "status": "passed", "start": 1691399023992, "stop": 1691399023992}], "start": 1691399023992, "stop": 1691399024055}
\ No newline at end of file
{"uuid": "300d1bc2-a33d-4f36-b8c0-d66f3ed7c033", "befores": [{"name": "sql_sentence", "status": "passed", "start": 1691399026336, "stop": 1691399026336}], "start": 1691399026336, "stop": 1691399026478}
\ No newline at end of file
{"uuid": "047d3d48-ee4d-405e-8c25-04f628db9da8", "befores": [{"name": "module", "status": "passed", "start": 1691399016871, "stop": 1691399016871}], "start": 1691399016871, "stop": 1691399016932}
\ No newline at end of file
{"name": "正向用例", "status": "failed", "statusDetails": {"message": "AssertionError: 断言失败", "trace": "self = <InterfaceAutoTest.test_case.test_bpm.TestBPM object at 0x00000257902F01C0>\nreq_fix = <InterfaceAutoTest.requests_method.requests_method.RequestsMethod object at 0x00000257902F0490>\ndb_fix = <InterfaceAutoTest.common.db.DB object at 0x00000257903D93D0>, module = '维度管理', interface = '根据维度编码删除维度', title = '正向用例'\nlevel = '高', method = 'DELETE', url = 'http://120.46.172.186:8080/api/demension/v1/dem/deleteDemByIds', mime = 'query'\ndata = {'ids': '1688475997541777408'}, expect = {'message': '删除维度成功', 'state': True}, sql_type = 'select'\nsql_sentence = 'SELECT ID_ FROM uc_demension WHERE `CODE_`=\"test56_dem\";', update_key = 'ids'\n\n @allure.epic(\"BPM系统\")\n @pytest.mark.parametrize(\"module, interface, title, level, method, url, mime, data, expect, sql_type, sql_sentence, update_key\", ReadExcel().get_data())\n def test_bpm(self, req_fix, db_fix, module, interface, title, level, method, url, mime, data, expect, sql_type, sql_sentence, update_key):\n allure.dynamic.feature(module)\n allure.dynamic.story(interface)\n allure.dynamic.title(title)\n allure.dynamic.severity(level)\n \n # 1.1:判断sql语句的类型是否为delete\n if sql_type == \"delete\":\n # 1.2 使用DB类对象,调用delete方法执行删除的sql语句\n db_fix.delete(sql_sentence)\n # # 1.3 使用RequestsMethod类对象调用request_all方法发送请求\n # result = req_fix.request_all(req_method=method, req_url=url, req_mime=mime, case_data=data)\n \n # 2.1 判断sql语句的类型是否为select\n elif sql_type == \"select\":\n # 2.2 使用DB类对象,调用select方法执行查询的sql语句,并接收查询结果\n select_result = db_fix.select(sql_sentence)\n # 2.3 将查询结果更新到用例数据中\n data[update_key] = select_result\n # # 2.3 使用RequestsMethod类对象调用request_all方法发送请求\n # result = req_fix.request_all(req_method=method, req_url=url, req_mime=mime, case_data=data)\n \n # 3.1 判断sql语句的类型是否delete|select或者为select|delete\n elif sql_type == \"delete|select\" or sql_type == \"select|delete\":\n # 3.2 使用DB类对象,调用delete方法执行删除的sql语句\n db_fix.delete(sql_sentence[\"delete\"])\n # 3.3 使用DB类对象,调用select方法执行查询的sql语句,并接收查询结果\n select_result = db_fix.select(sql_sentence[\"select\"])\n # 3.4 将查询结果更新到用例数据中\n data[update_key] = select_result\n # # 3.5 使用RequestsMethod类对象调用request_all方法发送请求\n # result = req_fix.request_all(req_method=method, req_url=url, req_mime=mime, case_data=data)\n #\n # else:\n # result = req_fix.request_all(req_method=method, req_url=url, req_mime=mime, case_data=data)\n \n result = req_fix.request_all(req_method=method, req_url=url, req_mime=mime, case_data=data)\n \n # 断言\n try:\n for key in expect:\n> assert expect[key] == result.json().get(key)\nE AssertionError: assert True == False\nE + where False = <built-in method get of dict object at 0x00000257904741C0>('state')\nE + where <built-in method get of dict object at 0x00000257904741C0> = {'logId': '1688476009176776704', 'message': '', 'state': False}.get\nE + where {'logId': '1688476009176776704', 'message': '', 'state': False} = <bound method Response.json of <Response [500]>>()\nE + where <bound method Response.json of <Response [500]>> = <Response [500]>.json\n\ntest_bpm.py:61: AssertionError\n\nDuring handling of the above exception, another exception occurred:\n\nself = <InterfaceAutoTest.test_case.test_bpm.TestBPM object at 0x00000257902F01C0>\nreq_fix = <InterfaceAutoTest.requests_method.requests_method.RequestsMethod object at 0x00000257902F0490>\ndb_fix = <InterfaceAutoTest.common.db.DB object at 0x00000257903D93D0>, module = '维度管理', interface = '根据维度编码删除维度', title = '正向用例'\nlevel = '高', method = 'DELETE', url = 'http://120.46.172.186:8080/api/demension/v1/dem/deleteDemByIds', mime = 'query'\ndata = {'ids': '1688475997541777408'}, expect = {'message': '删除维度成功', 'state': True}, sql_type = 'select'\nsql_sentence = 'SELECT ID_ FROM uc_demension WHERE `CODE_`=\"test56_dem\";', update_key = 'ids'\n\n @allure.epic(\"BPM系统\")\n @pytest.mark.parametrize(\"module, interface, title, level, method, url, mime, data, expect, sql_type, sql_sentence, update_key\", ReadExcel().get_data())\n def test_bpm(self, req_fix, db_fix, module, interface, title, level, method, url, mime, data, expect, sql_type, sql_sentence, update_key):\n allure.dynamic.feature(module)\n allure.dynamic.story(interface)\n allure.dynamic.title(title)\n allure.dynamic.severity(level)\n \n # 1.1:判断sql语句的类型是否为delete\n if sql_type == \"delete\":\n # 1.2 使用DB类对象,调用delete方法执行删除的sql语句\n db_fix.delete(sql_sentence)\n # # 1.3 使用RequestsMethod类对象调用request_all方法发送请求\n # result = req_fix.request_all(req_method=method, req_url=url, req_mime=mime, case_data=data)\n \n # 2.1 判断sql语句的类型是否为select\n elif sql_type == \"select\":\n # 2.2 使用DB类对象,调用select方法执行查询的sql语句,并接收查询结果\n select_result = db_fix.select(sql_sentence)\n # 2.3 将查询结果更新到用例数据中\n data[update_key] = select_result\n # # 2.3 使用RequestsMethod类对象调用request_all方法发送请求\n # result = req_fix.request_all(req_method=method, req_url=url, req_mime=mime, case_data=data)\n \n # 3.1 判断sql语句的类型是否delete|select或者为select|delete\n elif sql_type == \"delete|select\" or sql_type == \"select|delete\":\n # 3.2 使用DB类对象,调用delete方法执行删除的sql语句\n db_fix.delete(sql_sentence[\"delete\"])\n # 3.3 使用DB类对象,调用select方法执行查询的sql语句,并接收查询结果\n select_result = db_fix.select(sql_sentence[\"select\"])\n # 3.4 将查询结果更新到用例数据中\n data[update_key] = select_result\n # # 3.5 使用RequestsMethod类对象调用request_all方法发送请求\n # result = req_fix.request_all(req_method=method, req_url=url, req_mime=mime, case_data=data)\n #\n # else:\n # result = req_fix.request_all(req_method=method, req_url=url, req_mime=mime, case_data=data)\n \n result = req_fix.request_all(req_method=method, req_url=url, req_mime=mime, case_data=data)\n \n # 断言\n try:\n for key in expect:\n assert expect[key] == result.json().get(key)\n except:\n print(\"断言失败\")\n logging.error(\"断言失败, 模块名称为:{},接口名称为:{},用例标题:{},用例为:{},期望结果为:{},服务器返回数据为:{}\".format(module, interface, title, str(data), str(expect), result.text))\n> raise AssertionError(\"断言失败\")\nE AssertionError: 断言失败\n\ntest_bpm.py:65: AssertionError"}, "attachments": [{"name": "log", "source": "7a261e07-fe4c-4f8e-b1ca-a526bbb21fc6-attachment.txt", "type": "text/plain"}, {"name": "stdout", "source": "3fabcee9-152b-4562-ad53-f0efadc893ae-attachment.txt", "type": "text/plain"}], "parameters": [{"name": "module", "value": "'维度管理'"}, {"name": "interface", "value": "'根据维度编码删除维度'"}, {"name": "title", "value": "'正向用例'"}, {"name": "level", "value": "'高'"}, {"name": "method", "value": "'DELETE'"}, {"name": "url", "value": "'http://120.46.172.186:8080/api/demension/v1/dem/deleteDemByIds'"}, {"name": "mime", "value": "'query'"}, {"name": "data", "value": "{'ids': '1688475997541777408'}"}, {"name": "expect", "value": "{'state': True, 'message': '删除维度成功'}"}, {"name": "sql_type", "value": "'select'"}, {"name": "sql_sentence", "value": "'SELECT ID_ FROM uc_demension WHERE `CODE_`=\"test56_dem\";'"}, {"name": "update_key", "value": "'ids'"}], "start": 1691399026336, "stop": 1691399026470, "uuid": "13282a84-553b-4953-bcbb-837a60003d28", "historyId": "f37f5b35a33b0d851ad30e5c966f4068", "testCaseId": "0abeaba8f176b6785a0334bed7c1bdad", "fullName": "test_bpm.TestBPM#test_bpm", "labels": [{"name": "feature", "value": "维度管理"}, {"name": "story", "value": "根据维度编码删除维度"}, {"name": "severity", "value": "高"}, {"name": "epic", "value": "BPM系统"}, {"name": "suite", "value": "test_bpm"}, {"name": "subSuite", "value": "TestBPM"}, {"name": "host", "value": "LAPTOP-31V3JBFR"}, {"name": "thread", "value": "6412-MainThread"}, {"name": "framework", "value": "pytest"}, {"name": "language", "value": "cpython3"}, {"name": "package", "value": "test_bpm"}]}
\ No newline at end of file
{"uuid": "2c130b02-b65e-4d70-a528-277b8c979dc9", "befores": [{"name": "title", "status": "passed", "start": 1691399020197, "stop": 1691399020197}], "start": 1691399020197, "stop": 1691399020276}
\ No newline at end of file
{"uuid": "8e60c27b-c7f1-44a4-9116-f046e6236185", "befores": [{"name": "method", "status": "passed", "start": 1691399023908, "stop": 1691399023908}], "start": 1691399023908, "stop": 1691399023986}
\ No newline at end of file
{"uuid": "a4f9aff1-61ae-4372-85f6-53f5fdec446f", "befores": [{"name": "sql_type", "status": "passed", "start": 1691399019102, "stop": 1691399019102}], "start": 1691399019102, "stop": 1691399019167}
\ No newline at end of file
{"uuid": "7d158f23-375f-4752-9b15-5d2939625217", "befores": [{"name": "data", "status": "passed", "start": 1691399019102, "stop": 1691399019102}], "start": 1691399019102, "stop": 1691399019168}
\ No newline at end of file
{"uuid": "bb2309e4-2afb-418b-82d9-10474f43a175", "befores": [{"name": "sql_type", "status": "passed", "start": 1691399017155, "stop": 1691399017155}], "start": 1691399017155, "stop": 1691399017259}
\ No newline at end of file
{"uuid": "86076bd5-f3fa-4dd5-9e71-afb7389b8b41", "befores": [{"name": "method", "status": "passed", "start": 1691399017155, "stop": 1691399017155}], "start": 1691399017155, "stop": 1691399017261}
\ No newline at end of file
{"uuid": "acb3bd9f-dde1-4a52-acdd-389ca54f2bf9", "befores": [{"name": "module", "status": "passed", "start": 1691399023992, "stop": 1691399023992}], "start": 1691399023992, "stop": 1691399024059}
\ No newline at end of file
{"uuid": "47c1d2c7-fde1-49d0-bc7e-73fa21450e8c", "befores": [{"name": "mime", "status": "passed", "start": 1691399016938, "stop": 1691399016938}], "start": 1691399016938, "stop": 1691399017034}
\ No newline at end of file
ERROR--2023-08-07 17:37:29--断言失败, 模块名称为:认证接口,接口名称为:刷新token,用例标题:正向用例,用例为:None,期望结果为:{'message': '刷新token成功'},服务器返回数据为:{"token":"eyJhbGciOiJIUzUxMiJ9.eyJzdWIiOiJhZG1pbiIsInRlbmFudElkIjoiLTEiLCJleHAiOjE2OTE0ODc0NDgsImlhdCI6MTY5MTQwMTA0OH0.gt54v-T-WCOpa8k3UN4pnu2LlcEKlXTYvBZE0el83By0D_BgdWSzE-hsqdAwM-NvH9j6jfyfUZLKB4cYibM3tQ","username":"","account":"","userId":"","loginStatus":true,"userAttrs":{}}
ERROR--2023-08-07 17:37:29--断言失败, 模块名称为:认证接口,接口名称为:刷新token,用例标题:正向用例,用例为:None,期望结果为:{'message': '刷新token成功'},服务器返回数据为:{"token":"eyJhbGciOiJIUzUxMiJ9.eyJzdWIiOiJhZG1pbiIsInRlbmFudElkIjoiLTEiLCJleHAiOjE2OTE0ODc0NDgsImlhdCI6MTY5MTQwMTA0OH0.gt54v-T-WCOpa8k3UN4pnu2LlcEKlXTYvBZE0el83By0D_BgdWSzE-hsqdAwM-NvH9j6jfyfUZLKB4cYibM3tQ","username":"","account":"","userId":"","loginStatus":true,"userAttrs":{}}
ERROR--2023-08-07 17:37:30--断言失败, 模块名称为:维度管理,接口名称为:根据维度编码删除维度,用例标题:正向用例,用例为:{'ids': '1688484496363503616'},期望结果为:{'state': True, 'message': '删除维度成功'},服务器返回数据为:{"state":true,"message":"删除维度成功!","value":""}
This source diff could not be displayed because it is too large. You can view the blob instead.
# -*-coding:utf-8 -*- #
# ---------------------------------------------------------------------------
# ProjectName: test_56
# FileName: __init__.py
# Author: xxxxxxx
# Datetime: 2023/8/7 15:20
# Description:
#
# ---------------------------------------------------------------------------
# -*-coding:utf-8 -*- # # -*-coding:utf-8 -*- #
# --------------------------------------------------------------------------- # ---------------------------------------------------------------------------
# ProjectName: study_py # ProjectName: test_56
# FileName: requests_method.py # FileName: requests_method.py
# Author: gff # Author: xxxxxxx
# Datetime: 2023/8/7 19:49 # Datetime: 2023/8/7 15:47
# Description: # Description:
#
# --------------------------------------------------------------------------- # ---------------------------------------------------------------------------
import base64 import base64
import requests import requests
from APIAotu.day3.zx.common.read_ini import ReadIni from InterfaceAutoTest.common.read_ini import ReadIni
class RequestsMethod: class RequestsMethod:
def __init__(self): def __init__(self):
"""关联token"""
url = ReadIni().get_host("test_bpm") + "/auth" url = ReadIni().get_host("test_bpm") + "/auth"
data = {"username": "admin", "password": base64.b64encode("123456".encode("utf-8")).decode("utf-8")} data = {"username": "admin", "password": base64.b64encode("123456".encode("utf-8")).decode("utf-8")}
self.bpm_session = requests.sessions.Session() self.bpm_session = requests.sessions.Session()
self.bpm_session.headers["Authorization"] = "Bearer "+self.bpm_session.post(url=url, json=data).json().get("token") self.bpm_session.headers["Authorization"] = "Bearer "+self.bpm_session.post(url=url, json=data).json().get("token")
def requests_all(self, req_method, req_url, req_mime, case_data): def request_all(self, req_method, req_url, req_mime, case_data):
if req_mime == "json" or req_mime == "application/json": if req_mime == "json" or req_mime == "application/json":
return self.bpm_session.request(method=req_method, url=req_url, json=case_data) return self.bpm_session.request(method=req_method, url=req_url, json=case_data)
elif req_mime == "x-www-form-urlencoded" or req_mime == "application/x-www-form-urlencoded": elif req_mime == "x-www-form-urlencoded" or req_mime == "application/x-www-form-urlencoded":
...@@ -27,12 +29,16 @@ class RequestsMethod: ...@@ -27,12 +29,16 @@ class RequestsMethod:
return self.bpm_session.request(method=req_method, url=req_url, files=case_data) return self.bpm_session.request(method=req_method, url=req_url, files=case_data)
elif req_mime == "query" or req_mime == "params": elif req_mime == "query" or req_mime == "params":
return self.bpm_session.request(method=req_method, url=req_url, params=case_data) return self.bpm_session.request(method=req_method, url=req_url, params=case_data)
elif req_mime == "application/json|query" or req_mime == "json|query" or req_mime == "query|json": elif req_mime == "application/json|query" or req_mime == "json|query" or req_mime == "query|json":
return self.bpm_session.request(method=req_method, url=req_url, params=case_data["query"], json=case_data["body"]) return self.bpm_session.request(method=req_method, url=req_url, params=case_data["query"], json=case_data["body"])
elif req_mime == "text/plain" or req_mime == "text": elif req_mime == "text/plain" or req_mime == "text":
return self.bpm_session.request(method=req_method, url=req_url, data=case_data) return self.bpm_session.request(method=req_method, url=req_url, data=case_data)
elif req_mime is None: elif req_mime is None:
return self.bpm_session.request(method=req_method, url=req_url) return self.bpm_session.request(method=req_method, url=req_url)
else: else:
raise NameError("传入的媒体类型的名称错误") raise NameError("传入的媒体类型的名称错误")
# -*-coding:utf-8 -*- #
# ---------------------------------------------------------------------------
# ProjectName: test_56
# FileName: __init__.py
# Author: xxxxxxx
# Datetime: 2023/8/7 15:20
# Description:
#
# ---------------------------------------------------------------------------
# -*-coding:utf-8 -*- # # -*-coding:utf-8 -*- #
# --------------------------------------------------------------------------- # ---------------------------------------------------------------------------
# ProjectName: study_py # ProjectName: test_56
# FileName: conftest.py # FileName: conftest.py
# Author: gff # Author: xxxxxxx
# Datetime: 2023/8/7 20:03 # Datetime: 2023/8/7 15:58
# Description: # Description:
#
# --------------------------------------------------------------------------- # ---------------------------------------------------------------------------
import pytest import pytest
from APIAotu.day3.zx.common.db import DB
from APIAotu.day3.zx.requests_method.requests_method import RequestsMethod from InterfaceAutoTest.common.db import DB
from InterfaceAutoTest.requests_method.requests_method import RequestsMethod
@pytest.fixture(scope="session") @pytest.fixture(scope="session")
def req_fix(): def req_fix():
"""创建RequestsMethod类对象"""
req = RequestsMethod() req = RequestsMethod()
yield req yield req
@pytest.fixture(scope="session") @pytest.fixture(scope="session")
def db_fix(): def db_fix():
"""创建DB类对象"""
db = DB() db = DB()
yield db yield db
db.close() db.close()
def pytest_collection_modifyitems(items): def pytest_collection_modifyitems(items):
# item表示每个测试用例,解决用例名称中文显示问题
for item in items: for item in items:
item.name = item.name.encode("utf-8").decode("unicode-escape") item.name = item.name.encode("utf-8").decode("unicode-escape")
item._nodeid = item._nodeid.encode("utf-8").decode("unicode-escape") item._nodeid = item._nodeid.encode("utf-8").decode("unicode-escape")
\ No newline at end of file
[pytest] [pytest]
;开启日志
log_cli=true log_cli=true
;设置日志的级别,如果不设置级别的话,可以设置为NOTSET,如果要设置级别,级别可以有debug,info,warning,error,致命
log_level=NOTSET log_level=NOTSET
;设置日志显示的信息格式
log_format=%(levelname)s--%(asctime)s--%(message)s log_format=%(levelname)s--%(asctime)s--%(message)s
;设置日志中时间显示的格式
log_date_format=%Y-%m-%d %H:%M:%S log_date_format=%Y-%m-%d %H:%M:%S
;每个py文件运行的时候追加的命令
;addopts=-vs
;设置日志保存的文件
log_file=../report/log/日志.log log_file=../report/log/日志.log
;设置日志保存在文件中的级别
log_file_level=error log_file_level=error
;设置日志在文件中的信息格式
log_file_format=%(levelname)s--%(asctime)s--%(message)s log_file_format=%(levelname)s--%(asctime)s--%(message)s
;设置文件日志中时间显示的格式
log_file_date_format=%Y-%m-%d %H:%M:%S log_file_date_format=%Y-%m-%d %H:%M:%S
\ No newline at end of file
# -*-coding:utf-8 -*- # # -*-coding:utf-8 -*- #
# --------------------------------------------------------------------------- # ---------------------------------------------------------------------------
# ProjectName: study_py # ProjectName: test_56
# FileName: test_bpm.py # FileName: test_bpm.py
# Author: gff # Author: xxxxxxx
# Datetime: 2023/8/7 20:00 # Datetime: 2023/8/7 15:56
# Description: # Description:
#
# --------------------------------------------------------------------------- # ---------------------------------------------------------------------------
import logging
import allure
import pytest import pytest
from APIAotu.day3.zx.common.read_excel import ReadExcel import allure
import logging
from InterfaceAutoTest.common.read_excel import ReadExcel
class TestBPM: class TestBPM:
...@@ -22,18 +23,39 @@ class TestBPM: ...@@ -22,18 +23,39 @@ class TestBPM:
allure.dynamic.title(title) allure.dynamic.title(title)
allure.dynamic.severity(level) allure.dynamic.severity(level)
# 1.1:判断sql语句的类型是否为delete
if sql_type == "delete": if sql_type == "delete":
# 1.2 使用DB类对象,调用delete方法执行删除的sql语句
db_fix.delete(sql_sentence) db_fix.delete(sql_sentence)
# # 1.3 使用RequestsMethod类对象调用request_all方法发送请求
# result = req_fix.request_all(req_method=method, req_url=url, req_mime=mime, case_data=data)
# 2.1 判断sql语句的类型是否为select
elif sql_type == "select": elif sql_type == "select":
# 2.2 使用DB类对象,调用select方法执行查询的sql语句,并接收查询结果
select_result = db_fix.select(sql_sentence) select_result = db_fix.select(sql_sentence)
# 2.3 将查询结果更新到用例数据中
data[update_key] = select_result data[update_key] = select_result
# # 2.3 使用RequestsMethod类对象调用request_all方法发送请求
# result = req_fix.request_all(req_method=method, req_url=url, req_mime=mime, case_data=data)
# 3.1 判断sql语句的类型是否delete|select或者为select|delete
elif sql_type == "delete|select" or sql_type == "select|delete": elif sql_type == "delete|select" or sql_type == "select|delete":
# 3.2 使用DB类对象,调用delete方法执行删除的sql语句
db_fix.delete(sql_sentence["delete"]) db_fix.delete(sql_sentence["delete"])
# 3.3 使用DB类对象,调用select方法执行查询的sql语句,并接收查询结果
select_result = db_fix.select(sql_sentence["select"]) select_result = db_fix.select(sql_sentence["select"])
# 3.4 将查询结果更新到用例数据中
data[update_key] = select_result data[update_key] = select_result
# # 3.5 使用RequestsMethod类对象调用request_all方法发送请求
# result = req_fix.request_all(req_method=method, req_url=url, req_mime=mime, case_data=data)
#
# else:
# result = req_fix.request_all(req_method=method, req_url=url, req_mime=mime, case_data=data)
result = req_fix.requests_all(req_method=method, req_url=url, req_mime=mime, case_data=data) result = req_fix.request_all(req_method=method, req_url=url, req_mime=mime, case_data=data)
# 断言
try: try:
for key in expect: for key in expect:
assert expect[key] == result.json().get(key) assert expect[key] == result.json().get(key)
......
ERROR--2023-08-08 10:20:26--断言失败, 模块名称为:认证接口,接口名称为:刷新token,用例标题:正向用例,用例为:None,期望结果为:{'message': '刷新token成功'},服务器返回数据为:{"token":"eyJhbGciOiJIUzUxMiJ9.eyJzdWIiOiJhZG1pbiIsInRlbmFudElkIjoiLTEiLCJleHAiOjE2OTE1NDc2MjYsImlhdCI6MTY5MTQ2MTIyNn0.SZPJIQdGB7nmAkv-nu5Bf7GOtZq0ctpe_AiT-7VHBvJBQubR-8M1Hr3L_bYiA9TPx5GLKxolCjpL3I1hbwvw5A","username":"","account":"","userId":"","loginStatus":true,"userAttrs":{}}
ERROR--2023-08-08 10:20:26--断言失败, 模块名称为:认证接口,接口名称为:刷新token,用例标题:正向用例,用例为:None,期望结果为:{'message': '刷新token成功'},服务器返回数据为:{"token":"eyJhbGciOiJIUzUxMiJ9.eyJzdWIiOiJhZG1pbiIsInRlbmFudElkIjoiLTEiLCJleHAiOjE2OTE1NDc2MjYsImlhdCI6MTY5MTQ2MTIyNn0.SZPJIQdGB7nmAkv-nu5Bf7GOtZq0ctpe_AiT-7VHBvJBQubR-8M1Hr3L_bYiA9TPx5GLKxolCjpL3I1hbwvw5A","username":"","account":"","userId":"","loginStatus":true,"userAttrs":{}}
ERROR--2023-08-08 10:20:27--断言失败, 模块名称为:组织管理,接口名称为:添加组织,用例标题:正向用例,用例为:{'code': 'djn', 'demId': None, 'exceedLimitNum': 0, 'grade': '', 'limitNum': 0, 'name': '大角牛', 'nowNum': 0, 'orderNo': 0, 'parentId': '0'},期望结果为:{'state': True, 'message': '添加组织成功!'},服务器返回数据为:{"state":false,"message":"添加组织失败,维度id【demId】不能为空!","value":"保存失败"}
ERROR--2023-08-08 10:20:27--断言失败, 模块名称为:组织管理,接口名称为:保存组织参数,用例标题:正向用例,用例为:{'query': {'orgCode': 'djn'}, 'body': [{'alias': 'sz', 'value': 0}, {'alias': 'zy', 'value': 'math'}, {'alias': 'rq', 'value': '2023-08-04T16:00:00.000Z'}, {'alias': 'ah', 'value': 'lq'}, {'alias': 'yyyy', 'value': '越高越好'}, {'alias': 'xb', 'value': '2'}]},期望结果为:{'state': True, 'message': '保存组织参数成功!'},服务器返回数据为:{"state":false,"message":"保存失败,请将参数填写完整","value":"根据输入的组织编码没有找到对应的组织信息!"}
ERROR--2023-08-08 10:20:27--断言失败, 模块名称为:组织管理,接口名称为:删除组织,用例标题:正向用例,用例为:djn,期望结果为:{'state': True, 'message': '删除组织成功!'},服务器返回数据为:{"state":true,"message":"部分删除成功,其中编码为【djn】的组织不存在;","value":""}
ERROR--2023-08-08 10:20:27--断言失败, 模块名称为:维度管理,接口名称为:根据维度编码删除维度,用例标题:正向用例,用例为:{'ids': None},期望结果为:{'state': True, 'message': '删除维度成功'},服务器返回数据为:{"state":false,"message":"删除维度失败,维度ids必填","logId":"1688736902460489728"}
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