当前位置:网站首页>Chinese postman? Really powerful!
Chinese postman? Really powerful!
2022-07-05 18:39:00 【InfoQ】
It can't be done efficiently Current situation of interface management
One 、 Common solutions
- Use Swagger management API file
- Use Postman debugging API
- Use MockJs Tools such as Mock API data
- Use JMeter do API automated testing
Two 、 The problem is
- Developers in Swagger After defining the document , Interface debugging also needs to go Postman Define it again .
- The front-end development Mock When it comes to data MockJs Define it again , You also need to set it manually Mock The rules .
- Testers need to go to JMeter Define it again .
- Front end according to MockJs Mock The data is developed , Back end according to Swagger The defined interface document is developed , They all passed the test , I thought I could go online right away , As a result, a variety of problems were found :
- The interface changed during development , Only modified Swagger, But they didn't synchronize the changes in time MockJs.
- The interface data type of back-end development is inconsistent with the document , It's hard to see the problem with the naked eye .
- Again , Test in JMeter Well written test cases , When it's really running, you'll find all kinds of inconsistencies .
- Time is long. , The inconsistencies will get more and more serious .
Apifox Solution

One 、 How to solve these problems
1、Apifox location
Apifox = Postman + Swagger + Mock + JMeter2、Apifox Purpose
3、Apifox function
- Interface design:Apifox Interface documentation followsOpenApi3.0 ( primary Swagger)、JSON SchemaAt the same time , It's very easy to use
visualizationDocument management function , Zero learning cost , Very efficient . And support online sharing of interface documents .
- Data model: Reusable data structure , Defining interfaces
Return data structureAndRequest parameter data structure( only JSON and XML Pattern ) You can directly reference . Support model direct nested reference , direct JSON/XML Smart import , Support oneOf、allOf And other advanced combination modes .
- Interface debugging:Postman Some functions , For example, environment variables 、 In front of / Post script 、Cookie/Session Global Shared And so on ,Apifox There are , And ratio Postman More efficient and easy to use . After the interface runs, click
Save as use caseButton , It can generateInterface use cases, Interface use cases can be run directly later , No more parameters need to be entered , Very convenient . Custom script 100% compatible Postman grammar , And support running javascript、java、python、php、js、BeanShell、go、shell、ruby、lua And other language codes .
- Interface use cases: Usually, an interface has multiple use cases , such as
The parameters are correctUse cases 、Parameter errorUse cases 、Data is emptyUse cases 、Different data statesUse cases, etc . The correctness of data will be automatically verified when running the interface case , Using interface use cases to debug interfaces is very efficient .
- Interface data Mock: built-inMock.jsRules engine , Very convenient mock All kinds of data , And you can define the data structure and write mock The rules . Support adding “ expect ”, According to the request parameters, different mock data . most important of all Apifox
Zero configurationthat will do Mock Very human data , The details are introduced later in this paper .
- Database operation: Support reading database data , Used as an interface request parameter . Support reading database data , Used to verify ( Assertion ) Whether the interface request is successful .
- Interface automation testing: Provide interface set testing , You can choose the interface ( Or interface use cases ) Quickly create test sets . At present, more functions of interface automation test are still under development , Coming soon ! The goal is : JMeter Some functions are basically , And use it better .
- Quick debugging: similar Postman Interface debugging mode , It is mainly used for temporary debugging
No documentation requiredThe interface of , You can quickly debug without defining the interface in advance .
- Code generation: Define according to the interface and data model , Automatic system generation
Interface request code、Front end business codeAndBack end business code.
- Teamwork:Apifox Born for teamwork , Interface cloud real-time synchronous update , ripe
The team / project / Member rightsmanagement , Meet the needs of various enterprises .
Two 、Apifox It's not just about getting through the data
1、 Interface support “ Use case management ”
The right use case Parameter error use case Data is empty use case Different data state use cases 2、“ Data model ” Definition 、 quote
3、 During debugging “ Automatic verification ” data structure

4、“ visualization ” Set assertion


5、“ visualization ” Set extraction variables

6、 Support database operations

7、“ Zero configuration ”Mock Very human data
Zero configuration 
Zero configuration high efficiency Zero configuration - Apifox According to the data structure in the interface definition 、 data type , Automatic generation mock The rules .
- Apifox Built in intelligence mock Rule base , According to the field name 、 Field data type , Intelligent optimization automatically generated mock The rules . Such as : The name contains the string
imageOfstringThe type field , Automatically mock Give a picture address URL; Include stringtimeOfstringThe type field , Automatically mock Give a time string ; Include stringcityOfstringThe type field , Automatically mock Name a city .
- Apifox According to the built-in rules , Can automatically identify pictures 、 Head portrait 、 user name 、 cell-phone number 、 website 、 date 、 Time 、 Time stamp 、 mailbox 、 Province 、 City 、 Address 、IP Etc , thus Mock Very human data .
- In addition to the built-in mock The rules , Users can also customize the rule base , Meet a variety of personalized needs . Support use
Regular expressions、wildcardTo match field name customization mock The rules .
8、 Generate online interface documentation

9、 Code auto generation
Custom code template 10、 Import 、 export
- Support export
OpenApi (Swagger)、Markdown、HtmlAnd so on , Because you can exportOpenApiFormat data , So you can use OpenApi (Swagger) Rich ecological tools to complete a variety of interface related things .
- Support import
OpenApi (Swagger)、Postman、apiDoc、HAR、RAML、RAP2、YApi、Eolinker、NEI、DOClever、ApiPost、Apizza、ShowDoc、API Blueprint、I/O Docs、WADL、Google DiscoveryAnd so on , Facilitate the migration of old projects .
- Support
Timed automaticImportOpenApi (Swagger)、apiDoc、ApifoxFormat data .
3、 ... and 、 Follow up function planning
- Release Apifox WEB edition , Support the use of... On the browser side Apifox.
- Interface performance test support ( similar JMeter).
- Support plug-in market , You can develop your own plug-ins .
- to open up Apifox API, Allow developers to pass through API call Apifox The function of .
- Support more interface protocols , Such as
GraphQL、gRPC、websocketetc. .
- Support offline use , Project can choose online synchronization ( Teamwork ) Or just local storage ( Stand alone offline use ).
Four 、 more Apifox Function screenshot







nothing 、 Apifox Download address
边栏推荐
- Trust counts the number of occurrences of words in the file
- 【HCIA-cloud】【1】云计算的定义、什么是云计算、云计算的架构与技术说明、华为云计算产品、华为内存DDR配置工具说明
- buuctf-pwn write-ups (9)
- All you want to know about clothing ERP is here
- Einstein sum einsum
- [use electron to develop desktop on youqilin]
- SAP 特征 特性 说明
- C final review
- Use JMeter to record scripts and debug
- Simulate the hundred prisoner problem
猜你喜欢

ConvMAE(2022-05)

AI金榜题名时,MLPerf榜单的份量究竟有多重?

小程序 修改样式 ( placeholder、checkbox的样式)

Various pits of vs2017 QT

The 10th global Cloud Computing Conference | Huayun data won the "special contribution award for the 10th anniversary of 2013-2022"

爬虫01-爬虫基本原理讲解

达梦数据库udf实现

Nacos distributed transactions Seata * * install JDK on Linux, mysql5.7 start Nacos configure ideal call interface coordination (nanny level detail tutorial)

Find in MySQL_ in_ Detailed explanation of set() function usage

U-Net: Convolutional Networks for Biomedical Images Segmentation
随机推荐
进程间通信(IPC):共享内存
The 10th global Cloud Computing Conference | Huayun data won the "special contribution award for the 10th anniversary of 2013-2022"
node_ Exporter memory usage is not displayed
记录Pytorch中的eval()和no_grad()
Personal understanding of convolutional neural network
关于服装ERP,你想知道的都在这里了
【在优麒麟上使用Electron开发桌面应】
Record eval() and no in pytoch_ grad()
Login and connect CDB and PDB
使用JMeter录制脚本并调试
Quickly generate IPA package
深入底层C源码讲透Redis核心设计原理
蚂蚁集团开源可信隐私计算框架「隐语」:开放、通用
lombok @Builder注解
兄弟组件进行传值(显示有先后顺序)
《ClickHouse原理解析与应用实践》读书笔记(5)
音视频包的pts,dts,duration的由来.
《力扣刷题计划》复制带随机指针的链表
[use electron to develop desktop on youqilin]
Is it safe for Apple mobile phone to speculate in stocks? Is it a fraud to get new debts?