CN103678059A - Random key testing method and device - Google Patents

Random key testing method and device Download PDF

Info

Publication number
CN103678059A
CN103678059A CN201210364822.9A CN201210364822A CN103678059A CN 103678059 A CN103678059 A CN 103678059A CN 201210364822 A CN201210364822 A CN 201210364822A CN 103678059 A CN103678059 A CN 103678059A
Authority
CN
China
Prior art keywords
module
screen
click
touch
probability
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
CN201210364822.9A
Other languages
Chinese (zh)
Other versions
CN103678059B (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 CN201210364822.9A priority Critical patent/CN103678059B/en
Publication of CN103678059A publication Critical patent/CN103678059A/en
Application granted granted Critical
Publication of CN103678059B publication Critical patent/CN103678059B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Abstract

The embodiment of the invention discloses a random key testing method and device. The method includes the steps that the click rate of each module on a touch screen is acquired, wherein the number of the modules on the touch screen is larger than 1 at least; the click probability of each module is acquired according to the click rate of the module; one module is selected according to the click probabilities of the modules; a testing point is randomly selected from the selected module to carry out testing. According to the method, the touch screen is divided into a plurality of modules, and the click probability of each module to be clicked by a user is acquired; during random key testing, one module is selected first according to the click probabilities of the modules, and then the testing point is randomly selected from the selected module to carry out testing. Compared with the prior art that points on a touch screen are blindly selected to carry out testing, the random key testing method avoids the situation that a large number of meaningless points which are not likely to be clicked by the user also participate in testing; according to the scheme, operation habits of the user can be simulated more vividly, the accuracy of test results can be improved, and testing efficiency can be improved as well.

Description

A kind of random key-press test method and device
Technical field
The present invention relates to electronic information technical field, be specifically related to a kind of random key-press test method and device.
Background technology
Brisk in the market due to mobile phone terminal, the random key-press test method to handset touch panel plays an important role in mobile phone is produced.Current two large mobile phone operation platforms, Android (Android) and IOS, can realize the automatic test of random occurrence.The random key-press test method providing on Android, may operate in simulator or in physical device, and this existing method flows by sending pseudorandom customer incident, as key-press input, touch-screen input, gesture input etc., realize the test that application programs is carried out random occurrence.On ios platform, also can test random button by similar method.
The random key-press test method of prior art is random completely; the screen coordinate that much can not operate also often can be arrived at random; especially a lot of screen coordinates under the interface of pop-up box are the screen coordinates that can not operate; therefore; in prior art, in random operation, to the click probability of whole screen, being identical, is much invalid operation; test key command is caused to handset program collapse, or the analysis that sudden strain of a muscle is moved back is invalid data.
Summary of the invention
The embodiment of the present invention provides a kind of random key-press test method and device, occurs a large amount of invalid test points while having overcome in prior art random key testing, reduces the problem of testing efficiency.
The embodiment of the present invention provides a kind of random key-press test method, and described method comprises:
Obtain the click volume of each module on touch-screen; Wherein, the module number on touch-screen is at least greater than 1;
According to the click volume of each module, obtain the click probability of each module;
According to the click probability of each module, choose a module;
In the module of selecting, choosing at random test point tests.
The embodiment of the present invention provides device described in a kind of random button testing device to comprise: obtain click volume unit, obtain and click probability unit, selected cell, and test cell;
The described click volume unit that obtains, for obtaining the click volume of each module on touch-screen; Wherein, the module number on touch-screen is at least greater than 1;
Described obtaining clicked probability unit, for according to the click volume of each module, obtains the click probability of each module;
Described selected cell, according to the click probability of each module, chooses a module;
Described test cell, chooses at random test point for the module selecting and tests.
As can be seen from the above technical solutions, the embodiment of the present invention has the following advantages and comprises: touch-screen is divided to a plurality of modules, and obtain the click probability of user to each module, when carrying out random key testing, according to the click probability of each module, first select the module at the place of test, then a test point of random selection is tested in the module at place.The prior art of the comparing point of choosing at random on touch-screen is blindly tested, the a lot of meaningless points that can not clicked by user are also tested, the scheme that the embodiment of the present invention provides, the operating habit of analog subscriber that can be more true to nature, accuracy and the testing efficiency of raising test result.
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 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.
A kind of random key-press test method general flow chart that shown in Fig. 1, the embodiment of the present invention provides;
Shown in Fig. 2, obtain the click volume concrete operations general flow chart of each module on touch-screen;
A kind of random button testing device simplified schematic diagram that shown in Fig. 3, the embodiment of the present invention provides;
Shown in Fig. 4, obtain the simplified schematic diagram of click volume unit.
Embodiment
A kind of random key-press test method and device that the invention process example provides, touch-screen screen is divided into a plurality of modules, utilize the evolutionary operator probability of user to modules, the operation of analog subscriber to modules, thereby it is more accurate to make random key testing, more can embody the real operating habit of user, improve the accuracy of test result.
A kind of random key-press test method general flow chart as shown in Figure 1.
S10, obtains the click volume of each module on touch-screen; Wherein, the module number on touch-screen is at least greater than 1;
In the present embodiment touch-screen is divided into a plurality of modules, the number of module, and the division shape of module can have difference according to designing requirement.By dividing module, object is by the less region of the touch-screen unit of being divided into, so that follow-up, regional is carried out to differential processing.Here said differential processing, i.e. the probability of analog subscriber to the click of different modules, some module is often clicked, and some module is often not clicked, or never click.
S12, according to the click volume of each module, obtains the click probability of each module;
Exemplify in the present embodiment click probability and identify with percent, for example: touch-screen is divided into 4 modules, and module 1, module 2, module 3, and module 4; Equipment is according to the click volume of collecting, and the click probability of knowing module 1 is 40%, and the click probability of module 2 is 30%, and the click probability of module 3 is 20%, and the click probability of module 4 is 10%.Here be only giving an example of being convenient to understand, not limitation of the present invention.
S14, according to the click probability of each module, chooses a module;
S16 chooses at random test point and tests in the module of selecting.
Wherein, in S14, according to the click probability of each module, choose specifically controlling of a module to comprise:
S141, selects a natural number at random, and this natural span sets in advance, S142, according to the click probability of each module, natural span is divided into a plurality of segmentations according to clicking probability, the number of segmentation is identical with the quantity of module, record the corresponding relation of segmentation and module, S143, according to the natural value of random selection, judges the segmentation at this natural value place, and then judge the module of choosing, described in the module chosen be module corresponding to segmentation.
For example: a random natural number can from 0 to 99, be designated as a, as judgement, choose the foundation of a certain module, wherein, by 0 to 99 span, according to the click probability of module, be divided into: 0<=a<40,40<=a<70,70<=a<90, and tetra-segmentations of 90<=a<100.If 0<=a<40, thinks to have chosen module 1, in module 1, go out at random a point and operate; If 40<=a<70, thinks to have chosen module 2, in module 2, choose at random a point operation; If 70<=a<90, thinks to have chosen module 3, in module 3, choose at random a point operation; If 90<=a<100, thinks to have chosen module 4, in module 4, choose at random a point operation.
Here the said operation to a point, can be to double-click, clicks, and the slips operation of etc.ing, the instruction of analog subscriber to touch-screen, makes on basis that equipment is accustomed at analog subscriber, finds that corresponding program has collapse, sudden strain of a muscle the phenomenon such as to move back.The result of this test facilitates deviser further to analyze the problem on touch-screen, solves.
By the above-mentioned explanation to a kind of random key-press test method shown in Fig. 1, in the method, touch-screen is divided to a plurality of modules, and obtain the click probability of user to each module, when carrying out random key testing, according to the click probability of each module, first choose the module at test point place, then a test point of random selection is tested in the module at place.The prior art of the comparing point of choosing at random on touch-screen is blindly tested, the a lot of meaningless points that can not clicked by user are also tested, the scheme that the embodiment of the present invention provides, the operating habit of analog subscriber that can be more true to nature, accuracy and the testing efficiency of raising test result.
Preferably, the method, before S10, can also comprise:
S18, carries out Module Division to touch-screen;
The method is divided into several modules by touch screen interface based on screen coordinate, and the horizontal stroke of each module, ordinate have a span, and four of mobile phone consistent towards dividing, that is, identical function four towards on be all to belong to same module.Current most of mobile phone can horizontal screen and perpendicular screen switch, by rotate mobile phone towards switching, totally four mobile phones towards, namely master control (home) key is at the perpendicular screen of lower representative; Home key represents horizontal screen left, and home key represents horizontal screen right; Home key is at the perpendicular screen of upper representative.
Can be specifically according to the Application Program Interface that touches screen display, touch-screen is divided into several modules, such as adding the button of bookmark in browser, home key under towards time, always can be in (220,120) ~ (230,130) this block, so this towards on, all screen coordinates in this block, as a module, are designated as modules A; And at home key in left direction, the button that adds bookmark can be at this block of (120,830) ~ (130,840), so this towards time, this block is also modules A, by that analogy other direction.
Preferably, as shown in Figure 2, above-mentioned S10, obtains the click volume of each module on touch-screen, can specifically comprise following operation:
S100, when user clicks touch-screen, obtains the current direction of touch-screen, and the screen coordinate of clicking point;
S102, the direction current according to touch-screen, and the screen coordinate of clicking point, judge the affiliated module of this clicking point;
S104 adds 1 on the click record of the module of judging.
Equipment can be collected the number of clicks of user to modules by carrying out S100 to S104.When equipment will be carried out random key testing operation, from each module being clicked to the click volume that can obtain each module on touch-screen record, thereby carry out subsequent operation.
A kind of random button testing device that shown in Fig. 3, the embodiment of the present invention provides, this device comprises: obtain click volume unit 301, obtain and click probability unit 302, selected cell 303, and test cell 304.
Wherein, obtain click volume unit 301, for obtaining the click volume of each module on touch-screen; Wherein, the module number on touch-screen is at least greater than 1;
In the present embodiment touch-screen is divided into a plurality of modules, the number of module, and the division shape of module can have difference according to designing requirement.By dividing module, object is by the less region of the touch-screen unit of being divided into, so that follow-up, regional is carried out to differential processing.Here said differential processing, i.e. the probability of analog subscriber to the click of different modules, some module is often clicked, and some module is often not clicked, or never click.
Obtain and click probability unit 302, for according to the click volume of each module, obtain the click probability of each module;
Exemplify in the present embodiment click probability and identify with percent, for example: touch-screen is divided into 4 modules, and module 1, module 2, module 3, and module 4; Equipment is according to the click volume of collecting, and the click probability of knowing module 1 is 40%, and the click probability of module 2 is 30%, and the click probability of module 3 is 20%, and the click probability of module 4 is 10%.Here be only giving an example of being convenient to understand, not limitation of the present invention.
Selected cell 303, for according to the click probability of each module, chooses a module module;
Wherein, selected cell, can be specifically for a natural number of random selection, and described natural span sets in advance; According to the click probability of each module, natural span is divided into a plurality of segmentations according to clicking probability, the number of segmentation is identical with the quantity of module; Record the corresponding relation of segmentation and module; According to the natural value of random selection, judge the segmentation at this natural value place, and then judge the module of choosing, described in the module chosen be module corresponding to segmentation.
Test cell 304, chooses at random test point for the module selecting and tests.
By the above-mentioned explanation to a kind of random button testing device shown in Fig. 3, in this device, touch-screen is divided to a plurality of modules, and click probability unit by obtaining, obtain the click probability of user to each module, when carrying out random key testing, according to the click probability of each module, first by selected cell, select the module at test point place, then a test point of random selection is tested in the module at place.The prior art of the comparing point of choosing at random on touch-screen is blindly tested, the a lot of meaningless points that can not clicked by user are also tested, the scheme that the embodiment of the present invention provides, the operating habit of analog subscriber that can be more true to nature, accuracy and the testing efficiency of raising test result.
Preferably, this device also comprises: divide modular unit 305, for touch-screen is carried out to Module Division; Concrete method of dividing does not limit, and being convenient to understand as exemplified a kind of concrete splitting scheme in 1 explanation, does not repeat herein.
Preferably, as shown in Figure 4, in this device, obtain click volume unit 301, also comprise: the first acquiring unit 3011, judgement ownership unit 3012, and record cell 3013.
The first acquiring unit 3011, for when user clicks touch-screen, obtains the current direction of touch-screen, and the screen coordinate of clicking point;
Judgement ownership unit 3012, for the direction current according to touch-screen, and the screen coordinate of clicking point, judge the affiliated module of this clicking point;
Record cell 3013, adds 1 on the click record for the module judging.Thereby when device carries out random key testing, can directly obtain the number of clicks of the module of record.
One of ordinary skill in the art will appreciate that all or part of step realizing in above-described embodiment method is to 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.
Above a kind of random key-press test method provided by the present invention and device are described in detail, for one of ordinary skill in the art, thought according to the embodiment of the present invention, all will change in specific embodiments and applications, in sum, this description should not be construed as limitation of the present invention.

Claims (8)

1. a random key-press test method, is characterized in that, described method comprises:
Obtain the click volume of each module on touch-screen; Wherein, the module number on touch-screen is at least greater than 1;
According to the click volume of each module, obtain the click probability of each module;
According to the click probability of each module, choose a module;
In the module of selecting, choosing at random test point tests.
2. method according to claim 1, is characterized in that, described in obtain the click volume of each module on touch-screen before, described method also comprises:
Touch-screen is carried out to Module Division.
3. method according to claim 1, is characterized in that, described in obtain the click volume of each module on touch-screen, comprising:
When user clicks touch-screen, obtain the current direction of touch-screen, and the screen coordinate of clicking point;
The direction current according to touch-screen, and the screen coordinate of clicking point, judge the affiliated module of this clicking point;
On the click record of the module of judging, add 1.
4. method according to claim 1, is characterized in that, according to the click probability of each module, chooses a module, specifically comprises:
A natural number of random selection, described natural span sets in advance;
According to the click probability of each module, natural span is divided into a plurality of segmentations according to clicking probability, the number of segmentation is identical with the quantity of module;
Record the corresponding relation of segmentation and module;
According to the natural value of random selection, judge the segmentation at this natural value place, and then judge the module of choosing, described in the module chosen be module corresponding to segmentation.
5. a random button testing device, is characterized in that, described device comprises: obtain click volume unit, obtain and click probability unit, selected cell, and test cell;
The described click volume unit that obtains, for obtaining the click volume of each module on touch-screen; Wherein, the module number on touch-screen is at least greater than 1;
Described obtaining clicked probability unit, for according to the click volume of each module, obtains the click probability of each module;
Described selected cell, according to the click probability of each module, chooses a module;
Described test cell, chooses at random test point for the module selecting and tests.
6. device according to claim 5, is characterized in that, described device also comprises: divide modular unit, for touch-screen is carried out to Module Division.
7. device according to claim 5, is characterized in that, described in obtain click volume unit and specifically comprise: the first acquiring unit, judgement ownership unit, and record cell;
Described the first acquiring unit, for when user clicks touch-screen, obtains the current direction of touch-screen, and the screen coordinate of clicking point;
Described judgement ownership unit, for the direction current according to touch-screen, and the screen coordinate of clicking point, judge the affiliated module of this clicking point;
Described record cell, adds 1 on the click record for the module judging.
8. device according to claim 5, is characterized in that, described selected cell,
Specifically for a natural number of random selection, described natural span sets in advance; According to the click probability of each module, natural span is divided into a plurality of segmentations according to clicking probability, the number of segmentation is identical with the quantity of module; Record the corresponding relation of segmentation and module; According to the natural value of random selection, judge the segmentation at this natural value place, and then judge the module of choosing, described in the module chosen be module corresponding to segmentation.
CN201210364822.9A 2012-09-26 2012-09-26 A kind of random key test method and device Active CN103678059B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201210364822.9A CN103678059B (en) 2012-09-26 2012-09-26 A kind of random key test method and device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201210364822.9A CN103678059B (en) 2012-09-26 2012-09-26 A kind of random key test method and device

Publications (2)

Publication Number Publication Date
CN103678059A true CN103678059A (en) 2014-03-26
CN103678059B CN103678059B (en) 2017-12-01

Family

ID=50315704

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201210364822.9A Active CN103678059B (en) 2012-09-26 2012-09-26 A kind of random key test method and device

Country Status (1)

Country Link
CN (1) CN103678059B (en)

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104301482A (en) * 2014-09-26 2015-01-21 昆山迈致治具科技有限公司 Home key testing device
CN104461801A (en) * 2014-11-28 2015-03-25 广东欧珀移动通信有限公司 Method and system for testing sensitiveness of touch screen
CN110865258A (en) * 2019-11-28 2020-03-06 西安中颖电子有限公司 Key detection circuit and key detection method for segmented comparison by using multiple thresholds
CN113448868A (en) * 2021-07-16 2021-09-28 网易(杭州)网络有限公司 Game software compatibility testing method, device, equipment and medium

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20030193572A1 (en) * 2002-02-07 2003-10-16 Andrew Wilson System and process for selecting objects in a ubiquitous computing environment
US20080100586A1 (en) * 2006-10-26 2008-05-01 Deere & Company Method and system for calibrating a touch screen
CN101339530A (en) * 2007-07-02 2009-01-07 佛山市顺德区顺达电脑厂有限公司 Touch control type touch screen analog input test system and method
CN101354621A (en) * 2008-09-12 2009-01-28 青岛海信移动通信技术股份有限公司 Method and apparatus for determining touch screen calibration parameter
CN101442584A (en) * 2007-11-20 2009-05-27 中兴通讯股份有限公司 Touch screen mobile phone capable of improving key-press input rate
CN101776976A (en) * 2010-01-28 2010-07-14 意力(广州)电子科技有限公司 Linear test machine of capacitance touch screen

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20030193572A1 (en) * 2002-02-07 2003-10-16 Andrew Wilson System and process for selecting objects in a ubiquitous computing environment
US20080100586A1 (en) * 2006-10-26 2008-05-01 Deere & Company Method and system for calibrating a touch screen
CN101339530A (en) * 2007-07-02 2009-01-07 佛山市顺德区顺达电脑厂有限公司 Touch control type touch screen analog input test system and method
CN101442584A (en) * 2007-11-20 2009-05-27 中兴通讯股份有限公司 Touch screen mobile phone capable of improving key-press input rate
CN101354621A (en) * 2008-09-12 2009-01-28 青岛海信移动通信技术股份有限公司 Method and apparatus for determining touch screen calibration parameter
CN101776976A (en) * 2010-01-28 2010-07-14 意力(广州)电子科技有限公司 Linear test machine of capacitance touch screen

Cited By (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104301482A (en) * 2014-09-26 2015-01-21 昆山迈致治具科技有限公司 Home key testing device
CN104461801A (en) * 2014-11-28 2015-03-25 广东欧珀移动通信有限公司 Method and system for testing sensitiveness of touch screen
CN104461801B (en) * 2014-11-28 2017-11-07 广东欧珀移动通信有限公司 A kind of method of testing and system of touch-screen susceptibility
CN110865258A (en) * 2019-11-28 2020-03-06 西安中颖电子有限公司 Key detection circuit and key detection method for segmented comparison by using multiple thresholds
CN110865258B (en) * 2019-11-28 2022-02-22 西安中颖电子有限公司 Key detection circuit and key detection method for segmented comparison by using multiple thresholds
CN113448868A (en) * 2021-07-16 2021-09-28 网易(杭州)网络有限公司 Game software compatibility testing method, device, equipment and medium
CN113448868B (en) * 2021-07-16 2022-11-01 网易(杭州)网络有限公司 Game software compatibility testing method, device, equipment and medium

Also Published As

Publication number Publication date
CN103678059B (en) 2017-12-01

Similar Documents

Publication Publication Date Title
CN102904996B (en) The method and device of a kind of handset touch panel performance test, system
CN106326104B (en) Terminal control testing method and device
CN108717393A (en) A kind of applied program testing method and mobile terminal
JP2019501446A (en) Test method, test system, test apparatus, and readable recording medium
CN104331373A (en) Monkey test system and method
CN104050076A (en) Testing method, device and system of application software on mobile terminal
CN106909247B (en) Touch simulation system, method and device and touch terminal test equipment and method
CN105511853A (en) Method and system for arraying desktop application program icons
CN106126424A (en) A kind of visual automated testing method of script, device and mobile terminal
CN103678059A (en) Random key testing method and device
CN103814373A (en) Automatic classification adjustment of recorded actions for automation script
CN104820565B (en) Slide command processing method and terminal
CN104699408A (en) Operation method and device of touch screen and touch device
CN108595330A (en) A kind of application testing method and device
CN111190826B (en) Testing method, device, storage medium and equipment for virtual reality immersive tracking environment
CN104598133B (en) The specification generation method and device of object
CN102622233A (en) System and method for automatically generating user interface applicable to certain interactive terminal equipment
CN109840201B (en) UI test method, device, electronic equipment and computer readable storage medium
CN107179854A (en) A kind of list display method and device
CN105138458A (en) Method and system for recording automatic testing scripts by combining intelligent terminal and computer terminal
CN106022070A (en) Operation method, device and terminal based on fingerprint recognition
JP5204343B1 (en) Test system and program
CN115543835A (en) Method and device for testing front-end page, testing equipment and storage medium
CN104142885A (en) Method and device for carrying out abnormality test on tested program
CN106095690A (en) The method of testing of application and mobile terminal

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