CN103139006A - Web service based automated testing device and method - Google Patents

Web service based automated testing device and method Download PDF

Info

Publication number
CN103139006A
CN103139006A CN 201110398680 CN201110398680A CN103139006A CN 103139006 A CN103139006 A CN 103139006A CN 201110398680 CN201110398680 CN 201110398680 CN 201110398680 A CN201110398680 A CN 201110398680A CN 103139006 A CN103139006 A CN 103139006A
Authority
CN
China
Prior art keywords
test
module
test script
script
virtual user
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
Application number
CN 201110398680
Other languages
Chinese (zh)
Inventor
蒋志勇
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
SHANGHAI BETOP INFORMATION TECHNOLOGY Co Ltd
Original Assignee
SHANGHAI BETOP INFORMATION TECHNOLOGY Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by SHANGHAI BETOP INFORMATION TECHNOLOGY Co Ltd filed Critical SHANGHAI BETOP INFORMATION TECHNOLOGY Co Ltd
Priority to CN 201110398680 priority Critical patent/CN103139006A/en
Publication of CN103139006A publication Critical patent/CN103139006A/en
Pending legal-status Critical Current

Links

Images

Abstract

This invention provides a web service based automated testing device and a method. The device includes a virtual instruction establishment module, a running control module and an analysis module, the virtual instruction establishment module is used for establishing a virtual user and a system load; and the running control module is used for organizing the system load established by the virtual instruction establishment module, setting the number of virtual users, and generating and running a testing script is generated and runs; and the analysis module stores all data running the testing script and analyzes obtained data. The web service based automated testing device and the method are capable of shortening a testing period of software development, fast in schedule, high in testing efficiency, and fully used in hardware sources.

Description

Automatic test device and method based on web services
Technical field
The present invention relates to the network test field, relate in particular to a kind of automatic test device based on web services and method thereof.
Background technology
Software test is exactly before software puts into operation, to the final reexamination of software requirement analysis, design specification book and coding, is the committed step of Software Quality Assurance.Its definition can simply be summarised as: the process of working procedure in order to find mistake.Along with the continuous expansion of software size, the software quality problem has become one of principal element of restriction development of computer.As the means that guarantee software quality and reliability, software test plays irreplaceable effect.
Along with the progress of informationalized development and technology, the framework of Information software also by the C/S structural development to present B/S framework, nowadays the main flow of Information software is accessed by Internet just, the Web-based application program.
Software is in the past compared, and the characteristics of software different from the past are arranged based on the Information software of Web:
1) the concentrated centralized database that comprises, information system management is concentrated, and service management is intensive.
2) the large distribution extensively distributes according to the region, and these characteristics with " concentrating " are unity of opposites.
3) comprise that in a large number data volume is large, traffic carrying capacity is large.
Just because of above characteristics, Information software based on Web is compared traditional software, has brought very large superiority, but has also brought a lot of challenges simultaneously, this is because based on the large distribution of the information system of Web, has determined that Web server will accept a large amount of request of data simultaneously.In case the Web server paralysis is about to cause huge loss like this.This has just proposed requirement to the performance of Web system, requires product must accept strict performance test before reaching the standard grade.
Summary of the invention
Based on above-mentioned technical problem, the present invention is mainly for the performance test based on Web, and automatic test script is designed, records and perfect, proposed novel automatic test device and the method thereof based on web services of cover.
On the one hand, the present invention proposes a kind of automatic test device based on web services, comprise, client, carry management server and the applied in network performance test software of various web services, the virtual testing environment of building on its basis, described virtual testing environment comprises:
The fictitious order creation module is used for sending establishment Virtual User and system load instruction to client;
The controlling run module for the system load of organizing described fictitious order creation module to create, is set Virtual User quantity, and generates and the operation test script;
Analysis module, all data of preserving the described test script of operation, and to resulting data analysis.
Described Virtual User Reality simulation user's client business operation behavior.
Described controlling run module generates described test script according to the operation flow of described system load and the Virtual User quantity that sets.
Described controlling run module is inserted affairs in described test script when generating test script, in order to view the response time of these affairs when described analysis module is analyzed.
Described controlling run module is inserted a meeting point in this test script when generating test script.
When this test script of operation, the place makes a plurality of Virtual User carry out same operation in described meeting point, to improve concurrent degree.
On the other hand, the present invention also proposes a kind of automatic test device based on web services, comprising:
A. send to client and create Virtual User and system load instruction;
B. Virtual User quantity is set in the system load of organizing described fictitious order creation module to create, and generates and the operation test script;
C. preserve all data of the described test script of operation, and to resulting data analysis.
The present invention proposes a kind of automatic test device based on web services and method thereof, client, carry management server and the applied in network performance test software of various web services, the virtual testing environment of building on its basis, described virtual testing environment comprises the fictitious order creation module, is used for sending to client creating Virtual User and system load instruction; The controlling run module for the system load of organizing described fictitious order creation module to create, is set Virtual User quantity, and generates and the operation test script; Analysis module, all data of preserving the described test script of operation, and to resulting data analysis.The present invention can shorten that test period, the progress of software development are fast, testing efficiency is high and take full advantage of hardware resource.
Description of drawings
Fig. 1 schematically shows the system construction drawing according to the automatic test device based on web services of the present invention.
Fig. 2 schematically shows the flow chart according to automation web performance methodology of the present invention.
Embodiment
Describe technical scheme of the present invention in detail below in conjunction with accompanying drawing.
There is following limitation at least in the software test of prior art:
A, can't cover all code path, the functional test use-case all is absolutely necessary in taking turns test every, has certain mechanicalness, repeatability.
B, some and sequential, deadlock, resource contention, mistake that multithreading is relevant, manual test is difficult to catch.
C, when carrying out system load, performance test, the various occasions such as some simulation mass data or a large amount of concurrent users are difficult to test by hand.
D, carry out system reliability test, can stable operation when needing the analogue system operation how long, these are all that manual test is difficult to carry out.
E, manual test speed are relatively slow, if carried out a hundreds of test case in one day, test by hand being difficult to complete in one day.
Relatively, automatic test device of the present invention possesses following advantage at least:
The test period of A, shortening software development, progress is fast.
B, testing efficiency high (taking full advantage of hardware resource).
C, saving human resources reduce testing cost.
Stability, the reliability of D, enhancing test improve the accuracy and precision of test, increase the software degree of belief.
E, use test instrument are relatively easy, can improve test result.
F, can carry out load, performance test, these are manual all can't complete.
Certainly, the thing that will guarantee in real work with automatic test test never by hand, and the content that will accomplish simultaneously suitable manual test never will spend high cost and do automatic test.In addition, not because certain aspect can not automatic test and do not do test.Automatic testing equipment of the present invention is particularly suitable for unit testing, integration testing, system load test, performance test, stability test, reliability testing etc.
Fig. 1 schematically shows the system construction drawing according to the automatic test device based on web services of the present invention.As shown in the figure, the automatic test device 100 based on web services of the present invention comprises, client, and management server and the applied in network performance test software of the various web services of lift-launch is characterized in that the virtual testing environment of building on its basis.Described virtual testing environment comprises for the fictitious order creation module 101 that creates Virtual User and system load; Be used for the system load of organizing fictitious order creation module 101 to create, the controlling run module 102 of setting Virtual User quantity and generation and operation test script; And preserve all data of operation test script and to the analysis module 103 of resulting data analysis.
By fictitious order creation module 101, the user can easy establishment play Virtual User and system load.This fictitious order creation module 101 can the generating virtual users, with the mode Reality simulation user's of Virtual User business operation behavior.Follow-up assembly is translated into test script.
Controlling run module 102 generates described test script according to the operation flow of system load and the Virtual User quantity that sets.For example, by controlling run module 102, the tester can organize multi-user's testing scheme (load scheme, business process composition and Virtual User quantity) rapidly, makes test process automation.Simultaneously, controlling run module 102 also can be used for limiting the load scheme.In addition, controlling run module 102 can also be inserted affairs in test script when generating test script, in order to view the response time of these affairs when analysis module 103 is analyzed.Perhaps, controlling run module 102 also can be inserted a meeting point in this test script when generating test script.When this test script of operation, make a plurality of Virtual User carry out same operation at the place, meeting point, to improve concurrent degree.In addition, controlling run module 102 can also be set iterations for test script.
Controlling run module 102 uses the script that fictitious order creation modules 101 generate to carry out the simulated scenario test to target software, and after the scene operation, all data will be kept and to the data analysis of gained by analysis module 103.
Fig. 2 schematically shows the flow chart according to automation web performance test methods of the present invention.As shown in Figure 2, automation web performance test methods of the present invention comprises to client transmission establishment Virtual User and system load instruction 201; Virtual User quantity is set in the system load 202 of organizing described fictitious order creation module to create, and generates and the operation test script; Preserve all data of the described test script of operation, and to resulting data analysis 203.
When creating test script, the user can select suitable agreement, and web server is generally selected the http agreement.The general script of selecting based on HTML of the mode of recording, but the following situations selection is arranged based on the script of URL.Be not based on the application program of browser, comprise the javaScript script in application program and produced request, used the https agreement based on the application program of browser.Do not want back page in recording process.If want to measure the response time of certain operation, can insert affairs in script, use affairs that this operation is wired up.Can view the response time of these affairs when analyzing execution result.In addition, can also insert the meeting point in this step 201, so that a plurality of user concurrent carries out same operation, improve the concurrent degree of operation, so that server is increased load, test concurrent ability.In addition, the user can also arrange the network bandwidth with the network of simulation different bandwidth, and iterations is set.In addition, this step also comprises carries out parametrization to script, parameters alter mode, and associated script.
When disposing test scene and moving test script, dispose test scene and mainly comprise: select script, set and carry out number of users, select the test load machine, the mode that script is carried out is set, the meeting point point is set, arrange and set running time.If the number of users of simulation is many, many test load machines should be set, the PC of general main flow can be simulated 100 users at least to the access of server.In addition, the executive mode that script is set comprises the Starting mode that the user is set and user's termination mode is set.In addition, this step can also arrange the meeting point, and the user can be set by the mode in meeting point.When the browsing web page is larger, in test, overtime (timeout) mistake may appear.For this problem, can suitably revise overtime numerical value.
In addition, IP spoofing can also be set.If server needs to enable IP spoofing to user's IP restricted (security reason).IP spoofing being set being noted that 1) the test load machine should use static IP; 2) opened the IP spoofing switch before selecting the test load machine.
In addition, the server monitoring counter can also be set.Comprise: internal memory, CPU, thread, process, network, disk.
At analytical test as a result the time, can check analysis result, check the response time of affairs, the average throughput of server, carry out user number etc.In addition, can also check thread figure, user's variation diagram, response time figure, the spirogram of handling up; Check the counter figure of server monitoring; Analyze each performance index and whether meet demand, such as: whether the free memory curve is normal, whether has memory overflow; Whether the cpu busy percentage curve is mild, and whether average utilization is lower than 90%; Whether Thread Count is normal, rather than increasing always; Whether the network bandwidth satisfies traffic demand; Whether disk satisfies user's operation requirements etc.; Analyze each curve chart and whether have abnormal conditions, such as: whether the response time satisfies the demands; It is concurrent whether system supports to require; Along with the increase of load, whether throughput increases equally, and whether throughput exists bottleneck etc.
Sometimes analyze the problem that single key element can not reflect existence, need a plurality of key elements to connect and analyze.Such as, can connect the variation diagram of number of users with the spirogram of handling up and analyze.Device support of the present invention merges two tables to be analyzed, and number of users variation diagram and throughput variation diagram are merged, and just can observe throughput corresponding time along with the variation of number of users whether.If along with the increase of number of users, throughput maintains an equal level or descends, and illustrates that this moment, throughput of system reached maximum, and system has reached bottleneck.

Claims (7)

1. the automatic test device based on web services, comprise, client, and management server and the applied in network performance test software of the various web services of lift-launch is characterized in that, the virtual testing environment of building on its basis, described virtual testing environment comprises:
The fictitious order creation module is used for sending establishment Virtual User and system load instruction to client;
The controlling run module for the system load of organizing described fictitious order creation module to create, is set Virtual User quantity, and generates and the operation test script;
Analysis module, all data of preserving the described test script of operation, and to resulting data analysis.
2. automatic test device as claimed in claim 1, is characterized in that, described Virtual User Reality simulation user's client business operation behavior.
3. automatic test device as claimed in claim 1, is characterized in that, described controlling run module generates described test script according to the operation flow of described system load and the Virtual User quantity that sets.
4. automatic test device as claimed in claim 1, is characterized in that, described controlling run module is inserted affairs in described test script when generating test script, in order to view the response time of these affairs when described analysis module is analyzed.
5. automatic test device as claimed in claim 1, is characterized in that, described controlling run module is inserted a meeting point in this test script when generating test script.
6. automatic test device as claimed in claim 5, is characterized in that, when this test script of operation, the place makes a plurality of Virtual User carry out same operation in described meeting point, to improve concurrent degree.
7. the automatic test device based on web services, is characterized in that, comprising:
A. send to client and create Virtual User and system load instruction;
B. Virtual User quantity is set in the system load of organizing described fictitious order creation module to create, and generates and the operation test script;
C. preserve all data of the described test script of operation, and to resulting data analysis.
CN 201110398680 2011-12-05 2011-12-05 Web service based automated testing device and method Pending CN103139006A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN 201110398680 CN103139006A (en) 2011-12-05 2011-12-05 Web service based automated testing device and method

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN 201110398680 CN103139006A (en) 2011-12-05 2011-12-05 Web service based automated testing device and method

Publications (1)

Publication Number Publication Date
CN103139006A true CN103139006A (en) 2013-06-05

Family

ID=48498345

Family Applications (1)

Application Number Title Priority Date Filing Date
CN 201110398680 Pending CN103139006A (en) 2011-12-05 2011-12-05 Web service based automated testing device and method

Country Status (1)

Country Link
CN (1) CN103139006A (en)

Cited By (10)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103581343A (en) * 2013-11-28 2014-02-12 蓝盾信息安全技术股份有限公司 Http (hyper text transport protocol) request recording method
CN103795711A (en) * 2014-01-10 2014-05-14 宁波金信通讯技术有限公司 Automated test method and system based on mobile phone client sides
CN104008055A (en) * 2014-05-30 2014-08-27 广州华多网络科技有限公司 Software testing method, device and system
CN104331477A (en) * 2014-11-04 2015-02-04 哈尔滨工业大学 Method for testing concurrency property of cloud platform based on federated research
CN104734918A (en) * 2015-03-25 2015-06-24 浪潮集团有限公司 Lightweight webpage performance testing architecture and method
CN105468490A (en) * 2015-12-11 2016-04-06 珠海金山网络游戏科技有限公司 Server performance automatic test method and system and device
CN106998277A (en) * 2017-05-25 2017-08-01 浙江数链科技有限公司 Web service method of testing and device
CN103455422B (en) * 2013-08-30 2017-08-04 上海斐讯数据通信技术有限公司 Software function automated testing method
CN108984419A (en) * 2018-08-23 2018-12-11 郑州云海信息技术有限公司 A kind of storage method for testing software, device and equipment
CN109144846A (en) * 2017-06-28 2019-01-04 北京京东尚科信息技术有限公司 Test method and device for testing service device

Cited By (13)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103455422B (en) * 2013-08-30 2017-08-04 上海斐讯数据通信技术有限公司 Software function automated testing method
CN103581343A (en) * 2013-11-28 2014-02-12 蓝盾信息安全技术股份有限公司 Http (hyper text transport protocol) request recording method
CN103795711A (en) * 2014-01-10 2014-05-14 宁波金信通讯技术有限公司 Automated test method and system based on mobile phone client sides
CN104008055B (en) * 2014-05-30 2017-06-06 广州华多网络科技有限公司 The method of software test, equipment and system
CN104008055A (en) * 2014-05-30 2014-08-27 广州华多网络科技有限公司 Software testing method, device and system
CN104331477A (en) * 2014-11-04 2015-02-04 哈尔滨工业大学 Method for testing concurrency property of cloud platform based on federated research
CN104331477B (en) * 2014-11-04 2017-08-25 哈尔滨工业大学 The cloud platform concurrency performance method of testing retrieved based on federal style
CN104734918A (en) * 2015-03-25 2015-06-24 浪潮集团有限公司 Lightweight webpage performance testing architecture and method
CN105468490A (en) * 2015-12-11 2016-04-06 珠海金山网络游戏科技有限公司 Server performance automatic test method and system and device
CN106998277A (en) * 2017-05-25 2017-08-01 浙江数链科技有限公司 Web service method of testing and device
CN106998277B (en) * 2017-05-25 2019-08-06 浙江数链科技有限公司 Web service test method and device
CN109144846A (en) * 2017-06-28 2019-01-04 北京京东尚科信息技术有限公司 Test method and device for testing service device
CN108984419A (en) * 2018-08-23 2018-12-11 郑州云海信息技术有限公司 A kind of storage method for testing software, device and equipment

Similar Documents

Publication Publication Date Title
CN103139006A (en) Web service based automated testing device and method
CN102541723A (en) Automated testing device for software testing
CN110309071B (en) Test code generation method and module, and test method and system
CN106021079B (en) It is a kind of based on the Web application performance test methods for being frequently visited by the user series model
CN102567186A (en) Automated software testing method
Zhang et al. Compatibility testing service for mobile applications
EP2572294B1 (en) System and method for sql performance assurance services
CN108304498A (en) Webpage data acquiring method, device, computer equipment and storage medium
US8677324B2 (en) Evaluating performance of an application using event-driven transactions
US20060041539A1 (en) Method and apparatus for organizing, visualizing and using measured or modeled system statistics
CN108628748B (en) Automatic test management method and automatic test management system
CN106325988B (en) Method for scheduling task and device
CN104639653A (en) Self-adaptive method and system based on cloud architecture
CN110750458A (en) Big data platform testing method and device, readable storage medium and electronic equipment
CN110798445B (en) Public gateway interface testing method and device, computer equipment and storage medium
CN109408763B (en) Method and system for managing resume of different templates
CN104765689A (en) Method and device for conducting real-time supervision to interface performance data
Dhiman et al. Performance testing: a comparative study and analysis of web service testing tools
Liu Research of performance test technology for big data applications
CN112035363A (en) Automatic interface testing method and device
Wang et al. A model-based framework for cloud API testing
CN104391789A (en) Web application stress testing method
US20130173663A1 (en) Method, distributed architecture and web application for overall equipment effectiveness analysis
CN104765787B (en) Salt file association relationship analysis method and system in software systems
CN103186384A (en) Business-component-oriented software designing and analyzing system and using method thereof

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
C02 Deemed withdrawal of patent application after publication (patent law 2001)
WD01 Invention patent application deemed withdrawn after publication

Application publication date: 20130605