CN105183657A - System and method for testing WEB interface - Google Patents

System and method for testing WEB interface Download PDF

Info

Publication number
CN105183657A
CN105183657A CN201510645312.2A CN201510645312A CN105183657A CN 105183657 A CN105183657 A CN 105183657A CN 201510645312 A CN201510645312 A CN 201510645312A CN 105183657 A CN105183657 A CN 105183657A
Authority
CN
China
Prior art keywords
test
module
web
testing
application 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
Application number
CN201510645312.2A
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.)
Shanghai Feixun Data Communication Technology Co Ltd
Original Assignee
Shanghai Feixun Data Communication Technology 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 Shanghai Feixun Data Communication Technology Co Ltd filed Critical Shanghai Feixun Data Communication Technology Co Ltd
Priority to CN201510645312.2A priority Critical patent/CN105183657A/en
Publication of CN105183657A publication Critical patent/CN105183657A/en
Pending legal-status Critical Current

Links

Abstract

The invention relates to the field of software automated testing, in particular to a system and method for testing a WEB interface. A downloading module automatically downloads source codes. A deployment module is connected with the downloading module and compiles the source codes to obtain testing scripts. A testing module is connected with the deployment module and performs automated testing on WEB application programs by running the testing scripts, so as to generate test reports. A publishing module is connected with the testing module and publishes test reports to a WEB management station, so that a user learns about the automated testing results.

Description

A kind of test macro of WEB interface and method
Technical field
The present invention relates to software automated testing field, particularly relate to a kind of test macro and method of WEB interface.
Background technology
Current web measuring technology testing efficiency is low, simultaneously uninteresting due to very of test process, tester can be caused to produce more mistake, if project change in addition, the method of neither one rapid configuration management testing is dealt with, because if WEB software can not realize the test of robotization, can to running software cause very serious after, add the cost of research and development of software simultaneously.
Summary of the invention
The problems such as the efficiency existed for software test of the prior art is low, mistake is many, the invention provides a kind of test macro and method of WEB interface, testing efficiency are improved, and test is intelligent.
The present invention adopts following technical scheme:
A test macro for WEB interface, described test macro comprises:
Download module, automatic loading source code;
Deployment module, is connected with described download module, compiles described source code and obtains test script;
Test module, is connected with described deployment module, carries out automatic test by running described test script to WEB application program, generates test report;
Release module, is connected with described test module, receives and described test report is published to WEB admin site, making user learn the result of automatic test.
Preferably, described system also comprises:
Control module, is connected with described download module, controls the download of described download module, and
Described control module judges whether to download described source code after reading configuration file.
Preferably, described control module realizes steering logic by Python and XML language.
Preferably, described control module judges whether to download described source code according to judgment rule, when downloading, then downloads described source code, otherwise, put into waiting list; Wherein,
Described judgment rule is the time judged whether arrive Preset Time.
Preferably, the test script that described deployment module uses Ant to write compiles described source code.
Preferably, described test module uses SVN to carry out Version Control to described test script, to make test script described in described SVN regular update.
Preferably, described test script is selected from the test cases of described WEB admin site renewal.
Preferably, installation kit is downloaded while downloading described source code by described download module in the lump, and
Described deployment module runs described installation kit, to upgrade WEB application program, produces new WEB application program, and described test module is tested described new WEB application program.
A method of testing for WEB interface, described method of testing comprises:
Step S1: loading source code automatically;
Step S2: compile described source code and obtain test script;
Step S3: run described test script and carry out automatic test to WEB application program, generates test report;
Step S4: receive and described test report is published to WEB admin site.
Preferably, described step S1 also comprises:
Step S11: when downloading described source code, downloads in the lump by installation kit.
Preferably, described step S2 also comprises:
Step S21: receive and run described installation kit, to upgrade WEB application program, produces new described WEB application program.
Preferably, described step S3 specifically comprises:
Step S31: described new WEB application program is tested.
Preferably, described step S2 also comprises:
Step S22: when disposing described WEB application program, stops the WEB server of current operation, after disposing described WEB application program, restarts described WEB server.
Preferably, described step S3 specifically comprises:
Step S32: described WEB admin site lists current all test cases;
Step S33: select the use-case needed and preserve, to upgrade described test script from described all test cases.
Preferably, described step S3 also comprises:
Step S34: test module runs the test script upgraded and carries out automatic test to described new WEB application program.
Preferably, described step S4 comprises:
According to Preset Time clickthrough, learn the result of automatic test.
The invention has the beneficial effects as follows:
The present invention improves the testing efficiency of web interface, and make method of testing continue along with the change of project to carry out, function is hommization more, intelligent.The more mistake of manual testing's generation can be reduced by automatic test software, save the time of test simultaneously.
Accompanying drawing explanation
Fig. 1 is the structural representation of the test macro embodiment one of a kind of WEB interface of the present invention;
Fig. 2 is the test macro operating diagram of a kind of WEB interface of the present invention;
Fig. 3 is the schematic diagram of the method for testing embodiment two of a kind of WEB interface of the present invention;
Fig. 4 is the process flow diagram of the method for testing of a kind of WEB interface of the present invention.
Embodiment
It should be noted that, when not conflicting, following technical proposals, can combine between technical characteristic mutually.
Below in conjunction with accompanying drawing, the specific embodiment of the present invention is further described:
Embodiment one
Fig. 1 is the structural representation of the test macro of a kind of WEB interface of the present invention, and as shown in Figure 1, the present embodiment is a kind of test macro of WEB interface, and test macro comprises:
Download module, the source code of automatic down loading updating WEB application program and installation kit;
Deployment module, is connected with download module, and compile source code obtains test script, and upgrades WEB application program according to installation kit, produces new WEB application program;
Test module, is connected with deployment module, carries out automatic test by testing results script to new WEB application program, generates test report;
Release module, is connected with test module, test report is published to WEB admin site, makes user learn the result of automatic test.
In the present invention's preferred embodiment, system also comprises:
Control module, with the download of download module connection control download module, and
Control module reads after configuration file, and judging whether can the source code of down loading updating WEB application program and installation kit.
In the present invention's preferred embodiment, control module realizes steering logic by Python and XML language.
In the present invention's preferred embodiment, control module judges whether according to judgment rule can the source code of down loading updating WEB application program and installation kit, when downloading, then and loading source code and installation kit, otherwise, put into waiting list; Wherein,
Judgment rule is the time judged whether arrive Preset Time.
In the present invention's preferred embodiment, the test script compile source code that deployment module uses Ant to write, to upgrade WEB application program.
In the present invention's preferred embodiment, test module uses SVN to carry out Version Control to test script, to make SVN regular update test script.
In the present invention's preferred embodiment, test script is selected from the test cases of WEB admin site renewal.
Fig. 2 is the test macro operating diagram of a kind of WEB interface of the present invention, as shown in Figure 2, in the present embodiment, this system is made up of four module, download module, deployment module, test module, release module, wherein download module can carry out the download as required of source code and installation kit, and deployment module carries out the deployment of application program, and test module runs automatic test script and release module issues automatic test report.The system of the present embodiment realizes primarily of Python, and this system has two control modes: time and web administration website.Temporal logic realizes in Python script, and when the time arrives, system can loading source code, disposing application program, operation automatically test, issue report in order; And web administration website is realized by Flex and JAVA technology, user can Configuration Online certain module as required, and requires to perform test automatically immediately.
Embodiment two
Fig. 3 is the schematic diagram of the method for testing embodiment two of a kind of WEB interface of the present invention, and as shown in Figure 3, the present embodiment is a kind of method of testing of WEB interface, and this method of testing comprises:
Step S1: loading source code and installation kit automatically;
Step S2: compile source code obtains test script, and upgrade WEB application program according to installation kit;
Step S3: carry out automatic test to new WEB application program by testing results script, generates test report;
Step S4: test report is published to WEB admin site, makes user learn the result of automatic test.
In the present embodiment, source code and installation kit can be downloaded as required, and in software development process, every day all can change source code because of new function, and some project needs cross-region to cooperate, and the turnover rate of code is higher in this case.Fig. 4 is the process flow diagram of the method for testing of a kind of WEB interface of the present invention, upgrades the time of source code in order to save both sides, is necessary to allow this part working automation.So first a kind of system of embodiment can achieve a downloading control module (control module) in conjunction with Python and XML.As shown in Figure 4, whether Python program timing reads configuration file to its logic, judge that this task is current and can run.If the time consistency of time and configuration this moment, with regard to access site, download code packages.Otherwise, put into waiting list, obtain next task.Task inside waiting list can restart after a certain time.
In the present invention's preferred embodiment, step S2 also comprises:
Step S21: when disposing WEB application program, stop the WEB server of current operation, after disposing WEB application program, restarts WEB server.
In the present embodiment, the deployment of application program is a very important step for web application, after having had source code, the script compile source code that test macro uses Ant to write, stop current existing Web server, dispose product code, then restart Web server.During this period of time, the test environment of product may temporarily cannot be accessed.
In the present invention's preferred embodiment, step S3 specifically comprises:
Step S31:WEB admin site lists current all test cases;
Step S32: user selectes the use-case of needs and preserves, to upgrade test script from all test cases;
In the present embodiment, after the web application of redaction has been disposed, test macro has just started to enter automatic test.Native system uses SVN to carry out Version Control to test script.So be necessary upgrading nearest test script by SVN at the beginning.
In the present invention's preferred embodiment, step S3 also comprises:
Step S33: test module runs the test script upgraded and carries out automatic test to new WEB application program.
In the present embodiment, for adapting to the testing requirement of project development cycle different phase, web administration website will be listed current so test cases.User freely can select the use-case that next time, test needed.After user selects preservation, these test scripts will be run when lower subsystem automatic deployment.If user selects to run, so system can horse back testing results script on the current Product environment disposed.
In the present invention's preferred embodiment, step S4 specifically comprises:
Step S41: user, according to Preset Time clickthrough, learns the result of automatic test.
In the present embodiment, after having run automatic test case, the test result of prior art is created on below testing tool catalogue usually automatically, but can cover original file like this, is unfavorable for exchanging of the tracking of project and information.So test report can be published to web administration website by the method for testing of the present embodiment, user only according to time clickthrough above, just need can see the operation result of each test.
In sum, the present invention can improve the testing efficiency of web interface, and make method of testing continue along with the change of project to carry out, function is hommization more, intelligent.The more mistake of manual testing's generation can be reduced by automatic test software, save the time of test simultaneously.
By illustrating and accompanying drawing, giving the exemplary embodiments of the ad hoc structure of embodiment, based on the present invention's spirit, also can do other conversion.Although foregoing invention proposes existing preferred embodiment, but these contents are not as limitation.
For a person skilled in the art, after reading above-mentioned explanation, various changes and modifications undoubtedly will be apparent.Therefore, appending claims should regard the whole change and correction of containing true intention of the present invention and scope as.In Claims scope, the scope of any and all equivalences and content, all should think and still belong to the intent and scope of the invention.

Claims (16)

1. a test macro for WEB interface, is characterized in that, described test macro comprises:
Download module, automatic loading source code;
Deployment module, is connected with described download module, compiles described source code and obtains test script;
Test module, is connected with described deployment module, carries out automatic test by running described test script to WEB application program, generates test report;
Release module, is connected with described test module, receives and described test report is published to WEB admin site.
2. the test macro of WEB interface according to claim 1, is characterized in that, described system also comprises:
Control module, is connected with described download module, controls the download of described download module, and
Described control module judges whether to download described source code after reading configuration file.
3. the test macro of WEB interface according to claim 2, is characterized in that, described control module realizes steering logic by Python and XML language.
4. the test macro of WEB interface according to claim 2, is characterized in that, described control module judges whether to download described source code according to judgment rule, when downloading, then downloads described source code, otherwise, put into waiting list; Wherein,
Described judgment rule is the time judged whether arrive Preset Time.
5. the test macro of WEB interface according to claim 1, is characterized in that, the test script that described deployment module uses Ant to write compiles described source code.
6. the test macro of WEB interface according to claim 5, is characterized in that, described test module uses SVN to carry out Version Control to described test script, to make test script described in described SVN regular update.
7. the test macro of WEB interface according to claim 6, is characterized in that, described test script is selected from the test cases of described WEB admin site renewal.
8. the test macro of WEB interface according to claim 1, is characterized in that, installation kit is downloaded while downloading described source code by described download module in the lump, and
Described deployment module runs described installation kit, to upgrade WEB application program, produces new WEB application program, and described test module is tested described new WEB application program.
9. a method of testing for WEB interface, is characterized in that, described method of testing comprises:
Step S1: loading source code automatically;
Step S2: compile described source code and obtain test script;
Step S3: run described test script and carry out automatic test to WEB application program, generates test report;
Step S4: receive and described test report is published to WEB admin site.
10. the method for testing of WEB interface according to claim 9, is characterized in that, described step S1 also comprises:
Step S11: when downloading described source code, downloads in the lump by installation kit.
The method of testing of 11. WEB interface according to claim 10, is characterized in that, described step S2 also comprises:
Step S21: receive and run described installation kit, to upgrade WEB application program, produces new described WEB application program.
The method of testing of 12. WEB interface according to claim 11, is characterized in that, described step S3 specifically comprises:
Step S31: described new WEB application program is tested.
The method of testing of 13. WEB interface according to claim 9, is characterized in that, described step S2 also comprises:
Step S22: when disposing described WEB application program, stops the WEB server of current operation, after disposing described WEB application program, restarts described WEB server.
The method of testing of 14. WEB interface according to claim 9, is characterized in that, described step S3 specifically comprises:
Step S32: described WEB admin site lists current all test cases;
Step S33: select the use-case needed and preserve, to upgrade described test script from described all test cases.
The method of testing of 15. WEB interface according to claim 14, is characterized in that, described step S3 also comprises:
Step S34: test module runs the test script upgraded and carries out automatic test to described new WEB application program.
The method of testing of 16. WEB interface according to claim 9, is characterized in that, described step S4 comprises:
According to Preset Time clickthrough, learn the result of automatic test.
CN201510645312.2A 2015-09-30 2015-09-30 System and method for testing WEB interface Pending CN105183657A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201510645312.2A CN105183657A (en) 2015-09-30 2015-09-30 System and method for testing WEB interface

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201510645312.2A CN105183657A (en) 2015-09-30 2015-09-30 System and method for testing WEB interface

Publications (1)

Publication Number Publication Date
CN105183657A true CN105183657A (en) 2015-12-23

Family

ID=54905749

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201510645312.2A Pending CN105183657A (en) 2015-09-30 2015-09-30 System and method for testing WEB interface

Country Status (1)

Country Link
CN (1) CN105183657A (en)

Cited By (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105893260A (en) * 2016-03-31 2016-08-24 上海携程商务有限公司 Automatic release system and method for call center
CN107577611A (en) * 2017-11-01 2018-01-12 四川久远银海软件股份有限公司 Using debugging apparatus and method
WO2018059393A1 (en) * 2016-09-30 2018-04-05 腾讯科技(深圳)有限公司 Test method for mobile application program, server, terminal and storage medium
CN108874659A (en) * 2018-04-19 2018-11-23 杭州嘉楠耘智信息科技有限公司 Test method, test system and server of digital currency computing equipment
WO2019056475A1 (en) * 2017-09-21 2019-03-28 平安科技(深圳)有限公司 Automated test task management method and apparatus, device, and storage medium

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101996133A (en) * 2009-08-27 2011-03-30 上海杉达学院 Interaction interface test system of Web application software
CN103049369A (en) * 2011-10-14 2013-04-17 阿里巴巴集团控股有限公司 Automated testing method and system
WO2014120128A1 (en) * 2013-01-29 2014-08-07 Hewlett-Packard Development Company, L.P. Analyzing structure of web application
CN104461855A (en) * 2013-09-22 2015-03-25 腾讯科技(北京)有限公司 Automatic Web testing method, system and device
CN104679658A (en) * 2015-03-17 2015-06-03 百度在线网络技术(北京)有限公司 Test method and test system for WEB pages

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101996133A (en) * 2009-08-27 2011-03-30 上海杉达学院 Interaction interface test system of Web application software
CN103049369A (en) * 2011-10-14 2013-04-17 阿里巴巴集团控股有限公司 Automated testing method and system
WO2014120128A1 (en) * 2013-01-29 2014-08-07 Hewlett-Packard Development Company, L.P. Analyzing structure of web application
CN104461855A (en) * 2013-09-22 2015-03-25 腾讯科技(北京)有限公司 Automatic Web testing method, system and device
CN104679658A (en) * 2015-03-17 2015-06-03 百度在线网络技术(北京)有限公司 Test method and test system for WEB pages

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
GGB5135: "一个智能的web界面测试***", 《豆丁网HTTP://WWW.DOCIN.COM/P-56523824.HTML》 *

Cited By (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105893260A (en) * 2016-03-31 2016-08-24 上海携程商务有限公司 Automatic release system and method for call center
WO2018059393A1 (en) * 2016-09-30 2018-04-05 腾讯科技(深圳)有限公司 Test method for mobile application program, server, terminal and storage medium
US10698797B2 (en) 2016-09-30 2020-06-30 Tencent Technology (Shenzhen) Company Limited Mobile application program testing method, server, terminal, and storage medium
WO2019056475A1 (en) * 2017-09-21 2019-03-28 平安科技(深圳)有限公司 Automated test task management method and apparatus, device, and storage medium
CN107577611A (en) * 2017-11-01 2018-01-12 四川久远银海软件股份有限公司 Using debugging apparatus and method
CN108874659A (en) * 2018-04-19 2018-11-23 杭州嘉楠耘智信息科技有限公司 Test method, test system and server of digital currency computing equipment
CN108874659B (en) * 2018-04-19 2023-03-28 北京嘉楠捷思信息技术有限公司 Test method, test system and server of digital currency computing equipment

Similar Documents

Publication Publication Date Title
CN105183657A (en) System and method for testing WEB interface
CN102622241B (en) A kind of method for upgrading software and device
CN103797436B (en) For the dynamic power optimization of calculation element
CN103176824B (en) A kind of method and device of system upgrade
US9971333B2 (en) Programming auxiliary system of programmable controller and method thereof
CN105446712B (en) Application program defect repairing method and device
CN103309683B (en) The software patch embedding grammar of hardware device and device
CN109491695A (en) A kind of increment updating method of integrated Android application
US20160055077A1 (en) Method, device, and program storage device for autonomous software product testing
CN102609274B (en) A kind of quick startup optimization method of system and television set
CN105607921B (en) A kind of system service starting method and system based on android system
CN105607935A (en) Application updating method and terminal and server
CN105204913A (en) Method and system for running Linux application on Android operating system and system
CN105320554A (en) Program updating method as well as client and system for program updating
CN105159718B (en) Firmware upgrade method and device
CN108874437B (en) Online cloud updating method for android application program
US20170039057A1 (en) Field device
CN112988183A (en) Program upgrading method and device, electronic equipment and storage medium
CN105743933A (en) Router module updating method and system
CN103617058B (en) QNX-based system and method for installing and uninstalling application software
CN106406955A (en) A method and a device for upgrades of a bootloader program in an RSU apparatus
CN104572207A (en) Intelligent accessories based APP expanded application method and intelligent accessories
CN105204910A (en) Script hot updating method and system
CN104572225A (en) Novel method for testing online updating stability of BIOS
CN104267993A (en) Software updating method, device and mobile terminal

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
RJ01 Rejection of invention patent application after publication

Application publication date: 20151223