SoapUI 测试上传下载文件
背景
使用 SoapUI 工具测试文件导入导出的接口。
1、文件上传
1)在左侧菜单配置请求URL
http://172.31.0.90:38990/file/routerUpload2)确认请求URL是否正确
3)设置介质类型
设置为:multipart/form-data 4)上传文件 (excel类型为例):Attacment-->+,添加文件5)返回结果JSON
[{ "targetIp": "172.31.0.80", "protocol": "tcp", "sourcePort": "8888", "name": "router_test_0906", "publicIp": "192.168.12.12", "targetPort": "7777" }]
2、文件下载
1)在左侧菜单配置请求URL
http://172.31.0.90:38990/file/routerExport2)入参为JSON
[ { "targetIp": "172.31.0.80", "protocol": "tcp", "sourcePort": "8888", "name": "router_test_090601", "publicIp": "192.168.12.12", "targetPort": "7777" }, { "targetIp": "172.31.0.81", "protocol": "tcp", "sourcePort": "8889", "name": "router_test_090602", "publicIp": "192.168.12.13", "targetPort": "7778" } ]
3)导出Excel格式文件
标签:文件,protocol,上传下载,tcp,SoapUI,测试,sourcePort,172.31 From: https://www.cnblogs.com/miracle-luna/p/17488523.html