当前位置:网站首页>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 + JMeter
2、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
visualization
Document management function , Zero learning cost , Very efficient . And support online sharing of interface documents .
- Data model: Reusable data structure , Defining interfaces
Return data structure
AndRequest 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 case
Button , 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 correct
Use cases 、Parameter error
Use cases 、Data is empty
Use cases 、Different data states
Use 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 configuration
that 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 required
The 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 code
AndBack end business code
.
- Teamwork:Apifox Born for teamwork , Interface cloud real-time synchronous update , ripe
The team / project / Member rights
management , 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
image
Ofstring
The type field , Automatically mock Give a picture address URL; Include stringtime
Ofstring
The type field , Automatically mock Give a time string ; Include stringcity
Ofstring
The 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
、wildcard
To 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
、Html
And so on , Because you can exportOpenApi
Format 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 Discovery
And so on , Facilitate the migration of old projects .
- Support
Timed automatic
ImportOpenApi (Swagger)
、apiDoc
、Apifox
Format 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
、websocket
etc. .
- 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
边栏推荐
- 7-2 keep the linked list in order
- About statistical power
- [QNX Hypervisor 2.2用户手册]6.3.2 配置VM
- 小程序 修改样式 ( placeholder、checkbox的样式)
- node_ Exporter memory usage is not displayed
- [use electron to develop desktop on youqilin]
- The 11th China cloud computing standards and Applications Conference | China cloud data has become the deputy leader unit of the cloud migration special group of the cloud computing standards working
- 文章中的逻辑词
- [HCIA cloud] [1] definition of cloud computing, what is cloud computing, architecture and technical description of cloud computing, Huawei cloud computing products, and description of Huawei memory DD
- 案例分享|金融业数据运营运维一体化建设
猜你喜欢
Isprs2022/ cloud detection: cloud detection with boundary nets
Various pits of vs2017 QT
LeetCode 6109. Number of people who know the secret
vulnhub之darkhole_2
The main thread anr exception is caused by too many binder development threads
Vulnhub's darkhole_ two
Use QT to traverse JSON documents and search sub objects
如何写出好代码 - 防御式编程
彻底理解为什么网络 I/O 会被阻塞?
How to automatically install pythn third-party libraries
随机推荐
蚂蚁集团开源可信隐私计算框架「隐语」:开放、通用
在通达信上做基金定投安全吗?
ROS安装报错 sudo: rosdep:找不到命令
Trust counts the number of occurrences of words in the file
[paddlepaddle] paddedetection face recognition custom data set
IDEA配置npm启动
Case sharing | integrated construction of data operation and maintenance in the financial industry
@Extension, @spi annotation principle
Maximum artificial island [how to make all nodes of a connected component record the total number of nodes? + number the connected component]
Use JMeter to record scripts and debug
如何写出好代码 - 防御式编程
Nacos distributed transactions Seata * * install JDK on Linux, mysql5.7 start Nacos configure ideal call interface coordination (nanny level detail tutorial)
中文版Postman?功能真心强大!
个人对卷积神经网络的理解
LeetCode 6111. Spiral matrix IV
达梦数据库udf实现
Introduction to Resampling
彻底理解为什么网络 I/O 会被阻塞?
技术分享 | 接口测试价值与体系
Is it safe for golden sun to open an account? Can I open an account free of 5 in case?