CN102486748B - Method and device for performance test - Google Patents

Method and device for performance test Download PDF

Info

Publication number
CN102486748B
CN102486748B CN201010570268.0A CN201010570268A CN102486748B CN 102486748 B CN102486748 B CN 102486748B CN 201010570268 A CN201010570268 A CN 201010570268A CN 102486748 B CN102486748 B CN 102486748B
Authority
CN
China
Prior art keywords
information
database
data
script
performance test
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN201010570268.0A
Other languages
Chinese (zh)
Other versions
CN102486748A (en
Inventor
黄晓勤
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Qingdao Kingdee Software Technology Co ltd
Original Assignee
Kingdee Software China Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Kingdee Software China Co Ltd filed Critical Kingdee Software China Co Ltd
Priority to CN201010570268.0A priority Critical patent/CN102486748B/en
Publication of CN102486748A publication Critical patent/CN102486748A/en
Application granted granted Critical
Publication of CN102486748B publication Critical patent/CN102486748B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Abstract

The embodiment of the invention discloses a method and a device for a performance test. The method provided by the embodiment of the invention comprises the following steps: generating a data preparation script according to a table structure of a database, wherein the data preparation script is used for importing data information into the database; executing the data preparation script, and importing the obtained basic data information into the database; associating the basic data information imported into the database with the obtained service data information; executing the data preparation script, and importing the service data information into the database, into which the basic data information is imported; recording a performance test script for the database, into which the basic data information and the service data information are imported; and performing the performance test on the database by utilizing the data preparation script and the performance test script. The embodiment of the invention also discloses a related device by which the performance of a tested system is efficiently increased.

Description

A kind of method of performance test and device
Technical field
The present invention relates to software performance test technical field, particularly relate to a kind of method and device of performance test.
Background technology
In software development process or after software development completes, in order to whether testing software can get a desired effect, generally all need to carry out performance test to software, it mainly formulates performance test scheme for the performance index of system, implementation of test cases, show whether the performance index that test result carrys out verification system meet predetermined value, comprise the ability of system various aspects in performance index, as system concurrency processing power, batch service processing power etc.
When carrying out performance test to software, need recording performance test script, utility test script could realize the performance test to software, but because performance test script associates with database, make to need to record multiple performance test script to the database test identical function of same type, and the test of the database identical function of same type only can not be completed with a performance test script, add the workload that script is recorded and debugged, too increase the maintenance cost of database, the test performance of test macro is low.
Summary of the invention
Embodiments providing a kind of method and device of performance test, for realizing being separated of performance test script and database, improving the performance of system.
The method of the embodiment of the present invention comprises: the list structure according to database generates data encasement script, and data encasement script is used for data message to import database; Perform data encasement script, the base data information obtained is imported database, and base data information is the basic data that system is general; The Business Information information of the base data information with acquisition that import database associated, Business Information packets of information contains data corresponding to special object; Perform data encasement script, Business Information information is imported the database having imported base data information; To the database recording performance test script importing base data information and Business Information information; Usage data prepares script and performance test script carries out performance test to database.
The device of the embodiment of the present invention comprises: generation unit, generates data encasement script for the list structure according to database, and data encasement script is used for data message to import database; First performance element, for performing data encasement script, the base data information obtained is imported database, and base data information is the basic data that system is general; Associative cell, for the Business Information information of the base data information with acquisition that import database being associated, Business Information packets of information contains data corresponding to special object; Second performance element, for performing data encasement script, imports the database having imported base data information by Business Information information; Recording elements, for the database recording performance test script importing base data information and Business Information information; Test cell, prepares script for usage data and performance test script carries out performance test to database.
As can be seen from the above technical solutions, the embodiment of the present invention has the following advantages:
Prepare script by construction data and base data information is imported database, and import database after Business Information information being associated with base data information, according to database recording performance test script, realize the object that performance test script is separated with database, performance test script is made to may be used for testing the identical function of the database of same type, decrease script and record the workload with debugging, improve the test performance of test macro.
Accompanying drawing explanation
Fig. 1 is a schematic diagram of a kind of performance test methods of the embodiment of the present invention;
Fig. 2 is another schematic diagram of a kind of performance test methods of the embodiment of the present invention;
Fig. 3 is a schematic diagram of a kind of performance testing device of the embodiment of the present invention;
Fig. 4 is another schematic diagram of a kind of performance testing device of the embodiment of the present invention.
Embodiment
Embodiments providing method and device that a kind of performance test script is separated with database, for realizing being separated of performance test script and database, improving the performance of system.
Refer to Fig. 1, be the embodiment of a kind of performance test of the embodiment of the present invention, comprise:
101, data encasement script is generated;
Before system carries out performance test to the identical function of the database of same type, the list structure according to database is generated data encasement script, wherein, data encasement script is used for data message to import database.
102, the base data information obtained is imported database;
After system generated data prepares script, data encasement script will be performed, the base data information obtained is made to be imported into database, base data information is the basic data that system is general, the field information that all modules in system can use, such as customer name, vendor name, name of product etc.
103, the Business Information information of the base data information with acquisition that import database is associated;
After base data information is imported into database, the Business Information information of the base data information with acquisition that import database associates by system.Wherein Business Information packets of information contains data corresponding to special object, the outbound list/storage bill data of such as certain product, data of the purchase series products of certain client etc.
104, Business Information information is imported the database having imported base data information;
After base data information is associated with Business Information information, system performs data encasement script, Business Information information is imported the database having imported basic data information.
105, recording performance test script;
After data to importing database, system is by the database recording performance test script importing base data information and Business Information information, and performance test script is used for carrying out performance test to database.
106, performance test is carried out to database.
After performance test script has been recorded, the data encasement script of available generation and the performance test script of recording are tested database, and the database carrying out testing must be same type and be the test to identical function.
In embodiments of the present invention, by generating data encasement script, base data information is imported database, again the Business Information information after associating with base data information is imported database realizing, to such database recording performance test script, can being separated of fulfillment database and performance test script, performance test script after recording can be used for the test of the database identical function of same type, decrease script and record the work with debugging, the system of effectively raising carries out the efficiency of performance test.
In order to better describe technology of the present invention, referring to Fig. 2, being another embodiment of the method for a kind of performance test of the embodiment of the present invention, comprising:
201, create new database or obtain existing database;
In embodiments of the present invention, the database for recording performance test script can be the database with the identical type of database will carrying out performance test, also can be the new database of system creation.
202, data encasement script is generated;
System will check the list structure of database, and generate data encasement script according to the list structure of database, and system checks that the list structure of database can utilize relevant scan tool, such as SQL Sever.
203, base data information and the Business Information information of initialize data amount is obtained;
In embodiments of the present invention, the data volume importing database can adopt preset mode, user can the size of setting data amount according to specific circumstances, and can carry out retractility test to system by preset mode, makes the test of system more comprehensive.
After system generated data prepares script, by raw to the base data information and Business Information information that obtain preset quantity, wherein, base data information and Business Information information SQL statement or data encasement instrument generate, base data information is the basic data that system is general, it is the field information that all modules in system can use, such as customer name, vendor name, name of product etc., Business Information packets of information contains data corresponding to special object, outbound list/storage bill the data of such as certain product, data of the purchase series products of certain client etc.
204, the base data information obtained is imported database;
System performs data encasement script, and the base data information obtained is imported database.
205, the associate field having imported the base data information of database is obtained;
After base data information is imported into database, system has imported the associate field of the base data information of database by obtaining, wherein, associate field is the field of unique identification base data information.
206, associate field is associated stored in the Business Information information obtained;
After system obtains the associate field of base data information, by associate field stored in the Business Information information obtained, be associated.
In embodiments of the present invention, step 205 and 206 utilizes the associate field in base data information Business Information information to be associated with the base data information importing database, make the base data information that can be obtained its correspondence by the associate field searched in Business Information information, it should be noted that, the mode that base data information is associated with Business Information information has a variety of, interrelational form can be determined as the case may be in actual applications, not limit herein.
207, Business Information information is imported the database having imported base data information;
After Business Information information is associated with base data information, system will perform data encasement script, Business Information information be imported the database having imported base data information.
208, recording performance test script;
After Business Information information and base data information all import database, system will to database recording performance test script.
209, data encasement script and performance test script is preserved;
The performance test script of systematic conservation data encasement script and recording, and the base data information used in performance test script and Business Information information are accessed with parameterized form, fulfillment database is separated with performance test script, makes the identical function of the database of same type that a data encasement script and performance test script can be used to carry out performance test.
210, performance test is carried out to database.
System usage data prepares script and performance test script carries out performance test to database.
In embodiments of the present invention, after base data information is imported database, again the Business Information information associated with base data information is imported database, finally to database recording performance test script, realizability energy test script is separated with database, make the performance test of the identical function of the database for same type can use same set of data encasement script and performance test script, decrease the workload that script is recorded and debugged, simultaneously by the data volume of preset base data information and Business Information information, effectively can realize the retractility test of system under different stage data volume.
Refer to Fig. 3, be an embodiment of the device of embodiment of the present invention performance test, comprise:
Generation unit 301, generates data encasement script for the list structure according to database, and data encasement script is used for data message to import database;
First performance element 302, for performing data encasement script, the base data information obtained is imported database, and base data information is the basic data that system is general;
Associative cell 303, for the Business Information information of the base data information with acquisition that import database being associated, Business Information packets of information contains data corresponding to special object;
Second performance element 304, for performing data encasement script, imports the database having imported base data information by Business Information information;
Recording elements 305, for the database recording performance test script importing base data information and Business Information information;
Test cell 306, carries out performance test for using described data encasement script and described performance test script to database.
In embodiments of the present invention, list structure according to database is generated data encasement script by generation unit 301, and data encasement script is sent to the first performance element 302 and the second performance element 304, first performance element 302 performs data encasement script, the base data information obtained is imported database, then, the Business Information information of the base data information with acquisition that import database associates by associative cell 303, and the Business Information information after association is sent to the second performance element 304, second performance element 304 performs data encasement script, Business Information information is imported the database having imported base data information, after data importing, recording elements 305 is by the database recording performance test script importing base data information and Business Information information, the performance test script recorded with data encasement script and recording elements 305 is carried out performance test to database by test cell 306.
In order to better understand device, referring to Fig. 4, being another embodiment of a kind of performance testing device of the embodiment of the present invention, comprising:
Generation unit 301, first performance element 302 in embodiment illustrated in fig. 3, associative cell 303, the second performance element 304, recording elements 305, test cell 306, and identical with the content of description embodiment illustrated in fig. 3, repeat no more herein.
Wherein, associative cell 303 comprises:
Extraction unit 401, for obtaining the associate field of the base data information importing database, associate field is the field of unique identification base data information;
Stored in unit 402, for associate field is associated stored in the Business Information information obtained.
In addition, the device of the present embodiment also comprises:
Database preparatory unit 403, for creating new database or obtaining existing database;
Acquiring unit 404, for obtaining base data information and the Business Information information of initialize data amount, base data information and Business Information information SQL statement or data encasement instrument generate;
Storage unit 405, for preserving data encasement script and performance test script, base data information and the Business Information information of the use in performance test script access with parameterized form.
In embodiments of the present invention.After database preparatory unit 403 creates new database or obtains existing database, list structure according to database is generated data encasement script by generation unit 301, and data encasement script is sent to acquiring unit 404 and the second performance element 304, the base data information of initialize data amount and Business Information information are sent to the first performance element 302 by acquiring unit 404, first performance element 302 performs data encasement script, the base data information obtained is imported database, then, extraction unit 401 in associative cell 303 has imported the associate field of the base data information of database by obtaining, have again and stored in unit 402, associate field is associated stored in the Business Information information obtained, and the Business Information information after association is sent to the second performance element 304, second performance element 304 performs data encasement script, Business Information information is imported the database having imported base data information, after data importing, recording elements 305 is by the database recording performance test script importing base data information and Business Information information, after recording completes, storage unit 405 will preserve data encasement script and performance test script, the performance test script recorded with data encasement script and recording elements 305 is carried out performance test to database by test cell 306.
In embodiments of the present invention, by respectively base data information, the Business Information information that associates with base data information being imported database and record script, effectively achieve being separated of data block and performance test script, effectively can reduce script and record the workload with debugging, and reduce the maintenance cost of database, and same set of performance test script can be used to test for the identical performance of the database of same type, effectively improve the efficiency of test.
One of ordinary skill in the art will appreciate that all or part of step realized in above-described embodiment method is that the hardware that can carry out instruction relevant by program completes, described program can be stored in a kind of computer-readable recording medium, the above-mentioned storage medium mentioned can be ROM (read-only memory), disk or CD etc.
Above the method for a kind of performance test provided by the present invention and device are described in detail, for one of ordinary skill in the art, according to the thought of the embodiment of the present invention, all will change in specific embodiments and applications, in sum, this description should not be construed as limitation of the present invention.

Claims (8)

1. a method for performance test, is characterized in that, comprising:
List structure according to database generates data encasement script, and described data encasement script is used for data message to import database;
Perform described data encasement script, the base data information of the initialize data amount of acquisition is imported described database, described base data information is the basic data that system is general;
The Business Information information of the initialize data amount of the base data information with acquisition that import database associated, described Business Information packets of information contains data corresponding to special object;
Perform described data encasement script, described Business Information information is imported the database having imported base data information;
To the database recording performance test script importing base data information and Business Information information;
Described data encasement script and described performance test script is used to carry out performance test to the identical function of the database of same type;
The described Business Information information by the base data information with acquisition that import database carries out associating comprising:
Obtain the associate field having imported the base data information of database, described associate field is the field of unique identification base data information;
Described associate field is associated stored in the Business Information information obtained.
2. method according to claim 1, is characterized in that, the described list structure construction data according to database comprises before preparing script:
Create new database or obtain existing database.
3. method according to claim 1, is characterized in that, the described data encasement script of described execution, comprises before base data information is imported database:
Obtain base data information and the Business Information information of initialize data amount, described base data information and Business Information information SQL statement or data encasement instrument generate.
4. method according to claim 1, is characterized in that, comprises after the described database recording performance test script to importing base data information and Business Information information:
Preserve described data encasement script and described performance test script, base data information and the Business Information information of the use in described performance test script access with parameterized form.
5. a device for performance test, is characterized in that, comprising:
Generation unit, generates data encasement script for the list structure according to database, and described data encasement script is used for data message to import database;
First performance element, for performing described data encasement script, the base data information of the initialize data amount of acquisition is imported described database, described base data information is the basic data that system is general;
Associative cell, the Business Information information for the initialize data amount by the base data information with acquisition that import database associates, and described Business Information packets of information contains data corresponding to special object;
Second performance element, for performing described data encasement script, imports the database having imported base data information by described Business Information information;
Recording elements, for the database recording performance test script importing base data information and Business Information information;
Test cell, carries out performance test for using described data encasement script and described performance test script to the identical function of the database of same type;
Described associative cell comprises:
Extraction unit, for obtaining the associate field of the base data information importing database, described associate field is the field of unique identification base data information;
Stored in unit, for described associate field is associated stored in the Business Information information obtained.
6. device according to claim 5, is characterized in that, described device also comprises:
Database preparatory unit, for creating new database or obtaining existing database.
7. device according to claim 6, is characterized in that, described device also comprises:
Acquiring unit, for obtaining base data information and the Business Information information of initialize data amount, described base data information and Business Information information SQL statement or data encasement instrument generate.
8. the device according to any one of claim 5 to 7, is characterized in that, described device also comprises:
Storage unit, for preserving described data encasement script and described performance test script, base data information and the Business Information information of the use in described performance test script access with parameterized form.
CN201010570268.0A 2010-12-02 2010-12-02 Method and device for performance test Active CN102486748B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201010570268.0A CN102486748B (en) 2010-12-02 2010-12-02 Method and device for performance test

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201010570268.0A CN102486748B (en) 2010-12-02 2010-12-02 Method and device for performance test

Publications (2)

Publication Number Publication Date
CN102486748A CN102486748A (en) 2012-06-06
CN102486748B true CN102486748B (en) 2015-07-15

Family

ID=46152245

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201010570268.0A Active CN102486748B (en) 2010-12-02 2010-12-02 Method and device for performance test

Country Status (1)

Country Link
CN (1) CN102486748B (en)

Families Citing this family (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103714066B (en) * 2012-09-29 2019-10-22 Sap欧洲公司 Database analysis device based on template
CN103729294B (en) * 2013-12-30 2017-03-22 金蝶软件(中国)有限公司 Method and device for testing performance script of application software
CN107885654A (en) * 2017-05-05 2018-04-06 平安科技(深圳)有限公司 Data library test method and system
CN108121818B (en) * 2017-12-29 2022-01-28 新开普电子股份有限公司 Card holder basic information importing method
CN108572918A (en) * 2018-04-13 2018-09-25 平安普惠企业管理有限公司 Performance test methods, device, computer equipment and storage medium
CN110287114B (en) * 2019-06-26 2021-06-04 深圳前海微众银行股份有限公司 Method and device for testing performance of database script
CN111104325B (en) * 2019-12-17 2024-02-02 广州品唯软件有限公司 Data acquisition and analysis method and device for pressure test and readable storage medium

Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1851656A (en) * 2005-11-24 2006-10-25 华为技术有限公司 Automatic test method based on database operation
CN101241466A (en) * 2007-02-08 2008-08-13 深圳迈瑞生物医疗电子股份有限公司 Embedded software test method and system

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101777052A (en) * 2009-01-09 2010-07-14 吉林省电力有限公司长春供电公司 Marketing and distribution platform region information management system

Patent Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1851656A (en) * 2005-11-24 2006-10-25 华为技术有限公司 Automatic test method based on database operation
CN101241466A (en) * 2007-02-08 2008-08-13 深圳迈瑞生物医疗电子股份有限公司 Embedded software test method and system

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
张念,陈薇.基于UML的面向对象数据库设计思想及在HR系统中的应用.《计算机应用与软件》.2009,第26卷(第8期),第139页左栏第34-38行. *

Also Published As

Publication number Publication date
CN102486748A (en) 2012-06-06

Similar Documents

Publication Publication Date Title
CN102486748B (en) Method and device for performance test
CN102831052B (en) Test exemple automation generating apparatus and method
CN102662846B (en) Testing method combining automatic tool and testing case
CN103186467B (en) Data correctness verification method and device
CN104268079B (en) A kind of method and system of POS Application testings
US20180307594A1 (en) System, method and storage device for cim/e model standard compliance test
CN110737594B (en) Database standard conformance testing method and device for automatically generating test cases
CN103176988A (en) Data migration system based on software-as-a-service (SaaS)
CN105138685B (en) A kind of Performance Test System towards HBase
CN202339542U (en) Software product test system
CN105224458A (en) A kind of database method of testing and system
CN106294128B (en) A kind of automated testing method and device exporting report data
CN111858730A (en) Data importing and exporting device, method, equipment and medium of graph database
CN110428153A (en) Message polymerization and device
CN105279092A (en) Software testing method and apparatus
CN112328631A (en) Production fault analysis method and device, electronic equipment and storage medium
CN106301976A (en) A kind of intelligent substation schedule information automated testing method
CN111898351B (en) Automatic Excel data importing method and device based on Aviator, terminal equipment and storage medium
CN105335482A (en) Batch insert method facing mass distributed database
CN112579604A (en) Test system number making method, device, equipment and storage medium
CN104298570A (en) Data processing method and device
CN106294700A (en) The storage of a kind of daily record and read method and device
CN106301833A (en) A kind of transformer station schedule information method of testing
WO2023123287A1 (en) Molecular data storage method and device, and molecular data application method and device
CN104216986A (en) Device and method for improving data query efficiency through pre-operation according to data update period

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
C10 Entry into substantive examination
SE01 Entry into force of request for substantive examination
C14 Grant of patent or utility model
GR01 Patent grant
TR01 Transfer of patent right
TR01 Transfer of patent right

Effective date of registration: 20221118

Address after: 266000 201a, 2nd floor, international ocean Sensor Research Institute, Qingdao Blue Valley technology road, aoshanwei street, Jimo District, Qingdao City, Shandong Province

Patentee after: Qingdao Kingdee Software Technology Co.,Ltd.

Address before: 518000 hi tech Industrial Village, Shennan Avenue, Shenzhen, Guangdong, Nanshan District W1-B4

Patentee before: Kingdee software (China) Co.,Ltd.