Postman进行webservices接口测试

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 和 全局变量 文件,选择一个文件路径;

 

猜你喜欢

转载自www.cnblogs.com/Teachertao/p/11925166.html