Skip to content

Latest commit

 

History

History
112 lines (65 loc) · 2.25 KB

DSB0009-IDEA-Web-RESTful项目-Postman安装使用与测试.md

File metadata and controls

112 lines (65 loc) · 2.25 KB

DockerSpringBoot009-IDEA-Web-RESTful项目-Postman安装使用与测试

lin-jinwei, FaQianApp

注意,未授权不得擅自以盈利方式转载本博客任何文章。


Code: ../code

什么是 Postman?

alt text

What is Postman? Postman is an API platform for building and using APIs. Postman simplifies each step of the API lifecycle and streamlines collaboration so you can create better APIs—faster.

简单地讲,Postman就是一款非常常用的一个APIs测试工具软件。 另外,用来测试Java-SpringBoot项目的RESTful请求也是非常的好用。

Postman官网

alt text

下载安装Postman

alt text

alt text

alt text

下载完成后,将下载文件复制到安装目录进行解压安装,也可以直接安装:

alt text

alt text

命令:

tar -zxvf postman-linux-x64.tar.gz 

alt text

解压完成:

alt text

进入Postman目录:

alt text

点击图标启动运行:

alt text

如果没有安装UI桌面,则直接进入Postman的解压目录,运行下面命令即可运行Postman:

命令:

./Postman

alt text

完整功能需要登陆才能使用:

alt text

浏览器访问使用postman

不想本地安装postman的可以直接网上访问地址使用:

https://www.postman.com/downloads/?utm_source=postman-home

alt text

alt text

登录注册Postman

登陆后可以使用更加复杂的内容:

alt text

测试Springboot项目APIs:

首先打开一个已经在运行的SpringBoot项目:

alt text

测试命令:

http://localhost:8080/getFun1

结果: alt text

测试命令:带请求参数的Get请求

http://localhost:8080/getFun1?name=jinwei

alt text

测试成功!

测试历史记录

点击Postman左边竖直栏的History,可以查看测试命令记录以及测试命令的使用记录。

alt text