CN101604290B - Background module test method and backstage module test system - Google Patents
Background module test method and backstage module test system Download PDFInfo
- Publication number
- CN101604290B CN101604290B CN2009101075771A CN200910107577A CN101604290B CN 101604290 B CN101604290 B CN 101604290B CN 2009101075771 A CN2009101075771 A CN 2009101075771A CN 200910107577 A CN200910107577 A CN 200910107577A CN 101604290 B CN101604290 B CN 101604290B
- Authority
- CN
- China
- Prior art keywords
- test
- script
- module
- file
- output 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
Images
Landscapes
- Debugging And Monitoring (AREA)
Abstract
The invention relates to system test technology. Aiming at defects of poor expansibility, complicated operation, low efficiency, and the like of the prior background program test method, the invention provides a background module test method and a background module test system. The backstage module test method comprises the following steps: receiving input module identification, and reading a test file packet corresponding to the module identification, wherein the test file packet comprises a test script, a comparison script, a test template and a standard output file; executing the test script so as to call a background module corresponding to the module identification to execute the test template and output a test output file; and executing the comparison script, comparing the test output file with the standard output file, and outputting a comparison result. A background program test proposal with a basic configuration table and a script of the background module test system has the advantage of excellent expansibility. When an object to be tested changes, the basic configuration table and the script are only needed to be modified slightly, and a main body of the test proposal is not needed to be modified.
Description
Technical field
The present invention relates to the system testing technology, more particularly, relate to a kind of background module method of testing and background module test macro.
Background technology
The numerous foregrounds software that possesses interactive interface generally all can adopt to record with the automated test tool of playback principle based on seizure and test.Comparatively speaking, owing to do not possess interactive interface, background program can't be caught and recorded, so its test process relative complex is a lot.For example, need be the independent design test instrument of each functional module (hereinafter referred is a background module) of background program, and when the operation platform of this background module changed, needing be its design test instrument again.Same, after the edition upgrading of this background module, also needing is its design test instrument again.Therefore, often extendability is poor to the existing method of testing of background program, complex operation, and efficient is not high.
Therefore, need a kind of background program testing scheme, can effectively overcome the above-mentioned defective that exists in the prior art.
Summary of the invention
The technical matters that the present invention will solve is,, complex operation poor to existing background program method of testing extendability and the not high defective of efficient provide a kind of background module method of testing and background module test macro.
The technical solution adopted for the present invention to solve the technical problems is:
Construct a kind of background module method of testing, comprising:
Read step comprises the module id that receives input, reads the corresponding test file bag of this module id, wherein, comprises test script, comparison script, test template and standard output file in this test file bag;
Execution in step comprises the execution test script, identifies pairing background module with calling module and carries out test template, output test output file;
Comparison step comprises and carries out relatively script, will test output file and standard output file compares, and exports comparative result.
In background module method of testing provided by the invention, also comprise the basic configuration table in the said test file bag, wherein record input file catalogue and output file catalogue;
Said read step comprises that also test script, comparison script, test template and the standard output file that comprises in the extraction test file bag also stores under the input file catalogue;
Said execution in step also comprises, said test output file is stored under the output file catalogue.
In background module method of testing provided by the invention, also comprise the environmental preparation script in the said test file bag;
Said execution in step comprises that also before carrying out test script, execution environment is prepared script, to carry out environmental preparation.
In background module method of testing provided by the invention, also comprise the environment recovery script in the said test file bag;
Said execution in step comprises that also after carrying out test script, execution environment recovers script, to carry out environment recovery.
In background module method of testing provided by the invention, also record the stand-by period in the said basic configuration table;
Said execution in step also comprises, after executing said test script, more said test output file is stored under the said output file catalogue later in the stand-by period.
The present invention also provides a kind of background module test macro, comprising:
Read module is used to receive the module id of input, reads the corresponding test file bag of this module id, wherein, comprises test script, comparison script, test template and standard output file in this test file bag;
Execution module is used to carry out test script, identifies pairing background module with calling module and carries out test template, output test output file;
Comparison module is used for carrying out relatively script, will test output file and standard output file compares, and exports comparative result.
In background module test macro provided by the invention, also comprise the basic configuration table in the said test file bag, wherein record input file catalogue and output file catalogue;
Said read module also is used for, and test script, comparison script, test template and the standard output file that comprises in the extraction test file bag also stores under the input file catalogue;
Said execution module also is used for, and will test output file and store under the output file catalogue.
In background module test macro provided by the invention, also comprise the environmental preparation script in the said test file bag;
Said execution module also is used for, and before carrying out test script, execution environment is prepared script, to carry out environmental preparation.
In background module test macro provided by the invention, also comprise the environment recovery script in the said test file bag;
Said execution module also is used for, and after carrying out test script, execution environment recovers script, to carry out environment recovery.
In background module test macro provided by the invention, also record the stand-by period in the said basic configuration table;
Said execution module also comprises, after executing said test script, more said test output file is stored under the said output file catalogue later in the stand-by period.
The technical scheme of embodiment of the present invention; Have following beneficial effect: the background program testing scheme of basic configuration table+script possesses good extendability, when tested object changes, only need do few modifications to basic configuration table and script; And need not the testing scheme main body is made amendment; Therefore background test scheme range of application provided by the invention is wider, and efficient is higher, and is simple to operate.
Description of drawings
To combine accompanying drawing and embodiment that the present invention is described further below, in the accompanying drawing:
Fig. 1 is the process flow diagram according to the background module method of testing of the present invention's one preferred embodiment;
Fig. 2 is the structural representation according to the background module test macro of the present invention's one preferred embodiment.
Embodiment
In order to make the object of the invention, technical scheme and advantage clearer,, the present invention is further elaborated below in conjunction with accompanying drawing and embodiment.Should be appreciated that specific embodiment described herein only in order to explanation the present invention, and be not used in qualification the present invention.
The invention provides the good background module testing scheme of a kind of extendability, just combine accompanying drawing and specific embodiment to be described in greater detail below.
Fig. 1 is the process flow diagram according to the background module method of testing 100 of the present invention's one preferred embodiment.As shown in Figure 1, method 100 starts from step 102.
Subsequently, at next step 104, receive the module id of input.In concrete implementation procedure, can import a plurality of module ids simultaneously, to realize batch testing.
Subsequently,, read the corresponding test file bag of module id of input, wherein, comprise test script, comparison script, test template and standard output file in this test file bag at next step 106.In addition, as optional, also can comprise basic configuration table, environmental preparation script, environment recovery script or the like in the test file bag.Wherein, record such as but not limited to parameters such as input file catalogue, output file catalogue and stand-by period in the basic configuration table.
In concrete implementation procedure, if comprise the basic configuration table in the test file bag, then step 106 also comprises, with the test script that comprises in the test file bag, comparison script, test template and standard output file and store under the input file catalogue.As optional, if also comprise environmental preparation script and environment recovery script in the test file bag, then in step 106, this environmental preparation script and environment recovery script also will store under the input file catalogue.
Subsequently,, carry out test script, identify pairing background module with calling module and carry out test template, output test output file at next step 108.
In concrete application process, this background module can be the charge system of telecom operators for example, and this test template can be such as but not limited to one section ticket, and the test output file is the result of this charge system to this section ticket.
In concrete implementation procedure, if comprise the basic configuration table in the test file bag, then also be included in the step 108 and execute after the said test script, after the stand-by period, said test output file is stored under the said output file catalogue.Wherein, waiting time helps test script to obtain complete execution.
As optional, if comprise the environmental preparation script in the test file bag, then also be included in the step 108 and carry out before the test script, execution environment is prepared script, to carry out environmental preparation.
As optional, if comprise the environment recovery script in the test file bag, then also be included in the step 108 and carry out after the test script, execution environment recovers script, to carry out environment recovery.
Subsequently, at next step 110, execution comparison script will be tested output file and standard output file compares, the output comparative result.Standard output file is the correct output result who exports when carrying out test template under the normal condition, and therefore if the test output file is consistent with standard output file, then explanation is tested successfully, otherwise the explanation test crash.
As optional, also can be after relatively script executing to be accomplished, the record comparative result generates test log, the historical test case of adding up this background module, and relevant information mail to predefined E-mail address.
At last, method 100 ends at step 112.
The present invention also provides a kind of background module test macro, just combines Fig. 2 to be described in greater detail below.
Fig. 2 is the structural representation according to the background module test macro 200 of the present invention's one preferred embodiment.As shown in Figure 2, background module test macro 200 comprises read module 202, execution module 204 and comparison module 206.
Read module 202 is used to receive the module id of input, reads the corresponding test file bag of module id of input.As indicated above, in concrete implementation procedure, the module id of input can be a plurality of, to realize batch testing.
As indicated above, comprise test script, comparison script, test template and standard output file in this test file bag.In addition, as optional, also can comprise basic configuration table, environmental preparation script, environment recovery script or the like in the test file bag.Wherein, record such as but not limited to parameters such as input file catalogue, output file catalogue and stand-by period in the basic configuration table.
As indicated above; In concrete implementation procedure; If comprise the basic configuration table in the test file bag, then read module 202 also is used for test script, comparison script, test template and the standard output file that the test file bag is comprised and stores under the input file catalogue.As optional, if also comprise environmental preparation script and environment recovery script in the test file bag, then read module 202 also is used for this environmental preparation script and environment recovery script are also stored under the input file catalogue.
In concrete implementation procedure, if comprise the basic configuration table in the test file bag, then execution module 204 also is used for after executing said test script, after the stand-by period, said test output file is stored under the said output file catalogue.Wherein, waiting time helps test script to obtain complete execution.
As optional, if comprise the environmental preparation script in the test file bag, then execution module 204 also was used for before carrying out test script, and execution environment is prepared script, to carry out environmental preparation.
As optional, if comprise the environment recovery script in the test file bag, then execution module 204 also is used for after carrying out test script, and execution environment recovers script, to carry out environment recovery.
As optional, comparison module 206 also is used in the comparison script executing accomplish after, the record comparative result generates test log, the historical test case of adding up this background module, and relevant information mail to predefined E-mail address.
The above is merely preferred embodiment of the present invention, not in order to restriction the present invention, all any modifications of within spirit of the present invention and principle, being done, is equal to and replaces and improvement etc., all should be included within protection scope of the present invention.
Claims (10)
1. a background module method of testing is characterized in that, comprising:
Read step comprises the module id that receives input, reads the corresponding test file bag of this module id, wherein, comprises test script, comparison script, test template and standard output file in this test file bag;
Execution in step comprises the execution test script, identifies pairing background module with calling module and carries out test template, output test output file;
Comparison step comprises and carries out relatively script, will test output file and standard output file compares, and exports comparative result.
2. background module method of testing according to claim 1 is characterized in that, also comprises the basic configuration table in the said test file bag, wherein records input file catalogue and output file catalogue;
Said read step comprises that also test script, comparison script, test template and the standard output file that comprises in the extraction test file bag also stores under the input file catalogue;
Said execution in step also comprises, said test output file is stored under the output file catalogue.
3. background module method of testing according to claim 2 is characterized in that, also comprises the environmental preparation script in the said test file bag;
Said execution in step comprises that also before carrying out test script, execution environment is prepared script, to carry out environmental preparation.
4. according to claim 2 or 3 described background module method of testings, it is characterized in that, also comprise the environment recovery script in the said test file bag;
Said execution in step comprises that also after carrying out test script, execution environment recovers script, to carry out environment recovery.
5. background module method of testing according to claim 2 is characterized in that, also records the stand-by period in the said basic configuration table;
Said execution in step also comprises, after executing said test script, more said test output file is stored under the said output file catalogue later in the stand-by period.
6. a background module test macro is characterized in that, comprising:
Read module is used to receive the module id of input, reads the corresponding test file bag of this module id, wherein, comprises test script, comparison script, test template and standard output file in this test file bag;
Execution module is used to carry out test script, identifies pairing background module with calling module and carries out test template, output test output file;
Comparison module is used for carrying out relatively script, will test output file and standard output file compares, and exports comparative result.
7. background module test macro according to claim 6 is characterized in that, also comprises the basic configuration table in the said test file bag, wherein records input file catalogue and output file catalogue;
Said read module also is used for, and test script, comparison script, test template and the standard output file that comprises in the extraction test file bag also stores under the input file catalogue;
Said execution module also is used for, and will test output file and store under the output file catalogue.
8. background module test macro according to claim 7 is characterized in that, also comprises the environmental preparation script in the said test file bag;
Said execution module also is used for, and before carrying out test script, execution environment is prepared script, to carry out environmental preparation.
9. according to claim 7 or 8 described background module test macros, it is characterized in that, also comprise the environment recovery script in the said test file bag;
Said execution module also is used for, and after carrying out test script, execution environment recovers script, to carry out environment recovery.
10. background module test macro according to claim 7 is characterized in that, also records the stand-by period in the said basic configuration table;
Said execution module also comprises, after executing said test script, more said test output file is stored under the said output file catalogue later in the stand-by period.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN2009101075771A CN101604290B (en) | 2009-06-05 | 2009-06-05 | Background module test method and backstage module test system |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN2009101075771A CN101604290B (en) | 2009-06-05 | 2009-06-05 | Background module test method and backstage module test system |
Publications (2)
Publication Number | Publication Date |
---|---|
CN101604290A CN101604290A (en) | 2009-12-16 |
CN101604290B true CN101604290B (en) | 2012-05-16 |
Family
ID=41470028
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN2009101075771A Active CN101604290B (en) | 2009-06-05 | 2009-06-05 | Background module test method and backstage module test system |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN101604290B (en) |
Families Citing this family (7)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN102158890B (en) * | 2011-02-16 | 2015-06-03 | 中国联合网络通信集团有限公司 | Methods, equipment and systems for sending and receiving test data |
CN103577168A (en) * | 2012-07-27 | 2014-02-12 | 鸿富锦精密工业(深圳)有限公司 | Test case creation system and method |
JP5991695B2 (en) * | 2013-12-06 | 2016-09-14 | インターナショナル・ビジネス・マシーンズ・コーポレーションInternational Business Machines Corporation | Method for detecting an effect caused by changing a source code of an application from which a document object model tree and a cascading style sheet can be retrieved, and a computer for detecting the effect and the computer ·program |
WO2015096661A1 (en) * | 2013-12-26 | 2015-07-02 | 北京奇虎科技有限公司 | Project creation method and device based on configuration system, project test method and device, and background test method and device for configuration system |
CN103714002B (en) * | 2013-12-26 | 2017-04-19 | 北京奇虎科技有限公司 | Project testing method and device based on configuration system |
TWI510918B (en) * | 2014-02-20 | 2015-12-01 | Wistron Corp | Method and system for quick testing and detectiing mobile devices |
CN111581100B (en) * | 2020-05-11 | 2023-05-30 | 北京首汽智行科技有限公司 | Background management system testing method |
Citations (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN1527509A (en) * | 2003-03-06 | 2004-09-08 | 华为技术有限公司 | Test method |
CN1549119A (en) * | 2003-05-07 | 2004-11-24 | 华为技术有限公司 | Logic emulation testing system and method |
CN1932776A (en) * | 2006-09-29 | 2007-03-21 | 上海科泰世纪科技有限公司 | Automatic operating method for interface test in embedded operating system |
CN101046763A (en) * | 2006-03-29 | 2007-10-03 | 盛趣信息技术(上海)有限公司 | Implementing method of automatic test system based on scenario |
CN101398778A (en) * | 2007-09-29 | 2009-04-01 | 中兴通讯股份有限公司 | Automatic integration test method |
-
2009
- 2009-06-05 CN CN2009101075771A patent/CN101604290B/en active Active
Patent Citations (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN1527509A (en) * | 2003-03-06 | 2004-09-08 | 华为技术有限公司 | Test method |
CN1549119A (en) * | 2003-05-07 | 2004-11-24 | 华为技术有限公司 | Logic emulation testing system and method |
CN101046763A (en) * | 2006-03-29 | 2007-10-03 | 盛趣信息技术(上海)有限公司 | Implementing method of automatic test system based on scenario |
CN1932776A (en) * | 2006-09-29 | 2007-03-21 | 上海科泰世纪科技有限公司 | Automatic operating method for interface test in embedded operating system |
CN101398778A (en) * | 2007-09-29 | 2009-04-01 | 中兴通讯股份有限公司 | Automatic integration test method |
Also Published As
Publication number | Publication date |
---|---|
CN101604290A (en) | 2009-12-16 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN101604290B (en) | Background module test method and backstage module test system | |
CN105095062B (en) | Applied program testing method and system | |
CN102831188A (en) | Promoting message setting method and terminal | |
CN100426291C (en) | System and method to realize database upgrading in background management system | |
CN102331967A (en) | Method for managing chip verification test cases | |
CN102831052A (en) | Automatic generating device and method for test case | |
CN106598871A (en) | Automatic analysis method and system for collapse file under Linux | |
CN106294222A (en) | A kind of method and device determining PCIE device and slot corresponding relation | |
CN102567193A (en) | Method and system for converting test case to automated testing script | |
US20110035179A1 (en) | System and method for testing electronic device | |
CN101303708B (en) | Method and apparatus for encoding code for multiplexing chip pins | |
CN102982217B (en) | The treating method and apparatus of silk-screen | |
CN116204438A (en) | Test case generation method, automatic test method and related device | |
CN101145984B (en) | Automatic testing method based on self-adapted parameters | |
CN102486748A (en) | Method and device for performance test | |
CN103913672B (en) | A kind of satellite low frequency interface automatization test system | |
CN114443466A (en) | Method for converting executable script by using case file, terminal equipment and storage medium | |
WO2016165461A1 (en) | Automated testing method and apparatus for network management system software of telecommunications network | |
CN101510172B (en) | Test system and method | |
CN108984757A (en) | A kind of data lead-in method and equipment | |
CN101141767A (en) | Network management platform testing system and method | |
CN102209149B (en) | Wireless communication equipment and information clearing method | |
CN103294837A (en) | Method and system for verifying and debugging integrated circuit | |
CN102469450A (en) | Method and device for recognizing virus characteristics of mobile phone | |
CN113704123B (en) | Interface testing method, device, equipment and 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 | ||
CP03 | Change of name, title or address | ||
CP03 | Change of name, title or address |
Address after: 518048 Guangdong province Futian District Shenzhen City Binhe Road, No. 9023, building 11, 41 layers of the country through the Patentee after: Medium shift information technology Co., Ltd. Address before: 518048 Futian District Binhe Road, Shenzhen, Guangdong Province, ten building, Xinzhou mansion, Xinzhou Patentee before: China Mobile (Shenzhen) Co., Ltd. |