admin/test_amt_api.bat
lvfengfree 8b07d8f52a feat: 实现 AMT 设备自动添加功能(仅 Digest 认证)
- 添加 AMT Digest 认证服务 (AmtDigestService)
- 添加 AMT 模拟服务用于测试 (AmtMockService)
- 更新设备控制器支持 AMT 连接测试和设备信息获取
- 前端添加 AMT 自动添加方式,支持手动输入和凭证选择
- 移除 Basic 认证,仅使用 Digest 认证
- 添加 Apache HttpClient 依赖支持 Digest 认证
- 创建相关文档和测试脚本
2026-03-01 14:51:35 +08:00

44 lines
1.1 KiB
Batchfile
Raw Permalink Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

@echo off
echo ========================================
echo 测试 AMT API 是否正常
echo ========================================
echo.
echo [测试 1] 检查后端是否运行...
curl -s http://localhost:8080/device/statistics >nul 2>&1
if %ERRORLEVEL% NEQ 0 (
echo 后端未运行或无法连接!
echo 请先启动后端服务。
pause
exit /b 1
)
echo 后端正常运行 ✓
echo.
echo [测试 2] 检查模拟模式状态...
curl -s http://localhost:8080/device/amt/mockStatus
echo.
echo.
echo [测试 3] 测试 AMT 连接 API使用模拟数据...
echo.
echo 发送测试请求...
curl -X POST http://localhost:8080/device/amt/test ^
-H "Content-Type: application/json" ^
-d "{\"ipAddress\":\"192.168.1.100\",\"username\":\"admin\",\"password\":\"admin\"}"
echo.
echo.
echo ========================================
echo 测试完成
echo ========================================
echo.
echo 如果看到成功响应,说明 API 正常工作。
echo 如果看到错误,请检查:
echo 1. 后端是否正常启动
echo 2. 端口 8080 是否被占用
echo 3. 查看后端控制台日志
echo.
pause