890 lines
36 KiB
JSON
890 lines
36 KiB
JSON
{
|
||
"summary_metadata": {
|
||
"start_time": "2025-05-27T09:51:16.834080",
|
||
"end_time": "2025-05-27T09:51:18.295069",
|
||
"duration_seconds": "1.46"
|
||
},
|
||
"endpoint_stats": {
|
||
"total_defined": 6,
|
||
"total_tested": 6,
|
||
"passed": 0,
|
||
"failed": 6,
|
||
"partial_success": 0,
|
||
"error": 0,
|
||
"skipped": 0,
|
||
"success_rate_percentage": "0.00"
|
||
},
|
||
"test_case_stats": {
|
||
"total_applicable": 42,
|
||
"total_executed": 42,
|
||
"passed": 24,
|
||
"failed": 18,
|
||
"error_in_execution": 0,
|
||
"skipped_during_endpoint_execution": 0,
|
||
"success_rate_percentage": "57.14"
|
||
},
|
||
"detailed_results": [
|
||
{
|
||
"endpoint_id": "POST /api/dms/{dms_instance_code}/v1/message/push/{schema}/{version}",
|
||
"endpoint_name": "数据推送接口",
|
||
"overall_status": "失败",
|
||
"duration_seconds": 0.557881,
|
||
"start_time": "2025-05-27T09:51:16.835850",
|
||
"end_time": "2025-05-27T09:51:17.393731",
|
||
"executed_test_cases": [
|
||
{
|
||
"test_case_id": "TC-STATUS-001",
|
||
"test_case_name": "基本状态码 200 检查",
|
||
"test_case_severity": "严重",
|
||
"status": "通过",
|
||
"message": "响应状态码为 200,符合预期 200。",
|
||
"duration_seconds": 0.29305124998791143,
|
||
"timestamp": "2025-05-27T09:51:17.129704",
|
||
"validation_points": [
|
||
{
|
||
"passed": true,
|
||
"message": "响应状态码为 200,符合预期 200。"
|
||
}
|
||
]
|
||
},
|
||
{
|
||
"test_case_id": "TC-CORE-FUNC-001",
|
||
"test_case_name": "Response Body JSON Schema Validation",
|
||
"test_case_severity": "严重",
|
||
"status": "通过",
|
||
"message": "Schema验证步骤完成(未发现问题,或schema不适用/未为此响应定义)。",
|
||
"duration_seconds": 0.06680483295349404,
|
||
"timestamp": "2025-05-27T09:51:17.197215",
|
||
"validation_points": [
|
||
{
|
||
"passed": true,
|
||
"message": "Schema验证步骤完成(未发现问题,或schema不适用/未为此响应定义)。"
|
||
}
|
||
]
|
||
},
|
||
{
|
||
"test_case_id": "TC-SECURITY-001",
|
||
"test_case_name": "HTTPS Protocol Mandatory Verification",
|
||
"test_case_severity": "严重",
|
||
"status": "失败",
|
||
"message": "API通过HTTP (http://host.docker.internal:4523/m1/6389742-6086420-default/api/dms/example_dms_instance_code/v1/message/push/example_schema/example_version) 响应了成功的状态码 200,这违反了HTTPS强制策略。",
|
||
"duration_seconds": 0.07531045901123434,
|
||
"timestamp": "2025-05-27T09:51:17.273376",
|
||
"validation_points": [
|
||
{
|
||
"status_code": 200
|
||
}
|
||
]
|
||
},
|
||
{
|
||
"test_case_id": "TC-ERROR-4001-QUERY",
|
||
"test_case_name": "Error Code 4001 - Query Parameter Type Mismatch Validation",
|
||
"test_case_severity": "中",
|
||
"status": "通过",
|
||
"message": "跳过测试:在查询参数中未找到合适的字段来测试类型不匹配。",
|
||
"duration_seconds": 0.03695920802420005,
|
||
"timestamp": "2025-05-27T09:51:17.311031",
|
||
"validation_points": [
|
||
{
|
||
"passed": true,
|
||
"message": "跳过测试:在查询参数中未找到合适的字段来测试类型不匹配。"
|
||
}
|
||
]
|
||
},
|
||
{
|
||
"test_case_id": "TC-ERROR-4001-BODY",
|
||
"test_case_name": "Error Code 4001 - Request Body Type Mismatch Validation",
|
||
"test_case_severity": "中",
|
||
"status": "失败",
|
||
"message": "当请求体字段 'isSearchCount' 类型不匹配时,期望API返回状态码在 [400, 422] 中,或返回4xx客户端错误且业务码为 '4001'. 实际收到状态码 200. 响应体中的业务码 ('code') 为 '59'.",
|
||
"duration_seconds": 0.0295658340328373,
|
||
"timestamp": "2025-05-27T09:51:17.340746",
|
||
"validation_points": [
|
||
{
|
||
"status_code": 200,
|
||
"response_body": {
|
||
"code": 59,
|
||
"message": "proident aliquip",
|
||
"data": {
|
||
"total": 77,
|
||
"list": [
|
||
{
|
||
"dsid": "2",
|
||
"dataRegion": "Duis ut elit officia velit",
|
||
"gasReleaseMon": null,
|
||
"gasReleaseYear": null,
|
||
"releaseGasCum": null
|
||
},
|
||
{
|
||
"dsid": "93",
|
||
"dataRegion": "cillum incididunt laboris",
|
||
"gasReleaseMon": null,
|
||
"gasReleaseYear": null,
|
||
"releaseGasCum": null
|
||
}
|
||
]
|
||
}
|
||
},
|
||
"expected_http_status_codes": [
|
||
400,
|
||
422
|
||
],
|
||
"expected_business_code": "4001",
|
||
"mismatched_field": "body.isSearchCount"
|
||
}
|
||
]
|
||
},
|
||
{
|
||
"test_case_id": "TC-ERROR-4003-BODY",
|
||
"test_case_name": "Error Code 4003 - Missing Required Request Body Field Validation",
|
||
"test_case_severity": "高",
|
||
"status": "通过",
|
||
"message": "跳过测试:在API规范中未找到合适的必填请求体字段用于移除测试。",
|
||
"duration_seconds": 0.027142666978761554,
|
||
"timestamp": "2025-05-27T09:51:17.368079",
|
||
"validation_points": [
|
||
{
|
||
"passed": true,
|
||
"message": "跳过测试:在API规范中未找到合适的必填请求体字段用于移除测试。"
|
||
}
|
||
]
|
||
},
|
||
{
|
||
"test_case_id": "TC-ERROR-4003-QUERY",
|
||
"test_case_name": "Error Code 4003 - Missing Required Query Parameter Validation",
|
||
"test_case_severity": "高",
|
||
"status": "通过",
|
||
"message": "跳过测试:在API规范中未找到合适的必填查询参数用于移除测试。",
|
||
"duration_seconds": 0.025376415986102074,
|
||
"timestamp": "2025-05-27T09:51:17.393616",
|
||
"validation_points": [
|
||
{
|
||
"passed": true,
|
||
"message": "跳过测试:在API规范中未找到合适的必填查询参数用于移除测试。"
|
||
}
|
||
]
|
||
}
|
||
]
|
||
},
|
||
{
|
||
"endpoint_id": "POST /api/dms/{dms_instance_code}/v1/cd_geo_unit/{version}",
|
||
"endpoint_name": "地质单元列表查询",
|
||
"overall_status": "失败",
|
||
"duration_seconds": 0.235685,
|
||
"start_time": "2025-05-27T09:51:17.393864",
|
||
"end_time": "2025-05-27T09:51:17.629549",
|
||
"executed_test_cases": [
|
||
{
|
||
"test_case_id": "TC-STATUS-001",
|
||
"test_case_name": "基本状态码 200 检查",
|
||
"test_case_severity": "严重",
|
||
"status": "通过",
|
||
"message": "响应状态码为 200,符合预期 200。",
|
||
"duration_seconds": 0.03138137503992766,
|
||
"timestamp": "2025-05-27T09:51:17.425786",
|
||
"validation_points": [
|
||
{
|
||
"passed": true,
|
||
"message": "响应状态码为 200,符合预期 200。"
|
||
}
|
||
]
|
||
},
|
||
{
|
||
"test_case_id": "TC-CORE-FUNC-001",
|
||
"test_case_name": "Response Body JSON Schema Validation",
|
||
"test_case_severity": "严重",
|
||
"status": "通过",
|
||
"message": "Schema验证步骤完成(未发现问题,或schema不适用/未为此响应定义)。",
|
||
"duration_seconds": 0.028922124998643994,
|
||
"timestamp": "2025-05-27T09:51:17.454982",
|
||
"validation_points": [
|
||
{
|
||
"passed": true,
|
||
"message": "Schema验证步骤完成(未发现问题,或schema不适用/未为此响应定义)。"
|
||
}
|
||
]
|
||
},
|
||
{
|
||
"test_case_id": "TC-SECURITY-001",
|
||
"test_case_name": "HTTPS Protocol Mandatory Verification",
|
||
"test_case_severity": "严重",
|
||
"status": "失败",
|
||
"message": "API通过HTTP (http://host.docker.internal:4523/m1/6389742-6086420-default/api/dms/example_dms_instance_code/v1/cd_geo_unit/1.0.0) 响应了成功的状态码 200,这违反了HTTPS强制策略。",
|
||
"duration_seconds": 0.028400832961779088,
|
||
"timestamp": "2025-05-27T09:51:17.483537",
|
||
"validation_points": [
|
||
{
|
||
"status_code": 200
|
||
}
|
||
]
|
||
},
|
||
{
|
||
"test_case_id": "TC-ERROR-4001-QUERY",
|
||
"test_case_name": "Error Code 4001 - Query Parameter Type Mismatch Validation",
|
||
"test_case_severity": "中",
|
||
"status": "失败",
|
||
"message": "当查询参数 'pageNo' (路径: 'pageNo') 类型不匹配时,期望API返回状态码在 [400, 422] 中,或返回4xx客户端错误且业务码为 '4001'. 实际收到状态码 200. 响应体中的业务码 ('code') 为 '21'.",
|
||
"duration_seconds": 0.027288499986752868,
|
||
"timestamp": "2025-05-27T09:51:17.510979",
|
||
"validation_points": [
|
||
{
|
||
"status_code": 200,
|
||
"response_body": {
|
||
"code": 21,
|
||
"message": "dolore est",
|
||
"data": {
|
||
"total": 34,
|
||
"list": [
|
||
{
|
||
"dsid": "31",
|
||
"dataRegion": "Lorem in",
|
||
"gasReleaseMon": null,
|
||
"gasReleaseYear": null,
|
||
"releaseGasCum": null
|
||
}
|
||
]
|
||
}
|
||
},
|
||
"expected_http_status_codes": [
|
||
400,
|
||
422
|
||
],
|
||
"expected_business_code": "4001",
|
||
"mismatched_param": "pageNo"
|
||
}
|
||
]
|
||
},
|
||
{
|
||
"test_case_id": "TC-ERROR-4001-BODY",
|
||
"test_case_name": "Error Code 4001 - Request Body Type Mismatch Validation",
|
||
"test_case_severity": "中",
|
||
"status": "失败",
|
||
"message": "当请求体字段 'isSearchCount' 类型不匹配时,期望API返回状态码在 [400, 422] 中,或返回4xx客户端错误且业务码为 '4001'. 实际收到状态码 200. 响应体中的业务码 ('code') 为 '15'.",
|
||
"duration_seconds": 0.028269083006307483,
|
||
"timestamp": "2025-05-27T09:51:17.539403",
|
||
"validation_points": [
|
||
{
|
||
"status_code": 200,
|
||
"response_body": {
|
||
"code": 15,
|
||
"message": "dolor ut dolore",
|
||
"data": {
|
||
"total": 37,
|
||
"list": [
|
||
{
|
||
"dsid": "82",
|
||
"dataRegion": "consectetur incididunt anim ea enim",
|
||
"gasReleaseMon": null,
|
||
"gasReleaseYear": null,
|
||
"releaseGasCum": null
|
||
}
|
||
]
|
||
}
|
||
},
|
||
"expected_http_status_codes": [
|
||
400,
|
||
422
|
||
],
|
||
"expected_business_code": "4001",
|
||
"mismatched_field": "body.isSearchCount"
|
||
}
|
||
]
|
||
},
|
||
{
|
||
"test_case_id": "TC-ERROR-4003-BODY",
|
||
"test_case_name": "Error Code 4003 - Missing Required Request Body Field Validation",
|
||
"test_case_severity": "高",
|
||
"status": "通过",
|
||
"message": "跳过测试:在API规范中未找到合适的必填请求体字段用于移除测试。",
|
||
"duration_seconds": 0.0244881670223549,
|
||
"timestamp": "2025-05-27T09:51:17.564062",
|
||
"validation_points": [
|
||
{
|
||
"passed": true,
|
||
"message": "跳过测试:在API规范中未找到合适的必填请求体字段用于移除测试。"
|
||
}
|
||
]
|
||
},
|
||
{
|
||
"test_case_id": "TC-ERROR-4003-QUERY",
|
||
"test_case_name": "Error Code 4003 - Missing Required Query Parameter Validation",
|
||
"test_case_severity": "高",
|
||
"status": "通过",
|
||
"message": "跳过测试:在API规范中未找到合适的必填查询参数用于移除测试。",
|
||
"duration_seconds": 0.06503829202847555,
|
||
"timestamp": "2025-05-27T09:51:17.629277",
|
||
"validation_points": [
|
||
{
|
||
"passed": true,
|
||
"message": "跳过测试:在API规范中未找到合适的必填查询参数用于移除测试。"
|
||
}
|
||
]
|
||
}
|
||
]
|
||
},
|
||
{
|
||
"endpoint_id": "PUT /api/dms/{dms_instance_code}/v1/cd_geo_unit",
|
||
"endpoint_name": "地质单元数据修改",
|
||
"overall_status": "失败",
|
||
"duration_seconds": 0.205148,
|
||
"start_time": "2025-05-27T09:51:17.629782",
|
||
"end_time": "2025-05-27T09:51:17.834930",
|
||
"executed_test_cases": [
|
||
{
|
||
"test_case_id": "TC-STATUS-001",
|
||
"test_case_name": "基本状态码 200 检查",
|
||
"test_case_severity": "严重",
|
||
"status": "通过",
|
||
"message": "响应状态码为 200,符合预期 200。",
|
||
"duration_seconds": 0.0577589170425199,
|
||
"timestamp": "2025-05-27T09:51:17.688114",
|
||
"validation_points": [
|
||
{
|
||
"passed": true,
|
||
"message": "响应状态码为 200,符合预期 200。"
|
||
}
|
||
]
|
||
},
|
||
{
|
||
"test_case_id": "TC-CORE-FUNC-001",
|
||
"test_case_name": "Response Body JSON Schema Validation",
|
||
"test_case_severity": "严重",
|
||
"status": "通过",
|
||
"message": "针对 PUT http://host.docker.internal:4523/m1/6389742-6086420-default/api/dms/example_dms_instance_code/v1/cd_geo_unit (状态码 200) 的响应体 conforms to the JSON schema.",
|
||
"duration_seconds": 0.03144866699585691,
|
||
"timestamp": "2025-05-27T09:51:17.719929",
|
||
"validation_points": [
|
||
{
|
||
"passed": true,
|
||
"message": "针对 PUT http://host.docker.internal:4523/m1/6389742-6086420-default/api/dms/example_dms_instance_code/v1/cd_geo_unit (状态码 200) 的响应体 conforms to the JSON schema."
|
||
}
|
||
]
|
||
},
|
||
{
|
||
"test_case_id": "TC-SECURITY-001",
|
||
"test_case_name": "HTTPS Protocol Mandatory Verification",
|
||
"test_case_severity": "严重",
|
||
"status": "失败",
|
||
"message": "API通过HTTP (http://host.docker.internal:4523/m1/6389742-6086420-default/api/dms/example_dms_instance_code/v1/cd_geo_unit) 响应了成功的状态码 200,这违反了HTTPS强制策略。",
|
||
"duration_seconds": 0.02412254095543176,
|
||
"timestamp": "2025-05-27T09:51:17.744443",
|
||
"validation_points": [
|
||
{
|
||
"status_code": 200
|
||
}
|
||
]
|
||
},
|
||
{
|
||
"test_case_id": "TC-ERROR-4001-QUERY",
|
||
"test_case_name": "Error Code 4001 - Query Parameter Type Mismatch Validation",
|
||
"test_case_severity": "中",
|
||
"status": "失败",
|
||
"message": "当查询参数 'id' (路径: 'id') 类型不匹配时,期望API返回状态码在 [400, 422] 中,或返回4xx客户端错误且业务码为 '4001'. 实际收到状态码 200. 响应体中的业务码 ('code') 为 '87'.",
|
||
"duration_seconds": 0.024338416988030076,
|
||
"timestamp": "2025-05-27T09:51:17.768942",
|
||
"validation_points": [
|
||
{
|
||
"status_code": 200,
|
||
"response_body": {
|
||
"code": 87,
|
||
"message": "et laboris",
|
||
"data": false
|
||
},
|
||
"expected_http_status_codes": [
|
||
400,
|
||
422
|
||
],
|
||
"expected_business_code": "4001",
|
||
"mismatched_param": "id"
|
||
}
|
||
]
|
||
},
|
||
{
|
||
"test_case_id": "TC-ERROR-4001-BODY",
|
||
"test_case_name": "Error Code 4001 - Request Body Type Mismatch Validation",
|
||
"test_case_severity": "中",
|
||
"status": "失败",
|
||
"message": "当请求体字段 'id' 类型不匹配时,期望API返回状态码在 [400, 422] 中,或返回4xx客户端错误且业务码为 '4001'. 实际收到状态码 200. 响应体中的业务码 ('code') 为 '57'.",
|
||
"duration_seconds": 0.019106624997220933,
|
||
"timestamp": "2025-05-27T09:51:17.788193",
|
||
"validation_points": [
|
||
{
|
||
"status_code": 200,
|
||
"response_body": {
|
||
"code": 57,
|
||
"message": "pariatur sunt amet esse elit",
|
||
"data": true
|
||
},
|
||
"expected_http_status_codes": [
|
||
400,
|
||
422
|
||
],
|
||
"expected_business_code": "4001",
|
||
"mismatched_field": "body.id"
|
||
}
|
||
]
|
||
},
|
||
{
|
||
"test_case_id": "TC-ERROR-4003-BODY",
|
||
"test_case_name": "Error Code 4003 - Missing Required Request Body Field Validation",
|
||
"test_case_severity": "高",
|
||
"status": "通过",
|
||
"message": "当移除必填请求体字段 'id' 时,API响应了状态码 200 (非主要预期HTTP状态 [400, 422],但为4xx客户端错误), 且响应体中包含预期的业务错误码 '4003' (字段: 'code').",
|
||
"duration_seconds": 0.022619292023591697,
|
||
"timestamp": "2025-05-27T09:51:17.810955",
|
||
"validation_points": [
|
||
{
|
||
"passed": true,
|
||
"message": "当移除必填请求体字段 'id' 时,API响应了状态码 200 (非主要预期HTTP状态 [400, 422],但为4xx客户端错误), 且响应体中包含预期的业务错误码 '4003' (字段: 'code')."
|
||
}
|
||
]
|
||
},
|
||
{
|
||
"test_case_id": "TC-ERROR-4003-QUERY",
|
||
"test_case_name": "Error Code 4003 - Missing Required Query Parameter Validation",
|
||
"test_case_severity": "高",
|
||
"status": "失败",
|
||
"message": "当移除必填查询参数 'id' 时,期望API返回状态码在 [400, 422] 中,或返回4xx客户端错误且业务码为 '4003'. 实际收到状态码 200. 响应体中的业务码 ('code') 为 '40'.",
|
||
"duration_seconds": 0.0236972090206109,
|
||
"timestamp": "2025-05-27T09:51:17.834807",
|
||
"validation_points": [
|
||
{
|
||
"status_code": 200,
|
||
"response_body": {
|
||
"code": 40,
|
||
"message": "dolore eiusmod enim mollit",
|
||
"data": false
|
||
},
|
||
"expected_http_status_codes": [
|
||
400,
|
||
422
|
||
],
|
||
"expected_business_code": "4003",
|
||
"removed_param": "query.id"
|
||
}
|
||
]
|
||
}
|
||
]
|
||
},
|
||
{
|
||
"endpoint_id": "DELETE /api/dms/{dms_instance_code}/v1/cd_geo_unit",
|
||
"endpoint_name": "地质单元数据删除",
|
||
"overall_status": "失败",
|
||
"duration_seconds": 0.148215,
|
||
"start_time": "2025-05-27T09:51:17.835029",
|
||
"end_time": "2025-05-27T09:51:17.983244",
|
||
"executed_test_cases": [
|
||
{
|
||
"test_case_id": "TC-STATUS-001",
|
||
"test_case_name": "基本状态码 200 检查",
|
||
"test_case_severity": "严重",
|
||
"status": "通过",
|
||
"message": "响应状态码为 200,符合预期 200。",
|
||
"duration_seconds": 0.02471204102039337,
|
||
"timestamp": "2025-05-27T09:51:17.860278",
|
||
"validation_points": [
|
||
{
|
||
"passed": true,
|
||
"message": "响应状态码为 200,符合预期 200。"
|
||
}
|
||
]
|
||
},
|
||
{
|
||
"test_case_id": "TC-CORE-FUNC-001",
|
||
"test_case_name": "Response Body JSON Schema Validation",
|
||
"test_case_severity": "严重",
|
||
"status": "通过",
|
||
"message": "针对 DELETE http://host.docker.internal:4523/m1/6389742-6086420-default/api/dms/example_dms_instance_code/v1/cd_geo_unit (状态码 200) 的响应体 conforms to the JSON schema.",
|
||
"duration_seconds": 0.020459832972846925,
|
||
"timestamp": "2025-05-27T09:51:17.880893",
|
||
"validation_points": [
|
||
{
|
||
"passed": true,
|
||
"message": "针对 DELETE http://host.docker.internal:4523/m1/6389742-6086420-default/api/dms/example_dms_instance_code/v1/cd_geo_unit (状态码 200) 的响应体 conforms to the JSON schema."
|
||
}
|
||
]
|
||
},
|
||
{
|
||
"test_case_id": "TC-SECURITY-001",
|
||
"test_case_name": "HTTPS Protocol Mandatory Verification",
|
||
"test_case_severity": "严重",
|
||
"status": "失败",
|
||
"message": "API通过HTTP (http://host.docker.internal:4523/m1/6389742-6086420-default/api/dms/example_dms_instance_code/v1/cd_geo_unit) 响应了成功的状态码 200,这违反了HTTPS强制策略。",
|
||
"duration_seconds": 0.01880116603570059,
|
||
"timestamp": "2025-05-27T09:51:17.899866",
|
||
"validation_points": [
|
||
{
|
||
"status_code": 200
|
||
}
|
||
]
|
||
},
|
||
{
|
||
"test_case_id": "TC-ERROR-4001-QUERY",
|
||
"test_case_name": "Error Code 4001 - Query Parameter Type Mismatch Validation",
|
||
"test_case_severity": "中",
|
||
"status": "失败",
|
||
"message": "当查询参数 'id' (路径: 'id') 类型不匹配时,期望API返回状态码在 [400, 422] 中,或返回4xx客户端错误且业务码为 '4001'. 实际收到状态码 200. 响应体中的业务码 ('code') 为 '59'.",
|
||
"duration_seconds": 0.017983833968173712,
|
||
"timestamp": "2025-05-27T09:51:17.918009",
|
||
"validation_points": [
|
||
{
|
||
"status_code": 200,
|
||
"response_body": {
|
||
"code": 59,
|
||
"message": "dolor sint exercitation velit",
|
||
"data": false
|
||
},
|
||
"expected_http_status_codes": [
|
||
400,
|
||
422
|
||
],
|
||
"expected_business_code": "4001",
|
||
"mismatched_param": "id"
|
||
}
|
||
]
|
||
},
|
||
{
|
||
"test_case_id": "TC-ERROR-4001-BODY",
|
||
"test_case_name": "Error Code 4001 - Request Body Type Mismatch Validation",
|
||
"test_case_severity": "中",
|
||
"status": "失败",
|
||
"message": "当请求体字段 'version' 类型不匹配时,期望API返回状态码在 [400, 422] 中,或返回4xx客户端错误且业务码为 '4001'. 实际收到状态码 200. 响应体中的业务码 ('code') 为 '35'.",
|
||
"duration_seconds": 0.02009408304002136,
|
||
"timestamp": "2025-05-27T09:51:17.938244",
|
||
"validation_points": [
|
||
{
|
||
"status_code": 200,
|
||
"response_body": {
|
||
"code": 35,
|
||
"message": "Excepteur pariatur sit dolor",
|
||
"data": true
|
||
},
|
||
"expected_http_status_codes": [
|
||
400,
|
||
422
|
||
],
|
||
"expected_business_code": "4001",
|
||
"mismatched_field": "body.version"
|
||
}
|
||
]
|
||
},
|
||
{
|
||
"test_case_id": "TC-ERROR-4003-BODY",
|
||
"test_case_name": "Error Code 4003 - Missing Required Request Body Field Validation",
|
||
"test_case_severity": "高",
|
||
"status": "通过",
|
||
"message": "跳过测试:在API规范中未找到合适的必填请求体字段用于移除测试。",
|
||
"duration_seconds": 0.019485500000882894,
|
||
"timestamp": "2025-05-27T09:51:17.957872",
|
||
"validation_points": [
|
||
{
|
||
"passed": true,
|
||
"message": "跳过测试:在API规范中未找到合适的必填请求体字段用于移除测试。"
|
||
}
|
||
]
|
||
},
|
||
{
|
||
"test_case_id": "TC-ERROR-4003-QUERY",
|
||
"test_case_name": "Error Code 4003 - Missing Required Query Parameter Validation",
|
||
"test_case_severity": "高",
|
||
"status": "失败",
|
||
"message": "当移除必填查询参数 'id' 时,期望API返回状态码在 [400, 422] 中,或返回4xx客户端错误且业务码为 '4003'. 实际收到状态码 200. 响应体中的业务码 ('code') 为 '84'.",
|
||
"duration_seconds": 0.024911291024181992,
|
||
"timestamp": "2025-05-27T09:51:17.983011",
|
||
"validation_points": [
|
||
{
|
||
"status_code": 200,
|
||
"response_body": {
|
||
"code": 84,
|
||
"message": "culpa",
|
||
"data": true
|
||
},
|
||
"expected_http_status_codes": [
|
||
400,
|
||
422
|
||
],
|
||
"expected_business_code": "4003",
|
||
"removed_param": "query.id"
|
||
}
|
||
]
|
||
}
|
||
]
|
||
},
|
||
{
|
||
"endpoint_id": "POST /api/dms/{dms_instance_code}/v1/cd_geo_unit",
|
||
"endpoint_name": "地质单元数据添加",
|
||
"overall_status": "失败",
|
||
"duration_seconds": 0.145754,
|
||
"start_time": "2025-05-27T09:51:17.983464",
|
||
"end_time": "2025-05-27T09:51:18.129218",
|
||
"executed_test_cases": [
|
||
{
|
||
"test_case_id": "TC-STATUS-001",
|
||
"test_case_name": "基本状态码 200 检查",
|
||
"test_case_severity": "严重",
|
||
"status": "通过",
|
||
"message": "响应状态码为 200,符合预期 200。",
|
||
"duration_seconds": 0.016542666999157518,
|
||
"timestamp": "2025-05-27T09:51:18.001434",
|
||
"validation_points": [
|
||
{
|
||
"passed": true,
|
||
"message": "响应状态码为 200,符合预期 200。"
|
||
}
|
||
]
|
||
},
|
||
{
|
||
"test_case_id": "TC-CORE-FUNC-001",
|
||
"test_case_name": "Response Body JSON Schema Validation",
|
||
"test_case_severity": "严重",
|
||
"status": "通过",
|
||
"message": "Schema验证步骤完成(未发现问题,或schema不适用/未为此响应定义)。",
|
||
"duration_seconds": 0.021584791014902294,
|
||
"timestamp": "2025-05-27T09:51:18.023207",
|
||
"validation_points": [
|
||
{
|
||
"passed": true,
|
||
"message": "Schema验证步骤完成(未发现问题,或schema不适用/未为此响应定义)。"
|
||
}
|
||
]
|
||
},
|
||
{
|
||
"test_case_id": "TC-SECURITY-001",
|
||
"test_case_name": "HTTPS Protocol Mandatory Verification",
|
||
"test_case_severity": "严重",
|
||
"status": "失败",
|
||
"message": "API通过HTTP (http://host.docker.internal:4523/m1/6389742-6086420-default/api/dms/example_dms_instance_code/v1/cd_geo_unit) 响应了成功的状态码 200,这违反了HTTPS强制策略。",
|
||
"duration_seconds": 0.0189306249958463,
|
||
"timestamp": "2025-05-27T09:51:18.042380",
|
||
"validation_points": [
|
||
{
|
||
"status_code": 200
|
||
}
|
||
]
|
||
},
|
||
{
|
||
"test_case_id": "TC-ERROR-4001-QUERY",
|
||
"test_case_name": "Error Code 4001 - Query Parameter Type Mismatch Validation",
|
||
"test_case_severity": "中",
|
||
"status": "通过",
|
||
"message": "跳过测试:在查询参数中未找到合适的字段来测试类型不匹配。",
|
||
"duration_seconds": 0.020330041996203363,
|
||
"timestamp": "2025-05-27T09:51:18.062900",
|
||
"validation_points": [
|
||
{
|
||
"passed": true,
|
||
"message": "跳过测试:在查询参数中未找到合适的字段来测试类型不匹配。"
|
||
}
|
||
]
|
||
},
|
||
{
|
||
"test_case_id": "TC-ERROR-4001-BODY",
|
||
"test_case_name": "Error Code 4001 - Request Body Type Mismatch Validation",
|
||
"test_case_severity": "中",
|
||
"status": "失败",
|
||
"message": "当请求体字段 'version' 类型不匹配时,期望API返回状态码在 [400, 422] 中,或返回4xx客户端错误且业务码为 '4001'. 实际收到状态码 200. 响应体中的业务码 ('code') 为 '39'.",
|
||
"duration_seconds": 0.02347304200520739,
|
||
"timestamp": "2025-05-27T09:51:18.086594",
|
||
"validation_points": [
|
||
{
|
||
"status_code": 200,
|
||
"response_body": {
|
||
"code": 39,
|
||
"message": "qui voluptate nostrud magna eu",
|
||
"data": true
|
||
},
|
||
"expected_http_status_codes": [
|
||
400,
|
||
422
|
||
],
|
||
"expected_business_code": "4001",
|
||
"mismatched_field": "body.version"
|
||
}
|
||
]
|
||
},
|
||
{
|
||
"test_case_id": "TC-ERROR-4003-BODY",
|
||
"test_case_name": "Error Code 4003 - Missing Required Request Body Field Validation",
|
||
"test_case_severity": "高",
|
||
"status": "失败",
|
||
"message": "当移除必填请求体字段 'data.0.bsflag' 时,期望API返回状态码在 [400, 422] 中,或返回4xx客户端错误且业务码为 '4003'. 实际收到状态码 200. 响应体中的业务码 ('code') 为 '15'.",
|
||
"duration_seconds": 0.02349470800254494,
|
||
"timestamp": "2025-05-27T09:51:18.110301",
|
||
"validation_points": [
|
||
{
|
||
"status_code": 200,
|
||
"response_body": {
|
||
"code": 15,
|
||
"message": "id enim nostrud",
|
||
"data": false
|
||
},
|
||
"expected_http_status_codes": [
|
||
400,
|
||
422
|
||
],
|
||
"expected_business_code": "4003",
|
||
"removed_field": "body.data.0.bsflag"
|
||
}
|
||
]
|
||
},
|
||
{
|
||
"test_case_id": "TC-ERROR-4003-QUERY",
|
||
"test_case_name": "Error Code 4003 - Missing Required Query Parameter Validation",
|
||
"test_case_severity": "高",
|
||
"status": "通过",
|
||
"message": "跳过测试:在API规范中未找到合适的必填查询参数用于移除测试。",
|
||
"duration_seconds": 0.018560500000603497,
|
||
"timestamp": "2025-05-27T09:51:18.129060",
|
||
"validation_points": [
|
||
{
|
||
"passed": true,
|
||
"message": "跳过测试:在API规范中未找到合适的必填查询参数用于移除测试。"
|
||
}
|
||
]
|
||
}
|
||
]
|
||
},
|
||
{
|
||
"endpoint_id": "GET /api/dms/{dms_instance_code}/v1/cd_geo_unit/{version}/{id}",
|
||
"endpoint_name": "地质单元查询详情",
|
||
"overall_status": "失败",
|
||
"duration_seconds": 0.165677,
|
||
"start_time": "2025-05-27T09:51:18.129336",
|
||
"end_time": "2025-05-27T09:51:18.295013",
|
||
"executed_test_cases": [
|
||
{
|
||
"test_case_id": "TC-STATUS-001",
|
||
"test_case_name": "基本状态码 200 检查",
|
||
"test_case_severity": "严重",
|
||
"status": "通过",
|
||
"message": "响应状态码为 200,符合预期 200。",
|
||
"duration_seconds": 0.022529040987137705,
|
||
"timestamp": "2025-05-27T09:51:18.152571",
|
||
"validation_points": [
|
||
{
|
||
"passed": true,
|
||
"message": "响应状态码为 200,符合预期 200。"
|
||
}
|
||
]
|
||
},
|
||
{
|
||
"test_case_id": "TC-CORE-FUNC-001",
|
||
"test_case_name": "Response Body JSON Schema Validation",
|
||
"test_case_severity": "严重",
|
||
"status": "通过",
|
||
"message": "针对 GET http://host.docker.internal:4523/m1/6389742-6086420-default/api/dms/example_dms_instance_code/v1/cd_geo_unit/1.0.0/example_id (状态码 200) 的响应体 conforms to the JSON schema.",
|
||
"duration_seconds": 0.022205583984032273,
|
||
"timestamp": "2025-05-27T09:51:18.175011",
|
||
"validation_points": [
|
||
{
|
||
"passed": true,
|
||
"message": "针对 GET http://host.docker.internal:4523/m1/6389742-6086420-default/api/dms/example_dms_instance_code/v1/cd_geo_unit/1.0.0/example_id (状态码 200) 的响应体 conforms to the JSON schema."
|
||
}
|
||
]
|
||
},
|
||
{
|
||
"test_case_id": "TC-SECURITY-001",
|
||
"test_case_name": "HTTPS Protocol Mandatory Verification",
|
||
"test_case_severity": "严重",
|
||
"status": "失败",
|
||
"message": "API通过HTTP (http://host.docker.internal:4523/m1/6389742-6086420-default/api/dms/example_dms_instance_code/v1/cd_geo_unit/1.0.0/example_id) 响应了成功的状态码 200,这违反了HTTPS强制策略。",
|
||
"duration_seconds": 0.01988216699101031,
|
||
"timestamp": "2025-05-27T09:51:18.195103",
|
||
"validation_points": [
|
||
{
|
||
"status_code": 200
|
||
}
|
||
]
|
||
},
|
||
{
|
||
"test_case_id": "TC-ERROR-4001-QUERY",
|
||
"test_case_name": "Error Code 4001 - Query Parameter Type Mismatch Validation",
|
||
"test_case_severity": "中",
|
||
"status": "通过",
|
||
"message": "跳过测试:在查询参数中未找到合适的字段来测试类型不匹配。",
|
||
"duration_seconds": 0.02450033399509266,
|
||
"timestamp": "2025-05-27T09:51:18.219844",
|
||
"validation_points": [
|
||
{
|
||
"passed": true,
|
||
"message": "跳过测试:在查询参数中未找到合适的字段来测试类型不匹配。"
|
||
}
|
||
]
|
||
},
|
||
{
|
||
"test_case_id": "TC-ERROR-4001-BODY",
|
||
"test_case_name": "Error Code 4001 - Request Body Type Mismatch Validation",
|
||
"test_case_severity": "中",
|
||
"status": "失败",
|
||
"message": "当请求体字段 'isSearchCount' 类型不匹配时,期望API返回状态码在 [400, 422] 中,或返回4xx客户端错误且业务码为 '4001'. 实际收到状态码 200. 响应体中的业务码 ('code') 为 '3'.",
|
||
"duration_seconds": 0.025986458989791572,
|
||
"timestamp": "2025-05-27T09:51:18.246054",
|
||
"validation_points": [
|
||
{
|
||
"status_code": 200,
|
||
"response_body": {
|
||
"code": 3,
|
||
"message": "mollit fugiat in cillum",
|
||
"data": {
|
||
"total": 78,
|
||
"list": [
|
||
{
|
||
"dsid": "20",
|
||
"dataRegion": "qui magna esse labore culpa",
|
||
"gasReleaseMon": null,
|
||
"gasReleaseYear": null,
|
||
"releaseGasCum": null
|
||
},
|
||
{
|
||
"dsid": "95",
|
||
"dataRegion": "consequat qui mollit",
|
||
"gasReleaseMon": null,
|
||
"gasReleaseYear": null,
|
||
"releaseGasCum": null
|
||
}
|
||
]
|
||
}
|
||
},
|
||
"expected_http_status_codes": [
|
||
400,
|
||
422
|
||
],
|
||
"expected_business_code": "4001",
|
||
"mismatched_field": "body.isSearchCount"
|
||
}
|
||
]
|
||
},
|
||
{
|
||
"test_case_id": "TC-ERROR-4003-BODY",
|
||
"test_case_name": "Error Code 4003 - Missing Required Request Body Field Validation",
|
||
"test_case_severity": "高",
|
||
"status": "通过",
|
||
"message": "跳过测试:在API规范中未找到合适的必填请求体字段用于移除测试。",
|
||
"duration_seconds": 0.0259262080071494,
|
||
"timestamp": "2025-05-27T09:51:18.272170",
|
||
"validation_points": [
|
||
{
|
||
"passed": true,
|
||
"message": "跳过测试:在API规范中未找到合适的必填请求体字段用于移除测试。"
|
||
}
|
||
]
|
||
},
|
||
{
|
||
"test_case_id": "TC-ERROR-4003-QUERY",
|
||
"test_case_name": "Error Code 4003 - Missing Required Query Parameter Validation",
|
||
"test_case_severity": "高",
|
||
"status": "通过",
|
||
"message": "跳过测试:在API规范中未找到合适的必填查询参数用于移除测试。",
|
||
"duration_seconds": 0.02243087498936802,
|
||
"timestamp": "2025-05-27T09:51:18.294894",
|
||
"validation_points": [
|
||
{
|
||
"passed": true,
|
||
"message": "跳过测试:在API规范中未找到合适的必填查询参数用于移除测试。"
|
||
}
|
||
]
|
||
}
|
||
]
|
||
}
|
||
]
|
||
} |