CN103544106A - Method and device for generating script based on control - Google Patents
Method and device for generating script based on control Download PDFInfo
- Publication number
- CN103544106A CN103544106A CN201310534965.4A CN201310534965A CN103544106A CN 103544106 A CN103544106 A CN 103544106A CN 201310534965 A CN201310534965 A CN 201310534965A CN 103544106 A CN103544106 A CN 103544106A
- Authority
- CN
- China
- Prior art keywords
- control
- information
- script
- mobile terminal
- interface
- 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 discloses a method for generating a script based on a control. The method includes recognizing operation applied to a mobile terminal through the mobile terminal and acquiring action information and coordinate information of the operation; locating the control of the operation according to the interface control information and the coordinate information of the mobile terminal and obtaining the information of the control of the operation; generating script information of the control of the operation according to the information of the control and the action information of the operation; adding the script information into a test script file of the mobile terminal. A device for generating the script based on the control is further disclosed. By means of the method and the device, test script generation speed can be increased by means of automatic control, meanwhile requirements of maintainers are reduced, and test script generation convenience is improved.
Description
Technical field
The present invention relates to communication technical field, relate in particular to a kind of method and device based on control generation script.
Background technology
Along with the development of internet and universal, the problem that user is more convenient by network, more directly feed back mobile phone application software, therefore, and for meeting consumers' demand, frequent updating Software Edition more and more.But, before the issue of application software, all need through test.
In the prior art, by being all by obtaining script Test Application software automatically, the formation of script is mainly two kinds of modes: a kind of mode is to carry out hand-written script by slip-stick artist, this quality time that need to consume a large amount of slip-stick artists, and test man's rank just can difficult do it yourself to write complete script, and the otherness due to each project, so script substantially all need to go adaptive, by hand-written mode, will can consume a large amount of time again, just be difficult to reach the object of automatic high efficiency; Another kind of mode is recorded automatic formation script exactly, general is all the coordinate script of recording, or decompiling test APK(Android Package, Android installation kit) obtain layout XML(Extensible Markup Language, extend markup language) mode of file is recorded into script, and for different project adaptations, getting up is all to need a large amount of time to remove to revise script.
Summary of the invention
In view of this, the embodiment of the present invention provides a kind of method and device based on control generation script, to improve test script formation speed and convenience.
On the one hand, the embodiment of the present invention provides a kind of method based on control generation script, comprising:
By mobile terminal, identify the operation being applied on described mobile terminal, obtain action message and the coordinate information of described operation;
According to the interface control information of mobile terminal and described coordinate information, locate the control of described operation, and obtain the information of the control of described operation;
According to the information of the control of described operation and described action message, generate the script information of the control of described operation;
Described script information is added in the test script file of described mobile terminal.
Preferably, described control of locating described operation according to the interface control information of mobile terminal and described coordinate information comprises:
According to described coordinate information, in described interface control, position;
Obtain the corresponding control in interface, place, location.
Preferably, the action of described operation is for clicking, double-click, input or dragging;
Described control comprises icon, input frame or choice box.
Answer in contrast, the embodiment of the present invention provides a kind of device based on control generation script, comprising:
Operation information acquisition module, for identify the operation being applied on described mobile terminal by mobile terminal, obtains action message and the coordinate information of described operation;
Control locating module, for locating the control of described operation according to the interface control information of mobile terminal and described coordinate information, and obtains the information of the control of described operation;
Script generation module, for generating the script information of the control of described operation according to the information of the control of described operation and described action message;
Script adds module, for described script information being added to the test script file of described mobile terminal.
Preferably, at described control locating module, comprise:
Locating module, for positioning at described interface control according to described coordinate information;
Obtain control module, for obtaining the corresponding control in interface, place, location.
Preferably, the action of described operation is for clicking, double-click, input or dragging;
Described control comprises icon, input frame or choice box.
A kind of method and device based on control generation script that the embodiment of the present invention provides, has following features: by robotization, control, improve test script formation speed, reduce the requirement to maintainer simultaneously, improved the convenience that test script generates.
Accompanying drawing explanation
In order to be illustrated more clearly in the embodiment of the present invention or technical scheme of the prior art, to the accompanying drawing of required use in embodiment or description of the Prior Art be briefly described below, apparently, accompanying drawing in the following describes is only embodiments of the invention, for those of ordinary skills, do not paying under the prerequisite of creative work, other accompanying drawing can also be provided according to the accompanying drawing providing.
Fig. 1 is that a kind of method flow schematic diagram based on control generation script providing is provided in the present invention first;
Fig. 2 is that a kind of apparatus structure schematic diagram based on control generation script providing is provided in the present invention second.
Embodiment
Below in conjunction with the accompanying drawing in the embodiment of the present invention, the technical scheme in the embodiment of the present invention is clearly and completely described, obviously, described embodiment is only the present invention's part embodiment, rather than whole embodiment.Embodiment based in the present invention, those of ordinary skills, not making the every other embodiment obtaining under creative work prerequisite, belong to the scope of protection of the invention.
Embodiment mono-
The embodiment of the present invention one discloses a kind of method based on control generation script, as shown in Figure 1, specifically comprises the following steps:
Step S101, by mobile terminal, identify the operation being applied on mobile terminal, obtain action message and the coordinate information of operation.
In step S101, mobile terminal can be any one in mobile phone, palm PC, panel computer etc.This mobile terminal can run on the operating system platform for Portable movable smart machine of Android(Google exploitation), the operating system platform for Portable movable smart machine of iOS(Apple exploitation), the operating system platform for Portable movable smart machine of Windows Phone(Microsoft exploitation) etc. operating system.
Need to describe, the action of operation is for clicking, double-click, input or dragging.User can directly use finger or use felt pen to the screen of mobile terminal click, double-click, input or drag operation.
Step S102, according to the control of the interface control information of mobile terminal and coordinate information positioning action, and obtain the information of the control of operation.
Need to describe, control comprises icon, input frame or choice box.Preferably can be according to icon, input frame or the choice box of the interface control information of mobile terminal and coordinate information positioning action, and obtain title, input frame type or the choice box title of the icon of operation.Above control type is only a kind of example, should not form the restriction to the embodiment of the present invention.
In step S102, according to the step of the control of the interface control information of mobile terminal and coordinate information positioning action, be specially:
First, according to coordinate information, in interface control, position;
Then, obtain the corresponding control in interface, place, location.
Step S103, according to operation the information of control and the script information of the control of action message generating run.
Need to describe, script information can comprise control information (for example control title of operation) and the action message (for example clicking) of operation.
Step S104, script information is added in the test script file of mobile terminal.
By a kind of disclosed method based on control generation script of the embodiment of the present invention one, by robotization, control, improve test script formation speed, reduce the requirement to maintainer, improved the convenience that test script generates.
Embodiment bis-
The embodiment of the present invention one provides a kind of method based on control generation script, in contrast should, the embodiment of the present invention two discloses a kind of device based on control generation script, as shown in Figure 2, comprising: operation information acquisition module 21, control locating module 22, script generation module 23 and script add module 24.
Operation information acquisition module 21, for identify the operation being applied on mobile terminal by mobile terminal, obtains action message and the coordinate information of operation;
Control locating module 22, for according to the control of the interface control information of mobile terminal and coordinate information positioning action, and obtains the information of the control of operation;
Script generation module 23, for according to operation the information of control and the script information of the control of action message generating run;
Script adds module 24, for script information being added to the test script file of mobile terminal.
In operation information acquisition module 21, mobile terminal can be any one in mobile phone, palm PC, panel computer etc.This mobile terminal can run on the operating system platform for Portable movable smart machine of Android(Google exploitation), the operating system platform for Portable movable smart machine of iOS(Apple exploitation), the operating system platform for Portable movable smart machine of Windows Phone(Microsoft exploitation) etc. operating system.
Need to describe, the action of operation is for clicking, double-click, input or dragging.User can directly use finger or use felt pen to the screen of mobile terminal click, double-click, input or drag operation.
At control locating module 22, comprise: locating module 221 and obtain control module 222.
Locating module 221, for positioning at interface control according to coordinate information;
Obtain control module 222, for obtaining the corresponding control in interface, place, location.
In script generation module 23, need to describe, script information can comprise control information (for example control title of operation) and the action message (for example clicking) of operation.
By a kind of disclosed method based on control generation script of the embodiment of the present invention two, by robotization, control, improve test script formation speed, reduce the requirement to maintainer simultaneously, improved the convenience that test script generates.
Obviously, those skilled in the art should be understood that, above-mentioned each module of the present invention or each step can realize with general calculation element, they can concentrate on single calculation element, or be distributed on the network that a plurality of calculation elements form, alternatively, they can realize with the executable program code of computer installation, thereby they can be stored in memory storage and be carried out by calculation element, or they are made into respectively to each integrated circuit modules, or a plurality of modules in them or step are made into single integrated circuit module to be realized.Like this, the present invention is not restricted to the combination of any specific hardware and software.
These are only the preferred embodiments of the present invention, be not limited to the present invention, to those skilled in the art, the present invention can have various changes and variation.All any modifications of doing, be equal to replacement, improvement etc., within protection scope of the present invention all should be included within spirit of the present invention and principle.
Claims (6)
1. the method based on control generation script, is characterized in that, comprising:
By mobile terminal, identify the operation being applied on described mobile terminal, obtain action message and the coordinate information of described operation;
According to the interface control information of mobile terminal and described coordinate information, locate the control of described operation, and obtain the information of the control of described operation;
According to the information of the control of described operation and described action message, generate the script information of the control of described operation;
Described script information is added in the test script file of described mobile terminal.
2. the method based on control generation script according to claim 1, is characterized in that, described control of locating described operation according to the interface control information of mobile terminal and described coordinate information comprises:
According to described coordinate information, in described interface control, position;
Obtain the corresponding control in interface, place, location.
3. the method for any one according to claim 1 and 2 based on control generation script, is characterized in that:
The action of described operation is for clicking, double-click, input or dragging;
Described control comprises icon, input frame or choice box.
4. the device based on control generation script, is characterized in that, comprising:
Operation information acquisition module, for identify the operation being applied on described mobile terminal by mobile terminal, obtains action message and the coordinate information of described operation;
Control locating module, for locating the control of described operation according to the interface control information of mobile terminal and described coordinate information, and obtains the information of the control of described operation;
Script generation module, for generating the script information of the control of described operation according to the information of the control of described operation and described action message;
Script adds module, for described script information being added to the test script file of described mobile terminal.
5. the device based on control generation script according to claim 1, is characterized in that, at described control locating module, comprises:
Locating module, for positioning at described interface control according to described coordinate information;
Obtain control module, for obtaining the corresponding control in interface, place, location.
6. the device based on control generation script according to any one described in claim 4 or 5, is characterized in that:
The action of described operation is for clicking, double-click, input or dragging;
Described control comprises icon, input frame or choice box.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201310534965.4A CN103544106A (en) | 2013-10-31 | 2013-10-31 | Method and device for generating script based on control |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201310534965.4A CN103544106A (en) | 2013-10-31 | 2013-10-31 | Method and device for generating script based on control |
Publications (1)
Publication Number | Publication Date |
---|---|
CN103544106A true CN103544106A (en) | 2014-01-29 |
Family
ID=49967578
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201310534965.4A Pending CN103544106A (en) | 2013-10-31 | 2013-10-31 | Method and device for generating script based on control |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN103544106A (en) |
Cited By (16)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN104484273A (en) * | 2014-12-19 | 2015-04-01 | 广州博冠信息科技有限公司 | Test method for application program, device and system |
CN104915346A (en) * | 2014-03-11 | 2015-09-16 | 上海卓岚信息科技有限公司 | Web server for web modules and output control or input updating method thereof |
CN105095207A (en) * | 2014-04-18 | 2015-11-25 | 阿里巴巴集团控股有限公司 | Methods for retrieving and obtaining contents of application software, and devices for retrieving and obtaining contents of application software |
CN105138931A (en) * | 2015-07-08 | 2015-12-09 | 北京京东尚科信息技术有限公司 | Display method and apparatus for sensitive data in interface |
CN105138463A (en) * | 2015-09-25 | 2015-12-09 | 成都中科创达软件有限公司 | Testing method and system for mobile terminal software |
CN105550114A (en) * | 2015-12-23 | 2016-05-04 | 广东欧珀移动通信有限公司 | Automated testing method and apparatus and mobile terminal |
CN106055446A (en) * | 2016-06-24 | 2016-10-26 | 捷开通讯(深圳)有限公司 | Mobile terminal test method and apparatus |
CN106201895A (en) * | 2016-07-25 | 2016-12-07 | 东软集团股份有限公司 | Application testing method and device |
CN106649128A (en) * | 2016-12-30 | 2017-05-10 | 上海二三四五网络科技有限公司 | Method for automatically controlling running of terminal |
CN106933738A (en) * | 2017-02-09 | 2017-07-07 | 珠海格力电器股份有限公司 | APP method of testings, APP test scripts generating means and APP test script performs devices |
CN107122295A (en) * | 2017-03-30 | 2017-09-01 | 腾讯科技(深圳)有限公司 | The generation method and device of test case script |
CN107729223A (en) * | 2017-08-31 | 2018-02-23 | 福建天晴数码有限公司 | A kind of method and device of recording user operation on mobile terminals |
CN107957954A (en) * | 2017-12-19 | 2018-04-24 | 郑州云海信息技术有限公司 | The method and system of test data security is improved under a kind of linux system |
WO2018120721A1 (en) * | 2016-12-30 | 2018-07-05 | 上海壹账通金融科技有限公司 | Method and system for testing user interface, electronic device, and computer readable storage medium |
CN109542553A (en) * | 2018-10-26 | 2019-03-29 | 北京慧流科技有限公司 | The information extraction method and device and storage medium of user interface UI element |
CN110765013A (en) * | 2019-10-18 | 2020-02-07 | 深圳市比量科技传媒有限公司 | Automatic flow execution method and system |
Citations (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US5983001A (en) * | 1995-08-30 | 1999-11-09 | Sun Microsystems, Inc. | Method and system for facilitating the automatic creation of test scripts |
CN101425012A (en) * | 2008-12-10 | 2009-05-06 | 深圳华为通信技术有限公司 | Method and device for generating case script based on model automatization |
CN101840299A (en) * | 2010-03-18 | 2010-09-22 | 华为终端有限公司 | Touch operation method, device and mobile terminal |
CN102929530A (en) * | 2012-09-28 | 2013-02-13 | Tcl通讯(宁波)有限公司 | Touch screen operation processing method and system on basis of mobile terminal and mobile terminal |
-
2013
- 2013-10-31 CN CN201310534965.4A patent/CN103544106A/en active Pending
Patent Citations (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US5983001A (en) * | 1995-08-30 | 1999-11-09 | Sun Microsystems, Inc. | Method and system for facilitating the automatic creation of test scripts |
CN101425012A (en) * | 2008-12-10 | 2009-05-06 | 深圳华为通信技术有限公司 | Method and device for generating case script based on model automatization |
CN101840299A (en) * | 2010-03-18 | 2010-09-22 | 华为终端有限公司 | Touch operation method, device and mobile terminal |
CN102929530A (en) * | 2012-09-28 | 2013-02-13 | Tcl通讯(宁波)有限公司 | Touch screen operation processing method and system on basis of mobile terminal and mobile terminal |
Cited By (22)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN104915346A (en) * | 2014-03-11 | 2015-09-16 | 上海卓岚信息科技有限公司 | Web server for web modules and output control or input updating method thereof |
CN105095207A (en) * | 2014-04-18 | 2015-11-25 | 阿里巴巴集团控股有限公司 | Methods for retrieving and obtaining contents of application software, and devices for retrieving and obtaining contents of application software |
CN105095207B (en) * | 2014-04-18 | 2019-05-28 | 阿里巴巴集团控股有限公司 | Retrieval, the method and apparatus for obtaining application software content |
CN104484273B (en) * | 2014-12-19 | 2017-06-16 | 广州博冠信息科技有限公司 | The method of testing of application program, equipment and system |
CN104484273A (en) * | 2014-12-19 | 2015-04-01 | 广州博冠信息科技有限公司 | Test method for application program, device and system |
CN105138931A (en) * | 2015-07-08 | 2015-12-09 | 北京京东尚科信息技术有限公司 | Display method and apparatus for sensitive data in interface |
CN105138463A (en) * | 2015-09-25 | 2015-12-09 | 成都中科创达软件有限公司 | Testing method and system for mobile terminal software |
CN105550114A (en) * | 2015-12-23 | 2016-05-04 | 广东欧珀移动通信有限公司 | Automated testing method and apparatus and mobile terminal |
CN105550114B (en) * | 2015-12-23 | 2018-01-19 | 广东欧珀移动通信有限公司 | Automated testing method, device and mobile terminal |
CN106055446A (en) * | 2016-06-24 | 2016-10-26 | 捷开通讯(深圳)有限公司 | Mobile terminal test method and apparatus |
CN106055446B (en) * | 2016-06-24 | 2019-09-20 | 捷开通讯(深圳)有限公司 | A kind of test method and device of mobile terminal |
CN106201895A (en) * | 2016-07-25 | 2016-12-07 | 东软集团股份有限公司 | Application testing method and device |
CN106201895B (en) * | 2016-07-25 | 2018-10-23 | 东软集团股份有限公司 | Application testing method and device |
WO2018120721A1 (en) * | 2016-12-30 | 2018-07-05 | 上海壹账通金融科技有限公司 | Method and system for testing user interface, electronic device, and computer readable storage medium |
CN106649128A (en) * | 2016-12-30 | 2017-05-10 | 上海二三四五网络科技有限公司 | Method for automatically controlling running of terminal |
CN106933738A (en) * | 2017-02-09 | 2017-07-07 | 珠海格力电器股份有限公司 | APP method of testings, APP test scripts generating means and APP test script performs devices |
CN107122295A (en) * | 2017-03-30 | 2017-09-01 | 腾讯科技(深圳)有限公司 | The generation method and device of test case script |
CN107729223A (en) * | 2017-08-31 | 2018-02-23 | 福建天晴数码有限公司 | A kind of method and device of recording user operation on mobile terminals |
CN107957954A (en) * | 2017-12-19 | 2018-04-24 | 郑州云海信息技术有限公司 | The method and system of test data security is improved under a kind of linux system |
CN109542553A (en) * | 2018-10-26 | 2019-03-29 | 北京慧流科技有限公司 | The information extraction method and device and storage medium of user interface UI element |
CN110765013A (en) * | 2019-10-18 | 2020-02-07 | 深圳市比量科技传媒有限公司 | Automatic flow execution method and system |
CN110765013B (en) * | 2019-10-18 | 2024-02-23 | 深圳市比量科技传媒有限公司 | Automatic execution method and system for flow |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN103544106A (en) | Method and device for generating script based on control | |
CN110069257B (en) | Interface processing method and device and terminal | |
CN104142826A (en) | Method, device and system for constructing page | |
CN109446570B (en) | Business process display method, device, computer equipment and storage medium | |
CN103164300A (en) | Mobile terminal touch screen automatic testing method and device | |
CN103051652B (en) | A kind of mobile terminal cloud computing distribution platform | |
CN104395882A (en) | Creation and context-aware presentation of customized emoticon item sets | |
CN107515702B (en) | Page interaction method and device | |
CN103914315A (en) | Configuration method of drivers | |
Popp et al. | Tool support for automated multi-device GUI generation from discourse-based communication models | |
CN101763218A (en) | Input method for handheld equipment | |
CN105389084A (en) | Convenient information inputting method for user of mobile terminal and mobile terminal | |
CN103645906A (en) | Method and system for realizing interface re-layout based on fixed interface layout document | |
CN110020231A (en) | Webpage capture method and device thereof | |
CN109960491A (en) | Application program generation method, generating means, electronic equipment and storage medium | |
CN104142782A (en) | System and method for annotations | |
CN102436344A (en) | Context menu | |
CN114089986A (en) | Method, system, device and medium for configuring low code development platform function expression | |
CN111045653A (en) | System generation method and device, computer readable medium and electronic equipment | |
CN104216646A (en) | Method and device for creating application program based on gesture | |
CN103870191A (en) | Method and electronic equipment for saving webpage | |
CN104375814A (en) | Generation method and device of an interface document | |
CN101893995A (en) | Method and system for implementing hand input on webpage | |
CN104834715A (en) | Website generating method and system based on components and container | |
CN105653133A (en) | Extension method and device of application programs |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
C06 | Publication | ||
PB01 | Publication | ||
SE01 | Entry into force of request for substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
RJ01 | Rejection of invention patent application after publication |
Application publication date: 20140129 |
|
RJ01 | Rejection of invention patent application after publication |