CN100370434C - Method and system for realizing software automatic test - Google Patents
Method and system for realizing software automatic test Download PDFInfo
- Publication number
- CN100370434C CN100370434C CNB2005101171499A CN200510117149A CN100370434C CN 100370434 C CN100370434 C CN 100370434C CN B2005101171499 A CNB2005101171499 A CN B2005101171499A CN 200510117149 A CN200510117149 A CN 200510117149A CN 100370434 C CN100370434 C CN 100370434C
- Authority
- CN
- China
- Prior art keywords
- software
- module
- test script
- object program
- test
- 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.)
- Expired - Fee Related
Links
Images
Landscapes
- Debugging And Monitoring (AREA)
Abstract
The present invention discloses a method for realizing the automatic software test, which is applied to a system comprising a test script module and a software object program module. A test control module is arranged between the test script module and the software object program module. The method also comprises the steps: a when the test script module is used for running a test script, a call instruction is transmitted to the test control module; B the testing control module is used for analyzing the call instruction, the current running software action is determined, and an operation instruction corresponding to the software action is formed and transmitted to the software object program module; C after the software object program module is used for receiving the operation instruction, the software action corresponding to the operation instruction is run. The present invention also discloses a system, and the method and the system of the present invention are applied so as to realize the automatic software test. Software object program codes do not need to be modified.
Description
Technical field
The present invention relates to software testing technology, particularly a kind of method and system that realize software automatic test.
Background technology
Along with the development of social demand, the software function that various device is realized also becomes increasingly complex, and also will test the software of wherein operation naturally when test various device function.In order to improve testing efficiency, to seek unmanned test environment of intervening usually and satisfy testing requirement.
In the field tests of communication network, generally adopt automatization testing technique at present based on the TCL language.Move by writing pre-defined each behavioral test of test script, the execution that in corresponding interpreter, makes an explanation then, thus analog subscriber reaches the purpose of automatic test to the action of device software input operation order.When the peripheral software of control comes the collaborative test of analog subscriber, revise the software object program and in software, embed the TCL code, and reserve the TCL calling interface, it is compiled into dynamic link library calls, thereby realize the collaborative function of test automatically for the TCL test script.Wherein, each software operation when defined each behavioral test action of test script will move corresponding to the tested software target program can be analyzed the various performance parameters that obtain the tested software target program by the operation result of each software operation.
Below in conjunction with Fig. 1 existing software testing technology is illustrated.Fig. 1 is that existing software testing system is formed structural representation.As shown in Figure 1, this software testing system comprises: test script module, software object program module.Wherein, the test script module is used to carry the test script based on scripts such as TCL, and sends call instruction to the software object program module when the operation test script; The software object program module is used to carry the software object program and is embedded with the test script interface; This test script interface receives the call instruction from the test script module, carries out corresponding software operation according to this call instruction control operating software target program, to reach the purpose of the software object program being tested automatically by test script.Software object program among Fig. 1 is used to test miscellaneous equipment, so this software object program module also will be exported the various test actions of representative when operating software moves order gives equipment under test to reach the purpose of testing apparatus function.Certainly, the software object program also may be not used in the test miscellaneous equipment, then needn't connect equipment under test.This paper only considers the test process to software, therefore, whether is used to test miscellaneous equipment for tested software object program and does not limit.
In the such scheme, at first, to make amendment to the software object program, the order expansion is carried out in software operation wherein, the code of software operation correspondence write in language such as use C/C++, such as: if set up the operation of certain software and stop action, then in the software object program, embed code and define the operation of software and stop action.Then, defined software operation is registered as the test script interface; Simultaneously, the test script interface that obtains after the software object program code made amendment will generate dynamic link library file, and in the test script module, import this dynamic link library file, the test script module just can be called the test script interface by carrying out this dynamic link library file, thereby realizes the automatic control of test script to the software object program run.
But existing software testing technology is owing to will make amendment to the software object program code, and will produce some problems like this: the scripted codes such as TCL that embed in the software object program that, is modified will destroy tested software; Two, when tested software is the outsourcing product, can't obtain the authorization usually the software object program is made amendment, also just can't reach the purpose of automatically software being tested.
Summary of the invention
In view of this, fundamental purpose of the present invention is to provide a kind of method and system that realize software automatic test, needn't make amendment to tested software and just can realize the automatic test of software.
For achieving the above object, technical scheme of the present invention is achieved in that
The invention discloses a kind of method that realizes software automatic test, be applied to comprise the system of test script module and software object program module; Testing control module is set; This method also comprises:
When A. described test script module is moved the test script that self carries, send call instruction to described testing control module;
B. described testing control module is resolved this call instruction, determines the current software operation that will move, construct this software operation correspondence and the discernible operational order of described software object program module, and send this operational order to described software object program module;
C. after this software object program module receives operational order, move the software operation of this operational order correspondence.
Wherein, described software operation is the operation of software controls, and described operational order is the message that is used for the operation of drive software control; Among the step C, described software object program module receives the software controls operation from this message correspondence of execution after the message that is used for the operation of drive software control of testing control module.
Wherein, this method is based on Windows or Unix or Linux platform.
The invention also discloses a kind of system that realizes software automatic test, this system comprises: test script module and software object program module, described test script module are used for the bearing test script and output call instruction when the operation test script; This system also comprises:
Testing control module is used to receive the call instruction from the test script module, and structure also sends operational order to described software object program module;
Described software object program module is used to receive the operational order from testing control module, the operating software action.
Wherein, described testing control module comprises: test script interface module and simulated operation command module;
The test script interface module is used to receive the call instruction from the test script module, analysis result is resolved and is exported in this call instruction give described simulated operation command module;
The simulated operation command module is used to receive the call instruction analysis result from the test script interface module, determines the current software operation that will move, and the operational order of constructing and send this software operation correspondence is to described software object program module.
Wherein, this system is based on Windows or Unix or Linux platform.
By such scheme as can be seen, key of the present invention is: between test script module and software object program module testing control module is set, this testing control module can provide the test script interface, to resolving from the call instruction of test script module, determine the software operation of current operation, and structure and the operational order that sends this software operation correspondence be to the software object program module, and this software object program module is moved this software operation after receiving operational order.
Therefore, the method and system of realization software automatic test provided by the present invention when realizing software automatic test, needn't make amendment to the software object program, thereby the destruction that can not cause tested software also can be realized the test to third party software.The present invention makes test script module and software object program module independent, thereby is easy to the function expansion of test script module, and then can realize the automatic test of a cover test script to many covers software.
Description of drawings
Fig. 1 is that existing software testing system is formed structural representation;
Fig. 2 forms structural representation for system of the present invention one preferred embodiment;
Fig. 3 is the inventive method one preferred embodiment treatment scheme synoptic diagram.
Embodiment
The invention provides a kind of method that realizes software automatic test, its main design philosophy is: need not the code of tested software object program itself is made amendment, but between test script module and this software object program testing control module is set; This testing control module provides the test script interface to resolve call instruction from the test script module, and give the software object program module according to the analysis result of call instruction structure and transmit operation order, during with analog subscriber use software to the action of software object program input operation order; The software object program module will be moved corresponding software operation after receiving operational order.Thereby the software object program can be moved corresponding software operation according to the call instruction of test script, to reach the purpose of carrying out software test automatically.
Fig. 2 is the inventive method one preferred embodiment treatment scheme synoptic diagram.As shown in Figure 2, the concrete processing comprises:
Step 201: between test script module and tested software object program, testing control module is set.
Step 202: when the test script that carries in the test script module moved, this test script module sent call instruction to this testing control module.
Step 203: this testing control module is resolved the call instruction that receives.
Here, testing control module carries the test script interface routine, can receive and resolve call instruction from the test script module, this test script interface routine can be compiled into dynamic link library file, and in the test script module, import this dynamic link library file, thereby can directly send call instruction by carrying out this dynamic link library file, come to resolve calling order to call the test script interface to testing control module.
Step 204: described testing control module is determined the current software operation that will move according to the analysis result of call instruction, and the operational order of constructing and send this software operation correspondence is to described software object program module.
Here, resolve call instruction and determine the concrete disposal route of software operation, can adopt prior art to realize, and this handles the problem that non-the present invention solves, so this paper is not described further this.
Step 205: the software object program module receives the operational order from testing control module, by the corresponding software operation of this operational order operation.
Wherein, step 204 structure and the operational order that sends are the operational order that the discernible user of software object program imports when using software, that is to say: testing control module can be determined the current software operation that will move by resolving call instruction, and the operational order that analog subscriber sends is indicated this software operation of software object program run.Such as: software out of service is indicated in the call instruction that the test script module sends, the operational order that testing control module is out of service with the indication of structuring user's also sends to the software object program module, and for the software object program module, its operational order that receives is still all unimportant from the user from testing control module, as long as receive the operation that indication operational order out of service will stop the software object program.
Usually, the various operations of software object program are all based on software controls, such as: when using software, the various buttons that are provided with on user interface, dialog box, label etc. are all distinguished corresponding software controls separately, the operation that the user carries out these buttons, dialog box, label etc. also will be distinguished the operation of corresponding various software controls, and the operation of carrying out certain software controls has just moved a certain software operation.So, the operational order that the testing control module analog subscriber sends to the software object program, just analog subscriber is to the operation of software controls.Such as: when the user stops running software, to use mouse/keyboard to click stopping key on the user interface usually, remove to carry out this software operation out of service thereby trigger this corresponding software controls that stops key; So, in software test procedure, testing control module will analog mouse/keyboard to this operational order that stops key and send, carry out and stop the running software operation thereby drive this corresponding software controls that stops key.
In addition, under various platforms such as Windows, Unix, Linux, adopt the mode of message-driven to come software controls is operated usually, so the operational order that testing control module sends is generally the message that is used for the operation of drive software control, software controls just can trigger corresponding operation after receiving this message that is used for the operation of drive software control, i.e. the corresponding software operation of operation.
The foregoing description is the automatic test processes of a cover test script at a cover software, because the inventive method makes test script module and software object program module separate, therefore, be easy to realize the test function of a cover test script, as long as in the test script module, adds the analytical capabilities and the simulation functions of overlapping the software operation orders of adding many cover software test scripts at the test script of many covers software and in testing control module by demand to many covers software more.At this moment, all adopt flow process shown in Figure 2 at the test processes of every suit software, thus this paper no longer the test processes at many covers software is described in detail, but all in protection scope of the present invention.
Based on said method, the present invention also provides a kind of system that realizes software automatic test, this system comprises: test script module and tested software object program module, also between this test script module and this software object program module, set up testing control module.This testing control module is used to receive the call instruction from the test script module, and structure also sends operational order to the software object program module; Described software object program module is used to receive operational order and the corresponding software operation of operation from testing control module.
Fig. 3 forms structural representation for system of the present invention one preferred embodiment.As shown in Figure 3, this system comprises: test script module, testing control module and software object program module, this testing control module comprises: test script interface and simulated operation command module.
Wherein, the test script module is used for the bearing test script, sends call instruction to the test script interface module when the operation test script; The test script interface module is used for analysis result is resolved and sent to the call instruction that receives to the simulated operation command module; The simulated operation command module is used for constructing and send operational order to the software object program module by the analysis result that receives, and comes the action of drive software object program module operating software with analog subscriber transmit operation order; The software object program module is used to carry the software object program, receives the operational order from the simulated operation command module, moves the software operation of this operational order correspondence, thereby reaches the purpose of carrying out software test automatically.Described identical with background technology, if tested software object program is the software program that is used to test miscellaneous equipment, then as shown in Figure 3, the software object program module also will be exported the order of representing test action and give equipment under test when operating software moves, whether be not used to test miscellaneous equipment but the present invention does not limit tested software object program.
The present invention can be applicable in the software test based on kinds of platform such as Windows, Unix, Linux, use the inventive method and system, need not that the tested software target program is carried out code revision and just can realize automatic test, therefore, no matter it is whether authorized, all can implement test automatically, thereby conveniently realize that control third party testing software/instrument is tested equipment under test automatically, also avoid under the unauthorized situation, revising code and the abuse that produces the tested software target program.After using the present invention, test script and tested software target program are relatively independent, thereby can not destroy tested software object program, and are easier to the function expansion of test script, can further realize the collaborative automatically test of a cover test script to many covers software.
The above is preferred embodiment of the present invention only, is not to be used to limit protection scope of the present invention.All any modifications of being done within the spirit and principles in the present invention, be equal to replacement, improvement etc., all be included in protection scope of the present invention.
Claims (6)
1. method that realizes software automatic test is applied to comprise the system of test script module and software object program module; It is characterized in that, testing control module is set; This method also comprises:
When A. described test script module is moved the test script that self carries, send call instruction to described testing control module;
B. described testing control module is resolved this call instruction, determines the current software operation that will move, construct this software operation correspondence and the discernible operational order of described software object program module, and send this operational order to described software object program module;
C. after this software object program module receives operational order, move the software operation of this operational order correspondence.
2. method according to claim 1 is characterized in that, described software operation is the operation of software controls, and described operational order is the message that is used for the operation of drive software control;
Among the step C, described software object program module receives the software controls operation from this message correspondence of execution after the message that is used for the operation of drive software control of testing control module.
3. method according to claim 1 and 2 is characterized in that, this method is based on Windows or Unix or Linux platform.
4. system that realizes software automatic test, this system comprises: test script module and software object program module, described test script module are used for the bearing test script and output call instruction when the operation test script; It is characterized in that this system also comprises:
Testing control module is used to receive the call instruction from the test script module, and structure also sends operational order to described software object program module;
Described software object program module is used to receive the operational order from testing control module, the operating software action.
5. system according to claim 4 is characterized in that, described testing control module comprises: test script interface module and simulated operation command module;
The test script interface module is used to receive the call instruction from the test script module, analysis result is resolved and is exported in this call instruction give described simulated operation command module;
The simulated operation command module is used to receive the call instruction analysis result from the test script interface module, determines the current software operation that will move, and the operational order of constructing and send this software operation correspondence is to described software object program module.
6. according to claim 4 or 5 described systems, it is characterized in that this system is based on Windows or Unix or Linux platform.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CNB2005101171499A CN100370434C (en) | 2005-11-01 | 2005-11-01 | Method and system for realizing software automatic test |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CNB2005101171499A CN100370434C (en) | 2005-11-01 | 2005-11-01 | Method and system for realizing software automatic test |
Publications (2)
Publication Number | Publication Date |
---|---|
CN1851666A CN1851666A (en) | 2006-10-25 |
CN100370434C true CN100370434C (en) | 2008-02-20 |
Family
ID=37133145
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CNB2005101171499A Expired - Fee Related CN100370434C (en) | 2005-11-01 | 2005-11-01 | Method and system for realizing software automatic test |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN100370434C (en) |
Cited By (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US8677324B2 (en) | 2011-01-31 | 2014-03-18 | Hewlett-Packard Development Company, L.P. | Evaluating performance of an application using event-driven transactions |
Families Citing this family (16)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN100437513C (en) * | 2006-12-18 | 2008-11-26 | 华为技术有限公司 | Method and system for implementing automatic testing |
CN101266570B (en) * | 2007-03-15 | 2011-05-11 | 中兴通讯股份有限公司 | Software system test method and apparatus |
CN101174237B (en) * | 2007-11-28 | 2011-04-13 | 华为技术有限公司 | Automatic test method, system and test device |
CN101727384B (en) * | 2008-10-16 | 2012-02-01 | 致伸科技股份有限公司 | Control method for automatically testing application software |
CN102053911A (en) * | 2010-12-30 | 2011-05-11 | 东莞宇龙通信科技有限公司 | Android-based automated testing method, system and mobile terminal |
CN102073590B (en) * | 2011-01-11 | 2013-08-21 | 百度在线网络技术(北京)有限公司 | Event simulation-based user interface test method and device |
CN102546150A (en) * | 2012-02-07 | 2012-07-04 | 中国科学院软件研究所 | Cryptographic-equipment-oriented energy leakage acquisition method and system |
CN103309802A (en) * | 2012-03-16 | 2013-09-18 | 百度在线网络技术(北京)有限公司 | Method and device for testing system stability in mobile terminal |
CN104216826A (en) * | 2013-06-05 | 2014-12-17 | 腾讯科技(深圳)有限公司 | Test method and device |
CN104794050B (en) * | 2014-01-21 | 2018-09-18 | 腾讯科技(深圳)有限公司 | The test method of application program, apparatus and system |
CN111314538A (en) * | 2015-07-14 | 2020-06-19 | 苹果公司 | Mobile phone and instrument control method and system using same |
CN106021004B (en) * | 2016-05-10 | 2019-09-17 | 深圳市泰衡诺科技有限公司 | Customer behavior modeling unit, test macro and test method |
CN108009079A (en) * | 2016-10-27 | 2018-05-08 | 株式会社理光 | The method and apparatus of test cell source code and function source code |
CN107797926B (en) * | 2017-10-19 | 2021-07-20 | 郑州云海信息技术有限公司 | A system and method for realizing linux application test automation |
CN111078550A (en) * | 2019-12-09 | 2020-04-28 | 深圳市网心科技有限公司 | Software testing method and device, computer device and storage medium |
CN113923442A (en) * | 2021-09-24 | 2022-01-11 | 湖北三赢兴光电科技股份有限公司 | Universal software testing method and system for camera module |
Citations (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN1357981A (en) * | 2000-12-04 | 2002-07-10 | 深圳黎明电脑网络有限公司 | Method of testing several kinds of application protocol |
CN1499374A (en) * | 2002-11-04 | 2004-05-26 | 华为技术有限公司 | Automatic approach for unit testing |
CN1529466A (en) * | 2003-09-29 | 2004-09-15 | 港湾网络有限公司 | Network device automatic measuring method |
US20050160322A1 (en) * | 2004-01-13 | 2005-07-21 | West John R. | Method and system for conversion of automation test scripts into abstract test case representation with persistence |
CN1677362A (en) * | 2004-03-29 | 2005-10-05 | 华为技术有限公司 | Test executer |
-
2005
- 2005-11-01 CN CNB2005101171499A patent/CN100370434C/en not_active Expired - Fee Related
Patent Citations (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN1357981A (en) * | 2000-12-04 | 2002-07-10 | 深圳黎明电脑网络有限公司 | Method of testing several kinds of application protocol |
CN1499374A (en) * | 2002-11-04 | 2004-05-26 | 华为技术有限公司 | Automatic approach for unit testing |
CN1529466A (en) * | 2003-09-29 | 2004-09-15 | 港湾网络有限公司 | Network device automatic measuring method |
US20050160322A1 (en) * | 2004-01-13 | 2005-07-21 | West John R. | Method and system for conversion of automation test scripts into abstract test case representation with persistence |
CN1677362A (en) * | 2004-03-29 | 2005-10-05 | 华为技术有限公司 | Test executer |
Non-Patent Citations (1)
Title |
---|
基于ActiveX Scripting 技术的测试软件开发. 冷小羽,张健.计算机工程与设计,第26卷第2期. 2005 * |
Cited By (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US8677324B2 (en) | 2011-01-31 | 2014-03-18 | Hewlett-Packard Development Company, L.P. | Evaluating performance of an application using event-driven transactions |
Also Published As
Publication number | Publication date |
---|---|
CN1851666A (en) | 2006-10-25 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN100370434C (en) | Method and system for realizing software automatic test | |
KR101019228B1 (en) | Systems and methods for developing and deploying sensor and actuator applications through a distributed computing infrastructure | |
CN101311903A (en) | Method and device for reusing component of software system based on component | |
CN103020529A (en) | Software vulnerability analytical method based on scene model | |
CN101183335A (en) | Method and system for realizing embedded software unconventionality testing | |
CA2607537A1 (en) | Software engineering system and method for self-adaptive dynamic software components | |
CN105224869A (en) | Assembly test method and device | |
CN117289841B (en) | Interaction method and device based on large language model, storage medium and electronic equipment | |
CN111026660A (en) | Penetration testing method based on expert system knowledge base | |
CN109597952B (en) | Webpage information processing method, system, electronic equipment and storage medium | |
CN114579091A (en) | Robot process automation system and method across operating systems | |
CN116527514A (en) | A method, device, equipment and medium for building an endogenous security cloud service scene | |
US20030046660A1 (en) | Computer program for generating another computer program based on STM | |
CN113703808B (en) | Modularized gray level distribution method, device, equipment and storage medium | |
CN102073590A (en) | Event simulation-based user interface test method and device | |
CN102246227A (en) | Method and system for generating vocal user interface code from a data meta-model | |
CN114115884B (en) | Method and related device for managing programming service | |
KR101822093B1 (en) | Device and method for building cloud system | |
US20030217352A1 (en) | Script processing apparatus, script processing method, and script processing program | |
GB2400211A (en) | A method of creating software that is portable across different operating systems | |
CN111158667A (en) | Code injection method and device, electronic equipment and storage medium | |
Moore et al. | Issues in user interface migration | |
US20060198501A1 (en) | Method and device for constructing a voice dialog | |
JP4702835B2 (en) | Web service customization system | |
Chacón et al. | Rapid application development using agent itinerary patterns |
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 | ||
TR01 | Transfer of patent right |
Effective date of registration: 20170922 Address after: 274600 Shandong city of Heze province Juancheng County Guquan Street office Liu Yuan Xing Zheng Cun Liu Village No. 027 Patentee after: Zhao Huiping Address before: 518129 Bantian HUAWEI headquarters office building, Longgang District, Guangdong, Shenzhen Patentee before: Huawei Technologies Co., Ltd. |
|
TR01 | Transfer of patent right | ||
CF01 | Termination of patent right due to non-payment of annual fee |
Granted publication date: 20080220 Termination date: 20171101 |
|
CF01 | Termination of patent right due to non-payment of annual fee |