CN104123397A - Automatic test device and method for Web page - Google Patents

Automatic test device and method for Web page Download PDF

Info

Publication number
CN104123397A
CN104123397A CN201410403727.4A CN201410403727A CN104123397A CN 104123397 A CN104123397 A CN 104123397A CN 201410403727 A CN201410403727 A CN 201410403727A CN 104123397 A CN104123397 A CN 104123397A
Authority
CN
China
Prior art keywords
test
browser
machine
automatic
module
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
CN201410403727.4A
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 Ctrip Business Co Ltd
Original Assignee
Ctrip Computer Technology Shanghai 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 Ctrip Computer Technology Shanghai Co Ltd filed Critical Ctrip Computer Technology Shanghai Co Ltd
Priority to CN201410403727.4A priority Critical patent/CN104123397A/en
Publication of CN104123397A publication Critical patent/CN104123397A/en
Pending legal-status Critical Current

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/36Preventing errors by testing or debugging software
    • G06F11/3664Environments for testing or debugging software

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Computer Hardware Design (AREA)
  • Quality & Reliability (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Debugging And Monitoring (AREA)

Abstract

The invention discloses an automatic test device and method for a web page. The automatic test device comprises a concurrence module, a test module, a processing module and a plurality of test machines. The concurrence module is used for sending test instructions to the test machines at the same time, the test machines are used for simulating corresponding browser environments, the test module is used for instantiating browsers and running a test case on one designated browser according to the test instructions, and the processing module is used for collecting and analyzing test result data of the test machines. According to the automatic test device and method for the web page, a duplication calling mode is utilized, the same work can be distributed to the different machines through the concurrence module, the problems of queuing up and the like are avoided, a cluster formed by the multiple machines can be effectively utilized, testing is executed just like on one machine for a user, convenience and high efficiency are achieved, and then multiple test tasks with different combinations can be efficiently completed.

Description

The automatic test device of the Web page and method
Technical field
The present invention relates to automatic test device and the method for a kind of Web (network) page.
Background technology
(UI automatic test mainly refers to the main logic function of the test Web page to the UI having now (user interface) automatic test, as whether: the search on the page, the submission of user profile, user's login, information can be clicked etc.) in flow process mainly in single browser, that commonly uses has IE, red fox and a Chrome (existing several conventional browsers), after all test cases (Case) are all verified on a kind of browser, by again revising, file is set reaches and run on another kind of different browser.
So there is now UI automatic test, this is difficult on different browsers, move simultaneously, and main cause has 2 points: 1, in hardware setting, do not support, only on a machine, be difficult to support multiple different browsers to move simultaneously; 2, not supporting on software, early stage CI (continuing integrated) platform is not supported concurrent structure.
Because existing UI automatic test project cannot be moved simultaneously on multiple different browser, cause compatibility test inefficiency, even some automatic test personnel only carries out the exploitation of UI automatic test for a kind of fixedly browser.
And disappearance is for the UI automatic test cases of many browsers, to directly cause hand merit tester's workload to increase, existing method of testing is exactly that tester carries out manual inspection on different browsers and platform according to test case, therefore compatibility test coverage rate cannot guarantee, affected product quality, or even normal user experiences.
Summary of the invention
The technical problem to be solved in the present invention is cannot automatically carry out, need tester manually to select one by one browser testing, automaticity is low, testing process is complicated, testing efficiency is low defect in order to overcome the UI test of prior art different browsers, and a kind of automatic test device and method of the Web page is provided.
The present invention solves above-mentioned technical matters by following technical proposals:
An automatic test device for the Web page, its feature is, comprising:
Concurrent module, for send test instruction to a plurality of test machines simultaneously;
A plurality of test machines, for simulating a plurality of browser environments, each test machine is corresponding to a browser;
Test module moves test case for instantiation browser and according to test instruction on the browser of appointment;
Processing module, for collecting the also test result data of analytical test machine.
Preferably, this automatic test device also comprises a configuration module, for the browser environment of configuration testing machine.
Preferably, this test result data comprises: service data, assert data, test case data.
Preferably, this automatic test device runs in CI.
Preferably, this concurrent module adopts NodeLabel Parameter plug-in unit.
Preferably, this concurrent module comprises a machine list cell, for the machine name of read test machine and choose corresponding browser according to machine name.
Preferably, this concurrent module also comprises that a trigger element and RunAT move use-case instrument automatically, this trigger element for debugging corresponding browser and test according to machine name after a main test code example is read, and this RunAT moves use-case instrument automatically for automatic instantiation test case record data.
That is to say, first, this concurrent module has increased machine list read functions, and the machine name for appointment reads and removes corresponding browser according to this title.For example: the name of a test machine is called SlaveWin7-IE9, and this machine name can be read and move corresponding IE9 browser and on this machine, do corresponding test.
Secondly, increased Trigger Function, main test code example be read after by according to machine, list is distributed on different machines and according to machine name and has debugged corresponding browser, then carry out automatic test.Wherein also corresponding cooperation developed RunAT-and automatically moved use-case instrument, example test case operation and record data that it can robotization.Auto Test Configuration-receives NodeLabel instruction and dispatches the instruments such as RunAT.
The present invention also provides a kind of automated testing method of the Web page, and its feature is, has adopted automatic test device as above, and this automated testing method comprises the following steps:
Step S 1, adopt a plurality of test machines to simulate a plurality of browser environments, each test machine is corresponding to a browser;
Step S 2, simultaneously to a plurality of test machines, send test instructions;
Step S 3, instantiation browser and move test case according to test instruction on the browser of appointment;
Step S 4, collect and the test result data of analytical test machine.
Preferably, step S 1comprise before:
Step S 0, configure the browser environment of each test machine.
Preferably, this test result data comprises: service data, assert data, test case data.
Meeting on the basis of this area general knowledge, above-mentioned each optimum condition, can combination in any, obtains the preferred embodiments of the invention.
Positive progressive effect of the present invention is: the automatic test device of the Web page of the present invention and method utilization copy the mode of calling, by concurrent module, can distribute identical work to different machines, thereby the problem such as avoided waiting in line, the cluster that can effectively utilize many machines to form, test for the user just as carrying out on a machine, very convenient efficient, thus allow the test assignment of multiple various combination be completed efficiently.
Accompanying drawing explanation
Fig. 1 is the schematic diagram of automatic test device of the Web page of a preferred embodiment of the present invention.
Fig. 2 is the process flow diagram of automated testing method of the Web page of a preferred embodiment of the present invention.
Embodiment
Mode below by embodiment further illustrates the present invention, but does not therefore limit the present invention among described scope of embodiments.
As shown in Figure 1, the automatic test device of the Web page of the present embodiment comprises:
Concurrent module 2, for send test instruction to a plurality of test machines simultaneously;
A plurality of test machines 5, for simulating a plurality of browser environments, each test machine is corresponding to a browser;
Test module 3 moves test case for instantiation browser and according to test instruction on the browser of appointment;
Processing module 4, for collecting the also test result data of analytical test machine;
Configuration module 1, for the browser environment of configuration testing machine.
Wherein, this automatic test device runs in CI.This test result data comprises: service data, assert data, test case data.Concurrent module adopts NodeLabel Parameter plug-in unit.
And this concurrent module comprises that a machine list cell, a trigger element and RunAT move use-case instrument automatically.That is to say, this concurrent module has increased machine list read functions, and the machine name for appointment reads and removes corresponding browser according to this title.Secondly, also increased Trigger Function, main test code example be read after by according to machine, list is distributed on different machines and according to machine name and has debugged corresponding browser, then carry out automatic test.Wherein also corresponding cooperation developed RunAT-and automatically moved use-case instrument, example test case operation and record data that it can robotization.Auto Test Configuration-receives NodeLabel instruction and dispatches the instruments such as RunAT.
As shown in Figure 2, the automated testing method of the Web page of the present embodiment, comprises the following steps:
Step S 0, configure the browser environment of each test machine;
Step S 1, adopt a plurality of test machines to simulate a plurality of browser environments, each test machine is corresponding to a browser;
Step S 2, simultaneously to a plurality of test machines, send test instructions;
Step S 3, instantiation browser and move test case according to test instruction on the browser of appointment;
Step S 4, collect and the test result data of analytical test machine.
Wherein, this test result data comprises: service data, assert data, test case data.
Below in conjunction with an application example, the automatic test device of the present embodiment and method are illustrated further.
Application example
Adopt the Slave test machine (common PC) in cluster to simulate many browser environments, utilize CI (Jenkins) as the management system of Job, NodeLabel Parameter plug-in unit is installed on Jenkins, collect and specify many browser environments information (Slave tests machine) and do the parallel distribution of Job, CtripTestAutomation plug-in unit is installed simultaneously, is dispatched RunAT for instantiation UI test case and collect Case test data.
After Data Collection, UI test data (service data, assert data, Case data) is saved in to database.Data are stored and analyzed to robotization framework, and provide corresponding analysis to be shown on robotization Portal.
Many test machines during use is lasting integrated are as many browser environments, and the concurrent function during utilization is lasting integrated sends test procedure and instruction to the different machines in cluster simultaneously.By user, specify or selection when triggering, when determine and on any platform machine, move which kind of browser and do compatibility test, after operation completes, test data is saved in database, robotization framework can be to storage afterwards data analysis and displaying.
CI is a Win7 server, and Jenkins is installed on server, Java Runtime and Tomcat.
CI is used 8080 (http) port.
NodeLabel Parameter is installed, CtripTestAutomation plug-in unit on Jenkins.
Browser and the Slave Jenkins client of IE8, IE9, Firefox, Chrome are housed respectively on Slave test machine.
Each Job is distributed on the Slave test machine of appointment, first can synchronised automatic framework, automated procedures (RunAT) and user's UI automatic test project, secondly can start RunAT configuration testing environment, the browser that instantiation is corresponding, the robotization UI test case of last run user is on corresponding browser.This scheme can expand to arbitrarily on windows platform and more kinds of browser.
Although more than described the specific embodiment of the present invention, it will be understood by those of skill in the art that these only illustrate, protection scope of the present invention is limited by appended claims.Those skilled in the art is not deviating under the prerequisite of principle of the present invention and essence, can make various changes or modifications to these embodiments, but these changes and modification all fall into protection scope of the present invention.

Claims (10)

1. an automatic test device for the Web page, its feature is, it comprises:
Concurrent module, for send test instruction to a plurality of test machines simultaneously;
A plurality of test machines, for simulating a plurality of browser environments, each test machine is corresponding to a browser;
Test module moves test case for instantiation browser and according to test instruction on the browser of appointment;
Processing module, for collecting and analyze the test result data of each test machine.
2. automatic test device as claimed in claim 1, is characterized in that, this automatic test device also comprises a configuration module, for the browser environment of configuration testing machine.
3. automatic test device as claimed in claim 1, is characterized in that, this test result data comprises: service data, assert data, test case data.
4. automatic test device as claimed in claim 1, is characterized in that, this automatic test device runs in CI.
5. the automatic test device as described in any one in claim 1-4, is characterized in that, this concurrent module adopts NodeLabel Parameter plug-in unit.
6. automatic test device as claimed in claim 5, is characterized in that, this concurrent module comprises a machine list cell, for the machine name of read test machine and choose corresponding browser according to machine name.
7. automatic test device as claimed in claim 6, it is characterized in that, this concurrent module also comprises that a trigger element and RunAT move use-case instrument automatically, this trigger element for debugging corresponding browser and test according to machine name after a main test code example is read, and this RunAT moves use-case instrument automatically for automatic instantiation test case record data.
8. an automated testing method for the Web page, its feature is, adopted the automatic test device as described in any one in claim 1-7, and this automated testing method comprises the following steps:
Step S 1, adopt a plurality of test machines to simulate a plurality of browser environments, each test machine is corresponding to a browser;
Step S 2, simultaneously to a plurality of test machines, send test instructions;
Step S 3, instantiation browser, and on the browser of appointment, move test case according to test instruction;
Step S 4, collect and the test result data of analytical test machine.
9. automated testing method as claimed in claim 8, is characterized in that, at step S 1also comprise before:
Step S 0, configure the browser environment of each test machine.
10. automated testing method as claimed in claim 8, is characterized in that, this test result data comprises: service data, assert data, test case data.
CN201410403727.4A 2014-08-15 2014-08-15 Automatic test device and method for Web page Pending CN104123397A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201410403727.4A CN104123397A (en) 2014-08-15 2014-08-15 Automatic test device and method for Web page

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201410403727.4A CN104123397A (en) 2014-08-15 2014-08-15 Automatic test device and method for Web page

Publications (1)

Publication Number Publication Date
CN104123397A true CN104123397A (en) 2014-10-29

Family

ID=51768808

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201410403727.4A Pending CN104123397A (en) 2014-08-15 2014-08-15 Automatic test device and method for Web page

Country Status (1)

Country Link
CN (1) CN104123397A (en)

Cited By (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106371990A (en) * 2016-08-30 2017-02-01 福建天晴数码有限公司 Testing method and testing system of concurrent processing capability of interactive software
CN108011775A (en) * 2016-10-28 2018-05-08 百度在线网络技术(北京)有限公司 Method and apparatus for carrying out network test
CN109240933A (en) * 2018-09-28 2019-01-18 四川长虹电器股份有限公司 A kind of tables of data operating result asserts method
CN109828899A (en) * 2018-12-13 2019-05-31 深圳壹账通智能科技有限公司 Acquisition method, device and the computer equipment of test data
CN110110234A (en) * 2019-05-13 2019-08-09 重庆天蓬网络有限公司 A kind of real-time search system of big data and method
CN110347577A (en) * 2018-04-04 2019-10-18 阿里巴巴集团控股有限公司 A kind of page test method, device and its equipment
CN114676034A (en) * 2020-12-24 2022-06-28 腾讯科技(深圳)有限公司 Test method, test device and computer equipment

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20080127092A1 (en) * 2006-08-14 2008-05-29 Honeywell International Inc. Web browser automation tool
CN101593146A (en) * 2008-05-30 2009-12-02 国际商业机器公司 Page automated testing method and device
CN103136094A (en) * 2011-11-25 2013-06-05 阿里巴巴集团控股有限公司 Page testing method and device
CN103530233A (en) * 2013-10-31 2014-01-22 广州菁英信息技术有限公司 Automation testing method, testing server and system of mobile browser
CN103810084A (en) * 2012-11-07 2014-05-21 腾讯科技(深圳)有限公司 Method, device and system for testing JS codes

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20080127092A1 (en) * 2006-08-14 2008-05-29 Honeywell International Inc. Web browser automation tool
CN101593146A (en) * 2008-05-30 2009-12-02 国际商业机器公司 Page automated testing method and device
CN103136094A (en) * 2011-11-25 2013-06-05 阿里巴巴集团控股有限公司 Page testing method and device
CN103810084A (en) * 2012-11-07 2014-05-21 腾讯科技(深圳)有限公司 Method, device and system for testing JS codes
CN103530233A (en) * 2013-10-31 2014-01-22 广州菁英信息技术有限公司 Automation testing method, testing server and system of mobile browser

Cited By (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106371990A (en) * 2016-08-30 2017-02-01 福建天晴数码有限公司 Testing method and testing system of concurrent processing capability of interactive software
CN106371990B (en) * 2016-08-30 2018-11-23 福建天晴数码有限公司 A kind of test method and system of interactive software oncurrent processing ability
CN108011775A (en) * 2016-10-28 2018-05-08 百度在线网络技术(北京)有限公司 Method and apparatus for carrying out network test
CN110347577A (en) * 2018-04-04 2019-10-18 阿里巴巴集团控股有限公司 A kind of page test method, device and its equipment
CN110347577B (en) * 2018-04-04 2024-04-09 阿里巴巴集团控股有限公司 Page testing method, device and equipment thereof
CN109240933A (en) * 2018-09-28 2019-01-18 四川长虹电器股份有限公司 A kind of tables of data operating result asserts method
CN109828899A (en) * 2018-12-13 2019-05-31 深圳壹账通智能科技有限公司 Acquisition method, device and the computer equipment of test data
CN110110234A (en) * 2019-05-13 2019-08-09 重庆天蓬网络有限公司 A kind of real-time search system of big data and method
CN114676034A (en) * 2020-12-24 2022-06-28 腾讯科技(深圳)有限公司 Test method, test device and computer equipment

Similar Documents

Publication Publication Date Title
CN109302522B (en) Test method, test device, computer system, and computer medium
US10372600B2 (en) Systems and methods for automated web performance testing for cloud apps in use-case scenarios
CN104123397A (en) Automatic test device and method for Web page
US8381184B2 (en) Dynamic test coverage
WO2018010552A1 (en) Test method and device
EP2572294B1 (en) System and method for sql performance assurance services
CN110768872B (en) Inspection method, system, device, computer equipment and storage medium
CN104375914A (en) Automatic testing method for internal pressure change of server
US8291388B2 (en) System, method and program for executing a debugger
CN102693183A (en) Method and system for realizing automatic software testing
CN105243016B (en) The methods, devices and systems being monitored to the terminal device on test platform
CN109684847A (en) Self-repairing method, device, equipment and the storage medium of script loophole
US10942837B2 (en) Analyzing time-series data in an automated application testing system
CN104717337A (en) Method for testing mobile application in batch and equipment used in method
CN104268076A (en) Testing method suitable for automatically testing memory bandwidth of each processor platform
CN104375937A (en) Continuous integration method and system of automated testing results
CN105808417A (en) Automated testing method and proxy server
CN102609472A (en) Method and system for implementing performance test of distributed database system
CN104410671A (en) Snapshot capturing method and data monitoring tool
CN102567186A (en) Automated software testing method
CN111475412A (en) Software testing method and device, electronic equipment and computer readable storage medium
CN105550088A (en) Automated testing method and automated testing system
CN106713069A (en) System resource monitoring and bottleneck identification method
CN102707943A (en) Implementation method of remote control automation tool
CN105487925A (en) Data scanning method and device

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
C10 Entry into substantive examination
SE01 Entry into force of request for substantive examination
C41 Transfer of patent application or patent right or utility model
TA01 Transfer of patent application right

Effective date of registration: 20160203

Address after: 200335 Shanghai city Changning District Admiralty Road No. 968 Building No. 16 10 floor

Applicant after: SHANGHAI XIECHENG BUSINESS CO., LTD.

Address before: 200335 Shanghai City, Changning District Fuquan Road No. 99, Ctrip network technology building

Applicant before: Ctrip computer technology (Shanghai) Co., Ltd.

RJ01 Rejection of invention patent application after publication

Application publication date: 20141029

RJ01 Rejection of invention patent application after publication