1109 lines
42 KiB
JSON
1109 lines
42 KiB
JSON
{
|
||
"summary_metadata": {
|
||
"start_time": "2025-05-26T14:55:54.921765",
|
||
"end_time": "2025-05-26T14:57:41.419930",
|
||
"duration_seconds": "106.50"
|
||
},
|
||
"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": 48,
|
||
"total_executed": 48,
|
||
"passed": 23,
|
||
"failed": 25,
|
||
"error_in_execution": 0,
|
||
"skipped_during_endpoint_execution": 0,
|
||
"success_rate_percentage": "47.92"
|
||
},
|
||
"detailed_results": [
|
||
{
|
||
"endpoint_id": "POST /api/dms/{dms_instance_code}/v1/message/push/{schema}/{version}",
|
||
"endpoint_name": "数据推送接口",
|
||
"overall_status": "失败",
|
||
"duration_seconds": 18.219482,
|
||
"start_time": "2025-05-26T14:55:54.922121",
|
||
"end_time": "2025-05-26T14:56:13.141603",
|
||
"executed_test_cases": [
|
||
{
|
||
"test_case_id": "TC-STATUS-001",
|
||
"test_case_name": "基本状态码 200 检查",
|
||
"test_case_severity": "严重",
|
||
"status": "通过",
|
||
"message": "",
|
||
"duration_seconds": 0.06069170800037682,
|
||
"timestamp": "2025-05-26T14:55:54.982899",
|
||
"validation_points": [
|
||
{
|
||
"passed": true,
|
||
"message": "响应状态码为 200,符合预期 200。"
|
||
}
|
||
]
|
||
},
|
||
{
|
||
"test_case_id": "TC-NORMATIVE-URL-LLM-COMPREHENSIVE-001",
|
||
"test_case_name": "综合URL规范与RESTful风格检查 (LLM)",
|
||
"test_case_severity": "中",
|
||
"status": "失败",
|
||
"message": "",
|
||
"duration_seconds": 17.99431545799598,
|
||
"timestamp": "2025-05-26T14:56:12.977385",
|
||
"validation_points": [
|
||
{
|
||
"standard_name": "interface_naming_convention",
|
||
"is_compliant_by_llm": false,
|
||
"llm_reason": "接口名称 'push' 不符合动词+名词结构,建议改为更明确的业务语义名称,例如 'PushMessage'。",
|
||
"path_template": "/api/dms/{dms_instance_code}/v1/message/push/{schema}/{version}",
|
||
"http_method": "POST"
|
||
},
|
||
{
|
||
"standard_name": "http_method_usage",
|
||
"is_compliant_by_llm": true,
|
||
"llm_reason": "POST方法用于创建资源,符合规范。",
|
||
"path_template": "/api/dms/{dms_instance_code}/v1/message/push/{schema}/{version}",
|
||
"http_method": "POST"
|
||
},
|
||
{
|
||
"standard_name": "url_path_structure",
|
||
"is_compliant_by_llm": false,
|
||
"llm_reason": "路径模板不符合 `<前缀>/<专业领域>/v<版本号>/<资源类型>` 的结构。`/message/push/{schema}/{version}` 部分未清晰体现专业领域和资源集合。建议调整为类似 `/api/dms/v1/messages` 的形式。",
|
||
"path_template": "/api/dms/{dms_instance_code}/v1/message/push/{schema}/{version}",
|
||
"http_method": "POST"
|
||
},
|
||
{
|
||
"standard_name": "url_path_parameter_naming",
|
||
"is_compliant_by_llm": false,
|
||
"llm_reason": "路径参数 `{schema}` 和 `{version}` 不符合全小写字母或小写字母加下划线命名规则。建议改为 `{message_schema}` 和 `{message_version}`。",
|
||
"path_template": "/api/dms/{dms_instance_code}/v1/message/push/{schema}/{version}",
|
||
"http_method": "POST"
|
||
},
|
||
{
|
||
"standard_name": "resource_naming_in_path",
|
||
"is_compliant_by_llm": false,
|
||
"llm_reason": "`push` 是动作而非资源集合,且未使用复数形式表示资源。建议将资源部分改为石油行业标准术语的复数形式,例如 `/messages`。",
|
||
"path_template": "/api/dms/{dms_instance_code}/v1/message/push/{schema}/{version}",
|
||
"http_method": "POST"
|
||
}
|
||
]
|
||
},
|
||
{
|
||
"test_case_id": "TC-CORE-FUNC-001",
|
||
"test_case_name": "Response Body JSON Schema Validation",
|
||
"test_case_severity": "严重",
|
||
"status": "通过",
|
||
"message": "",
|
||
"duration_seconds": 0.02988595818169415,
|
||
"timestamp": "2025-05-26T14:56:13.007527",
|
||
"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": "",
|
||
"duration_seconds": 0.034258499974384904,
|
||
"timestamp": "2025-05-26T14:56:13.041896",
|
||
"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.02747187507338822,
|
||
"timestamp": "2025-05-26T14:56:13.069433",
|
||
"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": "",
|
||
"duration_seconds": 0.023718375014141202,
|
||
"timestamp": "2025-05-26T14:56:13.093203",
|
||
"validation_points": [
|
||
{
|
||
"status_code": 200,
|
||
"response_body": {
|
||
"code": 4,
|
||
"message": "non laborum culpa in do",
|
||
"data": {
|
||
"total": 9,
|
||
"list": [
|
||
{
|
||
"dsid": "78",
|
||
"dataRegion": "enim aliqua",
|
||
"gasReleaseMon": null,
|
||
"gasReleaseYear": null,
|
||
"releaseGasCum": null
|
||
}
|
||
]
|
||
}
|
||
}
|
||
}
|
||
]
|
||
},
|
||
{
|
||
"test_case_id": "TC-ERROR-4003-BODY",
|
||
"test_case_name": "Error Code 4003 - Missing Required Request Body Field Validation",
|
||
"test_case_severity": "高",
|
||
"status": "通过",
|
||
"message": "",
|
||
"duration_seconds": 0.024443208007141948,
|
||
"timestamp": "2025-05-26T14:56:13.117697",
|
||
"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": "",
|
||
"duration_seconds": 0.02363429218530655,
|
||
"timestamp": "2025-05-26T14:56:13.141391",
|
||
"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": 23.64672,
|
||
"start_time": "2025-05-26T14:56:13.141802",
|
||
"end_time": "2025-05-26T14:56:36.788522",
|
||
"executed_test_cases": [
|
||
{
|
||
"test_case_id": "TC-STATUS-001",
|
||
"test_case_name": "基本状态码 200 检查",
|
||
"test_case_severity": "严重",
|
||
"status": "通过",
|
||
"message": "",
|
||
"duration_seconds": 0.03243400016799569,
|
||
"timestamp": "2025-05-26T14:56:13.174754",
|
||
"validation_points": [
|
||
{
|
||
"passed": true,
|
||
"message": "响应状态码为 200,符合预期 200。"
|
||
}
|
||
]
|
||
},
|
||
{
|
||
"test_case_id": "TC-NORMATIVE-URL-LLM-COMPREHENSIVE-001",
|
||
"test_case_name": "综合URL规范与RESTful风格检查 (LLM)",
|
||
"test_case_severity": "中",
|
||
"status": "失败",
|
||
"message": "",
|
||
"duration_seconds": 23.482325999997556,
|
||
"timestamp": "2025-05-26T14:56:36.657293",
|
||
"validation_points": [
|
||
{
|
||
"standard_name": "interface_naming_convention",
|
||
"is_compliant_by_llm": false,
|
||
"llm_reason": "接口名称 'cd_geo_unit' 不符合动词+名词结构,无法明确表达业务语义。",
|
||
"path_template": "/api/dms/{dms_instance_code}/v1/cd_geo_unit/{version}",
|
||
"http_method": "POST"
|
||
},
|
||
{
|
||
"standard_name": "http_method_usage",
|
||
"is_compliant_by_llm": true,
|
||
"llm_reason": "POST方法用于创建资源,符合RESTful规范。",
|
||
"path_template": "/api/dms/{dms_instance_code}/v1/cd_geo_unit/{version}",
|
||
"http_method": "POST"
|
||
},
|
||
{
|
||
"standard_name": "url_path_structure",
|
||
"is_compliant_by_llm": false,
|
||
"llm_reason": "路径模板不符合 `<前缀>/<专业领域>/v<版本号>/<资源类型>` 的格式,`cd_geo_unit` 应该属于资源类型但未使用复数形式,且版本号 `{version}` 应为固定的语义化版本(如 v1.0)。",
|
||
"path_template": "/api/dms/{dms_instance_code}/v1/cd_geo_unit/{version}",
|
||
"http_method": "POST"
|
||
},
|
||
{
|
||
"standard_name": "url_path_parameter_naming",
|
||
"is_compliant_by_llm": true,
|
||
"llm_reason": "路径参数 `dms_instance_code` 和 `version` 均采用小写字母加下划线的命名方式,符合规范。",
|
||
"path_template": "/api/dms/{dms_instance_code}/v1/cd_geo_unit/{version}",
|
||
"http_method": "POST"
|
||
},
|
||
{
|
||
"standard_name": "resource_naming_in_path",
|
||
"is_compliant_by_llm": false,
|
||
"llm_reason": "资源名称 `cd_geo_unit` 使用了单数形式,应改为复数形式(如 `cd_geo_units`),以符合资源集合的命名规则。",
|
||
"path_template": "/api/dms/{dms_instance_code}/v1/cd_geo_unit/{version}",
|
||
"http_method": "POST"
|
||
}
|
||
]
|
||
},
|
||
{
|
||
"test_case_id": "TC-CORE-FUNC-001",
|
||
"test_case_name": "Response Body JSON Schema Validation",
|
||
"test_case_severity": "严重",
|
||
"status": "通过",
|
||
"message": "",
|
||
"duration_seconds": 0.024684624979272485,
|
||
"timestamp": "2025-05-26T14:56:36.682462",
|
||
"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": "",
|
||
"duration_seconds": 0.023783958982676268,
|
||
"timestamp": "2025-05-26T14:56:36.706430",
|
||
"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.019799625035375357,
|
||
"timestamp": "2025-05-26T14:56:36.726515",
|
||
"validation_points": [
|
||
{
|
||
"status_code": 200,
|
||
"response_body": {
|
||
"code": 4,
|
||
"message": "reprehenderit do Ut",
|
||
"data": {
|
||
"total": 35,
|
||
"list": [
|
||
{
|
||
"dsid": "93",
|
||
"dataRegion": "nisi",
|
||
"gasReleaseMon": null,
|
||
"gasReleaseYear": null,
|
||
"releaseGasCum": null
|
||
},
|
||
{
|
||
"dsid": "68",
|
||
"dataRegion": "incididunt ad",
|
||
"gasReleaseMon": null,
|
||
"gasReleaseYear": null,
|
||
"releaseGasCum": null
|
||
}
|
||
]
|
||
}
|
||
}
|
||
}
|
||
]
|
||
},
|
||
{
|
||
"test_case_id": "TC-ERROR-4001-BODY",
|
||
"test_case_name": "Error Code 4001 - Request Body Type Mismatch Validation",
|
||
"test_case_severity": "中",
|
||
"status": "失败",
|
||
"message": "",
|
||
"duration_seconds": 0.018980999942868948,
|
||
"timestamp": "2025-05-26T14:56:36.745637",
|
||
"validation_points": [
|
||
{
|
||
"status_code": 200,
|
||
"response_body": {
|
||
"code": 21,
|
||
"message": "nisi sed",
|
||
"data": {
|
||
"total": 67,
|
||
"list": [
|
||
{
|
||
"dsid": "10",
|
||
"dataRegion": "incididunt",
|
||
"gasReleaseMon": null,
|
||
"gasReleaseYear": null,
|
||
"releaseGasCum": null
|
||
},
|
||
{
|
||
"dsid": "7",
|
||
"dataRegion": "qui dolor",
|
||
"gasReleaseMon": null,
|
||
"gasReleaseYear": null,
|
||
"releaseGasCum": null
|
||
}
|
||
]
|
||
}
|
||
}
|
||
}
|
||
]
|
||
},
|
||
{
|
||
"test_case_id": "TC-ERROR-4003-BODY",
|
||
"test_case_name": "Error Code 4003 - Missing Required Request Body Field Validation",
|
||
"test_case_severity": "高",
|
||
"status": "通过",
|
||
"message": "",
|
||
"duration_seconds": 0.021431999979540706,
|
||
"timestamp": "2025-05-26T14:56:36.767326",
|
||
"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": "",
|
||
"duration_seconds": 0.020639707800000906,
|
||
"timestamp": "2025-05-26T14:56:36.788257",
|
||
"validation_points": [
|
||
{
|
||
"passed": true,
|
||
"message": "跳过测试:在API规范中未找到合适的必填查询参数用于移除测试。"
|
||
}
|
||
]
|
||
}
|
||
]
|
||
},
|
||
{
|
||
"endpoint_id": "PUT /api/dms/{dms_instance_code}/v1/cd_geo_unit",
|
||
"endpoint_name": "地质单元数据修改",
|
||
"overall_status": "失败",
|
||
"duration_seconds": 18.066158,
|
||
"start_time": "2025-05-26T14:56:36.788795",
|
||
"end_time": "2025-05-26T14:56:54.854953",
|
||
"executed_test_cases": [
|
||
{
|
||
"test_case_id": "TC-STATUS-001",
|
||
"test_case_name": "基本状态码 200 检查",
|
||
"test_case_severity": "严重",
|
||
"status": "通过",
|
||
"message": "",
|
||
"duration_seconds": 0.016432959120720625,
|
||
"timestamp": "2025-05-26T14:56:36.805789",
|
||
"validation_points": [
|
||
{
|
||
"passed": true,
|
||
"message": "响应状态码为 200,符合预期 200。"
|
||
}
|
||
]
|
||
},
|
||
{
|
||
"test_case_id": "TC-NORMATIVE-URL-LLM-COMPREHENSIVE-001",
|
||
"test_case_name": "综合URL规范与RESTful风格检查 (LLM)",
|
||
"test_case_severity": "中",
|
||
"status": "失败",
|
||
"message": "",
|
||
"duration_seconds": 17.868815666995943,
|
||
"timestamp": "2025-05-26T14:56:54.674934",
|
||
"validation_points": [
|
||
{
|
||
"standard_name": "interface_naming_convention",
|
||
"is_compliant_by_llm": false,
|
||
"llm_reason": "接口名称 'cd_geo_unit' 不符合动词+名词结构,无法明确表达业务语义。",
|
||
"path_template": "/api/dms/{dms_instance_code}/v1/cd_geo_unit",
|
||
"http_method": "PUT"
|
||
},
|
||
{
|
||
"standard_name": "http_method_usage",
|
||
"is_compliant_by_llm": true,
|
||
"llm_reason": "PUT方法用于更新资源,符合RESTful规范。",
|
||
"path_template": "/api/dms/{dms_instance_code}/v1/cd_geo_unit",
|
||
"http_method": "PUT"
|
||
},
|
||
{
|
||
"standard_name": "url_path_structure",
|
||
"is_compliant_by_llm": true,
|
||
"llm_reason": "URL路径结构 '/api/dms/{dms_instance_code}/v1/cd_geo_unit' 符合 `<前缀>/<专业领域>/v<版本号>/<资源类型>` 的格式要求。",
|
||
"path_template": "/api/dms/{dms_instance_code}/v1/cd_geo_unit",
|
||
"http_method": "PUT"
|
||
},
|
||
{
|
||
"standard_name": "url_path_parameter_naming",
|
||
"is_compliant_by_llm": true,
|
||
"llm_reason": "路径参数 '{dms_instance_code}' 使用了小写字母加下划线的命名方式,且能反映资源唯一标识。",
|
||
"path_template": "/api/dms/{dms_instance_code}/v1/cd_geo_unit",
|
||
"http_method": "PUT"
|
||
},
|
||
{
|
||
"standard_name": "resource_naming_in_path",
|
||
"is_compliant_by_llm": false,
|
||
"llm_reason": "资源类型 'cd_geo_unit' 应使用复数形式表示集合,并应优先采用石油行业的标准术语。当前命名可能不够清晰和标准化。",
|
||
"path_template": "/api/dms/{dms_instance_code}/v1/cd_geo_unit",
|
||
"http_method": "PUT"
|
||
}
|
||
]
|
||
},
|
||
{
|
||
"test_case_id": "TC-CORE-FUNC-001",
|
||
"test_case_name": "Response Body JSON Schema Validation",
|
||
"test_case_severity": "严重",
|
||
"status": "通过",
|
||
"message": "",
|
||
"duration_seconds": 0.03891233308240771,
|
||
"timestamp": "2025-05-26T14:56:54.714121",
|
||
"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": "",
|
||
"duration_seconds": 0.02052237489260733,
|
||
"timestamp": "2025-05-26T14:56:54.734798",
|
||
"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.023687834152951837,
|
||
"timestamp": "2025-05-26T14:56:54.758558",
|
||
"validation_points": [
|
||
{
|
||
"status_code": 200,
|
||
"response_body": {
|
||
"code": 12,
|
||
"message": "ad voluptate aliquip tempor irure",
|
||
"data": true
|
||
}
|
||
}
|
||
]
|
||
},
|
||
{
|
||
"test_case_id": "TC-ERROR-4001-BODY",
|
||
"test_case_name": "Error Code 4001 - Request Body Type Mismatch Validation",
|
||
"test_case_severity": "中",
|
||
"status": "失败",
|
||
"message": "",
|
||
"duration_seconds": 0.02337870909832418,
|
||
"timestamp": "2025-05-26T14:56:54.781989",
|
||
"validation_points": [
|
||
{
|
||
"status_code": 200,
|
||
"response_body": {
|
||
"code": 43,
|
||
"message": "reprehenderit Ut tempor dolor est",
|
||
"data": false
|
||
}
|
||
}
|
||
]
|
||
},
|
||
{
|
||
"test_case_id": "TC-ERROR-4003-BODY",
|
||
"test_case_name": "Error Code 4003 - Missing Required Request Body Field Validation",
|
||
"test_case_severity": "高",
|
||
"status": "失败",
|
||
"message": "",
|
||
"duration_seconds": 0.024858917109668255,
|
||
"timestamp": "2025-05-26T14:56:54.806909",
|
||
"validation_points": [
|
||
{
|
||
"status_code": 200,
|
||
"response_body": {
|
||
"code": 90,
|
||
"message": "laborum qui reprehenderit culpa do",
|
||
"data": true
|
||
},
|
||
"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": "",
|
||
"duration_seconds": 0.04781029210425913,
|
||
"timestamp": "2025-05-26T14:56:54.854906",
|
||
"validation_points": [
|
||
{
|
||
"status_code": 200,
|
||
"response_body": {
|
||
"code": 30,
|
||
"message": "mollit veniam laborum in fugiat",
|
||
"data": true
|
||
},
|
||
"removed_field": "query.id"
|
||
}
|
||
]
|
||
}
|
||
]
|
||
},
|
||
{
|
||
"endpoint_id": "DELETE /api/dms/{dms_instance_code}/v1/cd_geo_unit",
|
||
"endpoint_name": "地质单元数据删除",
|
||
"overall_status": "失败",
|
||
"duration_seconds": 16.398648,
|
||
"start_time": "2025-05-26T14:56:54.854996",
|
||
"end_time": "2025-05-26T14:57:11.253644",
|
||
"executed_test_cases": [
|
||
{
|
||
"test_case_id": "TC-STATUS-001",
|
||
"test_case_name": "基本状态码 200 检查",
|
||
"test_case_severity": "严重",
|
||
"status": "通过",
|
||
"message": "",
|
||
"duration_seconds": 0.023985082982107997,
|
||
"timestamp": "2025-05-26T14:56:54.879085",
|
||
"validation_points": [
|
||
{
|
||
"passed": true,
|
||
"message": "响应状态码为 200,符合预期 200。"
|
||
}
|
||
]
|
||
},
|
||
{
|
||
"test_case_id": "TC-NORMATIVE-URL-LLM-COMPREHENSIVE-001",
|
||
"test_case_name": "综合URL规范与RESTful风格检查 (LLM)",
|
||
"test_case_severity": "中",
|
||
"status": "失败",
|
||
"message": "",
|
||
"duration_seconds": 16.23550120787695,
|
||
"timestamp": "2025-05-26T14:57:11.114734",
|
||
"validation_points": [
|
||
{
|
||
"standard_name": "interface_naming_convention",
|
||
"is_compliant_by_llm": false,
|
||
"llm_reason": "接口名称 'cd_geo_unit' 不符合动词+名词结构,无法明确表达业务语义。",
|
||
"path_template": "/api/dms/{dms_instance_code}/v1/cd_geo_unit",
|
||
"http_method": "DELETE"
|
||
},
|
||
{
|
||
"standard_name": "http_method_usage",
|
||
"is_compliant_by_llm": true,
|
||
"llm_reason": "DELETE方法用于删除资源,符合RESTful规范。",
|
||
"path_template": "/api/dms/{dms_instance_code}/v1/cd_geo_unit",
|
||
"http_method": "DELETE"
|
||
},
|
||
{
|
||
"standard_name": "url_path_structure",
|
||
"is_compliant_by_llm": true,
|
||
"llm_reason": "路径结构 '/api/dms/{dms_instance_code}/v1/cd_geo_unit' 符合 `<前缀>/<专业领域>/v<版本号>/<资源类型>` 的格式要求。",
|
||
"path_template": "/api/dms/{dms_instance_code}/v1/cd_geo_unit",
|
||
"http_method": "DELETE"
|
||
},
|
||
{
|
||
"standard_name": "url_path_parameter_naming",
|
||
"is_compliant_by_llm": true,
|
||
"llm_reason": "路径参数 '{dms_instance_code}' 使用了小写字母加下划线的命名方式,符合规范。",
|
||
"path_template": "/api/dms/{dms_instance_code}/v1/cd_geo_unit",
|
||
"http_method": "DELETE"
|
||
},
|
||
{
|
||
"standard_name": "resource_naming_in_path",
|
||
"is_compliant_by_llm": false,
|
||
"llm_reason": "资源类型 'cd_geo_unit' 应使用复数形式表示集合资源,并且应优先使用石油行业的标准术语。当前命名可能不够清晰或标准化。",
|
||
"path_template": "/api/dms/{dms_instance_code}/v1/cd_geo_unit",
|
||
"http_method": "DELETE"
|
||
}
|
||
]
|
||
},
|
||
{
|
||
"test_case_id": "TC-CORE-FUNC-001",
|
||
"test_case_name": "Response Body JSON Schema Validation",
|
||
"test_case_severity": "严重",
|
||
"status": "通过",
|
||
"message": "",
|
||
"duration_seconds": 0.025527833960950375,
|
||
"timestamp": "2025-05-26T14:57:11.140480",
|
||
"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": "",
|
||
"duration_seconds": 0.02104416606016457,
|
||
"timestamp": "2025-05-26T14:57:11.161612",
|
||
"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.027705333195626736,
|
||
"timestamp": "2025-05-26T14:57:11.189372",
|
||
"validation_points": [
|
||
{
|
||
"status_code": 200,
|
||
"response_body": {
|
||
"code": 22,
|
||
"message": "qui laboris irure eu",
|
||
"data": false
|
||
}
|
||
}
|
||
]
|
||
},
|
||
{
|
||
"test_case_id": "TC-ERROR-4001-BODY",
|
||
"test_case_name": "Error Code 4001 - Request Body Type Mismatch Validation",
|
||
"test_case_severity": "中",
|
||
"status": "失败",
|
||
"message": "",
|
||
"duration_seconds": 0.02069554105401039,
|
||
"timestamp": "2025-05-26T14:57:11.210122",
|
||
"validation_points": [
|
||
{
|
||
"status_code": 200,
|
||
"response_body": {
|
||
"code": 52,
|
||
"message": "reprehenderit aute officia qui incididunt",
|
||
"data": true
|
||
}
|
||
}
|
||
]
|
||
},
|
||
{
|
||
"test_case_id": "TC-ERROR-4003-BODY",
|
||
"test_case_name": "Error Code 4003 - Missing Required Request Body Field Validation",
|
||
"test_case_severity": "高",
|
||
"status": "通过",
|
||
"message": "",
|
||
"duration_seconds": 0.023130791960284114,
|
||
"timestamp": "2025-05-26T14:57:11.233298",
|
||
"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": "",
|
||
"duration_seconds": 0.020238333148881793,
|
||
"timestamp": "2025-05-26T14:57:11.253601",
|
||
"validation_points": [
|
||
{
|
||
"status_code": 200,
|
||
"response_body": {
|
||
"code": 13,
|
||
"message": "est labore aute consectetur ad",
|
||
"data": true
|
||
},
|
||
"removed_field": "query.id"
|
||
}
|
||
]
|
||
}
|
||
]
|
||
},
|
||
{
|
||
"endpoint_id": "POST /api/dms/{dms_instance_code}/v1/cd_geo_unit",
|
||
"endpoint_name": "地质单元数据添加",
|
||
"overall_status": "失败",
|
||
"duration_seconds": 12.880859,
|
||
"start_time": "2025-05-26T14:57:11.253685",
|
||
"end_time": "2025-05-26T14:57:24.134544",
|
||
"executed_test_cases": [
|
||
{
|
||
"test_case_id": "TC-STATUS-001",
|
||
"test_case_name": "基本状态码 200 检查",
|
||
"test_case_severity": "严重",
|
||
"status": "通过",
|
||
"message": "",
|
||
"duration_seconds": 0.040113292168825865,
|
||
"timestamp": "2025-05-26T14:57:11.293916",
|
||
"validation_points": [
|
||
{
|
||
"passed": true,
|
||
"message": "响应状态码为 200,符合预期 200。"
|
||
}
|
||
]
|
||
},
|
||
{
|
||
"test_case_id": "TC-NORMATIVE-URL-LLM-COMPREHENSIVE-001",
|
||
"test_case_name": "综合URL规范与RESTful风格检查 (LLM)",
|
||
"test_case_severity": "中",
|
||
"status": "失败",
|
||
"message": "",
|
||
"duration_seconds": 12.704878584016114,
|
||
"timestamp": "2025-05-26T14:57:23.999175",
|
||
"validation_points": [
|
||
{
|
||
"standard_name": "interface_naming_convention",
|
||
"is_compliant_by_llm": false,
|
||
"llm_reason": "接口名称 'cd_geo_unit' 不符合动词+名词结构,无法明确表达业务语义。",
|
||
"path_template": "/api/dms/{dms_instance_code}/v1/cd_geo_unit",
|
||
"http_method": "POST"
|
||
},
|
||
{
|
||
"standard_name": "http_method_usage",
|
||
"is_compliant_by_llm": true,
|
||
"llm_reason": "POST方法用于创建资源,符合RESTful规范。",
|
||
"path_template": "/api/dms/{dms_instance_code}/v1/cd_geo_unit",
|
||
"http_method": "POST"
|
||
},
|
||
{
|
||
"standard_name": "url_path_structure",
|
||
"is_compliant_by_llm": true,
|
||
"llm_reason": "URL路径结构 '/api/dms/{dms_instance_code}/v1/cd_geo_unit' 符合 `<前缀>/<专业领域>/v<版本号>/<资源类型>` 的格式要求。",
|
||
"path_template": "/api/dms/{dms_instance_code}/v1/cd_geo_unit",
|
||
"http_method": "POST"
|
||
},
|
||
{
|
||
"standard_name": "url_path_parameter_naming",
|
||
"is_compliant_by_llm": true,
|
||
"llm_reason": "路径参数 '{dms_instance_code}' 使用了小写字母加下划线的命名方式,符合规范。",
|
||
"path_template": "/api/dms/{dms_instance_code}/v1/cd_geo_unit",
|
||
"http_method": "POST"
|
||
},
|
||
{
|
||
"standard_name": "resource_naming_in_path",
|
||
"is_compliant_by_llm": false,
|
||
"llm_reason": "'cd_geo_unit' 是单数形式,应改为复数形式以表示资源集合,例如 'cd_geo_units'。此外,术语是否为石油行业标准术语需要进一步确认。",
|
||
"path_template": "/api/dms/{dms_instance_code}/v1/cd_geo_unit",
|
||
"http_method": "POST"
|
||
}
|
||
]
|
||
},
|
||
{
|
||
"test_case_id": "TC-CORE-FUNC-001",
|
||
"test_case_name": "Response Body JSON Schema Validation",
|
||
"test_case_severity": "严重",
|
||
"status": "通过",
|
||
"message": "",
|
||
"duration_seconds": 0.026565458858385682,
|
||
"timestamp": "2025-05-26T14:57:24.025911",
|
||
"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": "",
|
||
"duration_seconds": 0.017684708116576076,
|
||
"timestamp": "2025-05-26T14:57:24.043672",
|
||
"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.01757129211910069,
|
||
"timestamp": "2025-05-26T14:57:24.061299",
|
||
"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": "",
|
||
"duration_seconds": 0.01608758303336799,
|
||
"timestamp": "2025-05-26T14:57:24.077435",
|
||
"validation_points": [
|
||
{
|
||
"status_code": 200,
|
||
"response_body": {
|
||
"code": 27,
|
||
"message": "sit ut ullamco pariatur in",
|
||
"data": false
|
||
}
|
||
}
|
||
]
|
||
},
|
||
{
|
||
"test_case_id": "TC-ERROR-4003-BODY",
|
||
"test_case_name": "Error Code 4003 - Missing Required Request Body Field Validation",
|
||
"test_case_severity": "高",
|
||
"status": "失败",
|
||
"message": "",
|
||
"duration_seconds": 0.01908508292399347,
|
||
"timestamp": "2025-05-26T14:57:24.096592",
|
||
"validation_points": [
|
||
{
|
||
"status_code": 200,
|
||
"response_body": {
|
||
"code": 16,
|
||
"message": "ut sit enim",
|
||
"data": false
|
||
},
|
||
"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": "",
|
||
"duration_seconds": 0.0376933328807354,
|
||
"timestamp": "2025-05-26T14:57:24.134494",
|
||
"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": 17.285321,
|
||
"start_time": "2025-05-26T14:57:24.134588",
|
||
"end_time": "2025-05-26T14:57:41.419909",
|
||
"executed_test_cases": [
|
||
{
|
||
"test_case_id": "TC-STATUS-001",
|
||
"test_case_name": "基本状态码 200 检查",
|
||
"test_case_severity": "严重",
|
||
"status": "通过",
|
||
"message": "",
|
||
"duration_seconds": 0.01687712501734495,
|
||
"timestamp": "2025-05-26T14:57:24.151591",
|
||
"validation_points": [
|
||
{
|
||
"passed": true,
|
||
"message": "响应状态码为 200,符合预期 200。"
|
||
}
|
||
]
|
||
},
|
||
{
|
||
"test_case_id": "TC-NORMATIVE-URL-LLM-COMPREHENSIVE-001",
|
||
"test_case_name": "综合URL规范与RESTful风格检查 (LLM)",
|
||
"test_case_severity": "中",
|
||
"status": "失败",
|
||
"message": "",
|
||
"duration_seconds": 17.150162916164845,
|
||
"timestamp": "2025-05-26T14:57:41.301902",
|
||
"validation_points": [
|
||
{
|
||
"standard_name": "interface_naming_convention",
|
||
"is_compliant_by_llm": false,
|
||
"llm_reason": "接口名称 'cd_geo_unit' 不符合动词+名词结构,无法明确表达业务语义。",
|
||
"path_template": "/api/dms/{dms_instance_code}/v1/cd_geo_unit/{version}/{id}",
|
||
"http_method": "GET"
|
||
},
|
||
{
|
||
"standard_name": "http_method_usage",
|
||
"is_compliant_by_llm": true,
|
||
"llm_reason": "GET方法用于检索资源,符合RESTful规范。",
|
||
"path_template": "/api/dms/{dms_instance_code}/v1/cd_geo_unit/{version}/{id}",
|
||
"http_method": "GET"
|
||
},
|
||
{
|
||
"standard_name": "url_path_structure",
|
||
"is_compliant_by_llm": false,
|
||
"llm_reason": "路径模板中的专业领域部分 '/dms/{dms_instance_code}/v1/cd_geo_unit' 不符合 `<专业领域>/v<版本号>/<资源类型>` 的结构要求,且 `cd_geo_unit` 不是有效的资源集合表示。",
|
||
"path_template": "/api/dms/{dms_instance_code}/v1/cd_geo_unit/{version}/{id}",
|
||
"http_method": "GET"
|
||
},
|
||
{
|
||
"standard_name": "url_path_parameter_naming",
|
||
"is_compliant_by_llm": true,
|
||
"llm_reason": "路径参数 {dms_instance_code}, {version}, {id} 均使用了小写字母或下划线命名,并能反映资源的唯一标识。",
|
||
"path_template": "/api/dms/{dms_instance_code}/v1/cd_geo_unit/{version}/{id}",
|
||
"http_method": "GET"
|
||
},
|
||
{
|
||
"standard_name": "resource_naming_in_path",
|
||
"is_compliant_by_llm": false,
|
||
"llm_reason": "`cd_geo_unit` 使用了单数形式,应改为复数形式(如 `cd_geo_units`),并且未使用石油行业的标准术语来描述资源。",
|
||
"path_template": "/api/dms/{dms_instance_code}/v1/cd_geo_unit/{version}/{id}",
|
||
"http_method": "GET"
|
||
}
|
||
]
|
||
},
|
||
{
|
||
"test_case_id": "TC-CORE-FUNC-001",
|
||
"test_case_name": "Response Body JSON Schema Validation",
|
||
"test_case_severity": "严重",
|
||
"status": "通过",
|
||
"message": "",
|
||
"duration_seconds": 0.02449162513948977,
|
||
"timestamp": "2025-05-26T14:57:41.326585",
|
||
"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": "",
|
||
"duration_seconds": 0.025857542175799608,
|
||
"timestamp": "2025-05-26T14:57:41.352535",
|
||
"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.017973707988858223,
|
||
"timestamp": "2025-05-26T14:57:41.370605",
|
||
"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": "",
|
||
"duration_seconds": 0.016390540869906545,
|
||
"timestamp": "2025-05-26T14:57:41.387060",
|
||
"validation_points": [
|
||
{
|
||
"status_code": 200,
|
||
"response_body": {
|
||
"code": 76,
|
||
"message": "mollit culpa laboris",
|
||
"data": {
|
||
"total": 69,
|
||
"list": [
|
||
{
|
||
"dsid": "100",
|
||
"dataRegion": "mollit ullamco",
|
||
"gasReleaseMon": null,
|
||
"gasReleaseYear": null,
|
||
"releaseGasCum": null
|
||
},
|
||
{
|
||
"dsid": "62",
|
||
"dataRegion": "proident Ut adipisicing sed",
|
||
"gasReleaseMon": null,
|
||
"gasReleaseYear": null,
|
||
"releaseGasCum": null
|
||
}
|
||
]
|
||
}
|
||
}
|
||
}
|
||
]
|
||
},
|
||
{
|
||
"test_case_id": "TC-ERROR-4003-BODY",
|
||
"test_case_name": "Error Code 4003 - Missing Required Request Body Field Validation",
|
||
"test_case_severity": "高",
|
||
"status": "通过",
|
||
"message": "",
|
||
"duration_seconds": 0.016939209075644612,
|
||
"timestamp": "2025-05-26T14:57:41.404059",
|
||
"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": "",
|
||
"duration_seconds": 0.015757916029542685,
|
||
"timestamp": "2025-05-26T14:57:41.419872",
|
||
"validation_points": [
|
||
{
|
||
"passed": true,
|
||
"message": "跳过测试:在API规范中未找到合适的必填查询参数用于移除测试。"
|
||
}
|
||
]
|
||
}
|
||
]
|
||
}
|
||
]
|
||
} |