Commit 6ff8b33c by ht

描述信息

parent 3f0de0a2
# -*-coding:utf-8 -*- #
# ---------------------------------------------------------------------------
# ProjectName: Python_learn
# FileName: __init__.py
# Author: xxxxxxx
# Datetime: 2023-08-07 11:19
# Description:
#
# ---------------------------------------------------------------------------
# -*-coding:utf-8 -*- #
# ---------------------------------------------------------------------------
# ProjectName: test_56
# FileName: db.py
# Author: xxxxxxx
# Datetime: 2023/8/4 14:21
# Description:
#
# ---------------------------------------------------------------------------
import pymysql
from learn.APIAutoTest_02.common.read_ini import ReadIni
class DB:
def __init__(self):
read_ini = ReadIni()
self.conn = pymysql.connect(host=read_ini.get_sql_connect_message("host"),
port=int(read_ini.get_sql_connect_message("port")),
user=read_ini.get_sql_connect_message('user'),
password=read_ini.get_sql_connect_message("pwd"),
database=read_ini.get_sql_connect_message("database"),
charset="utf8")
self.cursor = self.conn.cursor()
def close(self):
self.cursor.close()
self.conn.close()
def delete(self, sql_sentence):
self.cursor.execute(sql_sentence)
self.conn.commit()
def select(self, sql_sentence):
self.cursor.execute(sql_sentence)
select_result = self.cursor.fetchall()
if select_result:
return select_result[0][0]
if __name__ == '__main__':
db = DB()
sql = """SELECT ID_ FROM uc_demension WHERE `CODE_`="test56_dem";"""
print(db.select(sql))
\ No newline at end of file
# -*-coding:utf-8 -*- #
# ---------------------------------------------------------------------------
# ProjectName: test_56
# FileName: read_excel.py
# Author: xxxxxxx
# Datetime: 2023/8/4 14:36
# Description:
#
# ---------------------------------------------------------------------------
import openpyxl
from learn.APIAutoTest_02.common.read_ini import ReadIni
from learn.APIAutoTest_02.common.read_json import read_json
class ReadExcel:
def __init__(self):
self.read_ini = ReadIni()
case_data_path = self.read_ini.get_file_path("case")
expect_data_path = self.read_ini.get_file_path("expect")
sql_data_path = self.read_ini.get_file_path("sql")
self.case_data_dict = read_json(case_data_path)
self.expect_data_dict = read_json(expect_data_path)
self.sql_data_dict = read_json(sql_data_path)
excel_path = self.read_ini.get_file_path("excel")
wb = openpyxl.load_workbook(excel_path)
table_name = self.read_ini.get_table_name("table")
self.ws = wb[table_name]
def __get_cell_value(self, column: str, row: int) -> str:
"""
根据列号和行号获取指定单元格数据
:param column:列号
:param row:行号
:return:单元格数据
"""
# 根据 工作表["列号行号"].value 获取单元格数据
value = self.ws[str(column)+str(row)].value
# 判断单元格数据如果为None返回None
if value is None:
return None
# 判断单元格数据去掉空格之后是否为空的字符串,如果是返回None,如果不是空的字符串,返回去掉前后空的字符串
elif value.strip():
return value.strip()
def module_name(self, row):
"""
根据行号获取模块名称
:param row: 行号
:return: 模块名称
"""
# 调用私有方法__get_cell_value获取单元格数据
return self.__get_cell_value("B", row)
def interface_name(self, row):
"""
根据行号,获取接口名称
:param row: 行号
:return: 接口名称
"""
# 调用私有方法__get_cell_value获取单元格数据
return self.__get_cell_value("c", row)
def case_method(self, row):
"""
根据行号,获取请求方法
:param row: 行号
:return: 请求方法
"""
# 调用私有方法__get_cell_value获取单元格数据
return self.__get_cell_value("F", row)
def case_url(self, row):
"""
根据行号,获取请求的url
:param row: 行号
:return: url
"""
# 获取域名,使用ReadIni对象,调用get_host方法获取域名
host = self.read_ini.get_host("test_bpm")
# 调用私有方法__get_cell_value获取单元格数据
path = self.__get_cell_value("g", row)
# 返回拼接的url
return host+path
def case_mime(self, row):
"""
根据行号,获取用例的媒体类型
:param row: 行号
:return: 媒体类型
"""
# 调用私有方法__get_cell_value获取单元格数据
value = self.__get_cell_value("h", row)
# 判断媒体类型是否为None,如果为None返回None,如果不为None,将值转小写并返回
if value:
return value.lower()
def case_data(self, row):
"""
根据行号,获取用例数据
:param row: 行号
:return: 用例数据
"""
# 获取用例数据的key,调用私有方法__get_cell_value获取单元格数据
case_data_key = self.__get_cell_value("i", row)
# 判断用例数据的key是否为None,如果为None,返回None,如果不为None,提取用例数据。
if case_data_key:
# 获取用例json文件的路径
# 使用read_json函数读取用例的json文件
# 获取模块名称
module_name = self.module_name(row)
# 获取接口名称
interface_name = self.interface_name(row)
# 提取用例数据
return self.case_data_dict[module_name][interface_name][case_data_key]
def expect_data(self, row):
"""
根据行号,获取期望数据
:param row: 行号
:return: 期望数据
"""
# 获取期望数据的key,调用私有方法__get_cell_value获取单元格数据
expect_data_key = self.__get_cell_value("j", row)
# 判断期望数据的key是否为None,如果为None,返回None,如果不为None,提取期望数据
if expect_data_key:
# 获取模块名称
module_name = self.module_name(row)
# 获取接口名称
interface_name = self.interface_name(row)
# 提取期望数据
return self.expect_data_dict[module_name][interface_name][expect_data_key]
def get_sql_type(self, row):
"""
根据行号,获取sql语句的类型
:param row: 行号
:return: sql语句的类型
"""
# 调用私有方法__get_cell_value获取单元格数据
value = self.__get_cell_value("k", row)
# 判断sql语句类型的值是否为None,如果为None,返回None,如果不为None,将值转小写并返回
if value:
return value.lower()
def sql_sentence(self, row):
"""
根据行号,获取sql语句
:param row:
:return:
"""
# 获取sql语句的key,调用私有方法__get_cell_value获取单元格数据
sql_data_key = self.__get_cell_value("l", row)
# 判断sql语句的key是否为None,如果为None,返回None,如果不为None,提取sql语句
if sql_data_key:
# 模块名称
module_name = self.module_name(row)
# 接口名称
interface_name = self.interface_name(row)
# 提取sql语句
return self.sql_data_dict[module_name][interface_name][sql_data_key]
def update_key(self, row):
"""
根据行号,获取更新的key
:param row: 行号
:return: 更新的key
"""
# 调用私有方法__get_cell_value获取单元格数据
value = self.__get_cell_value("m", row)
# 判断更新的key是否为None,如果为None返回None,如果不为None,返回更新key的值
if value:
return value
def get_data(self):
"""
获取数据的数据,并存放到一个二维列表中,每行就是一个子列表
:return: 二维列表
"""
# 创建一个空列表,用于存放数据
list_data = []
# 循环取出每行的数据,并追加到空列表中
for row in range(2, self.ws.max_row+1):
# 请求方法
req_method = self.case_method(row)
# url
url = self.case_url(row)
# 媒体类型
mime = self.case_mime(row)
# 用例数据
case_data = self.case_data(row)
# 期望数据
expect_data = self.expect_data(row)
# sql语句类型
sql_type = self.get_sql_type(row)
# sql语句
sql_sentence = self.sql_sentence(row)
# 更新的key
update_key = self.update_key(row)
list_data.append([req_method, url, mime, case_data, expect_data, sql_type, sql_sentence, update_key])
# print([req_method, url, mime, case_data, expect_data, sql_type, sql_sentence, update_key])
else:
return list_data
if __name__ == '__main__':
read_excel = ReadExcel()
read_excel.get_data()
# -*-coding:utf-8 -*- #
# ---------------------------------------------------------------------------
# ProjectName: test_56
# FileName: read_ini.py
# Author: xxxxxxx
# Datetime: 2023/8/4 14:12
# Description:
#
# ---------------------------------------------------------------------------
import configparser
import os
class ReadIni:
def __init__(self):
self.data_config_path = os.path.join(os.path.dirname(os.path.dirname(__file__)), "data_config")
ini_path = os.path.join(self.data_config_path, "config.ini")
self.conf = configparser.ConfigParser()
self.conf.read(ini_path, encoding="utf-8")
def get_file_path(self, key):
file_name = self.conf.get("file", key).strip()
return os.path.join(self.data_config_path, file_name)
def get_host(self, key):
return self.conf.get("host", key).strip()
def get_table_name(self, key):
"""
根据key,获取excel工作表的名称
:param key: 键
:return: 表名
"""
return self.conf.get("table_name", key).strip()
def get_sql_connect_message(self, key):
"""
根据key,获取数据库的链接信息
:param key: 键
:return: 数据库的链接信息
"""
return self.conf.get("sql", key).strip()
# -*-coding:utf-8 -*- #
# ---------------------------------------------------------------------------
# ProjectName: test_56
# FileName: read_json.py
# Author: xxxxxxx
# Datetime: 2023/8/4 14:20
# Description:
#
# ---------------------------------------------------------------------------
import json
def read_json(filename):
with open(filename, mode="r", encoding="utf-8") as fp:
return json.load(fp)
{
"认证接口":{
"登录系统":{
"LoginSuccess": {"password": "MTIzNDU2","username": "admin"},
"LoginFailUsernameIsNone":{"password": "MTIzNDU2","username": ""},
"LoginFailUsernameIsLong":{"password": "MTIzNDU2","username": "adminadminadminadminadminadminadminadminadmin"},
"LoginFailUsernameIsShort":{"password": "MTIzNDU2","username": "a"},
"LoginFailUsernameIsSpecialChar":{"password": "MTIzNDU2","username": "▬♦◊◦☼♠♣"},
"LoginFailUsernameIsError":{"password": "MTIzNDU2","username": "tomcat"},
"LoginFailPWDIsNone":{"password": "","username": "admin"},
"LoginFailPWDIsLong":{"password": "MTIzNDU2MTIzNDU2MTIzNDU2MTIzNDU2MTIzNDU2MTIzNDU2","username": "admin"},
"LoginFailPWDIsShort":{"password": "1","username": "admin"},
"LoginFailPWDIsSpecial":{"password": "▬♦◊◦☼♠♣","username": "admin"}
}
},
"维度管理": {
"添加维度": {
"AddDemSuccess": {
"code": "test56_dem",
"description": "测试56期的维度",
"isDefault": 0,
"name": "测试56期的维度"
}
},
"根据维度编码删除维度": {
"DeleteDemSuccess": {"ids": "不知道"}
}
},
"组织管理": {
"添加组织": {
"AddOrgSuccess": {
"code": "test56_org",
"demId": "不知道",
"exceedLimitNum": 0,
"grade": "",
"limitNum": 0,
"name": "测试的组织",
"nowNum": 0,
"orderNo": 0,
"parentId": "0"
}
},
"删除组织": {
"DeleteOrgSuccess": "test56_org"
},
"保存组织参数": {
"SaveOrgParamSuccess": {
"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"}]
}
}
}
}
[file]
excel=APIAutoTest.xlsx
case=case_data.json
expect=expect_data.json
sql=sql.json
[host]
test_bpm=http://120.46.172.186:8080
[table_name]
table=BPM接口
[sql]
host=120.46.172.186
port=3306
user=root
pwd=root@2023
database=eipsaas
\ No newline at end of file
{
"认证接口":{
"登录系统":{
"LoginSuccess": {"username": "超级管理员","account": "admin"},
"LoginFailUsernameIsNone":{"state": false,"message": "账号或密码错误"},
"LoginFailUsernameIsLong":{"state": false,"message": "账号或密码错误"},
"LoginFailUsernameIsShort":{"state": false,"message": "账号或密码错误"},
"LoginFailUsernameIsSpecialChar":{"state": false,"message": "账号或密码错误"},
"LoginFailUsernameIsError":{"state": false,"message": "账号或密码错误"},
"LoginFailPWDIsNone":{"state": false,"message": "账号或密码错误"},
"LoginFailPWDIsLong":{"state": false,"message": "账号或密码错误"},
"LoginFailPWDIsShort":{"state": false,"message": "账号或密码错误"},
"LoginFailPWDIsSpecial":{"state": false,"message": "账号或密码错误"}
},
"刷新token": {
"RefreshSuccess": {"message": "刷新token成功"}
}
},
"维度管理": {
"添加维度": {
"AddDemSuccess": {"state": true, "message": "添加维度成功!"}
},
"根据维度编码删除维度": {
"DeleteDemSuccess": {"state": true, "message": "删除维度成功"}
}
},
"组织管理": {
"添加组织": {
"AddOrgSuccess": {"state": true, "message": "添加组织成功!"}
},
"删除组织": {
"DeleteOrgSuccess": {"state": true, "message": "删除组织成功!"}
},
"保存组织参数": {
"SaveOrgParamSuccess": {"state": true, "message": "保存组织参数成功!"}
}
}
}
{
"维度管理": {
"添加维度": {
"AddDemSuccess": "DELETE FROM uc_demension WHERE `CODE_`=\"test56_dem\";"
},
"根据维度编码删除维度": {
"DeleteDemSuccess": "SELECT ID_ FROM uc_demension WHERE `CODE_`=\"test56_dem\";"
}
},
"组织管理": {
"添加组织": {
"AddOrgSuccess": {
"select": "SELECT ID_ FROM uc_demension WHERE `CODE_`=\"test56_dem\";",
"delete": "DELETE FROM uc_org WHERE `CODE_`=\"test56_org\";"
}
}
}
}
\ No newline at end of file
This source diff could not be displayed because it is too large. You can view the blob instead.
# -*-coding:utf-8 -*- #
# ---------------------------------------------------------------------------
# ProjectName: Python_learn
# FileName: __init__.py
# Author: xxxxxxx
# Datetime: 2023-08-07 11:19
# Description:
#
# ---------------------------------------------------------------------------
# -*-coding:utf-8 -*- #
# ---------------------------------------------------------------------------
# ProjectName: test_56
# FileName: requests_method.py
# Author: xxxxxxx
# Datetime: 2023/8/4 15:42
# Description:
#
# ---------------------------------------------------------------------------
import base64
import requests
from learn.APIAutoTest_02.common.read_ini import ReadIni
class RequestsMethod:
def __init__(self):
"""
关联登录成功的状态,关联token
"""
url = ReadIni().get_host("test_bpm") + "/auth"
data = {"username": "admin", "password": base64.b64encode("123456".encode("utf-8")).decode("utf-8")}
self.bpm_session = requests.sessions.Session()
self.bpm_session.headers["Authorization"] = "Bearer " + self.bpm_session.post(url=url, json=data).json().get("token")
def request_all(self, method, url, mime, case_data):
if mime == "application/x-www-form-urlencoded" or mime == "x-www-form-urlencoded":
return self.bpm_session.request(method=method, url=url, data=case_data)
elif mime == "application/json" or mime == "json":
return self.bpm_session.request(method=method, url=url, json=case_data)
elif mime == "multipart/form-data" or mime == "form-data":
return self.bpm_session.request(method=method, url=url, files=case_data)
elif mime == "query" or mime == "params":
return self.bpm_session.request(method=method, url=url, params=case_data)
elif mime == "text/plain" or mime == "text":
return self.bpm_session.request(method=method, url=url, data=case_data)
elif mime == "application/Json|query" or mime == "json|query" or "json|params":
return self.bpm_session.request(method=method, url=url, params=case_data["query"], json=case_data["body"])
elif mime is None:
return self.bpm_session.request(method=method, url=url)
else:
raise NameError("媒体类型的值错误")
if __name__ == '__main__':
req = RequestsMethod()
# -*-coding:utf-8 -*- #
# ---------------------------------------------------------------------------
# ProjectName: Python_learn
# FileName: __init__.py
# Author: xxxxxxx
# Datetime: 2023-08-07 11:19
# Description:
#
# ---------------------------------------------------------------------------
# -*-coding:utf-8 -*- #
# ---------------------------------------------------------------------------
# ProjectName: test_56
# FileName: conftest.py
# Author: xxxxxxx
# Datetime: 2023/8/4 15:58
# Description:
#
# ---------------------------------------------------------------------------
import pytest
from learn.APIAutoTest_02.common.db import DB
from learn.APIAutoTest_02.requests_method.requests_method import RequestsMethod
@pytest.fixture(scope="session")
def req_fix():
req = RequestsMethod()
yield req
@pytest.fixture(scope="session")
def db_fix():
db = DB()
yield db
db.close()
{"uuid": "b9588c61-5a12-4bc6-b2a3-8959d3eac9aa", "befores": [{"name": "case_data", "status": "passed", "start": 1691390287812, "stop": 1691390287812}], "start": 1691390287812, "stop": 1691390287925}
\ No newline at end of file
{"uuid": "ac5a8888-9677-4cba-9c45-4e4a32aa1e86", "befores": [{"name": "update_key", "status": "passed", "start": 1691390289254, "stop": 1691390289254}], "start": 1691390289254, "stop": 1691390289327}
\ No newline at end of file
{"uuid": "20ccd1a5-40ae-42b9-8e4e-17ff5bcf161d", "befores": [{"name": "update_key", "status": "passed", "start": 1691390287557, "stop": 1691390287557}], "start": 1691390287556, "stop": 1691390287622}
\ No newline at end of file
POST http://120.46.172.186:8080/auth json {'password': 'MTIzNDU2', 'username': 'tomcat'} {'state': False, 'message': '账号或密码错误'} None None None
====================================================================================================
服务器返回数据 {'state': False, 'message': '账号或密码错误', 'logId': '1688439363106521088'}
断言成功
{"uuid": "6a6b2f74-5e37-481d-8ac9-d27115189131", "befores": [{"name": "sql_sentence", "status": "passed", "start": 1691390288397, "stop": 1691390288397}], "start": 1691390288397, "stop": 1691390288497}
\ No newline at end of file
{"uuid": "9c0203de-9a87-484a-81c3-d1d334285351", "befores": [{"name": "case_data", "status": "passed", "start": 1691390288642, "stop": 1691390288642}], "start": 1691390288642, "stop": 1691390288847}
\ No newline at end of file
{"uuid": "3f3088d0-a66d-4df1-84b8-648ad27d89f4", "befores": [{"name": "expect_data", "status": "passed", "start": 1691390289060, "stop": 1691390289060}], "start": 1691390289060, "stop": 1691390289245}
\ No newline at end of file
get http://120.46.172.186:8080/refresh None None {'message': '刷新token成功'} None None None
PoST http://120.46.172.186:8080/auth application/json {'password': '1', 'username': 'admin'} {'state': False, 'message': '账号或密码错误'} None None None
====================================================================================================
服务器返回数据 {'state': False, 'message': '账号或密码错误', 'logId': '1688439364566138880'}
断言成功
{"uuid": "372c8983-3d70-45f7-abcf-623798fc5594", "befores": [{"name": "update_key", "status": "passed", "start": 1691390289437, "stop": 1691390289437}], "start": 1691390289437, "stop": 1691390289567}
\ No newline at end of file
{"uuid": "c99858e8-2c3d-434a-ad3c-9e8c5983f7da", "befores": [{"name": "url", "status": "passed", "start": 1691390288052, "stop": 1691390288052}], "start": 1691390288052, "stop": 1691390288151}
\ No newline at end of file
{"uuid": "abd54bbb-15ee-423f-a1c3-f02199cab61f", "befores": [{"name": "req_method", "status": "passed", "start": 1691390288524, "stop": 1691390288524}], "start": 1691390288524, "stop": 1691390288636}
\ No newline at end of file
{"uuid": "cd45e629-fc8a-4ab5-94c8-b9059fd30b48", "befores": [{"name": "url", "status": "passed", "start": 1691390288641, "stop": 1691390288641}], "start": 1691390288641, "stop": 1691390288849}
\ No newline at end of file
{"uuid": "6bc9a529-9341-4a52-abbd-74081a64dc78", "befores": [{"name": "case_data", "status": "passed", "start": 1691390288524, "stop": 1691390288524}], "start": 1691390288524, "stop": 1691390288633}
\ No newline at end of file
POST http://120.46.172.186:8080/auth application/json {'password': 'MTIzNDU2', 'username': '▬♦◊◦☼♠♣'} {'state': False, 'message': '账号或密码错误'} None None None
====================================================================================================
服务器返回数据 {'state': False, 'message': '账号或密码错误', 'logId': '1688439362653536256'}
断言成功
{"uuid": "58ee8091-45c6-47f2-9ca4-7cad5778aaa1", "befores": [{"name": "req_method", "status": "passed", "start": 1691390289360, "stop": 1691390289360}], "start": 1691390289360, "stop": 1691390289432}
\ No newline at end of file
{"uuid": "054e4788-ab98-441b-8b47-2661dff84090", "befores": [{"name": "req_method", "status": "passed", "start": 1691390289437, "stop": 1691390289437}], "start": 1691390289437, "stop": 1691390289579}
\ No newline at end of file
{"uuid": "0796008c-7dcb-469f-ab89-25415632ffb6", "befores": [{"name": "sql_sentence", "status": "passed", "start": 1691390289362, "stop": 1691390289362}], "start": 1691390289362, "stop": 1691390289426}
\ No newline at end of file
{"uuid": "22e9e5ee-1d29-444b-94a3-8c8972a7cf9f", "befores": [{"name": "sql_type", "status": "passed", "start": 1691390289361, "stop": 1691390289362}], "start": 1691390289361, "stop": 1691390289428}
\ No newline at end of file
{"uuid": "824a1e4c-c281-40d0-9521-c342fa38fc9f", "befores": [{"name": "mime", "status": "passed", "start": 1691390288855, "stop": 1691390288855}], "start": 1691390288855, "stop": 1691390289050}
\ No newline at end of file
{"uuid": "aaf243cb-9f65-4a91-94e7-213039ba07f7", "befores": [{"name": "req_method", "status": "passed", "start": 1691390288397, "stop": 1691390288397}], "start": 1691390288397, "stop": 1691390288513}
\ No newline at end of file
{"uuid": "d4bf448b-852b-4f2a-9ff7-3bc21b261409", "befores": [{"name": "expect_data", "status": "passed", "start": 1691390289437, "stop": 1691390289437}], "start": 1691390289437, "stop": 1691390289571}
\ No newline at end of file
{"name": "test_bpm[POST-http://120.46.172.186:8080/auth-application/json-case_data0-expect_data0-None-None-None]", "status": "passed", "attachments": [{"name": "stdout", "source": "53a0b5ab-5678-48cb-89bf-fa77d0a8adf9-attachment.txt", "type": "text/plain"}], "parameters": [{"name": "req_method", "value": "'POST'"}, {"name": "url", "value": "'http://120.46.172.186:8080/auth'"}, {"name": "mime", "value": "'application/json'"}, {"name": "case_data", "value": "{'password': 'MTIzNDU2', 'username': 'admin'}"}, {"name": "expect_data", "value": "{'username': '超级管理员', 'account': 'admin'}"}, {"name": "sql_type", "value": "None"}, {"name": "sql_sentence", "value": "None"}, {"name": "update_key", "value": "None"}], "start": 1691390287562, "stop": 1691390287621, "uuid": "fbcbcca9-42ba-4553-bc53-c654e2a4230d", "historyId": "15601655f81adea241d95a9acd9a7244", "testCaseId": "0abeaba8f176b6785a0334bed7c1bdad", "fullName": "test_bpm.TestBPM#test_bpm", "labels": [{"name": "suite", "value": "test_bpm"}, {"name": "subSuite", "value": "TestBPM"}, {"name": "host", "value": "DESKTOP-APQTDRI"}, {"name": "thread", "value": "7876-MainThread"}, {"name": "framework", "value": "pytest"}, {"name": "language", "value": "cpython3"}, {"name": "package", "value": "test_bpm"}]}
\ No newline at end of file
{"name": "test_bpm[post-http://120.46.172.186:8080/api/org/v1/orgParam/saveOrgParams-application/json|query-case_data13-expect_data13-None-None-None]", "status": "passed", "attachments": [{"name": "stdout", "source": "934a7866-f426-43dc-a26a-4b9519cb7a93-attachment.txt", "type": "text/plain"}], "parameters": [{"name": "req_method", "value": "'post'"}, {"name": "url", "value": "'http://120.46.172.186:8080/api/org/v1/orgParam/saveOrgParams'"}, {"name": "mime", "value": "'application/json|query'"}, {"name": "case_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_data", "value": "{'state': True, 'message': '保存组织参数成功!'}"}, {"name": "sql_type", "value": "None"}, {"name": "sql_sentence", "value": "None"}, {"name": "update_key", "value": "None"}], "start": 1691390289255, "stop": 1691390289326, "uuid": "b23ab585-8ef3-4370-859f-3484f75f187f", "historyId": "15ed2d2b1c060dba9333b6754e63681b", "testCaseId": "0abeaba8f176b6785a0334bed7c1bdad", "fullName": "test_bpm.TestBPM#test_bpm", "labels": [{"name": "suite", "value": "test_bpm"}, {"name": "subSuite", "value": "TestBPM"}, {"name": "host", "value": "DESKTOP-APQTDRI"}, {"name": "thread", "value": "7876-MainThread"}, {"name": "framework", "value": "pytest"}, {"name": "language", "value": "cpython3"}, {"name": "package", "value": "test_bpm"}]}
\ No newline at end of file
{"uuid": "d0a88495-efbc-44ac-a028-1902d0d40fbc", "befores": [{"name": "expect_data", "status": "passed", "start": 1691390289361, "stop": 1691390289361}], "start": 1691390289361, "stop": 1691390289429}
\ No newline at end of file
{"uuid": "d0d04c64-26dc-4709-839e-2059c43812b9", "befores": [{"name": "update_key", "status": "passed", "start": 1691390287940, "stop": 1691390287940}], "start": 1691390287940, "stop": 1691390288039}
\ No newline at end of file
{"uuid": "4e05e524-412c-482b-a75b-9c770ba9f865", "befores": [{"name": "req_method", "status": "passed", "start": 1691390288052, "stop": 1691390288052}], "start": 1691390288052, "stop": 1691390288153}
\ No newline at end of file
{"uuid": "2f5eda2b-bbd5-4f0d-8c23-f3b430ed25a4", "befores": [{"name": "req_method", "status": "passed", "start": 1691390287692, "stop": 1691390287692}], "start": 1691390287692, "stop": 1691390287805}
\ No newline at end of file
{"uuid": "062c238f-1510-4712-b6db-eea0f01f43b2", "befores": [{"name": "mime", "status": "passed", "start": 1691390287693, "stop": 1691390287693}], "start": 1691390287693, "stop": 1691390287803}
\ No newline at end of file
{"uuid": "bda41b6b-af51-472d-8ac3-b3782ee2b0c5", "befores": [{"name": "expect_data", "status": "passed", "start": 1691390288642, "stop": 1691390288642}], "start": 1691390288642, "stop": 1691390288846}
\ No newline at end of file
{"uuid": "b7008fab-6117-4ad8-bff2-f5eaa0c08f63", "befores": [{"name": "update_key", "status": "passed", "start": 1691390289060, "stop": 1691390289060}], "start": 1691390289060, "stop": 1691390289242}
\ No newline at end of file
POST http://120.46.172.186:8080/auth application/json {'password': '▬♦◊◦☼♠♣', 'username': 'admin'} {'state': False, 'message': '账号或密码错误'} None None None
====================================================================================================
服务器返回数据 {'state': False, 'message': '账号或密码错误', 'logId': '1688439365107204096'}
断言成功
{"uuid": "a4fc52dc-35aa-44d1-8295-c2ca2d2cfc8c", "befores": [{"name": "expect_data", "status": "passed", "start": 1691390288397, "stop": 1691390288397}], "start": 1691390288397, "stop": 1691390288505}
\ No newline at end of file
{"uuid": "e55204c1-e1c9-427a-9482-bc52546ff88c", "befores": [{"name": "case_data", "status": "passed", "start": 1691390287940, "stop": 1691390287940}], "start": 1691390287940, "stop": 1691390288046}
\ No newline at end of file
{"uuid": "97bb4c4e-0f3d-4713-acdb-9b8f3cddc1fa", "befores": [{"name": "case_data", "status": "passed", "start": 1691390289437, "stop": 1691390289437}], "start": 1691390289437, "stop": 1691390289572}
\ No newline at end of file
{"uuid": "3d179976-ac9e-419c-8fe7-7ee8a4e4a634", "befores": [{"name": "mime", "status": "passed", "start": 1691390289437, "stop": 1691390289437}], "start": 1691390289437, "stop": 1691390289574}
\ No newline at end of file
{"uuid": "6866f80e-b302-4d16-a038-4d8f32f4251a", "befores": [{"name": "update_key", "status": "passed", "start": 1691390288397, "stop": 1691390288397}], "start": 1691390288397, "stop": 1691390288495}
\ No newline at end of file
{"name": "test_bpm[POST-http://120.46.172.186:8080/auth-application/json-case_data7-expect_data7-None-None-None]", "status": "passed", "attachments": [{"name": "stdout", "source": "47f74e3d-9991-4600-9374-ceb6201aedff-attachment.txt", "type": "text/plain"}], "parameters": [{"name": "req_method", "value": "'POST'"}, {"name": "url", "value": "'http://120.46.172.186:8080/auth'"}, {"name": "mime", "value": "'application/json'"}, {"name": "case_data", "value": "{'password': 'MTIzNDU2MTIzNDU2MTIzNDU2MTIzNDU2MTIzNDU2MTIzNDU2', 'username': 'admin'}"}, {"name": "expect_data", "value": "{'state': False, 'message': '账号或密码错误'}"}, {"name": "sql_type", "value": "None"}, {"name": "sql_sentence", "value": "None"}, {"name": "update_key", "value": "None"}], "start": 1691390288288, "stop": 1691390288383, "uuid": "009c59ac-8494-4bb3-83a8-d2b7670e976b", "historyId": "42633bb6f1736601ae1bc1d4951b76d9", "testCaseId": "0abeaba8f176b6785a0334bed7c1bdad", "fullName": "test_bpm.TestBPM#test_bpm", "labels": [{"name": "suite", "value": "test_bpm"}, {"name": "subSuite", "value": "TestBPM"}, {"name": "host", "value": "DESKTOP-APQTDRI"}, {"name": "thread", "value": "7876-MainThread"}, {"name": "framework", "value": "pytest"}, {"name": "language", "value": "cpython3"}, {"name": "package", "value": "test_bpm"}]}
\ No newline at end of file
{"uuid": "3a9d3e55-a392-4ce2-9be5-6ff39ae70b29", "befores": [{"name": "sql_sentence", "status": "passed", "start": 1691390288855, "stop": 1691390288855}], "start": 1691390288855, "stop": 1691390289040}
\ No newline at end of file
{"uuid": "d68af14d-b575-4161-87e1-fc09f268e742", "befores": [{"name": "sql_sentence", "status": "passed", "start": 1691390288287, "stop": 1691390288287}], "start": 1691390288287, "stop": 1691390288385}
\ No newline at end of file
POST http://120.46.172.186:8080/auth application/json {'password': 'MTIzNDU2MTIzNDU2MTIzNDU2MTIzNDU2MTIzNDU2MTIzNDU2', 'username': 'admin'} {'state': False, 'message': '账号或密码错误'} None None None
====================================================================================================
服务器返回数据 {'state': False, 'message': '账号或密码错误', 'logId': '1688439364104765440'}
断言成功
{"uuid": "d86dee52-d3c1-43de-a1e1-26ad30e2acc4", "befores": [{"name": "url", "status": "passed", "start": 1691390288854, "stop": 1691390288854}], "start": 1691390288854, "stop": 1691390289051}
\ No newline at end of file
{"name": "test_bpm[post-http://120.46.172.186:8080/api/org/v1/org/deleteOrg-text/plain-test56_org-expect_data14-None-None-None]", "status": "passed", "attachments": [{"name": "stdout", "source": "529591d6-718a-4721-9f60-8a6731b0a232-attachment.txt", "type": "text/plain"}], "parameters": [{"name": "req_method", "value": "'post'"}, {"name": "url", "value": "'http://120.46.172.186:8080/api/org/v1/org/deleteOrg'"}, {"name": "mime", "value": "'text/plain'"}, {"name": "case_data", "value": "'test56_org'"}, {"name": "expect_data", "value": "{'state': True, 'message': '删除组织成功!'}"}, {"name": "sql_type", "value": "None"}, {"name": "sql_sentence", "value": "None"}, {"name": "update_key", "value": "None"}], "start": 1691390289364, "stop": 1691390289425, "uuid": "d8d727b1-3cc1-48b7-baff-4fd27bd4acbb", "historyId": "5eb7521dc84ff944c0413fa43c8ae974", "testCaseId": "0abeaba8f176b6785a0334bed7c1bdad", "fullName": "test_bpm.TestBPM#test_bpm", "labels": [{"name": "suite", "value": "test_bpm"}, {"name": "subSuite", "value": "TestBPM"}, {"name": "host", "value": "DESKTOP-APQTDRI"}, {"name": "thread", "value": "7876-MainThread"}, {"name": "framework", "value": "pytest"}, {"name": "language", "value": "cpython3"}, {"name": "package", "value": "test_bpm"}]}
\ No newline at end of file
{"uuid": "56aca309-44f5-420c-b3d7-f70fa326d079", "befores": [{"name": "update_key", "status": "passed", "start": 1691390287693, "stop": 1691390287693}], "start": 1691390287693, "stop": 1691390287795}
\ No newline at end of file
{"uuid": "3b40d7a0-1dff-4782-904e-4dcb89365ba3", "befores": [{"name": "case_data", "status": "passed", "start": 1691390287632, "stop": 1691390287632}], "start": 1691390287632, "stop": 1691390287686}
\ No newline at end of file
{"uuid": "5eba8ca0-46e4-4b57-a293-ab30b464f393", "befores": [{"name": "mime", "status": "passed", "start": 1691390288052, "stop": 1691390288052}], "start": 1691390288052, "stop": 1691390288149}
\ No newline at end of file
{"uuid": "7b80b68a-9ced-4985-801b-44e7d9a2f9a1", "befores": [{"name": "mime", "status": "passed", "start": 1691390289361, "stop": 1691390289361}], "start": 1691390289361, "stop": 1691390289431}
\ No newline at end of file
{"uuid": "25bc609e-377b-4bf9-b3e0-158b0d57a2e4", "befores": [{"name": "sql_type", "status": "passed", "start": 1691390289060, "stop": 1691390289060}], "start": 1691390289060, "stop": 1691390289244}
\ No newline at end of file
{"uuid": "d6a655c1-cf6f-462c-bd64-46c431cf0f32", "befores": [{"name": "expect_data", "status": "passed", "start": 1691390287940, "stop": 1691390287940}], "start": 1691390287940, "stop": 1691390288041}
\ No newline at end of file
{"uuid": "7335ccfd-76e7-4bbe-855f-7c1e35c215fb", "befores": [{"name": "req_method", "status": "passed", "start": 1691390287631, "stop": 1691390287632}], "start": 1691390287631, "stop": 1691390287689}
\ No newline at end of file
{"name": "test_bpm[POST-http://120.46.172.186:8080/auth-application/json-case_data4-expect_data4-None-None-None]", "status": "passed", "attachments": [{"name": "stdout", "source": "24d4d122-1d8d-4be8-abba-9c9f5afea197-attachment.txt", "type": "text/plain"}], "parameters": [{"name": "req_method", "value": "'POST'"}, {"name": "url", "value": "'http://120.46.172.186:8080/auth'"}, {"name": "mime", "value": "'application/json'"}, {"name": "case_data", "value": "{'password': 'MTIzNDU2', 'username': '▬♦◊◦☼♠♣'}"}, {"name": "expect_data", "value": "{'state': False, 'message': '账号或密码错误'}"}, {"name": "sql_type", "value": "None"}, {"name": "sql_sentence", "value": "None"}, {"name": "update_key", "value": "None"}], "start": 1691390287941, "stop": 1691390288038, "uuid": "926bac72-209e-4862-b6fb-2ad53586858d", "historyId": "58e539546b09281d48deb87bf6e0744c", "testCaseId": "0abeaba8f176b6785a0334bed7c1bdad", "fullName": "test_bpm.TestBPM#test_bpm", "labels": [{"name": "suite", "value": "test_bpm"}, {"name": "subSuite", "value": "TestBPM"}, {"name": "host", "value": "DESKTOP-APQTDRI"}, {"name": "thread", "value": "7876-MainThread"}, {"name": "framework", "value": "pytest"}, {"name": "language", "value": "cpython3"}, {"name": "package", "value": "test_bpm"}]}
\ No newline at end of file
post http://120.46.172.186:8080/api/org/v1/org/deleteOrg text/plain test56_org {'state': True, 'message': '删除组织成功!'} None None None
====================================================================================================
服务器返回数据 {'state': True, 'message': '删除组织成功!', 'value': ''}
断言成功
post http://120.46.172.186:8080/api/org/v1/org/addOrg application/json {'code': 'test56_org', 'demId': '不知道', 'exceedLimitNum': 0, 'grade': '', 'limitNum': 0, 'name': '测试的组织', 'nowNum': 0, 'orderNo': 0, 'parentId': '0'} {'state': True, 'message': '添加组织成功!'} delete|select {'select': 'SELECT ID_ FROM uc_demension WHERE `CODE_`="test56_dem";', 'delete': 'DELETE FROM uc_org WHERE `CODE_`="test56_org";'} demId
====================================================================================================
服务器返回数据 {'state': True, 'message': '添加组织成功!', 'value': ''}
断言成功
POST http://120.46.172.186:8080/auth application/json {'password': 'MTIzNDU2', 'username': 'admin'} {'username': '超级管理员', 'account': 'admin'} None None None
====================================================================================================
服务器返回数据 {'token': 'eyJhbGciOiJIUzUxMiJ9.eyJzdWIiOiJhZG1pbiIsInRlbmFudElkIjoiLTEiLCJleHAiOjE2OTE0NzY2ODcsImlhdCI6MTY5MTM5MDI4N30.2uixIfTq0CHrPXFjvFGCoWGCT3UwfbJ5du6r6mrhY0UDM66eh1yt80fckT-Y-BeJojANQ40B3bGfr-GsXLcmvg', 'username': '超级管理员', 'account': 'admin', 'userId': '1', 'expiration': 86400, 'loginStatus': True, 'userAttrs': {'tenantId': '-1'}}
断言成功
{"uuid": "5ceadf2e-2640-482f-8297-e86afac1588e", "befores": [{"name": "sql_sentence", "status": "passed", "start": 1691390289060, "stop": 1691390289060}], "start": 1691390289060, "stop": 1691390289243}
\ No newline at end of file
{"uuid": "e096226a-f332-4cce-82df-c0ef92eaa965", "befores": [{"name": "sql_sentence", "status": "passed", "start": 1691390287813, "stop": 1691390287813}], "start": 1691390287813, "stop": 1691390287922}
\ No newline at end of file
{"uuid": "5afc0396-7d94-42c2-b851-a9381366a863", "befores": [{"name": "sql_sentence", "status": "passed", "start": 1691390289254, "stop": 1691390289254}], "start": 1691390289254, "stop": 1691390289327}
\ No newline at end of file
{"name": "test_bpm[get-http://120.46.172.186:8080/refresh-None-None-expect_data10-None-None-None]", "status": "broken", "statusDetails": {"message": "TypeError: 'NoneType' object is not subscriptable", "trace": "self = <learn.APIAutoTest_02.test_case.test_bpm.TestBPM object at 0x000001E62AD2B6D0>, db_fix = <learn.APIAutoTest_02.common.db.DB object at 0x000001E62AD7DAD0>\nreq_fix = <learn.APIAutoTest_02.requests_method.requests_method.RequestsMethod object at 0x000001E62ADDC150>, req_method = 'get', url = 'http://120.46.172.186:8080/refresh', mime = None\ncase_data = None, expect_data = {'message': '刷新token成功'}, sql_type = None, sql_sentence = None, update_key = None\n\n @pytest.mark.parametrize(\"req_method, url, mime, case_data, expect_data, sql_type, sql_sentence, update_key\", ReadExcel().get_data())\n def test_bpm(self, db_fix, req_fix, req_method, url, mime, case_data, expect_data, sql_type, sql_sentence, update_key):\n print(req_method, url, mime, case_data, expect_data, sql_type, sql_sentence, update_key)\n \n if sql_type == \"delete\":\n db_fix.delete(sql_sentence)\n result = req_fix.request_all(method=req_method, url=url, mime=mime, case_data=case_data)\n \n elif sql_type == \"select\":\n select_result = db_fix.select(sql_sentence)\n case_data[update_key] = select_result\n print(case_data)\n result = req_fix.request_all(method=req_method, url=url, mime=mime, case_data=case_data)\n \n elif sql_type == \"select|delete\" or sql_type == \"delete|select\":\n \n db_fix.delete(sql_sentence[\"delete\"])\n \n select_result = db_fix.select(sql_sentence[\"select\"])\n case_data[update_key] = select_result\n result = req_fix.request_all(method=req_method, url=url, mime=mime, case_data=case_data)\n \n else:\n> result = req_fix.request_all(method=req_method, url=url, mime=mime, case_data=case_data)\n\ntest_bpm.py:40: \n_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _\n\nself = <learn.APIAutoTest_02.requests_method.requests_method.RequestsMethod object at 0x000001E62ADDC150>, method = 'get', url = 'http://120.46.172.186:8080/refresh', mime = None, case_data = None\n\n def request_all(self, method, url, mime, case_data):\n \n if mime == \"application/x-www-form-urlencoded\" or mime == \"x-www-form-urlencoded\":\n return self.bpm_session.request(method=method, url=url, data=case_data)\n elif mime == \"application/json\" or mime == \"json\":\n return self.bpm_session.request(method=method, url=url, json=case_data)\n elif mime == \"multipart/form-data\" or mime == \"form-data\":\n return self.bpm_session.request(method=method, url=url, files=case_data)\n elif mime == \"query\" or mime == \"params\":\n return self.bpm_session.request(method=method, url=url, params=case_data)\n \n elif mime == \"text/plain\" or mime == \"text\":\n return self.bpm_session.request(method=method, url=url, data=case_data)\n \n elif mime == \"application/Json|query\" or mime == \"json|query\" or \"json|params\":\n> return self.bpm_session.request(method=method, url=url, params=case_data[\"query\"], json=case_data[\"body\"])\nE TypeError: 'NoneType' object is not subscriptable\n\n..\\requests_method\\requests_method.py:42: TypeError"}, "attachments": [{"name": "stdout", "source": "10df6d50-42cd-41eb-a0c9-60f5d8ae881d-attachment.txt", "type": "text/plain"}], "parameters": [{"name": "req_method", "value": "'get'"}, {"name": "url", "value": "'http://120.46.172.186:8080/refresh'"}, {"name": "mime", "value": "None"}, {"name": "case_data", "value": "None"}, {"name": "expect_data", "value": "{'message': '刷新token成功'}"}, {"name": "sql_type", "value": "None"}, {"name": "sql_sentence", "value": "None"}, {"name": "update_key", "value": "None"}], "start": 1691390288643, "stop": 1691390288643, "uuid": "8117f714-3ae6-4da1-9fd4-e5fa39069f63", "historyId": "0a00a3971238d875c563edf0def00b44", "testCaseId": "0abeaba8f176b6785a0334bed7c1bdad", "fullName": "test_bpm.TestBPM#test_bpm", "labels": [{"name": "suite", "value": "test_bpm"}, {"name": "subSuite", "value": "TestBPM"}, {"name": "host", "value": "DESKTOP-APQTDRI"}, {"name": "thread", "value": "7876-MainThread"}, {"name": "framework", "value": "pytest"}, {"name": "language", "value": "cpython3"}, {"name": "package", "value": "test_bpm"}]}
\ No newline at end of file
{"uuid": "d0002146-7dd6-4c69-b5a9-27372064b23d", "befores": [{"name": "expect_data", "status": "passed", "start": 1691390287555, "stop": 1691390287555}], "start": 1691390287555, "stop": 1691390287625}
\ No newline at end of file
{"uuid": "403bf529-bdaf-44f7-b3d5-7311a664b2cb", "befores": [{"name": "mime", "status": "passed", "start": 1691390288642, "stop": 1691390288642}], "start": 1691390288642, "stop": 1691390288847}
\ No newline at end of file
{"uuid": "eee3e952-b547-4347-933d-5c2e4a0f2c52", "befores": [{"name": "case_data", "status": "passed", "start": 1691390287554, "stop": 1691390287554}], "start": 1691390287554, "stop": 1691390287625}
\ No newline at end of file
{"uuid": "c61af362-de55-420b-a862-68845512c4c9", "befores": [{"name": "mime", "status": "passed", "start": 1691390288159, "stop": 1691390288159}], "start": 1691390288159, "stop": 1691390288276}
\ No newline at end of file
{"uuid": "5606f9a2-6937-4188-bf32-7a71038110fa", "befores": [{"name": "update_key", "status": "passed", "start": 1691390288525, "stop": 1691390288525}], "start": 1691390288525, "stop": 1691390288623}
\ No newline at end of file
{"uuid": "ae538725-05e3-4b0a-8edf-d619e45f7dd6", "befores": [{"name": "sql_type", "status": "passed", "start": 1691390287632, "stop": 1691390287632}], "start": 1691390287632, "stop": 1691390287683}
\ No newline at end of file
{"uuid": "0561fb38-1913-473f-8b43-f3a511144b85", "befores": [{"name": "expect_data", "status": "passed", "start": 1691390287632, "stop": 1691390287632}], "start": 1691390287632, "stop": 1691390287685}
\ No newline at end of file
{"uuid": "d09e8168-21ad-43c3-bf2b-2fc3f6d8ad0d", "befores": [{"name": "expect_data", "status": "passed", "start": 1691390288855, "stop": 1691390288855}], "start": 1691390288855, "stop": 1691390289042}
\ No newline at end of file
{"uuid": "588ba2a1-8d69-4ccf-b572-e02c2b7c4685", "befores": [{"name": "mime", "status": "passed", "start": 1691390287632, "stop": 1691390287632}], "start": 1691390287632, "stop": 1691390287687}
\ No newline at end of file
{"uuid": "9cce1bb5-6ab0-4eb2-9d2e-043a433ab050", "befores": [{"name": "sql_sentence", "status": "passed", "start": 1691390289437, "stop": 1691390289437}], "start": 1691390289437, "stop": 1691390289569}
\ No newline at end of file
{"uuid": "a156be88-4a0f-4862-8dc8-88fe01e7449f", "befores": [{"name": "expect_data", "status": "passed", "start": 1691390288052, "stop": 1691390288052}], "start": 1691390288052, "stop": 1691390288148}
\ No newline at end of file
{"uuid": "0c865fcb-8192-40cd-9854-746fb8052d05", "children": ["fbcbcca9-42ba-4553-bc53-c654e2a4230d", "817f6a04-2bf2-41a6-85e3-8087948a038e", "4ad64874-e0c1-4e85-94d4-3475134d8be3", "c2facd63-346b-4ced-aee0-9907244a7df2", "926bac72-209e-4862-b6fb-2ad53586858d", "5248f436-9a6d-420e-8acf-3d60f1457fdd", "08f152bf-b656-42cf-b7d2-45a86c51d700", "009c59ac-8494-4bb3-83a8-d2b7670e976b", "7f17c154-3fdd-455a-8496-7866490b39e6", "ad871579-4d9e-4306-bdcb-b91936bd8ebd", "8117f714-3ae6-4da1-9fd4-e5fa39069f63", "b3244abe-5ff2-4d0b-854b-a10bc1856fc9", "4b432c7f-22e1-460d-8b62-77c4cc932f32", "b23ab585-8ef3-4370-859f-3484f75f187f", "d8d727b1-3cc1-48b7-baff-4fd27bd4acbb", "f1a66b00-cb4b-44e9-8ad2-83c67018830a"], "befores": [{"name": "_session_faker", "status": "passed", "start": 1691390287091, "stop": 1691390287235}], "start": 1691390287091, "stop": 1691390289583}
\ No newline at end of file
{"uuid": "97da126d-74ac-436a-9d53-12bf95a7e9f2", "befores": [{"name": "expect_data", "status": "passed", "start": 1691390288524, "stop": 1691390288525}], "start": 1691390288524, "stop": 1691390288632}
\ No newline at end of file
{"uuid": "bd232f50-9b33-43e9-9bb3-894bbfb5e279", "befores": [{"name": "sql_type", "status": "passed", "start": 1691390288287, "stop": 1691390288287}], "start": 1691390288287, "stop": 1691390288385}
\ No newline at end of file
{"uuid": "abfacaf4-a723-4f9d-9764-da347d4bd23d", "befores": [{"name": "sql_sentence", "status": "passed", "start": 1691390288642, "stop": 1691390288642}], "start": 1691390288642, "stop": 1691390288844}
\ No newline at end of file
{"uuid": "35a38387-7cbe-4b43-abb6-a95b2db30c03", "befores": [{"name": "url", "status": "passed", "start": 1691390287812, "stop": 1691390287812}], "start": 1691390287812, "stop": 1691390287929}
\ No newline at end of file
{"uuid": "330c3813-9882-4bc2-94ec-41cb5c58f834", "befores": [{"name": "sql_type", "status": "passed", "start": 1691390289437, "stop": 1691390289437}], "start": 1691390289437, "stop": 1691390289569}
\ No newline at end of file
{"uuid": "9db511b5-2e4d-454d-a8ce-2802ea836b75", "befores": [{"name": "update_key", "status": "passed", "start": 1691390288287, "stop": 1691390288288}], "start": 1691390288287, "stop": 1691390288383}
\ No newline at end of file
{"uuid": "e1261014-7981-4ba9-99e1-2d58d019841a", "befores": [{"name": "case_data", "status": "passed", "start": 1691390289361, "stop": 1691390289361}], "start": 1691390289361, "stop": 1691390289430}
\ No newline at end of file
{"uuid": "c76f37e9-ef0d-41e1-94dc-d8ac9eaf2c61", "befores": [{"name": "case_data", "status": "passed", "start": 1691390288159, "stop": 1691390288159}], "start": 1691390288159, "stop": 1691390288273}
\ No newline at end of file
{"name": "test_bpm[POST-http://120.46.172.186:8080/auth-application/json-case_data6-expect_data6-None-None-None]", "status": "passed", "attachments": [{"name": "stdout", "source": "839dd4d1-c865-4130-b6d9-246c15fcbead-attachment.txt", "type": "text/plain"}], "parameters": [{"name": "req_method", "value": "'POST'"}, {"name": "url", "value": "'http://120.46.172.186:8080/auth'"}, {"name": "mime", "value": "'application/json'"}, {"name": "case_data", "value": "{'password': '', 'username': 'admin'}"}, {"name": "expect_data", "value": "{'state': False, 'message': '账号或密码错误'}"}, {"name": "sql_type", "value": "None"}, {"name": "sql_sentence", "value": "None"}, {"name": "update_key", "value": "None"}], "start": 1691390288160, "stop": 1691390288263, "uuid": "08f152bf-b656-42cf-b7d2-45a86c51d700", "historyId": "6c90e4b89ce0681d3140dfa2408a01be", "testCaseId": "0abeaba8f176b6785a0334bed7c1bdad", "fullName": "test_bpm.TestBPM#test_bpm", "labels": [{"name": "suite", "value": "test_bpm"}, {"name": "subSuite", "value": "TestBPM"}, {"name": "host", "value": "DESKTOP-APQTDRI"}, {"name": "thread", "value": "7876-MainThread"}, {"name": "framework", "value": "pytest"}, {"name": "language", "value": "cpython3"}, {"name": "package", "value": "test_bpm"}]}
\ No newline at end of file
POST http://120.46.172.186:8080/auth application/json {'password': 'MTIzNDU2', 'username': 'adminadminadminadminadminadminadminadminadmin'} {'state': False, 'message': '账号或密码错误'} None None None
====================================================================================================
服务器返回数据 {'state': False, 'message': '账号或密码错误', 'logId': '1688439361621737472'}
断言成功
{"uuid": "3774ae9a-394f-4d03-82aa-27ed06c7857e", "befores": [{"name": "url", "status": "passed", "start": 1691390289059, "stop": 1691390289059}], "start": 1691390289059, "stop": 1691390289249}
\ No newline at end of file
{"uuid": "b16c035a-99f0-4b5f-8bec-4b1963a3c26a", "befores": [{"name": "expect_data", "status": "passed", "start": 1691390288159, "stop": 1691390288159}], "start": 1691390288159, "stop": 1691390288272}
\ No newline at end of file
{"uuid": "24ec85a5-2350-4578-ad77-f86e3a12eb57", "befores": [{"name": "req_method", "status": "passed", "start": 1691390289059, "stop": 1691390289059}], "start": 1691390289059, "stop": 1691390289249}
\ No newline at end of file
{"uuid": "e4e58a4f-edb5-4ff4-9963-68e13365e4bd", "befores": [{"name": "update_key", "status": "passed", "start": 1691390289362, "stop": 1691390289362}], "start": 1691390289362, "stop": 1691390289425}
\ No newline at end of file
POST http://120.46.172.186:8080/auth application/json {'password': '', 'username': 'admin'} {'state': False, 'message': '账号或密码错误'} None None None
====================================================================================================
服务器返回数据 {'state': False, 'message': '账号或密码错误', 'logId': '1688439363584671744'}
断言成功
{"uuid": "353a37e9-d62a-49ea-bb50-01debb87ed35", "befores": [{"name": "update_key", "status": "passed", "start": 1691390287813, "stop": 1691390287813}], "start": 1691390287813, "stop": 1691390287920}
\ No newline at end of file
{"name": "test_bpm[POST-http://120.46.172.186:8080/auth-application/json-case_data9-expect_data9-None-None-None]", "status": "passed", "attachments": [{"name": "stdout", "source": "39e3f7a7-be7e-47f0-a71a-189d6a0fb6f5-attachment.txt", "type": "text/plain"}], "parameters": [{"name": "req_method", "value": "'POST'"}, {"name": "url", "value": "'http://120.46.172.186:8080/auth'"}, {"name": "mime", "value": "'application/json'"}, {"name": "case_data", "value": "{'password': '▬♦◊◦☼♠♣', 'username': 'admin'}"}, {"name": "expect_data", "value": "{'state': False, 'message': '账号或密码错误'}"}, {"name": "sql_type", "value": "None"}, {"name": "sql_sentence", "value": "None"}, {"name": "update_key", "value": "None"}], "start": 1691390288526, "stop": 1691390288622, "uuid": "ad871579-4d9e-4306-bdcb-b91936bd8ebd", "historyId": "5483ef170b535e751512054cc94898e1", "testCaseId": "0abeaba8f176b6785a0334bed7c1bdad", "fullName": "test_bpm.TestBPM#test_bpm", "labels": [{"name": "suite", "value": "test_bpm"}, {"name": "subSuite", "value": "TestBPM"}, {"name": "host", "value": "DESKTOP-APQTDRI"}, {"name": "thread", "value": "7876-MainThread"}, {"name": "framework", "value": "pytest"}, {"name": "language", "value": "cpython3"}, {"name": "package", "value": "test_bpm"}]}
\ No newline at end of file
{"uuid": "75761fee-c5a2-4c85-bdd6-679e7ff42ede", "befores": [{"name": "sql_sentence", "status": "passed", "start": 1691390288052, "stop": 1691390288052}], "start": 1691390288052, "stop": 1691390288146}
\ No newline at end of file
{"uuid": "98aaf34b-5e34-4420-99c7-29d0d794c8fb", "befores": [{"name": "sql_sentence", "status": "passed", "start": 1691390287632, "stop": 1691390287632}], "start": 1691390287632, "stop": 1691390287683}
\ No newline at end of file
{"uuid": "83c8a728-4717-41d6-b2a4-0b3ea04b6683", "befores": [{"name": "mime", "status": "passed", "start": 1691390288524, "stop": 1691390288524}], "start": 1691390288524, "stop": 1691390288634}
\ No newline at end of file
{"uuid": "16a49f59-726f-4204-82d7-699b8177865c", "befores": [{"name": "case_data", "status": "passed", "start": 1691390288052, "stop": 1691390288052}], "start": 1691390288052, "stop": 1691390288149}
\ No newline at end of file
{"uuid": "ecccb1c8-1e3f-426b-90c2-913172389551", "befores": [{"name": "req_method", "status": "passed", "start": 1691390288286, "stop": 1691390288286}], "start": 1691390288286, "stop": 1691390288393}
\ No newline at end of file
{"uuid": "728e5233-9255-4948-948d-8ce99ca31d87", "befores": [{"name": "mime", "status": "passed", "start": 1691390289059, "stop": 1691390289059}], "start": 1691390289059, "stop": 1691390289248}
\ No newline at end of file
DELETE http://120.46.172.186:8080/api/demension/v1/dem/deleteDemByIds query {'ids': '不知道'} {'state': True, 'message': '删除维度成功'} select SELECT ID_ FROM uc_demension WHERE `CODE_`="test56_dem"; ids
{'ids': '1688439366835257344'}
====================================================================================================
服务器返回数据 {'state': True, 'message': '删除维度成功!', 'value': ''}
{"uuid": "d85d2686-8992-44c4-8d53-15946846efaf", "befores": [{"name": "sql_type", "status": "passed", "start": 1691390287555, "stop": 1691390287556}], "start": 1691390287555, "stop": 1691390287623}
\ No newline at end of file
post http://120.46.172.186:8080/api/org/v1/orgParam/saveOrgParams application/json|query {'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': '保存组织参数成功!'} None None None
====================================================================================================
服务器返回数据 {'state': True, 'message': '保存组织参数成功!', 'value': ''}
断言成功
{"uuid": "4f353efa-f074-4c04-925f-16f955c753c7", "befores": [{"name": "update_key", "status": "passed", "start": 1691390288642, "stop": 1691390288642}], "start": 1691390288642, "stop": 1691390288843}
\ No newline at end of file
{"uuid": "5121fbf4-c39a-47c0-98e2-2608e327795c", "befores": [{"name": "sql_type", "status": "passed", "start": 1691390287693, "stop": 1691390287693}], "start": 1691390287693, "stop": 1691390287799}
\ No newline at end of file
{"uuid": "630279d6-1f1e-4bf7-a4b8-712ca8986123", "befores": [{"name": "expect_data", "status": "passed", "start": 1691390289254, "stop": 1691390289254}], "start": 1691390289254, "stop": 1691390289332}
\ No newline at end of file
POST http://120.46.172.186:8080/auth application/json {'password': 'MTIzNDU2', 'username': ''} {'state': False, 'message': '账号或密码错误'} None None None
====================================================================================================
服务器返回数据 {'state': False, 'message': '账号或密码错误', 'logId': '1688439361168752640'}
断言成功
{"uuid": "f3be73c4-16b8-4967-b5a7-9790c17e2ee6", "befores": [{"name": "url", "status": "passed", "start": 1691390289437, "stop": 1691390289437}], "start": 1691390289437, "stop": 1691390289577}
\ No newline at end of file
{"name": "test_bpm[post-http://120.46.172.186:8080/api/demension/v1/dem/addDem-application/json-case_data11-expect_data11-delete-DELETE FROM uc_demension WHERE `CODE_`=\"test56_dem\";-None]", "status": "passed", "attachments": [{"name": "stdout", "source": "9e6a34e9-e63a-4f1f-843d-0e8c6b791d3e-attachment.txt", "type": "text/plain"}], "parameters": [{"name": "req_method", "value": "'post'"}, {"name": "url", "value": "'http://120.46.172.186:8080/api/demension/v1/dem/addDem'"}, {"name": "mime", "value": "'application/json'"}, {"name": "case_data", "value": "{'code': 'test56_dem', 'description': '测试56期的维度', 'isDefault': 0, 'name': '测试56期的维度'}"}, {"name": "expect_data", "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": 1691390288856, "stop": 1691390289038, "uuid": "b3244abe-5ff2-4d0b-854b-a10bc1856fc9", "historyId": "471e2cceb68269d45c456d12d3de1cda", "testCaseId": "0abeaba8f176b6785a0334bed7c1bdad", "fullName": "test_bpm.TestBPM#test_bpm", "labels": [{"name": "suite", "value": "test_bpm"}, {"name": "subSuite", "value": "TestBPM"}, {"name": "host", "value": "DESKTOP-APQTDRI"}, {"name": "thread", "value": "7876-MainThread"}, {"name": "framework", "value": "pytest"}, {"name": "language", "value": "cpython3"}, {"name": "package", "value": "test_bpm"}]}
\ No newline at end of file
{"uuid": "e51405fe-5b71-4b23-91bc-3f86409be647", "children": ["fbcbcca9-42ba-4553-bc53-c654e2a4230d", "817f6a04-2bf2-41a6-85e3-8087948a038e", "4ad64874-e0c1-4e85-94d4-3475134d8be3", "c2facd63-346b-4ced-aee0-9907244a7df2", "926bac72-209e-4862-b6fb-2ad53586858d", "5248f436-9a6d-420e-8acf-3d60f1457fdd", "08f152bf-b656-42cf-b7d2-45a86c51d700", "009c59ac-8494-4bb3-83a8-d2b7670e976b", "7f17c154-3fdd-455a-8496-7866490b39e6", "ad871579-4d9e-4306-bdcb-b91936bd8ebd", "8117f714-3ae6-4da1-9fd4-e5fa39069f63", "b3244abe-5ff2-4d0b-854b-a10bc1856fc9", "4b432c7f-22e1-460d-8b62-77c4cc932f32", "b23ab585-8ef3-4370-859f-3484f75f187f", "d8d727b1-3cc1-48b7-baff-4fd27bd4acbb", "f1a66b00-cb4b-44e9-8ad2-83c67018830a"], "befores": [{"name": "req_fix", "status": "passed", "start": 1691390287456, "stop": 1691390287552}], "afters": [{"name": "req_fix::0", "status": "passed", "start": 1691390289580, "stop": 1691390289580}], "start": 1691390287456, "stop": 1691390289580}
\ No newline at end of file
post http://120.46.172.186:8080/api/demension/v1/dem/addDem application/json {'code': 'test56_dem', 'description': '测试56期的维度', 'isDefault': 0, 'name': '测试56期的维度'} {'state': True, 'message': '添加维度成功!'} delete DELETE FROM uc_demension WHERE `CODE_`="test56_dem"; None
====================================================================================================
服务器返回数据 {'state': True, 'message': '添加维度成功!', 'value': ''}
断言成功
{"uuid": "b746babf-73a5-46ec-95b1-53f39f86125c", "befores": [{"name": "update_key", "status": "passed", "start": 1691390287632, "stop": 1691390287632}], "start": 1691390287632, "stop": 1691390287682}
\ No newline at end of file
{"uuid": "abf9cb3e-c723-4eda-a2fc-57d3292e7c94", "befores": [{"name": "sql_type", "status": "passed", "start": 1691390289254, "stop": 1691390289254}], "start": 1691390289254, "stop": 1691390289330}
\ No newline at end of file
{"uuid": "b277402d-b9ef-4af8-b45c-776fabc865d6", "befores": [{"name": "sql_sentence", "status": "passed", "start": 1691390287940, "stop": 1691390287940}], "start": 1691390287940, "stop": 1691390288040}
\ No newline at end of file
{"uuid": "deff5990-459b-4dc6-95b9-ab3e98890233", "befores": [{"name": "url", "status": "passed", "start": 1691390288397, "stop": 1691390288397}], "start": 1691390288397, "stop": 1691390288511}
\ No newline at end of file
{"uuid": "9b2e76d3-e3ec-4cb7-9914-6aec6dbf7fdf", "befores": [{"name": "url", "status": "passed", "start": 1691390287632, "stop": 1691390287632}], "start": 1691390287632, "stop": 1691390287688}
\ No newline at end of file
{"uuid": "a7f6729a-e650-48e4-ac66-c41226ed6bfc", "befores": [{"name": "url", "status": "passed", "start": 1691390288287, "stop": 1691390288287}], "start": 1691390288287, "stop": 1691390288392}
\ No newline at end of file
{"uuid": "a1af4f97-f70a-4d3f-9f63-1cd3bbfc4c72", "befores": [{"name": "sql_type", "status": "passed", "start": 1691390288159, "stop": 1691390288159}], "start": 1691390288159, "stop": 1691390288270}
\ No newline at end of file
{"name": "test_bpm[PoST-http://120.46.172.186:8080/auth-application/json-case_data8-expect_data8-None-None-None]", "status": "passed", "attachments": [{"name": "stdout", "source": "131a9676-54c8-41d4-8719-d315360d9756-attachment.txt", "type": "text/plain"}], "parameters": [{"name": "req_method", "value": "'PoST'"}, {"name": "url", "value": "'http://120.46.172.186:8080/auth'"}, {"name": "mime", "value": "'application/json'"}, {"name": "case_data", "value": "{'password': '1', 'username': 'admin'}"}, {"name": "expect_data", "value": "{'state': False, 'message': '账号或密码错误'}"}, {"name": "sql_type", "value": "None"}, {"name": "sql_sentence", "value": "None"}, {"name": "update_key", "value": "None"}], "start": 1691390288398, "stop": 1691390288494, "uuid": "7f17c154-3fdd-455a-8496-7866490b39e6", "historyId": "117a8071feaa183c7cc1264b06a401bc", "testCaseId": "0abeaba8f176b6785a0334bed7c1bdad", "fullName": "test_bpm.TestBPM#test_bpm", "labels": [{"name": "suite", "value": "test_bpm"}, {"name": "subSuite", "value": "TestBPM"}, {"name": "host", "value": "DESKTOP-APQTDRI"}, {"name": "thread", "value": "7876-MainThread"}, {"name": "framework", "value": "pytest"}, {"name": "language", "value": "cpython3"}, {"name": "package", "value": "test_bpm"}]}
\ No newline at end of file
{"uuid": "c21d6ec8-9ce1-4a59-a4bf-292839c301ca", "befores": [{"name": "req_method", "status": "passed", "start": 1691390287553, "stop": 1691390287553}], "start": 1691390287552, "stop": 1691390287627}
\ No newline at end of file
{"uuid": "e64cb931-2f52-48f8-8df4-591cd0aa8c2d", "befores": [{"name": "case_data", "status": "passed", "start": 1691390288855, "stop": 1691390288855}], "start": 1691390288855, "stop": 1691390289043}
\ No newline at end of file
{"uuid": "957e2ec2-1457-487e-9166-78cbb167094a", "befores": [{"name": "case_data", "status": "passed", "start": 1691390287693, "stop": 1691390287693}], "start": 1691390287693, "stop": 1691390287801}
\ No newline at end of file
{"uuid": "2cbff501-0088-4b1a-b26d-3c094521ab58", "befores": [{"name": "sql_sentence", "status": "passed", "start": 1691390287556, "stop": 1691390287556}], "start": 1691390287556, "stop": 1691390287622}
\ No newline at end of file
{"uuid": "d4a21d5e-c26d-4477-98af-328a96d607bc", "befores": [{"name": "req_method", "status": "passed", "start": 1691390289253, "stop": 1691390289253}], "start": 1691390289253, "stop": 1691390289343}
\ No newline at end of file
{"name": "test_bpm[POST-http://120.46.172.186:8080/auth-json-case_data5-expect_data5-None-None-None]", "status": "passed", "attachments": [{"name": "stdout", "source": "08209340-144d-4c3f-961f-b75b54c97480-attachment.txt", "type": "text/plain"}], "parameters": [{"name": "req_method", "value": "'POST'"}, {"name": "url", "value": "'http://120.46.172.186:8080/auth'"}, {"name": "mime", "value": "'json'"}, {"name": "case_data", "value": "{'password': 'MTIzNDU2', 'username': 'tomcat'}"}, {"name": "expect_data", "value": "{'state': False, 'message': '账号或密码错误'}"}, {"name": "sql_type", "value": "None"}, {"name": "sql_sentence", "value": "None"}, {"name": "update_key", "value": "None"}], "start": 1691390288053, "stop": 1691390288145, "uuid": "5248f436-9a6d-420e-8acf-3d60f1457fdd", "historyId": "d39ffb67ee8a4be856da847f1df52857", "testCaseId": "0abeaba8f176b6785a0334bed7c1bdad", "fullName": "test_bpm.TestBPM#test_bpm", "labels": [{"name": "suite", "value": "test_bpm"}, {"name": "subSuite", "value": "TestBPM"}, {"name": "host", "value": "DESKTOP-APQTDRI"}, {"name": "thread", "value": "7876-MainThread"}, {"name": "framework", "value": "pytest"}, {"name": "language", "value": "cpython3"}, {"name": "package", "value": "test_bpm"}]}
\ No newline at end of file
{"uuid": "86f9b6ed-e673-4ca1-9259-240c3d718311", "children": ["fbcbcca9-42ba-4553-bc53-c654e2a4230d", "817f6a04-2bf2-41a6-85e3-8087948a038e", "4ad64874-e0c1-4e85-94d4-3475134d8be3", "c2facd63-346b-4ced-aee0-9907244a7df2", "926bac72-209e-4862-b6fb-2ad53586858d", "5248f436-9a6d-420e-8acf-3d60f1457fdd", "08f152bf-b656-42cf-b7d2-45a86c51d700", "009c59ac-8494-4bb3-83a8-d2b7670e976b", "7f17c154-3fdd-455a-8496-7866490b39e6", "ad871579-4d9e-4306-bdcb-b91936bd8ebd", "8117f714-3ae6-4da1-9fd4-e5fa39069f63", "b3244abe-5ff2-4d0b-854b-a10bc1856fc9", "4b432c7f-22e1-460d-8b62-77c4cc932f32", "b23ab585-8ef3-4370-859f-3484f75f187f", "d8d727b1-3cc1-48b7-baff-4fd27bd4acbb", "f1a66b00-cb4b-44e9-8ad2-83c67018830a"], "befores": [{"name": "db_fix", "status": "passed", "start": 1691390287235, "stop": 1691390287456}], "afters": [{"name": "db_fix::0", "status": "passed", "start": 1691390289582, "stop": 1691390289582}], "start": 1691390287235, "stop": 1691390289582}
\ No newline at end of file
{"uuid": "297815d7-1848-49fa-9722-0761858e9e64", "befores": [{"name": "sql_type", "status": "passed", "start": 1691390288397, "stop": 1691390288397}], "start": 1691390288397, "stop": 1691390288503}
\ No newline at end of file
{"name": "test_bpm[post-http://120.46.172.186:8080/api/org/v1/org/addOrg-application/json-case_data12-expect_data12-delete|select-sql_sentence12-demId]", "status": "passed", "attachments": [{"name": "stdout", "source": "53137998-ed14-4023-94dd-e66a4b63b469-attachment.txt", "type": "text/plain"}], "parameters": [{"name": "req_method", "value": "'post'"}, {"name": "url", "value": "'http://120.46.172.186:8080/api/org/v1/org/addOrg'"}, {"name": "mime", "value": "'application/json'"}, {"name": "case_data", "value": "{'code': 'test56_org', 'demId': '不知道', 'exceedLimitNum': 0, 'grade': '', 'limitNum': 0, 'name': '测试的组织', 'nowNum': 0, 'orderNo': 0, 'parentId': '0'}"}, {"name": "expect_data", "value": "{'state': True, 'message': '添加组织成功!'}"}, {"name": "sql_type", "value": "'delete|select'"}, {"name": "sql_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": 1691390289060, "stop": 1691390289242, "uuid": "4b432c7f-22e1-460d-8b62-77c4cc932f32", "historyId": "e56db92efdd73c6c11ea75e26188497e", "testCaseId": "0abeaba8f176b6785a0334bed7c1bdad", "fullName": "test_bpm.TestBPM#test_bpm", "labels": [{"name": "suite", "value": "test_bpm"}, {"name": "subSuite", "value": "TestBPM"}, {"name": "host", "value": "DESKTOP-APQTDRI"}, {"name": "thread", "value": "7876-MainThread"}, {"name": "framework", "value": "pytest"}, {"name": "language", "value": "cpython3"}, {"name": "package", "value": "test_bpm"}]}
\ No newline at end of file
{"uuid": "cb8d970f-35c7-4fc4-bfb4-202e4ee67a11", "befores": [{"name": "sql_sentence", "status": "passed", "start": 1691390288525, "stop": 1691390288525}], "start": 1691390288525, "stop": 1691390288624}
\ No newline at end of file
{"uuid": "f1fed97e-61d4-47c6-b255-c5883ad466e1", "befores": [{"name": "case_data", "status": "passed", "start": 1691390288397, "stop": 1691390288397}], "start": 1691390288397, "stop": 1691390288507}
\ No newline at end of file
{"uuid": "4064cf66-96ac-45a5-838e-37b5435807a0", "befores": [{"name": "sql_type", "status": "passed", "start": 1691390288855, "stop": 1691390288855}], "start": 1691390288855, "stop": 1691390289041}
\ No newline at end of file
{"uuid": "296f3f4f-4a9f-4521-aaa6-50390309bfbb", "befores": [{"name": "expect_data", "status": "passed", "start": 1691390287693, "stop": 1691390287693}], "start": 1691390287693, "stop": 1691390287800}
\ No newline at end of file
{"uuid": "bb06c4f2-22a4-40c5-b8b5-04df279ecfda", "befores": [{"name": "mime", "status": "passed", "start": 1691390289254, "stop": 1691390289254}], "start": 1691390289254, "stop": 1691390289338}
\ No newline at end of file
{"uuid": "7624ca9d-8bc9-47b1-84b4-fde8cc6117a3", "befores": [{"name": "req_method", "status": "passed", "start": 1691390287939, "stop": 1691390287939}], "start": 1691390287939, "stop": 1691390288048}
\ No newline at end of file
{"uuid": "9543b819-c52d-4452-9536-ab3b504ae9c9", "befores": [{"name": "mime", "status": "passed", "start": 1691390287812, "stop": 1691390287812}], "start": 1691390287812, "stop": 1691390287927}
\ No newline at end of file
{"uuid": "ea84e51e-1b3c-4bb6-9974-76d11bb82512", "befores": [{"name": "case_data", "status": "passed", "start": 1691390288287, "stop": 1691390288287}], "start": 1691390288287, "stop": 1691390288388}
\ No newline at end of file
{"uuid": "a2e35df5-b921-4d56-8832-5dc519458017", "befores": [{"name": "update_key", "status": "passed", "start": 1691390288052, "stop": 1691390288052}], "start": 1691390288052, "stop": 1691390288145}
\ No newline at end of file
{"uuid": "f1958c74-0691-446d-a8bf-ef1949bb0128", "befores": [{"name": "sql_type", "status": "passed", "start": 1691390288642, "stop": 1691390288642}], "start": 1691390288642, "stop": 1691390288845}
\ No newline at end of file
{"uuid": "d58814a2-a6c0-4f56-8628-00f48d4969bd", "befores": [{"name": "req_method", "status": "passed", "start": 1691390287812, "stop": 1691390287812}], "start": 1691390287812, "stop": 1691390287931}
\ No newline at end of file
{"name": "test_bpm[POST-http://120.46.172.186:8080/auth-application/json-case_data3-expect_data3-None-None-None]", "status": "passed", "attachments": [{"name": "stdout", "source": "e50ea6db-f49a-41c0-b36b-e3d939c63e8e-attachment.txt", "type": "text/plain"}], "parameters": [{"name": "req_method", "value": "'POST'"}, {"name": "url", "value": "'http://120.46.172.186:8080/auth'"}, {"name": "mime", "value": "'application/json'"}, {"name": "case_data", "value": "{'password': 'MTIzNDU2', 'username': 'a'}"}, {"name": "expect_data", "value": "{'state': False, 'message': '账号或密码错误'}"}, {"name": "sql_type", "value": "None"}, {"name": "sql_sentence", "value": "None"}, {"name": "update_key", "value": "None"}], "start": 1691390287814, "stop": 1691390287919, "uuid": "c2facd63-346b-4ced-aee0-9907244a7df2", "historyId": "2556e75835ecf88c02d785665df6fd98", "testCaseId": "0abeaba8f176b6785a0334bed7c1bdad", "fullName": "test_bpm.TestBPM#test_bpm", "labels": [{"name": "suite", "value": "test_bpm"}, {"name": "subSuite", "value": "TestBPM"}, {"name": "host", "value": "DESKTOP-APQTDRI"}, {"name": "thread", "value": "7876-MainThread"}, {"name": "framework", "value": "pytest"}, {"name": "language", "value": "cpython3"}, {"name": "package", "value": "test_bpm"}]}
\ No newline at end of file
{"uuid": "b8025255-5cf1-42f7-86ef-ab897634f332", "befores": [{"name": "sql_sentence", "status": "passed", "start": 1691390288159, "stop": 1691390288160}], "start": 1691390288159, "stop": 1691390288267}
\ No newline at end of file
{"uuid": "e7ee7658-1c83-4fd8-be94-4eec09f18420", "befores": [{"name": "mime", "status": "passed", "start": 1691390287940, "stop": 1691390287940}], "start": 1691390287940, "stop": 1691390288046}
\ No newline at end of file
{"uuid": "b2b6a65f-854f-46d9-bd84-47ebbe3223a6", "befores": [{"name": "url", "status": "passed", "start": 1691390287692, "stop": 1691390287693}], "start": 1691390287692, "stop": 1691390287804}
\ No newline at end of file
{"uuid": "f73d5243-68c7-4952-a66f-4b04a49e2348", "befores": [{"name": "url", "status": "passed", "start": 1691390288524, "stop": 1691390288524}], "start": 1691390288524, "stop": 1691390288635}
\ No newline at end of file
{"uuid": "0604c5a4-0b1d-4c1f-a9f9-951c6e91bede", "befores": [{"name": "req_method", "status": "passed", "start": 1691390288641, "stop": 1691390288641}], "start": 1691390288641, "stop": 1691390288850}
\ No newline at end of file
{"uuid": "15badd2a-0603-4f59-b614-e362e31d1028", "befores": [{"name": "sql_sentence", "status": "passed", "start": 1691390287693, "stop": 1691390287693}], "start": 1691390287693, "stop": 1691390287798}
\ No newline at end of file
{"name": "test_bpm[POST-http://120.46.172.186:8080/auth-application/json-case_data2-expect_data2-None-None-None]", "status": "passed", "attachments": [{"name": "stdout", "source": "78f01eb6-14c6-4e0a-a135-253e8abff15b-attachment.txt", "type": "text/plain"}], "parameters": [{"name": "req_method", "value": "'POST'"}, {"name": "url", "value": "'http://120.46.172.186:8080/auth'"}, {"name": "mime", "value": "'application/json'"}, {"name": "case_data", "value": "{'password': 'MTIzNDU2', 'username': 'adminadminadminadminadminadminadminadminadmin'}"}, {"name": "expect_data", "value": "{'state': False, 'message': '账号或密码错误'}"}, {"name": "sql_type", "value": "None"}, {"name": "sql_sentence", "value": "None"}, {"name": "update_key", "value": "None"}], "start": 1691390287694, "stop": 1691390287793, "uuid": "4ad64874-e0c1-4e85-94d4-3475134d8be3", "historyId": "f32a9af8445f9ba6bdb6cf5c1e0e61b0", "testCaseId": "0abeaba8f176b6785a0334bed7c1bdad", "fullName": "test_bpm.TestBPM#test_bpm", "labels": [{"name": "suite", "value": "test_bpm"}, {"name": "subSuite", "value": "TestBPM"}, {"name": "host", "value": "DESKTOP-APQTDRI"}, {"name": "thread", "value": "7876-MainThread"}, {"name": "framework", "value": "pytest"}, {"name": "language", "value": "cpython3"}, {"name": "package", "value": "test_bpm"}]}
\ No newline at end of file
{"uuid": "6b518585-13f5-47ed-bc3e-3563483874a9", "befores": [{"name": "sql_type", "status": "passed", "start": 1691390287813, "stop": 1691390287813}], "start": 1691390287813, "stop": 1691390287923}
\ No newline at end of file
{"uuid": "e6faf75f-5070-4c7e-b2ae-ff93b0ef29d9", "befores": [{"name": "url", "status": "passed", "start": 1691390287553, "stop": 1691390287553}], "start": 1691390287553, "stop": 1691390287627}
\ No newline at end of file
POST http://120.46.172.186:8080/auth application/json {'password': 'MTIzNDU2', 'username': 'a'} {'state': False, 'message': '账号或密码错误'} None None None
====================================================================================================
服务器返回数据 {'state': False, 'message': '账号或密码错误', 'logId': '1688439362137636864'}
断言成功
{"uuid": "2cfd00aa-8c9a-492f-84fa-141a5145726f", "befores": [{"name": "mime", "status": "passed", "start": 1691390287554, "stop": 1691390287554}], "start": 1691390287554, "stop": 1691390287626}
\ No newline at end of file
{"uuid": "86911202-84d2-4da9-8178-65495c6dcdf2", "befores": [{"name": "sql_type", "status": "passed", "start": 1691390288052, "stop": 1691390288052}], "start": 1691390288052, "stop": 1691390288147}
\ No newline at end of file
{"uuid": "cca66c9d-13d9-4ea5-af4e-25ab56732dab", "befores": [{"name": "sql_type", "status": "passed", "start": 1691390288525, "stop": 1691390288525}], "start": 1691390288525, "stop": 1691390288629}
\ No newline at end of file
{"uuid": "697d1755-4bdc-4775-aa49-117a482062e4", "befores": [{"name": "req_method", "status": "passed", "start": 1691390288854, "stop": 1691390288854}], "start": 1691390288854, "stop": 1691390289052}
\ No newline at end of file
{"uuid": "dd2c4455-44d0-432f-8255-c78d18d70ae0", "befores": [{"name": "url", "status": "passed", "start": 1691390288159, "stop": 1691390288159}], "start": 1691390288159, "stop": 1691390288279}
\ No newline at end of file
{"uuid": "7018eef7-a986-4cf4-b974-fd844f923a2a", "befores": [{"name": "expect_data", "status": "passed", "start": 1691390288287, "stop": 1691390288287}], "start": 1691390288287, "stop": 1691390288387}
\ No newline at end of file
{"uuid": "53212075-ee2f-4367-8482-32809419aa75", "befores": [{"name": "url", "status": "passed", "start": 1691390287939, "stop": 1691390287939}], "start": 1691390287939, "stop": 1691390288047}
\ No newline at end of file
{"uuid": "66f6417f-7677-44f9-960e-0f6f9f563efc", "befores": [{"name": "url", "status": "passed", "start": 1691390289360, "stop": 1691390289360}], "start": 1691390289360, "stop": 1691390289432}
\ No newline at end of file
{"uuid": "c8f695d2-b7a2-49ee-bbb0-a1339d39387b", "befores": [{"name": "case_data", "status": "passed", "start": 1691390289254, "stop": 1691390289254}], "start": 1691390289254, "stop": 1691390289334}
\ No newline at end of file
{"uuid": "61d1dda4-edbd-44d4-aa0f-ba8ebf17d631", "befores": [{"name": "case_data", "status": "passed", "start": 1691390289059, "stop": 1691390289059}], "start": 1691390289059, "stop": 1691390289247}
\ No newline at end of file
{"uuid": "536214d1-9225-4aca-bcd9-c12220b396da", "befores": [{"name": "expect_data", "status": "passed", "start": 1691390287812, "stop": 1691390287812}], "start": 1691390287812, "stop": 1691390287924}
\ No newline at end of file
{"uuid": "ff90fd54-b208-432d-86d4-dea812410061", "befores": [{"name": "req_method", "status": "passed", "start": 1691390288158, "stop": 1691390288159}], "start": 1691390288158, "stop": 1691390288280}
\ No newline at end of file
{"name": "test_bpm[DELETE-http://120.46.172.186:8080/api/demension/v1/dem/deleteDemByIds-query-case_data15-expect_data15-select-SELECT ID_ FROM uc_demension WHERE `CODE_`=\"test56_dem\";-ids]", "status": "failed", "statusDetails": {"message": "AssertionError: 断言失败", "trace": "self = <learn.APIAutoTest_02.test_case.test_bpm.TestBPM object at 0x000001E62AD29810>, db_fix = <learn.APIAutoTest_02.common.db.DB object at 0x000001E62AD7DAD0>\nreq_fix = <learn.APIAutoTest_02.requests_method.requests_method.RequestsMethod object at 0x000001E62ADDC150>, req_method = 'DELETE'\nurl = 'http://120.46.172.186:8080/api/demension/v1/dem/deleteDemByIds', mime = 'query', case_data = {'ids': '1688439366835257344'}, expect_data = {'message': '删除维度成功', 'state': True}\nsql_type = 'select', sql_sentence = 'SELECT ID_ FROM uc_demension WHERE `CODE_`=\"test56_dem\";', update_key = 'ids'\n\n @pytest.mark.parametrize(\"req_method, url, mime, case_data, expect_data, sql_type, sql_sentence, update_key\", ReadExcel().get_data())\n def test_bpm(self, db_fix, req_fix, req_method, url, mime, case_data, expect_data, sql_type, sql_sentence, update_key):\n print(req_method, url, mime, case_data, expect_data, sql_type, sql_sentence, update_key)\n \n if sql_type == \"delete\":\n db_fix.delete(sql_sentence)\n result = req_fix.request_all(method=req_method, url=url, mime=mime, case_data=case_data)\n \n elif sql_type == \"select\":\n select_result = db_fix.select(sql_sentence)\n case_data[update_key] = select_result\n print(case_data)\n result = req_fix.request_all(method=req_method, url=url, mime=mime, case_data=case_data)\n \n elif sql_type == \"select|delete\" or sql_type == \"delete|select\":\n \n db_fix.delete(sql_sentence[\"delete\"])\n \n select_result = db_fix.select(sql_sentence[\"select\"])\n case_data[update_key] = select_result\n result = req_fix.request_all(method=req_method, url=url, mime=mime, case_data=case_data)\n \n else:\n result = req_fix.request_all(method=req_method, url=url, mime=mime, case_data=case_data)\n \n \n print(\"=\"*100)\n print(\"服务器返回数据\", result.json())\n try:\n for key in expect_data.keys():\n> assert expect_data[key] == result.json().get(key)\nE AssertionError: assert '删除维度成功' == '删除维度成功!'\nE - 删除维度成功!\nE ? -\nE + 删除维度成功\n\ntest_bpm.py:47: AssertionError\n\nDuring handling of the above exception, another exception occurred:\n\nself = <learn.APIAutoTest_02.test_case.test_bpm.TestBPM object at 0x000001E62AD29810>, db_fix = <learn.APIAutoTest_02.common.db.DB object at 0x000001E62AD7DAD0>\nreq_fix = <learn.APIAutoTest_02.requests_method.requests_method.RequestsMethod object at 0x000001E62ADDC150>, req_method = 'DELETE'\nurl = 'http://120.46.172.186:8080/api/demension/v1/dem/deleteDemByIds', mime = 'query', case_data = {'ids': '1688439366835257344'}, expect_data = {'message': '删除维度成功', 'state': True}\nsql_type = 'select', sql_sentence = 'SELECT ID_ FROM uc_demension WHERE `CODE_`=\"test56_dem\";', update_key = 'ids'\n\n @pytest.mark.parametrize(\"req_method, url, mime, case_data, expect_data, sql_type, sql_sentence, update_key\", ReadExcel().get_data())\n def test_bpm(self, db_fix, req_fix, req_method, url, mime, case_data, expect_data, sql_type, sql_sentence, update_key):\n print(req_method, url, mime, case_data, expect_data, sql_type, sql_sentence, update_key)\n \n if sql_type == \"delete\":\n db_fix.delete(sql_sentence)\n result = req_fix.request_all(method=req_method, url=url, mime=mime, case_data=case_data)\n \n elif sql_type == \"select\":\n select_result = db_fix.select(sql_sentence)\n case_data[update_key] = select_result\n print(case_data)\n result = req_fix.request_all(method=req_method, url=url, mime=mime, case_data=case_data)\n \n elif sql_type == \"select|delete\" or sql_type == \"delete|select\":\n \n db_fix.delete(sql_sentence[\"delete\"])\n \n select_result = db_fix.select(sql_sentence[\"select\"])\n case_data[update_key] = select_result\n result = req_fix.request_all(method=req_method, url=url, mime=mime, case_data=case_data)\n \n else:\n result = req_fix.request_all(method=req_method, url=url, mime=mime, case_data=case_data)\n \n \n print(\"=\"*100)\n print(\"服务器返回数据\", result.json())\n try:\n for key in expect_data.keys():\n assert expect_data[key] == result.json().get(key)\n except:\n> raise AssertionError(\"断言失败\")\nE AssertionError: 断言失败\n\ntest_bpm.py:49: AssertionError"}, "attachments": [{"name": "stdout", "source": "9065dd1f-c518-4911-9d0a-36d55b3560e3-attachment.txt", "type": "text/plain"}], "parameters": [{"name": "req_method", "value": "'DELETE'"}, {"name": "url", "value": "'http://120.46.172.186:8080/api/demension/v1/dem/deleteDemByIds'"}, {"name": "mime", "value": "'query'"}, {"name": "case_data", "value": "{'ids': '不知道'}"}, {"name": "expect_data", "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": 1691390289438, "stop": 1691390289543, "uuid": "f1a66b00-cb4b-44e9-8ad2-83c67018830a", "historyId": "4d41dafb107d3e828209bc110eaafb57", "testCaseId": "0abeaba8f176b6785a0334bed7c1bdad", "fullName": "test_bpm.TestBPM#test_bpm", "labels": [{"name": "suite", "value": "test_bpm"}, {"name": "subSuite", "value": "TestBPM"}, {"name": "host", "value": "DESKTOP-APQTDRI"}, {"name": "thread", "value": "7876-MainThread"}, {"name": "framework", "value": "pytest"}, {"name": "language", "value": "cpython3"}, {"name": "package", "value": "test_bpm"}]}
\ No newline at end of file
{"name": "test_bpm[POST-http://120.46.172.186:8080/auth-application/json-case_data1-expect_data1-None-None-None]", "status": "passed", "attachments": [{"name": "stdout", "source": "9b21798d-5126-4aae-8216-bb22596275c1-attachment.txt", "type": "text/plain"}], "parameters": [{"name": "req_method", "value": "'POST'"}, {"name": "url", "value": "'http://120.46.172.186:8080/auth'"}, {"name": "mime", "value": "'application/json'"}, {"name": "case_data", "value": "{'password': 'MTIzNDU2', 'username': ''}"}, {"name": "expect_data", "value": "{'state': False, 'message': '账号或密码错误'}"}, {"name": "sql_type", "value": "None"}, {"name": "sql_sentence", "value": "None"}, {"name": "update_key", "value": "None"}], "start": 1691390287633, "stop": 1691390287682, "uuid": "817f6a04-2bf2-41a6-85e3-8087948a038e", "historyId": "21a5d3bc5280cc35eaa9d863f8191a6f", "testCaseId": "0abeaba8f176b6785a0334bed7c1bdad", "fullName": "test_bpm.TestBPM#test_bpm", "labels": [{"name": "suite", "value": "test_bpm"}, {"name": "subSuite", "value": "TestBPM"}, {"name": "host", "value": "DESKTOP-APQTDRI"}, {"name": "thread", "value": "7876-MainThread"}, {"name": "framework", "value": "pytest"}, {"name": "language", "value": "cpython3"}, {"name": "package", "value": "test_bpm"}]}
\ No newline at end of file
{"uuid": "1e08441c-2424-42f1-9181-8e5cc8cc3ebd", "befores": [{"name": "update_key", "status": "passed", "start": 1691390288855, "stop": 1691390288855}], "start": 1691390288855, "stop": 1691390289039}
\ No newline at end of file
{"uuid": "874facf8-77ee-4f83-b53b-713b20985a15", "befores": [{"name": "sql_type", "status": "passed", "start": 1691390287940, "stop": 1691390287940}], "start": 1691390287940, "stop": 1691390288040}
\ No newline at end of file
{"uuid": "00bfecda-35be-46ca-8a1e-96558fadceb9", "befores": [{"name": "update_key", "status": "passed", "start": 1691390288160, "stop": 1691390288160}], "start": 1691390288160, "stop": 1691390288265}
\ No newline at end of file
{"uuid": "46cec741-3492-4a99-bfc7-e6d06936c3e9", "befores": [{"name": "url", "status": "passed", "start": 1691390289254, "stop": 1691390289254}], "start": 1691390289254, "stop": 1691390289341}
\ No newline at end of file
{"uuid": "674196d4-1cdb-4ff6-9263-929d7d3f2fc6", "befores": [{"name": "mime", "status": "passed", "start": 1691390288397, "stop": 1691390288397}], "start": 1691390288397, "stop": 1691390288509}
\ No newline at end of file
{"uuid": "7a72faf8-48f7-4a63-b46a-61091e1ead0e", "befores": [{"name": "mime", "status": "passed", "start": 1691390288287, "stop": 1691390288287}], "start": 1691390288287, "stop": 1691390288389}
\ No newline at end of file
# -*-coding:utf-8 -*- #
# ---------------------------------------------------------------------------
# ProjectName: test_56
# FileName: test_bpm.py
# Author: xxxxxxx
# Datetime: 2023/8/4 15:54
# Description:
#
# ---------------------------------------------------------------------------
import pytest
from learn.APIAutoTest_02.common.read_excel import ReadExcel
class TestBPM:
@pytest.mark.parametrize("req_method, url, mime, case_data, expect_data, sql_type, sql_sentence, update_key", ReadExcel().get_data())
def test_bpm(self, db_fix, req_fix, req_method, url, mime, case_data, expect_data, sql_type, sql_sentence, update_key):
print(req_method, url, mime, case_data, expect_data, sql_type, sql_sentence, update_key)
if sql_type == "delete":
db_fix.delete(sql_sentence)
result = req_fix.request_all(method=req_method, url=url, mime=mime, case_data=case_data)
elif sql_type == "select":
select_result = db_fix.select(sql_sentence)
case_data[update_key] = select_result
print(case_data)
result = req_fix.request_all(method=req_method, url=url, mime=mime, case_data=case_data)
elif sql_type == "select|delete" or sql_type == "delete|select":
db_fix.delete(sql_sentence["delete"])
select_result = db_fix.select(sql_sentence["select"])
case_data[update_key] = select_result
result = req_fix.request_all(method=req_method, url=url, mime=mime, case_data=case_data)
else:
result = req_fix.request_all(method=req_method, url=url, mime=mime, case_data=case_data)
print("="*100)
print("服务器返回数据", result.json())
try:
for key in expect_data.keys():
assert expect_data[key] == result.json().get(key)
except:
raise AssertionError("断言失败")
else:
print("断言成功")
if __name__ == '__main__':
pytest.main()
\ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment