简单方便的api接口测试工具:Chrome浏览器插件postman

版权声明:本文为原创文章,转载请注明转自Clement-Xu的csdn博客。 https://blog.csdn.net/ClementAD/article/details/77649195
Postman可以用来方便地测试自己的api接口,全球已经有几万家公司几百万人在使用。具体的官方介绍:
Postman makes API development faster, easier, and better. The free app is used by more than 3.5 million developers and 30,000 companies worldwide. Postman is designed with the developer in mind, and packed with features and options.

Postman features include:
  • Powerful, simple to use GUI
  • Saved history of API requests
  • Unlimited collections, environments, tests, and sharing
  • Automated testing with collection runner
  • Web-viewable, detailed API documentation
  • Flexible API monitoring, for uptime, performance, and accuracy
  • Mock servers, to support split-stack development

使用Chrome浏览器插件postman测试api接口:
1、打开Chrome浏览器的“应用”管理窗口,点击“Chrome网上应用商店”:


2、搜索“postman”,找到“开发者工具”上万人打星的那一个,“添加至CHROME”:

3、在“应用管理窗口”就可以看到postman的图标了,点击打开:


4、可能会提示登录,使用google账号登录就行了


5、创建新的测试:
1)、点击“+”号创建一个新测试用例
2)、选择GET、POST等一种请求method
3)、选择Body要发送的内容,(或点击“Params”填写key-value参数)
4)、选择Body的参数类型
5)、选择Body的编码格式
6)、填写Body的具体内容(比如json格式的请求参数)
7)、点击“Send”发送请求、并查看结果
8)、历史记录会记录在左边




6、保存测试用例:

点击“Save”,选择或参加一个目录,就可以保存测试用例了。在窗口的左边的Collections标签里面可以看到保存过的测试用例。可以直接“Run”了。


猜你喜欢

转载自blog.csdn.net/ClementAD/article/details/77649195
今日推荐