The installation and use of Apifox will not learn you come to me

Table of contents

1. Introduction

2. Installation

3. Use

1. Introduction

Apifox is an integrated tool for the whole process of interface management, development and testing  Postman + Swagger + Mock + JMeter. As long as the interface document is defined, interface debugging, data mocking, and [interface testing] can be used directly without redefining.

  1. The status quo in the development and testing process

yapi — management interface documentation

rap — [front-end development] mock data

[postman] — develop debugging interface, test calling interface

[jmeter] — basic stress test

  1. Problems and pain points

  2. There may be inconsistencies between the interface document and the actual developed interface data type, resulting in the unification of the front and back ends, and problems encountered during testing, which is time-consuming;

  3. An interface is defined at least four times: during server development and debugging, during front-end development and mocking, during interface testing, and during jmeter stress testing. When the demand is large and the development and testing time is tight, it is a waste of resources to define the interface repeatedly;

  4. In the test, it is sometimes necessary to change the database data and then call the interface to test, and it is troublesome for frequent operations; 

  5. Problems that can be solved with apifox

  6. Improve the normative type of the data type of the development interface, both the front and the back end fully comply with the specification of the interface definition, which makes the joint debugging smoother;

  7. Improve the smoke passing rate of the server. After the interface is developed and defined and adjusted, it can be saved as a test case immediately. The test can write the interface test case in advance according to this template for the development self-test before the test is proposed;

  8. Data sharing, you only need to develop and define an interface once, you can implement a variety of operations, reduce the probability of interface debugging failure caused by problems such as configuration errors, and save a certain amount of time;

  9. Connect to the database and quickly prepare the required test data;

2. Installation

After downloading the installation package, you can install it with one click. Download link: Apifox – API Documentation, Debugging, Mock, Testing Integrated Collaboration Platform – Interface Documentation Tool, Interface Automated Testing Tool, Interface Mock Tool, API Documentation Tool, API Mock Tool, API Automated Testing Tool

3. Use

  1. Usage scenarios

Backend development

  • Interface document management

  • Automatic generation of backend code

  • Interface debugging

  • Interface self-test

Front-end development

  • Interface document management

  • Interface Data Mock

  • Interface debugging

  • Front-end code is automatically generated


  • Interface debugging

  • interface test

  • Performance Testing

  • Basic functions

1) Teamwork

Interface data cloud synchronization, real-time update; support team/project administrators, ordinary members, read-only members and other rights management

  • After installation, log in to your account and be invited by team members to join. After passing, you can share the interface data of all projects in the team

2) Import and export

import interface document

Take YApi as an example

  • From the yapi platform, select Services – Data Management, export a file in json format

  • apifox – interface management – import, select data format as YApi, import json file

  • After the import is successful, click Interface Management to see the imported interface data. 

Import capture data

3) Interfaces & Use Cases

Define the request information, basic status information, and response sample information of the interface

Process and assert data through pre- and post-operations;

The response data structure defined in the interface is automatically verified, and the response checkpoint can also be customized

test case set

Test cases are mainly used for interface collection testing. Each use case contains multiple test steps, and each step is an interface request.

View test report

You can view the historical execution records. At present, the test report data is only stored in the local computer

basic performance test

When executing a use case, the number of loops and threads can be set, and batches of test data can be imported

4) Quick mock

Automatically generate test data according to the data structure defined by the interface, without configuring mock rules, which is convenient for front-end debugging

5) Management and use of variables

Remote values ​​can be configured for public data: “remote values” will be saved to the server synchronously, only for mutual synchronization between members, and “local values” are read and written in actual runtime.

Configurable local values ​​for your own test data: “local values” are only stored locally, not synced to the server, nor are team members synced with each other

External use variable: {{variable name}

Get/set variables in scripts: via get/set

6) Database connection

Project Settings – Database Connections, manages connected databases

The database connection information is only stored locally and will not be synchronized to the cloud, so you need to set it manually when using it

7) Custom script

apifox supports scripts in multiple languages: java, python, PHP, js, etc.

take a chestnut

Customize python script to get external parameters

In the specified directory, put your own script

apifox call script, pass parameters

Leave a Comment

Your email address will not be published. Required fields are marked *