Android interface testing tool Apizza, custom API request return value, custom request relative path

Written in the front: The separation of front and back ends is a hot topic now. In daily project cooperative development, some small skills can greatly reduce the development cycle and improve programmer productivity, such as API interface testing tools. Interfaces written by web back-end workers need to be used by many people, web front-end and mobile. What if the interface code has not been implemented when the mobile terminal needs to call the data of the interface? ? ? Waiting for the interface to be implemented before continuing? ? Can't wait. There is no front-end response for interface debugging, which is time-consuming and labor-intensive.
What I am talking about next is for the mobile terminal (Android), because I haven't covered the writing test of the interface yet.
It is obviously a very good choice to simulate an API interface. Request data from the mock API, and the API will return you a data you define for testing.

1. https://www.mocky.io/ used some time ago

Instructions:

Enter the data you need to customize in the Body box and click

Insert picture description here

Generate an API connection, this connection can be directly requested in Android, browser access can also be displayed directly.

Insert picture description here
Insert picture description here

Disadvantages: Different data has different API links, and the relative path cannot be customized, which makes big changes to the code.

2. The newly discovered https://apizza.net/pro/#/

Instructions:

1. Register and log in, enter the work area, create a new project, and enter the development mode

Insert picture description here
Insert picture description here

2. Create a new folder

Insert picture description here

3. Note that the body cannot have a carriage return! ! ! ! ! ! ! ! ! ! , Can preview the effect

Insert picture description here

4. Click Send on the right and save to the newly created folder.

Insert picture description here

5. Test: copy the link and open a new browser window

Insert picture description hereInsert picture description here

This API can be used! !

Advantages: custom relative address, small code changes.

Insert picture description here

Guess you like

Origin blog.csdn.net/qq_41170600/article/details/106442388