CN103678094A - Random key test method and device - Google Patents

Random key test method and device Download PDF

Info

Publication number
CN103678094A
CN103678094A CN201210318525.0A CN201210318525A CN103678094A CN 103678094 A CN103678094 A CN 103678094A CN 201210318525 A CN201210318525 A CN 201210318525A CN 103678094 A CN103678094 A CN 103678094A
Authority
CN
China
Prior art keywords
current window
described current
button operation
dummy keyboard
default
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
Application number
CN201210318525.0A
Other languages
Chinese (zh)
Other versions
CN103678094B (en
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.)
Tencent Technology Shenzhen Co Ltd
Original Assignee
Tencent Technology Shenzhen 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 Tencent Technology Shenzhen Co Ltd filed Critical Tencent Technology Shenzhen Co Ltd
Priority to CN201210318525.0A priority Critical patent/CN103678094B/en
Publication of CN103678094A publication Critical patent/CN103678094A/en
Application granted granted Critical
Publication of CN103678094B publication Critical patent/CN103678094B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Landscapes

  • Input From Keyboards Or The Like (AREA)

Abstract

The invention discloses a random key test method and device, and belongs to the technical field of communication. The method includes the steps that a current window of a mobile terminal is searched; if a virtual keyboard or a preset available control exists in the current window, order key operation is conducted on the current window; if the virtual keyboard or the preset available control does not exist in the current window, disorder key operation is conducted on the current window. The device comprises a search module, a first key operation module and a second key operation module. According to the random key test method and device, if the virtual keyboard or the preset available control exists in the current window, order key operation is conducted on the current window, if the virtual keyboard or the preset available control does not exist in the current window, disorder key operation is conducted on the current window, the order key operation and the disorder key operation can be combined, the combination is not completely random, invalid key operation is reduced, and testing efficiency can be improved.

Description

Random key-press test method and device
Technical field
The present invention relates to communication technical field, particularly a kind of random key-press test method and device.
Background technology
Along with the development of the communication technology, the mobile terminals such as mobile phone have become conventional means of communication, and in using the process of mobile terminal, usually can run into mobile terminal Crash(Noise-of-dashing-waves and burst, dodge and move back etc.) situation.The situation that occurs Crash for fear of mobile terminal, need to mobile terminal, carry out random key testing in advance, whether by random key testing, detect mobile terminal can Crash, when mobile terminal Crash being detected, record Crash situation, according to Crash situation judgement Crash reason, mobile terminal is improved.
Existing random key-press test method, mainly comprises two kinds below:
The first, selects a pixel mobile terminal current window (view) is upper random, and the pixel of selecting is carried out to button operation, and wherein, button operation comprises: click, double-click, slide or long press etc.
The second, searches the available control on mobile terminal current window, selects an available control at random from the available control finding, and the available control of selecting is carried out to button operation, and wherein, button operation comprises: click, double-click, slide or long press etc.
Yet in realizing process of the present invention, inventor finds that prior art at least exists following problem:
Prior art is to carry out button operation by random selection pixel or available control, and owing to being completely random, the pixel that much cannot operate or available control also can arrive at random, and invalid button operation is many, causes the efficiency of test low.
Summary of the invention
In order to solve the problem of prior art, the embodiment of the present invention provides a kind of random key-press test method and device.Described technical scheme is as follows:
A random key-press test method, described method comprises:
The current window of search mobile terminal;
If there is dummy keyboard or default available control in described current window, described current window carried out to orderly button operation;
If not dummy keyboard or default available control in described current window, carry out unordered button operation to described current window.
A random button testing device, described device comprises:
Search module, for searching for the current window of mobile terminal;
The first button operation module, while there is dummy keyboard or default available control for search described current window when described search module, carries out orderly button operation to described current window;
The second button operation module, for searching described current window when described search module not when dummy keyboard or default available control, carries out unordered button operation to described current window.
The beneficial effect that the technical scheme that the embodiment of the present invention provides is brought is:
If there is dummy keyboard or default available control in current window, current window is carried out to orderly button operation, if not dummy keyboard or default available control in current window, current window is carried out to unordered button operation, orderly button operation and unordered button operation can be combined, not completely random, reduced invalid button operation, can improve the efficiency of test.
Accompanying drawing explanation
In order to be illustrated more clearly in the technical scheme in the embodiment of the present invention, below the accompanying drawing of required use during embodiment is described is briefly described, apparently, accompanying drawing in the following describes is only some embodiments of the present invention, for those of ordinary skills, do not paying under the prerequisite of creative work, can also obtain according to these accompanying drawings other accompanying drawing.
Fig. 1 is a kind of random key-press test method process flow diagram that the embodiment of the present invention one provides;
Fig. 2 is a kind of random key-press test method process flow diagram that the embodiment of the present invention two provides;
Fig. 3 is a kind of random button testing device structural representation that the embodiment of the present invention three provides;
Fig. 4 is the random button testing device structural representation of another kind that the embodiment of the present invention three provides.
Embodiment
For making the object, technical solutions and advantages of the present invention clearer, below in conjunction with accompanying drawing, embodiment of the present invention is described further in detail.
Embodiment mono-
The embodiment of the present invention provides a kind of random key-press test method, and referring to Fig. 1, the method comprises:
101: the current window of search mobile terminal.
102: if there is dummy keyboard or default available control in current window, current window is carried out to orderly button operation.
103: if not dummy keyboard or default available control in current window carry out unordered button operation to current window.
Further, if there is dummy keyboard or default available control in current window, current window is carried out to orderly button operation, comprising:
Judge and in current window, whether have dummy keyboard;
If there is dummy keyboard in current window, the dummy keyboard in current window is carried out to orderly button operation;
If dummy keyboard not in current window, judges whether there is default available control in current window;
If there is default available control in current window, the available control in current window carried out to orderly button operation.
Further, the dummy keyboard in current window is carried out to orderly button operation, comprising:
According to default selective rule, from default character repertoire, select the input frame of dummy keyboard in a character input current window, and carriage return; Or
Utilize default random function, produce at random a character, by the input frame of dummy keyboard in the character input current window producing, and carriage return; Or
According to default input rule, from the dummy keyboard of current window, select the input frame of dummy keyboard in character input current window, and carriage return.
Further, the available control in current window is carried out to orderly button operation, comprising:
According to the characteristic of available control in current window, from default instruction database, choose orderly operational order;
According to orderly operational order, the available control in current window is carried out to button operation.
Further, after current window is carried out orderly button operation or current window is carried out to unordered button operation, also comprise:
Judgement mobile terminal Shi Fou Noise-of-dashing-waves bursts to dodge and moves back crash;
If crash, records crash situation, restart mobile terminal, then carry out the step of the current window of search mobile terminal.
Random key-press test method described in the embodiment of the present invention, if there is dummy keyboard or default available control in current window, current window is carried out to orderly button operation, if not dummy keyboard or default available control in current window, current window being carried out to unordered button operation, orderly button operation and unordered button operation can be combined, is not completely random, reduce invalid button operation, can improve the efficiency of test.And button operation, to there being corresponding operating position, can improve the coverage rate of test in order.
Embodiment bis-
The embodiment of the present invention provides a kind of random key-press test method, and referring to Fig. 2, the method comprises:
201: start test, judge whether to arrive the test duration of appointment, if arrived, finish; Otherwise, carry out 202.
Particularly, can set in advance the test duration of appointment, within the test duration of appointment, loop random key testing, wherein, the test duration of appointment can be 1 minute, 1 hour, 2 hours etc., can the concrete value of the test duration of appointment be set according to practical situations, this is not limited.
202: the current window of search mobile terminal, judge in current window whether have dummy keyboard, if existed, carry out 203; Otherwise, carry out 206.
Particularly, the interface function that can provide by mobile terminal system judges in current window whether have dummy keyboard, for iOS system, if interface function returns to 1, in current window, has dummy keyboard; If interface function returns to 0, dummy keyboard not in current window.
203: the dummy keyboard in current window is carried out to orderly button operation.
Particularly, the dummy keyboard in current window is carried out to orderly button operation, comprises several method below:
First: according to default selective rule, from default character repertoire, select the input frame of dummy keyboard in a character input current window, and carriage return.
Wherein, default selective rule comprises: random select, according to the order from upper to little from left to right etc., can selective rule be set according to practical application situation, this is not limited.
Wherein, default character repertoire is the database that stores various characters setting in advance, and the length of each character does not limit, and can be the character of any length.It is medium that default character repertoire can be arranged on mobile terminal server.
Select the input frame of dummy keyboard in a character input current window, and carriage return, particularly, the character of selecting is inputted to the position coordinates corresponding to input frame of dummy keyboard, and clicked the position coordinates of enter key.
Second: utilize default random function, produce at random a character, by the input frame of dummy keyboard in the character input current window producing, and carriage return.
Wherein, default random function can be any one function that can produce character, can select any random function according to practical application situation, and this is not limited.Wherein, the character of generation can be random length.
The 3rd: according to default input rule, from the dummy keyboard of current window, select the input frame of dummy keyboard in character input current window, and carriage return.
Wherein, default input rule can be from dummy keyboard, to select at random character input input frame, or from dummy keyboard, selects default character input input frame etc., can select any input rule according to practical application situation, and this is not limited.
204: judgement mobile terminal Shi Fou Noise-of-dashing-waves bursts to dodge and moves back crash, if crash carries out 205; Otherwise, carry out 201.
205: record crash situation, restart mobile terminal, then carry out 201.
206: judge in current window whether have default available control, if existed, carry out 207; Otherwise, carry out 208.
Wherein, judge in current window, whether there is default available control, can be by title or the ID(Identity of available control, sign) etc. judge, comprise particularly:
In the available control existing in judgement current window, whether have the title available control identical with default keyword of available control:
If existed, judge the default available control of existence in current window.Or
In the available control existing in judgement current window, whether have the ID available control identical with default ID of available control;
If existed, judge the default available control of existence in current window.
207: the available control in current window is carried out to orderly button operation, then carry out 204.
Particularly, the available control in current window is carried out to orderly button operation, comprising:
According to the characteristic of available control in current window, from default instruction database, choose orderly operational order;
According to orderly operational order, the available control in current window is carried out to button operation.
Particularly, the interface of current window is different, corresponding available control is different, orderly operational order is also different, if the interface of current window is bookmark interface, corresponding available control is edit control, controls the control of certain bookmark etc., and corresponding orderly operational order is:--> clicks a certain the position that bookmark control is corresponding--> is at a string character of Position input corresponding to input control--, and > has clicked the position that control is corresponding to click position corresponding to edit control.
Can orderly operational order be set according to the feature of available control in each window, be stored in default instruction database, when needed, then choose from default instruction database.
208: current window is carried out to unordered button operation, then carry out 204.
Particularly, current window is carried out to unordered button operation, comprising:
On mobile terminal current window, a pixel of random selection, carries out button operation to the pixel of selecting; Or
Search the available control on mobile terminal current window, from the available control finding, an available control of random selection, carries out button operation to the available control of selecting.
Random key-press test method described in the embodiment of the present invention, if there is dummy keyboard or default available control in current window, current window is carried out to orderly button operation, if not dummy keyboard or default available control in current window, current window being carried out to unordered button operation, orderly button operation and unordered button operation can be combined, is not completely random, reduce invalid button operation, can improve the efficiency of test.And button operation, to there being corresponding operating position, can improve the coverage rate of test in order.
Embodiment tri-
Referring to Fig. 3, the embodiment of the present invention provides a kind of random button testing device, and this device comprises:
Search module 301, for searching for the current window of mobile terminal;
The first button operation module 302, while there is dummy keyboard or default available control for search current window when search module 301, carries out orderly button operation to current window;
The second button operation module 303, for searching current window when search module 301 not when dummy keyboard or default available control, carries out unordered button operation to current window.
Further, the first button operation module 302 comprises:
The first judging unit, after the current window when search module 301 search mobile terminals, judges in current window, whether there is dummy keyboard;
The first key operation unit, for when the first judging unit judgement current window exists dummy keyboard, carries out orderly button operation to the dummy keyboard in current window;
The second judging unit, for when the first judging unit judgement current window is not during dummy keyboard, judges in current window, whether there is default available control;
The second key operation unit, for when the second judging unit judgement current window exists default available control, carries out orderly button operation to the available control in current window.
Further, the first key operation unit comprises:
The first button operation subelement, for the selective rule according to default, from default character repertoire, selects the input frame of dummy keyboard in a character input current window, and carriage return; Or
The second button operation subelement, for utilizing default random function, produces a character at random, by the input frame of dummy keyboard in the character input current window producing, and carriage return; Or
The 3rd button operation subelement, for the input rule according to default, from the dummy keyboard of current window, selects the input frame of dummy keyboard in character input current window, and carriage return.
Further, the second key operation unit comprises:
Choose subelement, for according to the characteristic of the available control of current window, from default instruction database, choose orderly operational order;
Process subelement, for choosing after orderly operational order choosing subelement, according to orderly operational order, the available control in current window is carried out to button operation.
Further, referring to Fig. 4, this device also comprises:
Judge module 304, for carrying out when 302 pairs of current windows of the first button operation module after orderly button operation or 303 pairs of current windows of the second button operation module carry out unordered button operation, judgement mobile terminal Shi Fou Noise-of-dashing-waves bursts to dodge and moves back crash;
Notification module 305, for after judge module 304 judgement mobile terminal crash, records crash situation, restarts mobile terminal, then notifies search module 301 to carry out the step of the current window of search mobile terminal.
Random button testing device described in the embodiment of the present invention, if there is dummy keyboard or default available control in current window, current window is carried out to orderly button operation, if not dummy keyboard or default available control in current window, current window being carried out to unordered button operation, orderly button operation and unordered button operation can be combined, is not completely random, reduce invalid button operation, can improve the efficiency of test.And button operation, to there being corresponding operating position, can improve the coverage rate of test in order.
It should be noted that: the random button testing device that above-described embodiment provides, only the division with above-mentioned each functional module is illustrated, in practical application, can above-mentioned functions be distributed and by different functional modules, completed as required, the inner structure that is about to device is divided into different functional modules, to complete all or part of function described above.In addition, the random button testing device that above-described embodiment provides belongs to same design with random key-press test method embodiment, and its specific implementation process refers to embodiment of the method, repeats no more here.
The invention described above embodiment sequence number, just to describing, does not represent the quality of embodiment.
One of ordinary skill in the art will appreciate that all or part of step that realizes above-described embodiment can complete by hardware, also can come the hardware that instruction is relevant to complete by program, described program can be stored in a kind of computer-readable recording medium, the above-mentioned storage medium of mentioning can be ROM (read-only memory), disk or CD etc.
The foregoing is only preferred embodiment of the present invention, in order to limit the present invention, within the spirit and principles in the present invention not all, any modification of doing, be equal to replacement, improvement etc., within all should being included in protection scope of the present invention.

Claims (10)

1. a random key-press test method, is characterized in that, described method comprises:
The current window of search mobile terminal;
If there is dummy keyboard or default available control in described current window, described current window carried out to orderly button operation;
If not dummy keyboard or default available control in described current window, carry out unordered button operation to described current window.
2. method according to claim 1, is characterized in that, if there is dummy keyboard or default available control in described current window, described current window is carried out to orderly button operation, comprising:
Judge and in described current window, whether have dummy keyboard;
If there is dummy keyboard in described current window, the dummy keyboard in described current window is carried out to orderly button operation;
If dummy keyboard not in described current window, judges whether there is default available control in described current window;
If there is default available control in described current window, the available control in described current window carried out to orderly button operation.
3. method according to claim 2, is characterized in that, described dummy keyboard in described current window is carried out to orderly button operation, comprising:
According to default selective rule, from default character repertoire, select a character to input the input frame of dummy keyboard in described current window, and carriage return; Or
Utilize default random function, produce at random a character, the character of generation is inputted to the input frame of dummy keyboard in described current window, and carriage return; Or
According to default input rule, from the dummy keyboard of described current window, select character to input the input frame of dummy keyboard in described current window, and carriage return.
4. method according to claim 2, is characterized in that, described available control in described current window is carried out to orderly button operation, comprising:
According to the characteristic of available control in described current window, from default instruction database, choose orderly operational order;
According to orderly operational order, the available control in described current window is carried out to button operation.
5. according to the method described in claim 1-4 any one claim, it is characterized in that, described described current window is carried out orderly button operation or described current window is carried out to unordered button operation after, also comprise:
Judging that described mobile terminal Shi Fou Noise-of-dashing-waves burst to dodge moves back crash;
If crash, records crash situation, restart described mobile terminal, then carry out the step of the current window of described search mobile terminal.
6. a random button testing device, is characterized in that, described device comprises:
Search module, for searching for the current window of mobile terminal;
The first button operation module, while there is dummy keyboard or default available control for search described current window when described search module, carries out orderly button operation to described current window;
The second button operation module, for searching described current window when described search module not when dummy keyboard or default available control, carries out unordered button operation to described current window.
7. device according to claim 6, is characterized in that, described the first button operation module comprises:
The first judging unit, after the current window when described search module search mobile terminal, judges in described current window, whether there is dummy keyboard;
The first key operation unit, for when described the first judging unit judges that described current window exists dummy keyboard, carries out orderly button operation to the dummy keyboard in described current window;
The second judging unit, for judging that when described the first judging unit described current window is not during dummy keyboard, judges in described current window, whether there is default available control;
The second key operation unit, when judging that when described the second judging unit described current window exists default available control, carries out orderly button operation to the available control in described current window.
8. device according to claim 7, is characterized in that, described the first key operation unit comprises:
The first button operation subelement, for the selective rule according to default, from default character repertoire, selects a character to input the input frame of dummy keyboard in described current window, and carriage return; Or
The second button operation subelement, for utilizing default random function, produces a character at random, the character of generation is inputted to the input frame of dummy keyboard in described current window, and carriage return; Or
The 3rd button operation subelement, for the input rule according to default, from the dummy keyboard of described current window, selects character to input the input frame of dummy keyboard in described current window, and carriage return.
9. device according to claim 7, is characterized in that, described the second key operation unit comprises:
Choose subelement, for according to the characteristic of the available control of described current window, from default instruction database, choose orderly operational order;
Process subelement, for choosing after orderly operational order at the described subelement of choosing, according to orderly operational order, the available control in described current window is carried out to button operation.
10. according to the device described in claim 6-9 any one claim, it is characterized in that, described device also comprises:
Judge module, for when described the first button operation module, described current window being carried out after orderly button operation or described the second button operation module carry out unordered button operation to described current window, judges that described mobile terminal Shi Fou Noise-of-dashing-waves bursts to dodge to move back crash;
Notification module, for judging after described mobile terminal crash when described judge module, records crash situation, restarts described mobile terminal, then notifies described search module to carry out the step of the current window of described search mobile terminal.
CN201210318525.0A 2012-08-31 2012-08-31 Random key test method and device Active CN103678094B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201210318525.0A CN103678094B (en) 2012-08-31 2012-08-31 Random key test method and device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201210318525.0A CN103678094B (en) 2012-08-31 2012-08-31 Random key test method and device

Publications (2)

Publication Number Publication Date
CN103678094A true CN103678094A (en) 2014-03-26
CN103678094B CN103678094B (en) 2018-01-23

Family

ID=50315735

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201210318525.0A Active CN103678094B (en) 2012-08-31 2012-08-31 Random key test method and device

Country Status (1)

Country Link
CN (1) CN103678094B (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106569938A (en) * 2016-10-27 2017-04-19 厦门美图之家科技有限公司 Pressure testing method and apparatus of application program
CN108664364A (en) * 2017-03-31 2018-10-16 腾讯科技(深圳)有限公司 A kind of terminal test method and device

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20060205397A1 (en) * 2005-03-11 2006-09-14 Yahoo! Inc. Tester for determining the validity of a feature in a remote device
CN101137170A (en) * 2007-09-04 2008-03-05 深圳市中兴移动通信有限公司 Software automatic testing instrument and method of embedded equipment
CN101751329A (en) * 2008-12-18 2010-06-23 大唐移动通信设备有限公司 Method and system for realizing automatic testing
CN102053911A (en) * 2010-12-30 2011-05-11 东莞宇龙通信科技有限公司 Automated testing method and system based on Android and mobile terminal
CN102236598A (en) * 2010-05-07 2011-11-09 腾讯科技(深圳)有限公司 Method and device for testing software

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20060205397A1 (en) * 2005-03-11 2006-09-14 Yahoo! Inc. Tester for determining the validity of a feature in a remote device
CN101137170A (en) * 2007-09-04 2008-03-05 深圳市中兴移动通信有限公司 Software automatic testing instrument and method of embedded equipment
CN101751329A (en) * 2008-12-18 2010-06-23 大唐移动通信设备有限公司 Method and system for realizing automatic testing
CN102236598A (en) * 2010-05-07 2011-11-09 腾讯科技(深圳)有限公司 Method and device for testing software
CN102053911A (en) * 2010-12-30 2011-05-11 东莞宇龙通信科技有限公司 Automated testing method and system based on Android and mobile terminal

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
刘冠琼: "基于OphoneOS平台的MTBF测试研究与应用", 《中国优秀硕士学位论文全文数据库 信息科技辑》 *

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106569938A (en) * 2016-10-27 2017-04-19 厦门美图之家科技有限公司 Pressure testing method and apparatus of application program
CN106569938B (en) * 2016-10-27 2019-07-05 厦门美图之家科技有限公司 The method for testing pressure and device of application program
CN108664364A (en) * 2017-03-31 2018-10-16 腾讯科技(深圳)有限公司 A kind of terminal test method and device
CN108664364B (en) * 2017-03-31 2023-05-09 腾讯科技(深圳)有限公司 Terminal testing method and device

Also Published As

Publication number Publication date
CN103678094B (en) 2018-01-23

Similar Documents

Publication Publication Date Title
CN102801853B (en) Mobile phone and method for automatically triggering task execution
CN106033393B (en) A kind of applied program testing method and system and mobile terminal
CN102999334A (en) Android platform-based shortcut implementation method, device and terminal
CN103414628B (en) A kind of conversation recording consults method and device
CN111163503A (en) Network searching method of mobile terminal and mobile terminal
CN105094550A (en) Movement operation method and device for desktop icons
CN105072278A (en) Method and mobile phone for rapidly dialling telephone of appointed contact person in black screen state
CN102663055A (en) Method, device and browser for realizing browser navigation
CN107168613B (en) Interface interaction method and cluster terminal
CN106155721A (en) The deployment method of application program, the generation method and device of the recommendation page
CN103324478A (en) Mobile terminal and application program management method thereof
CN104598507A (en) Information searching method and device
CN106528409A (en) Application crash problem finding method and device
CN102222021A (en) Input method panel switching method and device
CN104899140B (en) A kind of method of testing of mobile terminal component
CN104794412A (en) Information input method and device and mobile terminal
CN105205066B (en) Picture searching method and device
CN106372076A (en) Method and device for switching webpages in browsers
KR101952048B1 (en) Method and apparatus for image selection
CN111131002B (en) Method, system and storage medium for tracing chat records
CN103678094A (en) Random key test method and device
CN104219355A (en) Method and device used for speed dial as well as mobile communication equipment
CN103024928A (en) Terminal wireless connection method and wireless terminal
CN103235682B (en) A kind of method and device showing menu
US8922491B2 (en) Method and apparatus enabling keystroke acceleration

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
C10 Entry into substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant