Postman进行webservices接口测试

微笑、不失礼 提交于 2019-12-05 12:31:14

1、接口地址

webservices是什么?

 更多webservices接口地址访问地址:http://www.webxml.com.cn/zh_cn/web_services.aspx

 webservices接口地址如下:

 
POST /WebServices/WeatherWS.asmx/getRegionProvince HTTP/1.1
Host: ws.webxml.com.cn
Content-Type: application/x-www-form-urlencoded
Content-Length: length

HTTP/1.1 200 OK
Content-Type: text/xml; charset=utf-8
Content-Length: length

<?xml version="1.0" encoding="utf-8"?>
<ArrayOfString xmlns="http://WebXml.com.cn/">
  <string>string</string>
  <string>string</string>
</ArrayOfString>

 使用Postman进行webservices接口测试 

1.打开postman工具添写接口地址,请求方法,请求头信息,获取省份ID,如下所示:

 

 2、添加断言

 3、获取城市ID,由上一个接口返回的数据,在响应体中转换为json格式

 

 4、获取城市天气接口,请示如下:

 

 添加断言

 5、导出interface_pro_api 和 全局变量 文件,选择一个文件路径;

 

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!