CN103064789A - Automated testing method by software control - Google Patents
Automated testing method by software control Download PDFInfo
- Publication number
- CN103064789A CN103064789A CN2013100119834A CN201310011983A CN103064789A CN 103064789 A CN103064789 A CN 103064789A CN 2013100119834 A CN2013100119834 A CN 2013100119834A CN 201310011983 A CN201310011983 A CN 201310011983A CN 103064789 A CN103064789 A CN 103064789A
- Authority
- CN
- China
- Prior art keywords
- control program
- control
- script
- communication facilities
- testing
- 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.)
- Granted
Links
- 238000012360 testing method Methods 0.000 title claims abstract description 59
- 238000004891 communication Methods 0.000 claims abstract description 39
- 238000013515 script Methods 0.000 claims abstract description 28
- 239000008186 active pharmaceutical agent Substances 0.000 claims description 12
- 229910052711 selenium Inorganic materials 0.000 claims description 5
- 239000011669 selenium Substances 0.000 claims description 5
- 230000013011 mating Effects 0.000 claims description 2
- 125000003748 selenium group Chemical group *[Se]* 0.000 claims 1
- 238000000034 method Methods 0.000 abstract description 4
- BUGBHKTXTAQXES-UHFFFAOYSA-N Selenium Chemical compound [Se] BUGBHKTXTAQXES-UHFFFAOYSA-N 0.000 description 4
- 230000006870 function Effects 0.000 description 3
- 230000009286 beneficial effect Effects 0.000 description 1
- 230000008878 coupling Effects 0.000 description 1
- 238000010168 coupling process Methods 0.000 description 1
- 238000005859 coupling reaction Methods 0.000 description 1
- 238000011161 development Methods 0.000 description 1
- 238000010586 diagram Methods 0.000 description 1
- 238000005516 engineering process Methods 0.000 description 1
- 239000012467 final product Substances 0.000 description 1
- 230000008676 import Effects 0.000 description 1
- 238000005259 measurement Methods 0.000 description 1
- 238000011017 operating method Methods 0.000 description 1
- 238000012545 processing Methods 0.000 description 1
- 238000010998 test method Methods 0.000 description 1
Images
Landscapes
- Debugging And Monitoring (AREA)
- Stored Programmes (AREA)
Abstract
The invention discloses an automated testing method by software control. The method includes the steps: S1, compiling a control program, wherein the control program enables a WEB interface operational tool to set communication equipment to a preset state through a WEB interface of the communication equipment and receive a setting result; S2, compiling a script for starting the control program compiled in the S1; S3, adding a testing instrument for testing a control API (application programming interface) in a preset state into the script, and after the control program compiled in the S1 is set successfully, enabling the control API to control the testing instrument for testing the communication equipment; and S4, recording a testing result into a log file. The automated testing method by software control in the technical scheme has the advantages that automated testing of the communication equipment set by the WEB interface is achieved, and testing contents and times can be user-defined.
Description
Technical field
The present invention relates to a kind of method of testing of communication facilities, relate in particular to a kind of automated testing method of software control.
Background technology
Along with the development of network, various communication facilitiess are used widely, and previous communication apparatus adopts order line to arrange, and is very inconvenient for the user, and the communication facilities that arranges with the WEB interface has appearred in the situation for inconvenience is set.The communication apparatus that the WEB interface arranges is easy to use, is subject to user's welcome, but because the WEB interface can't be connected with testing apparatus, therefore can't realize the automatic test of communication facilities, causes testing efficiency very low.
Summary of the invention
For the problems referred to above that communication facilities exists, now provide a kind of automatically automated testing method of the software control of test of communication facilities that the WEB interface arranges that is intended to realize.
Concrete technical scheme is as follows:
A kind of automated testing method of software control, be applied to the communication facilities that arranges by the WEB interface and with robotization control API(Application Programming Interface application programming interface) and with the testing tool of described communication facilities coupling, wherein, comprise the steps:
Step S1, write control program, described control program makes WEB interface operation instrument by the WEB interface of described communication facilities described communication facilities is arranged to a predetermined state, and receives the result is set;
Step S2, write the script that starts the control program of writing among the described step S1;
Step S3, in described script, add the control API that described testing tool is used for testing described predetermined state, make the control program of writing among the described step S1 arrange successfully after, described control API controls described testing tool described communication facilities is tested;
Step S4, test result is charged in the journal file.
Preferably, described WEB interface operation instrument is the web automated test tool of the large special Walker's of Selenium(ThoughtWorks company exploitation).
Preferably, the script of writing among the described step S2 is mainly by Tcl(Tool Command Language Tool Command Language) language compilation.
Preferably, the control program among the described step S1 is mainly by the JAVA language compilation.
Preferably, be that each duty of described communication facilities or the duty of predetermined number are all write the control program of a correspondence by described step S1, and all write the script of a correspondence by described step S2 and described step S3 for each control program, the storing path of all described scripts is deposited in the tabulation, and moved successively script in the described tabulation.
The beneficial effect of technique scheme is:
Realize the automatic test of the communication facilities that the WEB interface arranges, content measurement and number of times can customize.
Description of drawings
Fig. 1 is the steps flow chart block diagram of the automated testing method of a kind of software control of the present invention.
Embodiment
The invention will be further described below in conjunction with the drawings and specific embodiments, but not as limiting to the invention.
As shown in Figure 1, the automated testing method of a kind of software control of the present invention is applied to the communication facilities that arranges by the WEB interface and the testing tool of controlling API and mating with communication facilities with robotization, wherein, comprises the steps:
Step S1, write control program, control program makes WEB interface operation instrument by the WEB interface of communication facilities communication facilities is arranged to a predetermined state, and receives the result is set;
Step S2, write the script of the control program of writing among the setting up procedure S1;
Step S3, in script, add the control API that testing tool is used for the test predetermined state, make the control program of writing among the step S1 arrange successfully after, control API control testing tool is tested communication facilities;
Step S4, test result is charged in the journal file.
Wherein, WEB interface operation instrument can adopt Selenium, and Selenium is an instrument that is used for the web application test, can run directly in the browser, just as real user the operation.The browser of supporting comprises IE, Mozilla Firefox, Mozilla Suite etc.It has many interfaces simultaneously, can call for some programming languages, such as the control program among the step S1 of the present invention mainly by the JAVA language compilation, can in JAVA, import the jar file of Selenium corresponding function instruction, realization is to the Lookup protocol at WEB interface, and receive the result is set, judge whether success is set.Further, the script of writing among the step S2 can be mainly by the Tcl language compilation, and the Tcl language is the more excellent a kind of script of communication facilities automatic test, and a lot of communication class testing tools have all been reserved API to it.
When test, communication facilities to be tested can be connected in computing machine and testing tool in order to test, and the WEB that opens communication facilities to be tested by browser on computing machine arranges the interface, then that write among the operating procedure S2 and in step S3 further perfect script, with the control program of writing among the script startup step S1, make control program by WEB the interface is set communication facilities to be tested is arranged to predetermined state, and return the result is set, script receives to arrange and treats test communications equipment by the API control testing tool that adds among the step S3 after the successful message and implement test.Concrete test way is to treat the sending and receiving that test communications equipment carries out signal according to the current state of communication facilities to be tested, because the state that control program is arranged to communicator to be tested to be scheduled to, therefore the current state of communicator to be tested is predictable, so therefore API is to judge for the complicated state that can not involve in single script that the state of predicting carries out to the control of testing tool, as long as it is normal with regard to presentation function to receive the signal of expecting under this predetermined state, as the signal of not receiving expection then represents to exist fault, subsequently test result preserved in the storage device in order to the computing machine of test with the form of journal file.
On the technique scheme basis, further, be that each duty of communication facilities to be tested or the duty of predetermined number are all write the control program of a correspondence by step S1, and all write the script of a correspondence by step S2 and step S3 for each control program, the storing path of all scripts is deposited in the tabulation, and the script during operation is tabulated successively.Because test result all is stored in the journal file, namely knows the result of whole test as long as check journal file behind all script end of runs.Tabulation editor can also be become autoexec, move successively automatically all scripts by the form of batch processing, script that only need to repeated loading is corresponding in autoexec in the time of need to repeatedly carrying out the test of a certain function gets final product.
The above only is preferred embodiment of the present invention; be not so restriction embodiments of the present invention and protection domain; to those skilled in the art; should recognize that being equal to that all utilizations instructions of the present invention and diagramatic content done replace and the resulting scheme of apparent variation, all should be included in protection scope of the present invention.
Claims (5)
1. the automated testing method of a software control is applied to the communication facilities that arranges by the WEB interface and the testing tool of controlling API and mating with described communication facilities with robotization, it is characterized in that, comprises the steps:
Step S1, write control program, described control program makes WEB interface operation instrument by the WEB interface of described communication facilities described communication facilities is arranged to a predetermined state, and receives the result is set;
Step S2, write the script that starts the control program of writing among the described step S1;
Step S3, in described script, add the control API that described testing tool is used for testing described predetermined state, make the control program of writing among the described step S1 arrange successfully after, described control API controls described testing tool described communication facilities is tested;
Step S4, test result is charged in the journal file.
2. the automated testing method of software control as claimed in claim 1 is characterized in that described WEB interface operation instrument is Selenium.
3. the automated testing method of software control as claimed in claim 1 is characterized in that the script of writing among the described step S2 is mainly by the Tcl language compilation.
4. the automated testing method of software control as claimed in claim 2 is characterized in that the control program among the described step S1 is mainly by the JAVA language compilation.
5. such as the automated testing method of software control as described in arbitrary among the claim 1-4, it is characterized in that, be that each duty of described communication facilities or the duty of predetermined number are all write the control program of a correspondence by described step S1, and all write the script of a correspondence by described step S2 and described step S3 for each control program, the storing path of all described scripts is deposited in the tabulation, and moved successively script in the described tabulation.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201310011983.4A CN103064789B (en) | 2013-01-11 | 2013-01-11 | A kind of automated testing method of software control |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201310011983.4A CN103064789B (en) | 2013-01-11 | 2013-01-11 | A kind of automated testing method of software control |
Publications (2)
Publication Number | Publication Date |
---|---|
CN103064789A true CN103064789A (en) | 2013-04-24 |
CN103064789B CN103064789B (en) | 2017-08-04 |
Family
ID=48107422
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201310011983.4A Active CN103064789B (en) | 2013-01-11 | 2013-01-11 | A kind of automated testing method of software control |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN103064789B (en) |
Cited By (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN104166541B (en) * | 2013-05-17 | 2018-01-19 | 阿里巴巴集团控股有限公司 | Method and apparatus for updating tested widget library |
CN108737220A (en) * | 2018-06-26 | 2018-11-02 | 广东九博科技股份有限公司 | The test system of routing device |
CN109062779A (en) * | 2018-06-07 | 2018-12-21 | 优视科技有限公司 | Test control method, main control device, controlled device and test macro |
Citations (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN101227345A (en) * | 2008-02-05 | 2008-07-23 | 中兴通讯股份有限公司 | Automatic testing method based on application program interface |
CN101261600A (en) * | 2007-03-06 | 2008-09-10 | 中兴通讯股份有限公司 | Software test apparatus and test software design method |
KR101023859B1 (en) * | 2009-05-28 | 2011-03-22 | 현대자동차주식회사 | Roof molding assembly of vehicle |
CN102158370A (en) * | 2011-04-12 | 2011-08-17 | 瑞斯康达科技发展股份有限公司 | Automated testing method and system |
-
2013
- 2013-01-11 CN CN201310011983.4A patent/CN103064789B/en active Active
Patent Citations (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN101261600A (en) * | 2007-03-06 | 2008-09-10 | 中兴通讯股份有限公司 | Software test apparatus and test software design method |
CN101227345A (en) * | 2008-02-05 | 2008-07-23 | 中兴通讯股份有限公司 | Automatic testing method based on application program interface |
KR101023859B1 (en) * | 2009-05-28 | 2011-03-22 | 현대자동차주식회사 | Roof molding assembly of vehicle |
CN102158370A (en) * | 2011-04-12 | 2011-08-17 | 瑞斯康达科技发展股份有限公司 | Automated testing method and system |
Cited By (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN104166541B (en) * | 2013-05-17 | 2018-01-19 | 阿里巴巴集团控股有限公司 | Method and apparatus for updating tested widget library |
CN109062779A (en) * | 2018-06-07 | 2018-12-21 | 优视科技有限公司 | Test control method, main control device, controlled device and test macro |
CN108737220A (en) * | 2018-06-26 | 2018-11-02 | 广东九博科技股份有限公司 | The test system of routing device |
CN108737220B (en) * | 2018-06-26 | 2021-12-28 | 广东九博科技股份有限公司 | Test system of routing equipment |
Also Published As
Publication number | Publication date |
---|---|
CN103064789B (en) | 2017-08-04 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN106326104B (en) | Terminal control testing method and device | |
CN103812726A (en) | Automated testing method and device for data communication equipment | |
CN103744787A (en) | Cellphone automated testing method | |
CN110750437B (en) | Equipment debugging method, device, equipment and system | |
CN104281520A (en) | Tracking and debugging method, device and system | |
CN105159833A (en) | Automatic testing device and method | |
CN103164300A (en) | Mobile terminal touch screen automatic testing method and device | |
CN105354118B (en) | Automatic test approach, the apparatus and system of intelligent terminal | |
CN107688529A (en) | Component adjustment method and device | |
CN104821954A (en) | Cross-platform remote procedure call method | |
CN106528184A (en) | App development method based on cordova platform | |
CN103516557A (en) | Method and system for testing | |
CN105204991A (en) | Internet of things test method and device | |
CN105302722A (en) | CTS automatic test method and apparatus | |
CN108628739A (en) | A kind of method that Lua scripts are debugged, client, server and debugger | |
CN102045397A (en) | Method and equipment for logining embedded terminals by using Telnet to debug embedded terminals | |
CN111913889A (en) | Test system building method and test system | |
CN104102578A (en) | Test method and system and operation terminal | |
CN112463618A (en) | Automated testing method, device, medium and equipment | |
CN114090117A (en) | Configuration method, device, equipment and storage medium | |
CN103064789A (en) | Automated testing method by software control | |
CN103810086A (en) | Method, device and system for processing website causing browser breakdown | |
CN104424239A (en) | Resource file loading method and device | |
CN110750453A (en) | HTML 5-based intelligent mobile terminal testing method, system, server and storage medium | |
CN106557411B (en) | Method and system for testing Hybrid application in Android system |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
C06 | Publication | ||
PB01 | Publication | ||
C10 | Entry into substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
GR01 | Patent grant | ||
GR01 | Patent grant | ||
PP01 | Preservation of patent right | ||
PP01 | Preservation of patent right |
Effective date of registration: 20180313 Granted publication date: 20170804 |
|
PD01 | Discharge of preservation of patent |
Date of cancellation: 20210313 Granted publication date: 20170804 |
|
PD01 | Discharge of preservation of patent | ||
PP01 | Preservation of patent right |
Effective date of registration: 20210313 Granted publication date: 20170804 |
|
PP01 | Preservation of patent right | ||
PD01 | Discharge of preservation of patent |
Date of cancellation: 20240313 Granted publication date: 20170804 |
|
PD01 | Discharge of preservation of patent |