[go: up one dir, main page]
More Web Proxy on the site http://driver.im/

CN103500141A - Automated testing method and device - Google Patents

Automated testing method and device Download PDF

Info

Publication number
CN103500141A
CN103500141A CN201310467644.7A CN201310467644A CN103500141A CN 103500141 A CN103500141 A CN 103500141A CN 201310467644 A CN201310467644 A CN 201310467644A CN 103500141 A CN103500141 A CN 103500141A
Authority
CN
China
Prior art keywords
script
test
type
testing
test script
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
Application number
CN201310467644.7A
Other languages
Chinese (zh)
Inventor
郭强
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
China United Network Communications Group Co Ltd
Original Assignee
China United Network Communications Group Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by China United Network Communications Group Co Ltd filed Critical China United Network Communications Group Co Ltd
Priority to CN201310467644.7A priority Critical patent/CN103500141A/en
Publication of CN103500141A publication Critical patent/CN103500141A/en
Pending legal-status Critical Current

Links

Images

Landscapes

  • Debugging And Monitoring (AREA)

Abstract

The invention provides an automated testing method and device. The method comprises the steps of receiving a first testing script input by a testing person, compiling the first testing script into a second testing script of the binary system byte-code format, and executing the second testing script to conduct an automated test, wherein the first testing script is generated according to a script language. According to the automated testing method and device, due to the fact that the first testing script generated according to the script language is compiled into the second testing script of the binary system byte-code format which can be executed by any testing tool, the testing person just needs to master the one script language, the automated test can be carried out by adopting any testing tool, and therefore the learning cost and the time cost are reduced.

Description

Automated testing method and device
Technical field
The present invention relates to technical field of measurement and test, relate in particular to a kind of automated testing method and device.
Background technology
At present, along with the development of automatic technology, automatic test is widely applied.Due to the applicable operating system difference of different testing tools, therefore, for meeting the demand of automatic test under different operating system, the developer develops automatic test script with various testing tool.
When the tester carries out automatic test under different operating system, even for same test scene, the test script language difference of supporting due to different testing tools, so the tester need grasp the test script language of various different testing tools, increased learning cost and time cost.
Summary of the invention
The invention provides a kind of automated testing method and device, in order to solve under the same test scene existed in prior art, the tester need grasp the test script language of various different testing tools, has increased the problem of learning cost and time cost.
The invention provides a kind of automated testing method, comprising:
Receive the first test script of tester's input, described the first test script generates according to script;
Described the first test script is compiled as to the second test script of scale-of-two byte code form;
Carry out described the second test script and carry out automatic test.
The invention provides a kind of automatic test device, comprising:
Receiver module, for receiving the first test script of tester's input, described the first test script generates according to script;
Collector, for being compiled as described the first test script the second test script of scale-of-two byte code form;
Execution module, carry out automatic test for carrying out described the second test script.
Automated testing method provided by the invention and device, be compiled as all the second test scripts of executable scale-of-two byte code form of any testing tool by first test script that will generate according to script, make the tester only need grasp a kind of script, can realize adopting any testing tool to carry out automatic test, reduce learning cost and time cost.
The accompanying drawing explanation
The schematic flow sheet that Fig. 1 is an embodiment of automated testing method provided by the invention;
The schematic flow sheet that Fig. 2 is another embodiment of automated testing method provided by the invention;
The structural representation that Fig. 3 is an embodiment of automatic test device provided by the invention.
Embodiment
Below by specific embodiment and accompanying drawing, technical scheme of the present invention is described in further detail.
The schematic flow sheet that Fig. 1 is an embodiment of automated testing method provided by the invention.As shown in Figure 1, in following methods embodiment, the executive agent of each step is specifically as follows various automated test tools.The method specifically can comprise:
S101, receive the first test script that the tester inputs, and the first test script generates according to script.
Concrete, the tester can adopt a kind of script of oneself being familiar with, and such as JavaScript, VBScript or Shell etc., generate the first test script.
S102, be compiled as the first test script the second test script of scale-of-two byte code form.
Concrete, first test script that will generate according to script is compiled as the second test script of the scale-of-two byte code form that can carry out for any testing tool.
S103, carry out the second test script and carry out automatic test.
The automated testing method that the present embodiment provides, be compiled as all the second test scripts of executable scale-of-two byte code form of any testing tool by first test script that will generate according to script, make the tester only need grasp a kind of script, can realize adopting any testing tool to carry out automatic test, reduce learning cost and time cost.
The schematic flow sheet that Fig. 2 is another embodiment of automated testing method provided by the invention.As shown in Figure 2, in following methods embodiment, the executive agent of each step is specifically as follows various automated test tools.The method specifically can comprise:
S201, receive the first test script that the tester inputs, and the first test script generates according to script.
Concrete, the tester can adopt a kind of script of oneself being familiar with, and such as JavaScript, VBScript or Shell etc., generate the first test script.
S202, save as script file by the first test script.
S203, according to the type of script file, determine the type of script.
Concrete, the type of script file can be determined according to the filename suffix of script file, the script file that for example the filename suffix is .vbs, and its type is the vbs file.Further, can determine the type of script according to the type of script file, for example the type of script file is the vbs file, can determine that the type of the script that generates the first test script is VBScript.
S204, according to the type of script, be compiled as the first test script the second test script of scale-of-two byte code form.
Concrete, according to the type of script, adopting corresponding Compilation Method, the first test script that script is generated is compiled as the second test script of the scale-of-two byte code form that can carry out for any testing tool.
S205, carry out the second test script and carry out automatic test.
The automated testing method that the present embodiment provides, be compiled as all the second test scripts of executable scale-of-two byte code form of any testing tool by first test script that will generate according to script, make the tester only need grasp a kind of script, can realize adopting any testing tool to carry out automatic test, reduce learning cost and time cost.
The structural representation that Fig. 3 is an embodiment of automatic test device provided by the invention.As shown in Figure 3, the automatic test device that the present embodiment provides, for carrying out the specific executive agent of above-mentioned automated testing method, specifically can be arranged in various automated test tools.This device specifically can comprise: receiver module 31, collector 32 and execution module 33, wherein:
Receiver module 31, for receiving the first test script of tester's input, the first test script generates according to script.
Concrete, receiver module 31 can provide an inputting interface for the tester, and the tester can adopt a kind of script of oneself being familiar with, such as JavaScript, VBScript or Shell etc., on inputting interface, editor generates the first test script.
Collector 32, for being compiled as the first test script the second test script of scale-of-two byte code form.
Concrete, collector 32 specifically can comprise a plurality of script compilers.Collector 32 adopts the script compiler corresponding with the first test script, and the first test script that script is generated is compiled as the second test script of the scale-of-two byte code form that can carry out for any testing tool.
Execution module 33, carry out automatic test for carrying out the second test script.
Further, collector 32 specifically can for:
The first test script is saved as to script file, according to the type of script file, determine the type of script;
According to the type of script, the first test script is compiled as to the second test script.
Further, collector 32 specifically can also for:
In the type according to script file, before determining the type of script, according to the filename suffix of script file, determine the type of script file.
Concrete, collector 32 saves as script file by the first test script, and the type of definite script file, specifically can determine according to the filename suffix of script file, and the script file that for example the filename suffix is .vbs, its type is the vbs file.
Further, collector 32 can be determined the type of script according to the type of script file, and for example the type of script file is the vbs file, can determine that the type of the script that generates the first test script is VBScript.According to the type of script, the script file of preservation is routed to corresponding script compiler, for example VBScript script compiler.After the script compiler receives the requirement for compiler of collector 32, the first test script that script is generated is compiled as the second test script of the scale-of-two byte code form that can carry out for any testing tool.
The automatic test device that the present embodiment provides, be compiled as all the second test scripts of executable scale-of-two byte code form of any testing tool by first test script that will generate according to script, make the tester only need grasp a kind of script, can realize adopting any testing tool to carry out automatic test, reduce learning cost and time cost.
Finally it should be noted that: above each embodiment, only in order to technical scheme of the present invention to be described, is not intended to limit; Although with reference to aforementioned each embodiment, the present invention is had been described in detail, those of ordinary skill in the art is to be understood that: its technical scheme that still can put down in writing aforementioned each embodiment is modified, or some or all of technical characterictic wherein is equal to replacement; And these modifications or replacement do not make the essence of appropriate technical solution break away from the scope of various embodiments of the present invention technical scheme.

Claims (6)

1. an automated testing method, is characterized in that, comprising:
Receive the first test script of tester's input, described the first test script generates according to script;
Described the first test script is compiled as to the second test script of scale-of-two byte code form;
Carry out described the second test script and carry out automatic test.
2. method according to claim 1, is characterized in that, described the second test script that described the first test script is compiled as to scale-of-two byte code form comprises:
Described the first test script is saved as to script file, according to the type of described script file, determine the type of described script;
According to the type of described script, described the first test script is compiled as to described the second test script.
3. method according to claim 2, is characterized in that, the described type according to described script file, before determining the type of described script, also comprises:
According to the filename suffix of described script file, determine the type of described script file.
4. an automatic test device, is characterized in that, comprising:
Receiver module, for receiving the first test script of tester's input, described the first test script generates according to script;
Collector, for being compiled as described the first test script the second test script of scale-of-two byte code form;
Execution module, carry out automatic test for carrying out described the second test script.
5. device according to claim 4, is characterized in that, described collector specifically for:
Described the first test script is saved as to script file, according to the type of described script file, determine the type of described script;
According to the type of described script, described the first test script is compiled as to described the second test script.
6. device according to claim 5, is characterized in that, described collector also for:
In the described type according to described script file, before determining the type of described script, according to the filename suffix of described script file, determine the type of described script file.
CN201310467644.7A 2013-10-09 2013-10-09 Automated testing method and device Pending CN103500141A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201310467644.7A CN103500141A (en) 2013-10-09 2013-10-09 Automated testing method and device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201310467644.7A CN103500141A (en) 2013-10-09 2013-10-09 Automated testing method and device

Publications (1)

Publication Number Publication Date
CN103500141A true CN103500141A (en) 2014-01-08

Family

ID=49865355

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201310467644.7A Pending CN103500141A (en) 2013-10-09 2013-10-09 Automated testing method and device

Country Status (1)

Country Link
CN (1) CN103500141A (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105446866A (en) * 2014-08-22 2016-03-30 全智科技股份有限公司 Cross-platform testing device
CN111552475A (en) * 2020-04-20 2020-08-18 武汉精测电子集团股份有限公司 Method and system for compiling Workload test file for aging test of semiconductor memory

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1983209A (en) * 2005-12-14 2007-06-20 中兴通讯股份有限公司 System and method for automatically testing software unit
CN101802792A (en) * 2007-09-14 2010-08-11 空中客车运营简易股份公司 Method for automatic script generation for testing the validity of operational software of a system onboard and aircraft and device for implementing the same
WO2011076972A1 (en) * 2009-12-21 2011-06-30 Nokia Corporation A method, apparatuses and a system for compilation
CN102426534A (en) * 2011-11-02 2012-04-25 大唐移动通信设备有限公司 Method and system for converting test script language into executable instruction

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1983209A (en) * 2005-12-14 2007-06-20 中兴通讯股份有限公司 System and method for automatically testing software unit
CN101802792A (en) * 2007-09-14 2010-08-11 空中客车运营简易股份公司 Method for automatic script generation for testing the validity of operational software of a system onboard and aircraft and device for implementing the same
WO2011076972A1 (en) * 2009-12-21 2011-06-30 Nokia Corporation A method, apparatuses and a system for compilation
CN102426534A (en) * 2011-11-02 2012-04-25 大唐移动通信设备有限公司 Method and system for converting test script language into executable instruction

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105446866A (en) * 2014-08-22 2016-03-30 全智科技股份有限公司 Cross-platform testing device
CN111552475A (en) * 2020-04-20 2020-08-18 武汉精测电子集团股份有限公司 Method and system for compiling Workload test file for aging test of semiconductor memory
CN111552475B (en) * 2020-04-20 2023-08-15 武汉精测电子集团股份有限公司 Method, method and system for compiling work load test file for aging test of semiconductor memory

Similar Documents

Publication Publication Date Title
CN106933609B (en) Android application program installation package generation method and device
CN104102574B (en) Applied program testing method and device
CN101976187B (en) Stack tracing method and device in decompilation process and decompiler
TWI256587B (en) Firmware upgrading method and system executing same
CN105446712B (en) Application program defect repairing method and device
CN111381817A (en) Method, device, medium and electronic equipment for realizing cross-platform multi-language development
CN103577324A (en) Static detection method for privacy information disclosure in mobile applications
CN108037941B (en) Based on the application program update method of public plug-in unit, electronic equipment, storage medium
CN103513966A (en) PHP developing framework based on assemblies
CN103077062A (en) Method and device for detecting code change
US10303468B2 (en) Real-time quality of service monitoring apparatus and method
CN104102581A (en) Method and device for implementing unit testing
CN102455941B (en) Multitask scheduling method and device based on normal form
CN103092747A (en) Controlling program verifying and testing method and system thereof
CN103744682A (en) System and method for separate compilation of heterogeneous mixed programs
CN103500141A (en) Automated testing method and device
CN104991810A (en) Method and processing system for automatically adding APK into Android system
CN103197947A (en) Script processing method and device
CN103927213B (en) A kind of file compiling method and compilation device
CN105279091A (en) According-to-requirement tracking method based on dynamic taint analysis and device thereof
KR20150124530A (en) Application build system, control method thereof, and recording medium for recording program for executing the control method
CN105786465A (en) Scripting language execution method and device
HK1154319A1 (en) A method and system for implementing automatic testing of embedded browser
CN103049300B (en) C and C++ code is in the method supporting the WEB platform of FLASH is run
CN104657267A (en) Elastic source code syntax tree resolving system and method

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
C10 Entry into substantive examination
SE01 Entry into force of request for substantive examination
RJ01 Rejection of invention patent application after publication

Application publication date: 20140108

RJ01 Rejection of invention patent application after publication