CN109144846A - Test method and device for testing service device - Google Patents
Test method and device for testing service device Download PDFInfo
- Publication number
- CN109144846A CN109144846A CN201710508953.2A CN201710508953A CN109144846A CN 109144846 A CN109144846 A CN 109144846A CN 201710508953 A CN201710508953 A CN 201710508953A CN 109144846 A CN109144846 A CN 109144846A
- Authority
- CN
- China
- Prior art keywords
- testing machine
- test
- test parameter
- testing
- parameter
- 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.)
- Granted
Links
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F11/00—Error detection; Error correction; Monitoring
- G06F11/36—Preventing errors by testing or debugging software
- G06F11/3668—Software testing
- G06F11/3672—Test management
- G06F11/3688—Test management for test execution, e.g. scheduling of test suites
Abstract
This application discloses the test methods and device for testing service device.One specific embodiment of this method includes: acquisition test parameter, wherein, test parameter includes: Virtual User number, the process number of single testing machine operation, the individual process Thread Count that includes, the product for the Thread Count that Virtual User number be the testing machine number opened, the process number of single testing machine operation includes with individual process;According to acquired test parameter, the operation of at least one testing machine is controlled;Obtain at least one in following item of information: data processed result, at least one thread send the operating parameter of the time difference of data processing request data processed result corresponding with receiving, tested server;Test result is generated according to acquired item of information.This embodiment improves testing efficiencies.
Description
Technical field
This application involves field of computer technology, and in particular to a kind of test method and device for testing service device.
Background technique
With the high speed development of internet, the performance requirement of web station system is higher and higher, the performance before any online implementing
It is all essential to test.In general, all good concurrent Virtual User number of fixed configurations before performance test.But in real scene, use
Amount can constantly change, especially promotion when will appear a certain moment increases suddenly and suddenly drop the phenomenon that, cause the access pressure of system
Power is widely varied.How in performance test, control Pressure behaviour variation, is performance test personnel's problems faced.
In the prior art, tester is if necessary to increase Virtual User number, it usually needs newly one task execution of starting
Same script then needs stop section task if necessary to reduce Virtual User number, starts and stops process complexity, causes
Testing efficiency is not high.
Summary of the invention
The purpose of the application is to propose a kind of improved test method and device for testing service device, come solve with
The technical issues of upper background technology part is mentioned.
In a first aspect, the embodiment of the present application provides a kind of test method for testing service device, testing service device with
At least one testing machine communicates to connect, and operation has at least one when each testing machine at least one testing machine is opened
Process, each process at least one process include at least one thread, at least one thread is used to send out to tested server
Data processing request is sent, and receives the corresponding data processed result that tested server returns, this method comprises: obtaining test ginseng
Number, wherein test parameter includes: Virtual User number, the process number of single testing machine operation, the individual process thread that includes
Number, the thread that Virtual User number is the testing machine number opened, the process number of single testing machine operation and individual process include
The product of number;According to acquired test parameter, the operation of at least one testing machine is controlled;It obtains in following item of information at least
One: data processed result, at least one thread send data processing request data processed result corresponding with receiving when
Between poor, tested server operating parameter;Test result is generated according to acquired item of information.
In the present embodiment, the operation of at least one testing machine is controlled, comprising: according to Virtual User number, single test
The Thread Count that the process number and individual process run with machine includes, determines the testing machine number for needing to open;Obtain at least one
The status information of each testing machine in testing machine, wherein status information is used to indicate testing machine and is in unlatching or stops
Operating status;The testing machine number opened as needed and acquired status information, determine at least one testing machine
In each testing machine operating status;The Thread Count that the process number and individual process run according to single testing machine includes,
The process number and Thread Count run in the testing machine for opening operating status determined by determining.
In the present embodiment, method further include: in response to getting using for changing at least one test for user's input
The instruction of the operating status of each testing machine in machine determines each testing machine at least one testing machine according to instruction
Operating status.
In the present embodiment, test parameter is stored in target matrix, and test parameter is also stored in target matrix
The execution time;And according to acquired test parameter, control the operation of at least one testing machine, comprising: when being executed
In, according to acquired test parameter, control the operation of at least one testing machine.
In the present embodiment, it is also stored with identification information corresponding with test parameter in target matrix and executes serial number,
Identification information is used to indicate test assignment belonging to test parameter, executes serial number and is used to indicate test parameter quilt in test assignment
The sequence of execution;And obtain test parameter, comprising: obtain the identification information of user's input;In target matrix inquiry with
The test parameter of identification information match;And according to acquired test parameter, the operation of at least one testing machine is controlled, it wraps
It includes: being greater than one group in response to the quantity of the test parameter inquired, according to each group test parameter in the test parameter inquired
The execution time and execute serial number and each group test parameter, control the operation of at least one testing machine.
Second aspect, the embodiment of the present application provide a kind of test device for testing service device, testing service device with
At least one testing machine communicates to connect, and operation has at least one when each testing machine at least one testing machine is opened
Process, each process at least one process include at least one thread, at least one thread is used to send out to tested server
Data processing request is sent, and receives the corresponding data processed result that tested server returns, which includes: the first acquisition list
Member, for obtaining test parameter, wherein test parameter includes: process number, the list of Virtual User number, the operation of single testing machine
The Thread Count that a process includes, Virtual User number are the process number and list of the testing machine number opened, the operation of single testing machine
The product for the Thread Count that a process includes;Control unit, for controlling at least one testing machine according to acquired test parameter
Operation;Second acquisition unit, for obtaining at least one in following item of information: data processed result, at least one thread
Send the time difference of data processing request data processed result corresponding with receiving, the operating parameter of tested server;It generates
Unit, for generating test result according to acquired item of information.
In the present embodiment, control unit, comprising: first determines subelement, for according to Virtual User number, single test
The Thread Count that the process number and individual process run with machine includes, determines the testing machine number for needing to open;Subelement is obtained, is used
In the status information for obtaining each testing machine at least one testing machine, wherein status information is used to indicate testing machine
In the operating status opened or stopped;Second determines subelement, testing machine number for opening as needed and is obtained
The status information taken determines the operating status of each testing machine at least one testing machine;Third determines subelement, is used for
According to the Thread Count that the process number of single testing machine operation and individual process include, determine identified in unlatching operation shape
The process number and Thread Count run in the testing machine of state.
In the present embodiment, device further includes determination unit, and determination unit is configured to: in response to getting user's input
The instruction for changing the operating status of each testing machine at least one testing machine determine at least one according to instruction
The operating status of each testing machine in a testing machine.
In the present embodiment, test parameter is stored in target matrix, and test parameter is also stored in target matrix
The execution time;And according to acquired test parameter, control the operation of at least one testing machine, comprising: when being executed
In, according to acquired test parameter, control the operation of at least one testing machine.
In the present embodiment, it is also stored with identification information corresponding with test parameter in target matrix and executes serial number,
Identification information is used to indicate test assignment belonging to test parameter, executes serial number and is used to indicate test parameter quilt in test assignment
The sequence of execution;And acquiring unit, it is further configured to: obtaining the identification information of user's input;In target matrix
The test parameter of inquiry and identification information match;And control unit, it is further configured to: joining in response to the test inquired
Several quantity is greater than one group, according to the execution time of each group test parameter in the test parameter inquired and executes serial number, with
And each group test parameter, control the operation of at least one testing machine.
The third aspect, the embodiment of the present application provide a kind of equipment, comprising: one or more processors;Storage device is used
In storing one or more programs, when said one or multiple programs are executed by said one or multiple processors, so that above-mentioned
One or more processors realize such as the above-mentioned method of first aspect.
Fourth aspect, the embodiment of the present application provide a kind of computer readable storage medium, are stored thereon with computer journey
Sequence, which is characterized in that such as first aspect above-mentioned method is realized when the program is executed by processor.
Test method and device provided by the embodiments of the present application for testing service device, by obtaining test parameter, and
According to acquired test parameter, the operation of at least one testing machine is controlled, then obtains at least one in following item of information
: data processed result, at least one thread send the time of data processing request data processed result corresponding with receiving
The operating parameter of difference, tested server, finally generates test result according to acquired item of information, improves testing efficiency.
Detailed description of the invention
By reading a detailed description of non-restrictive embodiments in the light of the attached drawings below, the application's is other
Feature, objects and advantages will become more apparent upon:
Fig. 1 is that this application can be applied to exemplary system architecture figures therein;
Fig. 2 is the schematic flow chart according to one embodiment of the test method for testing service device of the application;
Fig. 3 is the schematic diagram according to an application scenarios of the test method for testing service device of the application;
Fig. 4 is the schematic flow according to the further embodiment of the test method for testing service device of the application
Figure;
Fig. 5 is the exemplary block diagram according to one embodiment of the test device for testing service device of the application;
Fig. 6 is adapted for the structural schematic diagram for the computer system for realizing the equipment of the embodiment of the present application.
Specific embodiment
The application is described in further detail with reference to the accompanying drawings and examples.It is understood that this place is retouched
The specific embodiment stated is used only for explaining related invention, rather than the restriction to the invention.It also should be noted that in order to
Convenient for description, part relevant to related invention is illustrated only in attached drawing.
It should be noted that in the absence of conflict, the features in the embodiments and the embodiments of the present application can phase
Mutually combination.The application is described in detail below with reference to the accompanying drawings and in conjunction with the embodiments.
Fig. 1 is shown can the test method for testing service device using the application or the survey for testing service device
The exemplary system architecture 100 for the embodiment that trial assembly is set.
As shown in Figure 1, system architecture 100 may include testing service device 101, testing machine 103,104,105 is tested clothes
Business device 106 and network 107,108.Network 107 between testing service device 101 and testing machine 103,104,105 to provide
The medium of communication link, network 108 is to provide communication chain between testing machine 103,104,105 and tested server 106
The medium on road.Network 107,108 may include various connection types, such as wired, wireless communication link or fiber optic cables etc.
Deng.
Testing service device 101, testing service device 101 can be the management end or main controller of test macro, with testing machine
103,104,105 communication connection, when each testing machine in testing machine 103,104,105 is opened operation have at least one into
Journey, each process at least one process include at least one thread, at least one thread is used to send out to tested server 106
Data processing request is sent, and receives the corresponding data processed result that tested server 106 returns.Testing machine 103,104,
105 can be press machine, the i.e. machine of simulant-client, can be the computer of entity, be also possible to virtual calculating environment,
Include the most basic computation module such as CPU, memory, operating system, bandwidth, disk, it will be appreciated that be an independent virtual machine.Quilt
Surveying server can be single server or server cluster, and the tested operation of server 106 has examining system, and examining system can
To be that will want online web station system.
Testing service device 101 can obtain test parameter first, and according to acquired test parameter, control testing machine
103,104,105 operation then obtains at least one in following item of information: data processed result, at least one thread hair
The time difference of data processing request data processed result corresponding with receiving, the operating parameter of tested server 106 are sent, finally
Test result is generated according to acquired item of information.
In addition, system architecture 100 can also include database 106, database 106 be can be for managing various data
, various types of databases, for example, for storing the database of test data, for storing the number generated in test process
According to for determining the database of test result.Database 106 is for storing the current state letter of testing machine 103,104,105
When the real-time data base of breath, testing service device 101 can obtain testing machine 103,104,105 from database 106 in real time
Status information.
It should be noted that test method provided by the embodiment of the present application is generally executed by testing service device 101, accordingly
Ground, test method device are generally positioned in testing service device 101.
It should be understood that the number of testing service device, network, testing machine and tested server in Fig. 1 is only to illustrate
Property.According to needs are realized, any number of testing service device, network, testing machine and tested server can have.
With continued reference to Fig. 2, one embodiment of the test method for testing service device according to the application is shown
Process 200.This is used for the test method of testing service device, comprising the following steps:
Step 201, test parameter is obtained.
In the present embodiment, testing service device and at least one testing machine communicate to connect, at least one testing machine
Each testing machine open when operation have at least one process, each process at least one process includes at least one line
Journey, at least one thread are used to send data processing request to tested server, and receive the corresponding of tested server return
Data processed result.Data processing request can be hypertext transfer protocol (HTTP, HyperText Transfer
Protocol it) requests.
In the present embodiment, for the test method operation of testing service device electronic equipment thereon (such as shown in Fig. 1
Server 101) test parameter can be obtained first.Wherein, test parameter includes: Virtual User number, single testing machine fortune
The Thread Count that capable process number, individual process include, Virtual User number are the testing machine number opened, the operation of single testing machine
Process number and the individual process Thread Count that includes product.The value of test parameter can be user setting, be also possible in advance
The default value set.
Above-mentioned electronic equipment can obtain test ginseng relevant to test assignment when being ready to carry out a test assignment
Number, can also in response to test parameter change and obtain test parameter, for example, above-mentioned electronic equipment have received user modification
In the preset database, above-mentioned electronic equipment real-time scan data library is to monitor for the instruction of test parameter or test parameter storage
The variation of test parameter.
Step 202, according to acquired test parameter, the operation of at least one testing machine is controlled.
In the present embodiment, above-mentioned electronic equipment can control at least one test and use according to acquired test parameter
The operation of machine.By taking testing machine is the press machine in pressure test as an example, client-server structure, test clothes can be used
Test assignment management module, centralized control press machine resource pool can be installed on business device, and send pressure test to press machine
Parameter information.Management module can keep long connection with each press machine, temporarily assign to need to start when needing to be implemented task and survey
The press machine of examination.When needing to increase press machine, idle pressure machine is chosen from resource pool;When needing to reduce press machine, stop
Only press machine in execution.
In some optional implementations of the present embodiment, the operation of at least one testing machine is controlled, may include: root
The Thread Count that the process number and individual process run according to Virtual User number, single testing machine includes, determines the survey for needing to open
Machine number on probation;Obtain the status information of each testing machine at least one testing machine, wherein status information is used to indicate survey
Machine on probation is in the operating status opened or stopped;The testing machine number opened as needed and acquired status information,
Determine the operating status of each testing machine at least one testing machine;The process number and list run according to single testing machine
The Thread Count that a process includes determines the identified process number and thread run in the testing machine for opening operating status
Number.
In this implementation, testing machine is in the operating status opened, the booting being not only in power supply meaning, and needs
Want testing machine in running order.Equally, testing machine is in the operating status stopped, is also possible to have been switched on, but be in
Idle or preparation state.It can determine the fortune of each testing machine at least one testing machine according to preset rules
Row state, for example, the testing machine number that above-mentioned electronic equipment can be more in running order and the test for needing to open are used
Machine number makes the judgement of increase and decrease testing machine.Pre-set rule includes but is not limited to: by the mark of certain testing machine
Sequence (such as name character string sorting) first starts and first stops, first starting and stop afterwards.In the testing machine number for determining that needs are opened
When, floor operation can be used as, guarantee obtains integer value.
In some optional implementations of the present embodiment, test parameter can also directly include that the test for needing to open is used
Machine number, since testing machine hardware aspect processing capacity is limited, separate unit test machine opens more process and thread, can reduce survey
The operational efficiency of test-run a machine, it is contemplated that whole hair pressure energy power, in test parameter the process number of single testing machine operation and individually into
The Thread Count that journey includes can be a range, for example, separate unit test machine is being run not according to the historical operating parameter of test machine
More than 8 processes, each process include when being no more than 5 threads, and processing capacity is normal, then the process of single testing machine operation
Several ranges can be 1~8, and the Thread Count that individual process includes can be 1~5.As an example, if above-mentioned electronic equipment obtains
It is 25 to the testing machine number opened is needed, Virtual User number is 1000, then the process number of single testing machine operation can be 8
The Thread Count for including with individual process can be 5.It needs the testing machine number opened less than 25 if getting, can also export and mention
Show information, being used to indicate whole hair pressure energy power will receive influence, the testing machine number for needing to open to prompt user to increase, or subtract
Few Virtual User number.
In some optional implementations of the present embodiment, method further include: in response to getting being used for for user's input
The instruction for changing the operating status of each testing machine at least one testing machine determines at least one test according to instruction
With the operating status of testing machine each in machine.For example, user can control each testing machine in testing machine by order line
Operating status, be conveniently integrated into automatic test.In addition, user can also be complete by pre-set command line interface
It is operated at newly-built test assignment etc..The flexibility of test method is further improved with this.
Step 203, obtain at least one in following item of information: data processed result, at least one thread send data
The operating parameter of the time difference of data processed result corresponding with receiving, tested server are requested in processing.
In the present embodiment, at least one in the available following item of information of above-mentioned electronic equipment: data processed result,
At least one thread sends the fortune of the time difference of data processing request data processed result corresponding with receiving, tested server
Row parameter.Wherein, be tested server operating parameter can be server CPU (Central Processing Unit, in
Central processor) utilization rate, EMS memory occupation etc..Testing machine can count while executing test assignment each process, thread
Implementing result.Real-time report result causes network congestion in order to prevent, and testing machine can first summarize data.It waits solid
After fixed delay, then upload to real-time data base (RTDB, Real Time DataBase).Real-time data base can only retain in the recent period
The data of the test process of execution need the data saved for a long time to carry out unloading again.Data are stored with time and testing machine
Mark as index, can automatically count the test data of all or part of testing machine of a certain period.
Step 204, test result is generated according to acquired item of information.
In the present embodiment, above-mentioned electronic equipment can generate test result according to the item of information obtained in step 203.Its
In, according to data processed result at test result, it may be considered that the data processing for whether receiving data processed result, receiving
As a result whether with the expected factors such as be consistent.Test result may include average response time, total used time, server cpu busy percentage,
EMS memory occupation etc..Test result can also be TP99 (meeting minimum time-consuming required for percent ninety-nine network request).
After test result generates, test result can be shown, there can also be the equipment of communication connection to push test result as other foundation.
The method provided by the above embodiment of the application is by obtaining test parameter, and according to acquired test parameter,
The operation of at least one testing machine is controlled, then obtains at least one in following item of information: data processed result, at least one
A thread sends the operation ginseng of the time difference of data processing request data processed result corresponding with receiving, tested server
Number finally generates test result according to acquired item of information, improves testing efficiency.
With continued reference to one that Fig. 3, Fig. 3 are according to the application scenarios of the test method for testing service device of the present embodiment
A schematic diagram.In the application scenarios of Fig. 3, the testing machine of the compositions such as testing service device 301 and testing machine 1, testing machine 2
Resource pool 305 communicates to connect, and operation has at least one process when each testing machine in testing machine resource pool 305 is opened,
Each process at least one process includes at least one thread, at least one thread is used to send to tested server 304
Data processing request, and receive the corresponding data processed result that tested server 304 returns.Server 301 can obtain first
Take test parameter.The Virtual User number 302 for including in test parameter can be what user inputted, can then be stored to target
In tables of data 303, Thread Count that process number, the individual process of the single testing machine that includes in test parameter operation include can be with
Be user input be also possible to be stored in advance in target matrix 303.Testing service device 301 can be according to acquired
Test parameter controls the operation of each testing machine in testing machine resource pool 305, then obtains in following item of information at least
One: in each testing machine receives in testing machine resource pool 305 data processed result, testing machine resource pool 305
The thread of each testing machine sends the time difference of data processing request data processed result corresponding with receiving, tested service
The operating parameter 306 of device finally generates test result according to acquired item of information.
Referring to FIG. 4, Fig. 4 is the further embodiment according to the test method for testing service device of the present embodiment
Flow diagram.
In Fig. 4, this is used for the process 400 of the test method of testing service device, comprising the following steps:
Step 401, the identification information of user's input is obtained.
In the present embodiment, for the test method operation of testing service device electronic equipment thereon (such as shown in Fig. 1
Server 101) can obtain first user input identification information.Identification information is used to indicate test belonging to test parameter
Task, test assignment may include one or more groups of test parameters, and identification information can be the title of test assignment, for example, " surveying
1 ", " flood peak test " are tried, is equally also possible to the number of test assignment, for example, " 001 ", " 002 ".
Step 402, the test parameter with identification information match is inquired in target matrix.
In the present embodiment, above-mentioned electronic equipment can be inquired and the mark that obtains in step 401 in target matrix
The test parameter of information matches.It is stored with identification information corresponding with test parameter in target matrix, is gone back in target matrix
It can store the execution time of test parameter.For example, the test assignment that identification information is " test 1 " includes one group of test ginseng
Number: Virtual User number is 1000, and the process number of single testing machine operation is 8, and the Thread Count that individual process includes is 5, is executed
Time is 5 minutes.
Step 403, it is greater than one group in response to the quantity of the test parameter inquired, according in the test parameter inquired
The execution time of each group test parameter and execution serial number and each group test parameter, control the operation of at least one testing machine.
In the present embodiment, above-mentioned electronic equipment can in response to the test parameter inquired in step 402 quantity it is big
In one group, according to the execution time of each group test parameter in the test parameter inquired and serial number and each group test are executed
Parameter controls the operation of at least one testing machine.It executes serial number and is used to indicate what test parameter was performed in test assignment
Sequentially.
By taking identification information is the pressure test task of " flood peak test " as an example, which includes that 3 groups of test parameters execute sequence
It number can be 1,2,3 respectively.Virtual User number is 1000 in first group of test parameter, separate unit press machine Thread Count and process number it
Product is 100, and executing the time is 600 seconds;In second group of test parameter Virtual User number be 20000, separate unit press machine Thread Count with
The product of process number is 100, and executing the time is 30 seconds;Virtual User number is 2000 in third group test parameter, separate unit press machine line
The product of number of passes and process number is 100, and executing the time is 300 seconds.When starting to execute the task, 600 seconds of beginning, start 10 pressures
Power machine, 200 press machines of starting in 30 seconds later, last 20 press machines of starting in 300 seconds execute test.It can additionally set
The number of the execution of every group of test parameter is set, for example, second group of test parameter executes the multiple flow flood peak of three to four analogs
Scene, persistently current virtual number of users can also play the effect of testing fatigue without modification.It should be noted that target data
Data in table can be before test assignment starts and stores, be also possible in test assignment progress, in response to receiving survey
The instruction of examination personnel input, real-time storage is in target matrix.
Step 404, obtain at least one in following item of information: data processed result, at least one thread send data
The operating parameter of the time difference of data processed result corresponding with receiving, tested server are requested in processing.
In the present embodiment, in the available following item of information of above-mentioned electronic equipment at least one of data processed result,
At least one thread sends the fortune of the time difference of data processing request data processed result corresponding with receiving, tested server
Row parameter.
Step 405, test result is generated according to acquired item of information.
In the present embodiment, above-mentioned electronic equipment can generate test result according to the item of information obtained in step 404.
Step 404, the realization details of step 405 and technical effect can explanation with reference to step 203, in step 204,
This is repeated no more.
Figure 4, it is seen that the survey for testing service device compared with the corresponding embodiment of Fig. 2, in the present embodiment
The process 400 of method for testing increases the execution time according to each group test parameter in the test parameter inquired and executes sequence
Number and each group test parameter, the step of controlling the operation of at least one testing machine.The scheme of the present embodiment description as a result,
The control means to test method are enriched, the efficiency of test is further improved.
With further reference to Fig. 5, as an implementation of the above method, this application provides a kind of surveys for testing service device
One embodiment that trial assembly is set, the Installation practice is corresponding with embodiment of the method shown in Fig. 2, which can specifically apply
In various electronic equipments.
As shown in figure 5, the test device 500 for testing service device of the present embodiment include: first acquisition unit 501,
Control unit 502, second acquisition unit 503, generation unit 504, wherein first acquisition unit 501, for obtaining test ginseng
Number, wherein test parameter includes: Virtual User number, the process number of single testing machine operation, the individual process thread that includes
Number, the thread that Virtual User number is the testing machine number opened, the process number of single testing machine operation and individual process include
The product of number;Control unit 502, for controlling the operation of at least one testing machine according to acquired test parameter;Second obtains
Unit 503 is taken, for obtaining at least one in following item of information: data processed result, at least one thread are sent at data
Reason requests the operating parameter of the time difference of data processed result corresponding with receiving, tested server;Generation unit 504 is used
According to acquired item of information generation test result.
In the present embodiment, first acquisition unit 501, control unit 502, second acquisition unit 503, generation unit 504
It is specific processing can refer to Fig. 2 corresponding embodiment step 201, step 202, step 203, the detailed description of step 204, herein
It repeats no more.
In some optional implementations of the present embodiment, control unit 502, comprising: first determines subelement (in figure not
Show), the Thread Count for including according to Virtual User number, the process number of single testing machine operation and individual process determines
The testing machine number for needing to open;Subelement (not shown) is obtained, for obtaining each survey at least one testing machine
The status information of machine on probation, wherein status information is used to indicate testing machine and is in the operating status opened or stopped;Second really
Stator unit (not shown), testing machine number and acquired status information for opening as needed determine extremely
The operating status of each testing machine in a few testing machine;Third determines subelement (not shown), for according to list
The Thread Count that the process number and individual process of a testing machine operation include, determines identified in the survey for opening operating status
The process number and Thread Count run in machine on probation.
In some optional implementations of the present embodiment, device further includes determination unit (not shown), is determined single
First (not shown) is configured to: in response to get user input for changing each survey at least one testing machine
The instruction of the operating status of machine on probation determines the operating status of each testing machine at least one testing machine according to instruction.
In some optional implementations of the present embodiment, test parameter is stored in target matrix, target matrix
In be also stored with execution time of test parameter;And according to acquired test parameter, control at least one testing machine
Operation, comprising: in when being executed, according to acquired test parameter, control the operation of at least one testing machine.
In some optional implementations of the present embodiment, mark corresponding with test parameter is also stored in target matrix
Know information and execute serial number, identification information is used to indicate test assignment belonging to test parameter, executes serial number and is used to indicate test
The sequence that parameter is performed in test assignment;And acquiring unit (not shown), it is further configured to: obtaining user
The identification information of input;The test parameter with identification information match is inquired in target matrix;And control unit 502, into
One step is configured to: being greater than one group in response to the quantity of the test parameter inquired, according to each in the test parameter inquired
The execution time of group test parameter and execution serial number and each group test parameter, control the operation of at least one testing machine.
From figure 5 it can be seen that for the test device 500 of testing service device by obtaining test ginseng in the present embodiment
Number, and according to acquired test parameter, the operation of at least one testing machine is controlled, is then obtained in following item of information extremely
One item missing: data processed result, at least one thread send data processing request data processed result corresponding with receiving
Time difference, the operating parameter for being tested server, test result is finally generated according to acquired item of information, improves test effect
Rate.
Below with reference to Fig. 6, it illustrates the knots of the computer system 600 for the equipment for being suitable for being used to realize the embodiment of the present application
Structure schematic diagram.Equipment shown in Fig. 6 is only an example, should not function to the embodiment of the present application and use scope bring and appoint
What is limited.
As shown in fig. 6, computer system 600 includes central processing unit (CPU) 601, it can be read-only according to being stored in
Program in memory (ROM) 602 or be loaded into the program in random access storage device (RAM) 603 from storage section 608 and
Execute various movements appropriate and processing.In RAM 603, also it is stored with system 600 and operates required various programs and data.
CPU 601, ROM 602 and RAM 603 are connected with each other by bus 604.Input/output (I/O) interface 605 is also connected to always
Line 604.
I/O interface 605 is connected to lower component: the importation 606 including keyboard, mouse etc.;It is penetrated including such as cathode
The output par, c 607 of spool (CRT), liquid crystal display (LCD) etc. and loudspeaker etc.;Storage section 608 including hard disk etc.;
And the communications portion 609 of the network interface card including LAN card, modem etc..Communications portion 609 via such as because
The network of spy's net executes communication process.Driver 610 is also connected to I/O interface 606 as needed.Detachable media 611, such as
Disk, CD, magneto-optic disk, semiconductor memory etc. are mounted on as needed on driver 610, in order to read from thereon
Computer program be mounted into storage section 608 as needed.
Particularly, in accordance with an embodiment of the present disclosure, it may be implemented as computer above with reference to the process of flow chart description
Software program.For example, embodiment of the disclosure includes a kind of computer program product comprising be carried on computer-readable medium
On computer program, which includes the program code for method shown in execution flow chart.In such reality
It applies in example, which can be downloaded and installed from network by communications portion 609, and/or from detachable media
611 are mounted.When the computer program is executed by central processing unit (CPU) 601, limited in execution the present processes
Above-mentioned function.It should be noted that computer-readable medium described herein can be computer-readable signal media or
Computer readable storage medium either the two any combination.Computer readable storage medium for example can be --- but
Be not limited to --- electricity, magnetic, optical, electromagnetic, infrared ray or semiconductor system, device or device, or any above combination.
The more specific example of computer readable storage medium can include but is not limited to: have one or more conducting wires electrical connection,
Portable computer diskette, hard disk, random access storage device (RAM), read-only memory (ROM), erasable type may be programmed read-only deposit
Reservoir (EPROM or flash memory), optical fiber, portable compact disc read-only memory (CD-ROM), light storage device, magnetic memory
Part or above-mentioned any appropriate combination.In this application, computer readable storage medium, which can be, any include or stores
The tangible medium of program, the program can be commanded execution system, device or device use or in connection.And
In the application, computer-readable signal media may include in a base band or the data as the propagation of carrier wave a part are believed
Number, wherein carrying computer-readable program code.The data-signal of this propagation can take various forms, including but not
It is limited to electromagnetic signal, optical signal or above-mentioned any appropriate combination.Computer-readable signal media can also be computer
Any computer-readable medium other than readable storage medium storing program for executing, the computer-readable medium can send, propagate or transmit use
In by the use of instruction execution system, device or device or program in connection.Include on computer-readable medium
Program code can transmit with any suitable medium, including but not limited to: wireless, electric wire, optical cable, RF etc., Huo Zheshang
Any appropriate combination stated.
Flow chart and block diagram in attached drawing are illustrated according to the system of the various embodiments of the application, method and computer journey
The architecture, function and operation in the cards of sequence product.In this regard, each box in flowchart or block diagram can generation
A part of one unit of table, program segment or code, a part of the unit, program segment or code include one or more
Executable instruction for implementing the specified logical function.It should also be noted that in some implementations as replacements, institute in box
The function of mark can also occur in a different order than that indicated in the drawings.For example, two boxes succeedingly indicated are practical
On can be basically executed in parallel, they can also be executed in the opposite order sometimes, and this depends on the function involved.Also it wants
It is noted that the combination of each box in block diagram and or flow chart and the box in block diagram and or flow chart, Ke Yiyong
The dedicated hardware based system of defined functions or operations is executed to realize, or can be referred to specialized hardware and computer
The combination of order is realized.
Being described in unit involved in the embodiment of the present application can be realized by way of software, can also be by hard
The mode of part is realized.Described unit also can be set in the processor, for example, can be described as: a kind of processor packet
Include first acquisition unit, control unit, second acquisition unit, generation unit.Wherein, the title of these units is under certain conditions
The restriction to the unit itself is not constituted, for example, first acquisition unit is also described as " for obtaining test parameter
Unit ".
As on the other hand, present invention also provides a kind of nonvolatile computer storage media, the non-volatile calculating
Machine storage medium can be nonvolatile computer storage media included in device described in above-described embodiment;It is also possible to
Individualism, without the nonvolatile computer storage media in supplying server.Above-mentioned nonvolatile computer storage media
It is stored with one or more program, when one or more of programs are executed by an equipment, so that the equipment: obtaining
Take test parameter, wherein test parameter include: Virtual User number, single testing machine operation process number, individual process include
Thread Count, Virtual User number be open testing machine number, single testing machine operation process number and individual process include
Thread Count product;According to acquired test parameter, the operation of at least one testing machine is controlled;It obtains in following item of information
At least one of: data processed result, at least one thread send data processing request data processing knot corresponding with receiving
The time difference of fruit, the operating parameter for being tested server;Test result is generated according to acquired item of information.
Above description is only the preferred embodiment of the application and the explanation to institute's application technology principle.Those skilled in the art
Member is it should be appreciated that invention scope involved in the application, however it is not limited to technology made of the specific combination of above-mentioned technical characteristic
Scheme, while should also cover in the case where not departing from the inventive concept, it is carried out by above-mentioned technical characteristic or its equivalent feature
Any combination and the other technical solutions formed.Such as features described above has similar function with (but being not limited to) disclosed herein
Can technical characteristic replaced mutually and the technical solution that is formed.
Claims (12)
1. a kind of test method for testing service device, which is characterized in that the testing service device and at least one test are used
Machine communicates to connect, and operation has at least one process when each testing machine at least one described testing machine is opened, described
Each process at least one process includes at least one thread, at least one described thread is used to send to tested server
Data processing request, and receive the corresponding data processed result that the tested server returns, which comprises
Obtain test parameter, wherein the test parameter includes: process number, the list of Virtual User number, the operation of single testing machine
The Thread Count that a process includes, the Virtual User number are the process number of the testing machine number opened, the operation of single testing machine
The product for the Thread Count for including with individual process;
According to acquired test parameter, the operation of at least one testing machine is controlled;
Obtain at least one in following item of information: the data processed result, at least one described thread send data processing
Request the time difference of data processed result corresponding with receiving, the operating parameter of the tested server;
Test result is generated according to acquired item of information.
2. the method according to claim 1, wherein the operation of at least one testing machine described in the control,
Include:
The thread for including according to the Virtual User number, the process number of the single testing machine operation and the individual process
Number determines the testing machine number for needing to open;
Obtain the status information of each testing machine at least one described testing machine, wherein the status information is for referring to
Show that testing machine is in the operating status opened or stopped;
According to the testing machine number for needing to open and acquired status information, at least one described testing machine is determined
In each testing machine operating status;
According to the Thread Count that the process number of the single testing machine operation and the individual process include, identified place is determined
The process number and Thread Count run in the testing machine for opening operating status.
3. the method according to claim 1, wherein the method also includes:
In response to getting the operation shape for changing each testing machine at least one described testing machine of user's input
The instruction of state determines the operating status of each testing machine at least one described testing machine according to described instruction.
4. method according to any one of claim 1-3, which is characterized in that the test parameter is stored in target data
In table, the execution time of the test parameter is also stored in the target matrix;And
The test parameter according to acquired in controls the operation of at least one testing machine, comprising:
Within the execution time, according to acquired test parameter, the operation of at least one testing machine is controlled.
5. according to the method described in claim 4, it is characterized in that, being also stored with and test parameter pair in the target matrix
The identification information and execution serial number answered, the identification information is used to indicate test assignment belonging to the test parameter, described to hold
Row serial number is used to indicate the sequence that the test parameter is performed in the test assignment;And
The acquisition test parameter, comprising:
Obtain the identification information of user's input;
The test parameter with the identification information match is inquired in target matrix;And
The test parameter according to acquired in controls the operation of at least one testing machine, comprising:
It is greater than one group in response to the quantity of the test parameter inquired, according to each group test parameter in the test parameter inquired
The execution time and execute serial number and each group test parameter, control the operation of at least one testing machine.
6. a kind of test device for testing service device, which is characterized in that the testing service device and at least one test are used
Machine communicates to connect, and operation has at least one process when each testing machine at least one described testing machine is opened, described
Each process at least one process includes at least one thread, at least one described thread is used to send to tested server
Data processing request, and the corresponding data processed result that the tested server returns is received, described device includes:
First acquisition unit, for obtaining test parameter, wherein the test parameter includes: Virtual User number, single test use
The Thread Count that process number, the individual process of machine operation include, the Virtual User number are the testing machine number opened, single test
The product for the Thread Count that the process number and individual process run with machine includes;
Control unit, for controlling the operation of at least one testing machine according to acquired test parameter;
Second acquisition unit, for obtain in following item of information at least one of: the data processed result, it is described at least one
Thread sends the operation ginseng of the time difference of data processing request data processed result corresponding with receiving, the tested server
Number;
Generation unit, for generating test result according to acquired item of information.
7. device according to claim 6, which is characterized in that described control unit, comprising:
First determines subelement, for according to the process number of the Virtual User number, single testing machine operation and described
The Thread Count that individual process includes determines the testing machine number for needing to open;
Subelement is obtained, for obtaining the status information of each testing machine at least one described testing machine, wherein described
Status information is used to indicate testing machine and is in the operating status opened or stopped;
Second determines subelement, for determining according to the testing machine number for needing to open and acquired status information
The operating status of each testing machine at least one described testing machine;
Third determines subelement, the line for including for the process number and the individual process according to the single testing machine operation
Number of passes determines the identified process number and Thread Count run in the testing machine for opening operating status.
8. device according to claim 6, which is characterized in that described device further includes determination unit, the determination unit
It is configured to:
In response to getting the operation shape for changing each testing machine at least one described testing machine of user's input
The instruction of state determines the operating status of each testing machine at least one described testing machine according to described instruction.
9. device a method according to any one of claims 6-8, which is characterized in that the test parameter is stored in target data
In table, the execution time of the test parameter is also stored in the target matrix;And
The test parameter according to acquired in controls the operation of at least one testing machine, comprising:
Within the execution time, according to acquired test parameter, the operation of at least one testing machine is controlled.
10. device according to claim 9, which is characterized in that be also stored in the target matrix and test parameter
Corresponding identification information and execution serial number, the identification information is used to indicate test assignment belonging to the test parameter, described
It executes serial number and is used to indicate the sequence that the test parameter is performed in the test assignment;And
The acquiring unit, is further configured to:
Obtain the identification information of user's input;
The test parameter with the identification information match is inquired in target matrix;And
Described control unit is further configured to:
It is greater than one group in response to the quantity of the test parameter inquired, according to each group test parameter in the test parameter inquired
The execution time and execute serial number and each group test parameter, control the operation of at least one testing machine.
11. a kind of equipment characterized by comprising
One or more processors;
Storage device, for storing one or more programs,
When one or more of programs are executed by one or more of processors, so that one or more of processors are real
Now such as method as claimed in any one of claims 1 to 5.
12. a kind of computer readable storage medium, is stored thereon with computer program, which is characterized in that the program is by processor
Such as method as claimed in any one of claims 1 to 5 is realized when execution.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201710508953.2A CN109144846B (en) | 2017-06-28 | 2017-06-28 | Test method and device for testing server |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201710508953.2A CN109144846B (en) | 2017-06-28 | 2017-06-28 | Test method and device for testing server |
Publications (2)
Publication Number | Publication Date |
---|---|
CN109144846A true CN109144846A (en) | 2019-01-04 |
CN109144846B CN109144846B (en) | 2022-07-05 |
Family
ID=64803224
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201710508953.2A Active CN109144846B (en) | 2017-06-28 | 2017-06-28 | Test method and device for testing server |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN109144846B (en) |
Cited By (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN112035303A (en) * | 2020-09-01 | 2020-12-04 | 腾讯科技(深圳)有限公司 | Data testing method and device, computer and readable storage medium |
CN112988552A (en) * | 2019-12-12 | 2021-06-18 | 腾讯科技(深圳)有限公司 | Application program testing method, device, equipment and storage medium |
CN113656161A (en) * | 2021-08-17 | 2021-11-16 | 中正信评(深圳)技术服务有限公司 | Method, device and system for scheduling pressure generation service in performance test |
CN114077449A (en) * | 2020-08-20 | 2022-02-22 | 网联清算有限公司 | Database server testing method and device, electronic equipment and storage medium |
Citations (9)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US20060117222A1 (en) * | 2004-11-12 | 2006-06-01 | Lei Shen | Test agent architecture |
CN101853197A (en) * | 2009-03-31 | 2010-10-06 | 国际商业机器公司 | Determine server load capacity |
CN102480392A (en) * | 2010-11-23 | 2012-05-30 | 中兴通讯股份有限公司 | Performance test device and working method thereof |
CN103139006A (en) * | 2011-12-05 | 2013-06-05 | 上海博腾信息科技有限公司 | Web service based automated testing device and method |
CN103150238A (en) * | 2011-12-07 | 2013-06-12 | 阿里巴巴集团控股有限公司 | Service request processing method, simulation performance test method and simulation performance test device |
CN103064778B (en) * | 2011-10-20 | 2015-09-09 | 阿里巴巴集团控股有限公司 | A kind of server performance method of testing, Apparatus and system |
CN105207832A (en) * | 2014-06-13 | 2015-12-30 | 腾讯科技(深圳)有限公司 | Server stress testing method and device |
CN106649057A (en) * | 2015-10-28 | 2017-05-10 | 北京国双科技有限公司 | Method and device for testing server pressure |
US20170315900A1 (en) * | 2014-11-24 | 2017-11-02 | Hewlett Packard Enterprise Development Lp | Application management based on data correlations |
-
2017
- 2017-06-28 CN CN201710508953.2A patent/CN109144846B/en active Active
Patent Citations (10)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US20060117222A1 (en) * | 2004-11-12 | 2006-06-01 | Lei Shen | Test agent architecture |
CN101853197A (en) * | 2009-03-31 | 2010-10-06 | 国际商业机器公司 | Determine server load capacity |
CN102480392A (en) * | 2010-11-23 | 2012-05-30 | 中兴通讯股份有限公司 | Performance test device and working method thereof |
CN103064778B (en) * | 2011-10-20 | 2015-09-09 | 阿里巴巴集团控股有限公司 | A kind of server performance method of testing, Apparatus and system |
CN103139006A (en) * | 2011-12-05 | 2013-06-05 | 上海博腾信息科技有限公司 | Web service based automated testing device and method |
CN103150238A (en) * | 2011-12-07 | 2013-06-12 | 阿里巴巴集团控股有限公司 | Service request processing method, simulation performance test method and simulation performance test device |
CN103150238B (en) * | 2011-12-07 | 2015-11-11 | 阿里巴巴集团控股有限公司 | A kind of service request processing method, simulated performance method of testing and device |
CN105207832A (en) * | 2014-06-13 | 2015-12-30 | 腾讯科技(深圳)有限公司 | Server stress testing method and device |
US20170315900A1 (en) * | 2014-11-24 | 2017-11-02 | Hewlett Packard Enterprise Development Lp | Application management based on data correlations |
CN106649057A (en) * | 2015-10-28 | 2017-05-10 | 北京国双科技有限公司 | Method and device for testing server pressure |
Cited By (6)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN112988552A (en) * | 2019-12-12 | 2021-06-18 | 腾讯科技(深圳)有限公司 | Application program testing method, device, equipment and storage medium |
CN112988552B (en) * | 2019-12-12 | 2023-06-30 | 腾讯科技(深圳)有限公司 | Application program testing method, device, equipment and storage medium |
CN114077449A (en) * | 2020-08-20 | 2022-02-22 | 网联清算有限公司 | Database server testing method and device, electronic equipment and storage medium |
CN114077449B (en) * | 2020-08-20 | 2023-08-01 | 网联清算有限公司 | Database server testing method and device, electronic equipment and storage medium |
CN112035303A (en) * | 2020-09-01 | 2020-12-04 | 腾讯科技(深圳)有限公司 | Data testing method and device, computer and readable storage medium |
CN113656161A (en) * | 2021-08-17 | 2021-11-16 | 中正信评(深圳)技术服务有限公司 | Method, device and system for scheduling pressure generation service in performance test |
Also Published As
Publication number | Publication date |
---|---|
CN109144846B (en) | 2022-07-05 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
US11671482B2 (en) | Multitenant cross dimensional cloud resource visualization and planning | |
CN109144846A (en) | Test method and device for testing service device | |
CN104410543B (en) | Automated testing method and system based on cloud resource | |
CN104065528B (en) | For analyzing and examining functional method and apparatus of multiple network equipments | |
CN109213597A (en) | Resource allocation methods, device, computer equipment and computer readable storage medium | |
CN104520814A (en) | System and method for configuring cloud computing systems | |
CN109034396A (en) | Method and apparatus for handling the deep learning operation in distributed type assemblies | |
CN110083528A (en) | Distribution method, device, computer equipment and the storage medium of test assignment | |
WO2019050952A1 (en) | Systems, methods, and media for distributing database queries across a metered virtual network | |
CN108052615A (en) | Processing method, device, medium and the electronic equipment of access request | |
CN107590075A (en) | A kind of method for testing software and device | |
CN106484623A (en) | A kind of method of software test, apparatus and system | |
CN110389824A (en) | Handle method, equipment and the computer program product of calculating task | |
CN109891438A (en) | The experiment of numerical value quantum | |
CN109783197A (en) | Dispatching method and device for program runtime environment | |
CN107341081A (en) | Test system and method | |
CN107315889A (en) | The performance test methods and storage medium of simulation engine | |
CN109951320A (en) | A kind of expansible multi layer monitoing frame and its monitoring method of facing cloud platform | |
CN110333941A (en) | A kind of real-time computing platform of big data based on sql and method | |
CN109902251A (en) | Scheme Choice method, apparatus, terminal and readable storage medium storing program for executing based on decision tree | |
CN110460584A (en) | Access request processing method, device, electronic equipment and computer-readable medium | |
CN110413527A (en) | Test macro, test method, electronic equipment and computer readable storage medium | |
CN109800081A (en) | A kind of management method and relevant device of big data task | |
CN108933695A (en) | Method and apparatus for handling information | |
Imbert et al. | Using the EXECO toolbox to perform automatic and reproducible cloud experiments |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
PB01 | Publication | ||
PB01 | Publication | ||
SE01 | Entry into force of request for substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
GR01 | Patent grant | ||
GR01 | Patent grant |