{
  "uid" : "64c7a0a97adde6d1",
  "name" : "正向用例",
  "fullName" : "test_case.test_demo.test_bpm.TestBPM#test_bpm",
  "historyId" : "347d2f73ed73495ba7ba72dbf723f253",
  "time" : {
    "start" : 1716272630526,
    "stop" : 1716272630660,
    "duration" : 134
  },
  "status" : "failed",
  "statusMessage" : "AssertionError: assert '删除维度成功' == ''\n  \n  + 删除维度成功",
  "statusTrace" : "self = <InterfaceAutoTest.test_case.test_demo.test_bpm.TestBPM object at 0x0000014F179926A0>\nreq_fix = <InterfaceAutoTest.requests_method.requsts_method.RequestsMethod object at 0x0000014F1903D9D0>\ndb_fix = <InterfaceAutoTest.common.db.DB object at 0x0000014F1908BF10>, module_name = '维度管理', api_name = '根据维度编码删除维度', case_title = '正向用例'\ncase_level = '中', method = 'DELETE', url = 'http://120.46.172.186:8080/api/demension/v1/dem/deleteDemByIds', mime = 'query'\ncase_data = {'ids': '1792803379156631552'}, expect_data = {'message': '删除维度成功'}\nsql_data = 'select ID_ FROM uc_demension WHERE `CODE_`=\"api_auto_test_add_dem\";', sql_type = 'select', update_key = 'ids'\n\n    @allure.epic(\"BPM系统-demo\")  # 测试系统的名称\n    # @allure.feature(\"模块名称\")  # 模块名称\n    # @allure.story(\"接口名称\")    # 接口\n    # @allure.title(\"标题名称\")    # 用例标题\n    # @allure.severity(\"用例的等级\")   # 用例等级\n    @pytest.mark.parametrize(\"module_name, api_name, case_title, case_level, method, url, mime, case_data, expect_data, sql_data, sql_type, update_key\", excel.get_data())\n    def test_bpm(self, req_fix, db_fix, module_name, api_name, case_title, case_level, method, url, mime, case_data, expect_data, sql_data, sql_type, update_key):\n        # 给allure输出的报告添加内容\n        allure.dynamic.feature(module_name)\n        allure.dynamic.story(api_name)\n        allure.dynamic.title(case_title)\n        allure.dynamic.severity(case_level)\n    \n        # 判断sql语句类型是否为select\n        if sql_type == \"select\":\n            # 使用DB类对象调用select_func方法执行查询的sql语句，并接收查询结果\n            select_result = db_fix.select_func(sql_data)\n            # 将查询结果更新到用例数据中\n            case_data[update_key] = select_result\n            # 将更新之后的用例数据发送给服务器。\n    \n        # 判断sql语句的类型是否为delete\n        elif sql_type == \"delete\":\n            # 使用DB类对象调用delete_func方法执行删除的sql语句\n            db_fix.delete_func(sql_data)\n            # 将数据库中的数据删除完之后，再发送请求\n    \n        # 判断sql语句类型是否为select|delete或者为delete|select\n        elif sql_type == \"select|delete\" or sql_type == \"delete|select\":\n            # 使用DB类对象调用delete_func方法执行删除的sql语句\n            db_fix.delete_func(sql_data[\"delete\"])\n            # 使用DB类对象调用select_func方法执行查询的sql语句，并接收查询结果\n            select_result = db_fix.select_func(sql_data[\"select\"])\n            # 将查询结果更新到用例数据中\n            case_data[update_key] = select_result\n            # 将更新之后的用例数据发送给服务器。\n    \n        # 使用RequestsMethod对象发送请求\n        res = req_fix.request_all(req_method=method, req_url=url, req_mime=mime, case_data=case_data)\n        # 断言\n        try:\n            for key in expect_data:\n                assert expect_data[key] == res.json().get(key)\n        except AssertionError as e:\n            logging.error(f\"断言失败， 用例数据为{case_data}, 期望数据为:{expect_data}, 服务器返回的数据为：{res.text}\")\n>           raise e\n\ntest_case\\test_demo\\test_bpm.py:66: \n_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ \n\nself = <InterfaceAutoTest.test_case.test_demo.test_bpm.TestBPM object at 0x0000014F179926A0>\nreq_fix = <InterfaceAutoTest.requests_method.requsts_method.RequestsMethod object at 0x0000014F1903D9D0>\ndb_fix = <InterfaceAutoTest.common.db.DB object at 0x0000014F1908BF10>, module_name = '维度管理', api_name = '根据维度编码删除维度', case_title = '正向用例'\ncase_level = '中', method = 'DELETE', url = 'http://120.46.172.186:8080/api/demension/v1/dem/deleteDemByIds', mime = 'query'\ncase_data = {'ids': '1792803379156631552'}, expect_data = {'message': '删除维度成功'}\nsql_data = 'select ID_ FROM uc_demension WHERE `CODE_`=\"api_auto_test_add_dem\";', sql_type = 'select', update_key = 'ids'\n\n    @allure.epic(\"BPM系统-demo\")  # 测试系统的名称\n    # @allure.feature(\"模块名称\")  # 模块名称\n    # @allure.story(\"接口名称\")    # 接口\n    # @allure.title(\"标题名称\")    # 用例标题\n    # @allure.severity(\"用例的等级\")   # 用例等级\n    @pytest.mark.parametrize(\"module_name, api_name, case_title, case_level, method, url, mime, case_data, expect_data, sql_data, sql_type, update_key\", excel.get_data())\n    def test_bpm(self, req_fix, db_fix, module_name, api_name, case_title, case_level, method, url, mime, case_data, expect_data, sql_data, sql_type, update_key):\n        # 给allure输出的报告添加内容\n        allure.dynamic.feature(module_name)\n        allure.dynamic.story(api_name)\n        allure.dynamic.title(case_title)\n        allure.dynamic.severity(case_level)\n    \n        # 判断sql语句类型是否为select\n        if sql_type == \"select\":\n            # 使用DB类对象调用select_func方法执行查询的sql语句，并接收查询结果\n            select_result = db_fix.select_func(sql_data)\n            # 将查询结果更新到用例数据中\n            case_data[update_key] = select_result\n            # 将更新之后的用例数据发送给服务器。\n    \n        # 判断sql语句的类型是否为delete\n        elif sql_type == \"delete\":\n            # 使用DB类对象调用delete_func方法执行删除的sql语句\n            db_fix.delete_func(sql_data)\n            # 将数据库中的数据删除完之后，再发送请求\n    \n        # 判断sql语句类型是否为select|delete或者为delete|select\n        elif sql_type == \"select|delete\" or sql_type == \"delete|select\":\n            # 使用DB类对象调用delete_func方法执行删除的sql语句\n            db_fix.delete_func(sql_data[\"delete\"])\n            # 使用DB类对象调用select_func方法执行查询的sql语句，并接收查询结果\n            select_result = db_fix.select_func(sql_data[\"select\"])\n            # 将查询结果更新到用例数据中\n            case_data[update_key] = select_result\n            # 将更新之后的用例数据发送给服务器。\n    \n        # 使用RequestsMethod对象发送请求\n        res = req_fix.request_all(req_method=method, req_url=url, req_mime=mime, case_data=case_data)\n        # 断言\n        try:\n            for key in expect_data:\n>               assert expect_data[key] == res.json().get(key)\nE               AssertionError: assert '删除维度成功' == ''\nE                 \nE                 + 删除维度成功\n\ntest_case\\test_demo\\test_bpm.py:63: AssertionError",
  "flaky" : false,
  "newFailed" : false,
  "beforeStages" : [ ],
  "testStage" : {
    "status" : "failed",
    "statusMessage" : "AssertionError: assert '删除维度成功' == ''\n  \n  + 删除维度成功",
    "statusTrace" : "self = <InterfaceAutoTest.test_case.test_demo.test_bpm.TestBPM object at 0x0000014F179926A0>\nreq_fix = <InterfaceAutoTest.requests_method.requsts_method.RequestsMethod object at 0x0000014F1903D9D0>\ndb_fix = <InterfaceAutoTest.common.db.DB object at 0x0000014F1908BF10>, module_name = '维度管理', api_name = '根据维度编码删除维度', case_title = '正向用例'\ncase_level = '中', method = 'DELETE', url = 'http://120.46.172.186:8080/api/demension/v1/dem/deleteDemByIds', mime = 'query'\ncase_data = {'ids': '1792803379156631552'}, expect_data = {'message': '删除维度成功'}\nsql_data = 'select ID_ FROM uc_demension WHERE `CODE_`=\"api_auto_test_add_dem\";', sql_type = 'select', update_key = 'ids'\n\n    @allure.epic(\"BPM系统-demo\")  # 测试系统的名称\n    # @allure.feature(\"模块名称\")  # 模块名称\n    # @allure.story(\"接口名称\")    # 接口\n    # @allure.title(\"标题名称\")    # 用例标题\n    # @allure.severity(\"用例的等级\")   # 用例等级\n    @pytest.mark.parametrize(\"module_name, api_name, case_title, case_level, method, url, mime, case_data, expect_data, sql_data, sql_type, update_key\", excel.get_data())\n    def test_bpm(self, req_fix, db_fix, module_name, api_name, case_title, case_level, method, url, mime, case_data, expect_data, sql_data, sql_type, update_key):\n        # 给allure输出的报告添加内容\n        allure.dynamic.feature(module_name)\n        allure.dynamic.story(api_name)\n        allure.dynamic.title(case_title)\n        allure.dynamic.severity(case_level)\n    \n        # 判断sql语句类型是否为select\n        if sql_type == \"select\":\n            # 使用DB类对象调用select_func方法执行查询的sql语句，并接收查询结果\n            select_result = db_fix.select_func(sql_data)\n            # 将查询结果更新到用例数据中\n            case_data[update_key] = select_result\n            # 将更新之后的用例数据发送给服务器。\n    \n        # 判断sql语句的类型是否为delete\n        elif sql_type == \"delete\":\n            # 使用DB类对象调用delete_func方法执行删除的sql语句\n            db_fix.delete_func(sql_data)\n            # 将数据库中的数据删除完之后，再发送请求\n    \n        # 判断sql语句类型是否为select|delete或者为delete|select\n        elif sql_type == \"select|delete\" or sql_type == \"delete|select\":\n            # 使用DB类对象调用delete_func方法执行删除的sql语句\n            db_fix.delete_func(sql_data[\"delete\"])\n            # 使用DB类对象调用select_func方法执行查询的sql语句，并接收查询结果\n            select_result = db_fix.select_func(sql_data[\"select\"])\n            # 将查询结果更新到用例数据中\n            case_data[update_key] = select_result\n            # 将更新之后的用例数据发送给服务器。\n    \n        # 使用RequestsMethod对象发送请求\n        res = req_fix.request_all(req_method=method, req_url=url, req_mime=mime, case_data=case_data)\n        # 断言\n        try:\n            for key in expect_data:\n                assert expect_data[key] == res.json().get(key)\n        except AssertionError as e:\n            logging.error(f\"断言失败， 用例数据为{case_data}, 期望数据为:{expect_data}, 服务器返回的数据为：{res.text}\")\n>           raise e\n\ntest_case\\test_demo\\test_bpm.py:66: \n_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ \n\nself = <InterfaceAutoTest.test_case.test_demo.test_bpm.TestBPM object at 0x0000014F179926A0>\nreq_fix = <InterfaceAutoTest.requests_method.requsts_method.RequestsMethod object at 0x0000014F1903D9D0>\ndb_fix = <InterfaceAutoTest.common.db.DB object at 0x0000014F1908BF10>, module_name = '维度管理', api_name = '根据维度编码删除维度', case_title = '正向用例'\ncase_level = '中', method = 'DELETE', url = 'http://120.46.172.186:8080/api/demension/v1/dem/deleteDemByIds', mime = 'query'\ncase_data = {'ids': '1792803379156631552'}, expect_data = {'message': '删除维度成功'}\nsql_data = 'select ID_ FROM uc_demension WHERE `CODE_`=\"api_auto_test_add_dem\";', sql_type = 'select', update_key = 'ids'\n\n    @allure.epic(\"BPM系统-demo\")  # 测试系统的名称\n    # @allure.feature(\"模块名称\")  # 模块名称\n    # @allure.story(\"接口名称\")    # 接口\n    # @allure.title(\"标题名称\")    # 用例标题\n    # @allure.severity(\"用例的等级\")   # 用例等级\n    @pytest.mark.parametrize(\"module_name, api_name, case_title, case_level, method, url, mime, case_data, expect_data, sql_data, sql_type, update_key\", excel.get_data())\n    def test_bpm(self, req_fix, db_fix, module_name, api_name, case_title, case_level, method, url, mime, case_data, expect_data, sql_data, sql_type, update_key):\n        # 给allure输出的报告添加内容\n        allure.dynamic.feature(module_name)\n        allure.dynamic.story(api_name)\n        allure.dynamic.title(case_title)\n        allure.dynamic.severity(case_level)\n    \n        # 判断sql语句类型是否为select\n        if sql_type == \"select\":\n            # 使用DB类对象调用select_func方法执行查询的sql语句，并接收查询结果\n            select_result = db_fix.select_func(sql_data)\n            # 将查询结果更新到用例数据中\n            case_data[update_key] = select_result\n            # 将更新之后的用例数据发送给服务器。\n    \n        # 判断sql语句的类型是否为delete\n        elif sql_type == \"delete\":\n            # 使用DB类对象调用delete_func方法执行删除的sql语句\n            db_fix.delete_func(sql_data)\n            # 将数据库中的数据删除完之后，再发送请求\n    \n        # 判断sql语句类型是否为select|delete或者为delete|select\n        elif sql_type == \"select|delete\" or sql_type == \"delete|select\":\n            # 使用DB类对象调用delete_func方法执行删除的sql语句\n            db_fix.delete_func(sql_data[\"delete\"])\n            # 使用DB类对象调用select_func方法执行查询的sql语句，并接收查询结果\n            select_result = db_fix.select_func(sql_data[\"select\"])\n            # 将查询结果更新到用例数据中\n            case_data[update_key] = select_result\n            # 将更新之后的用例数据发送给服务器。\n    \n        # 使用RequestsMethod对象发送请求\n        res = req_fix.request_all(req_method=method, req_url=url, req_mime=mime, case_data=case_data)\n        # 断言\n        try:\n            for key in expect_data:\n>               assert expect_data[key] == res.json().get(key)\nE               AssertionError: assert '删除维度成功' == ''\nE                 \nE                 + 删除维度成功\n\ntest_case\\test_demo\\test_bpm.py:63: AssertionError",
    "steps" : [ ],
    "attachments" : [ {
      "uid" : "1cc5cc26b0e6793e",
      "name" : "log",
      "source" : "1cc5cc26b0e6793e.txt",
      "type" : "text/plain",
      "size" : 1225
    } ],
    "parameters" : [ ],
    "hasContent" : true,
    "stepsCount" : 0,
    "attachmentsCount" : 1,
    "shouldDisplayMessage" : true
  },
  "afterStages" : [ ],
  "labels" : [ {
    "name" : "feature",
    "value" : "维度管理"
  }, {
    "name" : "story",
    "value" : "根据维度编码删除维度"
  }, {
    "name" : "severity",
    "value" : "中"
  }, {
    "name" : "epic",
    "value" : "BPM系统-demo"
  }, {
    "name" : "parentSuite",
    "value" : "test_case.test_demo"
  }, {
    "name" : "suite",
    "value" : "test_bpm"
  }, {
    "name" : "subSuite",
    "value" : "TestBPM"
  }, {
    "name" : "host",
    "value" : "LAPTOP-O09782E1"
  }, {
    "name" : "thread",
    "value" : "8968-MainThread"
  }, {
    "name" : "framework",
    "value" : "pytest"
  }, {
    "name" : "language",
    "value" : "cpython3"
  }, {
    "name" : "package",
    "value" : "test_case.test_demo.test_bpm"
  }, {
    "name" : "resultFormat",
    "value" : "allure2"
  } ],
  "parameters" : [ {
    "name" : "api_name",
    "value" : "'根据维度编码删除维度'"
  }, {
    "name" : "case_data",
    "value" : "{'ids': '1792803379156631552'}"
  }, {
    "name" : "case_level",
    "value" : "'中'"
  }, {
    "name" : "case_title",
    "value" : "'正向用例'"
  }, {
    "name" : "expect_data",
    "value" : "{'message': '删除维度成功'}"
  }, {
    "name" : "method",
    "value" : "'DELETE'"
  }, {
    "name" : "mime",
    "value" : "'query'"
  }, {
    "name" : "module_name",
    "value" : "'维度管理'"
  }, {
    "name" : "sql_data",
    "value" : "'select ID_ FROM uc_demension WHERE `CODE_`=\"api_auto_test_add_dem\";'"
  }, {
    "name" : "sql_type",
    "value" : "'select'"
  }, {
    "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" : "64c7a0a97adde6d1.json",
  "parameterValues" : [ "'根据维度编码删除维度'", "{'ids': '1792803379156631552'}", "'中'", "'正向用例'", "{'message': '删除维度成功'}", "'DELETE'", "'query'", "'维度管理'", "'select ID_ FROM uc_demension WHERE `CODE_`=\"api_auto_test_add_dem\";'", "'select'", "'ids'", "'http://120.46.172.186:8080/api/demension/v1/dem/deleteDemByIds'" ]
}