Three Modulation methods of API: unit Test, Swagger, Postman debugging
1. Unit testing: the Spring framework provides Mock function-aided HTTP testing, which covers the main functions and is integrated with the automatic construction system, which can find the bug caused by functional defects and code changes in time and ensure the quality of the project.
2PowerSwagger interface documents and calls: the Swagger framework defines a complete REST interface document specification, provides powerful page testing functions, can debug and visualize API interface services, and integrates documents into the code to integrate maintenance documents and modified code into one, making it easy to modify the document description while modifying the code logic.
The browser opens http://localhost:8011/swagger-ui.html, expands the interface information, selects the file, and then "Try it ou!"
3Jing Postman is a commonly used API debugging tool, which supports a variety of request methods and configuration environment variables, and tests and verifies the returned results, supports batch automatic operation, can be integrated with automatic construction system, and can import and export JSON files, efficient team cooperation.