mvp
This commit is contained in:
parent
72a52826e6
commit
800efa78ef
8
Makefile
8
Makefile
@ -1,19 +1,17 @@
|
||||
# pyinstaller --name ddms_compliance_tool --onefile main.py
|
||||
|
||||
build:
|
||||
pyinstaller --name ddms_compliance_tool --onefile run_api_tests.py
|
||||
# build:
|
||||
# pyinstaller --name ddms_compliance_tool --onefile run_api_tests.py
|
||||
|
||||
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 \
|
||||
--verbose \
|
||||
--output test_report.json >log.txt 2>&1
|
||||
docker_build:
|
||||
docker run --platform linux/amd64 --rm -v "$(pwd)":/app -w /app amd64/python:3.9-slim-bullseye sh -c "apt-get update && apt-get install -y binutils && pip install --no-cache-dir -r requirements.txt || true && pip install --no-cache-dir pyinstaller && pyinstaller --onefile --noconfirm run_api_tests.py && ./dist/run_api_tests --base-url http://host.docker.internal:4523/m1/6389742-6086420-default --yapi assets/doc/井筒API示例_simple.json --custom-test-cases-dir ./custom_testcases --verbose --output test_report1.json > ./dist/output.txt 2>&1 && chown -R $(id -u):$(id -g) dist build run_api_tests.spec || true"
|
||||
|
||||
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_build_centos:
|
||||
# docker_build_centos:
|
||||
docker run --platform linux/amd64 --rm \
|
||||
-v "$(pwd)":/app -w /app \
|
||||
centos:8 \
|
||||
|
||||
3445
api_calls.md
3445
api_calls.md
File diff suppressed because it is too large
Load Diff
337
test_report.json
337
test_report.json
@ -1,8 +1,8 @@
|
||||
{
|
||||
"summary_metadata": {
|
||||
"start_time": "2025-05-28T17:59:13.671258",
|
||||
"end_time": "2025-05-28T17:59:14.471277",
|
||||
"duration_seconds": "0.80"
|
||||
"start_time": "2025-05-29T16:38:51.856094",
|
||||
"end_time": "2025-05-29T16:38:53.182703",
|
||||
"duration_seconds": "1.33"
|
||||
},
|
||||
"endpoint_stats": {
|
||||
"total_defined": 6,
|
||||
@ -28,9 +28,9 @@
|
||||
"endpoint_id": "POST /api/dms/{dms_instance_code}/v1/message/push/{schema}/{version}",
|
||||
"endpoint_name": "数据推送接口",
|
||||
"overall_status": "失败",
|
||||
"duration_seconds": 0.206858,
|
||||
"start_time": "2025-05-28T17:59:13.671568",
|
||||
"end_time": "2025-05-28T17:59:13.878426",
|
||||
"duration_seconds": 0.578975,
|
||||
"start_time": "2025-05-29T16:38:51.856404",
|
||||
"end_time": "2025-05-29T16:38:52.435379",
|
||||
"executed_test_cases": [
|
||||
{
|
||||
"test_case_id": "TC-STATUS-001",
|
||||
@ -38,8 +38,8 @@
|
||||
"test_case_severity": "严重",
|
||||
"status": "通过",
|
||||
"message": "响应状态码为 200,符合预期 200。",
|
||||
"duration_seconds": 0.08009795797988772,
|
||||
"timestamp": "2025-05-28T17:59:13.751743",
|
||||
"duration_seconds": 0.31512458296492696,
|
||||
"timestamp": "2025-05-29T16:38:52.171611",
|
||||
"validation_points": [
|
||||
{
|
||||
"passed": true,
|
||||
@ -53,8 +53,8 @@
|
||||
"test_case_severity": "严重",
|
||||
"status": "通过",
|
||||
"message": "Schema验证步骤完成(未发现问题,或schema不适用/未为此响应定义)。",
|
||||
"duration_seconds": 0.03352837497368455,
|
||||
"timestamp": "2025-05-28T17:59:13.785376",
|
||||
"duration_seconds": 0.0580080000218004,
|
||||
"timestamp": "2025-05-29T16:38:52.229929",
|
||||
"validation_points": [
|
||||
{
|
||||
"passed": true,
|
||||
@ -68,8 +68,8 @@
|
||||
"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.021860582986846566,
|
||||
"timestamp": "2025-05-28T17:59:13.807302",
|
||||
"duration_seconds": 0.047522042179480195,
|
||||
"timestamp": "2025-05-29T16:38:52.277613",
|
||||
"validation_points": [
|
||||
{
|
||||
"status_code": 200
|
||||
@ -82,8 +82,8 @@
|
||||
"test_case_severity": "中",
|
||||
"status": "通过",
|
||||
"message": "跳过测试:在查询参数中未找到合适的字段来测试类型不匹配。",
|
||||
"duration_seconds": 0.017771000042557716,
|
||||
"timestamp": "2025-05-28T17:59:13.825130",
|
||||
"duration_seconds": 0.08462537499144673,
|
||||
"timestamp": "2025-05-29T16:38:52.362387",
|
||||
"validation_points": [
|
||||
{
|
||||
"passed": true,
|
||||
@ -96,28 +96,21 @@
|
||||
"test_case_name": "Error Code 4001 - Request Body Type Mismatch Validation",
|
||||
"test_case_severity": "中",
|
||||
"status": "失败",
|
||||
"message": "当请求体字段 'isSearchCount' 类型不匹配时,期望API返回状态码在 [400, 422] 中,或返回4xx客户端错误且业务码为 '4001'. 实际收到状态码 200. 响应体中的业务码 ('code') 为 '67'.",
|
||||
"duration_seconds": 0.017901666928082705,
|
||||
"timestamp": "2025-05-28T17:59:13.843088",
|
||||
"message": "当请求体字段 'isSearchCount' 类型不匹配时,期望API返回状态码在 [400, 422] 中,或返回4xx客户端错误且业务码为 '4001'. 实际收到状态码 200. 响应体中的业务码 ('code') 为 '5'.",
|
||||
"duration_seconds": 0.024353125132620335,
|
||||
"timestamp": "2025-05-29T16:38:52.387005",
|
||||
"validation_points": [
|
||||
{
|
||||
"status_code": 200,
|
||||
"response_body": {
|
||||
"code": 67,
|
||||
"message": "dolor Lorem",
|
||||
"code": 5,
|
||||
"message": "Excepteur consectetur labore tempor",
|
||||
"data": {
|
||||
"total": 17,
|
||||
"total": 48,
|
||||
"list": [
|
||||
{
|
||||
"dsid": "23",
|
||||
"dataRegion": "occaecat pariatur tempor labore",
|
||||
"gasReleaseMon": null,
|
||||
"gasReleaseYear": null,
|
||||
"releaseGasCum": null
|
||||
},
|
||||
{
|
||||
"dsid": "98",
|
||||
"dataRegion": "in Ut qui reprehenderit",
|
||||
"dsid": "77",
|
||||
"dataRegion": "sed laborum et dolor",
|
||||
"gasReleaseMon": null,
|
||||
"gasReleaseYear": null,
|
||||
"releaseGasCum": null
|
||||
@ -140,8 +133,8 @@
|
||||
"test_case_severity": "高",
|
||||
"status": "通过",
|
||||
"message": "跳过测试:在API规范中未找到合适的必填请求体字段用于移除测试。",
|
||||
"duration_seconds": 0.017153542023152113,
|
||||
"timestamp": "2025-05-28T17:59:13.860296",
|
||||
"duration_seconds": 0.02168962499126792,
|
||||
"timestamp": "2025-05-29T16:38:52.408822",
|
||||
"validation_points": [
|
||||
{
|
||||
"passed": true,
|
||||
@ -155,8 +148,8 @@
|
||||
"test_case_severity": "高",
|
||||
"status": "通过",
|
||||
"message": "跳过测试:在API规范中未找到合适的必填查询参数用于移除测试。",
|
||||
"duration_seconds": 0.017964709084481,
|
||||
"timestamp": "2025-05-28T17:59:13.878330",
|
||||
"duration_seconds": 0.026100416900590062,
|
||||
"timestamp": "2025-05-29T16:38:52.435209",
|
||||
"validation_points": [
|
||||
{
|
||||
"passed": true,
|
||||
@ -170,9 +163,9 @@
|
||||
"endpoint_id": "POST /api/dms/{dms_instance_code}/v1/cd_geo_unit/{version}",
|
||||
"endpoint_name": "地质单元列表查询",
|
||||
"overall_status": "失败",
|
||||
"duration_seconds": 0.132677,
|
||||
"start_time": "2025-05-28T17:59:13.878512",
|
||||
"end_time": "2025-05-28T17:59:14.011189",
|
||||
"duration_seconds": 0.192345,
|
||||
"start_time": "2025-05-29T16:38:52.435520",
|
||||
"end_time": "2025-05-29T16:38:52.627865",
|
||||
"executed_test_cases": [
|
||||
{
|
||||
"test_case_id": "TC-STATUS-001",
|
||||
@ -180,8 +173,8 @@
|
||||
"test_case_severity": "严重",
|
||||
"status": "通过",
|
||||
"message": "响应状态码为 200,符合预期 200。",
|
||||
"duration_seconds": 0.021538167027756572,
|
||||
"timestamp": "2025-05-28T17:59:13.900275",
|
||||
"duration_seconds": 0.028909082990139723,
|
||||
"timestamp": "2025-05-29T16:38:52.464841",
|
||||
"validation_points": [
|
||||
{
|
||||
"passed": true,
|
||||
@ -195,8 +188,8 @@
|
||||
"test_case_severity": "严重",
|
||||
"status": "通过",
|
||||
"message": "Schema验证步骤完成(未发现问题,或schema不适用/未为此响应定义)。",
|
||||
"duration_seconds": 0.024534499971196055,
|
||||
"timestamp": "2025-05-28T17:59:13.924870",
|
||||
"duration_seconds": 0.01859383308328688,
|
||||
"timestamp": "2025-05-29T16:38:52.483729",
|
||||
"validation_points": [
|
||||
{
|
||||
"passed": true,
|
||||
@ -210,8 +203,8 @@
|
||||
"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.018628000048920512,
|
||||
"timestamp": "2025-05-28T17:59:13.943551",
|
||||
"duration_seconds": 0.021226000040769577,
|
||||
"timestamp": "2025-05-29T16:38:52.505199",
|
||||
"validation_points": [
|
||||
{
|
||||
"status_code": 200
|
||||
@ -223,35 +216,21 @@
|
||||
"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') 为 '81'.",
|
||||
"duration_seconds": 0.017331124981865287,
|
||||
"timestamp": "2025-05-28T17:59:13.960937",
|
||||
"message": "当查询参数 'pageNo' (路径: 'pageNo') 类型不匹配时,期望API返回状态码在 [400, 422] 中,或返回4xx客户端错误且业务码为 '4001'. 实际收到状态码 200. 响应体中的业务码 ('code') 为 '24'.",
|
||||
"duration_seconds": 0.028693499974906445,
|
||||
"timestamp": "2025-05-29T16:38:52.534166",
|
||||
"validation_points": [
|
||||
{
|
||||
"status_code": 200,
|
||||
"response_body": {
|
||||
"code": 81,
|
||||
"message": "do",
|
||||
"code": 24,
|
||||
"message": "incididunt esse",
|
||||
"data": {
|
||||
"total": 16,
|
||||
"total": 81,
|
||||
"list": [
|
||||
{
|
||||
"dsid": "48",
|
||||
"dataRegion": "id ex aute dolore laboris",
|
||||
"gasReleaseMon": null,
|
||||
"gasReleaseYear": null,
|
||||
"releaseGasCum": null
|
||||
},
|
||||
{
|
||||
"dsid": "89",
|
||||
"dataRegion": "do culpa magna Duis",
|
||||
"gasReleaseMon": null,
|
||||
"gasReleaseYear": null,
|
||||
"releaseGasCum": null
|
||||
},
|
||||
{
|
||||
"dsid": "21",
|
||||
"dataRegion": "non elit",
|
||||
"dsid": "56",
|
||||
"dataRegion": "anim proident adipisicing sit",
|
||||
"gasReleaseMon": null,
|
||||
"gasReleaseYear": null,
|
||||
"releaseGasCum": null
|
||||
@ -273,21 +252,21 @@
|
||||
"test_case_name": "Error Code 4001 - Request Body Type Mismatch Validation",
|
||||
"test_case_severity": "中",
|
||||
"status": "失败",
|
||||
"message": "当请求体字段 'isSearchCount' 类型不匹配时,期望API返回状态码在 [400, 422] 中,或返回4xx客户端错误且业务码为 '4001'. 实际收到状态码 200. 响应体中的业务码 ('code') 为 '64'.",
|
||||
"duration_seconds": 0.017100458033382893,
|
||||
"timestamp": "2025-05-28T17:59:13.978086",
|
||||
"message": "当请求体字段 'isSearchCount' 类型不匹配时,期望API返回状态码在 [400, 422] 中,或返回4xx客户端错误且业务码为 '4001'. 实际收到状态码 200. 响应体中的业务码 ('code') 为 '46'.",
|
||||
"duration_seconds": 0.023574707796797156,
|
||||
"timestamp": "2025-05-29T16:38:52.558008",
|
||||
"validation_points": [
|
||||
{
|
||||
"status_code": 200,
|
||||
"response_body": {
|
||||
"code": 64,
|
||||
"message": "cupidatat Lorem",
|
||||
"code": 46,
|
||||
"message": "sint in quis fugiat",
|
||||
"data": {
|
||||
"total": 16,
|
||||
"total": 56,
|
||||
"list": [
|
||||
{
|
||||
"dsid": "96",
|
||||
"dataRegion": "velit id",
|
||||
"dsid": "47",
|
||||
"dataRegion": "in id non qui",
|
||||
"gasReleaseMon": null,
|
||||
"gasReleaseYear": null,
|
||||
"releaseGasCum": null
|
||||
@ -310,8 +289,8 @@
|
||||
"test_case_severity": "高",
|
||||
"status": "通过",
|
||||
"message": "跳过测试:在API规范中未找到合适的必填请求体字段用于移除测试。",
|
||||
"duration_seconds": 0.015624208841472864,
|
||||
"timestamp": "2025-05-28T17:59:13.993772",
|
||||
"duration_seconds": 0.019619707949459553,
|
||||
"timestamp": "2025-05-29T16:38:52.577781",
|
||||
"validation_points": [
|
||||
{
|
||||
"passed": true,
|
||||
@ -325,8 +304,8 @@
|
||||
"test_case_severity": "高",
|
||||
"status": "通过",
|
||||
"message": "跳过测试:在API规范中未找到合适的必填查询参数用于移除测试。",
|
||||
"duration_seconds": 0.017309916904196143,
|
||||
"timestamp": "2025-05-28T17:59:14.011145",
|
||||
"duration_seconds": 0.04977562488056719,
|
||||
"timestamp": "2025-05-29T16:38:52.627767",
|
||||
"validation_points": [
|
||||
{
|
||||
"passed": true,
|
||||
@ -340,9 +319,9 @@
|
||||
"endpoint_id": "PUT /api/dms/{dms_instance_code}/v1/cd_geo_unit",
|
||||
"endpoint_name": "地质单元数据修改",
|
||||
"overall_status": "失败",
|
||||
"duration_seconds": 0.110519,
|
||||
"start_time": "2025-05-28T17:59:14.011219",
|
||||
"end_time": "2025-05-28T17:59:14.121738",
|
||||
"duration_seconds": 0.199101,
|
||||
"start_time": "2025-05-29T16:38:52.627944",
|
||||
"end_time": "2025-05-29T16:38:52.827045",
|
||||
"executed_test_cases": [
|
||||
{
|
||||
"test_case_id": "TC-STATUS-001",
|
||||
@ -350,8 +329,8 @@
|
||||
"test_case_severity": "严重",
|
||||
"status": "通过",
|
||||
"message": "响应状态码为 200,符合预期 200。",
|
||||
"duration_seconds": 0.015310167102143168,
|
||||
"timestamp": "2025-05-28T17:59:14.026622",
|
||||
"duration_seconds": 0.07733883312903345,
|
||||
"timestamp": "2025-05-29T16:38:52.705528",
|
||||
"validation_points": [
|
||||
{
|
||||
"passed": true,
|
||||
@ -365,8 +344,8 @@
|
||||
"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.019677208038046956,
|
||||
"timestamp": "2025-05-28T17:59:14.046352",
|
||||
"duration_seconds": 0.026119209127500653,
|
||||
"timestamp": "2025-05-29T16:38:52.731704",
|
||||
"validation_points": [
|
||||
{
|
||||
"passed": true,
|
||||
@ -380,8 +359,8 @@
|
||||
"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.014963624998927116,
|
||||
"timestamp": "2025-05-28T17:59:14.061385",
|
||||
"duration_seconds": 0.01827866700477898,
|
||||
"timestamp": "2025-05-29T16:38:52.750047",
|
||||
"validation_points": [
|
||||
{
|
||||
"status_code": 200
|
||||
@ -393,16 +372,16 @@
|
||||
"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') 为 '61'.",
|
||||
"duration_seconds": 0.014795458177104592,
|
||||
"timestamp": "2025-05-28T17:59:14.076230",
|
||||
"message": "当查询参数 'id' (路径: 'id') 类型不匹配时,期望API返回状态码在 [400, 422] 中,或返回4xx客户端错误且业务码为 '4001'. 实际收到状态码 200. 响应体中的业务码 ('code') 为 '9'.",
|
||||
"duration_seconds": 0.015486499993130565,
|
||||
"timestamp": "2025-05-29T16:38:52.765588",
|
||||
"validation_points": [
|
||||
{
|
||||
"status_code": 200,
|
||||
"response_body": {
|
||||
"code": 61,
|
||||
"message": "irure non in",
|
||||
"data": false
|
||||
"code": 9,
|
||||
"message": "quis in enim magna culpa",
|
||||
"data": true
|
||||
},
|
||||
"expected_http_status_codes": [
|
||||
400,
|
||||
@ -418,15 +397,15 @@
|
||||
"test_case_name": "Error Code 4001 - Request Body Type Mismatch Validation",
|
||||
"test_case_severity": "中",
|
||||
"status": "失败",
|
||||
"message": "当请求体字段 'id' 类型不匹配时,期望API返回状态码在 [400, 422] 中,或返回4xx客户端错误且业务码为 '4001'. 实际收到状态码 200. 响应体中的业务码 ('code') 为 '38'.",
|
||||
"duration_seconds": 0.015496833017095923,
|
||||
"timestamp": "2025-05-28T17:59:14.091774",
|
||||
"message": "当请求体字段 'id' 类型不匹配时,期望API返回状态码在 [400, 422] 中,或返回4xx客户端错误且业务码为 '4001'. 实际收到状态码 200. 响应体中的业务码 ('code') 为 '90'.",
|
||||
"duration_seconds": 0.029123959131538868,
|
||||
"timestamp": "2025-05-29T16:38:52.794759",
|
||||
"validation_points": [
|
||||
{
|
||||
"status_code": 200,
|
||||
"response_body": {
|
||||
"code": 38,
|
||||
"message": "nulla Excepteur non velit id",
|
||||
"code": 90,
|
||||
"message": "reprehenderit in id sed consequat",
|
||||
"data": false
|
||||
},
|
||||
"expected_http_status_codes": [
|
||||
@ -444,8 +423,8 @@
|
||||
"test_case_severity": "高",
|
||||
"status": "通过",
|
||||
"message": "当移除必填请求体字段 'id' 时,API响应了状态码 200 (非主要预期HTTP状态 [400, 422],但为4xx客户端错误), 且响应体中包含预期的业务错误码 '4003' (字段: 'code').",
|
||||
"duration_seconds": 0.016006666934117675,
|
||||
"timestamp": "2025-05-28T17:59:14.107824",
|
||||
"duration_seconds": 0.01860508299432695,
|
||||
"timestamp": "2025-05-29T16:38:52.813417",
|
||||
"validation_points": [
|
||||
{
|
||||
"passed": true,
|
||||
@ -458,15 +437,15 @@
|
||||
"test_case_name": "Error Code 4003 - Missing Required Query Parameter Validation",
|
||||
"test_case_severity": "高",
|
||||
"status": "失败",
|
||||
"message": "当移除必填查询参数 'id' 时,期望API返回状态码在 [400, 422] 中,或返回4xx客户端错误且业务码为 '4003'. 实际收到状态码 200. 响应体中的业务码 ('code') 为 '95'.",
|
||||
"duration_seconds": 0.01381899998523295,
|
||||
"timestamp": "2025-05-28T17:59:14.121703",
|
||||
"message": "当移除必填查询参数 'id' 时,期望API返回状态码在 [400, 422] 中,或返回4xx客户端错误且业务码为 '4003'. 实际收到状态码 200. 响应体中的业务码 ('code') 为 '29'.",
|
||||
"duration_seconds": 0.013537416933104396,
|
||||
"timestamp": "2025-05-29T16:38:52.827010",
|
||||
"validation_points": [
|
||||
{
|
||||
"status_code": 200,
|
||||
"response_body": {
|
||||
"code": 95,
|
||||
"message": "dolore esse voluptate aute adipisicing",
|
||||
"code": 29,
|
||||
"message": "consequat magna nostrud occaecat",
|
||||
"data": false
|
||||
},
|
||||
"expected_http_status_codes": [
|
||||
@ -484,9 +463,9 @@
|
||||
"endpoint_id": "DELETE /api/dms/{dms_instance_code}/v1/cd_geo_unit",
|
||||
"endpoint_name": "地质单元数据删除",
|
||||
"overall_status": "失败",
|
||||
"duration_seconds": 0.116716,
|
||||
"start_time": "2025-05-28T17:59:14.121767",
|
||||
"end_time": "2025-05-28T17:59:14.238483",
|
||||
"duration_seconds": 0.13411,
|
||||
"start_time": "2025-05-29T16:38:52.827071",
|
||||
"end_time": "2025-05-29T16:38:52.961181",
|
||||
"executed_test_cases": [
|
||||
{
|
||||
"test_case_id": "TC-STATUS-001",
|
||||
@ -494,8 +473,8 @@
|
||||
"test_case_severity": "严重",
|
||||
"status": "通过",
|
||||
"message": "响应状态码为 200,符合预期 200。",
|
||||
"duration_seconds": 0.017570124939084053,
|
||||
"timestamp": "2025-05-28T17:59:14.139420",
|
||||
"duration_seconds": 0.014969042036682367,
|
||||
"timestamp": "2025-05-29T16:38:52.842123",
|
||||
"validation_points": [
|
||||
{
|
||||
"passed": true,
|
||||
@ -509,8 +488,8 @@
|
||||
"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.013965875143185258,
|
||||
"timestamp": "2025-05-28T17:59:14.153442",
|
||||
"duration_seconds": 0.02638737508095801,
|
||||
"timestamp": "2025-05-29T16:38:52.868569",
|
||||
"validation_points": [
|
||||
{
|
||||
"passed": true,
|
||||
@ -524,8 +503,8 @@
|
||||
"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.015133625129237771,
|
||||
"timestamp": "2025-05-28T17:59:14.168629",
|
||||
"duration_seconds": 0.017909541027620435,
|
||||
"timestamp": "2025-05-29T16:38:52.886534",
|
||||
"validation_points": [
|
||||
{
|
||||
"status_code": 200
|
||||
@ -537,16 +516,16 @@
|
||||
"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') 为 '86'.",
|
||||
"duration_seconds": 0.022381666116416454,
|
||||
"timestamp": "2025-05-28T17:59:14.191131",
|
||||
"message": "当查询参数 'id' (路径: 'id') 类型不匹配时,期望API返回状态码在 [400, 422] 中,或返回4xx客户端错误且业务码为 '4001'. 实际收到状态码 200. 响应体中的业务码 ('code') 为 '23'.",
|
||||
"duration_seconds": 0.023657166864722967,
|
||||
"timestamp": "2025-05-29T16:38:52.910250",
|
||||
"validation_points": [
|
||||
{
|
||||
"status_code": 200,
|
||||
"response_body": {
|
||||
"code": 86,
|
||||
"message": "ipsum esse",
|
||||
"data": false
|
||||
"code": 23,
|
||||
"message": "deserunt",
|
||||
"data": true
|
||||
},
|
||||
"expected_http_status_codes": [
|
||||
400,
|
||||
@ -562,15 +541,15 @@
|
||||
"test_case_name": "Error Code 4001 - Request Body Type Mismatch Validation",
|
||||
"test_case_severity": "中",
|
||||
"status": "失败",
|
||||
"message": "当请求体字段 'version' 类型不匹配时,期望API返回状态码在 [400, 422] 中,或返回4xx客户端错误且业务码为 '4001'. 实际收到状态码 200. 响应体中的业务码 ('code') 为 '11'.",
|
||||
"duration_seconds": 0.015292458003386855,
|
||||
"timestamp": "2025-05-28T17:59:14.206531",
|
||||
"message": "当请求体字段 'version' 类型不匹配时,期望API返回状态码在 [400, 422] 中,或返回4xx客户端错误且业务码为 '4001'. 实际收到状态码 200. 响应体中的业务码 ('code') 为 '58'.",
|
||||
"duration_seconds": 0.014851915882900357,
|
||||
"timestamp": "2025-05-29T16:38:52.925152",
|
||||
"validation_points": [
|
||||
{
|
||||
"status_code": 200,
|
||||
"response_body": {
|
||||
"code": 11,
|
||||
"message": "id dolor",
|
||||
"code": 58,
|
||||
"message": "reprehenderit quis in ut",
|
||||
"data": false
|
||||
},
|
||||
"expected_http_status_codes": [
|
||||
@ -588,8 +567,8 @@
|
||||
"test_case_severity": "高",
|
||||
"status": "通过",
|
||||
"message": "跳过测试:在API规范中未找到合适的必填请求体字段用于移除测试。",
|
||||
"duration_seconds": 0.015733457868918777,
|
||||
"timestamp": "2025-05-28T17:59:14.222393",
|
||||
"duration_seconds": 0.013341292040422559,
|
||||
"timestamp": "2025-05-29T16:38:52.938550",
|
||||
"validation_points": [
|
||||
{
|
||||
"passed": true,
|
||||
@ -602,16 +581,16 @@
|
||||
"test_case_name": "Error Code 4003 - Missing Required Query Parameter Validation",
|
||||
"test_case_severity": "高",
|
||||
"status": "失败",
|
||||
"message": "当移除必填查询参数 'id' 时,期望API返回状态码在 [400, 422] 中,或返回4xx客户端错误且业务码为 '4003'. 实际收到状态码 200. 响应体中的业务码 ('code') 为 '52'.",
|
||||
"duration_seconds": 0.015788417076691985,
|
||||
"timestamp": "2025-05-28T17:59:14.238332",
|
||||
"message": "当移除必填查询参数 'id' 时,期望API返回状态码在 [400, 422] 中,或返回4xx客户端错误且业务码为 '4003'. 实际收到状态码 200. 响应体中的业务码 ('code') 为 '97'.",
|
||||
"duration_seconds": 0.0225362500641495,
|
||||
"timestamp": "2025-05-29T16:38:52.961142",
|
||||
"validation_points": [
|
||||
{
|
||||
"status_code": 200,
|
||||
"response_body": {
|
||||
"code": 52,
|
||||
"message": "cillum anim culpa",
|
||||
"data": true
|
||||
"code": 97,
|
||||
"message": "ut voluptate",
|
||||
"data": false
|
||||
},
|
||||
"expected_http_status_codes": [
|
||||
400,
|
||||
@ -628,9 +607,9 @@
|
||||
"endpoint_id": "POST /api/dms/{dms_instance_code}/v1/cd_geo_unit",
|
||||
"endpoint_name": "地质单元数据添加",
|
||||
"overall_status": "失败",
|
||||
"duration_seconds": 0.111679,
|
||||
"start_time": "2025-05-28T17:59:14.239230",
|
||||
"end_time": "2025-05-28T17:59:14.350909",
|
||||
"duration_seconds": 0.108396,
|
||||
"start_time": "2025-05-29T16:38:52.961214",
|
||||
"end_time": "2025-05-29T16:38:53.069610",
|
||||
"executed_test_cases": [
|
||||
{
|
||||
"test_case_id": "TC-STATUS-001",
|
||||
@ -638,8 +617,8 @@
|
||||
"test_case_severity": "严重",
|
||||
"status": "通过",
|
||||
"message": "响应状态码为 200,符合预期 200。",
|
||||
"duration_seconds": 0.016218916978687048,
|
||||
"timestamp": "2025-05-28T17:59:14.255765",
|
||||
"duration_seconds": 0.018137291073799133,
|
||||
"timestamp": "2025-05-29T16:38:52.979514",
|
||||
"validation_points": [
|
||||
{
|
||||
"passed": true,
|
||||
@ -653,8 +632,8 @@
|
||||
"test_case_severity": "严重",
|
||||
"status": "通过",
|
||||
"message": "Schema验证步骤完成(未发现问题,或schema不适用/未为此响应定义)。",
|
||||
"duration_seconds": 0.018145665992051363,
|
||||
"timestamp": "2025-05-28T17:59:14.274060",
|
||||
"duration_seconds": 0.013638167176395655,
|
||||
"timestamp": "2025-05-29T16:38:52.993197",
|
||||
"validation_points": [
|
||||
{
|
||||
"passed": true,
|
||||
@ -668,8 +647,8 @@
|
||||
"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.020375542109832168,
|
||||
"timestamp": "2025-05-28T17:59:14.294582",
|
||||
"duration_seconds": 0.014288584003224969,
|
||||
"timestamp": "2025-05-29T16:38:53.007531",
|
||||
"validation_points": [
|
||||
{
|
||||
"status_code": 200
|
||||
@ -682,8 +661,8 @@
|
||||
"test_case_severity": "中",
|
||||
"status": "通过",
|
||||
"message": "跳过测试:在查询参数中未找到合适的字段来测试类型不匹配。",
|
||||
"duration_seconds": 0.015486791031435132,
|
||||
"timestamp": "2025-05-28T17:59:14.310124",
|
||||
"duration_seconds": 0.013313875067979097,
|
||||
"timestamp": "2025-05-29T16:38:53.020894",
|
||||
"validation_points": [
|
||||
{
|
||||
"passed": true,
|
||||
@ -696,15 +675,15 @@
|
||||
"test_case_name": "Error Code 4001 - Request Body Type Mismatch Validation",
|
||||
"test_case_severity": "中",
|
||||
"status": "失败",
|
||||
"message": "当请求体字段 'version' 类型不匹配时,期望API返回状态码在 [400, 422] 中,或返回4xx客户端错误且业务码为 '4001'. 实际收到状态码 200. 响应体中的业务码 ('code') 为 '64'.",
|
||||
"duration_seconds": 0.01395920803770423,
|
||||
"timestamp": "2025-05-28T17:59:14.324133",
|
||||
"message": "当请求体字段 'version' 类型不匹配时,期望API返回状态码在 [400, 422] 中,或返回4xx客户端错误且业务码为 '4001'. 实际收到状态码 200. 响应体中的业务码 ('code') 为 '52'.",
|
||||
"duration_seconds": 0.01988679193891585,
|
||||
"timestamp": "2025-05-29T16:38:53.040825",
|
||||
"validation_points": [
|
||||
{
|
||||
"status_code": 200,
|
||||
"response_body": {
|
||||
"code": 64,
|
||||
"message": "cillum non do enim",
|
||||
"code": 52,
|
||||
"message": "proident Ut ea ullamco",
|
||||
"data": true
|
||||
},
|
||||
"expected_http_status_codes": [
|
||||
@ -721,15 +700,15 @@
|
||||
"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') 为 '41'.",
|
||||
"duration_seconds": 0.013345874845981598,
|
||||
"timestamp": "2025-05-28T17:59:14.337527",
|
||||
"message": "当移除必填请求体字段 'data.0.bsflag' 时,期望API返回状态码在 [400, 422] 中,或返回4xx客户端错误且业务码为 '4003'. 实际收到状态码 200. 响应体中的业务码 ('code') 为 '49'.",
|
||||
"duration_seconds": 0.01450737495906651,
|
||||
"timestamp": "2025-05-29T16:38:53.055380",
|
||||
"validation_points": [
|
||||
{
|
||||
"status_code": 200,
|
||||
"response_body": {
|
||||
"code": 41,
|
||||
"message": "non dolor velit voluptate",
|
||||
"code": 49,
|
||||
"message": "id",
|
||||
"data": true
|
||||
},
|
||||
"expected_http_status_codes": [
|
||||
@ -747,8 +726,8 @@
|
||||
"test_case_severity": "高",
|
||||
"status": "通过",
|
||||
"message": "跳过测试:在API规范中未找到合适的必填查询参数用于移除测试。",
|
||||
"duration_seconds": 0.013294416014105082,
|
||||
"timestamp": "2025-05-28T17:59:14.350870",
|
||||
"duration_seconds": 0.014146250206977129,
|
||||
"timestamp": "2025-05-29T16:38:53.069571",
|
||||
"validation_points": [
|
||||
{
|
||||
"passed": true,
|
||||
@ -762,9 +741,9 @@
|
||||
"endpoint_id": "GET /api/dms/{dms_instance_code}/v1/cd_geo_unit/{version}/{id}",
|
||||
"endpoint_name": "地质单元查询详情",
|
||||
"overall_status": "失败",
|
||||
"duration_seconds": 0.120317,
|
||||
"start_time": "2025-05-28T17:59:14.350939",
|
||||
"end_time": "2025-05-28T17:59:14.471256",
|
||||
"duration_seconds": 0.113045,
|
||||
"start_time": "2025-05-29T16:38:53.069639",
|
||||
"end_time": "2025-05-29T16:38:53.182684",
|
||||
"executed_test_cases": [
|
||||
{
|
||||
"test_case_id": "TC-STATUS-001",
|
||||
@ -772,8 +751,8 @@
|
||||
"test_case_severity": "严重",
|
||||
"status": "通过",
|
||||
"message": "响应状态码为 200,符合预期 200。",
|
||||
"duration_seconds": 0.016830084146931767,
|
||||
"timestamp": "2025-05-28T17:59:14.367858",
|
||||
"duration_seconds": 0.015057458076626062,
|
||||
"timestamp": "2025-05-29T16:38:53.084778",
|
||||
"validation_points": [
|
||||
{
|
||||
"passed": true,
|
||||
@ -787,8 +766,8 @@
|
||||
"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.020835916977375746,
|
||||
"timestamp": "2025-05-28T17:59:14.388744",
|
||||
"duration_seconds": 0.017582334112375975,
|
||||
"timestamp": "2025-05-29T16:38:53.102420",
|
||||
"validation_points": [
|
||||
{
|
||||
"passed": true,
|
||||
@ -802,8 +781,8 @@
|
||||
"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.015508499927818775,
|
||||
"timestamp": "2025-05-28T17:59:14.404316",
|
||||
"duration_seconds": 0.014921833062544465,
|
||||
"timestamp": "2025-05-29T16:38:53.117404",
|
||||
"validation_points": [
|
||||
{
|
||||
"status_code": 200
|
||||
@ -816,8 +795,8 @@
|
||||
"test_case_severity": "中",
|
||||
"status": "通过",
|
||||
"message": "跳过测试:在查询参数中未找到合适的字段来测试类型不匹配。",
|
||||
"duration_seconds": 0.016546707833185792,
|
||||
"timestamp": "2025-05-28T17:59:14.420922",
|
||||
"duration_seconds": 0.01659925002604723,
|
||||
"timestamp": "2025-05-29T16:38:53.134065",
|
||||
"validation_points": [
|
||||
{
|
||||
"passed": true,
|
||||
@ -830,28 +809,28 @@
|
||||
"test_case_name": "Error Code 4001 - Request Body Type Mismatch Validation",
|
||||
"test_case_severity": "中",
|
||||
"status": "失败",
|
||||
"message": "当请求体字段 'isSearchCount' 类型不匹配时,期望API返回状态码在 [400, 422] 中,或返回4xx客户端错误且业务码为 '4001'. 实际收到状态码 200. 响应体中的业务码 ('code') 为 '96'.",
|
||||
"duration_seconds": 0.015827207826077938,
|
||||
"timestamp": "2025-05-28T17:59:14.436804",
|
||||
"message": "当请求体字段 'isSearchCount' 类型不匹配时,期望API返回状态码在 [400, 422] 中,或返回4xx客户端错误且业务码为 '4001'. 实际收到状态码 200. 响应体中的业务码 ('code') 为 '84'.",
|
||||
"duration_seconds": 0.015248041832819581,
|
||||
"timestamp": "2025-05-29T16:38:53.149366",
|
||||
"validation_points": [
|
||||
{
|
||||
"status_code": 200,
|
||||
"response_body": {
|
||||
"code": 96,
|
||||
"message": "magna non",
|
||||
"code": 84,
|
||||
"message": "id in exercitation occaecat",
|
||||
"data": {
|
||||
"total": 80,
|
||||
"total": 61,
|
||||
"list": [
|
||||
{
|
||||
"dsid": "8",
|
||||
"dataRegion": "sit incididunt",
|
||||
"dsid": "90",
|
||||
"dataRegion": "pariatur esse irure reprehenderit occaecat",
|
||||
"gasReleaseMon": null,
|
||||
"gasReleaseYear": null,
|
||||
"releaseGasCum": null
|
||||
},
|
||||
{
|
||||
"dsid": "85",
|
||||
"dataRegion": "Ut id magna est",
|
||||
"dsid": "68",
|
||||
"dataRegion": "exercitation non pariatur",
|
||||
"gasReleaseMon": null,
|
||||
"gasReleaseYear": null,
|
||||
"releaseGasCum": null
|
||||
@ -874,8 +853,8 @@
|
||||
"test_case_severity": "高",
|
||||
"status": "通过",
|
||||
"message": "跳过测试:在API规范中未找到合适的必填请求体字段用于移除测试。",
|
||||
"duration_seconds": 0.016689875163137913,
|
||||
"timestamp": "2025-05-28T17:59:14.453719",
|
||||
"duration_seconds": 0.013855749974027276,
|
||||
"timestamp": "2025-05-29T16:38:53.163271",
|
||||
"validation_points": [
|
||||
{
|
||||
"passed": true,
|
||||
@ -889,8 +868,8 @@
|
||||
"test_case_severity": "高",
|
||||
"status": "通过",
|
||||
"message": "跳过测试:在API规范中未找到合适的必填查询参数用于移除测试。",
|
||||
"duration_seconds": 0.01742037502117455,
|
||||
"timestamp": "2025-05-28T17:59:14.471207",
|
||||
"duration_seconds": 0.0193125419318676,
|
||||
"timestamp": "2025-05-29T16:38:53.182641",
|
||||
"validation_points": [
|
||||
{
|
||||
"passed": true,
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user