当前位置:网站首页>Introduction to apifox
Introduction to apifox
2022-06-28 18:19:00 【Hua Weiyun】
Apifox Introduce
Apifox yes API file 、API debugging 、API Mock、API Automated testing integrated collaboration platform , location
Postman + Swagger + Mock + JMeter. Through a system 、 A piece of data , Solve the problem of data synchronization between multiple systems . Just define API file ,API debugging 、API data Mock、API Automated testing can be used directly , There is no need to redefine ;API Documentation and API Development and debugging use the same tool ,API After the commissioning, it can be guaranteed and API The document definition is exactly the same . Efficient 、 In time 、 accuracy !
download PPT
need Apifox Function is introduced PPT Version of ( Can be used for sharing within the team / Extension Apifox), You can click the following link to download .
[Apifox Function is introduced ppt Format ](https://cdn.apifox.cn/www/assets/ppt/Apifox-API file 、API debugging 、API Mock、API Automated testing integrated collaboration platform .pptx)
[Apifox Function is introduced pdf Format ](https://cdn.apifox.cn/www/assets/ppt/Apifox-API file 、API debugging 、API Mock、API Automated testing integrated collaboration platform .pdf)
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
It's very difficult to maintain data consistency between different tools 、 Inefficient . And it's not just about the workload , The bigger problem is data inconsistency between multiple systems , Leading to inefficient collaboration 、 Frequent problems , Developers and testers are in agony .
- 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 + JMeterApifox yes API file 、API debugging 、API Mock、API Automated testing integrated collaboration platform .
Through a system 、 A piece of data , Solve the problem of data synchronization between multiple systems . Just define the interface document , Interface debugging 、 data Mock、 Interface testing can be used directly , There is no need to redefine ; Interface documentation and interface development debugging use the same tool , After the interface debugging is completed, it can ensure that it is completely consistent with the interface document definition . Efficient 、 In time 、 accuracy !
2、Apifox function
- Interface design :Apifox Interface documentation follows OpenApi 3.0 ( primary Swagger)、JSON Schema At 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-in Mock.js Rules 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 request : 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
If you think Apifox We just got the data through , To improve the efficiency of the R & D team , It would be wrong .Apifox And a lot of innovation , To improve the efficiency of developers .
1、 Interface support “ Use case management ”
Usually, an interface has multiple use cases , such as The right use case Parameter error use case Data is empty use case Different data state use cases . Define these different states of use cases when defining interfaces , Interface debugging directly run , Very efficient .
2、“ Data model ” Definition 、 quote
Data models can be defined independently , The data model can be referenced directly when defining the interface , Data models can also refer to each other . Same data structure , Just define it once and use it in many places ; Only one modification is needed , Multiple live updates , Avoid inconsistencies .
3、 During debugging “ Automatic verification ” data structure
Use Apifox When debugging the interface , According to the definition in the interface document , Automatically check whether the returned data structure is correct , It is not necessary to identify with the naked eye , There is no need to manually write assertion scripts to detect , Very efficient !

4、“ visualization ” Set assertion
Set assertion :

After operation , Look at the assertion results :

5、“ visualization ” Set extraction variables

6、 Support database operations

7、“ Zero configuration ”Mock Very human data
Let's start with a picture Apifox And other similar tools Zero configuration mock The result of the data is :

It can be seen that Apifox Zero configuration Mock The data is very close to the real situation , Front end development can use , You don't have to write it manually mock The rules .
Apifox How to do high efficiency 、 Zero configuration It's very human mock data
- 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
Apifox Project can “ Share online ” API file , Shared API Documents can be set to public or require password access , It's very convenient to work with external teams .
Experience address :https://www.apipark.cn/s/ce387612-cfdb-478a-b604-b96d1dbc511b/http/5041285

9、 Code auto generation
Define according to the interface model , Automatic generation of various languages / frame ( Such as TypeScript、Java、Go、Swift、ObjectiveC、Kotlin、Dart、C++、C#、Rust etc. ) Business code of ( Such as Model、Controller、 Unit test code, etc ) And interface request code . at present Apifox Support 130 Code generation for languages and frameworks .
what's more : You can go through Custom code template To generate code that meets your team's architectural specifications , Meet a variety of personalized needs .
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
- 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

















5、 ... and 、 Apifox Download address
Please visit Apifox Download from the official website :https://www.apifox.cn/
边栏推荐
- CORBA 架构体系指南(通用对象请求代理体系架构)
- Can data sources only be connected to Alibaba cloud cloud databases? Can't you connect the databases installed in Alibaba cloud servers?
- NP tips: random create random matrix sample = np random. random([19, 64 , 64, 3])
- 麻醉不止“打一针”那么简单,无痛、安全、舒适为患者首选
- Database mysql statement final review CTGU
- Mycat+ sub database and sub table
- [algorithm] I brushed two big factory interview questions and learned array again with tears in my eyes“
- Redis6笔记04 主从复制,集群,应用问题,Redis6新功能
- 剑指 Offer 11. 旋转数组的最小数字
- 使用Pega进行一个简单的RPA程序开发
猜你喜欢
![[algorithm] I brushed two big factory interview questions and learned array again with tears in my eyes“](/img/ab/69c79690bf42c58c39b2e85fb3690c.png)
[algorithm] I brushed two big factory interview questions and learned array again with tears in my eyes“

Applet graduation design based on wechat gym private education appointment applet graduation design opening report function reference

58 Technology Salon issue 31 flutter dynamic special Salon

Le test de reconnaissance faciale comporte - t - il des préoccupations en matière de protection de la vie privée? Une entreprise étrangère a été arrêtée en cas d'urgence

EasyExcel 学习笔记

Matlb| visual learning (plot and bar)

Win10 compiles curl library source code with cmake3.22 and vs2019 and calls

Google launches advanced API security to protect APIs from security threats

NFT流动性协议的安全困局—NFT借贷协议XCarnival被黑事件分析

Kubernetes visual interface dashboard
随机推荐
数字化转型中,企业设备管理会出现什么问题?JNPF或将是“最优解”
2022 operation of simulated examination platform of hoisting machinery command examination question bank
GCC getting started manual
The MySQL installed in Alibaba cloud server is version 8. Is it because the MySQL driver version of dataworks does not support it? Now mention
Mycat+分库分表
为什么 insert 配置 'SELECT LAST_INSERT_ID()' 返回个0呢?
Analysis of response parsing process of SAP ui5 batch request
Database mysql statement final review CTGU
The fourth column, kubernetes cloud native combat, is coming ~
NFT流动性协议的安全困局—NFT借贷协议XCarnival被黑事件分析
Redis 原理 - Hash
From getting started to mastering the application of | yalmip+cplex in power system (excellent, I will lose if I can't understand it, and I will lose if I don't gain)
IDC: Alibaba cloud ranks first in the market share of China's data governance platform in 2021
DMS的SQL结果集导出支持传参数吗?
请问大智慧上开户安全吗
2022年化工自动化控制仪表考试模拟100题模拟考试平台操作
The most complete 360 software test case template without dead corners in the whole network [recommended collection]
你们采集oracle数据,数据延迟大约有多少啊?我这边就维持在3秒了,降不下去了。有没有个业内参考啊
想请教股票开户找人办比较方便么?网上开户安全么?
MCU modifies network hardware driver (PHY chip replacement)