Last year, in order to implement the “proxy service-based interface merge solution,” Utility Node developed a Module called Freedom-API. Recently, it found another wonderful use of Freedom-API, so it has been upgraded to simplify the process. Developed an online interface process testing tool, you can have a try
The purpose of,
For front-end development of the students, there will be such a scene: the interface when the background after delivery, the oneself also in the development of the front-end logic, is busy, will only simple via a browser or postMan impassability, try interface for the interface between the top and bottom to undertake, request the desired result, unable to Care. When Ready goes to syndication, combined with the business logic, it is found that the interface will have various potholes, so the background is rushed to repair, so that the background will miss a parallel repair period.
For teams with special interface test students, various advanced interface test tools are fully functional, but the cost of learning test scripts is not high
In Freedom-API, we define a set of simple process rules based on Json. If supplemented by a set of visual process configuration interface, a simple and practical “online interface process testing tool” is coming up
Ii. Description of working process
- You can configure the interface request flow using a visual tool
- Click the execute button, the client will establish a Web socket connection with the server, and the formatting process definition will be sent to the server. The server will synchronize the request information to the client in real time before and after executing a specific request process, and the client will display the process log
- For a specific process, you can also set the result assertion with a simple Js expression. If the assertion fails, the process will be interrupted and the interface can be defaced back to the back end
Three, advantage
- The rules are simple: except
$data$
.$allData$
These two built-in variables, you don’t need to remember any more - In the complete data retrieval, you can see not only response.body, but also response.header
- Don’t worry about login state. Even if a lot of your process requires a login based on the first interface, you don’t have to worry about the login being lost after a proxy request, because The Freedom-API handles cookies very well. If the login state is not in a hurry to maintain cookies from
$allData$
You can get everything you need - Clear editing guidelines and built-in demo make it easy for you to edit the process
- I gather so many words really not easy, free to see bai ~~
Fourth, to be optimized
In real application scenarios, various authentication and encryption of interface processes are essential. Currently, tools support this part simply. Fortunately, Freedom-API is based on the Tapable plugin mechanism, which can be supplemented with various plug-ins for users to check. Of course, “Anybody care?
5. The interface of the test environment can only be accessed from the Intranet environment
This is the Achilles heel, the Intranet only interface, there is no reason my server can penetrate. However, if necessary, through the freedom API to build their own Intranet why not? Can also be supplemented by a variety of plug-ins, customized to improve a variety of functions.
Don’t have the energy? Maybe I can help