Use the Lim test platform to quickly complete batch number creation

I. Introduction

In our normal testing process, we often encounter situations where a large amount of data needs to be created, such as: testing the paging function, performance pressure testing, data preparation, etc.

At this time, we can achieve it by writing scripts or tools such as jmeter, but these methods are not friendly when working in a team. When others also need to create numbers, they need to use your code. You have to spend some time on environment configuration and code management. Even if you use jmeter to run, you need to configure the environment. It also doesn't improve much efficiency. When there are more similar scripts later, it will become more and more difficult to manage.

To solve this problem, we can use the Lim test platform to solve it. Lim can classify and hierarchically manage the scripts of each module. When you need to create a certain data, you can directly search or enter the corresponding module to find the use case for creating numbers, and then Just execute it directly:

So how to use Lim to write a script for batch number creation? Let me tell you through a case.

2. Practical tutorial

1) Scenario Description

Suppose we have an interface for creating projects (address: /project/project-view) , and now we want to create 1000 pieces of data with unique project names.

2) Detailed tutorial

Enter the lim platform-interface test module, and click the new button on the right:

Then create a loop controller as shown below:

Then enter the number of cycles 1000 in the circulator, and add an interface step:

Fill in the request parameters:

Because our project names need to be unique, we can use code patterns to make project names unique:

The project names output by the following code are: project 1, project 2, project 3, ..., the i in the code represents our loop subscript value:

Then save the use case and click the execute button in the figure below to start creating our project:

Execution result (because we are here to demonstrate the effect, the number of loops has been changed to 10)

The generated project data is as follows:

3. Summary

It can be seen that it is also very fast and convenient to create number creation scripts through Lim, and the management and maintenance are also very simple. When other colleagues want to create numbers, they can directly execute the use case, and there is no need for additional environment configuration and other preparations.

In addition, Lim has other powerful functions, such as comprehensive parameter management and execution parameter setting:





Guess you like