CN106375140A - Pressure testing method and device - Google Patents
Pressure testing method and device Download PDFInfo
- Publication number
- CN106375140A CN106375140A CN201610702451.9A CN201610702451A CN106375140A CN 106375140 A CN106375140 A CN 106375140A CN 201610702451 A CN201610702451 A CN 201610702451A CN 106375140 A CN106375140 A CN 106375140A
- Authority
- CN
- China
- Prior art keywords
- test
- network address
- stress test
- tested
- standard
- 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.)
- Pending
Links
Classifications
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L43/00—Arrangements for monitoring or testing data switching networks
- H04L43/50—Testing arrangements
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L43/00—Arrangements for monitoring or testing data switching networks
- H04L43/08—Monitoring or testing based on specific metrics, e.g. QoS, energy consumption or environmental parameters
Landscapes
- Engineering & Computer Science (AREA)
- Computer Networks & Wireless Communication (AREA)
- Signal Processing (AREA)
- Environmental & Geological Engineering (AREA)
- Medical Treatment And Welfare Office Work (AREA)
Abstract
The invention discloses a pressure testing method and device. The method comprises the following steps: displaying a pressure testing interface to acquire a pressure testing standard set in the pressure testing interface; determining a testing parameter used when performing pressure testing on a to-be-tested website according to the pressure testing standard, and performing the pressure testing on the to-be-tested website according to the testing parameter. A tester only needs to set a certain testing standard, so that the corresponding testing parameter can be automatically determined, and the to-be-tested website can be tested according to the testing parameter without manually input of the testing parameter in a pressure testing tool, thereby achieving the effects of simplifying manual operation steps of the tester and improving the testing efficiency.
Description
Technical field
The present invention relates to software test field, particularly to a kind of method for testing pressure and device.
Background technology
For lifting the bearing capacity of the access service page it is ensured that service experience and redundancy ability, before network service is reached the standard grade
Typically require and carry out stress test.
In the prior art, the tester of network service is generally by means of loadrunner or jmeter etc. on the market
Existing stress test instrument carries out stress test to network service.Such as, so that pressure is carried out to network service by jmeter
As a example test, tester installs and opens jmeter instrument, manual creation in the sets of threads setting interface that jmeter provides
Sets of threads, fills in Thread Count and cycle-index, and inputs network address to be tested in http request setting interface, clicks on executive button
Afterwards, jmeter instrument starts to execute stress test.
During realizing the present invention, it is found by the applicant that prior art there are the following problems:
The existing method carrying out stress test by stress test instrument, is required for tester when testing every time manual
The every test parameter of setting, manual steps are relatively complicated, and testing efficiency is relatively low.
Content of the invention
Relatively complicated in order to solve manual steps in prior art, the relatively low problem of testing efficiency, the present invention is implemented
Example provides a kind of method for testing pressure and device, and technical scheme is as follows:
A kind of first aspect, there is provided method for testing pressure, methods described includes:
Show stress test interface;
Obtain the stress test standard of setting in described stress test interface;
Determined according to described stress test standard and treat the test parameter that address test carries out use during stress test;
Stress test is carried out to described network address to be tested according to described test parameter.
A kind of second aspect, there is provided pressure test device, described device includes:
Showing interface module, for showing stress test interface;
Standard acquisition module, for obtaining the stress test standard of setting in described stress test interface;
Parameter determination module, for determining that according to described stress test standard treating address test carries out making during stress test
Test parameter;
Test module, for carrying out stress test according to described test parameter to described network address to be tested.
Technical scheme provided in an embodiment of the present invention can include following beneficial effect:
By showing stress test interface, obtain the stress test standard of setting in stress test interface, according to pressure
Testing standard determines treats the test parameter that address test carries out use during stress test, treats address test according to test parameter
Carry out stress test, tester only needs to arrange certain testing standard, you can to automatically determine corresponding test parameter, and
Treat address test according to test parameter to be tested it is not necessary to be manually entered test parameter in stress test instrument, thus
Reach the manual steps simplifying tester, improve the effect of testing efficiency.
It should be appreciated that above general description and detailed description hereinafter are only exemplary and explanatory, not
The present invention can be limited.
Brief description
Accompanying drawing herein is merged in description and constitutes the part of this specification, shows the enforcement meeting the present invention
Example, and be used for explaining the principle of the present invention together with description.
Fig. 1 is a kind of flow chart of the method for testing pressure according to an exemplary embodiment;
Fig. 2 is a kind of flow chart of the method for testing pressure implementing to exemplify according to another exemplary;
Fig. 3 is a kind of stress test interface operation schematic diagram that embodiment illustrated in fig. 2 is related to;
Fig. 4 is a kind of flow chart of the method for testing pressure according to further example embodiment;
Fig. 5 is a kind of interface schematic diagram at stress test interface that embodiment illustrated in fig. 4 is related to;
Fig. 6 is a kind of block diagram of the pressure test device according to an exemplary embodiment;
Fig. 7 is a kind of structural representation of the terminal according to an exemplary embodiment.
Specific embodiment
Here will in detail exemplary embodiment be illustrated, its example is illustrated in the accompanying drawings.Explained below is related to
During accompanying drawing, unless otherwise indicated, the same numbers in different accompanying drawings represent same or analogous key element.Following exemplary embodiment
Described in embodiment do not represent all embodiments consistent with the present invention.On the contrary, they be only with such as appended
The example of the consistent apparatus and method of some aspects being described in detail in claims, the present invention.
Fig. 1 is a kind of flow chart of the method for testing pressure according to an exemplary embodiment, and the method can be used for
In the terminals such as test terminal, such as PC, notebook computer or computer workstation, to web page or the h5 page etc.
The network service page carries out stress test.As shown in figure 1, this method for testing pressure can include several steps as follows:
Step 101, shows stress test interface.
Step 102, obtains the stress test standard of setting in this stress test interface.
Step 103, determines according to this stress test standard and treats the test ginseng that address test carries out use during stress test
Number.
Step 104, carries out stress test according to this test parameter to this network address to be tested.
In sum, method for testing pressure provided in an embodiment of the present invention, by showing stress test interface, obtains in pressure
According to stress test standard, the stress test standard of setting in power test interface, when determining that treating address test carries out stress test
The test parameter using, treats address test according to test parameter and carries out stress test, and tester only needs to arrange certain
Testing standard, you can to automatically determine corresponding test parameter, and address test is treated according to test parameter tested, it is not required to
To be manually entered test parameter in stress test instrument, thus reaching the manual steps simplifying tester, to improve and surveying
The effect of examination efficiency.
The method for testing pressure that the above embodiment of the present invention provides is it is provided that one is based on existing stress test instrument
Test script, this test script run when provide for this stress test instrument gui (graphical user
Interface, graphical user interface) interface, user only needs to select corresponding testing standard in this gui interface, tests foot
This can automatically determine corresponding test parameter, such as number of concurrent and cycle-index etc., and automatically calls existing pressure
Testing tool, treats address test according to this test parameter and carries out stress test, simplifies setting when tester tests every time
The step of test parameter.The following examples of the present invention will be described further to such scheme.
Fig. 2 is a kind of flow chart of the method for testing pressure implementing to exemplify according to another exemplary, and the method can be used
In test terminal, the such as terminal such as PC, notebook computer or computer workstation, to web page or the h5 page
Carry out stress test Deng the network service page.As shown in Fig. 2 this method for testing pressure can include several steps as follows:
Step 201, shows stress test interface.
In the embodiment of the present invention, stress test interface can be created by test script and be shown, such as, tester
After testing results script, test script shows stress test interface in the display screen of test terminal, this stress test interface
In can include a testing standard choice box.
Step 202, shows at least two standard option in stress test interface.
When tester carries out the assigned operation such as clicking on to the testing standard choice box in stress test interface, stress test
At least two standard option can be shown by modes such as drop-down list or pop-ups in interface, the corresponding survey of each standard option
Test-object is accurate.
Step 203, when receiving the selection operation to one of at least two standard option standard option, will be selected
This standard option selected is retrieved as stress test standard.
When tester wants to select some testing standard, can be by the operation such as click from the choosing of this at least two standard
The testing standard wanted, the stress test standard being used as this stress test is selected in.
Step 204, determines according to this stress test standard and treats the test ginseng that address test carries out use during stress test
Number.
In embodiments of the present invention, each standard option is previously provided with corresponding test parameter, every kind of testing standard
In the code that corresponding test parameter just can be arranged on test script when test script is developed, or it is also possible to by using
The tester of this test script voluntarily arranges various testing standards and the corresponding test parameter of testing standard, and by test foot
Originally it is stored in the position that certain specifies.After tester's selection pressure testing standard, test script i.e. can be according to tester
The corresponding test parameter of stress test standard queries selecting.
In embodiments of the present invention, test parameter can include number of concurrent and cycle-index, and number of concurrent is used for instruction request
Access the quantity of the thread of this network address to be tested, cycle-index is used for indicating that each this thread request accesses this network address to be tested
Number of times.
Optionally, test parameter can also be shown in stress test interface for test script, so that tester checks
Whether test parameter is suitable, if tester needs test parameter is adjusted, can also be to aobvious in stress test interface
The test parameter showing is modified, and in this test, follow-up test script will be according to amended test detection to be tested
Network address carries out stress test.
Step 205, calls mounted stress test instrument according to this test parameter to the corresponding clothes of this network address to be tested
Business device request accesses this network address to be tested.
Specifically, in embodiments of the present invention, test script can according to previous step determine (or tester is manual
Amended) test parameter generate can with the executable file of the execution of stress test instrument mounted in tested terminal,
And call this stress test instrument to execute this executable file, so that this stress test instrument is treated to this according to this test parameter
The corresponding server request of address test accesses this network address to be tested, this stress test instrument also record access result, such as, often
Duration that secondary access is consumed, access number of success, access the frequency of failure and complete the test to a network address to be tested
Total duration etc..
Step 206, indicates that this stress test instrument will carry out the result data of stress test acquisition to this network address to be tested
Preserve to specified file.
Address test is treated based on mounted stress test instrument due to the embodiment of the present invention and carries out stress test, in order to
It is easy to the result data of subsequent extracted test, test script also can indicate that stress test instrument will test the result data obtaining
It is saved in the specified file of specified location.
Step 207, obtains this corresponding target data of stress test standard, by this target data and to this network address to be tested
The result data carrying out stress test acquisition is compared, and obtains comparison result, is outputed test result according to this comparison result.
In embodiments of the present invention, each standard option is also previously provided with corresponding target data, and that is, test result reaches
It is considered as test passes during to what kind of data.Test script carries out stress test calling stress test instrument to treat address test
When, after extraction test obtains result data from specified file, the stress test standard selecting during this test can be obtained
Corresponding target data, the target data getting is compared with the result data extracting, and obtains comparison result,
And outputed test result according to comparison result, this test result can be illustrated in stress test interface, so as tester and
When check.
Specifically, refer to Fig. 3, it illustrates the present embodiments relate to a kind of stress test interface operation illustrate
Figure.As shown in figure 3, after tester's testing results script, the screen of test terminal is shown stress test interface 30, this survey
Testing standard choice box 31, network address input frame 32, parameter display area domain 33, test control 34 and result is comprised in examination interface 30
Display area 35, ejects drop-down list 36 after tester's hit testing standard choice box 31, comprises multiple in drop-down list 36
Standard option 36a, after tester clicks on one of standard option (testing standard 3), test script inquiry testing standard 3 is right
The test parameter (number of concurrent and cycle-index) answered, and test parameter is illustrated in parameter display area domain 33.Tester exists
After inputting network address to be tested in network address input frame 32, hit testing control 34, test script generates mounted stress test work
Tool, carries out pressure according to the test parameter shown in parameter display area domain 33 to the network address to be tested of input in network address input frame 32
Test, and it is illustrated in result display area 35 after corresponding with testing standard 3 for test result target data is compared
In.
In sum, method for testing pressure provided in an embodiment of the present invention, by showing stress test interface, obtains in pressure
According to stress test standard, the stress test standard of setting in power test interface, when determining that treating address test carries out stress test
The test parameter using, treats address test according to test parameter and carries out stress test, and tester only needs to arrange certain
Testing standard, you can to automatically determine corresponding test parameter, and address test is treated according to test parameter tested, it is not required to
To be manually entered test parameter in stress test instrument, thus reaching the manual steps simplifying tester, to improve and surveying
The effect of examination efficiency.
Accurately select the stress test standard needing for the ease of tester, the scheme shown in the embodiment of the present invention is permissible
The service area of the network service being provided according to network address to be tested carries out criteria, and that is, number of users is more, accesses pressure relatively
The corresponding testing standard of big service area is higher, conversely, number of users is more, accesses the larger corresponding survey of service area of pressure
Test-object criterion is relatively low.Tester when treating address test and tested, can select and being provided of network address to be tested
The corresponding stress test standard of the service area of network service.The following examples of the present invention will be done to such scheme further
Explanation.
Fig. 4 is a kind of flow chart of the method for testing pressure according to further example embodiment, and the method can be used
In test terminal, the such as terminal such as PC, notebook computer or computer workstation, to web page or the h5 page
Carry out stress test Deng the network service page.As shown in figure 4, this method for testing pressure can include several steps as follows:
Step 401, shows stress test interface.
Step 402, shows at least two region options in stress test interface, and each region option instruction one is to be measured
Examination network address provides the geographic area of service.
When tester carries out the assigned operation such as clicking on to the testing standard choice box in stress test interface, stress test
At least two region options can be shown by modes such as drop-down list or pop-ups in interface, the corresponding survey of each region option
Test-object is accurate.
Step 403, selected region option at least two region options is retrieved as stress test standard.
Tester, according to the service area of network address to be tested, to select at least two region options by the operation such as click
In the stress test mark that used as this stress test of a region option corresponding with the service area of network address to be tested
Accurate.
Step 404, determines according to this stress test standard and treats the test ginseng that address test carries out use during stress test
Number.
The implementation procedure of this step may be referred to the description under step 204 in above-mentioned embodiment illustrated in fig. 2, no longer superfluous herein
State.
Step 405, calls mounted stress test instrument according to this test parameter to the corresponding clothes of this network address to be tested
Business device request accesses this network address to be tested.
Specifically, in embodiments of the present invention, test script can according to previous step determine (or tester is manual
Amended) test parameter generate by the executable file of the execution of mounted stress test instrument, and this pressure can be called
Power testing tool executes this executable file so that this stress test instrument according to this test parameter to this network address pair to be tested
The server request answered accesses this network address to be tested, this stress test instrument also record access result, such as, accesses every time and is disappeared
The duration of consumption, access number of success, access the frequency of failure and complete total duration of test to a network address to be tested etc..
Specifically, test script can directly be changed stress test instrument according to test parameter and hold when carrying out stress test
The executable file of row, can be according to the test parameter of above-mentioned determination so that when stress test instrument executes this executable file
Carry out stress test.
Step 406, indicates that this stress test instrument will carry out the result data of stress test acquisition to this network address to be tested
Preserve to specified file.
Address test is treated based on mounted stress test instrument due to the embodiment of the present invention and carries out stress test, in order to
It is easy to the result data of subsequent extracted test, test script also can indicate that stress test instrument will test the result data obtaining
It is saved in the specified file of specified location.
Step 407, obtains this corresponding target data of stress test standard, by this target data and to this network address to be tested
The result data carrying out stress test acquisition is compared, and obtains comparison result, is outputed test result according to this comparison result.
In embodiments of the present invention, each standard option is also previously provided with corresponding target data, and that is, test result reaches
It is considered as test passes during to what kind of data.Test script carries out stress test calling stress test instrument to treat address test
When, after extraction test obtains result data from specified file, the stress test standard selecting during this test can be obtained
Corresponding target data, the target data getting is compared with the result data extracting, and obtains comparison result,
And outputed test result according to comparison result, this test result can be illustrated in stress test interface, so as tester and
When check.
Optionally, in embodiments of the present invention, test script is also supported once to treat to multiple according to identical test parameter
Address test is tested, in order to avoid the test result between multiple network address to be tested interferes with each other, embodiment of the present invention institute
In the scheme shown, it is also directed to every kind of testing standard setting test interval duration, this test interval duration is according to same test ginseng
Test interval between two network address to be tested that number is tested.Specifically, when network address to be tested includes at least two network address
When, test script can obtain this stress test standard corresponding test interval duration, to be measured to this according to this test parameter
When examination network address carries out stress test, when there is the network address of not yet test in this at least two network address, to this at least two net
One of location network address completes to start timing during test, is started according to this test parameter when timing reaches this test interval duration
Stress test is carried out to the network address of next not yet test.
Further, in embodiments of the present invention, test script may also provide the setting interface of proxy server, so that
When test terminal server corresponding with network address to be tested is not belonging to same LAN, in generation, can manually be arranged by tester
Reason server address and port, to treat address test to be normally carried out stress test.
Specifically, with stress test instrument for jmeter instrument, tester passes through test script, under non-graphic interface
Automatic running jmeter instrument, completes to treat the stress test of address test, and the data finally obtaining in this testing tool
As a example as a example middle displaying after processing, calculating, refer to following step.
Test script creates java graphical interfaces engineering (gui), creates each parametric contol according to design drawing.Wherein, test
The scripted code of script defines the every element in gui interface (i.e. stress test interface), including region option choice box, treats
Address test input frame, parameter setting region and test result viewing area.Specifically, refer to Fig. 5, it illustrates this
A kind of interface schematic diagram at stress test interface that bright embodiment is related to, wherein, comprises setting area in stress test interface 50
51st, parameter display region 52 and test result display area 53.
Setting area 51 includes: testing standard selects control 51a, network address input frame 51b and proxy server setting frame
51c.
By drop-down four kinds of region options (not shown in Fig. 5) when testing standard selects control 51a to be triggered, respectively " no
Selection service area ", " national service ", " certain province or Beijing, Shanghai, Guangzhou, Shenzhen, Chongqing, Tianjin or more than 5 cities clothes
Business " and " other urban services ".
One or more network address to be tested can be inputted in network address input frame 51b, if multiple network address to be tested, then defeated
After entering to complete a network address to be tested, line feed is needed to input next network address to be tested.
Proxy server arranges frame 51c and is used for when the network address to be tested of tester's input is outer net address, by testing
Personnel input proxy server address and port in proxy server setting frame 51c.
Parameter display region 52 includes: number of concurrent display frames 52a, cycle-index display frames 52b, average response time target
Value display frames 52c and test interval display frames 52d.
The numerical value shown in number of concurrent display frames 52a is Thread Count, i.e. request accesses the thread of this network address to be tested
Quantity.
The numerical value shown in cycle-index display frames 52b is cycle-index, and that is, to access this to be measured for each this thread request
The number of times of examination network address.
The numerical value shown in average response time desired value display frames 52c is the average criterion response time by test,
I.e. after above-mentioned number of concurrent and cycle-index are tested, this numerical value of response time region of averagely each request thinks test
Success, otherwise it is assumed that test crash.
The numerical value shown in test interval display frames 52d is the test interval of former and later two network address, that is, previous
After individual network address completes test, how long interval starts next network address is tested.
In this test script, testing standard selects in four kinds of drop-down when being triggered region options of control 51a, every kind ofly
Domain option corresponds to one group of test parameter, and partial test parameter is as follows:
National service: 500 concurrently persistently pressure 100,000 requests, by the report of this requirement output result.Request mean time consumption 500ms
Within be qualified, test interval 450000 (ms) between many network address.
Certain saves or Beijing, Shanghai, Guangzhou, Shenzhen, Chongqing, Tianjin or more than 5 urban services: 300 concurrently persistently press 60,000
Request, by the report of this requirement output result.It is qualified within request mean time consumption 500ms, test interval between many network address
450000(ms).
Other urban services: 100 concurrently persistently pressure 30,000 requests, by the report of this requirement output result.Request mean time consumption
It is qualified within 500ms, test interval 450000 (ms) between many network address.
As shown in figure 5, tester testing standard select control 51a in select stress test standard be " certain save or
Beijing, Shanghai, Guangzhou, Shenzhen, Chongqing, Tianjin or more than 5 urban services ", then test script is in parameter display region 52
The parameter shown is: number of concurrent 300, cycle-index 200, average response time desired value 500, test interval 450000.
Optionally, in the interface 50 shown in Fig. 5, if tester needs to showing in parameter display region 52
Item or multiple parameters are modified, and can directly modify in corresponding display frames.
Also comprise in stress test interface 50 to test control 54, after tester's exact p-value parameter is suitable, you can with
Click on this test control 54.Test script detect test control 54 clicked after, you can to create the executable literary composition of jmeter
Part (testplan.jmx) file.
Under non-graphic interface, test script can start jmeter by order line form and (open cmd, be introduced into
Under the installation directory bin of jmeter): (option-n represents non-gui to ./apachejmeter-n-t testplan.jmx, and-t refers to
Determine testplan file), the result data generating after jmeter end of run is saved in specified file.Wherein, mentioned order
Can be write as bat file, so that test script calls.Such as, bat file can be such that
@echo off
Echo is currently in use jmeter and carries out pressure survey
jmeter-n-t d:\workspace\file\testplan.jmx>d:\workspace\file\
result.txt
The implication of the order of above-mentioned bat file be indicate jmeter instrument execution route " d: workspace file
Testplan.jmx file under testplan.jmx ", and write result data to path " d: workspace file
Result.txt (i.e. specified file) in result.txt ".
Optionally, the result data of write result.txt is as follows:
creating summariser<summary>
created the tree successfully using d:\workspace\file\testplan.jmx
starting the test@wed jun 01 17:09:44cst 2016(1464772184844)
waiting for possible shutdown message on port 4445
Summary=60000in 78s=769/s
Avg:123min:38max:492err:0 (0.00%)
tidying up...@wed jun 01 17:09:46cst 2016(1464772186285)
...end of run
The above results represent that 60000 access request treating address test complete in 78s, access 769 averagely per second
Secondary, average response time 123ms, Best-case Response Time 38ms, maximum response time 492ms, access errors number of times 0 time, mistake
Rate 0%.
After test script reads result data from result.txt file, by the average response time in result data
It is compared with average response time desired value, confirm that the average response time in result data is less than average response time target
Value, then export the test result being successfully tested, this test result is illustrated in the test result display area 53 in interface 50.
In sum, method for testing pressure provided in an embodiment of the present invention, by showing stress test interface, obtains in pressure
According to stress test standard, the stress test standard of setting in power test interface, when determining that treating address test carries out stress test
The test parameter using, treats address test according to test parameter and carries out stress test, and tester only needs to arrange certain
Testing standard, you can to automatically determine corresponding test parameter, and address test is treated according to test parameter tested, it is not required to
To be manually entered test parameter in stress test instrument, thus reaching the manual steps simplifying tester, to improve and surveying
The effect of examination efficiency.
Fig. 6 is a kind of block diagram of the pressure test device according to an exemplary embodiment.This stress test
Device can be embodied as part or all of in test terminal by way of hardware or soft or hard combine, and this test terminal is permissible
It is PC, notebook computer or computer workstation etc..This pressure test device may include that
Showing interface module 601, for showing stress test interface;
Standard acquisition module 602, for obtaining the stress test standard of setting in described stress test interface;
Parameter determination module 603, for determining that according to described stress test standard treating address test carries out stress test
When the test parameter that uses;
Test module 604, for carrying out stress test according to described test parameter to described network address to be tested.
Optionally, described standard acquisition module, comprising:
Option display unit, for showing at least two region options in described stress test interface, each is describedly
Domain option indicates that a network address to be tested provides the geographic area of service;
Acquiring unit, surveys for selected region option in described at least two region options is retrieved as described pressure
Test-object is accurate.
Optionally, described test parameter includes number of concurrent and cycle-index, and described number of concurrent is used for instruction request and accesses institute
State the quantity of the thread of network address to be tested, described cycle-index is used for indicating that each described thread request accesses described net to be tested
The number of times of location.
Optionally, described test module, is used for calling mounted stress test instrument according to described test parameter to institute
State the corresponding server request of network address to be tested and access described network address to be tested.
Optionally, described device also includes:
Indicating module, for indicating that described stress test instrument will carry out stress test acquisition to described network address to be tested
Result data preserves to specified file.
Optionally, described device also includes:
Data acquisition module, for obtaining the corresponding target data of described stress test standard;
Comparing module, carries out the number of results of stress test acquisition for by described target data and to described network address to be tested
According to comparing, obtain comparison result;
Output module, for outputing test result according to described comparison result.
Optionally, described network address to be tested includes at least two network address, and described device also includes:
Interval acquiring module, for obtaining the corresponding test interval duration of described stress test standard;
Described test module, comprising:
Timing unit, for when there is the network address of not yet test in described at least two network address, to described at least two
One of individual network address network address completes to start timing during test;
Test cell, for starting to the next one according to described test parameter when timing reaches described test interval duration
The network address of not yet test carries out stress test.
Fig. 7 is a kind of structural representation of the terminal according to an exemplary embodiment.Described terminal 700 includes central authorities
The system storage of processing unit (cpu) 701, inclusion random access memory (ram) 702 and read only memory (rom) 703
704, and the system bus 705 of connection system memorizer 704 and CPU 701.Described terminal 700 also includes helping
The basic input/output (i/o system) 706 of transmission information between each device in computer, and for storage operation
The mass-memory unit 707 of system 713, application program 712 and other program modules 715.
Described basic input/output 706 includes for the display 708 of display information with for user input letter
The input equipment 709 of such as mouse, keyboard etc of breath.Wherein said display 708 and input equipment 709 all pass through to be connected to
The IOC 710 of system bus 705 is connected to CPU 701.Described basic input/output 706
Can also include IOC 710 for receive and process from keyboard, mouse or electronic touch pen etc. multiple its
The input of his equipment.Similarly, IOC 710 also provides output to display screen, printer or other kinds of defeated
Go out equipment.
Described mass-memory unit 707 is by being connected to the bulk memory controller (not shown) of system bus 705
It is connected to CPU 701.Described mass-memory unit 707 and its associated computer-readable medium are terminal
700 offer non-volatile memories.That is, described mass-memory unit 707 can include such as hard disk or cd-rom
The computer-readable medium (not shown) of driver etc.
Without loss of generality, described computer-readable medium can include computer-readable storage medium and communication media.Computer
Storage medium is included for information such as storage computer-readable instruction, data structure, program module or other data
Volatibility and non-volatile, removable and irremovable medium that any method or technique is realized.Computer-readable storage medium includes
Ram, rom, eprom, eeprom, flash memory or its technology of other solid-state storage, cd-rom, dvd or other optical storage, tape
Box, tape, disk storage or other magnetic storage apparatus.Certainly, skilled person will appreciate that described computer-readable storage medium
It is not limited to above-mentioned several.Above-mentioned system storage 704 and mass-memory unit 707 may be collectively referred to as memorizer.
According to various embodiments of the present invention, described terminal 700 can also pass through the network connections such as the Internet to net
Remote computer on network runs.Namely terminal 700 can be by being connected to the NIU on described system bus 705
711 are connected to network 712, in other words, it is possible to use NIU 711 is being connected to other kinds of network or long-range
Computer system (not shown).
Described memorizer also includes one or more than one program, one or more than one program storage in
In memorizer, to realize Fig. 1, Fig. 2 or Fig. 4 arbitrary shown by executing this one or more program for central processing unit 701
Method for testing pressure.
In the exemplary embodiment, a kind of non-transitorycomputer readable storage medium including instruction, example are additionally provided
As included the memorizer instructing, above-mentioned instruction can be by the computing device of mobile terminal to complete shown in each embodiment of the present invention
Method for testing pressure.For example, described non-transitorycomputer readable storage medium can be rom, random access memory
(ram), cd-rom, tape, floppy disk and optical data storage devices etc..
Those skilled in the art, after considering description and putting into practice invention disclosed herein, will readily occur to its of the present invention
Its embodiment.The application is intended to any modification, purposes or the adaptations of the present invention, these modifications, purposes or
Person's adaptations are followed the general principle of the present invention and are included the undocumented common knowledge in the art of the present invention
Or conventional techniques.Description and embodiments are considered only as exemplary, and true scope and spirit of the invention are by following
Claim is pointed out.
It is described above and precision architecture illustrated in the accompanying drawings it should be appreciated that the invention is not limited in, and
And various modifications and changes can carried out without departing from the scope.The scope of the present invention only to be limited by appended claim.
Claims (14)
1. a kind of method for testing pressure is it is characterised in that methods described includes:
Show stress test interface;
Obtain the stress test standard of setting in described stress test interface;
Determined according to described stress test standard and treat the test parameter that address test carries out use during stress test;
Stress test is carried out to described network address to be tested according to described test parameter.
2. method according to claim 1 is it is characterised in that the pressure that arranges in described test setting interface of described acquisition
Power testing standard, comprising:
Show at least two region options in described stress test interface, each described region option indicates a net to be tested
Location provides the geographic area of service;
Selected region option in described at least two region options is retrieved as described stress test standard.
3. method according to claim 1 and 2 is it is characterised in that described test parameter includes number of concurrent and cycle-index,
Described number of concurrent is used for the quantity that instruction request accesses the thread of described network address to be tested, and described cycle-index is used for indicating each
Described thread request accesses the number of times of described network address to be tested.
4. according to the arbitrary described method of claims 1 to 3 it is characterised in that described treat to described according to described test parameter
Address test carries out stress test, comprising:
Call mounted stress test instrument according to described test parameter to the corresponding server request of described network address to be tested
Access described network address to be tested.
5. method according to claim 4 is it is characterised in that methods described also includes:
Indicate that described stress test instrument preserves the result data carrying out stress test acquisition to described network address to be tested to finger
Determine file.
6. according to the arbitrary described method of claim 1 to 5 it is characterised in that methods described also includes:
Obtain the corresponding target data of described stress test standard;
Described target data is compared with the result data carrying out stress test acquisition to described network address to be tested, obtains ratio
To result;
Outputed test result according to described comparison result.
7. according to the arbitrary described method of claim 1 to 6 it is characterised in that described network address to be tested includes at least two nets
Location, methods described also includes:
Obtain the corresponding test interval duration of described stress test standard;
Described stress test is carried out to described network address to be tested according to described test parameter, comprising:
When there is the network address of not yet test in described at least two network address, to one of described at least two network address network address
Complete to start timing during test;
Start the network address of next not yet test is entered according to described test parameter when timing reaches described test interval duration
Row stress test.
8. a kind of pressure test device is it is characterised in that described device includes:
Showing interface module, for showing stress test interface;
Standard acquisition module, for obtaining the stress test standard of setting in described stress test interface;
Parameter determination module, for determining that according to described stress test standard treating address test carries out use during stress test
Test parameter;
Test module, for carrying out stress test according to described test parameter to described network address to be tested.
9. device according to claim 8 is it is characterised in that described standard acquisition module, comprising:
Option display unit, for showing at least two region options in described stress test interface, each described region choosing
One network address to be tested of item instruction provides the geographic area of service;
Acquiring unit, for being retrieved as described stress test mark by selected region option in described at least two region options
Accurate.
10. device according to claim 8 or claim 9 is it is characterised in that described test parameter includes number of concurrent and circulation time
Number, described number of concurrent is used for the quantity that instruction request accesses the thread of described network address to be tested, and described cycle-index is used for indicating
Each described thread request accesses the number of times of described network address to be tested.
11., according to Claim 8 to 10 arbitrary described devices it is characterised in that described test module, are used for calling and install
Stress test instrument access to the corresponding server request of described network address to be tested according to described test parameter described to be tested
Network address.
12. devices according to claim 11 are it is characterised in that described device also includes:
Indicating module, for indicating that described stress test instrument will carry out the result of stress test acquisition to described network address to be tested
Data preserves to specified file.
13. according to Claim 8 to 12 arbitrary described devices it is characterised in that described device also includes:
Data acquisition module, for obtaining the corresponding target data of described stress test standard;
Comparing module, for entering described target data with the result data carrying out stress test acquisition to described network address to be tested
Row compares, and obtains comparison result;
Output module, for outputing test result according to described comparison result.
14. according to Claim 8 to 13 arbitrary described devices it is characterised in that described network address to be tested includes at least two
Network address, described device also includes:
Interval acquiring module, for obtaining the corresponding test interval duration of described stress test standard;
Described test module, comprising:
Timing unit, for when there is the network address of not yet test in described at least two network address, to described at least two nets
One of location network address completes to start timing during test;
Test cell, for starting to the next one not yet according to described test parameter when timing reaches described test interval duration
The network address of test carries out stress test.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201610702451.9A CN106375140A (en) | 2016-08-22 | 2016-08-22 | Pressure testing method and device |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201610702451.9A CN106375140A (en) | 2016-08-22 | 2016-08-22 | Pressure testing method and device |
Publications (1)
Publication Number | Publication Date |
---|---|
CN106375140A true CN106375140A (en) | 2017-02-01 |
Family
ID=57878377
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201610702451.9A Pending CN106375140A (en) | 2016-08-22 | 2016-08-22 | Pressure testing method and device |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN106375140A (en) |
Cited By (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN108512710A (en) * | 2017-02-24 | 2018-09-07 | 腾讯科技(深圳)有限公司 | Test method based on testing tool and testing tool |
CN109348499A (en) * | 2018-11-30 | 2019-02-15 | 北京奇安信科技有限公司 | Pressure testing system and method |
CN112367540A (en) * | 2020-11-13 | 2021-02-12 | 广州易方信息科技股份有限公司 | Method and device for monitoring live broadcast push stream number on line and computer equipment |
CN113449227A (en) * | 2020-03-24 | 2021-09-28 | 北京新氧科技有限公司 | Page information processing method and terminal equipment |
CN115033497A (en) * | 2022-08-11 | 2022-09-09 | 北京登临科技有限公司 | Kernel function testing method, device, equipment and storage medium |
Citations (11)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN101014083A (en) * | 2006-11-28 | 2007-08-08 | 俞鹏里 | Network TV terminal and information server system thereof |
CN101135989A (en) * | 2006-08-31 | 2008-03-05 | 中国银联股份有限公司 | Automatization test method and device for Web applied system |
CN102495789A (en) * | 2011-10-18 | 2012-06-13 | 瑞斯康达科技发展股份有限公司 | Automatic test method and device for the same |
CN102855182A (en) * | 2011-06-28 | 2013-01-02 | 乐活在线(北京)网络技术有限公司 | Web system test method and device |
CN102955721A (en) * | 2011-08-16 | 2013-03-06 | 阿里巴巴集团控股有限公司 | Device and method for pressure generation for testing |
CN103106138A (en) * | 2011-11-15 | 2013-05-15 | 阿里巴巴集团控股有限公司 | Method and device for synchronization of test case and test script |
CN103209180A (en) * | 2013-03-21 | 2013-07-17 | 大唐联仪科技有限公司 | Protocol conformance testing method and system |
CN104268082A (en) * | 2014-09-26 | 2015-01-07 | 北京国双科技有限公司 | Pressure test method and pressure test device for browser |
CN105207844A (en) * | 2015-09-07 | 2015-12-30 | 浪潮(北京)电子信息产业有限公司 | Method for testing server stability and system thereof |
CN105302706A (en) * | 2014-06-05 | 2016-02-03 | 腾讯科技(深圳)有限公司 | Application test method and apparatus |
CN105589802A (en) * | 2014-10-23 | 2016-05-18 | 阿里巴巴集团控股有限公司 | Software test method and apparatus |
-
2016
- 2016-08-22 CN CN201610702451.9A patent/CN106375140A/en active Pending
Patent Citations (11)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN101135989A (en) * | 2006-08-31 | 2008-03-05 | 中国银联股份有限公司 | Automatization test method and device for Web applied system |
CN101014083A (en) * | 2006-11-28 | 2007-08-08 | 俞鹏里 | Network TV terminal and information server system thereof |
CN102855182A (en) * | 2011-06-28 | 2013-01-02 | 乐活在线(北京)网络技术有限公司 | Web system test method and device |
CN102955721A (en) * | 2011-08-16 | 2013-03-06 | 阿里巴巴集团控股有限公司 | Device and method for pressure generation for testing |
CN102495789A (en) * | 2011-10-18 | 2012-06-13 | 瑞斯康达科技发展股份有限公司 | Automatic test method and device for the same |
CN103106138A (en) * | 2011-11-15 | 2013-05-15 | 阿里巴巴集团控股有限公司 | Method and device for synchronization of test case and test script |
CN103209180A (en) * | 2013-03-21 | 2013-07-17 | 大唐联仪科技有限公司 | Protocol conformance testing method and system |
CN105302706A (en) * | 2014-06-05 | 2016-02-03 | 腾讯科技(深圳)有限公司 | Application test method and apparatus |
CN104268082A (en) * | 2014-09-26 | 2015-01-07 | 北京国双科技有限公司 | Pressure test method and pressure test device for browser |
CN105589802A (en) * | 2014-10-23 | 2016-05-18 | 阿里巴巴集团控股有限公司 | Software test method and apparatus |
CN105207844A (en) * | 2015-09-07 | 2015-12-30 | 浪潮(北京)电子信息产业有限公司 | Method for testing server stability and system thereof |
Cited By (8)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN108512710A (en) * | 2017-02-24 | 2018-09-07 | 腾讯科技(深圳)有限公司 | Test method based on testing tool and testing tool |
CN108512710B (en) * | 2017-02-24 | 2022-05-24 | 腾讯科技(深圳)有限公司 | Test method based on test tool and test tool |
CN109348499A (en) * | 2018-11-30 | 2019-02-15 | 北京奇安信科技有限公司 | Pressure testing system and method |
CN109348499B (en) * | 2018-11-30 | 2022-02-25 | 奇安信科技集团股份有限公司 | Pressure testing system and method |
CN113449227A (en) * | 2020-03-24 | 2021-09-28 | 北京新氧科技有限公司 | Page information processing method and terminal equipment |
CN113449227B (en) * | 2020-03-24 | 2023-09-19 | 北京新氧科技有限公司 | Page information processing method and terminal equipment |
CN112367540A (en) * | 2020-11-13 | 2021-02-12 | 广州易方信息科技股份有限公司 | Method and device for monitoring live broadcast push stream number on line and computer equipment |
CN115033497A (en) * | 2022-08-11 | 2022-09-09 | 北京登临科技有限公司 | Kernel function testing method, device, equipment and storage medium |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN109302522B (en) | Test method, test device, computer system, and computer medium | |
CN106375140A (en) | Pressure testing method and device | |
CN103984626B (en) | A kind of method and device for generating test case script | |
CN108848000B (en) | Network request testing method and device, computer equipment and storage medium | |
WO2018184361A1 (en) | Application test method, server, terminal, and storage media | |
CN111414309B (en) | Automatic test method of application program, computer equipment and storage medium | |
US11954013B2 (en) | Method of testing applet performance, electronic device, and computer-readable medium | |
US6691259B1 (en) | Terminal server data file extraction and analysis application | |
WO2022100075A1 (en) | Method and apparatus for performance test, electronic device and computer-readable medium | |
CN110232018A (en) | Interface test method, device, computer equipment | |
CN109711124B (en) | Method, apparatus, computer device and storage medium for managing mobile device | |
CN111797008B (en) | Automatic verification method, equipment and storage medium for mobile terminal embedded point data | |
CN112561690B (en) | Method, system, equipment and storage medium for testing credit card staged service interface | |
CN114564387A (en) | Scene type automatic testing method and system for OpenStack cloud platform | |
CN108875368A (en) | A kind of safety detection method, apparatus and system | |
CN112612706A (en) | Automated testing method, computer device and storage medium | |
CN113127362B (en) | Object testing method, object testing device, electronic equipment and readable storage medium | |
CN116126684A (en) | On-line testing method and device for approval process and readable storage medium | |
WO2021121130A1 (en) | Method and apparatus for information collection, computer device, and storage medium | |
CN113868031A (en) | Method, device and system for testing performance consistency of hard disk | |
CN113115032A (en) | Batch testing method and device for smart television equipment and electronic equipment | |
CN113434382A (en) | Database performance monitoring method and device, electronic equipment and computer readable medium | |
CN118535469B (en) | Front-end and back-end debugging system based on browser plug-in and application method thereof | |
US20230418728A1 (en) | Method and system for generating real-time test environment activity view for functional simulations | |
CN116795416A (en) | Diagnostic test method and device based on configuration table, electronic equipment and medium |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
C06 | Publication | ||
PB01 | Publication | ||
SE01 | Entry into force of request for substantive examination | ||
SE01 | Entry into force of request for substantive examination |