Performance Test project Summary-Preparation of virtual data

Source: Internet
Author: User

Abstract: This article is mainly for performance testing engineers, from the actual project experience, lessons, and put forward some suggestions for improvement, I hope you can in the future performance testing of the project to draw lessons from, this article especially in the performance test in the pre-data preparation of the solution.

Keywords: test case; performance test; test process

Project Introduction

The project is a project two years ago, at present, the performance of the system under certain conditions, the speed is very slow, when the user reaches a certain level, the entire program will be unable to respond, so it is necessary to perform performance testing of the project, to find the bottleneck of the system, for the future of the system to be fully prepared for the upgrade.

Reasons for Project Extension

XXX project has been completed, in the whole project testing process encountered a lot of difficulties, due to various reasons cause the project extension, where virtual data preparation is one of the important links.

Because the first time to do such a project, the preliminary data preparation is unreasonable, the project test design inevitably exist some problems, in the process of the project encountered a variety of problems, such as the use of tools, in order to prepare the virtual data in the test execution, design SQL The script delays most of the time of the project, and the following problems arise:

1. Insufficient understanding of the pre-needs (demand understanding time is too short), the test plan to give the need to understand the time is not enough, so if the understanding of some functional points is not sufficient, so that the problem will be left to the test execution process, and then you will be in the test implementation of the issue, and customer communication, which inevitably lead to project

2. The use of tools is not skilled, in fact, if a project for performance testing, staffing aspects must have (at least one) experienced engineers to participate in the project, so as to reduce the risk of the project, because the project team experienced engineers travel, So we have to take part in the testing of the project by our inexperienced staff in the case of self-study or training, in which case, we will have a time to be familiar with the test tool, and obviously there will be many problems in the process of learning comprehension. Unresolved issues are brought to the project execution process, and unexpected errors are encountered during the execution of the project, which can take a fraction of the time to resolve.

3. The most important link is the preparation of virtual data, of course, the first time to do such a project in this area and do not have much experience, in the test execution, only the design of SQL statements, data added, during the test execution, the design of the SQL statement will spend most of the time.

Improvement recommendations

According to the above problems, combined with the experience in this project, to give the following performance testing improvements in the recommendations, in the future performance testing of the project to avoid such a problem recurrence, so that the project can be completed in accordance with the progress of a smooth, to achieve the desired test purposes.

1. In terms of demand understanding, it is recommended to understand the functional points for some preparation tests, to communicate with the Test lead or customer as soon as possible, and to resolve the problem, and to avoid leaving the problem to the test execution. When doing a test plan, The time required to understand the requirements based on the size of the project and the amount of work given by the customer.

2. The use of tools, you can in peacetime time to study, a project end with another project start between the general will have a period of time, in this time can go to learn testing tools, and to have targeted learning, do not blindly study (both learn LR, also learn QTP), Try to learn a door and then learn a door (to achieve basic will use the tool to do the project), do not be anxious, in the course of learning to do a learning note, to facilitate your future inspection; The Test team can also properly train the staff.

3. For the preparation of virtual data, there are generally two scenarios in the Performance test project:

1) Fixed user volume, data volume increment in database , test the performance of this function point;

2) fixed database data volume, the number of users increased, testing the performance of the function point, in fact, this will be divided into two test cases (of course, this is not a full scene test), such as:

TestCase 01:20 users online, a total of 200 items, custom display default (20 items/page, 8 columns/page), the corresponding time of the system in the case of increasing number of other project records in the database.

TestCase 02: Use case Description: Fixed database problem number is 200,000, the number of project problem cards used 1000, custom display (20/page, 8 columns/page), browse the user's increasing response time;

Situation one (after recommendation): Prerequisites: TestCase 01 and TestCase 02 The data (problem card) accessed is the database of the same table;

1> When you add 50,000 data, execute TestCase 01, record the result, and then add 50,000 data, the amount of data is 100,000, then execute TestCase 01, record the result;

2> when the added data equals 200,000, that is, TestCase 02 of the fixed use of data, you can set the TestCase 02 Test scene Design User amount to 10, 15, and so on, then execute testcase 02 This use case, record the results;

This is the overall consideration, simply to consider the data in each test case to use which table in the database, there may be many test cases using the same database table, it is necessary to take into account the amount of data in the table to how much time, the execution of which test cases, not blindly follow a test case, Add virtual data until the use case is executed, and so on when the next use case is executed, all the data for that table is deleted, and then the amount of data required by the use case continues to be added.

Scenario two (pre-recommendation): If you have been adding data after executing TestCase 01, you perform TestCase 02 when the data volume of the database has reached 500,000, TestCase 02 of the Fixed usage data volume is 200,000, You also need to write a SQL script to delete 300,000 of the amount of data to reach the TestCase 02 the amount of data required to execute, so it is more than the case to write a SQL script to delete the data process, in fact, is not a step more, Where: T2 (the time of the situation two) =t (time to write debug sql) +t (execute delete 300,000 data volume), and for 300,000 of the amount of data deleted time will also be relatively long period of time, so that the improved scheme T1 (situation time) <t2 (the situation two times).

In short, of course, this is the same table for two use case access, if more than one use case will be accessed to a table, it can be considered globally, when testing the design should be taken into account, the implementation of the procedure or the implementation of the program as a document to guide the test execution, This will not be in the test to add data blindly in accordance with the test number sequence to add data, the execution of test cases, regardless of the test cases between the data preparation of the connection, but can be based on a well-designed test outline and documentation for effective test execution, test data preparation can be carried out according to the following process: First, Write the test case, second, according to the overall consideration of the test case, the design of the SQL script, and can do a document, the SQL number and test cases to record the corresponding relationship, and to write out the order of the execution of test cases, which is not in accordance with the number of test cases in the order of execution, test execution, Execute the "Add data and test Flow" as designed by the whole. Here is a complete sequence of design test flow and a few documents of the template, you can take a look.

First, write the test case:

Testcase 01 Use case Description: Fixed user 30 people, page display (50/page, 4 columns/page). Each statistic user uses daily data to increase the response time of the case.

Testcase 02 Use case description: Fixed daily data for 300,000 articles. Each statistic user uses the data fixed to 10,000 bars. Page display (50 Records/page, 4 columns/page). Browse the user's response time in an ever-increasing situation.

Based on the above test cases, you can design a SQL script to add virtual data, and then document the SQL scripts you have designed and test cases according to the following documents, and then design the test process.

II. Writing SQL scripts

such as: Declare

P number;

Q number;

Begin

P: = 15424;

Q: = 0;

While p<=15503 loop

Select Qmtools. Prproblemseq.nextval to Q from dual;

INSERT into Prproblem (Prproblemid, Prrecordid, Prpbtypeid, Prbdescribe, PRESENTER, SOLVE, StaffID,

Factsolvedate, Facteff, Prstateid, ModuleID, Confirmstaff, Confirmdate, Preflag, MEMO, Preworkload,

POSITION, Pbmovekind, Milestoneid, Pbgrade, Pbpincheff) VALUES (

Q, p, a, ' ertre ', ' pmz5 ', ' Erteert '

, 5489, To_date (' 12/16/2006 12:00:00 a.m. ', ' mm/dd/yyyy HH:MI:SS am '), 33, 2, 8903

, ', NULL, 0, ' Ertret ', 0, ' ert '

, ' demand understanding ', 0, ' C ', 3);

P: =p+1;

End Loop;

End

Name the SQL script S1 and log to the following table:


The table is designed to correspond to the SQL scripts and test cases that you design, and to describe the variables clearly, to take advantage of the design test process, and to understand the meaning of each variable as you execute the SQL statements.

Third, design test process

According to the above script and test case correspondence table and test case, when executing SQL script and Testcase01, when the amount of data reaches 30, that is, the amount of data of TESTCASE02 fixed database, this time, set TESTCASE02 scene, It is possible to complete all the conditions of the Testcase02, that is, the TESTCASE02 has the highest priority, after execution will execute the state to hit √. So the whole design is very good for future execution, and you can execute the SQL scripts and test cases according to the test process of the following design when you formally start executing the test cases.

Summarize

Performance testing first of these necessary design in the pre-design, so as not to wait until the test execution time to design, so that will prolong the project progress, but also cause unexpected risks, I hope this article can give you some good reference, at the same time also hope that we can give the method to put forward better opinions and suggestions, Improve the quality of our process improvement. Due to the haste of time, there will inevitably be clerical errors, please criticize, correct.

Reprint: http://www.51testing.com/html/45/n-16345.html

Performance Test project Summary-Preparation of virtual data

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.