890 lines
36 KiB
JSON
890 lines
36 KiB
JSON
{
|
||
"summary_metadata": {
|
||
"start_time": "2025-05-28T16:49:42.000096",
|
||
"end_time": "2025-05-28T16:49:43.454316",
|
||
"duration_seconds": "1.45"
|
||
},
|
||
"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.595545,
|
||
"start_time": "2025-05-28T16:49:42.000447",
|
||
"end_time": "2025-05-28T16:49:42.595992",
|
||
"executed_test_cases": [
|
||
{
|
||
"test_case_id": "TC-STATUS-001",
|
||
"test_case_name": "基本状态码 200 检查",
|
||
"test_case_severity": "严重",
|
||
"status": "通过",
|
||
"message": "响应状态码为 200,符合预期 200。",
|
||
"duration_seconds": 0.3856248748488724,
|
||
"timestamp": "2025-05-28T16:49:42.386165",
|
||
"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.04244487499818206,
|
||
"timestamp": "2025-05-28T16:49:42.428768",
|
||
"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://127.0.0.1:4523/m1/6389742-6086420-default/api/dms/example_dms_instance_code/v1/message/push/example_schema/example_version) 响应了成功的状态码 200,这违反了HTTPS强制策略。",
|
||
"duration_seconds": 0.028596166986972094,
|
||
"timestamp": "2025-05-28T16:49:42.457422",
|
||
"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.03503883397206664,
|
||
"timestamp": "2025-05-28T16:49:42.492537",
|
||
"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') 为 '39'.",
|
||
"duration_seconds": 0.04519999981857836,
|
||
"timestamp": "2025-05-28T16:49:42.537838",
|
||
"validation_points": [
|
||
{
|
||
"status_code": 200,
|
||
"response_body": {
|
||
"code": 39,
|
||
"message": "tempor",
|
||
"data": {
|
||
"total": 61,
|
||
"list": [
|
||
{
|
||
"dsid": "34",
|
||
"dataRegion": "anim incididunt veniam consequat exercitation",
|
||
"gasReleaseMon": null,
|
||
"gasReleaseYear": null,
|
||
"releaseGasCum": null
|
||
},
|
||
{
|
||
"dsid": "35",
|
||
"dataRegion": "ex",
|
||
"gasReleaseMon": null,
|
||
"gasReleaseYear": null,
|
||
"releaseGasCum": null
|
||
},
|
||
{
|
||
"dsid": "4",
|
||
"dataRegion": "ullamco et",
|
||
"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.027589458972215652,
|
||
"timestamp": "2025-05-28T16:49:42.565513",
|
||
"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.030305457999929786,
|
||
"timestamp": "2025-05-28T16:49:42.595953",
|
||
"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.233222,
|
||
"start_time": "2025-05-28T16:49:42.596025",
|
||
"end_time": "2025-05-28T16:49:42.829247",
|
||
"executed_test_cases": [
|
||
{
|
||
"test_case_id": "TC-STATUS-001",
|
||
"test_case_name": "基本状态码 200 检查",
|
||
"test_case_severity": "严重",
|
||
"status": "通过",
|
||
"message": "响应状态码为 200,符合预期 200。",
|
||
"duration_seconds": 0.02231612498871982,
|
||
"timestamp": "2025-05-28T16:49:42.618421",
|
||
"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.0266630828846246,
|
||
"timestamp": "2025-05-28T16:49:42.645136",
|
||
"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://127.0.0.1:4523/m1/6389742-6086420-default/api/dms/example_dms_instance_code/v1/cd_geo_unit/1.0.0) 响应了成功的状态码 200,这违反了HTTPS强制策略。",
|
||
"duration_seconds": 0.06599487503990531,
|
||
"timestamp": "2025-05-28T16:49:42.711186",
|
||
"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') 为 '51'.",
|
||
"duration_seconds": 0.03108358313329518,
|
||
"timestamp": "2025-05-28T16:49:42.742351",
|
||
"validation_points": [
|
||
{
|
||
"status_code": 200,
|
||
"response_body": {
|
||
"code": 51,
|
||
"message": "esse sit est pariatur quis",
|
||
"data": {
|
||
"total": 7,
|
||
"list": [
|
||
{
|
||
"dsid": "52",
|
||
"dataRegion": "eu nostrud",
|
||
"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') 为 '27'.",
|
||
"duration_seconds": 0.02375933318398893,
|
||
"timestamp": "2025-05-28T16:49:42.766159",
|
||
"validation_points": [
|
||
{
|
||
"status_code": 200,
|
||
"response_body": {
|
||
"code": 27,
|
||
"message": "ipsum",
|
||
"data": {
|
||
"total": 4,
|
||
"list": [
|
||
{
|
||
"dsid": "37",
|
||
"dataRegion": "enim officia velit aliqua exercitation",
|
||
"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.03237150004133582,
|
||
"timestamp": "2025-05-28T16:49:42.798618",
|
||
"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.030383124947547913,
|
||
"timestamp": "2025-05-28T16:49:42.829203",
|
||
"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.125734,
|
||
"start_time": "2025-05-28T16:49:42.829278",
|
||
"end_time": "2025-05-28T16:49:42.955012",
|
||
"executed_test_cases": [
|
||
{
|
||
"test_case_id": "TC-STATUS-001",
|
||
"test_case_name": "基本状态码 200 检查",
|
||
"test_case_severity": "严重",
|
||
"status": "通过",
|
||
"message": "响应状态码为 200,符合预期 200。",
|
||
"duration_seconds": 0.022012750152498484,
|
||
"timestamp": "2025-05-28T16:49:42.851563",
|
||
"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://127.0.0.1:4523/m1/6389742-6086420-default/api/dms/example_dms_instance_code/v1/cd_geo_unit (状态码 200) 的响应体 conforms to the JSON schema.",
|
||
"duration_seconds": 0.019489916041493416,
|
||
"timestamp": "2025-05-28T16:49:42.871101",
|
||
"validation_points": [
|
||
{
|
||
"passed": true,
|
||
"message": "针对 PUT http://127.0.0.1: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://127.0.0.1:4523/m1/6389742-6086420-default/api/dms/example_dms_instance_code/v1/cd_geo_unit) 响应了成功的状态码 200,这违反了HTTPS强制策略。",
|
||
"duration_seconds": 0.016527208033949137,
|
||
"timestamp": "2025-05-28T16:49:42.887700",
|
||
"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') 为 '93'.",
|
||
"duration_seconds": 0.021497624926269054,
|
||
"timestamp": "2025-05-28T16:49:42.909245",
|
||
"validation_points": [
|
||
{
|
||
"status_code": 200,
|
||
"response_body": {
|
||
"code": 93,
|
||
"message": "Duis officia",
|
||
"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') 为 '97'.",
|
||
"duration_seconds": 0.014971292112022638,
|
||
"timestamp": "2025-05-28T16:49:42.924262",
|
||
"validation_points": [
|
||
{
|
||
"status_code": 200,
|
||
"response_body": {
|
||
"code": 97,
|
||
"message": "ea proident",
|
||
"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.016076958971098065,
|
||
"timestamp": "2025-05-28T16:49:42.940383",
|
||
"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') 为 '34'.",
|
||
"duration_seconds": 0.014534207992255688,
|
||
"timestamp": "2025-05-28T16:49:42.954972",
|
||
"validation_points": [
|
||
{
|
||
"status_code": 200,
|
||
"response_body": {
|
||
"code": 34,
|
||
"message": "commodo consequat velit veniam",
|
||
"data": true
|
||
},
|
||
"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.111646,
|
||
"start_time": "2025-05-28T16:49:42.955037",
|
||
"end_time": "2025-05-28T16:49:43.066683",
|
||
"executed_test_cases": [
|
||
{
|
||
"test_case_id": "TC-STATUS-001",
|
||
"test_case_name": "基本状态码 200 检查",
|
||
"test_case_severity": "严重",
|
||
"status": "通过",
|
||
"message": "响应状态码为 200,符合预期 200。",
|
||
"duration_seconds": 0.016340041998773813,
|
||
"timestamp": "2025-05-28T16:49:42.971456",
|
||
"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://127.0.0.1:4523/m1/6389742-6086420-default/api/dms/example_dms_instance_code/v1/cd_geo_unit (状态码 200) 的响应体 conforms to the JSON schema.",
|
||
"duration_seconds": 0.015255250036716461,
|
||
"timestamp": "2025-05-28T16:49:42.986761",
|
||
"validation_points": [
|
||
{
|
||
"passed": true,
|
||
"message": "针对 DELETE http://127.0.0.1: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://127.0.0.1:4523/m1/6389742-6086420-default/api/dms/example_dms_instance_code/v1/cd_geo_unit) 响应了成功的状态码 200,这违反了HTTPS强制策略。",
|
||
"duration_seconds": 0.019025625195354223,
|
||
"timestamp": "2025-05-28T16:49:43.005840",
|
||
"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') 为 '44'.",
|
||
"duration_seconds": 0.015513875056058168,
|
||
"timestamp": "2025-05-28T16:49:43.021404",
|
||
"validation_points": [
|
||
{
|
||
"status_code": 200,
|
||
"response_body": {
|
||
"code": 44,
|
||
"message": "culpa",
|
||
"data": true
|
||
},
|
||
"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') 为 '62'.",
|
||
"duration_seconds": 0.014269457897171378,
|
||
"timestamp": "2025-05-28T16:49:43.035721",
|
||
"validation_points": [
|
||
{
|
||
"status_code": 200,
|
||
"response_body": {
|
||
"code": 62,
|
||
"message": "nisi id Ut est",
|
||
"data": false
|
||
},
|
||
"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.014604958007112145,
|
||
"timestamp": "2025-05-28T16:49:43.050373",
|
||
"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') 为 '75'.",
|
||
"duration_seconds": 0.016156750032678246,
|
||
"timestamp": "2025-05-28T16:49:43.066589",
|
||
"validation_points": [
|
||
{
|
||
"status_code": 200,
|
||
"response_body": {
|
||
"code": 75,
|
||
"message": "sint tempor laboris proident irure",
|
||
"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.258948,
|
||
"start_time": "2025-05-28T16:49:43.066754",
|
||
"end_time": "2025-05-28T16:49:43.325702",
|
||
"executed_test_cases": [
|
||
{
|
||
"test_case_id": "TC-STATUS-001",
|
||
"test_case_name": "基本状态码 200 检查",
|
||
"test_case_severity": "严重",
|
||
"status": "通过",
|
||
"message": "响应状态码为 200,符合预期 200。",
|
||
"duration_seconds": 0.017587749985978007,
|
||
"timestamp": "2025-05-28T16:49:43.084674",
|
||
"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.019916499964892864,
|
||
"timestamp": "2025-05-28T16:49:43.104648",
|
||
"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://127.0.0.1:4523/m1/6389742-6086420-default/api/dms/example_dms_instance_code/v1/cd_geo_unit) 响应了成功的状态码 200,这违反了HTTPS强制策略。",
|
||
"duration_seconds": 0.014826040947809815,
|
||
"timestamp": "2025-05-28T16:49:43.119607",
|
||
"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.01400312501937151,
|
||
"timestamp": "2025-05-28T16:49:43.133661",
|
||
"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') 为 '99'.",
|
||
"duration_seconds": 0.015632750000804663,
|
||
"timestamp": "2025-05-28T16:49:43.149338",
|
||
"validation_points": [
|
||
{
|
||
"status_code": 200,
|
||
"response_body": {
|
||
"code": 99,
|
||
"message": "cupidatat",
|
||
"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') 为 '48'.",
|
||
"duration_seconds": 0.07669858285225928,
|
||
"timestamp": "2025-05-28T16:49:43.226093",
|
||
"validation_points": [
|
||
{
|
||
"status_code": 200,
|
||
"response_body": {
|
||
"code": 48,
|
||
"message": "qui",
|
||
"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.09806604101322591,
|
||
"timestamp": "2025-05-28T16:49:43.325657",
|
||
"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.128568,
|
||
"start_time": "2025-05-28T16:49:43.325730",
|
||
"end_time": "2025-05-28T16:49:43.454298",
|
||
"executed_test_cases": [
|
||
{
|
||
"test_case_id": "TC-STATUS-001",
|
||
"test_case_name": "基本状态码 200 检查",
|
||
"test_case_severity": "严重",
|
||
"status": "通过",
|
||
"message": "响应状态码为 200,符合预期 200。",
|
||
"duration_seconds": 0.020079500041902065,
|
||
"timestamp": "2025-05-28T16:49:43.345893",
|
||
"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://127.0.0.1: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.015128917060792446,
|
||
"timestamp": "2025-05-28T16:49:43.361072",
|
||
"validation_points": [
|
||
{
|
||
"passed": true,
|
||
"message": "针对 GET http://127.0.0.1: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://127.0.0.1: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.015682624885812402,
|
||
"timestamp": "2025-05-28T16:49:43.376817",
|
||
"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.015055665979161859,
|
||
"timestamp": "2025-05-28T16:49:43.391929",
|
||
"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') 为 '74'.",
|
||
"duration_seconds": 0.01596312504261732,
|
||
"timestamp": "2025-05-28T16:49:43.407948",
|
||
"validation_points": [
|
||
{
|
||
"status_code": 200,
|
||
"response_body": {
|
||
"code": 74,
|
||
"message": "ipsum commodo dolore",
|
||
"data": {
|
||
"total": 100,
|
||
"list": [
|
||
{
|
||
"dsid": "47",
|
||
"dataRegion": "dolore aute Lorem",
|
||
"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.017927916953340173,
|
||
"timestamp": "2025-05-28T16:49:43.425926",
|
||
"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.028265791945159435,
|
||
"timestamp": "2025-05-28T16:49:43.454254",
|
||
"validation_points": [
|
||
{
|
||
"passed": true,
|
||
"message": "跳过测试:在API规范中未找到合适的必填查询参数用于移除测试。"
|
||
}
|
||
]
|
||
}
|
||
]
|
||
}
|
||
]
|
||
} |