CN102819485B - A kind of test scene generates method, Apparatus and system - Google Patents

A kind of test scene generates method, Apparatus and system Download PDF

Info

Publication number
CN102819485B
CN102819485B CN201110153674.1A CN201110153674A CN102819485B CN 102819485 B CN102819485 B CN 102819485B CN 201110153674 A CN201110153674 A CN 201110153674A CN 102819485 B CN102819485 B CN 102819485B
Authority
CN
China
Prior art keywords
test
test scene
script
scene
template
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
CN201110153674.1A
Other languages
Chinese (zh)
Other versions
CN102819485A (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.)
Kingdee Software China Co Ltd
Original Assignee
Kingdee Software China Co Ltd
Filing date
Publication date
Application filed by Kingdee Software China Co Ltd filed Critical Kingdee Software China Co Ltd
Priority to CN201110153674.1A priority Critical patent/CN102819485B/en
Publication of CN102819485A publication Critical patent/CN102819485A/en
Application granted granted Critical
Publication of CN102819485B publication Critical patent/CN102819485B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Abstract

The present invention is applicable to computer testing field, it is provided that a kind of test scene generates method, Apparatus and system, and described method comprises the steps: to detect the test script that user selects;According to default test scene template, receive the test scene running parameter of user's input;According to described test scene template and described test scene running parameter, generate the test scene corresponding with described test script.The present invention needs to generate the test script of test scene by appointment, the running parameter of test scene is imported in the test scene template preset, thus the test scene needed for generating run nominative testing script, thus avoid the generation one by one of test scene during system performance testing, simplify operating procedure, improve the efficiency of system performance testing.

Description

A kind of test scene generates method, Apparatus and system
Technical field
The invention belongs to computer testing field, particularly relate to a kind of test scene and generate method, Apparatus and system.
Background technology
At existing large software system, such as Enterprise Resources Planning (Enterprise resource planning, Etc. ERP), during the performance test of the enterprise information management system, the framework being typically due to said system is huge, function is numerous, needs Substantial amounts of test script is made for it.Wherein, test script is a series of instructions carrying out fc-specific test FC, has comprised this survey Instruction required for training originally and corresponding operation order.Meanwhile, each test script needs one or more test corresponding Scene, for setting the number of users of required simulation when each test script runs, operation that user performs and being used Computer equipment even load parameter.Therefore, during the performance test of large software system, substantial amounts of test script brings Heavy test scene generation work, if one by one carrying out the hands of test scene by existing method for each test script Work creates, and workload is big, complex steps and inefficiency, and error rate is high, meanwhile, when needs carry out local directed complete set to test scene Time, it is also desirable to one by one modifying, efficiency is the lowest.
Summary of the invention
The purpose of the embodiment of the present invention is to provide a kind of test scene to generate method, it is intended to solve existing systematic function The problem needing in test process to be manually generated test scene one by one.
The embodiment of the present invention is achieved in that a kind of test scene generates method, and described method comprises the steps:
The test script that detection user selects;
According to default test scene template, receive the test scene running parameter of user's input;
According to described test scene template and described test scene running parameter, generate the survey corresponding with described test script Examination hall scape.
The another object of the embodiment of the present invention is to provide a kind of test scene generating means, and described device includes:
Test script detector unit, for detecting the test script that user selects;
Running parameter receives unit, and for according to the test scene template preset, the test scene receiving user's input becomes Change parameter;
Test scene generating means, for generating the test scene corresponding with described test script.
The another object of the embodiment of the present invention is to provide a kind of system comprising above-mentioned test scene generating means.
The embodiment of the present invention, on the basis of default test scene template, needs to generate the test of test scene by appointment Script, imports the running parameter of test scene in the test scene template preset, thus generating run nominative testing script institute The test scene needed, thus avoid the generation one by one of test scene during system performance testing, simplifies operating procedure, carry The high efficiency of system performance testing.
Accompanying drawing explanation
Fig. 1 is the flowchart that the test scene that first embodiment of the invention provides generates method;
Fig. 2 be shine invention first embodiment provide test scene generate method be embodied as exemplary plot;
Fig. 3 is the structure chart of the test scene generating means that second embodiment of the invention provides.
Detailed description of the invention
In order to make the purpose of the present invention, technical scheme and advantage clearer, below in conjunction with drawings and Examples, right The present invention is further elaborated.Should be appreciated that specific embodiment described herein only in order to explain the present invention, and It is not used in the restriction present invention.
The embodiment of the present invention needs to generate the test script of test scene by appointment, the running parameter of test scene is led Enter in default test scene template, thus the test scene needed for generating run nominative testing script, thus avoid system During performance test, the generation one by one of test scene, simplifies operating procedure, improves the efficiency of system performance testing.
Fig. 1 shows that what the test scene that first embodiment of the invention provides generated method realizes flow process, and details are as follows:
In step S101, the test script that detection user selects.
In embodiments of the present invention, a test scene generates process can be that one or more test script generates phase The test scene answered, therefore, the test script selected by detection user, i.e. can determine that this test scene generates process and generate The test script corresponding to test scene.
In embodiments of the present invention, the selection for test script can be hooked in test script list by user The modes such as choosing (single choice or multiselect) realize, in this no limit.The detailed description of the invention that test script selects is referred to Fig. 2, in fig. 2, the test script chosen on " script listing " hurdle by detection user, it is possible to determine this checkout area Scape generates the test script corresponding to test scene that process generates.
In step s 102, according to default test scene template, the test scene running parameter of user's input is received.
The test scene template preset, is the test scene pre-setting good part common parameters, and it is in step S101 General character by extracting test scene generates before.Due to during the performance test of large software system, each test foot Test scene corresponding to Ben is the most similar, is provided with the common scenario simulation index of part and code text, therefore, In embodiments of the present invention, first pass through this part general character extracting all test scenes, generate the test scene template preset.
As a example by Fig. 2, in this specific embodiment, the general character of test scene includes concurrent user's quantity, client computer number The definition of mesh, think time and Yes/No generation autoexec, in a particular embodiment, i.e. can be by extracting checkout area This part general character of scape generates the test scene template preset.
After generating the test scene template preset, owing to each test scene all also exists and other test scene institutes Concurrent user in different running parameters, such as Fig. 2 and the particular number of client computer, the definition mode etc. of think time is right Part mutually different between each test scene above-mentioned, all replaces with spcial character in default test scene template, This part change ginseng of the test scene of user's input is received the most in step s 102 according to the test scene template preset Number, can be determined this test scene.
In step s 103, according to described default test scene template and described test scene running parameter, generate with The test scene that described test script is corresponding.
In embodiments of the present invention, by the test scene of the general character part in default test scene template with user's input Running parameter be combined, the file destination thus generated be user select the test scene corresponding to test script.
In concrete implementation mode, step S103 can be entered in template engine (such as Velocity template engine) OK.
In embodiments of the present invention, by said method, can be the fastest on the basis of default test scene template Generate test scene, meanwhile, when needs carry out large batch of amendment to test scene, without one by one revising test fastly Scene, it is only necessary to revise accordingly in default test scene template or replace, can disposably complete all The corresponding modification of test scene, improves the efficiency of test well.
After having sequentially generated, by said method, the test scene that whole test script is corresponding, system can generate for The autoexec of scheduling tests scene one by one, in time automatically carrying out each test script pair when unmanned Test scene is scheduling, to improve testing efficiency.
Fig. 3 shows the structure of the test scene generating means that second embodiment of the invention provides, for convenience of description, only Show part related to the present embodiment.
With reference to Fig. 3, this test scene generating means is to run on the software unit in Performance Test System, that includes:
Test script detector unit 31, the test script selecting user detects, raw to determine this test scene The test script corresponding to test scene that one-tenth process generates.In concrete implementation mode, can surveyed by detection user The test script choosing (single choice or multiselect) in examination script listing realizes, in this no limit.
Running parameter receives unit 32, and according to default test scene template, receive user's input is currently needed for generation The running parameter of test scene, to determine this test scene.
Test scene signal generating unit 33, receives in unit 32 in conjunction with the test scene template preset and running parameter and receives The running parameter of test scene being currently needed for generating, generate the test script pair detected with test script detector unit 31 The test scene answered.
This test scene generating means further comprises test scene template generation unit 34, and it is by extracting test scene General character generates test scene template, and as default test scene template.In concrete implementation mode, checkout area Scape template generation unit 34 can be by not extracting the general character of test scene, and by the running parameter in test scene or mutually the most not Same part spcial character replaces, thus generates test scene template.
Autoexec signal generating unit 35, after generating the test scene that whole test script is corresponding, autoexec Signal generating unit 35 generates the autoexec for scheduling tests scene one by one, to facilitate when automatically performing test script phase The test scene answered is dispatched one by one, to improve the efficiency of test.
The embodiment of the present invention, on the basis of default test scene template, needs to generate the test of test scene by appointment Script, imports the running parameter of test scene in test scene template, thus the survey needed for generating run nominative testing script Examination hall scape, thus avoid the generation one by one of test scene during system performance testing, simplifies operating procedure, improves and is The efficiency of system performance test.Meanwhile, when test scene is modified by needs, without one by one revising, it is only necessary in advance If test scene template in revise accordingly or replace, can disposably complete repairing accordingly all test scenes Change work.
The foregoing is only presently preferred embodiments of the present invention, not in order to limit the present invention, all essences in the present invention Any amendment, equivalent and the improvement etc. made within god and principle, should be included within the scope of the present invention.

Claims (8)

1. a test scene generates method, it is characterised in that described method comprises the steps:
The test script that detection user selects;
According to default test scene template, receive the parameter value of the part common parameters of user's input, described default test Scene template is to pre-set the test scene of good part common parameters;
According to the parameter value of the part common parameters that described test scene template and described user input, generate and described test foot The test scene of this correspondence.
2. the method for claim 1, it is characterised in that the quantity of described test script can be one or more.
3. the method for claim 1, it is characterised in that described detection user select test script step it Before, described method also comprises the steps:
Extract the general character of test scene, generate the test scene template preset.
4. the method for claim 1, it is characterised in that described method also comprises the steps:
After generating whole test scenes, generate the autoexec dispatching whole test scenes.
5. a test scene generating means, it is characterised in that described device includes:
Test script detector unit, for detecting the test script that user selects;
Running parameter receives unit, for according to the test scene template preset, receiving the part common parameters of user's input Parameter value, described default test scene template is to pre-set the test scene of good part common parameters;
Test scene generating means, the ginseng of the part common parameters for inputting according to described test scene template and described user Numerical value, generates the test scene corresponding with described test script.
6. device as claimed in claim 5, it is characterised in that described device also includes:
Test scene template generation unit, for extracting the general character of test scene, generates described default test scene template.
7. device as claimed in claim 5, it is characterised in that described device also includes:
Autoexec signal generating unit, for generating the autoexec dispatching whole test scenes.
8. the system of the test scene generating means that a kind comprises as described in any one of claim 5 to 7.
CN201110153674.1A 2011-06-09 A kind of test scene generates method, Apparatus and system Active CN102819485B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201110153674.1A CN102819485B (en) 2011-06-09 A kind of test scene generates method, Apparatus and system

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201110153674.1A CN102819485B (en) 2011-06-09 A kind of test scene generates method, Apparatus and system

Publications (2)

Publication Number Publication Date
CN102819485A CN102819485A (en) 2012-12-12
CN102819485B true CN102819485B (en) 2016-12-14

Family

ID=

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101042673A (en) * 2007-04-20 2007-09-26 北京航空航天大学 Software testing system and testing method
CN101212362A (en) * 2006-12-26 2008-07-02 中兴通讯股份有限公司 Automatic testing device and method incorporating a variety of testing tools
CN101221504A (en) * 2008-01-23 2008-07-16 中兴通讯股份有限公司 Test script processing method and its scheduling and executing system

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101212362A (en) * 2006-12-26 2008-07-02 中兴通讯股份有限公司 Automatic testing device and method incorporating a variety of testing tools
CN101042673A (en) * 2007-04-20 2007-09-26 北京航空航天大学 Software testing system and testing method
CN101221504A (en) * 2008-01-23 2008-07-16 中兴通讯股份有限公司 Test script processing method and its scheduling and executing system

Similar Documents

Publication Publication Date Title
US8196113B2 (en) Realtime creation of datasets in model based testing
Hoos Programming by optimization
CN106528424B (en) Test method and test platform based on background system service or interface
Nayak et al. Automatic Test Data Synthesis using UML Sequence Diagrams.
US20080244594A1 (en) Visual scripting of web services for task automation
CN103984612B (en) A kind of method of the unattended pressure test based on HPL instruments
US9135714B1 (en) Method and system for integrating a graphical user interface capture for automated test and retest procedures
US20040064805A1 (en) Enterprise scoped software factory
CN106484623A (en) A kind of method of software test, apparatus and system
Razavian et al. A frame of reference for SOA migration
EP2889767B1 (en) Server provisioning based on job history analysis
CN101281461A (en) Method and device for transfer applying dependent system environment
JP2010511250A (en) Request-based test generation
Gupta et al. Automated regression test case generation for web application: A survey
JP2003178173A (en) Project risk managing method, device and program
CN112799782B (en) Model generation system, method, electronic device and storage medium
EP1548581A2 (en) Methods, apparatus and programs for system development
Biswal et al. A novel approach for scenario-based test case generation
Bocciarelli et al. BPMN-based business process modeling and simulation
CN110399299A (en) The execution method of automated test frame and test case
KR20130028207A (en) Automation appratus for developing and testing software based on web
CN107577521A (en) A kind of virtual resource management method and device
Gantait Test case generation and prioritization from UML models
CN105893104A (en) Code compiling method and device
CN102004660A (en) Realizing method and device of business flows

Legal Events

Date Code Title Description
PB01 Publication
SE01 Entry into force of request for substantive examination
GR01 Patent grant