当前位置:网站首页>Goodbye, postman. One thing to say: apifox is yyds
Goodbye, postman. One thing to say: apifox is yyds
2022-04-22 07:12:00 【Add soldier】
As a software development practitioner ,API Debugging is an essential skill , In this regard Postman Well done . But throughout the software development process ,API Debugging is only part of it , There's a lot more Postman Unable to complete , perhaps It can't be done efficiently , such as :API Document definition 、API Mock、API Automated testing, etc .Apifox It was created to solve this problem .
One 、 Interface status :
- Use Swagger management API file
- Use Postman debugging API
- Use RAP 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 RAP 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 RAP 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 RAP.
- 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
3、 ... and 、 How to solve these problems
1、Apifox location
Apifox = Postman + Swagger + Mock + JMeter
Apifox 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 Purpose
Save every minute of the R & D team !
3、Apifox function
Interface design Apifox Interface documentation follows OpenApi 3.0 ( primary Swagger)、JSON Schema At the same time , Provides a very easy to use visual document management function , Zero learning cost , Very efficient . And support online sharing of interface documents .
Data model : Reusable data structure , Define the interface return data structure and request 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 the save as use case button , Interface use cases can be generated , 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 , For example, the parameters are correct, and the use case 、 Parameter error use case 、 Data is empty use case 、 Different data state 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-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 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 , The main purpose is to temporarily debug some interfaces that do not need to be documented , You can quickly debug without defining the interface in advance .
Code generation : Define according to the interface and data model , The system automatically generates the interface request code 、 Front end business code and back-end business code .
Teamwork : Apifox Born for teamwork , Interface cloud real-time synchronous update , A mature team / project / Member rights management , Meet the needs of various enterprises .
Four 、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 !

Apifox Automatic verification of data structures
4、“ visualization ” Set assertion
Set assertion :

Apifox 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 :

Apifox Mock Data results compared with similar tools
-
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 be efficient 、 Zero configuration generation is very user-friendly 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 image Of string The type field , Automatically mock Give a picture address URL; Include string time Of string The type field , Automatically mock Give a time string ; Include string city Of string 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
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 customize the code template to generate code that conforms to your team's architectural specifications , Meet a variety of personalized needs .
10、 Import 、 export
Support export OpenApi (Swagger)、Markdown、Html And so on , Because you can export OpenApi Format data , So you can use OpenApi (Swagger) Rich ecological tools to complete a variety of interface related things .
Support import OpenApi (Swagger)、Postman、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 .
3、 ... and 、 Follow up function planning
Release Apifox Web version .
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

Interface debugging















版权声明
本文为[Add soldier]所创,转载请带上原文链接,感谢
https://yzsam.com/2022/04/202204220608311028.html
边栏推荐
- Scheme selection table of USB audio chip / typec audio and video processing chip
- [review of Blue Bridge Cup] tree of life
- 从 Spec.到芯片_(数字IC、模拟IC、FPGA/CPLD设计的流程及EDA工具)
- Oracle JDK vs OpenJDK
- A solution to the error of selecting objects in pyautocad
- Mcs-5 interrupt technology (practice)
- 集成电路模拟版图入门-版图基础学习笔记(五)
- RT thread software package production and release process
- Chip design how to prepare for the upcoming autumn recruitment and spring recruitment in the coming year?
- Difference between analog IC design and digital IC design, including salary table
猜你喜欢

Replace Fe1 1s, ma8601, cost-effective, Chinese solution, Qiyan primary agent, Hub solution

Introduction to IC Analog Layout - learning notes on layout Basics (2)

Nacos命名空间分组和DataID三者关系

Nacos服务提供者注册

Changes in the number of different types of calls in different months in 911 data

STM32 learning record 0003 -- Interpretation of STM32 chip

pyautocad 选择对象报错的解决方案

STM32学习记录0002-STM32初探

Design of second-order RC low-pass filter for PWM wave to DC

MATLAB:去除音频信号噪音
随机推荐
STM32 timer ocref output configuration timx - > CCER
Solution of overdetermined equation
论文快速阅读的方法技巧
Leetcode268: missing number
Application of can card in robot system
Experiment 4 cycle program design
送给所有程序员的新年祝福&新年愿望
阿里云部署RSSHub踩坑笔记
Typical application cases of can optical fiber converter and can bus optical transceiver in fire Networking (buildings, factories, offshore wind power, pipe gallery, etc.)
微信支付 iframe子页面 无响应
pyftpdlib中文乱码问题解决方案
微电子专业是做芯片的吗?芯片和什么专业有关?
RSS pit entry Guide
力扣299:猜数字游戏
Alibaba cloud's deployment of tiny RSS
Difference between analog IC design and digital IC design, including salary table
51单片机:D/A数模转换实验
STM32 learning record 0003 -- Interpretation of STM32 chip
Nacos之服务配置中心
A solution to the error of selecting objects in pyautocad