当前位置:网站首页>Postman interface test V

Postman interface test V

2022-07-07 10:09:00 Splendid Qianyang 813

Catalog

Function interface

many Tab Pagination

Interface view mode

Multicolor theme

API Document generation

Briefly outline the steps

preview API file

Release API file

Published API The document supports automatic update


Function interface

many Tab Pagination

Postman Support more tab page , Before this comparison, some API Debugging tools don't support multiple Tab page , such as Advanced Rest Client

many tab The benefits of :

Convenient in a tab Medium test , After getting the result , Copy and paste to another tab in , Continue testing other interfaces

Better than that tab1 in , After testing the interface for obtaining verification code , Copy the phone number and verification code , Paste the tab2 in , Continue to test the registered interface

 

Interface view mode

Postman By default Request and Response Up and down layout :

Click here in the lower right corner Two pane view, It becomes left and right :

[info] The purpose of the left and right layout

For the amount of data , When you want to see the requested and returned data at the same time , It should be more useful .

Multicolor theme

Posman Support two themes :

  • Dark theme

The current theme is dark , Very good results :

 

 

  • Light color theme

You can switch to Light color theme :

 

API Document generation

After the developers in the background of the server have tested the interface , I intend to send all kinds of information about the interface to the user API When the front-end mobile terminal personnel , Often meet :

Or copy and paste -> The format is not friendly Or use Postman Middle shot -> Easy to see , But it's not easy to get API Interface, field and other text content Or use Postman Export to JSON -> json The information in the file is too complicated , Information that is not conducive to finding Or use documents , For example, write Markdown file -> But then API Changes to the need for real-time synchronization to modify the document , It can be troublesome This will cause others to view and use API It's very inconvenient when I'm at work .

-> Regarding this ,Postman Provides a release API

Preview and publish API file Let's introduce Postman How to preview and publish API file .

Briefly outline the steps

  1. Collection

  2. Move the mouse to a Collection, Click on Three points

  3. Publish Docs

  4. Publish

  5. obtain Public URL

  6. Someone else opens this Public URL, You can view it API file

preview API file

Click the greater than sign on the right of the group >

If it's just a preview , For example, the background developers can check it by themselves API Document , You can choose :View in web

Equivalent to clicking Publish Docs To publish :

 

 

View in Web after , Yes Publish The option to ( See the following screenshot )

View in Web after , The preview page opens :

such as :

Cow cloud

https://documenter.getpostman.com/collection/view/669382-42273840-6237-dbae-5455-26b16f45e2b9

 

 

 

 

And the example code on the right , You can also choose from the default cURL Change to something else :

 

 

 

 

Release API file

If you want to make this document visible to others , The click Publish:

 

 

Then it will open an address like this :

Postman Documenter

https://documenter.getpostman.com/collection/publish?meta=Y29sbGVjdGlvbl9pZD00MjI3Mzg0MC02MjM3LWRiYWUtNTQ1NS0yNmIxNmY0NWUyYjkmb3duZXI9NjY5MzgyJmNvbGxlY3Rpb25fbmFtZT0lRTUlQTUlQjYlRTclODklOUIlRTQlQkElOTE=

 

 

Click on Publish after , The corresponding public web address can be generated :

 

 

open API Interface document address :

https://documenter.getpostman.com/view/669382/collection/77fd4RM

You can see ( The same effect as the previous preview API Document. ):

 

 

such , Others can view the corresponding API Interface document .

Published API The document supports automatic update

Follow up if your own API After interface modification :

such as :

 

 

 

 

( It turned out , No need to enter the process of preview and release , To update the document , It is Postman Automatic support )

Someone else to refresh the page of the document :

https://documenter.getpostman.com/view/669382/collection/77fd4RM

You can see the updated content :

 

原网站

版权声明
本文为[Splendid Qianyang 813]所创,转载请带上原文链接,感谢
https://yzsam.com/2022/02/202202130623332786.html