Current location - Loan Platform Complete Network - Big data management - Dry goods are full of them! How to construct various test data while testing?
Dry goods are full of them! How to construct various test data while testing?

Test data for functional testing is generally manually constructed.

If you need to construct a large amount of data, you have to analyze the test requirements and analyze the input test data after an accurate and clear analysis.

On the one hand, we require that the test data be as consistent as possible with the data in the production environment, and that it be as meaningful as possible, either by analyzing the data using existing systems or by constructing the data based on business characteristics.

On the other hand, we require that the test data inputs satisfy the input restriction rules, covering as many different types of data as possible that satisfy the rules.

Methods for generating test data:

① Write sql scripts (stored procedures) to generate them directly on the database side;

② Write program code to generate them (actually write sql as well);

③ Use the batch data generation tools (DataFactory, PL/SQL Developer, TOAD, etc. can be);

④ use the tool to record the business parameterization after a long run to generate.

But using sql to do it is the most flexible, especially when it comes to business data conversion needs to fully consider the internal processing logic and constraints.

When we do software testing, we often need a bit of data on the page, especially when it comes to some statistical test cases, it is necessary to have a constant flow of test data to allow the front-end page to generate corresponding reports to test the correctness of the statistical data. If we manually manipulate the business process to achieve the construction of data, a small amount of data may be okay, a lot of data will make the test efficiency straight down.

So as a test, we often need to use some tools to simulate the business process, send some traffic, and thus construct the data displayed on the front-end page.

Well, there are many tools that can construct traffic:

For example, for interface testing, the Jmeter tool can read a file to construct data via CSV;

For stress testing, Loadrunner, Jmeter, or avalanche and Ixia can do different orders of magnitude of data construction.

For example, in stress testing, Loadrunner, Jmeter, or avalanche and Ixia, all of these tools allow you to construct different orders of magnitude of data to continually stress the product;

For example, you can add data directly to the database through SQL scripts to construct massive amounts of data;

......

Of course, each of these tools and methods can be classified as a specialized testing area, such as interface testing, performance testing, big data testing, etc.; the methods we are going to talk about today are relatively lightweight some of the tools that are easier for people to grasp and get started with, and they can be used to send traffic directly through the Linux commands, which is simple, convenient, and fast!