feat信贷客户家庭关系
This commit is contained in:
58
doc/test-scripts/batch-create-test-data.bat
Normal file
58
doc/test-scripts/batch-create-test-data.bat
Normal file
@@ -0,0 +1,58 @@
|
||||
@echo off
|
||||
REM ========================================
|
||||
REM 批量创建信贷客户家庭关系测试数据
|
||||
REM ========================================
|
||||
|
||||
setlocal EnableDelayedExpansion
|
||||
|
||||
echo ========================================
|
||||
echo 批量创建信贷客户家庭关系测试数据
|
||||
echo ========================================
|
||||
echo.
|
||||
|
||||
set BASE_URL=http://localhost:8080
|
||||
|
||||
REM 步骤1: 登录获取token
|
||||
echo [1/2] 正在登录...
|
||||
curl -s -X POST "%BASE_URL%/login/test" ^
|
||||
-H "Content-Type: application/json" ^
|
||||
-d "{\"username\":\"admin\",\"password\":\"admin123\"}" ^
|
||||
> login_response.json
|
||||
|
||||
powershell -Command "$json = Get-Content login_response.json -Raw | ConvertFrom-Json; $token = $json.token; Set-Content -Path token.txt -Value $token"
|
||||
|
||||
set /p TOKEN=<token.txt
|
||||
echo Token: %TOKEN:~0,30%...
|
||||
echo.
|
||||
|
||||
REM 步骤2: 批量创建50条数据
|
||||
echo [2/2] 正在批量创建50条测试数据...
|
||||
echo.
|
||||
|
||||
set COUNT=0
|
||||
for /L %%i in (1,1,50) do (
|
||||
set /a PERSON_ID_BASE=1990%%i
|
||||
set /a CERT_SUFFIX=1000+%%i
|
||||
|
||||
curl -s -X POST "%BASE_URL%/ccdi/custFmyRelation" ^
|
||||
-H "Authorization: Bearer %TOKEN%" ^
|
||||
-H "Content-Type: application/json" ^
|
||||
-d "{\"personId\":\"11010119%PERSON_ID_BASE%01012\",\"relationType\":\"0%%i\",\"relationName\":\"测试用户%%i\",\"gender\":\"M\",\"relationCertType\":\"01\",\"relationCertNo\":\"11010119%PERSON_ID_BASE%0101!CERT_SUFFIX!\",\"mobilePhone1\":\"1380013800%%i\",\"remark\":\"批量测试数据-第%%i条\"}" ^
|
||||
> nul
|
||||
|
||||
set /a COUNT+=1
|
||||
set /a REMAINDER=%%i%%5
|
||||
|
||||
if !REMAINDER! equ 0 (
|
||||
echo 已创建: !COUNT!/50
|
||||
)
|
||||
)
|
||||
|
||||
echo.
|
||||
echo ========================================
|
||||
echo 数据创建完成!
|
||||
echo ========================================
|
||||
echo 总计创建: 50 条测试数据
|
||||
echo.
|
||||
|
||||
pause
|
||||
166
doc/test-scripts/test-cust-fmy-relation-crud.bat
Normal file
166
doc/test-scripts/test-cust-fmy-relation-crud.bat
Normal file
@@ -0,0 +1,166 @@
|
||||
@echo off
|
||||
REM ========================================
|
||||
REM 信贷客户家庭关系 CRUD 功能测试脚本
|
||||
REM ========================================
|
||||
|
||||
setlocal EnableDelayedExpansion
|
||||
|
||||
echo ========================================
|
||||
echo 信贷客户家庭关系 CRUD 功能测试
|
||||
echo ========================================
|
||||
echo.
|
||||
|
||||
REM 设置后端服务地址
|
||||
set BASE_URL=http://localhost:8080
|
||||
|
||||
REM 创建结果目录
|
||||
if not exist "test-results" mkdir test-results
|
||||
|
||||
REM ========================================
|
||||
REM 步骤1: 登录获取token
|
||||
REM ========================================
|
||||
echo [1/7] 正在登录...
|
||||
curl -s -X POST "%BASE_URL%/login/test" ^
|
||||
-H "Content-Type: application/json" ^
|
||||
-d "{\"username\":\"admin\",\"password\":\"admin123\"}" ^
|
||||
> test-results\01_login_response.json
|
||||
|
||||
echo 登录响应:
|
||||
type test-results\01_login_response.json
|
||||
echo.
|
||||
|
||||
REM 提取token (使用PowerShell辅助)
|
||||
powershell -Command "$json = Get-Content test-results\01_login_response.json -Raw | ConvertFrom-Json; $token = $json.token; Set-Content -Path test-results\token.txt -Value $token"
|
||||
|
||||
set /p TOKEN=<test-results\token.txt
|
||||
echo Token: %TOKEN:~0,30%...
|
||||
echo.
|
||||
|
||||
REM ========================================
|
||||
REM 步骤2: 测试新增功能
|
||||
REM ========================================
|
||||
echo [2/7] 测试新增功能...
|
||||
curl -s -X POST "%BASE_URL%/ccdi/custFmyRelation" ^
|
||||
-H "Authorization: Bearer %TOKEN%" ^
|
||||
-H "Content-Type: application/json" ^
|
||||
-d "{\"personId\":\"110101199001011234\",\"relationType\":\"配偶\",\"relationName\":\"张三\",\"gender\":\"男\",\"relationCertType\":\"身份证\",\"relationCertNo\":\"110101199001011235\",\"mobilePhone1\":\"13800138000\",\"remark\":\"测试数据\"}" ^
|
||||
> test-results\02_create_response.json
|
||||
|
||||
echo 新增响应:
|
||||
type test-results\02_create_response.json
|
||||
echo.
|
||||
|
||||
REM 提取创建的ID
|
||||
powershell -Command "$json = Get-Content test-results\02_create_response.json -Raw | ConvertFrom-Json; if ($json.data) { $id = $json.data; Set-Content -Path test-results\created_id.txt -Value $id } else { Write-Output '0' | Out-File -FilePath test-results\created_id.txt }"
|
||||
|
||||
set /p CREATED_ID=<test-results\created_id.txt
|
||||
echo 创建的记录ID: %CREATED_ID%
|
||||
echo.
|
||||
|
||||
REM ========================================
|
||||
REM 步骤3: 测试查询功能 (根据ID查询详情)
|
||||
REM ========================================
|
||||
echo [3/7] 测试查询详情功能...
|
||||
curl -s -X GET "%BASE_URL%/ccdi/custFmyRelation/%CREATED_ID%" ^
|
||||
-H "Authorization: Bearer %TOKEN%" ^
|
||||
> test-results\03_get_detail_response.json
|
||||
|
||||
echo 查询详情响应:
|
||||
type test-results\03_get_detail_response.json
|
||||
echo.
|
||||
|
||||
REM ========================================
|
||||
REM 步骤4: 测试列表查询功能
|
||||
REM ========================================
|
||||
echo [4/7] 测试列表查询功能...
|
||||
curl -s -X GET "%BASE_URL%/ccdi/custFmyRelation/list?pageNum=1&pageSize=10" ^
|
||||
-H "Authorization: Bearer %TOKEN%" ^
|
||||
> test-results\04_list_response.json
|
||||
|
||||
echo 列表查询响应:
|
||||
type test-results\04_list_response.json
|
||||
echo.
|
||||
|
||||
REM ========================================
|
||||
REM 步骤5: 测试修改功能
|
||||
REM ========================================
|
||||
echo [5/7] 测试修改功能...
|
||||
curl -s -X PUT "%BASE_URL%/ccdi/custFmyRelation" ^
|
||||
-H "Authorization: Bearer %TOKEN%" ^
|
||||
-H "Content-Type: application/json" ^
|
||||
-d "{\"id\":%CREATED_ID%,\"personId\":\"110101199001011234\",\"relationType\":\"配偶\",\"relationName\":\"张三(已修改)\",\"gender\":\"男\",\"relationCertType\":\"身份证\",\"relationCertNo\":\"110101199001011235\",\"mobilePhone1\":\"13900139000\",\"remark\":\"测试数据-已修改\"}" ^
|
||||
> test-results\05_update_response.json
|
||||
|
||||
echo 修改响应:
|
||||
type test-results\05_update_response.json
|
||||
echo.
|
||||
|
||||
REM ========================================
|
||||
REM 步骤6: 验证修改结果
|
||||
REM ========================================
|
||||
echo [6/7] 验证修改结果...
|
||||
curl -s -X GET "%BASE_URL%/ccdi/custFmyRelation/%CREATED_ID%" ^
|
||||
-H "Authorization: Bearer %TOKEN%" ^
|
||||
> test-results\06_verify_update_response.json
|
||||
|
||||
echo 验证修改响应:
|
||||
type test-results\06_verify_update_response.json
|
||||
echo.
|
||||
|
||||
REM ========================================
|
||||
REM 步骤7: 测试删除功能
|
||||
REM ========================================
|
||||
echo [7/7] 测试删除功能...
|
||||
curl -s -X DELETE "%BASE_URL%/ccdi/custFmyRelation/%CREATED_ID%" ^
|
||||
-H "Authorization: Bearer %TOKEN%" ^
|
||||
> test-results\07_delete_response.json
|
||||
|
||||
echo 删除响应:
|
||||
type test-results\07_delete_response.json
|
||||
echo.
|
||||
|
||||
REM ========================================
|
||||
REM 验证删除结果
|
||||
REM ========================================
|
||||
echo 验证删除结果...
|
||||
curl -s -X GET "%BASE_URL%/ccdi/custFmyRelation/%CREATED_ID%" ^
|
||||
-H "Authorization: Bearer %TOKEN%" ^
|
||||
> test-results\08_verify_delete_response.json
|
||||
|
||||
echo 验证删除响应 (应该为空或错误):
|
||||
type test-results\08_verify_delete_response.json
|
||||
echo.
|
||||
|
||||
REM ========================================
|
||||
REM 生成测试报告
|
||||
REM ========================================
|
||||
echo ========================================
|
||||
echo 测试完成!
|
||||
echo ========================================
|
||||
echo.
|
||||
echo 测试结果文件:
|
||||
echo - 01_login_response.json (登录响应)
|
||||
echo - 02_create_response.json (新增响应)
|
||||
echo - 03_get_detail_response.json (查询详情响应)
|
||||
echo - 04_list_response.json (列表查询响应)
|
||||
echo - 05_update_response.json (修改响应)
|
||||
echo - 06_verify_update_response.json (验证修改响应)
|
||||
echo - 07_delete_response.json (删除响应)
|
||||
echo - 08_verify_delete_response.json (验证删除响应)
|
||||
echo.
|
||||
|
||||
REM 检查测试结果
|
||||
echo ========================================
|
||||
echo 测试结果分析:
|
||||
echo ========================================
|
||||
|
||||
powershell -Command ^
|
||||
"$create = Get-Content test-results\02_create_response.json -Raw | ConvertFrom-Json; "^
|
||||
"$update = Get-Content test-results\05_update_response.json -Raw | ConvertFrom-Json; "^
|
||||
"$delete = Get-Content test-results\07_delete_response.json -Raw | ConvertFrom-Json; "^
|
||||
"Write-Host '新增功能: ' -NoNewline; if ($create.code -eq 200) { Write-Host '✓ 通过' -ForegroundColor Green } else { Write-Host '✗ 失败' -ForegroundColor Red }; "^
|
||||
"Write-Host '修改功能: ' -NoNewline; if ($update.code -eq 200) { Write-Host '✓ 通过' -ForegroundColor Green } else { Write-Host '✗ 失败' -ForegroundColor Red }; "^
|
||||
"Write-Host '删除功能: ' -NoNewline; if ($delete.code -eq 200) { Write-Host '✓ 通过' -ForegroundColor Green } else { Write-Host '✗ 失败' -ForegroundColor Red }"
|
||||
|
||||
echo.
|
||||
pause
|
||||
240
doc/test-scripts/test-cust-fmy-relation-list.bat
Normal file
240
doc/test-scripts/test-cust-fmy-relation-list.bat
Normal file
@@ -0,0 +1,240 @@
|
||||
@echo off
|
||||
REM ========================================
|
||||
REM 信贷客户家庭关系列表查询功能测试脚本
|
||||
REM ========================================
|
||||
|
||||
setlocal EnableDelayedExpansion
|
||||
|
||||
echo ========================================
|
||||
echo 信贷客户家庭关系列表查询功能测试
|
||||
echo ========================================
|
||||
echo.
|
||||
|
||||
REM 设置后端服务地址
|
||||
set BASE_URL=http://localhost:8080
|
||||
|
||||
REM 创建结果目录
|
||||
if not exist "test-results" mkdir test-results
|
||||
|
||||
REM ========================================
|
||||
REM 步骤1: 登录获取token
|
||||
REM ========================================
|
||||
echo [1/1] 正在登录...
|
||||
curl -s -X POST "%BASE_URL%/login/test" ^
|
||||
-H "Content-Type: application/json" ^
|
||||
-d "{\"username\":\"admin\",\"password\":\"admin123\"}" ^
|
||||
> test-results\login_response.json
|
||||
|
||||
REM 提取token
|
||||
powershell -Command "$json = Get-Content test-results\login_response.json -Raw | ConvertFrom-Json; $token = $json.token; Set-Content -Path test-results\token.txt -Value $token"
|
||||
|
||||
set /p TOKEN=<test-results\token.txt
|
||||
echo Token: %TOKEN:~0,30%...
|
||||
echo.
|
||||
|
||||
REM ========================================
|
||||
REM 测试1: 基本列表查询
|
||||
REM ========================================
|
||||
echo ========================================
|
||||
echo 测试1: 基本列表查询(无筛选条件)
|
||||
echo ========================================
|
||||
curl -s -X GET "%BASE_URL%/ccdi/custFmyRelation/list?pageNum=1&pageSize=10" ^
|
||||
-H "Authorization: Bearer %TOKEN%" ^
|
||||
> test-results\test01_basic_list.json
|
||||
|
||||
echo 响应内容:
|
||||
type test-results\test01_basic_list.json
|
||||
echo.
|
||||
echo.
|
||||
|
||||
REM ========================================
|
||||
REM 测试2: 分页功能测试
|
||||
REM ========================================
|
||||
echo ========================================
|
||||
echo 测试2: 分页功能测试
|
||||
echo ========================================
|
||||
|
||||
echo 第1页 (每页5条):
|
||||
curl -s -X GET "%BASE_URL%/ccdi/custFmyRelation/list?pageNum=1&pageSize=5" ^
|
||||
-H "Authorization: Bearer %TOKEN%" ^
|
||||
> test-results\test02_page1.json
|
||||
|
||||
type test-results\test02_page1.json
|
||||
echo.
|
||||
|
||||
echo 第2页 (每页5条):
|
||||
curl -s -X GET "%BASE_URL%/ccdi/custFmyRelation/list?pageNum=2&pageSize=5" ^
|
||||
-H "Authorization: Bearer %TOKEN%" ^
|
||||
> test-results\test02_page2.json
|
||||
|
||||
type test-results\test02_page2.json
|
||||
echo.
|
||||
echo.
|
||||
|
||||
REM ========================================
|
||||
REM 测试3: 按身份证号筛选
|
||||
REM ========================================
|
||||
echo ========================================
|
||||
echo 测试3: 按身份证号筛选
|
||||
echo ========================================
|
||||
curl -s -X GET "%BASE_URL%/ccdi/custFmyRelation/list?pageNum=1&pageSize=10&personId=110101199001011234" ^
|
||||
-H "Authorization: Bearer %TOKEN%" ^
|
||||
> test-results\test03_filter_personId.json
|
||||
|
||||
echo 筛选条件: personId=110101199001011234
|
||||
echo 响应内容:
|
||||
type test-results\test03_filter_personId.json
|
||||
echo.
|
||||
echo.
|
||||
|
||||
REM ========================================
|
||||
REM 测试4: 按关系类型筛选
|
||||
REM ========================================
|
||||
echo ========================================
|
||||
echo 测试4: 按关系类型筛选
|
||||
echo ========================================
|
||||
curl -s -X GET "%BASE_URL%/ccdi/custFmyRelation/list?pageNum=1&pageSize=10&relationType=01" ^
|
||||
-H "Authorization: Bearer %TOKEN%" ^
|
||||
> test-results\test04_filter_relationType.json
|
||||
|
||||
echo 筛选条件: relationType=01 (配偶)
|
||||
echo 响应内容:
|
||||
type test-results\test04_filter_relationType.json
|
||||
echo.
|
||||
echo.
|
||||
|
||||
REM ========================================
|
||||
REM 测试5: 按姓名模糊查询
|
||||
REM ========================================
|
||||
echo ========================================
|
||||
echo 测试5: 按姓名模糊查询
|
||||
echo ========================================
|
||||
curl -s -X GET "%BASE_URL%/ccdi/custFmyRelation/list?pageNum=1&pageSize=10&relationName=张" ^
|
||||
-H "Authorization: Bearer %TOKEN%" ^
|
||||
> test-results\test05_filter_relationName.json
|
||||
|
||||
echo 筛选条件: relationName=张 (模糊查询)
|
||||
echo 响应内容:
|
||||
type test-results\test05_filter_relationName.json
|
||||
echo.
|
||||
echo.
|
||||
|
||||
REM ========================================
|
||||
REM 测试6: 组合条件查询
|
||||
REM ========================================
|
||||
echo ========================================
|
||||
echo 测试6: 组合条件查询
|
||||
echo ========================================
|
||||
curl -s -X GET "%BASE_URL%/ccdi/custFmyRelation/list?pageNum=1&pageSize=10&personId=110101199001011234&relationType=01" ^
|
||||
-H "Authorization: Bearer %TOKEN%" ^
|
||||
> test-results\test06_combined_filter.json
|
||||
|
||||
echo 筛选条件: personId=110101199001011234 AND relationType=01
|
||||
echo 响应内容:
|
||||
type test-results\test06_combined_filter.json
|
||||
echo.
|
||||
echo.
|
||||
|
||||
REM ========================================
|
||||
REM 测试7: 查询不存在的数据
|
||||
REM ========================================
|
||||
echo ========================================
|
||||
echo 测试7: 查询不存在的数据
|
||||
echo ========================================
|
||||
curl -s -X GET "%BASE_URL%/ccdi/custFmyRelation/list?pageNum=1&pageSize=10&personId=999999999999999999" ^
|
||||
-H "Authorization: Bearer %TOKEN%" ^
|
||||
> test-results\test07_no_data.json
|
||||
|
||||
echo 筛选条件: personId=999999999999999999 (不存在)
|
||||
echo 响应内容:
|
||||
type test-results\test07_no_data.json
|
||||
echo.
|
||||
echo.
|
||||
|
||||
REM ========================================
|
||||
REM 测试8: 大页码查询
|
||||
REM ========================================
|
||||
echo ========================================
|
||||
echo 测试8: 大页码查询
|
||||
echo ========================================
|
||||
curl -s -X GET "%BASE_URL%/ccdi/custFmyRelation/list?pageNum=999&pageSize=10" ^
|
||||
-H "Authorization: Bearer %TOKEN%" ^
|
||||
> test-results\test08_large_pageNum.json
|
||||
|
||||
echo 筛选条件: pageNum=999 (超出范围)
|
||||
echo 响应内容:
|
||||
type test-results\test08_large_pageNum.json
|
||||
echo.
|
||||
echo.
|
||||
|
||||
REM ========================================
|
||||
REM 测试9: 每页1条记录
|
||||
REM ========================================
|
||||
echo ========================================
|
||||
echo 测试9: 最小分页大小
|
||||
echo ========================================
|
||||
curl -s -X GET "%BASE_URL%/ccdi/custFmyRelation/list?pageNum=1&pageSize=1" ^
|
||||
-H "Authorization: Bearer %TOKEN%" ^
|
||||
> test-results\test09_pageSize_1.json
|
||||
|
||||
echo 筛选条件: pageSize=1
|
||||
echo 响应内容:
|
||||
type test-results\test09_pageSize_1.json
|
||||
echo.
|
||||
echo.
|
||||
|
||||
REM ========================================
|
||||
REM 测试10: 每页100条记录
|
||||
REM ========================================
|
||||
echo ========================================
|
||||
echo 测试10: 大分页大小
|
||||
echo ========================================
|
||||
curl -s -X GET "%BASE_URL%/ccdi/custFmyRelation/list?pageNum=1&pageSize=100" ^
|
||||
-H "Authorization: Bearer %TOKEN%" ^
|
||||
> test-results\test10_pageSize_100.json
|
||||
|
||||
echo 筛选条件: pageSize=100
|
||||
echo 响应内容:
|
||||
type test-results\test10_pageSize_100.json | head -20
|
||||
echo...
|
||||
echo.
|
||||
echo.
|
||||
|
||||
REM ========================================
|
||||
REM 生成测试报告
|
||||
REM ========================================
|
||||
echo ========================================
|
||||
echo 测试完成!
|
||||
echo ========================================
|
||||
echo.
|
||||
echo 测试结果文件:
|
||||
echo - test01_basic_list.json (基本列表查询)
|
||||
echo - test02_page1.json (第1页)
|
||||
echo - test02_page2.json (第2页)
|
||||
echo - test03_filter_personId.json (按身份证号筛选)
|
||||
echo - test04_filter_relationType.json (按关系类型筛选)
|
||||
echo - test05_filter_relationName.json (按姓名模糊查询)
|
||||
echo - test06_combined_filter.json (组合条件查询)
|
||||
echo - test07_no_data.json (查询不存在的数据)
|
||||
echo - test08_large_pageNum.json (大页码查询)
|
||||
echo - test09_pageSize_1.json (最小分页)
|
||||
echo - test10_pageSize_100.json (大分页)
|
||||
echo.
|
||||
|
||||
REM 分析测试结果
|
||||
echo ========================================
|
||||
echo 测试结果分析:
|
||||
echo ========================================
|
||||
|
||||
powershell -Command ^
|
||||
"$basic = Get-Content test-results\test01_basic_list.json -Raw | ConvertFrom-Json; "^
|
||||
"$filter1 = Get-Content test-results\test03_filter_personId.json -Raw | ConvertFrom-Json; "^
|
||||
"$noData = Get-Content test-results\test07_no_data.json -Raw | ConvertFrom-Json; "^
|
||||
"$largePage = Get-Content test-results\test08_large_pageNum.json -Raw | ConvertFrom-Json; "^
|
||||
"Write-Host '基本列表查询: ' -NoNewline; if ($basic.code -eq 200) { Write-Host '✓ 通过' -ForegroundColor Green } else { Write-Host '✗ 失败' -ForegroundColor Red }; "^
|
||||
"Write-Host '按身份证筛选: ' -NoNewline; if ($filter1.code -eq 200) { Write-Host '✓ 通过' -ForegroundColor Green } else { Write-Host '✗ 失败' -ForegroundColor Red }; "^
|
||||
"Write-Host '查询空结果: ' -NoNewline; if ($noData.code -eq 200 -and $noData.total -eq 0) { Write-Host '✓ 通过' -ForegroundColor Green } else { Write-Host '✗ 失败' -ForegroundColor Red }; "^
|
||||
"Write-Host '大页码处理: ' -NoNewline; if ($largePage.code -eq 200) { Write-Host '✓ 通过' -ForegroundColor Green } else { Write-Host '✗ 失败' -ForegroundColor Red }"
|
||||
|
||||
echo.
|
||||
pause
|
||||
97
doc/test-scripts/test-enum-api.bat
Normal file
97
doc/test-scripts/test-enum-api.bat
Normal file
@@ -0,0 +1,97 @@
|
||||
@echo off
|
||||
chcp 65001 >nul
|
||||
setlocal enabledelayedexpansion
|
||||
|
||||
echo ========================================
|
||||
echo 枚举接口测试脚本
|
||||
echo ========================================
|
||||
echo.
|
||||
|
||||
:: 设置基础URL和Token
|
||||
set BASE_URL=http://localhost:8080
|
||||
set USERNAME=admin
|
||||
set PASSWORD=admin123
|
||||
|
||||
:: 第一步:获取Token
|
||||
echo [1/4] 获取Token...
|
||||
curl -s -X POST "%BASE_URL%/login/test?username=%USERNAME%&password=%PASSWORD%" -H "Content-Type: application/json" > temp_token.json
|
||||
|
||||
:: 使用jq提取token(如果没有jq,使用简单方法)
|
||||
for /f "tokens=2 delims=:" %%a in ('type temp_token.json ^| findstr "token"') do (
|
||||
set TOKEN_STR=%%a
|
||||
)
|
||||
:: 去除引号和空格
|
||||
set TOKEN=%TOKEN_STR:"=%
|
||||
set TOKEN=%TOKEN: =%
|
||||
|
||||
if "%TOKEN%"=="" (
|
||||
echo 获取Token失败!
|
||||
type temp_token.json
|
||||
del temp_token.json
|
||||
exit /b 1
|
||||
)
|
||||
echo Token获取成功!
|
||||
echo.
|
||||
|
||||
:: 保存测试结果
|
||||
set OUTPUT_DIR=doc\test-scripts\test-results
|
||||
if not exist "%OUTPUT_DIR%" mkdir "%OUTPUT_DIR%"
|
||||
|
||||
:: 第二步:测试关系类型接口
|
||||
echo [2/4] 测试关系类型接口 /ccdi/enum/relationType ...
|
||||
curl -s -X GET "%BASE_URL%/ccdi/enum/relationType" ^
|
||||
-H "Authorization: Bearer %TOKEN%" ^
|
||||
-H "Content-Type: application/json" > "%OUTPUT_DIR%\enum_relationType.json"
|
||||
|
||||
type "%OUTPUT_DIR%\enum_relationType.json"
|
||||
echo.
|
||||
echo 关系类型接口测试完成!
|
||||
echo.
|
||||
|
||||
:: 第三步:测试证件类型接口
|
||||
echo [3/4] 测试证件类型接口 /ccdi/enum/certType ...
|
||||
curl -s -X GET "%BASE_URL%/ccdi/enum/certType" ^
|
||||
-H "Authorization: Bearer %TOKEN%" ^
|
||||
-H "Content-Type: application/json" > "%OUTPUT_DIR%\enum_certType.json"
|
||||
|
||||
type "%OUTPUT_DIR%\enum_certType.json"
|
||||
echo.
|
||||
echo 证件类型接口测试完成!
|
||||
echo.
|
||||
|
||||
:: 清理临时文件
|
||||
del temp_token.json
|
||||
|
||||
:: 第四步:生成测试报告
|
||||
echo [4/4] 生成测试报告...
|
||||
set REPORT_FILE=%OUTPUT_DIR%\enum-test-report.md
|
||||
|
||||
echo # 枚举接口测试报告 > %REPORT_FILE%
|
||||
echo. >> %REPORT_FILE%
|
||||
echo 测试时间: %date% %time% >> %REPORT_FILE%
|
||||
echo. >> %REPORT_FILE%
|
||||
|
||||
echo ## 1. 关系类型接口测试结果 >> %REPORT_FILE%
|
||||
echo. >> %REPORT_FILE%
|
||||
echo **接口地址**: GET /ccdi/enum/relationType >> %REPORT_FILE%
|
||||
echo. >> %REPORT_FILE%
|
||||
echo **响应数据**: >> %REPORT_FILE%
|
||||
echo ```json >> %REPORT_FILE%
|
||||
type "%OUTPUT_DIR%\enum_relationType.json" >> %REPORT_FILE%
|
||||
echo ``` >> %REPORT_FILE%
|
||||
echo. >> %REPORT_FILE%
|
||||
|
||||
echo ## 2. 证件类型接口测试结果 >> %REPORT_FILE%
|
||||
echo. >> %REPORT_FILE%
|
||||
echo **接口地址**: GET /ccdi/enum/certType >> %REPORT_FILE%
|
||||
echo. >> %REPORT_FILE%
|
||||
echo **响应数据**: >> %REPORT_FILE%
|
||||
echo ```json >> %REPORT_FILE%
|
||||
type "%OUTPUT_DIR%\enum_certType.json" >> %REPORT_FILE%
|
||||
echo ``` >> %REPORT_FILE%
|
||||
echo. >> %REPORT_FILE%
|
||||
|
||||
echo ========================================
|
||||
echo 测试完成!
|
||||
echo 测试报告已保存到: %REPORT_FILE%
|
||||
echo ========================================
|
||||
1
doc/test-scripts/test-results/create_response.json
Normal file
1
doc/test-scripts/test-results/create_response.json
Normal file
@@ -0,0 +1 @@
|
||||
{"msg":"操作成功","code":200}
|
||||
1
doc/test-scripts/test-results/created_id.txt
Normal file
1
doc/test-scripts/test-results/created_id.txt
Normal file
@@ -0,0 +1 @@
|
||||
2
|
||||
1
doc/test-scripts/test-results/delete_response.json
Normal file
1
doc/test-scripts/test-results/delete_response.json
Normal file
@@ -0,0 +1 @@
|
||||
{"msg":"操作成功","code":200}
|
||||
1
doc/test-scripts/test-results/list_response.json
Normal file
1
doc/test-scripts/test-results/list_response.json
Normal file
@@ -0,0 +1 @@
|
||||
{"total":1,"rows":[{"id":2,"personId":"110101199001011234","relationType":"01","relationName":"张三","gender":"M","genderName":null,"birthDate":null,"relationCertType":"01","relationCertNo":"110101199001011235","mobilePhone1":"13800138000","mobilePhone2":null,"wechatNo1":null,"wechatNo2":null,"wechatNo3":null,"contactAddress":null,"relationDesc":null,"effectiveDate":null,"invalidDate":null,"status":1,"statusName":null,"remark":"自动化测试数据","dataSource":"MANUAL","isEmpFamily":false,"isCustFamily":true,"createTime":"2026-02-11 17:06:26","updateTime":"2026-02-11 17:06:26","createdBy":"admin","updatedBy":"admin"}],"code":200,"msg":"查询成功"}
|
||||
1
doc/test-scripts/test-results/login_response.json
Normal file
1
doc/test-scripts/test-results/login_response.json
Normal file
@@ -0,0 +1 @@
|
||||
{"msg":"操作成功","code":200,"token":"eyJhbGciOiJIUzUxMiJ9.eyJzdWIiOiJhZG1pbiIsImxvZ2luX3VzZXJfa2V5IjoiYzk3NDg5MTQtOTUwMC00OTFkLWJkMDgtYzI5ZThhY2IzOTMyIn0.yOY1WNZouWWlSfb2Th3juYv94DEYe9cK34oHmr_xcRp4AyiXAGy4jTyXKywUbbn5N7XnMp7k5zqOOT6hYguNhQ"}
|
||||
1
doc/test-scripts/test-results/test-report.md
Normal file
1
doc/test-scripts/test-results/test-report.md
Normal file
@@ -0,0 +1 @@
|
||||
|
||||
1
doc/test-scripts/test-results/test01_basic_list.json
Normal file
1
doc/test-scripts/test-results/test01_basic_list.json
Normal file
@@ -0,0 +1 @@
|
||||
{"total":1,"rows":[{"id":1,"personId":"330101199812311231","relationType":"配偶","relationName":"测试","gender":null,"genderName":null,"birthDate":null,"relationCertType":"身份证","relationCertNo":"330103199712311231","mobilePhone1":null,"mobilePhone2":null,"wechatNo1":null,"wechatNo2":null,"wechatNo3":null,"contactAddress":null,"relationDesc":null,"effectiveDate":null,"invalidDate":null,"status":1,"statusName":null,"remark":null,"dataSource":"MANUAL","isEmpFamily":false,"isCustFamily":true,"createTime":"2026-02-11 17:03:39","updateTime":"2026-02-11 17:03:39","createdBy":"admin","updatedBy":"admin"}],"code":200,"msg":"查询成功"}
|
||||
1
doc/test-scripts/test-results/test02_page1.json
Normal file
1
doc/test-scripts/test-results/test02_page1.json
Normal file
@@ -0,0 +1 @@
|
||||
{"total":1,"rows":[{"id":1,"personId":"330101199812311231","relationType":"配偶","relationName":"测试","gender":null,"genderName":null,"birthDate":null,"relationCertType":"身份证","relationCertNo":"330103199712311231","mobilePhone1":null,"mobilePhone2":null,"wechatNo1":null,"wechatNo2":null,"wechatNo3":null,"contactAddress":null,"relationDesc":null,"effectiveDate":null,"invalidDate":null,"status":1,"statusName":null,"remark":null,"dataSource":"MANUAL","isEmpFamily":false,"isCustFamily":true,"createTime":"2026-02-11 17:03:39","updateTime":"2026-02-11 17:03:39","createdBy":"admin","updatedBy":"admin"}],"code":200,"msg":"查询成功"}
|
||||
1
doc/test-scripts/test-results/test02_page2.json
Normal file
1
doc/test-scripts/test-results/test02_page2.json
Normal file
@@ -0,0 +1 @@
|
||||
{"total":1,"rows":[],"code":200,"msg":"查询成功"}
|
||||
@@ -0,0 +1 @@
|
||||
{"total":0,"rows":[],"code":200,"msg":"查询成功"}
|
||||
1
doc/test-scripts/test-results/token.txt
Normal file
1
doc/test-scripts/test-results/token.txt
Normal file
@@ -0,0 +1 @@
|
||||
eyJhbGciOiJIUzUxMiJ9.eyJzdWIiOiJhZG1pbiIsImxvZ2luX3VzZXJfa2V5IjoiNTNjZDY4ODMtYzU5NS00OGYyLThiMTUtOGM1YjcxNzcwZTJmIn0.WYPYz2TlEsinbz8eG4BoW48eoP53zsxf_fuDrsWFVtfT_r0g9mHGP72TNaQt2eY-rXoRkvmZRoU2FymcznIv6A
|
||||
1
doc/test-scripts/test-results/update_response.json
Normal file
1
doc/test-scripts/test-results/update_response.json
Normal file
@@ -0,0 +1 @@
|
||||
{"msg":"操作成功","code":200}
|
||||
@@ -0,0 +1 @@
|
||||
{"msg":"操作成功","code":200}
|
||||
Reference in New Issue
Block a user