fix:makefile

This commit is contained in:
gongwenxin
2025-05-29 16:45:57 +08:00
parent c3bd515cee
commit a4e175bc15
5 changed files with 7024 additions and 3675 deletions
+12 -14
View File
@@ -4,22 +4,20 @@
# pyinstaller --name ddms_compliance_tool --onefile run_api_tests.py # pyinstaller --name ddms_compliance_tool --onefile run_api_tests.py
run: run:
python run_api_tests.py --base-url http://127.0.0.1:4523/m1/6389742-6086420-default --yapi assets/doc/井筒API示例_simple.json --custom-test-cases-dir ./custom_testcases \ python run_api_tests.py --base-url http://127.0.0.1:4523/m1/6389742-6086420-default --yapi assets/doc/井筒API示例_simple.json --custom-test-cases-dir ./custom_testcases --verbose --output test_report.json >log.txt 2>&1
--verbose \
--output test_report.json >log.txt 2>&1
docker_build_redhat: docker_build_redhat:
docker run --platform linux/amd64 --rm -v "$(pwd)":/app -w /app registry.access.redhat.com/ubi8/python-39 sh -c "pip3 install --no-cache-dir -r requirements.txt || true && pip3 install --no-cache-dir pyinstaller && pyinstaller --onefile --noconfirm run_api_tests.py && ./dist/run_api_tests --base-url http://host.docker.internal:4523 > ./dist/output.txt 2>&1 && chown -R $(id -u):$(id -g) dist build run_api_tests.spec || true" docker run --platform linux/amd64 --rm -v "$(pwd)":/app -w /app registry.access.redhat.com/ubi8/python-39 sh -c "pip3 install --no-cache-dir -r requirements.txt || true && pip3 install --no-cache-dir pyinstaller && pyinstaller --onefile --noconfirm run_api_tests.py && ./dist/run_api_tests --base-url http://host.docker.internal:4523 > ./dist/output.txt 2>&1 && chown -R $(id -u):$(id -g) dist build run_api_tests.spec || true"
# docker_build_centos: # docker_build_centos:
docker run --platform linux/amd64 --rm \ # docker run --platform linux/amd64 --rm \
-v "$(pwd)":/app -w /app \ # -v "$(pwd)":/app -w /app \
centos:8 \ # centos:8 \
sh -c "dnf install -y epel-release && \ # sh -c "dnf install -y epel-release && \
dnf config-manager --set-enabled powertools || dnf config-manager --set-enabled PowerTools || true && \ # dnf config-manager --set-enabled powertools || dnf config-manager --set-enabled PowerTools || true && \
dnf install -y python39 python39-pip python39-devel binutils gcc make && \ # dnf install -y python39 python39-pip python39-devel binutils gcc make && \
pip3.9 install --no-cache-dir -r requirements.txt || true && \ # pip3.9 install --no-cache-dir -r requirements.txt || true && \
pip3.9 install --no-cache-dir pyinstaller && \ # pip3.9 install --no-cache-dir pyinstaller && \
pyinstaller --onefile --noconfirm run_api_tests.py && \ # pyinstaller --onefile --noconfirm run_api_tests.py && \
./dist/run_api_tests --base-url http://host.docker.internal:4523 > ./dist/output.txt 2>&1 && \ # ./dist/run_api_tests --base-url http://host.docker.internal:4523 > ./dist/output.txt 2>&1 && \
chown -R $(id -u):$(id -g) dist build run_api_tests.spec || true" # chown -R $(id -u):$(id -g) dist build run_api_tests.spec || true"
+3302
View File
File diff suppressed because it is too large Load Diff
+1203 -1168
View File
File diff suppressed because it is too large Load Diff
+2325 -2325
View File
File diff suppressed because it is too large Load Diff
+175 -161
View File
@@ -1,8 +1,8 @@
{ {
"summary_metadata": { "summary_metadata": {
"start_time": "2025-05-29T16:38:51.856094", "start_time": "2025-05-29T16:45:25.849307",
"end_time": "2025-05-29T16:38:53.182703", "end_time": "2025-05-29T16:45:26.621679",
"duration_seconds": "1.33" "duration_seconds": "0.77"
}, },
"endpoint_stats": { "endpoint_stats": {
"total_defined": 6, "total_defined": 6,
@@ -28,9 +28,9 @@
"endpoint_id": "POST /api/dms/{dms_instance_code}/v1/message/push/{schema}/{version}", "endpoint_id": "POST /api/dms/{dms_instance_code}/v1/message/push/{schema}/{version}",
"endpoint_name": "数据推送接口", "endpoint_name": "数据推送接口",
"overall_status": "失败", "overall_status": "失败",
"duration_seconds": 0.578975, "duration_seconds": 0.195803,
"start_time": "2025-05-29T16:38:51.856404", "start_time": "2025-05-29T16:45:25.849631",
"end_time": "2025-05-29T16:38:52.435379", "end_time": "2025-05-29T16:45:26.045434",
"executed_test_cases": [ "executed_test_cases": [
{ {
"test_case_id": "TC-STATUS-001", "test_case_id": "TC-STATUS-001",
@@ -38,8 +38,8 @@
"test_case_severity": "严重", "test_case_severity": "严重",
"status": "通过", "status": "通过",
"message": "响应状态码为 200,符合预期 200。", "message": "响应状态码为 200,符合预期 200。",
"duration_seconds": 0.31512458296492696, "duration_seconds": 0.06710091698914766,
"timestamp": "2025-05-29T16:38:52.171611", "timestamp": "2025-05-29T16:45:25.916804",
"validation_points": [ "validation_points": [
{ {
"passed": true, "passed": true,
@@ -53,8 +53,8 @@
"test_case_severity": "严重", "test_case_severity": "严重",
"status": "通过", "status": "通过",
"message": "Schema验证步骤完成(未发现问题,或schema不适用/未为此响应定义)。", "message": "Schema验证步骤完成(未发现问题,或schema不适用/未为此响应定义)。",
"duration_seconds": 0.0580080000218004, "duration_seconds": 0.024326875107362866,
"timestamp": "2025-05-29T16:38:52.229929", "timestamp": "2025-05-29T16:45:25.941204",
"validation_points": [ "validation_points": [
{ {
"passed": true, "passed": true,
@@ -68,8 +68,8 @@
"test_case_severity": "严重", "test_case_severity": "严重",
"status": "失败", "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强制策略。", "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.047522042179480195, "duration_seconds": 0.019037832971662283,
"timestamp": "2025-05-29T16:38:52.277613", "timestamp": "2025-05-29T16:45:25.960309",
"validation_points": [ "validation_points": [
{ {
"status_code": 200 "status_code": 200
@@ -82,8 +82,8 @@
"test_case_severity": "中", "test_case_severity": "中",
"status": "通过", "status": "通过",
"message": "跳过测试:在查询参数中未找到合适的字段来测试类型不匹配。", "message": "跳过测试:在查询参数中未找到合适的字段来测试类型不匹配。",
"duration_seconds": 0.08462537499144673, "duration_seconds": 0.0200852919369936,
"timestamp": "2025-05-29T16:38:52.362387", "timestamp": "2025-05-29T16:45:25.980454",
"validation_points": [ "validation_points": [
{ {
"passed": true, "passed": true,
@@ -96,21 +96,35 @@
"test_case_name": "Error Code 4001 - Request Body Type Mismatch Validation", "test_case_name": "Error Code 4001 - Request Body Type Mismatch Validation",
"test_case_severity": "中", "test_case_severity": "中",
"status": "失败", "status": "失败",
"message": "当请求体字段 'isSearchCount' 类型不匹配时,期望API返回状态码在 [400, 422] 中,或返回4xx客户端错误且业务码为 '4001'. 实际收到状态码 200. 响应体中的业务码 ('code') 为 '5'.", "message": "当请求体字段 'isSearchCount' 类型不匹配时,期望API返回状态码在 [400, 422] 中,或返回4xx客户端错误且业务码为 '4001'. 实际收到状态码 200. 响应体中的业务码 ('code') 为 '44'.",
"duration_seconds": 0.024353125132620335, "duration_seconds": 0.02025704109109938,
"timestamp": "2025-05-29T16:38:52.387005", "timestamp": "2025-05-29T16:45:26.000770",
"validation_points": [ "validation_points": [
{ {
"status_code": 200, "status_code": 200,
"response_body": { "response_body": {
"code": 5, "code": 44,
"message": "Excepteur consectetur labore tempor", "message": "cupidatat ipsum exercitation",
"data": { "data": {
"total": 48, "total": 84,
"list": [ "list": [
{ {
"dsid": "77", "dsid": "56",
"dataRegion": "sed laborum et dolor", "dataRegion": "culpa et nisi",
"gasReleaseMon": null,
"gasReleaseYear": null,
"releaseGasCum": null
},
{
"dsid": "22",
"dataRegion": "ea nulla in tempor proident",
"gasReleaseMon": null,
"gasReleaseYear": null,
"releaseGasCum": null
},
{
"dsid": "69",
"dataRegion": "adipisicing dolore velit Excepteur",
"gasReleaseMon": null, "gasReleaseMon": null,
"gasReleaseYear": null, "gasReleaseYear": null,
"releaseGasCum": null "releaseGasCum": null
@@ -133,8 +147,8 @@
"test_case_severity": "高", "test_case_severity": "高",
"status": "通过", "status": "通过",
"message": "跳过测试:在API规范中未找到合适的必填请求体字段用于移除测试。", "message": "跳过测试:在API规范中未找到合适的必填请求体字段用于移除测试。",
"duration_seconds": 0.02168962499126792, "duration_seconds": 0.02807041583582759,
"timestamp": "2025-05-29T16:38:52.408822", "timestamp": "2025-05-29T16:45:26.028894",
"validation_points": [ "validation_points": [
{ {
"passed": true, "passed": true,
@@ -148,8 +162,8 @@
"test_case_severity": "高", "test_case_severity": "高",
"status": "通过", "status": "通过",
"message": "跳过测试:在API规范中未找到合适的必填查询参数用于移除测试。", "message": "跳过测试:在API规范中未找到合适的必填查询参数用于移除测试。",
"duration_seconds": 0.026100416900590062, "duration_seconds": 0.016444000182673335,
"timestamp": "2025-05-29T16:38:52.435209", "timestamp": "2025-05-29T16:45:26.045394",
"validation_points": [ "validation_points": [
{ {
"passed": true, "passed": true,
@@ -163,9 +177,9 @@
"endpoint_id": "POST /api/dms/{dms_instance_code}/v1/cd_geo_unit/{version}", "endpoint_id": "POST /api/dms/{dms_instance_code}/v1/cd_geo_unit/{version}",
"endpoint_name": "地质单元列表查询", "endpoint_name": "地质单元列表查询",
"overall_status": "失败", "overall_status": "失败",
"duration_seconds": 0.192345, "duration_seconds": 0.121974,
"start_time": "2025-05-29T16:38:52.435520", "start_time": "2025-05-29T16:45:26.045467",
"end_time": "2025-05-29T16:38:52.627865", "end_time": "2025-05-29T16:45:26.167441",
"executed_test_cases": [ "executed_test_cases": [
{ {
"test_case_id": "TC-STATUS-001", "test_case_id": "TC-STATUS-001",
@@ -173,8 +187,8 @@
"test_case_severity": "严重", "test_case_severity": "严重",
"status": "通过", "status": "通过",
"message": "响应状态码为 200,符合预期 200。", "message": "响应状态码为 200,符合预期 200。",
"duration_seconds": 0.028909082990139723, "duration_seconds": 0.0186984168831259,
"timestamp": "2025-05-29T16:38:52.464841", "timestamp": "2025-05-29T16:45:26.064250",
"validation_points": [ "validation_points": [
{ {
"passed": true, "passed": true,
@@ -188,8 +202,8 @@
"test_case_severity": "严重", "test_case_severity": "严重",
"status": "通过", "status": "通过",
"message": "Schema验证步骤完成(未发现问题,或schema不适用/未为此响应定义)。", "message": "Schema验证步骤完成(未发现问题,或schema不适用/未为此响应定义)。",
"duration_seconds": 0.01859383308328688, "duration_seconds": 0.021727959159761667,
"timestamp": "2025-05-29T16:38:52.483729", "timestamp": "2025-05-29T16:45:26.086038",
"validation_points": [ "validation_points": [
{ {
"passed": true, "passed": true,
@@ -203,8 +217,8 @@
"test_case_severity": "严重", "test_case_severity": "严重",
"status": "失败", "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强制策略。", "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.021226000040769577, "duration_seconds": 0.017182791838422418,
"timestamp": "2025-05-29T16:38:52.505199", "timestamp": "2025-05-29T16:45:26.103281",
"validation_points": [ "validation_points": [
{ {
"status_code": 200 "status_code": 200
@@ -216,21 +230,21 @@
"test_case_name": "Error Code 4001 - Query Parameter Type Mismatch Validation", "test_case_name": "Error Code 4001 - Query Parameter Type Mismatch Validation",
"test_case_severity": "中", "test_case_severity": "中",
"status": "失败", "status": "失败",
"message": "当查询参数 'pageNo' (路径: 'pageNo') 类型不匹配时,期望API返回状态码在 [400, 422] 中,或返回4xx客户端错误且业务码为 '4001'. 实际收到状态码 200. 响应体中的业务码 ('code') 为 '24'.", "message": "当查询参数 'pageNo' (路径: 'pageNo') 类型不匹配时,期望API返回状态码在 [400, 422] 中,或返回4xx客户端错误且业务码为 '4001'. 实际收到状态码 200. 响应体中的业务码 ('code') 为 '30'.",
"duration_seconds": 0.028693499974906445, "duration_seconds": 0.016620707930997014,
"timestamp": "2025-05-29T16:38:52.534166", "timestamp": "2025-05-29T16:45:26.119956",
"validation_points": [ "validation_points": [
{ {
"status_code": 200, "status_code": 200,
"response_body": { "response_body": {
"code": 24, "code": 30,
"message": "incididunt esse", "message": "ut incididunt aliquip laborum",
"data": { "data": {
"total": 81, "total": 45,
"list": [ "list": [
{ {
"dsid": "56", "dsid": "86",
"dataRegion": "anim proident adipisicing sit", "dataRegion": "aliqua ipsum labore ea",
"gasReleaseMon": null, "gasReleaseMon": null,
"gasReleaseYear": null, "gasReleaseYear": null,
"releaseGasCum": null "releaseGasCum": null
@@ -252,21 +266,28 @@
"test_case_name": "Error Code 4001 - Request Body Type Mismatch Validation", "test_case_name": "Error Code 4001 - Request Body Type Mismatch Validation",
"test_case_severity": "中", "test_case_severity": "中",
"status": "失败", "status": "失败",
"message": "当请求体字段 'isSearchCount' 类型不匹配时,期望API返回状态码在 [400, 422] 中,或返回4xx客户端错误且业务码为 '4001'. 实际收到状态码 200. 响应体中的业务码 ('code') 为 '46'.", "message": "当请求体字段 'isSearchCount' 类型不匹配时,期望API返回状态码在 [400, 422] 中,或返回4xx客户端错误且业务码为 '4001'. 实际收到状态码 200. 响应体中的业务码 ('code') 为 '93'.",
"duration_seconds": 0.023574707796797156, "duration_seconds": 0.01504912506788969,
"timestamp": "2025-05-29T16:38:52.558008", "timestamp": "2025-05-29T16:45:26.135053",
"validation_points": [ "validation_points": [
{ {
"status_code": 200, "status_code": 200,
"response_body": { "response_body": {
"code": 46, "code": 93,
"message": "sint in quis fugiat", "message": "irure in aute aliquip dolor",
"data": { "data": {
"total": 56, "total": 14,
"list": [ "list": [
{
"dsid": "49",
"dataRegion": "pariatur nulla",
"gasReleaseMon": null,
"gasReleaseYear": null,
"releaseGasCum": null
},
{ {
"dsid": "47", "dsid": "47",
"dataRegion": "in id non qui", "dataRegion": "ullamco anim incididunt culpa",
"gasReleaseMon": null, "gasReleaseMon": null,
"gasReleaseYear": null, "gasReleaseYear": null,
"releaseGasCum": null "releaseGasCum": null
@@ -289,8 +310,8 @@
"test_case_severity": "高", "test_case_severity": "高",
"status": "通过", "status": "通过",
"message": "跳过测试:在API规范中未找到合适的必填请求体字段用于移除测试。", "message": "跳过测试:在API规范中未找到合适的必填请求体字段用于移除测试。",
"duration_seconds": 0.019619707949459553, "duration_seconds": 0.01566412509419024,
"timestamp": "2025-05-29T16:38:52.577781", "timestamp": "2025-05-29T16:45:26.150763",
"validation_points": [ "validation_points": [
{ {
"passed": true, "passed": true,
@@ -304,8 +325,8 @@
"test_case_severity": "高", "test_case_severity": "高",
"status": "通过", "status": "通过",
"message": "跳过测试:在API规范中未找到合适的必填查询参数用于移除测试。", "message": "跳过测试:在API规范中未找到合适的必填查询参数用于移除测试。",
"duration_seconds": 0.04977562488056719, "duration_seconds": 0.016583458986133337,
"timestamp": "2025-05-29T16:38:52.627767", "timestamp": "2025-05-29T16:45:26.167396",
"validation_points": [ "validation_points": [
{ {
"passed": true, "passed": true,
@@ -319,9 +340,9 @@
"endpoint_id": "PUT /api/dms/{dms_instance_code}/v1/cd_geo_unit", "endpoint_id": "PUT /api/dms/{dms_instance_code}/v1/cd_geo_unit",
"endpoint_name": "地质单元数据修改", "endpoint_name": "地质单元数据修改",
"overall_status": "失败", "overall_status": "失败",
"duration_seconds": 0.199101, "duration_seconds": 0.110383,
"start_time": "2025-05-29T16:38:52.627944", "start_time": "2025-05-29T16:45:26.167471",
"end_time": "2025-05-29T16:38:52.827045", "end_time": "2025-05-29T16:45:26.277854",
"executed_test_cases": [ "executed_test_cases": [
{ {
"test_case_id": "TC-STATUS-001", "test_case_id": "TC-STATUS-001",
@@ -329,8 +350,8 @@
"test_case_severity": "严重", "test_case_severity": "严重",
"status": "通过", "status": "通过",
"message": "响应状态码为 200,符合预期 200。", "message": "响应状态码为 200,符合预期 200。",
"duration_seconds": 0.07733883312903345, "duration_seconds": 0.01697887503542006,
"timestamp": "2025-05-29T16:38:52.705528", "timestamp": "2025-05-29T16:45:26.184543",
"validation_points": [ "validation_points": [
{ {
"passed": true, "passed": true,
@@ -344,8 +365,8 @@
"test_case_severity": "严重", "test_case_severity": "严重",
"status": "通过", "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.", "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.026119209127500653, "duration_seconds": 0.01832004194147885,
"timestamp": "2025-05-29T16:38:52.731704", "timestamp": "2025-05-29T16:45:26.202912",
"validation_points": [ "validation_points": [
{ {
"passed": true, "passed": true,
@@ -359,8 +380,8 @@
"test_case_severity": "严重", "test_case_severity": "严重",
"status": "失败", "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强制策略。", "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.01827866700477898, "duration_seconds": 0.016209041001275182,
"timestamp": "2025-05-29T16:38:52.750047", "timestamp": "2025-05-29T16:45:26.219217",
"validation_points": [ "validation_points": [
{ {
"status_code": 200 "status_code": 200
@@ -372,15 +393,15 @@
"test_case_name": "Error Code 4001 - Query Parameter Type Mismatch Validation", "test_case_name": "Error Code 4001 - Query Parameter Type Mismatch Validation",
"test_case_severity": "中", "test_case_severity": "中",
"status": "失败", "status": "失败",
"message": "当查询参数 'id' (路径: 'id') 类型不匹配时,期望API返回状态码在 [400, 422] 中,或返回4xx客户端错误且业务码为 '4001'. 实际收到状态码 200. 响应体中的业务码 ('code') 为 '9'.", "message": "当查询参数 'id' (路径: 'id') 类型不匹配时,期望API返回状态码在 [400, 422] 中,或返回4xx客户端错误且业务码为 '4001'. 实际收到状态码 200. 响应体中的业务码 ('code') 为 '55'.",
"duration_seconds": 0.015486499993130565, "duration_seconds": 0.014930624980479479,
"timestamp": "2025-05-29T16:38:52.765588", "timestamp": "2025-05-29T16:45:26.234199",
"validation_points": [ "validation_points": [
{ {
"status_code": 200, "status_code": 200,
"response_body": { "response_body": {
"code": 9, "code": 55,
"message": "quis in enim magna culpa", "message": "tempor elit",
"data": true "data": true
}, },
"expected_http_status_codes": [ "expected_http_status_codes": [
@@ -397,15 +418,15 @@
"test_case_name": "Error Code 4001 - Request Body Type Mismatch Validation", "test_case_name": "Error Code 4001 - Request Body Type Mismatch Validation",
"test_case_severity": "中", "test_case_severity": "中",
"status": "失败", "status": "失败",
"message": "当请求体字段 'id' 类型不匹配时,期望API返回状态码在 [400, 422] 中,或返回4xx客户端错误且业务码为 '4001'. 实际收到状态码 200. 响应体中的业务码 ('code') 为 '90'.", "message": "当请求体字段 'id' 类型不匹配时,期望API返回状态码在 [400, 422] 中,或返回4xx客户端错误且业务码为 '4001'. 实际收到状态码 200. 响应体中的业务码 ('code') 为 '54'.",
"duration_seconds": 0.029123959131538868, "duration_seconds": 0.014813833869993687,
"timestamp": "2025-05-29T16:38:52.794759", "timestamp": "2025-05-29T16:45:26.249066",
"validation_points": [ "validation_points": [
{ {
"status_code": 200, "status_code": 200,
"response_body": { "response_body": {
"code": 90, "code": 54,
"message": "reprehenderit in id sed consequat", "message": "deserunt id incididunt",
"data": false "data": false
}, },
"expected_http_status_codes": [ "expected_http_status_codes": [
@@ -423,8 +444,8 @@
"test_case_severity": "高", "test_case_severity": "高",
"status": "通过", "status": "通过",
"message": "当移除必填请求体字段 'id' 时,API响应了状态码 200 (非主要预期HTTP状态 [400, 422],但为4xx客户端错误), 且响应体中包含预期的业务错误码 '4003' (字段: 'code').", "message": "当移除必填请求体字段 'id' 时,API响应了状态码 200 (非主要预期HTTP状态 [400, 422],但为4xx客户端错误), 且响应体中包含预期的业务错误码 '4003' (字段: 'code').",
"duration_seconds": 0.01860508299432695, "duration_seconds": 0.013806292088702321,
"timestamp": "2025-05-29T16:38:52.813417", "timestamp": "2025-05-29T16:45:26.262916",
"validation_points": [ "validation_points": [
{ {
"passed": true, "passed": true,
@@ -437,16 +458,16 @@
"test_case_name": "Error Code 4003 - Missing Required Query Parameter Validation", "test_case_name": "Error Code 4003 - Missing Required Query Parameter Validation",
"test_case_severity": "高", "test_case_severity": "高",
"status": "失败", "status": "失败",
"message": "当移除必填查询参数 'id' 时,期望API返回状态码在 [400, 422] 中,或返回4xx客户端错误且业务码为 '4003'. 实际收到状态码 200. 响应体中的业务码 ('code') 为 '29'.", "message": "当移除必填查询参数 'id' 时,期望API返回状态码在 [400, 422] 中,或返回4xx客户端错误且业务码为 '4003'. 实际收到状态码 200. 响应体中的业务码 ('code') 为 '25'.",
"duration_seconds": 0.013537416933104396, "duration_seconds": 0.014846875099465251,
"timestamp": "2025-05-29T16:38:52.827010", "timestamp": "2025-05-29T16:45:26.277818",
"validation_points": [ "validation_points": [
{ {
"status_code": 200, "status_code": 200,
"response_body": { "response_body": {
"code": 29, "code": 25,
"message": "consequat magna nostrud occaecat", "message": "sint laboris ex ea",
"data": false "data": true
}, },
"expected_http_status_codes": [ "expected_http_status_codes": [
400, 400,
@@ -463,9 +484,9 @@
"endpoint_id": "DELETE /api/dms/{dms_instance_code}/v1/cd_geo_unit", "endpoint_id": "DELETE /api/dms/{dms_instance_code}/v1/cd_geo_unit",
"endpoint_name": "地质单元数据删除", "endpoint_name": "地质单元数据删除",
"overall_status": "失败", "overall_status": "失败",
"duration_seconds": 0.13411, "duration_seconds": 0.111407,
"start_time": "2025-05-29T16:38:52.827071", "start_time": "2025-05-29T16:45:26.277880",
"end_time": "2025-05-29T16:38:52.961181", "end_time": "2025-05-29T16:45:26.389287",
"executed_test_cases": [ "executed_test_cases": [
{ {
"test_case_id": "TC-STATUS-001", "test_case_id": "TC-STATUS-001",
@@ -473,8 +494,8 @@
"test_case_severity": "严重", "test_case_severity": "严重",
"status": "通过", "status": "通过",
"message": "响应状态码为 200,符合预期 200。", "message": "响应状态码为 200,符合预期 200。",
"duration_seconds": 0.014969042036682367, "duration_seconds": 0.013204999966546893,
"timestamp": "2025-05-29T16:38:52.842123", "timestamp": "2025-05-29T16:45:26.291166",
"validation_points": [ "validation_points": [
{ {
"passed": true, "passed": true,
@@ -488,8 +509,8 @@
"test_case_severity": "严重", "test_case_severity": "严重",
"status": "通过", "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.", "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.02638737508095801, "duration_seconds": 0.01893095811828971,
"timestamp": "2025-05-29T16:38:52.868569", "timestamp": "2025-05-29T16:45:26.310139",
"validation_points": [ "validation_points": [
{ {
"passed": true, "passed": true,
@@ -503,8 +524,8 @@
"test_case_severity": "严重", "test_case_severity": "严重",
"status": "失败", "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强制策略。", "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.017909541027620435, "duration_seconds": 0.013458125060424209,
"timestamp": "2025-05-29T16:38:52.886534", "timestamp": "2025-05-29T16:45:26.323654",
"validation_points": [ "validation_points": [
{ {
"status_code": 200 "status_code": 200
@@ -516,15 +537,15 @@
"test_case_name": "Error Code 4001 - Query Parameter Type Mismatch Validation", "test_case_name": "Error Code 4001 - Query Parameter Type Mismatch Validation",
"test_case_severity": "中", "test_case_severity": "中",
"status": "失败", "status": "失败",
"message": "当查询参数 'id' (路径: 'id') 类型不匹配时,期望API返回状态码在 [400, 422] 中,或返回4xx客户端错误且业务码为 '4001'. 实际收到状态码 200. 响应体中的业务码 ('code') 为 '23'.", "message": "当查询参数 'id' (路径: 'id') 类型不匹配时,期望API返回状态码在 [400, 422] 中,或返回4xx客户端错误且业务码为 '4001'. 实际收到状态码 200. 响应体中的业务码 ('code') 为 '36'.",
"duration_seconds": 0.023657166864722967, "duration_seconds": 0.015051041962578893,
"timestamp": "2025-05-29T16:38:52.910250", "timestamp": "2025-05-29T16:45:26.338921",
"validation_points": [ "validation_points": [
{ {
"status_code": 200, "status_code": 200,
"response_body": { "response_body": {
"code": 23, "code": 36,
"message": "deserunt", "message": "nostrud aliqua consequat commodo",
"data": true "data": true
}, },
"expected_http_status_codes": [ "expected_http_status_codes": [
@@ -541,15 +562,15 @@
"test_case_name": "Error Code 4001 - Request Body Type Mismatch Validation", "test_case_name": "Error Code 4001 - Request Body Type Mismatch Validation",
"test_case_severity": "中", "test_case_severity": "中",
"status": "失败", "status": "失败",
"message": "当请求体字段 'version' 类型不匹配时,期望API返回状态码在 [400, 422] 中,或返回4xx客户端错误且业务码为 '4001'. 实际收到状态码 200. 响应体中的业务码 ('code') 为 '58'.", "message": "当请求体字段 'version' 类型不匹配时,期望API返回状态码在 [400, 422] 中,或返回4xx客户端错误且业务码为 '4001'. 实际收到状态码 200. 响应体中的业务码 ('code') 为 '91'.",
"duration_seconds": 0.014851915882900357, "duration_seconds": 0.015764417126774788,
"timestamp": "2025-05-29T16:38:52.925152", "timestamp": "2025-05-29T16:45:26.354804",
"validation_points": [ "validation_points": [
{ {
"status_code": 200, "status_code": 200,
"response_body": { "response_body": {
"code": 58, "code": 91,
"message": "reprehenderit quis in ut", "message": "nisi eu deserunt laboris",
"data": false "data": false
}, },
"expected_http_status_codes": [ "expected_http_status_codes": [
@@ -567,8 +588,8 @@
"test_case_severity": "高", "test_case_severity": "高",
"status": "通过", "status": "通过",
"message": "跳过测试:在API规范中未找到合适的必填请求体字段用于移除测试。", "message": "跳过测试:在API规范中未找到合适的必填请求体字段用于移除测试。",
"duration_seconds": 0.013341292040422559, "duration_seconds": 0.017602207837626338,
"timestamp": "2025-05-29T16:38:52.938550", "timestamp": "2025-05-29T16:45:26.372570",
"validation_points": [ "validation_points": [
{ {
"passed": true, "passed": true,
@@ -581,16 +602,16 @@
"test_case_name": "Error Code 4003 - Missing Required Query Parameter Validation", "test_case_name": "Error Code 4003 - Missing Required Query Parameter Validation",
"test_case_severity": "高", "test_case_severity": "高",
"status": "失败", "status": "失败",
"message": "当移除必填查询参数 'id' 时,期望API返回状态码在 [400, 422] 中,或返回4xx客户端错误且业务码为 '4003'. 实际收到状态码 200. 响应体中的业务码 ('code') 为 '97'.", "message": "当移除必填查询参数 'id' 时,期望API返回状态码在 [400, 422] 中,或返回4xx客户端错误且业务码为 '4003'. 实际收到状态码 200. 响应体中的业务码 ('code') 为 '68'.",
"duration_seconds": 0.0225362500641495, "duration_seconds": 0.016222875099629164,
"timestamp": "2025-05-29T16:38:52.961142", "timestamp": "2025-05-29T16:45:26.389095",
"validation_points": [ "validation_points": [
{ {
"status_code": 200, "status_code": 200,
"response_body": { "response_body": {
"code": 97, "code": 68,
"message": "ut voluptate", "message": "esse ad consectetur",
"data": false "data": true
}, },
"expected_http_status_codes": [ "expected_http_status_codes": [
400, 400,
@@ -607,9 +628,9 @@
"endpoint_id": "POST /api/dms/{dms_instance_code}/v1/cd_geo_unit", "endpoint_id": "POST /api/dms/{dms_instance_code}/v1/cd_geo_unit",
"endpoint_name": "地质单元数据添加", "endpoint_name": "地质单元数据添加",
"overall_status": "失败", "overall_status": "失败",
"duration_seconds": 0.108396, "duration_seconds": 0.12343,
"start_time": "2025-05-29T16:38:52.961214", "start_time": "2025-05-29T16:45:26.389467",
"end_time": "2025-05-29T16:38:53.069610", "end_time": "2025-05-29T16:45:26.512897",
"executed_test_cases": [ "executed_test_cases": [
{ {
"test_case_id": "TC-STATUS-001", "test_case_id": "TC-STATUS-001",
@@ -617,8 +638,8 @@
"test_case_severity": "严重", "test_case_severity": "严重",
"status": "通过", "status": "通过",
"message": "响应状态码为 200,符合预期 200。", "message": "响应状态码为 200,符合预期 200。",
"duration_seconds": 0.018137291073799133, "duration_seconds": 0.017961708130314946,
"timestamp": "2025-05-29T16:38:52.979514", "timestamp": "2025-05-29T16:45:26.407964",
"validation_points": [ "validation_points": [
{ {
"passed": true, "passed": true,
@@ -632,8 +653,8 @@
"test_case_severity": "严重", "test_case_severity": "严重",
"status": "通过", "status": "通过",
"message": "Schema验证步骤完成(未发现问题,或schema不适用/未为此响应定义)。", "message": "Schema验证步骤完成(未发现问题,或schema不适用/未为此响应定义)。",
"duration_seconds": 0.013638167176395655, "duration_seconds": 0.01862025004811585,
"timestamp": "2025-05-29T16:38:52.993197", "timestamp": "2025-05-29T16:45:26.427163",
"validation_points": [ "validation_points": [
{ {
"passed": true, "passed": true,
@@ -647,8 +668,8 @@
"test_case_severity": "严重", "test_case_severity": "严重",
"status": "失败", "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强制策略。", "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.014288584003224969, "duration_seconds": 0.017223792150616646,
"timestamp": "2025-05-29T16:38:53.007531", "timestamp": "2025-05-29T16:45:26.444548",
"validation_points": [ "validation_points": [
{ {
"status_code": 200 "status_code": 200
@@ -661,8 +682,8 @@
"test_case_severity": "中", "test_case_severity": "中",
"status": "通过", "status": "通过",
"message": "跳过测试:在查询参数中未找到合适的字段来测试类型不匹配。", "message": "跳过测试:在查询参数中未找到合适的字段来测试类型不匹配。",
"duration_seconds": 0.013313875067979097, "duration_seconds": 0.016695416998118162,
"timestamp": "2025-05-29T16:38:53.020894", "timestamp": "2025-05-29T16:45:26.461439",
"validation_points": [ "validation_points": [
{ {
"passed": true, "passed": true,
@@ -675,15 +696,15 @@
"test_case_name": "Error Code 4001 - Request Body Type Mismatch Validation", "test_case_name": "Error Code 4001 - Request Body Type Mismatch Validation",
"test_case_severity": "中", "test_case_severity": "中",
"status": "失败", "status": "失败",
"message": "当请求体字段 'version' 类型不匹配时,期望API返回状态码在 [400, 422] 中,或返回4xx客户端错误且业务码为 '4001'. 实际收到状态码 200. 响应体中的业务码 ('code') 为 '52'.", "message": "当请求体字段 'version' 类型不匹配时,期望API返回状态码在 [400, 422] 中,或返回4xx客户端错误且业务码为 '4001'. 实际收到状态码 200. 响应体中的业务码 ('code') 为 '44'.",
"duration_seconds": 0.01988679193891585, "duration_seconds": 0.01606720802374184,
"timestamp": "2025-05-29T16:38:53.040825", "timestamp": "2025-05-29T16:45:26.477669",
"validation_points": [ "validation_points": [
{ {
"status_code": 200, "status_code": 200,
"response_body": { "response_body": {
"code": 52, "code": 44,
"message": "proident Ut ea ullamco", "message": "enim cupidatat magna nulla",
"data": true "data": true
}, },
"expected_http_status_codes": [ "expected_http_status_codes": [
@@ -700,15 +721,15 @@
"test_case_name": "Error Code 4003 - Missing Required Request Body Field Validation", "test_case_name": "Error Code 4003 - Missing Required Request Body Field Validation",
"test_case_severity": "高", "test_case_severity": "高",
"status": "失败", "status": "失败",
"message": "当移除必填请求体字段 'data.0.bsflag' 时,期望API返回状态码在 [400, 422] 中,或返回4xx客户端错误且业务码为 '4003'. 实际收到状态码 200. 响应体中的业务码 ('code') 为 '49'.", "message": "当移除必填请求体字段 'data.0.bsflag' 时,期望API返回状态码在 [400, 422] 中,或返回4xx客户端错误且业务码为 '4003'. 实际收到状态码 200. 响应体中的业务码 ('code') 为 '34'.",
"duration_seconds": 0.01450737495906651, "duration_seconds": 0.018121875124052167,
"timestamp": "2025-05-29T16:38:53.055380", "timestamp": "2025-05-29T16:45:26.495933",
"validation_points": [ "validation_points": [
{ {
"status_code": 200, "status_code": 200,
"response_body": { "response_body": {
"code": 49, "code": 34,
"message": "id", "message": "do consequat elit",
"data": true "data": true
}, },
"expected_http_status_codes": [ "expected_http_status_codes": [
@@ -726,8 +747,8 @@
"test_case_severity": "高", "test_case_severity": "高",
"status": "通过", "status": "通过",
"message": "跳过测试:在API规范中未找到合适的必填查询参数用于移除测试。", "message": "跳过测试:在API规范中未找到合适的必填查询参数用于移除测试。",
"duration_seconds": 0.014146250206977129, "duration_seconds": 0.016664458205923438,
"timestamp": "2025-05-29T16:38:53.069571", "timestamp": "2025-05-29T16:45:26.512857",
"validation_points": [ "validation_points": [
{ {
"passed": true, "passed": true,
@@ -741,9 +762,9 @@
"endpoint_id": "GET /api/dms/{dms_instance_code}/v1/cd_geo_unit/{version}/{id}", "endpoint_id": "GET /api/dms/{dms_instance_code}/v1/cd_geo_unit/{version}/{id}",
"endpoint_name": "地质单元查询详情", "endpoint_name": "地质单元查询详情",
"overall_status": "失败", "overall_status": "失败",
"duration_seconds": 0.113045, "duration_seconds": 0.108735,
"start_time": "2025-05-29T16:38:53.069639", "start_time": "2025-05-29T16:45:26.512925",
"end_time": "2025-05-29T16:38:53.182684", "end_time": "2025-05-29T16:45:26.621660",
"executed_test_cases": [ "executed_test_cases": [
{ {
"test_case_id": "TC-STATUS-001", "test_case_id": "TC-STATUS-001",
@@ -751,8 +772,8 @@
"test_case_severity": "严重", "test_case_severity": "严重",
"status": "通过", "status": "通过",
"message": "响应状态码为 200,符合预期 200。", "message": "响应状态码为 200,符合预期 200。",
"duration_seconds": 0.015057458076626062, "duration_seconds": 0.020550667075440288,
"timestamp": "2025-05-29T16:38:53.084778", "timestamp": "2025-05-29T16:45:26.533561",
"validation_points": [ "validation_points": [
{ {
"passed": true, "passed": true,
@@ -766,8 +787,8 @@
"test_case_severity": "严重", "test_case_severity": "严重",
"status": "通过", "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.", "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.017582334112375975, "duration_seconds": 0.014473499963060021,
"timestamp": "2025-05-29T16:38:53.102420", "timestamp": "2025-05-29T16:45:26.548098",
"validation_points": [ "validation_points": [
{ {
"passed": true, "passed": true,
@@ -781,8 +802,8 @@
"test_case_severity": "严重", "test_case_severity": "严重",
"status": "失败", "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强制策略。", "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.014921833062544465, "duration_seconds": 0.013600457925349474,
"timestamp": "2025-05-29T16:38:53.117404", "timestamp": "2025-05-29T16:45:26.561752",
"validation_points": [ "validation_points": [
{ {
"status_code": 200 "status_code": 200
@@ -795,8 +816,8 @@
"test_case_severity": "中", "test_case_severity": "中",
"status": "通过", "status": "通过",
"message": "跳过测试:在查询参数中未找到合适的字段来测试类型不匹配。", "message": "跳过测试:在查询参数中未找到合适的字段来测试类型不匹配。",
"duration_seconds": 0.01659925002604723, "duration_seconds": 0.013701542047783732,
"timestamp": "2025-05-29T16:38:53.134065", "timestamp": "2025-05-29T16:45:26.575502",
"validation_points": [ "validation_points": [
{ {
"passed": true, "passed": true,
@@ -809,28 +830,21 @@
"test_case_name": "Error Code 4001 - Request Body Type Mismatch Validation", "test_case_name": "Error Code 4001 - Request Body Type Mismatch Validation",
"test_case_severity": "中", "test_case_severity": "中",
"status": "失败", "status": "失败",
"message": "当请求体字段 'isSearchCount' 类型不匹配时,期望API返回状态码在 [400, 422] 中,或返回4xx客户端错误且业务码为 '4001'. 实际收到状态码 200. 响应体中的业务码 ('code') 为 '84'.", "message": "当请求体字段 'isSearchCount' 类型不匹配时,期望API返回状态码在 [400, 422] 中,或返回4xx客户端错误且业务码为 '4001'. 实际收到状态码 200. 响应体中的业务码 ('code') 为 '70'.",
"duration_seconds": 0.015248041832819581, "duration_seconds": 0.016377917025238276,
"timestamp": "2025-05-29T16:38:53.149366", "timestamp": "2025-05-29T16:45:26.591934",
"validation_points": [ "validation_points": [
{ {
"status_code": 200, "status_code": 200,
"response_body": { "response_body": {
"code": 84, "code": 70,
"message": "id in exercitation occaecat", "message": "amet labore ex",
"data": { "data": {
"total": 61, "total": 63,
"list": [ "list": [
{ {
"dsid": "90", "dsid": "44",
"dataRegion": "pariatur esse irure reprehenderit occaecat", "dataRegion": "eiusmod consequat irure Lorem do",
"gasReleaseMon": null,
"gasReleaseYear": null,
"releaseGasCum": null
},
{
"dsid": "68",
"dataRegion": "exercitation non pariatur",
"gasReleaseMon": null, "gasReleaseMon": null,
"gasReleaseYear": null, "gasReleaseYear": null,
"releaseGasCum": null "releaseGasCum": null
@@ -853,8 +867,8 @@
"test_case_severity": "高", "test_case_severity": "高",
"status": "通过", "status": "通过",
"message": "跳过测试:在API规范中未找到合适的必填请求体字段用于移除测试。", "message": "跳过测试:在API规范中未找到合适的必填请求体字段用于移除测试。",
"duration_seconds": 0.013855749974027276, "duration_seconds": 0.013865916058421135,
"timestamp": "2025-05-29T16:38:53.163271", "timestamp": "2025-05-29T16:45:26.605858",
"validation_points": [ "validation_points": [
{ {
"passed": true, "passed": true,
@@ -868,8 +882,8 @@
"test_case_severity": "高", "test_case_severity": "高",
"status": "通过", "status": "通过",
"message": "跳过测试:在API规范中未找到合适的必填查询参数用于移除测试。", "message": "跳过测试:在API规范中未找到合适的必填查询参数用于移除测试。",
"duration_seconds": 0.0193125419318676, "duration_seconds": 0.015692499931901693,
"timestamp": "2025-05-29T16:38:53.182641", "timestamp": "2025-05-29T16:45:26.621611",
"validation_points": [ "validation_points": [
{ {
"passed": true, "passed": true,