Introduction to API management tools - detailed explanation of Apifox use

Table of contents

How to do API management gracefully

final solution

also


Agile iteration and team collaboration, the working mode of separating the front and back end is almost the normal working mode of every Internet company.

There are many advantages of separate development of front and back ends, one of which is that it only needs to provide a unified API interface, which can be used by multiple clients such as web , iOS, Android , etc., greatly improving the efficiency.

However, being born in agility, dying in iteration, and being trapped in teamwork is often a major drawback of this software development model. As the project continues to advance and change, the project is getting bigger and bigger, and the maintenance cost is getting higher and higher.

Because some companies adopt wiki, html, and openapi forms for interface document management, the version iteration is fast, the interface is often changed, and the update and document maintenance among members often cannot keep up.

In the later stage of API management, there is a considerable and invisible waste of "human resources":

1) Documents are outdated and unavailable. Newcomers rely on "old people" to get started and familiarize themselves with the project, resulting in a double waste of manpower. Team members' own work progress is hindered, and the progress of newcomers' ability to complete tasks is slow.
2) The interface is modified due to initial design problems/function expansion/requirement changes, but it is often difficult to synchronize to downstream links such as front-end and testing in time after modification
. Difficulties, and even some interfaces need to be reworked

 Python automated testing learning exchange group: a full set of automated testing interview resume learning materials to obtain Click the link to join the group chat [python automated testing exchange]: http://qm.qq.com/cgi-bin/qm/qr?_wv=1027&k=DhOSZDNS -qzT5QKbFQMsfJ7DsrFfKpOF&authKey=eBt%2BF%2FBK81lVLcsLKaFqnvDAVA8IdNsGC7J0YV73w8V%2FJpdbby66r7vJ1rsPIifg&noverify=0&group_code=198408628

 

These situations will become more serious in the later stages of project development. As a result, many R&D personnel always complain: writing code is not tiring, but communication and docking are tiring; work is not hard, but life is hard.

How to do API management gracefully

In order to solve the problems of developers, we need to solve various pain points in API management. In other words, a perfect API management tool should meet the following characteristics:

**In the interface design stage, it can standardize the interface design of R&D personnel

In the interface debugging stage, it provides a variety of functions to fully debug and highly simulate the actual working situation

In the interface maintenance process, the maintenance cost is low, and all changes can be updated to the team colleagues in the downstream work link in time

One-stop service, one tool can complete the interface design, debugging, maintenance, and testing process, without repeated import and export, and switching between various software to improve efficiency. **

final solution

The author searched for a long time on the Internet, and found a solution software that can almost meet the above requirements - Apifox. The main features of this software:

  • The visual interface design interface supports https and https protocols, and follows the openApi and Json Schema specifications. All http request parameters and interface descriptions can be filled in directly. Supports the construction of data models that can be reused by multiple request parameters.

  • Comparable to postman 's interface debugging function , in addition, it also supports "zero configuration" mock highly simulated business data, and supports reading databases

  • The system automatically generates code According to the interface and data model definition, the system automatically generates interface request code, front-end business code and back-end business code

  • Real-time update the data changed in the cloud to each team member, avoiding duplication and rework caused by data inconsistency; code update and document update are all completed in the same software, reducing maintenance workload

  • Project management assigns different execution permissions to different project roles to effectively protect project data security; support old projects in openapi and postman format to import apifox , realize project painless migration, and support interface data export in various formats such as html format and openapi.

Next, the author will introduce some functions in detail.

  1. interface design

The interface is visualized, and the interface information can be edited and managed. Conventional interface request methods such as get and post can be directly selected from the drop-down box; query, body, and header parameters can be directly filled in, and the return parameters support JSON and XML format imports, and can directly perform format calibration test. The interface description part supports text in Markdown format.

2. Interface debugging
There are two modes of interface debugging, one is quick debugging without creating a project, and directly verifies the interface request and return parameters, the other is debugging a single interface in the project, the function of this part is basically equivalent to postman . A variety of pre and post operations can be added:

Verify the returned response, and check whether the returned status and data structure meet expectations.

 Python automated testing learning exchange group: a full set of automated testing interview resume learning materials to obtain Click the link to join the group chat [python automated testing exchange]: http://qm.qq.com/cgi-bin/qm/qr?_wv=1027&k=DhOSZDNS -qzT5QKbFQMsfJ7DsrFfKpOF&authKey=eBt%2BF%2FBK81lVLcsLKaFqnvDAVA8IdNsGC7J0YV73w8V%2FJpdbby66r7vJ1rsPIifg&noverify=0&group_code=198408628

3. Interface maintenance When changing the interface, modify and generate new code directly in apifox, and the documentation is stored in the same location, making it very convenient to modify the documentation description. After the interface is changed, the collaborating members can synchronize the cloud changes in time.

4. Project management supports data import and export, and automatically generates interface codes

Set different data permissions for members of different roles. For example, the back-end R&D can modify the interface data, while the front-end and test members only have read-only permissions, and those outside the project only have visitor permissions to view interface information but not data types.

Different servers can be configured for development and debugging, test verification, and online use:

also

Apifox is not only an API management tool for developers, but also provides testers with a series of functions such as interface testing , interface automation testing , and test management. It can be said to be a one-stop artifact for the R&D team to improve efficiency.

 Python automated testing learning exchange group: a full set of automated testing interview resume learning materials to obtain Click the link to join the group chat [python automated testing exchange]: http://qm.qq.com/cgi-bin/qm/qr?_wv=1027&k=DhOSZDNS -qzT5QKbFQMsfJ7DsrFfKpOF&authKey=eBt%2BF%2FBK81lVLcsLKaFqnvDAVA8IdNsGC7J0YV73w8V%2FJpdbby66r7vJ1rsPIifg&noverify=0&group_code=198408628

Summarize:

Thanks to everyone who read my article carefully! ! !

I personally sorted out some technical materials I have compiled in my software testing career in the past few years, including: e-books, resume modules, various job templates, interview books, self-study projects, etc. Welcome everyone to click on the business card below to get it for free, don't miss it.

          

 

Guess you like

Origin blog.csdn.net/MXB_1220/article/details/131087981