CN104035872B - Method and device for testing clustering software - Google Patents
Method and device for testing clustering software Download PDFInfo
- Publication number
- CN104035872B CN104035872B CN201410302202.1A CN201410302202A CN104035872B CN 104035872 B CN104035872 B CN 104035872B CN 201410302202 A CN201410302202 A CN 201410302202A CN 104035872 B CN104035872 B CN 104035872B
- Authority
- CN
- China
- Prior art keywords
- test
- file
- script file
- script
- configuration file
- 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.)
- Active
Links
- 238000012360 testing method Methods 0.000 title claims abstract description 129
- 238000000034 method Methods 0.000 title claims abstract description 18
- 238000013515 script Methods 0.000 claims abstract description 108
- 241000208340 Araliaceae Species 0.000 claims 1
- 235000005035 Panax pseudoginseng ssp. pseudoginseng Nutrition 0.000 claims 1
- 235000003140 Panax quinquefolius Nutrition 0.000 claims 1
- 235000008434 ginseng Nutrition 0.000 claims 1
- 230000008569 process Effects 0.000 abstract description 3
- 230000008439 repair process Effects 0.000 abstract 1
- 230000004048 modification Effects 0.000 description 6
- 238000012986 modification Methods 0.000 description 6
- 238000013459 approach Methods 0.000 description 2
- 230000006870 function Effects 0.000 description 2
- 238000013522 software testing Methods 0.000 description 2
- 230000008901 benefit Effects 0.000 description 1
- 238000011161 development Methods 0.000 description 1
- 230000006872 improvement Effects 0.000 description 1
- 238000006467 substitution reaction Methods 0.000 description 1
- 238000010998 test method Methods 0.000 description 1
Abstract
The invention provides a method for testing clustering software. The method includes the steps of obtaining a configuration file, generating a script file according to elements in the configuration file, and testing the script file, wherein the script file comprises test parameters corresponding to the elements and needed by clustering function testing. According to the elements and the parameters of the elements, the script file is generated automatically, the process that a tester repairs and configures scripts manually is omitted and software test efficiency is improved.
Description
Technical field
The present invention relates to software test field, be specifically related to the method and device of a kind of clustered software test.
Background technology
Along with increasing sharply and the development of ecommerce of internet information, reliability and the seriality of business are required more and more higher by people, can Internet enterprises externally provide highly reliable service, having a great impact the degree of recognition of enterprise, the demand of various highly reliable business has been catered in the appearance of Clustering.
At present, the test of each clustered software version needs manually to pick out, according to cluster configuration file, the parameter that cluster test script needs, and identifying clustering functionality contained in current configuration file, it is tested by the clustering functionality test script that then reselection is corresponding.And when the different parameters of same type function is tested, need continuous manual modification configuration script.Have impact on the testing efficiency of whole software, and bring comparatively laborious configuration file modification.
Summary of the invention
The technical problem to be solved is to provide a kind of clustered software method of testing, to improve the testing efficiency of clustered software.
In order to solve above-mentioned technical problem, this application provides kind of a method for clustered software test, described method includes:
Obtain configuration file;
According to each Element generation script file in described configuration file, containing the test parameter needed for the clustering functionality test that described each element is corresponding in described script file;
Test described script file.
It is preferred that
Described acquisition configuration file includes:
Receive the path of described configuration file, obtain described configuration file according to described path.
It is preferred that
Described include according to each Element generation script file in described configuration file:
Travel through each element in described configuration file and the configuration parameter in each element, described configuration parameter in described each element is converted into the test parameter needed for the test of described cluster, generates described script file according to the test parameter needed for the described clustering functionality test that each element in described configuration file and each element are corresponding.
It is preferred that
The test parameter that in described script file, identity element is corresponding stores in the form of a list;
The described script file of described test includes:
Read described script file, call the test script that described each element is corresponding, test the test parameter needed for the clustering functionality that described in described script file, each element is corresponding is tested by each test script.
It is preferred that
Also include after the described script file of described test:
Test result according to script file described in default daily record rank record.
The present invention also provides for the device of a kind of integrated software test, and described device includes: configuration file acquisition module, script file generation module and script file test module;
Wherein: described configuration file acquisition module is used for obtaining configuration file;
Described script file generation module is for according to each Element generation script file in described configuration file, containing the test parameter needed for the clustering functionality test that described each element is corresponding in described script file;
Described script file test module is used for testing described script file.
It is preferred that
Described configuration file acquisition module is used for obtaining configuration file and refers to:
Described configuration file acquisition module receives the path of described configuration file, obtains described configuration file according to described path.
It is preferred that
Described script file generation module is for referring to according to each Element generation script file in described configuration file:
Described script file generation module travels through each element in described configuration file and the configuration parameter in each element, described configuration parameter in described each element is converted into the test parameter needed for the test of described cluster, generates described script file according to the test parameter needed for the described clustering functionality test that each element in described configuration file and each element are corresponding.
It is preferred that
The test parameter that in described script file, identity element is corresponding stores in the form of a list;
Described script file test module is used for testing described script file and refers to:
Described script file test module reads described script file, calls the test script that described each element is corresponding, tests the test parameter needed for the clustering functionality that described in described script file, each element is corresponding is tested by each test script.
It is preferred that
Described device also includes test result output module;
Described test result output module is for the test result according to script file described in default daily record rank record.
Such scheme, according to each element in configuration file and each element parameter, automatically generates script file, eliminates the process of tester's manual modification configuration script, improves Efficiency of Software Testing.Use hierarchical approaches to output test result simultaneously and can be easy to the reason that assignment test result is failed.
Accompanying drawing explanation
Fig. 1 is the flow chart of the method for a kind of clustered software of embodiment of the present invention test;
Fig. 2 is the structural representation of the device of a kind of clustered software of embodiment of the present invention test.
Detailed description of the invention
For making the purpose of the application, technical scheme and advantage clearer, below in conjunction with accompanying drawing, embodiments herein is described in detail.It should be noted that in the case of not conflicting, the embodiment in the application and the feature in embodiment can mutual combination in any.
Embodiment one
Below in conjunction with the accompanying drawings the cluster method of testing in the embodiment of the present application one is described further.
As it is shown in figure 1, the method for the cluster test in the present embodiment one includes:
S101: obtain configuration file;
Receive the path of the configuration file of user setup, configuration file can be obtained according to this path.
S102: according to each Element generation script file in configuration file;
Element in configuration file is designed as a clustering functionality, after each parameter that traversal each element of configuration file, each element are comprised and configuration file, needs to preserve this information.
S103: according to each Element generation script file in configuration file;
Each element in traversal configuration file and the configuration parameter in each element, configuration parameter in each element is converted into the test parameter needed for cluster test, generates script file according to the test parameter needed for the clustering functionality test that each element in configuration file and each element are corresponding.Containing the test parameter needed for the clustering functionality test that each element is corresponding in script file.The test parameter that in script file, identity element is corresponding stores in the form of a list.
S104: test described script file;
Global parameter and the test parameter of each element in disposable reading script file, each element is used for the number to the test case that it is tested by count variable record.Call the test script that each element is corresponding, complete the test of the test parameter that each element is corresponding in script file by each test script.
Alternatively, after script file has been tested, can also include the steps of.
S105: according to the test result of default daily record rank record script file.
Can arrange the test result of two rank output pin presents, if rank 1 is the test result only recording each test script, rank 2 is also to record the problem gone out in whole system test in addition to recording the test result of each test script, it is simple to alignment system problem.Generally can arrange and under default situations, use rank 2 to record test result.
Such scheme, according to each element in configuration file and each element parameter, automatically generates script file, eliminates the process of tester's manual modification configuration script, improves Efficiency of Software Testing.Use hierarchical approaches to output test result simultaneously and can be easy to the reason that assignment test result is failed.
As in figure 2 it is shown, the present embodiment also provides for the device of a kind of clustered software test, including: configuration file acquisition module 1, script file generation module 2 and script file test module 3;Wherein:
Configuration file acquisition module 1 is used for obtaining configuration file;
Concrete, configuration file acquisition module 1 receives the path of described configuration file, obtains configuration file according to path.
Script file generation module 2 is for according to each Element generation script file in configuration file, containing the test parameter needed for the clustering functionality test that each element is corresponding in script file;
Concrete, script file generation module 2 travels through each element in configuration file and the configuration parameter in each element, described configuration parameter in each element is converted into the test parameter needed for cluster test, generates script file according to the test parameter needed for the clustering functionality test that each element in configuration file and each element are corresponding.The test parameter that in script file, identity element is corresponding stores in the form of a list.
Script file test module 3 is for test script file.
Concrete, script file test module 3 reads script file, calls the test script that each element is corresponding, carrys out the test parameter needed for the clustering functionality that in test script file, each element is corresponding is tested by each test script.
It is preferred that device also includes test result output module 4;
Test result output module is for the test result according to default daily record rank record script file.
One of ordinary skill in the art will appreciate that all or part of step in said method can instruct related hardware by program and complete, described program can be stored in computer-readable recording medium, such as read only memory, disk or CD etc..Alternatively, all or part of step of above-described embodiment can also use one or more integrated circuit to realize, and correspondingly, each module/module in above-described embodiment can realize to use the form of hardware, it would however also be possible to employ the form of software function module realizes.The application is not restricted to the combination of the hardware and software of any particular form.
The foregoing is only the preferred embodiment of the application, be not limited to the application, for a person skilled in the art, the application can have various modifications and variations.All within spirit herein and principle, any modification, equivalent substitution and improvement etc. made, within should be included in the protection domain of the application.
Claims (8)
1. the method for a clustered software test, it is characterised in that described method includes:
Obtain configuration file;
According to each Element generation script file in described configuration file, containing described in described script file
Test parameter needed for the clustering functionality test that each element is corresponding;
Test described script file;
Described include according to each Element generation script file in described configuration file:
Travel through each element in described configuration file and the configuration parameter in each element, by described each element
In described configuration parameter be converted into described cluster test needed for test parameter, according to described configuration file
In each element and each element corresponding described clustering functionality test needed for test parameter generate described script
File.
2. the method for claim 1, it is characterised in that:
Described acquisition configuration file includes:
Receive the path of described configuration file, obtain described configuration file according to described path.
3. the method for claim 1, it is characterised in that:
The test parameter that in described script file, identity element is corresponding stores in the form of a list;
The described script file of described test includes:
Read described script file, call the test script that described each element is corresponding, by each test script
Test the test parameter needed for the clustering functionality test that described in described script file, each element is corresponding.
4. the method as described in arbitrary in claims 1 to 3, it is characterised in that:
Also include after the described script file of described test:
Test result according to script file described in default daily record rank record.
5. the device of an integrated software test, it is characterised in that described device includes: configuration file obtains
Delivery block, script file generation module and script file test module;
Wherein: described configuration file acquisition module is used for obtaining configuration file;
Described script file generation module is for according to each Element generation script literary composition in described configuration file
Part, containing the test parameter needed for the clustering functionality test that described each element is corresponding in described script file;
Described script file test module is used for testing described script file;
Described script file generation module is for according to each Element generation script file in described configuration file
Refer to:
Described script file generation module travels through joining in each element in described configuration file and each element
Put parameter, the described configuration parameter in described each element is converted into the test ginseng needed for the test of described cluster
Number, according to needed for the described clustering functionality test that each element in described configuration file and each element are corresponding
Test parameter generates described script file.
6. device as claimed in claim 5, it is characterised in that:
Described configuration file acquisition module is used for obtaining configuration file and refers to:
Described configuration file acquisition module receives the path of described configuration file, obtains institute according to described path
State configuration file.
7. device as claimed in claim 5, it is characterised in that:
The test parameter that in described script file, identity element is corresponding stores in the form of a list;
Described script file test module is used for testing described script file and refers to:
Described script file test module reads described script file, calls the test that described each element is corresponding
Script, tests, by each test script, the clustering functionality that described in described script file, each element is corresponding and tests
Required test parameter.
8. the device as described in arbitrary in claim 5 to 7, it is characterised in that: described device also includes
Test result output module;
Described test result output module is for the survey according to script file described in default daily record rank record
Test result.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201410302202.1A CN104035872B (en) | 2014-06-27 | 2014-06-27 | Method and device for testing clustering software |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201410302202.1A CN104035872B (en) | 2014-06-27 | 2014-06-27 | Method and device for testing clustering software |
Publications (2)
Publication Number | Publication Date |
---|---|
CN104035872A CN104035872A (en) | 2014-09-10 |
CN104035872B true CN104035872B (en) | 2017-01-11 |
Family
ID=51466645
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201410302202.1A Active CN104035872B (en) | 2014-06-27 | 2014-06-27 | Method and device for testing clustering software |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN104035872B (en) |
Families Citing this family (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN107885648B (en) * | 2016-09-29 | 2020-09-29 | 北京京东尚科信息技术有限公司 | Method and device for generating test report |
CN107423181A (en) * | 2017-07-28 | 2017-12-01 | 郑州云海信息技术有限公司 | The automated testing method and device of a kind of uniform storage device |
CN107919980B (en) * | 2017-10-30 | 2020-02-21 | 贵州白山云科技股份有限公司 | Evaluation method and device for clustered system |
CN109901059A (en) * | 2019-01-29 | 2019-06-18 | 航天科工防御技术研究试验中心 | A kind of Complex Programmable Logic Devices repeats configuration test method and electronic equipment |
Citations (8)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US6317792B1 (en) * | 1998-12-11 | 2001-11-13 | Webtv Networks, Inc. | Generation and execution of scripts for enabling cost-effective access to network resources |
US6829731B1 (en) * | 2000-08-14 | 2004-12-07 | International Business Machines Corporation | Method and system for generating a design-specific test case from a generalized set of bus transactions |
EP1607861A2 (en) * | 2004-05-19 | 2005-12-21 | Sun Microsystems, Inc. | Method and apparatus for deploying software applications using a zone architecture |
CN103186460A (en) * | 2011-12-30 | 2013-07-03 | 金蝶软件(中国)有限公司 | Method, device and system for generating script of test case |
CN103345442A (en) * | 2013-06-06 | 2013-10-09 | 莱诺斯科技(北京)有限公司 | Equipment automated testing service integration system |
CN103455423A (en) * | 2013-09-03 | 2013-12-18 | 浪潮(北京)电子信息产业有限公司 | Software automatic testing device and system based on cluster framework |
CN103631708A (en) * | 2012-08-28 | 2014-03-12 | 深圳市世纪光速信息技术有限公司 | Program testing method and program testing device |
CN103631720A (en) * | 2013-12-20 | 2014-03-12 | 百度在线网络技术(北京)有限公司 | Method and device for generating test case |
-
2014
- 2014-06-27 CN CN201410302202.1A patent/CN104035872B/en active Active
Patent Citations (8)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US6317792B1 (en) * | 1998-12-11 | 2001-11-13 | Webtv Networks, Inc. | Generation and execution of scripts for enabling cost-effective access to network resources |
US6829731B1 (en) * | 2000-08-14 | 2004-12-07 | International Business Machines Corporation | Method and system for generating a design-specific test case from a generalized set of bus transactions |
EP1607861A2 (en) * | 2004-05-19 | 2005-12-21 | Sun Microsystems, Inc. | Method and apparatus for deploying software applications using a zone architecture |
CN103186460A (en) * | 2011-12-30 | 2013-07-03 | 金蝶软件(中国)有限公司 | Method, device and system for generating script of test case |
CN103631708A (en) * | 2012-08-28 | 2014-03-12 | 深圳市世纪光速信息技术有限公司 | Program testing method and program testing device |
CN103345442A (en) * | 2013-06-06 | 2013-10-09 | 莱诺斯科技(北京)有限公司 | Equipment automated testing service integration system |
CN103455423A (en) * | 2013-09-03 | 2013-12-18 | 浪潮(北京)电子信息产业有限公司 | Software automatic testing device and system based on cluster framework |
CN103631720A (en) * | 2013-12-20 | 2014-03-12 | 百度在线网络技术(北京)有限公司 | Method and device for generating test case |
Non-Patent Citations (1)
Title |
---|
集群系统的自动化测试技术的研究与实现;王兰;《中国优秀硕士学位论文全文数据库 信息科技辑》;20090715;第17页,第22页,第35页 * |
Also Published As
Publication number | Publication date |
---|---|
CN104035872A (en) | 2014-09-10 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
US11119897B2 (en) | System and method of handling complex experiments in a distributed system | |
Church et al. | Understanding the challenges of mobile phone usage data | |
CN104035872B (en) | Method and device for testing clustering software | |
CN107402884A (en) | Generate the method and device of interface testing code | |
US9454466B2 (en) | Explaining partially illegal combinations in combinatorial models | |
CN107133174A (en) | Test case code automatically generating device and method | |
CN107229559B (en) | Detection method and device for testing integrity of service system | |
CN104407980A (en) | Mobile application automated testing device and method | |
CN109408105A (en) | Acquisition method, device, computing device and the storage medium of user behavior data | |
CN106227742A (en) | Dynamic web page based on B/S pattern generates method, server and system | |
CN110032597A (en) | The visible processing method and device of application program operation behavior | |
CN105760296A (en) | Automation testing control method, device and terminal | |
CN106161178A (en) | A kind of method and apparatus accessing instant messaging network | |
CN102799522A (en) | Managing method and system for software version tracing test | |
CN104317909A (en) | Method and device for verifying data of points of interest | |
CN110321292A (en) | Chip detecting method, device, electronic equipment and computer readable storage medium | |
CN104471530B (en) | Executable software code generation | |
CN113260977A (en) | Mechanism for automatically incorporating software code changes into appropriate channels | |
CN109408366A (en) | Data source configures test method, system, computer equipment and storage medium | |
CN105630667A (en) | Test method and terminal equipment | |
CN103440197B (en) | A kind of method automatically generating difference test report based on contrast test | |
US20170220336A1 (en) | System and method for automatic api candidate generation | |
CN103164335A (en) | Method and system for detecting unit test quality | |
KR101685495B1 (en) | Method for heterogeneous sensors mashup, recording medium and device for performing the method | |
CN107766230A (en) | A kind of method and apparatus tested based on configuration file |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
C06 | Publication | ||
PB01 | Publication | ||
C10 | Entry into substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
GR01 | Patent grant | ||
GR01 | Patent grant | ||
TR01 | Transfer of patent right | ||
TR01 | Transfer of patent right |
Effective date of registration: 20180827 Address after: 200436 Room 411, No. three, JIANGCHANG Road, Jingan District, Shanghai, 411 Patentee after: Shanghai wave Cloud Computing Service Co., Ltd. Address before: 100085 floor 1, C 2-1, No. 2, Shang Di Road, Haidian District, Beijing. Patentee before: Electronic information industry Co.,Ltd of the tide (Beijing) |