CN103631708A - Program testing method and program testing device - Google Patents
Program testing method and program testing device Download PDFInfo
- Publication number
- CN103631708A CN103631708A CN201210309302.8A CN201210309302A CN103631708A CN 103631708 A CN103631708 A CN 103631708A CN 201210309302 A CN201210309302 A CN 201210309302A CN 103631708 A CN103631708 A CN 103631708A
- Authority
- CN
- China
- Prior art keywords
- case
- file
- script
- configuration information
- program
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Pending
Links
Images
Abstract
The invention relates to a program testing method. The program testing method comprises the steps of loading a script configuration file; analyzing the script configuration file to obtain script configuration information; loading a use case configuration file according to the script configuration information; analyzing the use case configuration file to obtain use case configuration information; generating a use case file of a corresponding type according to the use case configuration information and a selected format; and setting up an execution environment for the use case file. According to the program testing method, the testing development work of various kinds of testing technology and testing scripts can be finished by simply writing parameters, the testing development technical requirement is lowered, and the reusable degree and the maintainability of the testing scripts in the testing development process are improved. In addition, the invention provides a program testing device.
Description
Technical field
The present invention relates to software test development field, relate in particular to a kind of program testing method and program test device.
Background technology
Existing test development work is generally first by test development personnel, according to the type of tested object, to investigate relevant automatization testing technique; After determining automatization testing technique, each test development personnel needs spended time to go to learn and grasps this technology; Finally, carry out Test Sample Design, and carry out writing of test case script according to the requirement of measuring technology.
In current test development work, writing of automatic test cases is a maximum and maximum job of cost consuming time.And, test development need of work has certain technical foundation, because only just relate to different tested object (as web front page layout, client application etc.), multiple measuring technology (as Selenium, WebDriver and PyWinAuto etc.), multiple test script (as Pyunit and Robot Framework) in the test development process under a kind of environment (as Python environment).
Various tested objects, measuring technology and test script all need test development personnel to spend plenty of time and energy to go to grasp above, and developer's technical merit has been proposed to higher requirement.Along with the expansion of test specification, the tested object relating to, measuring technology and test script also will constantly increase, the raising that the cost of test development also can be progressively.
Therefore, there are the following problems in current test development work:
1. the Compiling Technique of test script requires too high: when relating to new tested object or measuring technology and test script, each relevant test development personnel requires a great deal of time and carries out the study of a new round.
2. the reusability of test script is low: when having upgraded test platform, original test case script can only be discarded, and need to again write the test script file of newtype.As former, used before this pyunit script of Python platform to carry out automatic test, after being updated to Robot Framework, original pyunit script just can only be discarded, and again writes Robot test script, and this is a kind of waste of resource.
3. the maintainability of test script is low: because the personnel of the exploitation that takes one's test are more, there is no unified coding style, be difficult to test script read and safeguard.
Summary of the invention
In view of this, the invention provides a kind of program testing method and program test device that reduces test development technical requirement.
Above-mentioned program testing method and program test device are achieved through the following technical solutions:
A program testing method, comprising: loading scripts configuration file; This script configuration file is resolved and obtained script configuration information; According to this script configuration information, load use-case configuration file; Resolve this use-case configuration file and obtain use-case configuration information; According to this use-case configuration information and selected form, generate the use-case file of corresponding types; And the execution environment of building this use-case file.
A program test device, comprising: file load module, for loading scripts configuration file, and loads use-case configuration file according to script configuration information; Parsing module, for script configuration file is resolved and obtained script configuration information, and resolves and obtains use-case configuration information use-case configuration file; Use-case generation module, for generating the use-case file of corresponding types according to use-case configuration information and selected form; And environmental structure module, for building the execution environment of use-case file.
The present invention fills in the test development that can complete multiple measuring technology and test script by simple parameter and works, and has reduced test development technical requirement, has improved reusable degree in test development process and the maintainability of test script.
For above and other object of the present invention, feature and advantage can be become apparent, preferred embodiment cited below particularly, and coordinate appended graphicly, be described in detail below.
Accompanying drawing explanation
Fig. 1 is the process flow diagram of disclosed a kind of program testing method.
Fig. 2 is the schematic diagram of disclosed a kind of program test device.
Embodiment
For further setting forth the present invention, realize technological means and the effect that predetermined goal of the invention is taked, below in conjunction with accompanying drawing and preferred embodiment, to the program testing method proposing according to the present invention and embodiment, structure, feature and the effect thereof of program test device, be described in detail as follows.
The present invention is mainly to provide a kind of program testing method and program test device, fills in the test development that can complete multiple measuring technology and test script work by simple parameter.
The embodiment of program testing method
Fig. 1 is the process flow diagram of disclosed a kind of program testing method.As shown in Figure 1, program testing method of the present invention comprises:
Step 101: loading scripts configuration file;
Step 102: this script configuration file is resolved and obtained script configuration information;
Step 103: load use-case configuration file according to this script configuration information;
Step 104: resolve this use-case configuration file and obtain use-case configuration information;
Step 105: the use-case file that generates corresponding types according to this use-case configuration information and selected form;
Step 106: the execution environment of building this use-case file.
Particularly, in step 102, this script configuration file is resolved and is comprised:
This script configuration file is carried out to logic partitioning; And
For different piecemeals, calling corresponding logical block interpreter resolves one by one to information.
In step 104, this use-case configuration file is resolved and is comprised:
This use-case configuration file is carried out to logic partitioning; And
For different piecemeals, calling corresponding logical block interpreter resolves one by one to information.
While carrying out logic partitioning in step 102 and 104, be, according to the key word in configuration file, configuration file is divided into different logic partitionings.
In step 105, the use-case file that generates corresponding types according to this use-case configuration information and selected form comprises:
According to this selected form, load the template of corresponding format;
Intermediate variable in this use-case configuration information is exported to and in this template, obtains this use-case file.
In step 106, the execution environment of building this use-case file comprises:
Return to this use-case file of execution and carry out needed base library file.
Further, this program testing method also comprises:
Generate test script, for calling, carry out the use-case file generating.
The program testing method that the present embodiment provides can be from following 3 costs that reduce test developments:
1. reduce test development technical requirement: the present invention can encapsulate the technology relating in test development process and script type, the unified interface that uses being easily understood is externally provided, make writing of test script not need to learn accordingly.
2. improve the reusable degree in test development process: while utilizing the present invention to carry out writing of test case, only need at corresponding block, insert corresponding variable according to the form of logic partitioning can generate corresponding test case, avoids the waste of test script resource.The present invention also also externally provides the universal test logic encapsulation in test script, improves the extent for multiplexing of test logic.
3. improve the maintainability of test script: the present invention can generate the test script of consolidation form, improve the readable and maintainable of test script.
The embodiment of program test device
Fig. 2 is the schematic diagram of disclosed a kind of program test device.As shown in Figure 2, program test device of the present invention, comprising:
Use-case generation module 203, for generating the use-case file of corresponding types according to use-case configuration information and selected form; And
Particularly, described parsing module 202 is also for script configuration file is carried out to logic partitioning, and for different piecemeals, calls corresponding logical block resolver information is resolved one by one.
Described parsing module 202 is also for use-case configuration file is carried out to logic partitioning, and for different piecemeals, calls corresponding logical block interpreter information is resolved one by one.
Described use-case generation module 203 is also for load the template of corresponding format according to this selected form, and the intermediate variable in this use-case configuration information is exported to and in this template, obtains this use-case file.
Described environmental structure module 204 is also carried out needed base library file for returning to this use-case file of execution.
Described use-case generation module 203 is also for generating test script;
Further, described program test device also comprises:
Test execution administration module 205, carries out for calling the use-case file generating.
1. reduce test development technical requirement: the present invention can encapsulate the technology relating in test development process and script type, the unified interface that uses being easily understood is externally provided, make writing of test script not need to learn accordingly.
2. improve the reusable degree in test development process: while utilizing the present invention to carry out writing of test case, only need at corresponding block, insert corresponding parameter according to the form of logic partitioning can generate corresponding test case, avoids the waste of test script resource.The present invention also also externally provides the universal test logic encapsulation in test script, improves the extent for multiplexing of test logic.
3. improve the maintainability of test script: the present invention can generate the test script of consolidation form, improve the readable and maintainable of test script.
It should be noted that, the embodiment of the present invention also provides a kind of computer-readable recording medium, is stored with computer executable instructions, and above-mentioned computer-readable recording medium is for example for example CD, hard disk or flash memory of nonvolatile memory.
This computer executable instructions is used for making computing machine to carry out following operation: loading scripts configuration file; This script configuration file is resolved and obtained script configuration information; According to this script configuration information, load use-case configuration file; Resolve this use-case configuration file and obtain use-case configuration information; According to this use-case configuration information and selected form, generate the use-case file of corresponding types; And the execution environment of building this use-case file.
Further, this computer executable instructions also can be used for making computing machine to carry out following operation: this script configuration file is carried out to logic partitioning; And for different piecemeals, call corresponding logical block interpreter information is resolved one by one.
Further, this computer executable instructions also can be used for making computing machine to carry out following operation: this use-case configuration file is carried out to logic partitioning; And for different piecemeals, call corresponding logical block interpreter information is resolved one by one.
Further, this computer executable instructions also can be used for making computing machine carry out following operation: the template that loads corresponding format according to this selected form; Intermediate variable in this use-case configuration information is exported to and in this template, obtains this use-case file.
Further, this computer executable instructions also can be used for making computing machine to carry out following operation: return to this use-case file of execution and carry out needed base library file.
Further, this computer executable instructions also can be used for making computing machine to carry out following operation: generate test script, for calling, carry out the use-case file generating.
By above-mentioned instruction, the present invention fills in the test development that can complete multiple measuring technology and test script by simple parameter and works, reduce test development technical requirement, improved reusable degree in test development process and the maintainability of test script.
The above, it is only preferred embodiment of the present invention, not the present invention is done to any pro forma restriction, although the present invention discloses as above with preferred embodiment, yet not in order to limit the present invention, any those skilled in the art, do not departing within the scope of technical solution of the present invention, when can utilizing the technology contents of above-mentioned announcement to make a little change or being modified to the equivalent embodiment of equivalent variations, in every case be not depart from technical solution of the present invention content, any brief introduction of above embodiment being done according to technical spirit of the present invention is revised, equivalent variations and modification, all still belong in the scope of technical solution of the present invention.
Claims (12)
1. a program testing method, comprising:
Loading scripts configuration file;
This script configuration file is resolved and obtained script configuration information;
According to this script configuration information, load use-case configuration file;
Resolve this use-case configuration file and obtain use-case configuration information;
According to this use-case configuration information and selected form, generate the use-case file of corresponding types; And
Build the execution environment of this use-case file.
2. program testing method as claimed in claim 1, is characterized in that, this script configuration file is resolved and comprised:
This script configuration file is carried out to logic partitioning; And
For different piecemeals, calling corresponding logical block interpreter resolves one by one to information.
3. program testing method as claimed in claim 1, is characterized in that, this use-case configuration file is resolved and comprised:
This use-case configuration file is carried out to logic partitioning; And
For different piecemeals, calling corresponding logical block interpreter resolves one by one to information.
4. program testing method as claimed in claim 1, is characterized in that, the use-case file that generates corresponding types according to this use-case configuration information and selected form comprises:
According to this selected form, load the template of corresponding format;
Intermediate variable in this use-case configuration information is exported to and in this template, obtains this use-case file.
5. program testing method as claimed in claim 1, is characterized in that, the execution environment of building this use-case file comprises:
Return to this use-case file of execution and carry out needed base library file.
6. program testing method as claimed in claim 1, is characterized in that, also comprises:
Generate test script, for calling, carry out the use-case file generating.
7. a program test device, comprising:
File load module, for loading scripts configuration file, and loads use-case configuration file according to script configuration information;
Parsing module, for script configuration file is resolved and obtained script configuration information, and resolves and obtains use-case configuration information use-case configuration file;
Use-case generation module, for generating the use-case file of corresponding types according to use-case configuration information and selected form; And
Environmental structure module, for building the execution environment of use-case file.
8. program test device as claimed in claim 7, is characterized in that, described parsing module is also for script configuration file is carried out to logic partitioning, and for different piecemeals, calls corresponding logical block resolver information is resolved one by one.
9. program test device as claimed in claim 7, is characterized in that, described parsing module is also for use-case configuration file is carried out to logic partitioning, and for different piecemeals, calls corresponding logical block interpreter information is resolved one by one.
10. program test device as claimed in claim 7, it is characterized in that, described use-case generation module is also for load the template of corresponding format according to this selected form, and the intermediate variable in this use-case configuration information is exported to and in this template, obtains this use-case file.
11. program test devices as claimed in claim 7, is characterized in that, described environmental structure module is also carried out needed base library file for returning to this use-case file of execution.
12. program test devices as claimed in claim 7, is characterized in that, described use-case generation module is also for generating test script, and described program test device also comprises the test execution administration module of carrying out the use-case file generating for calling.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201210309302.8A CN103631708A (en) | 2012-08-28 | 2012-08-28 | Program testing method and program testing device |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201210309302.8A CN103631708A (en) | 2012-08-28 | 2012-08-28 | Program testing method and program testing device |
Publications (1)
Publication Number | Publication Date |
---|---|
CN103631708A true CN103631708A (en) | 2014-03-12 |
Family
ID=50212793
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201210309302.8A Pending CN103631708A (en) | 2012-08-28 | 2012-08-28 | Program testing method and program testing device |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN103631708A (en) |
Cited By (8)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN103970650A (en) * | 2014-04-09 | 2014-08-06 | 广州杰赛科技股份有限公司 | Distributed testing method and device |
CN104021080A (en) * | 2014-06-13 | 2014-09-03 | 中国民航信息网络股份有限公司 | Automatic testing system based on custom scripts |
CN104035872A (en) * | 2014-06-27 | 2014-09-10 | 浪潮(北京)电子信息产业有限公司 | Method and device for testing clustering software |
CN108153673A (en) * | 2017-12-25 | 2018-06-12 | 苏州赛源微电子有限公司 | application software testing system |
CN109255234A (en) * | 2018-08-15 | 2019-01-22 | 腾讯科技(深圳)有限公司 | Processing method, device, medium and the electronic equipment of machine learning model |
CN109299009A (en) * | 2018-09-25 | 2019-02-01 | 金蝶软件(中国)有限公司 | Data test method, apparatus, computer equipment and storage medium |
CN109542553A (en) * | 2018-10-26 | 2019-03-29 | 北京慧流科技有限公司 | The information extraction method and device and storage medium of user interface UI element |
CN109660427A (en) * | 2018-12-14 | 2019-04-19 | 福建星网智慧科技股份有限公司 | A kind of virtual terminal automated testing method of video conferencing system |
-
2012
- 2012-08-28 CN CN201210309302.8A patent/CN103631708A/en active Pending
Cited By (12)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN103970650A (en) * | 2014-04-09 | 2014-08-06 | 广州杰赛科技股份有限公司 | Distributed testing method and device |
CN103970650B (en) * | 2014-04-09 | 2017-02-15 | 广州杰赛科技股份有限公司 | Distributed testing method and device |
CN104021080A (en) * | 2014-06-13 | 2014-09-03 | 中国民航信息网络股份有限公司 | Automatic testing system based on custom scripts |
CN104021080B (en) * | 2014-06-13 | 2017-01-11 | 中国民航信息网络股份有限公司 | Automatic testing system based on custom scripts |
CN104035872A (en) * | 2014-06-27 | 2014-09-10 | 浪潮(北京)电子信息产业有限公司 | Method and device for testing clustering software |
CN104035872B (en) * | 2014-06-27 | 2017-01-11 | 浪潮(北京)电子信息产业有限公司 | Method and device for testing clustering software |
CN108153673A (en) * | 2017-12-25 | 2018-06-12 | 苏州赛源微电子有限公司 | application software testing system |
CN109255234A (en) * | 2018-08-15 | 2019-01-22 | 腾讯科技(深圳)有限公司 | Processing method, device, medium and the electronic equipment of machine learning model |
WO2020034800A1 (en) * | 2018-08-15 | 2020-02-20 | 腾讯科技(深圳)有限公司 | Machine learning model processing method and device, medium and electronic device |
CN109299009A (en) * | 2018-09-25 | 2019-02-01 | 金蝶软件(中国)有限公司 | Data test method, apparatus, computer equipment and storage medium |
CN109542553A (en) * | 2018-10-26 | 2019-03-29 | 北京慧流科技有限公司 | The information extraction method and device and storage medium of user interface UI element |
CN109660427A (en) * | 2018-12-14 | 2019-04-19 | 福建星网智慧科技股份有限公司 | A kind of virtual terminal automated testing method of video conferencing system |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN103631708A (en) | Program testing method and program testing device | |
CN103019928B (en) | A kind of automated testing method and system | |
CN103064403B (en) | A kind of ECU hardware-in-loop simulation automated testing method and system | |
CN103412820B (en) | The method of testing of the page in Web system and device | |
CN110673853B (en) | Compiling method, device and system | |
CN107045438B (en) | Application top view processing method, device and component | |
CN104854558A (en) | Systems, methods, and computer program products for a software build and load process using a compilation and deployment service | |
CN103309800B (en) | A kind of webpage automated testing method and system | |
CN102184101B (en) | Software application frame and development system thereof for smartphones | |
CN105159833A (en) | Automatic testing device and method | |
CN104317589A (en) | Automatic code generating method and automatic code generating device for loading dynamic link library | |
US10528688B1 (en) | System and method for schematic-driven generation of input/output models | |
CN103186463B (en) | Determine the method and system of the test specification of software | |
CN112214210A (en) | Logistics business rule engine and configuration method, device, equipment and storage medium thereof | |
CN110955410A (en) | Automatic code generation method, device, equipment and medium | |
CN103617120A (en) | Unit testing method and device | |
CN104133676A (en) | Function execution method and function execution device based on scripts | |
Bento | IoT of Nextion X TFT ILI9341: Experimental Results and Comparative Survey | |
CN111913889A (en) | Test system building method and test system | |
CN104850498A (en) | Filling information testing method and filling information testing system | |
CN108376066A (en) | Code processing apparatus and code process method | |
CN115757100A (en) | Automated testing framework facing user interface, method, equipment and medium | |
CN102375103A (en) | Electronic product test device and method | |
CN105630489B (en) | Data processing method and data processing equipment | |
CN113312046A (en) | Sub-application page processing method and device and computer equipment |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
PB01 | Publication | ||
PB01 | Publication | ||
C02 | Deemed withdrawal of patent application after publication (patent law 2001) | ||
WD01 | Invention patent application deemed withdrawn after publication |
Application publication date: 20140312 |