The ceiling of domestic API tools is really good for projects

1. The era of API explosion

 

With the recent introduction of various concepts such as mobility, Internet of Things, digital transformation, and micro-services in the industry, the number of corresponding APIs has shown explosive growth. To highlight, we can be hard-pressed to find a suitable technology tool to improve our efficiency. The resulting problem is the cumbersome interface docking, and the front-end and back-end daily quarrels.

1.1 Background introduction

Now we actually have a lot of API tools, well-known in API document design Swagger, API development and debugging we have Postman, front-end development uses more formulas Mock.js, and automated testing we have JMeter, but because it is multiple software, we need multiple inputs Only when the same overlapping data is sent to different systems can we achieve the functions we need, and when the project changes, we have to make modifications in multiple places. If we forget to modify it carefully, it will be a boom.

1.2 Problems elicited

So in order to meet the above requirements, what we need is to integrate these commonly used software together. If the data can be completely interoperable, when we modify one place, all places will be modified, which would be perfect.

1.3 Solutions

 

Apikit is a one-stop API production platform that combines API design, document management, automated testing, monitoring, R&D management and team collaboration. From individual developers to multinational enterprise users, Apikit has helped more than 500,000 developers and 100,000 companies around the world update Develop and consume APIs faster, better and more securely.

Experience link:

https://www.eolink.com/?utm_source=cpcs&utm_content=cpy16

2. Core functions

2.1 API documentation

Eolink Apikit supports powerful API document management functions, including multiple ways to create documents, import and export, version management, duplicate checking, etc.

 

 

2.2 API debugging

After we create an API document, we can immediately test the API. The API R&D management platform provides the following main features to help testers quickly initiate API tests:

  • Support local test, LAN test, online test, etc.;

  • Support one-click switching test environment, use global variables, add additional request parameters, change request address, etc.;

  • Support editing JSON and XML request data directly on the interface, no longer need to handwrite data structures such as JSON and XML;

  • Supports saving test data as test cases, which can be directly used for testing in the future;

  • Support batch test API, such as testing multiple situations of the login interface and returning real-time test data;

  • Supports writing codes for signing, encryption and decryption, generating random data, etc. during the testing process;

 

Legend: JSON data can be written directly in the test interface

 

Legend: switch the test environment in one second and initiate the test

2.3 Mock API

Through the Mock API, you can write the API data generation rules in advance, and Apikit will dynamically generate the API return data. Developers access the Mock API to obtain the data required by the page and complete the docking work. Mock API supports returning different HTTP Status Code, Header, Body and other data according to different request parameters. You can create multiple Mock APIs in one API document to simulate various requests initiated by the front-end to facilitate verification of the front-end logic. When the project is officially released, just replace the address prefix of the Mock API with the actual access address.

 

Legend: This API creates multiple Mock APIs, and the front end can pass different request parameters to obtain the corresponding return results. For example, if the user name is jack liu, it returns a successful login, and when the user name is percy, it returns a login failure or a random string.

2.4 Automated testing

In Apikit's automated test application, all test cases are managed in the project dimension, and an automated test project can reference API information from multiple API document projects to create API test cases.

 

 

Legend: Create automated test cases

3. Other functions

3.1 Powerful code generation

Eolink is a powerful tool that can easily generate test code in various languages. First, users need to identify the specific language they need, which may include Java, Python, C++, etc. Then, through Eolink's user interface or command line interface, enter the relevant code module information, including the name of the module, required input parameters and expected output results. After filling in the information, just click the "Generate" button, and Eolink will automatically create the corresponding test code.

3.2 Data import and export

Eolink provides the function of importing existing API documents with one click, and supports multiple product formats. It is often used in scenarios where data in old projects or old software needs to be migrated after a new project is created.

 

Export supports multiple formats, only you can't think of it.

 

4. Absolute highlights

Eolink supports IDEA plug-in full code comments to automatically generate API test cases

4.1 Plug-in installation

Open the IDEA plug-in store search:

  • Generate EolinkerDoc

  • Eolink ApiKit

 

4.2 Plug-in configuration

Open IDEA setting, search for Eolink, and configure 4 parameters:

  • Server: server address (your own Eolink console domain name).

  • SpaceKey: Space Key.

  • ProjectHashKey: project hashKey, which uniquely identifies an independent project space.

  • Token: The login user identity, which is the registration account assigned when we first registered.

 

API test cases can be generated with one click through the Eolink IDEA plug-in, and synchronized to the personal space of the Eolink console. This plug-in is more important than our handwritten Swagger annotations, and then SwaggerConfig configuration scans the Controller path. After running the back-end service, accessing swagger-ui.html is much more important, and the process is much simpler!

Summarize

After the overall experience, I can only say that Eolink Apikit is very powerful, making API management easier. For example, this case: it is used to design APIs, and is associated with code warehouses such as Gitlab to automatically generate API documents from Java codes. After writing a new API document, tools such as Codegen can be used to generate code templates, and Jenkins can be combined to form an automated pipeline. It's perfect, so efficient that it flies!

Experience link:

https://www.eolink.com/?utm_source=cpcs&utm_content=cpy16

Guess you like

Origin blog.csdn.net/kungfuboy17/article/details/130719615