Commit e10677b1 by 李江源

wndows试运行

parent b759cb78
This source diff could not be displayed because it is too large. You can view the blob instead.
This source diff could not be displayed because it is too large. You can view the blob instead.
This source diff could not be displayed because it is too large. You can view the blob instead.
This source diff could not be displayed because it is too large. You can view the blob instead.
This source diff could not be displayed because it is too large. You can view the blob instead.
This source diff could not be displayed because it is too large. You can view the blob instead.
This source diff could not be displayed because it is too large. You can view the blob instead.
This source diff could not be displayed because it is too large. You can view the blob instead.
This source diff could not be displayed because it is too large. You can view the blob instead.
This source diff could not be displayed because it is too large. You can view the blob instead.
This source diff could not be displayed because it is too large. You can view the blob instead.
{"uuid": "96f21ac8-65ac-4b3b-b3dc-733bab63e305", "befores": [{"name": "expect_data", "status": "passed", "start": 1731224907153, "stop": 1731224907153}], "start": 1731224907153, "stop": 1731224907203}
\ No newline at end of file
{"uuid": "3a7e2d48-4b9e-4ec2-a0eb-bf1de0c2f0f2", "befores": [{"name": "method", "status": "passed", "start": 1731224907611, "stop": 1731224907611}], "start": 1731224907611, "stop": 1731224907626}
\ No newline at end of file
{"uuid": "e1365a93-4752-4e7d-8998-ca2261e74b03", "befores": [{"name": "level", "status": "passed", "start": 1731224907527, "stop": 1731224907527}], "start": 1731224907527, "stop": 1731224907605}
\ No newline at end of file
{"uuid": "4df75a46-8be8-46e6-a3fa-031e833242ea", "befores": [{"name": "update_key", "status": "passed", "start": 1731224907375, "stop": 1731224907376}], "start": 1731224907375, "stop": 1731224907425}
\ No newline at end of file
{"uuid": "20654e42-2ecb-4b90-bf42-1a9cf269e97a", "befores": [{"name": "expect_data", "status": "passed", "start": 1731224907006, "stop": 1731224907006}], "start": 1731224907006, "stop": 1731224907044}
\ No newline at end of file
{"uuid": "5f96f9e2-9fed-4d8e-a5f1-dfc9a7140dfb", "befores": [{"name": "case_id", "status": "passed", "start": 1731224907006, "stop": 1731224907006}], "start": 1731224907006, "stop": 1731224907051}
\ No newline at end of file
{"uuid": "fc2b43ad-d389-4cb1-ab24-4a049ed56ba9", "befores": [{"name": "module", "status": "passed", "start": 1731224907486, "stop": 1731224907486}], "start": 1731224907486, "stop": 1731224907523}
\ No newline at end of file
{"name": "反向用例-用户名正确-密码为空", "status": "failed", "statusDetails": {"message": "AssertionError: 断言失败,用例数据为:{'username': 'admin', 'password': ''},期望数据为:{'state': False, 'message': '账户错误或该租户未启用'}, 服务器返回的数据为:{\"state\":false,\"message\":\"账号或密码错误\",\"code\":200,\"logId\":\"1855517125880946688\"}", "trace": "self = <MyApiAutoTest_v3_3.test_case.test_demo.test_bpm.TestBPM object at 0x000001845E428050>\nreq_fix = <MyApiAutoTest_v3_3.requests_method.requests_method.RequestsMethod object at 0x000001845E42A120>, case_id = 'T006', module = '认证接口', api = '登录系统'\ntitle = '反向用例-用户名正确-密码为空', level = '中', method = 'post', url = 'http://36.139.193.99:8088/auth', mime = 'application/json', case_data = {'password': '', 'username': 'admin'}\nexpect_data = {'message': '账户错误或该租户未启用', 'state': False}, sql_type = None, sql_data = None, update_key = None\n\n @allure.epic(\"BPM_demo\")\n # @allure.feature(\"模块名称\")\n # @allure.story(\"接口名称\")\n # @allure.title(\"用例标题\")\n # @allure.severity(\"用例等级\")\n @pytest.mark.parametrize(\"case_id, module, api, title, level, method, url, mime, case_data, expect_data, sql_type, sql_data, update_key\", ReadExcel(USERNAME).get_data())\n def test_bpm(self, req_fix, case_id, module, api, title, level, method, url, mime, case_data, expect_data, sql_type, sql_data, update_key):\n req = req_fix\n \n allure.dynamic.feature(module)\n allure.dynamic.story(api)\n allure.dynamic.title(title)\n allure.dynamic.severity(level)\n \n res = req.request_all(method, url, mime, case_data, sql_type, sql_data, update_key)\n \n try:\n for key in expect_data.keys():\n> assert res.json().get(key) == expect_data[key]\nE AssertionError: assert '账号或密码错误' == '账户错误或该租户未启用'\nE \nE - 账户错误或该租户未启用\nE + 账号或密码错误\n\ntest_case\\test_demo\\test_bpm.py:36: AssertionError\n\nDuring handling of the above exception, another exception occurred:\n\nself = <MyApiAutoTest_v3_3.test_case.test_demo.test_bpm.TestBPM object at 0x000001845E428050>\nreq_fix = <MyApiAutoTest_v3_3.requests_method.requests_method.RequestsMethod object at 0x000001845E42A120>, case_id = 'T006', module = '认证接口', api = '登录系统'\ntitle = '反向用例-用户名正确-密码为空', level = '中', method = 'post', url = 'http://36.139.193.99:8088/auth', mime = 'application/json', case_data = {'password': '', 'username': 'admin'}\nexpect_data = {'message': '账户错误或该租户未启用', 'state': False}, sql_type = None, sql_data = None, update_key = None\n\n @allure.epic(\"BPM_demo\")\n # @allure.feature(\"模块名称\")\n # @allure.story(\"接口名称\")\n # @allure.title(\"用例标题\")\n # @allure.severity(\"用例等级\")\n @pytest.mark.parametrize(\"case_id, module, api, title, level, method, url, mime, case_data, expect_data, sql_type, sql_data, update_key\", ReadExcel(USERNAME).get_data())\n def test_bpm(self, req_fix, case_id, module, api, title, level, method, url, mime, case_data, expect_data, sql_type, sql_data, update_key):\n req = req_fix\n \n allure.dynamic.feature(module)\n allure.dynamic.story(api)\n allure.dynamic.title(title)\n allure.dynamic.severity(level)\n \n res = req.request_all(method, url, mime, case_data, sql_type, sql_data, update_key)\n \n try:\n for key in expect_data.keys():\n assert res.json().get(key) == expect_data[key]\n except AssertionError:\n logor.error(f\"断言失败,用例数据为:{case_data},期望数据为:{expect_data}, 服务器返回的数据为:{res.text}\")\n> raise AssertionError(f\"断言失败,用例数据为:{case_data},期望数据为:{expect_data}, 服务器返回的数据为:{res.text}\")\nE AssertionError: 断言失败,用例数据为:{'username': 'admin', 'password': ''},期望数据为:{'state': False, 'message': '账户错误或该租户未启用'}, 服务器返回的数据为:{\"state\":false,\"message\":\"账号或密码错误\",\"code\":200,\"logId\":\"1855517125880946688\"}\n\ntest_case\\test_demo\\test_bpm.py:39: AssertionError"}, "attachments": [{"name": "log", "source": "1db7a65a-e53a-412e-ae08-aa80d1ac0197-attachment.txt", "type": "text/plain"}], "parameters": [{"name": "case_id", "value": "'T006'"}, {"name": "module", "value": "'认证接口'"}, {"name": "api", "value": "'登录系统'"}, {"name": "title", "value": "'反向用例-用户名正确-密码为空'"}, {"name": "level", "value": "'中'"}, {"name": "method", "value": "'post'"}, {"name": "url", "value": "'http://36.139.193.99:8088/auth'"}, {"name": "mime", "value": "'application/json'"}, {"name": "case_data", "value": "{'username': 'admin', 'password': ''}"}, {"name": "expect_data", "value": "{'state': False, 'message': '账户错误或该租户未启用'}"}, {"name": "sql_type", "value": "None"}, {"name": "sql_data", "value": "None"}, {"name": "update_key", "value": "None"}], "start": 1731224906953, "stop": 1731224906988, "uuid": "681ad714-02ca-4889-9434-a5db3b48e34d", "historyId": "68f814e29a457ebc6b5588e2d54e220c", "testCaseId": "2de48645219de93dc51c83a53a42f952", "fullName": "test_case.test_demo.test_bpm.TestBPM#test_bpm", "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": "MrLee"}, {"name": "thread", "value": "12240-MainThread"}, {"name": "framework", "value": "pytest"}, {"name": "language", "value": "cpython3"}, {"name": "package", "value": "test_case.test_demo.test_bpm"}]}
\ No newline at end of file
{"uuid": "3f39308a-8781-426e-8e35-3215c44bcf3f", "children": ["19f6f33b-9b89-4443-93cf-da97bcf92bac", "91af28f1-0917-49b6-99a7-a7936693b813", "4df3d3f7-71d8-4805-8c94-18290bd84d93", "f13c7574-90e0-42bf-af4f-a7fe6acb1850", "55b765ec-4b87-4a97-aa3e-3bcba0c9c812", "681ad714-02ca-4889-9434-a5db3b48e34d", "72fbae52-01c1-42d0-8ba4-f452173b180b", "cdc03c49-28ad-47e4-bded-41ff3e0e6938", "09a8ce4c-f0b4-41ed-8be5-f3185fea0c05", "1fb213ba-7ea2-4a28-b2af-390dfe51e1a6", "00af9398-bb1b-4cc5-828c-828818cb267f", "ba0960d7-b425-45a2-a391-c9fab6d57f0f", "a7dd2070-c231-4a18-8d0f-e0c1abe997b9", "8b6752d4-06e7-4a25-98e3-2ff1088ab0a5", "a66ee57d-2c37-4efb-88a6-4a371c9b913a", "6804c6a6-86e5-4d6b-93c6-dcbf08750f2b", "8ead9ee3-1dc8-4bb4-af95-43b519c6a5bc", "a60992c9-9e8b-4442-a4e3-077adb8c8b56", "2541793e-841c-4bb9-9a48-0125539478d6", "625eed2c-7c72-4e9e-a3d2-369dd90d643a"], "befores": [{"name": "_session_faker", "status": "passed", "start": 1731224906103, "stop": 1731224906214}], "start": 1731224906103, "stop": 1731224907926}
\ No newline at end of file
{"uuid": "b139584c-4ae3-4052-b6ea-f32c7c3f1de4", "befores": [{"name": "url", "status": "passed", "start": 1731224907611, "stop": 1731224907611}], "start": 1731224907611, "stop": 1731224907625}
\ No newline at end of file
{"uuid": "abfa1fc6-dc1f-428c-b4cf-84107958636a", "befores": [{"name": "method", "status": "passed", "start": 1731224907006, "stop": 1731224907006}], "start": 1731224907006, "stop": 1731224907047}
\ No newline at end of file
{"uuid": "1847a21e-75a3-44ac-bffa-ebecdafa30c2", "befores": [{"name": "module", "status": "passed", "start": 1731224907688, "stop": 1731224907688}], "start": 1731224907688, "stop": 1731224907791}
\ No newline at end of file
INFO  root:__init__.py:46 执行的功能为:request_all, 功能描述为:None, 所在的py文件为:C:\Python_Home\study_python\program01\MyApiAutoTest_v3_3\requests_method\requests_method.py, 所在的行为:31行,形参的值为:(<MyApiAutoTest_v3_3.requests_method.requests_method.RequestsMethod object at 0x000001845E4F6B40>, 'put', 'http://36.139.193.99:8088/api/demension/v1/dem/updateDem', 'application/json', {'code': 'testAddDem', 'description': '测试添加的维度', 'isDefault': 0, 'name': '测试添加的维度'}, None, None, None)或{}
INFO  root:test_bpm.py:42 断言成功,用例数据为:{'code': 'testAddDem', 'description': '测试添加的维度', 'isDefault': 0, 'name': '测试添加的维度'},期望数据为:{'state': True, 'message': '更新维度成功!'}, 服务器返回的数据为:{"state":true,"message":"更新维度成功!","value":"","code":200}
\ No newline at end of file
{"uuid": "d9a9e668-f89d-4739-9d0a-9136e5943986", "befores": [{"name": "title", "status": "passed", "start": 1731224907152, "stop": 1731224907152}], "start": 1731224907152, "stop": 1731224907218}
\ No newline at end of file
{"uuid": "7e4a0b0f-b098-428a-8d06-5cd1a993d59d", "befores": [{"name": "expect_data", "status": "passed", "start": 1731224907690, "stop": 1731224907690}], "start": 1731224907690, "stop": 1731224907773}
\ No newline at end of file
{"uuid": "7118a854-d640-47a1-a75f-d2dfbfe8b673", "befores": [{"name": "sql_data", "status": "passed", "start": 1731224906306, "stop": 1731224906306}], "start": 1731224906306, "stop": 1731224906343}
\ No newline at end of file
{"uuid": "90990744-df21-4bf0-b227-abb6bb0555f4", "befores": [{"name": "update_key", "status": "passed", "start": 1731224907690, "stop": 1731224907690}], "start": 1731224907690, "stop": 1731224907765}
\ No newline at end of file
{"uuid": "01bafeea-0195-44f7-8ec5-0f6758425fd7", "befores": [{"name": "method", "status": "passed", "start": 1731224906305, "stop": 1731224906306}], "start": 1731224906305, "stop": 1731224906347}
\ No newline at end of file
{"uuid": "9d75d39c-0baf-4644-b98f-e417b8b67074", "befores": [{"name": "sql_type", "status": "passed", "start": 1731224907108, "stop": 1731224907108}], "start": 1731224907108, "stop": 1731224907143}
\ No newline at end of file
{"uuid": "77dd724a-dedf-43ca-b106-79ce8899896f", "befores": [{"name": "case_data", "status": "passed", "start": 1731224907055, "stop": 1731224907055}], "start": 1731224907055, "stop": 1731224907099}
\ No newline at end of file
{"uuid": "e55d1615-588d-4990-aec5-c705b871860a", "befores": [{"name": "expect_data", "status": "passed", "start": 1731224906952, "stop": 1731224906952}], "start": 1731224906952, "stop": 1731224906997}
\ No newline at end of file
{"uuid": "890e90a9-25f2-4425-b2d8-37598761408d", "befores": [{"name": "api", "status": "passed", "start": 1731224907633, "stop": 1731224907633}], "start": 1731224907633, "stop": 1731224907685}
\ No newline at end of file
{"uuid": "0810f78f-d9f9-4721-a071-08d36357e652", "befores": [{"name": "module", "status": "passed", "start": 1731224907633, "stop": 1731224907633}], "start": 1731224907633, "stop": 1731224907685}
\ No newline at end of file
{"uuid": "21cd24f0-6da3-43f7-85a1-46bb3994b92c", "befores": [{"name": "mime", "status": "passed", "start": 1731224907055, "stop": 1731224907055}], "start": 1731224907055, "stop": 1731224907100}
\ No newline at end of file
{"uuid": "b883204b-54f7-4fea-b961-f70781459756", "befores": [{"name": "case_id", "status": "passed", "start": 1731224907439, "stop": 1731224907439}], "start": 1731224907439, "stop": 1731224907482}
\ No newline at end of file
{"name": "正向用例", "status": "failed", "statusDetails": {"message": "AssertionError: 断言失败,用例数据为:{'query': {'orgCode': 'testAddOrg'}, 'body': [{'alias': 'sz', 'value': 1}]},期望数据为:{'state': True, 'message': '保存组织参数成功!'}, 服务器返回的数据为:{\"state\":false,\"message\":\"Required String parameter 'orgCode' is not present\",\"code\":200,\"logId\":\"1855517128653381632\"}", "trace": "self = <MyApiAutoTest_v3_3.test_case.test_zs.test_bpm.TestBPM object at 0x000001845E46DC40>\nreq_fix = <MyApiAutoTest_v3_3.requests_method.requests_method.RequestsMethod object at 0x000001845E4F6B40>, case_id = 'T17', module = '组织管理', api = '保存组织参数', title = '正向用例'\nlevel = '中', method = 'post', url = 'http://36.139.193.99:8088/api/org/v1/orgParam/saveOrgParams', mime = 'query|json'\ncase_data = {'body': [{'alias': 'sz', 'value': 1}], 'query': {'orgCode': 'testAddOrg'}}, expect_data = {'message': '保存组织参数成功!', 'state': True}, sql_type = None, sql_data = None\nupdate_key = None\n\n @allure.epic(\"BPM_张三\")\n # @allure.feature(\"模块名称\")\n # @allure.story(\"接口名称\")\n # @allure.title(\"用例标题\")\n # @allure.severity(\"用例等级\")\n @pytest.mark.parametrize(\"case_id, module, api, title, level, method, url, mime, case_data, expect_data, sql_type, sql_data, update_key\", ReadExcel(USERNAME).get_data())\n def test_bpm(self, req_fix, case_id, module, api, title, level, method, url, mime, case_data, expect_data, sql_type, sql_data, update_key):\n req = req_fix\n \n allure.dynamic.feature(module)\n allure.dynamic.story(api)\n allure.dynamic.title(title)\n allure.dynamic.severity(level)\n \n res = req.request_all(method, url, mime, case_data, sql_type, sql_data, update_key)\n \n try:\n for key in expect_data.keys():\n> assert res.json().get(key) == expect_data[key]\nE assert False == True\nE + where False = <built-in method get of dict object at 0x000001845E5A8840>('state')\nE + where <built-in method get of dict object at 0x000001845E5A8840> = {'code': 200, 'logId': '1855517128653381632', 'message': \"Required String parameter 'orgCode' is not present\", 'state': False}.get\nE + where {'code': 200, 'logId': '1855517128653381632', 'message': \"Required String parameter 'orgCode' is not present\", 'state': False} = json()\nE + where json = <Response [500]>.json\n\ntest_case\\test_zs\\test_bpm.py:37: AssertionError\n\nDuring handling of the above exception, another exception occurred:\n\nself = <MyApiAutoTest_v3_3.test_case.test_zs.test_bpm.TestBPM object at 0x000001845E46DC40>\nreq_fix = <MyApiAutoTest_v3_3.requests_method.requests_method.RequestsMethod object at 0x000001845E4F6B40>, case_id = 'T17', module = '组织管理', api = '保存组织参数', title = '正向用例'\nlevel = '中', method = 'post', url = 'http://36.139.193.99:8088/api/org/v1/orgParam/saveOrgParams', mime = 'query|json'\ncase_data = {'body': [{'alias': 'sz', 'value': 1}], 'query': {'orgCode': 'testAddOrg'}}, expect_data = {'message': '保存组织参数成功!', 'state': True}, sql_type = None, sql_data = None\nupdate_key = None\n\n @allure.epic(\"BPM_张三\")\n # @allure.feature(\"模块名称\")\n # @allure.story(\"接口名称\")\n # @allure.title(\"用例标题\")\n # @allure.severity(\"用例等级\")\n @pytest.mark.parametrize(\"case_id, module, api, title, level, method, url, mime, case_data, expect_data, sql_type, sql_data, update_key\", ReadExcel(USERNAME).get_data())\n def test_bpm(self, req_fix, case_id, module, api, title, level, method, url, mime, case_data, expect_data, sql_type, sql_data, update_key):\n req = req_fix\n \n allure.dynamic.feature(module)\n allure.dynamic.story(api)\n allure.dynamic.title(title)\n allure.dynamic.severity(level)\n \n res = req.request_all(method, url, mime, case_data, sql_type, sql_data, update_key)\n \n try:\n for key in expect_data.keys():\n assert res.json().get(key) == expect_data[key]\n except AssertionError:\n logor.error(f\"断言失败,用例数据为:{case_data},期望数据为:{expect_data}, 服务器返回的数据为:{res.text}\")\n> raise AssertionError(f\"断言失败,用例数据为:{case_data},期望数据为:{expect_data}, 服务器返回的数据为:{res.text}\")\nE AssertionError: 断言失败,用例数据为:{'query': {'orgCode': 'testAddOrg'}, 'body': [{'alias': 'sz', 'value': 1}]},期望数据为:{'state': True, 'message': '保存组织参数成功!'}, 服务器返回的数据为:{\"state\":false,\"message\":\"Required String parameter 'orgCode' is not present\",\"code\":200,\"logId\":\"1855517128653381632\"}\n\ntest_case\\test_zs\\test_bpm.py:40: AssertionError"}, "attachments": [{"name": "log", "source": "47d336eb-f989-4b55-8949-cbd2c6cd00c6-attachment.txt", "type": "text/plain"}], "parameters": [{"name": "case_id", "value": "'T17'"}, {"name": "module", "value": "'组织管理'"}, {"name": "api", "value": "'保存组织参数'"}, {"name": "title", "value": "'正向用例'"}, {"name": "level", "value": "'中'"}, {"name": "method", "value": "'post'"}, {"name": "url", "value": "'http://36.139.193.99:8088/api/org/v1/orgParam/saveOrgParams'"}, {"name": "mime", "value": "'query|json'"}, {"name": "case_data", "value": "{'query': {'orgCode': 'testAddOrg'}, 'body': [{'alias': 'sz', 'value': 1}]}"}, {"name": "expect_data", "value": "{'state': True, 'message': '保存组织参数成功!'}"}, {"name": "sql_type", "value": "None"}, {"name": "sql_data", "value": "None"}, {"name": "update_key", "value": "None"}], "start": 1731224907634, "stop": 1731224907673, "uuid": "8ead9ee3-1dc8-4bb4-af95-43b519c6a5bc", "historyId": "469c26340b814641be47e4fd9050fbea", "testCaseId": "d417f835dc1c783689c0cac5e3ed50b5", "fullName": "test_case.test_zs.test_bpm.TestBPM#test_bpm", "labels": [{"name": "feature", "value": "组织管理"}, {"name": "story", "value": "保存组织参数"}, {"name": "severity", "value": "中"}, {"name": "epic", "value": "BPM_张三"}, {"name": "parentSuite", "value": "test_case.test_zs"}, {"name": "suite", "value": "test_bpm"}, {"name": "subSuite", "value": "TestBPM"}, {"name": "host", "value": "MrLee"}, {"name": "thread", "value": "12240-MainThread"}, {"name": "framework", "value": "pytest"}, {"name": "language", "value": "cpython3"}, {"name": "package", "value": "test_case.test_zs.test_bpm"}]}
\ No newline at end of file
{"uuid": "3713614f-231f-45f7-b854-f1441ae3ad1e", "befores": [{"name": "api", "status": "passed", "start": 1731224907844, "stop": 1731224907844}], "start": 1731224907844, "stop": 1731224907922}
\ No newline at end of file
{"uuid": "da76d991-90cc-4278-813d-2ce8577cb16b", "befores": [{"name": "api", "status": "passed", "start": 1731224906952, "stop": 1731224906952}], "start": 1731224906952, "stop": 1731224907002}
\ No newline at end of file
{"uuid": "005a6100-5549-4682-992a-da0cb96b1d2d", "befores": [{"name": "sql_data", "status": "passed", "start": 1731224907797, "stop": 1731224907797}], "start": 1731224907797, "stop": 1731224907834}
\ No newline at end of file
{"uuid": "51920a6b-b9fc-4f86-9fe9-18f4e2e26247", "befores": [{"name": "api", "status": "passed", "start": 1731224906829, "stop": 1731224906829}], "start": 1731224906829, "stop": 1731224906889}
\ No newline at end of file
{"uuid": "d2614258-0c63-4b6d-a4a5-b3d00f405460", "befores": [{"name": "title", "status": "passed", "start": 1731224907690, "stop": 1731224907690}], "start": 1731224907690, "stop": 1731224907790}
\ No newline at end of file
{"uuid": "8bd0920e-bc99-4290-88b4-91a8280246e7", "befores": [{"name": "method", "status": "passed", "start": 1731224907055, "stop": 1731224907055}], "start": 1731224907055, "stop": 1731224907101}
\ No newline at end of file
{"uuid": "4d3f6ce6-05fa-423a-abe8-c3197ac01bf1", "befores": [{"name": "case_data", "status": "passed", "start": 1731224906357, "stop": 1731224906357}], "start": 1731224906357, "stop": 1731224906782}
\ No newline at end of file
{"uuid": "6f3ed63a-0b4c-45d6-9344-c583d0248524", "befores": [{"name": "url", "status": "passed", "start": 1731224907845, "stop": 1731224907845}], "start": 1731224907845, "stop": 1731224907920}
\ No newline at end of file
{"uuid": "19d48138-5294-4e3d-be56-bd837164d964", "befores": [{"name": "mime", "status": "passed", "start": 1731224906306, "stop": 1731224906306}], "start": 1731224906306, "stop": 1731224906345}
\ No newline at end of file
{"uuid": "a0f885b2-ca78-4a75-a5eb-aa643dd8b365", "befores": [{"name": "case_id", "status": "passed", "start": 1731224907611, "stop": 1731224907611}], "start": 1731224907611, "stop": 1731224907630}
\ No newline at end of file
{"uuid": "867af039-997e-47af-86b3-49f3d2f5e776", "befores": [{"name": "sql_type", "status": "passed", "start": 1731224906829, "stop": 1731224906829}], "start": 1731224906829, "stop": 1731224906882}
\ No newline at end of file
INFO  root:__init__.py:46 执行的功能为:request_all, 功能描述为:None, 所在的py文件为:C:\Python_Home\study_python\program01\MyApiAutoTest_v3_3\requests_method\requests_method.py, 所在的行为:31行,形参的值为:(<MyApiAutoTest_v3_3.requests_method.requests_method.RequestsMethod object at 0x000001845E42A120>, 'post', 'http://36.139.193.99:8088/auth', 'application/json', {'username': 'admin', 'password': ''}, None, None, None)或{}
ERROR  root:test_bpm.py:38 断言失败,用例数据为:{'username': 'admin', 'password': ''},期望数据为:{'state': False, 'message': '账户错误或该租户未启用'}, 服务器返回的数据为:{"state":false,"message":"账号或密码错误","code":200,"logId":"1855517125880946688"}
\ No newline at end of file
INFO  root:__init__.py:46 执行的功能为:request_all, 功能描述为:None, 所在的py文件为:C:\Python_Home\study_python\program01\MyApiAutoTest_v3_3\requests_method\requests_method.py, 所在的行为:31行,形参的值为:(<MyApiAutoTest_v3_3.requests_method.requests_method.RequestsMethod object at 0x000001845E4F6B40>, 'post', 'http://36.139.193.99:8088/api/org/v1/org/addOrg', 'json', {'code': 'testAddOrg', 'demId': '需要更新', 'exceedLimitNum': 0, 'grade': '', 'limitNum': 0, 'name': '测试添加的组织', 'nowNum': 0, 'orderNo': 0, 'parentId': '0'}, 'select|delete', {'delete': 'delete from uc_org where CODE_="testAddOrg";', 'select': 'SELECT ID_ FROM uc_demension WHERE CODE_="testAddDem";'}, 'demId')或{}
INFO  root:__init__.py:46 执行的功能为:delete, 功能描述为:执行删除的sql语句, 所在的py文件为:C:\Python_Home\study_python\program01\MyApiAutoTest_v3_3\common\db.py, 所在的行为:33行,形参的值为:(<MyApiAutoTest_v3_3.common.db.DB object at 0x000001845E4F68D0>, 'delete from uc_org where CODE_="testAddOrg";')或{}
INFO  root:__init__.py:46 执行的功能为:select, 功能描述为:None, 所在的py文件为:C:\Python_Home\study_python\program01\MyApiAutoTest_v3_3\common\db.py, 所在的行为:45行,形参的值为:(<MyApiAutoTest_v3_3.common.db.DB object at 0x000001845E4F68D0>, 'SELECT ID_ FROM uc_demension WHERE CODE_="testAddDem";')或{}
INFO  root:test_bpm.py:42 断言成功,用例数据为:{'code': 'testAddOrg', 'demId': '1855517127655137280', 'exceedLimitNum': 0, 'grade': '', 'limitNum': 0, 'name': '测试添加的组织', 'nowNum': 0, 'orderNo': 0, 'parentId': '0'},期望数据为:{'state': True, 'message': '添加组织成功!'}, 服务器返回的数据为:{"state":true,"message":"添加组织成功!","value":"","code":200}
\ No newline at end of file
{"name": "正向用例", "status": "passed", "attachments": [{"name": "log", "source": "08419c7c-a659-4335-94ed-4a524d092597-attachment.txt", "type": "text/plain"}], "parameters": [{"name": "case_id", "value": "'T14'"}, {"name": "module", "value": "'维度管理'"}, {"name": "api", "value": "'更新维度'"}, {"name": "title", "value": "'正向用例'"}, {"name": "level", "value": "'中'"}, {"name": "method", "value": "'put'"}, {"name": "url", "value": "'http://36.139.193.99:8088/api/demension/v1/dem/updateDem'"}, {"name": "mime", "value": "'application/json'"}, {"name": "case_data", "value": "{'code': 'testAddDem', 'description': '测试添加的维度', 'isDefault': 0, 'name': '测试添加的维度'}"}, {"name": "expect_data", "value": "{'state': True, 'message': '更新维度成功!'}"}, {"name": "sql_type", "value": "None"}, {"name": "sql_data", "value": "None"}, {"name": "update_key", "value": "None"}], "start": 1731224907487, "stop": 1731224907514, "uuid": "8b6752d4-06e7-4a25-98e3-2ff1088ab0a5", "historyId": "5dc8084ea7ab8b6cf5ba6056afd9c959", "testCaseId": "d417f835dc1c783689c0cac5e3ed50b5", "fullName": "test_case.test_zs.test_bpm.TestBPM#test_bpm", "labels": [{"name": "feature", "value": "维度管理"}, {"name": "story", "value": "更新维度"}, {"name": "severity", "value": "中"}, {"name": "epic", "value": "BPM_张三"}, {"name": "parentSuite", "value": "test_case.test_zs"}, {"name": "suite", "value": "test_bpm"}, {"name": "subSuite", "value": "TestBPM"}, {"name": "host", "value": "MrLee"}, {"name": "thread", "value": "12240-MainThread"}, {"name": "framework", "value": "pytest"}, {"name": "language", "value": "cpython3"}, {"name": "package", "value": "test_case.test_zs.test_bpm"}]}
\ No newline at end of file
{"uuid": "4ee399d8-bd4b-4d27-8472-2001758dee90", "befores": [{"name": "module", "status": "passed", "start": 1731224907527, "stop": 1731224907527}], "start": 1731224907527, "stop": 1731224907608}
\ No newline at end of file
{"uuid": "34a8ec59-d059-428a-9899-aa3e949599b3", "befores": [{"name": "case_data", "status": "passed", "start": 1731224906306, "stop": 1731224906306}], "start": 1731224906306, "stop": 1731224906345}
\ No newline at end of file
{"uuid": "77286109-51e1-41f6-9764-a687c4ffaae3", "befores": [{"name": "level", "status": "passed", "start": 1731224907055, "stop": 1731224907055}], "start": 1731224907055, "stop": 1731224907101}
\ No newline at end of file
{"uuid": "3f49763a-9011-4629-9155-9812aa96fd69", "befores": [{"name": "level", "status": "passed", "start": 1731224907690, "stop": 1731224907690}], "start": 1731224907690, "stop": 1731224907789}
\ No newline at end of file
{"uuid": "cb559051-5e8a-4f61-89a9-431628b1c739", "befores": [{"name": "update_key", "status": "passed", "start": 1731224907108, "stop": 1731224907108}], "start": 1731224907108, "stop": 1731224907142}
\ No newline at end of file
{"uuid": "3806a446-d98b-4386-b8fa-a10f9a82178c", "befores": [{"name": "case_data", "status": "passed", "start": 1731224907486, "stop": 1731224907486}], "start": 1731224907486, "stop": 1731224907518}
\ No newline at end of file
{"uuid": "665cc64c-ac77-4f1f-97b9-81d50390b58d", "befores": [{"name": "expect_data", "status": "passed", "start": 1731224907439, "stop": 1731224907439}], "start": 1731224907439, "stop": 1731224907476}
\ No newline at end of file
{"uuid": "44fbb6a2-08f4-43a4-b5a4-83363febf496", "befores": [{"name": "module", "status": "passed", "start": 1731224907226, "stop": 1731224907226}], "start": 1731224907226, "stop": 1731224907273}
\ No newline at end of file
{"uuid": "44fdfc66-762e-4cd1-8687-0fda612ccdd8", "befores": [{"name": "expect_data", "status": "passed", "start": 1731224906357, "stop": 1731224906357}], "start": 1731224906357, "stop": 1731224906782}
\ No newline at end of file
{"uuid": "7bafe218-52dd-4259-b1fc-57c8576d0b04", "befores": [{"name": "case_data", "status": "passed", "start": 1731224907153, "stop": 1731224907153}], "start": 1731224907153, "stop": 1731224907206}
\ No newline at end of file
{"uuid": "7165f614-2ebb-4078-8bff-afc4bef9a656", "befores": [{"name": "method", "status": "passed", "start": 1731224906894, "stop": 1731224906894}], "start": 1731224906894, "stop": 1731224906945}
\ No newline at end of file
{"uuid": "93af785b-5699-4d24-8707-282916ce9255", "befores": [{"name": "expect_data", "status": "passed", "start": 1731224906790, "stop": 1731224906790}], "start": 1731224906790, "stop": 1731224906818}
\ No newline at end of file
INFO  root:__init__.py:46 执行的功能为:request_all, 功能描述为:None, 所在的py文件为:C:\Python_Home\study_python\program01\MyApiAutoTest_v3_3\requests_method\requests_method.py, 所在的行为:31行,形参的值为:(<MyApiAutoTest_v3_3.requests_method.requests_method.RequestsMethod object at 0x000001845E4F6B40>, 'post', 'http://36.139.193.99:8088/api/user/v1/user/addUser', 'json', {'id': '', 'account': 'testAddUser', 'address': '', 'email': '', 'fullname': '测试添加的用户', 'mobile': '', 'password': '123456', 'photo': '', 'sex': '', 'status': 1}, 'delete', 'delete from uc_user where ACCOUNT_="testAddUser";', None)或{}
INFO  root:__init__.py:46 执行的功能为:delete, 功能描述为:执行删除的sql语句, 所在的py文件为:C:\Python_Home\study_python\program01\MyApiAutoTest_v3_3\common\db.py, 所在的行为:33行,形参的值为:(<MyApiAutoTest_v3_3.common.db.DB object at 0x000001845E4F68D0>, 'delete from uc_user where ACCOUNT_="testAddUser";')或{}
INFO  root:test_bpm.py:42 断言成功,用例数据为:{'id': '', 'account': 'testAddUser', 'address': '', 'email': '', 'fullname': '测试添加的用户', 'mobile': '', 'password': '123456', 'photo': '', 'sex': '', 'status': 1},期望数据为:{'state': True, 'message': '用户添加成功!'}, 服务器返回的数据为:{"state":true,"message":"用户添加成功!","value":"","code":200}
\ No newline at end of file
{"uuid": "cd274f76-4065-4a02-86b1-bd9eb6239fc0", "befores": [{"name": "module", "status": "passed", "start": 1731224906829, "stop": 1731224906829}], "start": 1731224906829, "stop": 1731224906890}
\ No newline at end of file
{"uuid": "102ac9ad-a049-454c-876b-964a09cc258f", "befores": [{"name": "title", "status": "passed", "start": 1731224907611, "stop": 1731224907611}], "start": 1731224907611, "stop": 1731224907627}
\ No newline at end of file
{"uuid": "45de203e-3ef9-40a7-b72f-c22f7809d6f3", "befores": [{"name": "module", "status": "passed", "start": 1731224907439, "stop": 1731224907439}], "start": 1731224907439, "stop": 1731224907482}
\ No newline at end of file
{"uuid": "b74c3a32-9e6a-478c-b6f5-c89fa44ae4e2", "befores": [{"name": "case_id", "status": "passed", "start": 1731224907796, "stop": 1731224907796}], "start": 1731224907796, "stop": 1731224907841}
\ No newline at end of file
{"uuid": "f441eb7f-9e69-4fa8-9d39-db26ff551825", "befores": [{"name": "api", "status": "passed", "start": 1731224907107, "stop": 1731224907107}], "start": 1731224907107, "stop": 1731224907148}
\ No newline at end of file
{"uuid": "6dbf8598-d2bf-4e5d-a812-dc5017b3f083", "befores": [{"name": "case_data", "status": "passed", "start": 1731224907634, "stop": 1731224907634}], "start": 1731224907634, "stop": 1731224907682}
\ No newline at end of file
{"uuid": "0ca0e463-cbb3-4fed-a0b1-aff4fa71ff80", "befores": [{"name": "mime", "status": "passed", "start": 1731224907374, "stop": 1731224907374}], "start": 1731224907374, "stop": 1731224907431}
\ No newline at end of file
{"uuid": "766dbfc0-42dd-4417-944f-99c9ac23db26", "befores": [{"name": "sql_type", "status": "passed", "start": 1731224907439, "stop": 1731224907439}], "start": 1731224907439, "stop": 1731224907473}
\ No newline at end of file
{"uuid": "94d6cc51-9fe6-4285-9b45-c43c4384b30e", "befores": [{"name": "update_key", "status": "passed", "start": 1731224906790, "stop": 1731224906790}], "start": 1731224906790, "stop": 1731224906816}
\ No newline at end of file
{"uuid": "385e56b0-225e-4502-a8d4-59d22eb00186", "befores": [{"name": "title", "status": "passed", "start": 1731224907844, "stop": 1731224907844}], "start": 1731224907844, "stop": 1731224907921}
\ No newline at end of file
{"uuid": "b4e846fd-663a-4c83-8d1e-623cd082cbcc", "befores": [{"name": "mime", "status": "passed", "start": 1731224907611, "stop": 1731224907611}], "start": 1731224907611, "stop": 1731224907624}
\ No newline at end of file
{"name": "正向用例", "status": "failed", "statusDetails": {"message": "AssertionError: 断言失败,用例数据为:{'ids': '1855517127655137280'},期望数据为:{'state': True, 'message': '删除维度成功!'}, 服务器返回的数据为:{\"state\":false,\"message\":\"【测试添加的维度(testAddDem)】的维度下存在组织,不允许删除 \",\"value\":\"\",\"code\":200}", "trace": "self = <MyApiAutoTest_v3_3.test_case.test_zs.test_bpm.TestBPM object at 0x000001845E46DB20>\nreq_fix = <MyApiAutoTest_v3_3.requests_method.requests_method.RequestsMethod object at 0x000001845E4F6B40>, case_id = 'T12', module = '维度管理', api = '根据维度编码删除维度', title = '正向用例'\nlevel = '中', method = 'DELETE', url = 'http://36.139.193.99:8088/api/demension/v1/dem/deleteDemByIds', mime = 'query', case_data = {'ids': '1855517127655137280'}\nexpect_data = {'message': '删除维度成功!', 'state': True}, sql_type = 'select', sql_data = 'SELECT ID_ FROM uc_demension WHERE CODE_=\"testAddDem\";', update_key = 'ids'\n\n @allure.epic(\"BPM_张三\")\n # @allure.feature(\"模块名称\")\n # @allure.story(\"接口名称\")\n # @allure.title(\"用例标题\")\n # @allure.severity(\"用例等级\")\n @pytest.mark.parametrize(\"case_id, module, api, title, level, method, url, mime, case_data, expect_data, sql_type, sql_data, update_key\", ReadExcel(USERNAME).get_data())\n def test_bpm(self, req_fix, case_id, module, api, title, level, method, url, mime, case_data, expect_data, sql_type, sql_data, update_key):\n req = req_fix\n \n allure.dynamic.feature(module)\n allure.dynamic.story(api)\n allure.dynamic.title(title)\n allure.dynamic.severity(level)\n \n res = req.request_all(method, url, mime, case_data, sql_type, sql_data, update_key)\n \n try:\n for key in expect_data.keys():\n> assert res.json().get(key) == expect_data[key]\nE AssertionError: assert False == True\nE + where False = <built-in method get of dict object at 0x000001845E58BC00>('state')\nE + where <built-in method get of dict object at 0x000001845E58BC00> = {'code': 200, 'message': '【测试添加的维度(testAddDem)】的维度下存在组织,不允许删除 ', 'state': False, 'value': ''}.get\nE + where {'code': 200, 'message': '【测试添加的维度(testAddDem)】的维度下存在组织,不允许删除 ', 'state': False, 'value': ''} = json()\nE + where json = <Response [200]>.json\n\ntest_case\\test_zs\\test_bpm.py:37: AssertionError\n\nDuring handling of the above exception, another exception occurred:\n\nself = <MyApiAutoTest_v3_3.test_case.test_zs.test_bpm.TestBPM object at 0x000001845E46DB20>\nreq_fix = <MyApiAutoTest_v3_3.requests_method.requests_method.RequestsMethod object at 0x000001845E4F6B40>, case_id = 'T12', module = '维度管理', api = '根据维度编码删除维度', title = '正向用例'\nlevel = '中', method = 'DELETE', url = 'http://36.139.193.99:8088/api/demension/v1/dem/deleteDemByIds', mime = 'query', case_data = {'ids': '1855517127655137280'}\nexpect_data = {'message': '删除维度成功!', 'state': True}, sql_type = 'select', sql_data = 'SELECT ID_ FROM uc_demension WHERE CODE_=\"testAddDem\";', update_key = 'ids'\n\n @allure.epic(\"BPM_张三\")\n # @allure.feature(\"模块名称\")\n # @allure.story(\"接口名称\")\n # @allure.title(\"用例标题\")\n # @allure.severity(\"用例等级\")\n @pytest.mark.parametrize(\"case_id, module, api, title, level, method, url, mime, case_data, expect_data, sql_type, sql_data, update_key\", ReadExcel(USERNAME).get_data())\n def test_bpm(self, req_fix, case_id, module, api, title, level, method, url, mime, case_data, expect_data, sql_type, sql_data, update_key):\n req = req_fix\n \n allure.dynamic.feature(module)\n allure.dynamic.story(api)\n allure.dynamic.title(title)\n allure.dynamic.severity(level)\n \n res = req.request_all(method, url, mime, case_data, sql_type, sql_data, update_key)\n \n try:\n for key in expect_data.keys():\n assert res.json().get(key) == expect_data[key]\n except AssertionError:\n logor.error(f\"断言失败,用例数据为:{case_data},期望数据为:{expect_data}, 服务器返回的数据为:{res.text}\")\n> raise AssertionError(f\"断言失败,用例数据为:{case_data},期望数据为:{expect_data}, 服务器返回的数据为:{res.text}\")\nE AssertionError: 断言失败,用例数据为:{'ids': '1855517127655137280'},期望数据为:{'state': True, 'message': '删除维度成功!'}, 服务器返回的数据为:{\"state\":false,\"message\":\"【测试添加的维度(testAddDem)】的维度下存在组织,不允许删除 \",\"value\":\"\",\"code\":200}\n\ntest_case\\test_zs\\test_bpm.py:40: AssertionError"}, "attachments": [{"name": "log", "source": "8d02f5c7-321d-48f9-954f-4478de6f240a-attachment.txt", "type": "text/plain"}], "parameters": [{"name": "case_id", "value": "'T12'"}, {"name": "module", "value": "'维度管理'"}, {"name": "api", "value": "'根据维度编码删除维度'"}, {"name": "title", "value": "'正向用例'"}, {"name": "level", "value": "'中'"}, {"name": "method", "value": "'DELETE'"}, {"name": "url", "value": "'http://36.139.193.99:8088/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_data", "value": "'SELECT ID_ FROM uc_demension WHERE CODE_=\"testAddDem\";'"}, {"name": "update_key", "value": "'ids'"}], "start": 1731224907798, "stop": 1731224907825, "uuid": "2541793e-841c-4bb9-9a48-0125539478d6", "historyId": "17597f94d112e1dba9833de4d94ce28f", "testCaseId": "d417f835dc1c783689c0cac5e3ed50b5", "fullName": "test_case.test_zs.test_bpm.TestBPM#test_bpm", "labels": [{"name": "feature", "value": "维度管理"}, {"name": "story", "value": "根据维度编码删除维度"}, {"name": "severity", "value": "中"}, {"name": "epic", "value": "BPM_张三"}, {"name": "parentSuite", "value": "test_case.test_zs"}, {"name": "suite", "value": "test_bpm"}, {"name": "subSuite", "value": "TestBPM"}, {"name": "host", "value": "MrLee"}, {"name": "thread", "value": "12240-MainThread"}, {"name": "framework", "value": "pytest"}, {"name": "language", "value": "cpython3"}, {"name": "package", "value": "test_case.test_zs.test_bpm"}]}
\ No newline at end of file
{"uuid": "5a695d05-45b0-4e71-a6e2-01b46b510664", "befores": [{"name": "mime", "status": "passed", "start": 1731224907107, "stop": 1731224907107}], "start": 1731224907107, "stop": 1731224907145}
\ No newline at end of file
{"uuid": "49d95f21-feb1-49c6-8a1a-3329e44e5f49", "befores": [{"name": "case_id", "status": "passed", "start": 1731224907527, "stop": 1731224907527}], "start": 1731224907527, "stop": 1731224907608}
\ No newline at end of file
INFO  root:__init__.py:46 执行的功能为:get_sql_connect, 功能描述为:根据key获取数据库连接信息, 所在的py文件为:C:\Python_Home\study_python\program01\MyApiAutoTest_v3_3\common\read_basic_ini.py, 所在的行为:29行,形参的值为:(<MyApiAutoTest_v3_3.common.read_basic_ini.ReadBasicIni object at 0x000001845E429280>, 'host')或{}
INFO  root:__init__.py:46 执行的功能为:get_sql_connect, 功能描述为:根据key获取数据库连接信息, 所在的py文件为:C:\Python_Home\study_python\program01\MyApiAutoTest_v3_3\common\read_basic_ini.py, 所在的行为:29行,形参的值为:(<MyApiAutoTest_v3_3.common.read_basic_ini.ReadBasicIni object at 0x000001845E429280>, 'port')或{}
INFO  root:__init__.py:46 执行的功能为:get_sql_connect, 功能描述为:根据key获取数据库连接信息, 所在的py文件为:C:\Python_Home\study_python\program01\MyApiAutoTest_v3_3\common\read_basic_ini.py, 所在的行为:29行,形参的值为:(<MyApiAutoTest_v3_3.common.read_basic_ini.ReadBasicIni object at 0x000001845E429280>, 'username')或{}
INFO  root:__init__.py:46 执行的功能为:get_sql_connect, 功能描述为:根据key获取数据库连接信息, 所在的py文件为:C:\Python_Home\study_python\program01\MyApiAutoTest_v3_3\common\read_basic_ini.py, 所在的行为:29行,形参的值为:(<MyApiAutoTest_v3_3.common.read_basic_ini.ReadBasicIni object at 0x000001845E429280>, 'password')或{}
INFO  root:__init__.py:46 执行的功能为:get_sql_connect, 功能描述为:根据key获取数据库连接信息, 所在的py文件为:C:\Python_Home\study_python\program01\MyApiAutoTest_v3_3\common\read_basic_ini.py, 所在的行为:29行,形参的值为:(<MyApiAutoTest_v3_3.common.read_basic_ini.ReadBasicIni object at 0x000001845E429280>, 'database')或{}
INFO  root:__init__.py:46 执行的功能为:get_host, 功能描述为:根据key获取域名, 所在的py文件为:C:\Python_Home\study_python\program01\MyApiAutoTest_v3_3\common\read_basic_ini.py, 所在的行为:24行,形参的值为:(<MyApiAutoTest_v3_3.common.read_basic_ini.ReadBasicIni object at 0x000001845E460260>, 'bpm')或{}
INFO  root:__init__.py:46 执行的功能为:request_all, 功能描述为:None, 所在的py文件为:C:\Python_Home\study_python\program01\MyApiAutoTest_v3_3\requests_method\requests_method.py, 所在的行为:31行,形参的值为:(<MyApiAutoTest_v3_3.requests_method.requests_method.RequestsMethod object at 0x000001845E42A120>, 'post', 'http://36.139.193.99:8088/auth', 'application/json', {'username': 'admin', 'password': 'QKpkgIwnyACrUXQrQVRaSUbhPSOsKnj5hoRN5LGKHT3NmLCwGIN+aGa981YZtlLoEfpVvGDnILn0QU09VHSkgL+Or6oTG1E8OtVTmAEjivAe/a4zLPwd/OfvKYIYbBP5ExZyy+wlVTbLgDfqkuKPGOMPPSLlZWLfvG7yzdc+CyE='}, None, None, None)或{}
INFO  root:test_bpm.py:41 断言成功,用例数据为:{'username': 'admin', 'password': 'QKpkgIwnyACrUXQrQVRaSUbhPSOsKnj5hoRN5LGKHT3NmLCwGIN+aGa981YZtlLoEfpVvGDnILn0QU09VHSkgL+Or6oTG1E8OtVTmAEjivAe/a4zLPwd/OfvKYIYbBP5ExZyy+wlVTbLgDfqkuKPGOMPPSLlZWLfvG7yzdc+CyE='},期望数据为:{'username': '超级管理员', 'account': 'admin', 'userId': '1', 'expiration': 86400, 'loginStatus': True}, 服务器返回的数据为:{"token":"eyJhbGciOiJIUzUxMiJ9.eyJzdWIiOiJhZG1pbiIsInRlbmFudElkIjoiLTEiLCJleHAiOjE3MzEzMTExMzAsImlhdCI6MTczMTIyNDczMH0.nujtbsNRmxSXDP6PJ6dm6GmIZU7vY4kvjzeJ1sjh8mMRliOmtcsr39RJ2VL4vibY7iyZNci0GN0pEdy9ICBmFw","username":"超级管理员","account":"admin","userId":"1","expiration":86400,"loginStatus":true,"userAttrs":{"tenantId":"-1"}}
\ No newline at end of file
{"uuid": "b562e41a-0f81-4ff0-8542-649a96b7f8e2", "befores": [{"name": "sql_data", "status": "passed", "start": 1731224906829, "stop": 1731224906829}], "start": 1731224906829, "stop": 1731224906881}
\ No newline at end of file
{"name": "反向用例-维度id为空", "status": "failed", "statusDetails": {"message": "AssertionError: 断言失败,用例数据为:{'ids': ''},期望数据为:{'state': False, 'message': '维度id不能为空!'}, 服务器返回的数据为:{\"state\":false,\"message\":\"删除维度失败,维度ids必填\",\"code\":200,\"logId\":\"1855517129550962688\"}", "trace": "self = <MyApiAutoTest_v3_3.test_case.test_zs.test_bpm.TestBPM object at 0x000001845E46DA90>\nreq_fix = <MyApiAutoTest_v3_3.requests_method.requests_method.RequestsMethod object at 0x000001845E4F6B40>, case_id = 'T14', module = '维度管理', api = '根据维度编码删除维度'\ntitle = '反向用例-维度id为空', level = '中', method = 'DELETE', url = 'http://36.139.193.99:8088/api/demension/v2/dem/deleteDemByIds', mime = 'query', case_data = {'ids': ''}\nexpect_data = {'message': '维度id不能为空!', 'state': False}, sql_type = None, sql_data = None, update_key = None\n\n @allure.epic(\"BPM_张三\")\n # @allure.feature(\"模块名称\")\n # @allure.story(\"接口名称\")\n # @allure.title(\"用例标题\")\n # @allure.severity(\"用例等级\")\n @pytest.mark.parametrize(\"case_id, module, api, title, level, method, url, mime, case_data, expect_data, sql_type, sql_data, update_key\", ReadExcel(USERNAME).get_data())\n def test_bpm(self, req_fix, case_id, module, api, title, level, method, url, mime, case_data, expect_data, sql_type, sql_data, update_key):\n req = req_fix\n \n allure.dynamic.feature(module)\n allure.dynamic.story(api)\n allure.dynamic.title(title)\n allure.dynamic.severity(level)\n \n res = req.request_all(method, url, mime, case_data, sql_type, sql_data, update_key)\n \n try:\n for key in expect_data.keys():\n> assert res.json().get(key) == expect_data[key]\nE AssertionError: assert '删除维度失败,维度ids必填' == '维度id不能为空!'\nE \nE - 维度id不能为空!\nE + 删除维度失败,维度ids必填\n\ntest_case\\test_zs\\test_bpm.py:37: AssertionError\n\nDuring handling of the above exception, another exception occurred:\n\nself = <MyApiAutoTest_v3_3.test_case.test_zs.test_bpm.TestBPM object at 0x000001845E46DA90>\nreq_fix = <MyApiAutoTest_v3_3.requests_method.requests_method.RequestsMethod object at 0x000001845E4F6B40>, case_id = 'T14', module = '维度管理', api = '根据维度编码删除维度'\ntitle = '反向用例-维度id为空', level = '中', method = 'DELETE', url = 'http://36.139.193.99:8088/api/demension/v2/dem/deleteDemByIds', mime = 'query', case_data = {'ids': ''}\nexpect_data = {'message': '维度id不能为空!', 'state': False}, sql_type = None, sql_data = None, update_key = None\n\n @allure.epic(\"BPM_张三\")\n # @allure.feature(\"模块名称\")\n # @allure.story(\"接口名称\")\n # @allure.title(\"用例标题\")\n # @allure.severity(\"用例等级\")\n @pytest.mark.parametrize(\"case_id, module, api, title, level, method, url, mime, case_data, expect_data, sql_type, sql_data, update_key\", ReadExcel(USERNAME).get_data())\n def test_bpm(self, req_fix, case_id, module, api, title, level, method, url, mime, case_data, expect_data, sql_type, sql_data, update_key):\n req = req_fix\n \n allure.dynamic.feature(module)\n allure.dynamic.story(api)\n allure.dynamic.title(title)\n allure.dynamic.severity(level)\n \n res = req.request_all(method, url, mime, case_data, sql_type, sql_data, update_key)\n \n try:\n for key in expect_data.keys():\n assert res.json().get(key) == expect_data[key]\n except AssertionError:\n logor.error(f\"断言失败,用例数据为:{case_data},期望数据为:{expect_data}, 服务器返回的数据为:{res.text}\")\n> raise AssertionError(f\"断言失败,用例数据为:{case_data},期望数据为:{expect_data}, 服务器返回的数据为:{res.text}\")\nE AssertionError: 断言失败,用例数据为:{'ids': ''},期望数据为:{'state': False, 'message': '维度id不能为空!'}, 服务器返回的数据为:{\"state\":false,\"message\":\"删除维度失败,维度ids必填\",\"code\":200,\"logId\":\"1855517129550962688\"}\n\ntest_case\\test_zs\\test_bpm.py:40: AssertionError"}, "attachments": [{"name": "log", "source": "a449c85c-a51e-4ec8-8290-99ebc1958ef6-attachment.txt", "type": "text/plain"}], "parameters": [{"name": "case_id", "value": "'T14'"}, {"name": "module", "value": "'维度管理'"}, {"name": "api", "value": "'根据维度编码删除维度'"}, {"name": "title", "value": "'反向用例-维度id为空'"}, {"name": "level", "value": "'中'"}, {"name": "method", "value": "'DELETE'"}, {"name": "url", "value": "'http://36.139.193.99:8088/api/demension/v2/dem/deleteDemByIds'"}, {"name": "mime", "value": "'query'"}, {"name": "case_data", "value": "{'ids': ''}"}, {"name": "expect_data", "value": "{'state': False, 'message': '维度id不能为空!'}"}, {"name": "sql_type", "value": "None"}, {"name": "sql_data", "value": "None"}, {"name": "update_key", "value": "None"}], "start": 1731224907845, "stop": 1731224907888, "uuid": "625eed2c-7c72-4e9e-a3d2-369dd90d643a", "historyId": "e3050e2f234ddf0f662637a33116a88d", "testCaseId": "d417f835dc1c783689c0cac5e3ed50b5", "fullName": "test_case.test_zs.test_bpm.TestBPM#test_bpm", "labels": [{"name": "feature", "value": "维度管理"}, {"name": "story", "value": "根据维度编码删除维度"}, {"name": "severity", "value": "中"}, {"name": "epic", "value": "BPM_张三"}, {"name": "parentSuite", "value": "test_case.test_zs"}, {"name": "suite", "value": "test_bpm"}, {"name": "subSuite", "value": "TestBPM"}, {"name": "host", "value": "MrLee"}, {"name": "thread", "value": "12240-MainThread"}, {"name": "framework", "value": "pytest"}, {"name": "language", "value": "cpython3"}, {"name": "package", "value": "test_case.test_zs.test_bpm"}]}
\ 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