CN102222042A - Automatic software testing method based on cloud computing - Google Patents

Automatic software testing method based on cloud computing Download PDF

Info

Publication number
CN102222042A
CN102222042A CN2011101768861A CN201110176886A CN102222042A CN 102222042 A CN102222042 A CN 102222042A CN 2011101768861 A CN2011101768861 A CN 2011101768861A CN 201110176886 A CN201110176886 A CN 201110176886A CN 102222042 A CN102222042 A CN 102222042A
Authority
CN
China
Prior art keywords
test
test script
server
end server
master server
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Granted
Application number
CN2011101768861A
Other languages
Chinese (zh)
Other versions
CN102222042B (en
Inventor
李阳
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Beijing Feinno Communication Technology Co Ltd
Original Assignee
Beijing Feinno Communication 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 Beijing Feinno Communication Technology Co Ltd filed Critical Beijing Feinno Communication Technology Co Ltd
Priority to CN201110176886.1A priority Critical patent/CN102222042B/en
Publication of CN102222042A publication Critical patent/CN102222042A/en
Application granted granted Critical
Publication of CN102222042B publication Critical patent/CN102222042B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Landscapes

  • Debugging And Monitoring (AREA)

Abstract

The invention discloses an automatic software automated testing method based on cloud computing, relating to the field of software testing. The method comprises the following steps of: a master server sends a test script to each end server; the end server with received test script tests the test script and returns the test result to the master sever; the master server judges whether all test scripts in the set of test scripts are completely sent; if so, the testing is finished; or, the master server sends a new test script to an end server returning the test result, and performs corresponding steps. In the method, all test scripts are distributed to the end server by the master server, and the end server performs the test scripts one by one and acquires new test script after the test result is returned; therefore, all resources of the end server are ensured to be fully utilized in the whole test procedure and the availability of resources is improved.

Description

Software automated testing method based on cloud computing
Technical field
The present invention relates to the software testing technology field, particularly a kind of software automated testing method based on cloud computing.
Background technology
The narrow sense cloud computing refers to the payment and the use pattern of IT infrastructure, refer to by network with as required, the mode of easily expansion obtains resource requirement; The broad sense cloud computing refers to the payment and the use pattern of serving, refer to by network with as required, the mode of easily expansion obtains required service.This service can be IT, software, internet related service, also other services.Cloud computing (Cloud Computing) is the product that grid computing (Grid Computing), Distributed Calculation (DistributedComputing), parallel computation (Parallel Computing), effectiveness calculating (Utility Computing), the network storage (Network Storage Technologies), virtual (Virtualization), load balancing traditional computers such as (Load Balance) and network technical development merge.
In the present software automated testing scheme, be to have write test script mostly,, carry out the test script that configures according to test request.When test execution begins, the just definite test script that will carry out, and in commission cannot change.There is following defective in existing scheme:
1, when a large amount of test scripts need be carried out, as 5000, beginning in test execution is that earlier with on a rough average being assigned on the different testing servers of these 5000 test scripts, all testing servers begin to carry out the test script that is assigned to then.Consequently, some testing servers are finished test assignment earlier, and some testing servers expend finishes test for a long time.Because, must wait until last testing server end of run, just can finish whole test.So in this process, resource utilization is lower.
2, test script is being carried out in the test process, as run into special circumstances, needing the execution of some test scripts of cancellation, can only stop the test of all test scripts, re-executing according to new test script set then, efficiency ratio is lower.
Summary of the invention
(1) technical matters that will solve
The technical problem to be solved in the present invention is: how a kind of software automated testing method based on cloud computing is provided, to realize that test script is dynamically distributed to testing server, improves the resource utilization to testing server.
(2) technical scheme
For solving the problems of the technologies described above, the invention provides a kind of software automated testing method based on cloud computing, it comprises step:
B: master server sends 1 test script to every you server;
C: receive the test of the end server execution of test script, and test result is returned to described master server to described test script;
D: described master server is judged whether all test scripts in the test script set send and is finished, and finishes if send, and finishes test, otherwise, execution in step E;
E: described master server sends 1 new test script to the end server that returns test result, carries out described step C.
Preferably, also comprised steps A before described step B: described master server obtains described test script set back and connects with described end server.
Preferably, described steps A specifically comprises:
Steps A 1: described master server loading configuration file, and from described configuration file, obtain described test script set;
Steps A 2: initiatively connect described master server behind the described end startup of server, after the successful connection, described end server is in waiting status;
Steps A 3: described master server judges that whether the quantity of the described end server that has been connected with described master server reaches standard value, if reach, carry out described step B, otherwise described master server is in waiting status.
Preferably, the described configuration file of described master server periodic scanning, if described configuration file changes, described master server obtains new test script set according to the configuration file after changing, and sends test script according to described new test script set to described end server.
Preferably, described step C specifically comprises:
Step C1: receive the test of the end server execution of test script to described test script, if test successfully, described end server returns to described master server with the test result of success, carry out described step D, otherwise, described end server returns to described master server with the test result of failure, carries out C2;
Step C2: whether the test crash number of times of judging described test script reaches setting value, if reach, finishes the test to described test script, carries out described step D, otherwise, carry out described step C3;
Step C3: described master server sends to an end server of not carrying out described test script with described test script, carries out described step C1.
Preferably, described setting value is generally 3.
Preferably, in described step C, withdraw from test if receive the end server of test script in the test process of carrying out described test script, then described master server is regained described test script, and described test script is sent to another end server.
Preferably, in described step C, in carrying out, normally withdraw from test if receive the end server of test script to the test process of described test script, described end server sends and withdraws from signal to described master server, described master server receives described withdrawing from and regains described test script behind the signal, and described test script is sent to another end server.
Preferably, in described step C, in carrying out, withdraw from test if receive the end server of test script unusually to the test process of described test script, the time-out time that described master server returns test result according to described end server judges that described end server has withdrawed from the test back and regained described test script, and described test script is sent to another end server.
Preferably, in described step D, after finishing to test, also comprise step F: described test result is saved in the test and management instrument, and generates test report.
(3) beneficial effect
Software automated testing method based on cloud computing of the present invention has following advantage: at first, all test scripts are given the end server by the master server dynamic assignment, the end server is carried out test script one by one and obtain new test script after being returned test result, like this, the resource that has guaranteed all end servers is all utilized in whole test process fully, has improved resource utilization; Secondly, master server can send to the end server of not carrying out described test script to the test script of test crash and carry out test, thereby can effectively solve the problem of the current test script test crash that the failure of end server environment problem or Pretesting script causes, reduce test script causes test crash because of improper factor probability; Once more, in test process, can change the test script set, improve the test dirigibility by revising configuration file.
Description of drawings
Fig. 1 is the software automated testing method flow diagram based on cloud computing of the present invention;
Processing procedure synoptic diagram when Fig. 2 is the test script failure.
Embodiment
Below in conjunction with drawings and Examples, the specific embodiment of the present invention is described in further detail.Following examples are used to illustrate the present invention, but are not used for limiting the scope of the invention.
Fig. 1 is the software automated testing method flow diagram based on cloud computing of the present invention.As shown in Figure 1, described method comprises step:
A: master server obtains test script set back and connects with the end server.
Described steps A specifically comprises:
Steps A 1: described master server loading configuration file, and from described configuration file, obtain described test script set.Table 1 is a kind of example of described configuration file format.
Table 1 configuration file format example
Figure BDA0000071826690000041
Figure BDA0000071826690000051
The configuration file of example is a text formatting in the table 1, can preserve at the software test procedure inediting.Exe=in the case attribute " 1 ", expression is carried out, and " 0 " expression is not carried out, and exe is " 0 " in the folder attribute, and then whole folder catalogue is not carried out.
Steps A 2: initiatively connect described master server behind the described end startup of server, after the successful connection, described end server is in waiting status.
Steps A 3: described master server judges whether the quantity of the described end server that has been connected with described master server reaches standard value, if reach, and execution in step B, otherwise described master server is in waiting status.Described standard value is generally determined according to the quantity of test script in the test script set.
Wherein, in the whole software test process, the described configuration file of described master server periodic scanning, if described configuration file changes, described master server obtains new test script set according to the configuration file after changing, and sends test script according to described new test script set to described end server.Therefore, when not having the regression tested test assignment, can change configuration file,, keep the availability of test environment to allow described master server and the smoke test of holding server execution basic function.
B: described master server sends 1 test script to every described end server;
C: receive the test of the end server execution of test script, and test result is returned to described master server to described test script.
Described step C specifically comprises:
Step C1: receive the test of the end server execution of test script to described test script, if test successfully, described end server returns to described master server with the test result of success, carry out described step D, otherwise, described end server returns to described master server with the test result of failure, carries out C2.
Step C2: whether the test crash number of times of judging described test script reaches setting value, if reach, finishes the test to described test script, carries out described step D, otherwise, carry out described step C3.Described setting value is no more than the quantity of described end server, is generally 3.
Step C3: described master server sends to an end server of not carrying out described test script with described test script, carries out described step C1.
Processing procedure synoptic diagram when Fig. 2 is the test script failure.As shown in Figure 2, cause because of environmental problem before the number of times of test crash reaches setting value at test script, master server can repeatedly send to test script the end server of not carrying out described test script, reaches setting value until the test success or the frequency of failure.Like this, can effectively avoid because the test crash problem that environmental problem causes.
Wherein, the end server that receives test script may normally withdraw from test or withdraw from test unusually in carrying out the test process of described test script.If normally withdraw from test, described end server sends and withdraws from signal to described master server, and described master server receives describedly regains described test script after withdrawing from signal, and described test script is sent to another end server; If withdraw from test unusually, the time-out time that described master server returns test result according to described end server judges that described end server has withdrawed from the test back and regained described test script, and described test script is sent to another end server.
In the whole software test process, the end server that is not connected with described main service can connect with described master server at any time before, joins in the software test procedure.
D: described master server is judged whether all test scripts in the test script set send and is finished, and finishes if send, and finishes test, execution in step F, otherwise, execution in step E.
E: described master server sends 1 new test script to the end server that returns test result, carries out described step C.
F: described test result is saved in the test and management instrument, and generates test report.
The described software automated testing method based on cloud computing of the embodiment of the invention has following advantage: at first, all test scripts are given the end server by the master server dynamic assignment, the end server is carried out test script one by one and obtain new test script after being returned test result, like this, the resource that has guaranteed all end servers is all utilized in whole test process fully, has improved resource utilization; Secondly, master server can send to the end server of not carrying out described test script to the test script of test crash and carry out test, thereby can effectively solve the problem of the current test script test crash that the failure of end server environment problem or Pretesting script causes, reduce test script causes test crash because of improper factor probability; Once more, in test process, can change the test script set, improve the test dirigibility by revising configuration file.
Above embodiment only is used to illustrate the present invention; and be not limitation of the present invention; the those of ordinary skill in relevant technologies field; under the situation that does not break away from the spirit and scope of the present invention; can also make various variations and modification; therefore all technical schemes that are equal to also belong to category of the present invention, and scope of patent protection of the present invention should be defined by the claims.

Claims (10)

1. the software automated testing method based on cloud computing is characterized in that, comprises step:
B: master server sends 1 test script to every you server;
C: receive the test of the end server execution of test script, and test result is returned to described master server to described test script;
D: described master server is judged whether all test scripts in the test script set send and is finished, and finishes if send, and finishes test, otherwise, execution in step E;
E: described master server sends 1 new test script to the end server that returns test result, carries out described step C.
2. the method for claim 1 is characterized in that, also comprises steps A before described step B: described master server obtains described test script set back and connects with described end server.
3. method as claimed in claim 2 is characterized in that, described steps A specifically comprises step:
A1: described master server loading configuration file, and from described configuration file, obtain described test script set;
A2: initiatively connect described master server behind the described end startup of server, after the successful connection, described end server is in waiting status;
A3: described master server judges that whether the quantity of the described end server that has been connected with described master server reaches standard value, if reach, carry out described step B, otherwise described master server is in waiting status.
4. method as claimed in claim 3, it is characterized in that, the described configuration file of described master server periodic scanning, if described configuration file changes, described master server obtains new test script set according to the configuration file after changing, and sends test script according to described new test script set to described end server.
5. the method for claim 1 is characterized in that, described step C specifically comprises step:
C1: receive the test of the end server execution of test script to described test script, if test successfully, described end server returns to described master server with the test result of success, carry out described step D, otherwise, described end server returns to described master server with the test result of failure, carries out C2;
C2: whether the test crash number of times of judging described test script reaches setting value, if reach, finishes the test to described test script, carries out described step D, otherwise, carry out described step C3;
C3: described master server sends to an end server of not carrying out described test script with described test script, carries out described step C1.
6. method as claimed in claim 5 is characterized in that described setting value is generally 3.
7. the method for claim 1, it is characterized in that, in described step C, in the test process of carrying out described test script, withdraw from test if receive the end server of test script, then described master server is regained described test script, and described test script is sent to another end server.
8. method as claimed in claim 7, it is characterized in that, in described step C, in carrying out, normally withdraw from test if receive the end server of test script to the test process of described test script, described end server sends and withdraws from signal to described master server, described master server receives described withdrawing from and regains described test script behind the signal, and described test script is sent to another end server.
9. method as claimed in claim 7, it is characterized in that, in described step C, in carrying out, withdraw from test if receive the end server of test script unusually to the test process of described test script, the time-out time that described master server returns test result according to described end server judges that described end server has withdrawed from the test back and regained described test script, and described test script is sent to another end server.
10. the method for claim 1 is characterized in that, in described step D, after finishing to test, also comprises step F: described test result is saved in the test and management instrument, and generates test report.
CN201110176886.1A 2011-06-28 2011-06-28 Automatic software testing method based on cloud computing Active CN102222042B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201110176886.1A CN102222042B (en) 2011-06-28 2011-06-28 Automatic software testing method based on cloud computing

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201110176886.1A CN102222042B (en) 2011-06-28 2011-06-28 Automatic software testing method based on cloud computing

Publications (2)

Publication Number Publication Date
CN102222042A true CN102222042A (en) 2011-10-19
CN102222042B CN102222042B (en) 2014-04-23

Family

ID=44778598

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201110176886.1A Active CN102222042B (en) 2011-06-28 2011-06-28 Automatic software testing method based on cloud computing

Country Status (1)

Country Link
CN (1) CN102222042B (en)

Cited By (14)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102594617A (en) * 2012-01-12 2012-07-18 易云捷讯科技(北京)有限公司 System and method for evaluating cloud computing service
CN102831062A (en) * 2012-08-31 2012-12-19 浪潮电子信息产业股份有限公司 Testing method based on cloud computing operating system software compatibility
CN102903010A (en) * 2012-09-25 2013-01-30 浙江图讯科技有限公司 Support vector machine-based abnormal judgment method for safety production cloud service platform orientating industrial and mining enterprises
CN102981951A (en) * 2012-11-01 2013-03-20 珠海金山网络游戏科技有限公司 Platform and method of cloud test development
CN103473174A (en) * 2013-09-10 2013-12-25 四川长虹电器股份有限公司 Cloud testing method for application software of intelligent televisions
CN103605609A (en) * 2013-12-10 2014-02-26 浪潮电子信息产业股份有限公司 Automatic test framework applicable to cloud computing
CN104239208A (en) * 2014-09-19 2014-12-24 福建星海通信科技有限公司 Recovery method for exceptions during automation execution
CN104424099A (en) * 2013-08-30 2015-03-18 上海复旦微电子集团股份有限公司 Software testing method and system
CN104809054A (en) * 2014-01-23 2015-07-29 腾讯科技(深圳)有限公司 Method and system for realizing program testing
CN108540351A (en) * 2018-04-20 2018-09-14 西北工业大学 The automated testing method of distributed big data service
CN109818994A (en) * 2017-11-20 2019-05-28 北京京东尚科信息技术有限公司 Information processing method and device for agent side
CN110716876A (en) * 2019-09-30 2020-01-21 国核自仪系统工程有限公司 Test platform and test method for automatically verifying programmable logic code
CN111258867A (en) * 2015-12-30 2020-06-09 华为技术有限公司 Public cloud dial testing method and device
CN113076243A (en) * 2021-03-26 2021-07-06 成都安恒信息技术有限公司 Method for optimizing image recognition automated testing cost

Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101201776A (en) * 2006-12-14 2008-06-18 英业达股份有限公司 Method for integrating and testing platform of multiple operating systems
CN102035896A (en) * 2010-12-31 2011-04-27 北京航空航天大学 TTCN-3-based distributed testing framework applicable to software system

Patent Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101201776A (en) * 2006-12-14 2008-06-18 英业达股份有限公司 Method for integrating and testing platform of multiple operating systems
CN102035896A (en) * 2010-12-31 2011-04-27 北京航空航天大学 TTCN-3-based distributed testing framework applicable to software system

Cited By (21)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102594617A (en) * 2012-01-12 2012-07-18 易云捷讯科技(北京)有限公司 System and method for evaluating cloud computing service
CN102594617B (en) * 2012-01-12 2014-07-02 易云捷讯科技(北京)有限公司 System and method for evaluating cloud computing service
CN102831062A (en) * 2012-08-31 2012-12-19 浪潮电子信息产业股份有限公司 Testing method based on cloud computing operating system software compatibility
CN102903010A (en) * 2012-09-25 2013-01-30 浙江图讯科技有限公司 Support vector machine-based abnormal judgment method for safety production cloud service platform orientating industrial and mining enterprises
CN102981951B (en) * 2012-11-01 2016-03-09 珠海金山网络游戏科技有限公司 Cloud test development platform and cloud test development method
CN102981951A (en) * 2012-11-01 2013-03-20 珠海金山网络游戏科技有限公司 Platform and method of cloud test development
CN104424099B (en) * 2013-08-30 2017-12-12 上海复旦微电子集团股份有限公司 Method for testing software and system
CN104424099A (en) * 2013-08-30 2015-03-18 上海复旦微电子集团股份有限公司 Software testing method and system
CN103473174A (en) * 2013-09-10 2013-12-25 四川长虹电器股份有限公司 Cloud testing method for application software of intelligent televisions
CN103605609A (en) * 2013-12-10 2014-02-26 浪潮电子信息产业股份有限公司 Automatic test framework applicable to cloud computing
CN104809054A (en) * 2014-01-23 2015-07-29 腾讯科技(深圳)有限公司 Method and system for realizing program testing
CN104809054B (en) * 2014-01-23 2018-07-24 腾讯科技(深圳)有限公司 Realize the method and system of program test
CN104239208B (en) * 2014-09-19 2017-02-15 福建星海通信科技有限公司 Recovery method for exceptions during automation execution
CN104239208A (en) * 2014-09-19 2014-12-24 福建星海通信科技有限公司 Recovery method for exceptions during automation execution
CN111258867A (en) * 2015-12-30 2020-06-09 华为技术有限公司 Public cloud dial testing method and device
CN109818994A (en) * 2017-11-20 2019-05-28 北京京东尚科信息技术有限公司 Information processing method and device for agent side
CN108540351A (en) * 2018-04-20 2018-09-14 西北工业大学 The automated testing method of distributed big data service
CN108540351B (en) * 2018-04-20 2021-06-25 西北工业大学 Automatic testing method for distributed big data service
CN110716876A (en) * 2019-09-30 2020-01-21 国核自仪系统工程有限公司 Test platform and test method for automatically verifying programmable logic code
CN113076243A (en) * 2021-03-26 2021-07-06 成都安恒信息技术有限公司 Method for optimizing image recognition automated testing cost
CN113076243B (en) * 2021-03-26 2024-05-17 成都安恒信息技术有限公司 Method for optimizing automatic testing cost of image recognition

Also Published As

Publication number Publication date
CN102222042B (en) 2014-04-23

Similar Documents

Publication Publication Date Title
CN102222042B (en) Automatic software testing method based on cloud computing
CN102214139B (en) Automatic test performance control and debugging method facing distributed system
CN105279027B (en) A kind of virtual machine deployment method and device
CN110661647A (en) Life cycle management method and device
CN104077212A (en) Pressure test system and method
CN103186466A (en) Information interaction device and method based on automatic generation of associated test cases
CN107749807B (en) Network function verification method and verification system for NFV
CN108958744B (en) Deployment method, device, medium and electronic equipment of big data distributed cluster
US9619288B2 (en) Deploying software in a multi-instance node
CN108111364B (en) Service system testing method and device
CN110580195B (en) Memory allocation method and device based on memory hot plug
CN103425536A (en) Test resource management method oriented towards distributed system performance tests
CN113157411B (en) Celery-based reliable configurable task system and device
CN109873714B (en) Cloud computing node configuration updating method and terminal equipment
US20220255803A1 (en) NS Instantiation Method and NFVO
CN105740085A (en) Fault tolerance processing method and device
CN110888800A (en) Service interaction function test method, device, storage medium and test system
CN105677470B (en) Virtual machine method for scheduling task, virtual machine system
CN116560803B (en) Resource management method and related device based on SR-IOV
CN116974874A (en) Database testing method and device, electronic equipment and readable storage medium
US20230188432A1 (en) Method and Apparatus for Determining Resource Configuration of Cloud Service System
CN110868330B (en) Evaluation method, device and evaluation system for CPU resources which can be divided by cloud platform
CN109302314B (en) Controlled node simulation method and related device
CN108984105B (en) Method and device for distributing replication tasks in network storage device
CN110716730A (en) Gray scale distribution method, device, equipment and computer readable storage medium

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
C10 Entry into substantive examination
SE01 Entry into force of request for substantive examination
C14 Grant of patent or utility model
GR01 Patent grant
CP02 Change in the address of a patent holder
CP02 Change in the address of a patent holder

Address after: Room 810, 8 / F, 34 Haidian Street, Haidian District, Beijing 100080

Patentee after: BEIJING D-MEDIA COMMUNICATION TECHNOLOGY Co.,Ltd.

Address before: 100089 Beijing city Haidian District wanquanzhuang Road No. 28 Wanliu new building A block 5 layer

Patentee before: BEIJING D-MEDIA COMMUNICATION TECHNOLOGY Co.,Ltd.