CN103678059B - A kind of random key test method and device - Google Patents
A kind of random key test method and device Download PDFInfo
- Publication number
- CN103678059B CN103678059B CN201210364822.9A CN201210364822A CN103678059B CN 103678059 B CN103678059 B CN 103678059B CN 201210364822 A CN201210364822 A CN 201210364822A CN 103678059 B CN103678059 B CN 103678059B
- Authority
- CN
- China
- Prior art keywords
- module
- screen
- touch
- click
- unit
- 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.)
- Active
Links
Abstract
The embodiment of the invention discloses a kind of random key test method and device, wherein, methods described includes:Obtain the click volume of each module on touch-screen;Wherein, the module number on touch-screen is at least above 1;According to the click volume of each module, the click probability of each module is obtained;According to the click probability of each module, a module is chosen;Test point is randomly selected in the module selected to be tested.Touch-screen is divided into multiple modules, and obtains click probability of the user to each module, when carrying out random key test, according to the click probability of each module, first chooses module, then randomly choose a test point in the module at place and tested.The point randomly selected on touch-screen of the prior art that compares blindness is tested, will not also it be tested by the point that user clicks on much meaningless, scheme provided in an embodiment of the present invention, the operating habit of analog subscriber that can be more true to nature, improve the degree of accuracy and the testing efficiency of test result.
Description
Technical field
The present invention relates to electronic information technical field, and in particular to a kind of random key test method and device.
Background technology
It is brisk in the market due to mobile phone terminal, to the random key test method of handset touch panel, sent out in mobile phone production
Wave important effect.Current two big mobile phone operation platform, i.e. Android(Android)And IOS, can realize chance event from
Dynamic test.The random key test method provided on Android, it may operate in simulator or in physical device, should
Existing method is realized corresponding by sending pseudorandom customer incident stream, such as key-press input, touch-screen input, gesture input etc.
The test of chance event is carried out with program.Random key can also be tested by similar method on ios platform.
Prior art random key test method is entirely random, and the screen coordinate that can not be much operated is also frequent
It can be arrived at random, many screen coordinates especially under the interface of pop-up box are the screen coordinates that can not be operated, therefore,
In the prior art in random operation, the click probability to whole screen is identical, is much invalid operation, and test button is referred to
Order causes handset program to collapse, or it is invalid data to dodge the analysis moved back.
The content of the invention
The embodiments of the invention provide a kind of random key test method and device, overcomes random key in the prior art
Occurs the problem of substantial amounts of invalid test point, reduction testing efficiency during test.
The embodiments of the invention provide a kind of random key test method, methods described includes:
Obtain the click volume of each module on touch-screen;Wherein, the module number on touch-screen is at least above 1;
According to the click volume of each module, the click probability of each module is obtained;
According to the click probability of each module, a module is chosen;
Test point is randomly selected in the module selected to be tested.
The embodiments of the invention provide a kind of random key test device described device to include:Click volume unit is obtained, is obtained
Take and click on probability unit, selecting unit, and test cell;
The acquisition click volume unit, for obtaining the click volume of each module on touch-screen;Wherein, the module on touch-screen
Quantity is at least above 1;
Described obtain clicks on probability unit, for the click volume according to each module, obtains the click probability of each module;
The selecting unit, according to the click probability of each module, choose a module;
The test cell, tested for randomly selecting test point in the module selected.
As can be seen from the above technical solutions, there is advantages below of the embodiment of the present invention to include:Touch-screen is divided multiple
Module, and obtain click probability of the user to each module, when carrying out random key test, according to the click probability of each module,
The module at the place of test is first selected, then randomly chooses a test point in the module at place and is tested.Compared to more existing
The point that techno peasant's purpose is randomly selected on touch-screen is tested, and will not also be surveyed by the point that user clicks on to much meaningless
Try, scheme provided in an embodiment of the present invention, the operating habit of analog subscriber that can be more true to nature, improve the degree of accuracy of test result
And testing efficiency.
Brief description of the drawings
In order to illustrate more clearly about the embodiment of the present invention or technical scheme of the prior art, below will be to embodiment or existing
There is the required accompanying drawing used in technology description to be briefly described, it should be apparent that, drawings in the following description are only this
Some embodiments of invention, for those of ordinary skill in the art, without having to pay creative labor, may be used also
To obtain other accompanying drawings according to these accompanying drawings.
A kind of random key test method general flow chart provided in an embodiment of the present invention shown in Fig. 1;
The click volume concrete operations general flow chart of each module on touch-screen is obtained shown in Fig. 2;
A kind of random key test device simplified schematic diagram provided in an embodiment of the present invention shown in Fig. 3;
The simplified schematic diagram of click volume unit is obtained shown in Fig. 4.
Embodiment
A kind of random key test method and device that of the embodiment of the present invention provides, multiple moulds are divided into by touch-screen screen
Block, the evolutionary operator probability using user to modules, operation of the analog subscriber to modules, so that being surveyed to random key
Examination is more accurate, can more embody the real operating habit of user, improve the accuracy of test result.
A kind of random key test method general flow chart as shown in Figure 1.
S10, obtain the click volume of each module on touch-screen;Wherein, the module number on touch-screen is at least above 1;
The division shape that touch-screen is divided into multiple modules, the number of module, and module in the present embodiment can be with
Difference is had according to design requirement.Pass through division module, it is therefore an objective to which it is the smaller region of unit to divide touch-screen, so as to follow-up right
Regional carries out differential processing.Differential processing mentioned here, i.e., click of the analog subscriber to different modules is general
Rate, some modules are often clicked, and some modules are infrequently clicked, or are never clicked on.
S12, according to the click volume of each module, obtain the click probability of each module;
Click probability is enumerated in the present embodiment to identify with percentage, such as:Touch-screen is divided into 4 modules, i.e. mould
Block 1, module 2, module 3, and module 4;Equipment is according to the click volume of collection, and the click probability for knowing module 1 is 40%, module 2
It is 30% to click on probability, and the click probability of module 3 is 20%, and the click probability of module 4 is 10%.Here only it is easy for the act understood
Example, not limitation of the present invention.
S14, according to the click probability of each module, choose a module;
S16, in the module selected randomly selecting test point is tested.
Wherein, according to the click probability of each module in S14, choosing the specific manipulation of a module can include:
S141, a natural number is randomly choosed, the span of the natural number is pre-set, S142, according to each mould
The click probability of block, the span of natural number is divided into multiple segmentations, the number of segmentation and the number of module according to probability is clicked on
Measure identical, record segmentation and the corresponding relation of module, S143, according to the value of randomly selected natural number, judge the natural number
Value where segmentation, and then judge the module chosen, the module chosen is module corresponding to segmentation.
Such as:Can from 0 to 99 in a random natural number, be designated as a, as judging to choose the foundation of a certain module, its
In, 0 to 99 span according to the click probability of module, is divided into:0<=a<40,40<=a<70,70<=a<90, and 90
<=a<100 4 segmentations.If 0<=a<40, then it is assumed that be that have selected module 1, go out a point at random in module 1 and grasped
Make;If 40<=a<70, then it is assumed that be that have selected module 2, randomly select a point operation in the block 2;If 70<=a<90,
Then it is considered to have selected module 3, a point operation is randomly selected in module 3;If 90<=a<100, then it is assumed that be that have selected
Module 4, a point operation is randomly selected in module 4.
Operation mentioned here to a point, can double-click, click, the operation such as slip, analog subscriber is to touch-screen
Instruction so that equipment finds that corresponding program has collapse, sudden strain of a muscle phenomena such as moving back on the basis of analog subscriber custom.The test
Result facilitate the problem of designer is on touch-screen further to analyze, solve.
It is in this method that touch-screen division is more by a kind of explanation of above-mentioned random key test method to shown in Fig. 1
Individual module, and click probability of the user to each module is obtained, it is general according to the click of each module when carrying out random key test
Rate, the module where test point is first chosen, then randomly choose a test point in the module at place and tested.Compared to more existing
There is techno peasant's purpose to randomly select the point on touch-screen to be tested, will not also be carried out by the point that user clicks on to much meaningless
Test, scheme provided in an embodiment of the present invention, the operating habit of analog subscriber that can be more true to nature, improves the accurate of test result
Degree and testing efficiency.
Preferably, this method can also include before S10:
S18, Module Division is carried out to touch-screen;
Touch screen interface is divided into several modules, horizontal stroke, the ordinate of each module by this method based on screen coordinate
Have a span, four of mobile phone are consistent towards division, i.e. identical function four towards it is upper be all to belong to same
Individual module.Current most of mobile phone can transverse screen and portrait layout switching, switched over by rotating the direction of mobile phone, totally four
Mobile phone direction, that is, master control(home)Key represents portrait layout under;Home keys represent transverse screen left, and home keys represent horizontal stroke right
Screen;Home keys represent portrait layout upper.
Touch-screen can be divided into several modules with specific reference to the Application Program Interface for touching screen display, such as
The button of bookmark is added in browser, home keys under towards when, always can be(220,120)~(230,130)This area
Block, then at this towards upper, all screen coordinates in this block are designated as modules A as a module;And in home keys
In the direction on a left side, the button for adding bookmark can be(120,830)~(130,840)This block, then this towards when, this
Block is also modules A, by that analogy other directions.
Preferably, as shown in Fig. 2 above-mentioned S10, obtains the click volume of each module on touch-screen, can specifically include as follows
Operation:
S100, when user clicks on to touch-screen, obtain the current direction of touch-screen, and the screen coordinate of clicking point;
S102, according to the current direction of touch-screen, and the screen coordinate of clicking point, judge the mould belonging to the clicking point
Block;
S104, add 1 on the click record for the module judged.
Equipment can collect number of clicks of the user to modules by performing S100 to S104.When equipment to perform with
When machine key testing operates, the click volume of each module on touch-screen can be obtained to each module click record, so as to perform
Subsequent operation.
A kind of random key test device provided in an embodiment of the present invention, the device include shown in Fig. 3:Obtain click volume list
Member 301, obtain and click on probability unit 302, selecting unit 303, and test cell 304.
Wherein, click volume unit 301 is obtained, for obtaining the click volume of each module on touch-screen;Wherein, on touch-screen
Module number is at least above 1;
The division shape that touch-screen is divided into multiple modules, the number of module, and module in the present embodiment can be with
Difference is had according to design requirement.Pass through division module, it is therefore an objective to which it is the smaller region of unit to divide touch-screen, so as to follow-up right
Regional carries out differential processing.Differential processing mentioned here, i.e., click of the analog subscriber to different modules is general
Rate, some modules are often clicked, and some modules are infrequently clicked, or are never clicked on.
Obtain and click on probability unit 302, for the click volume according to each module, obtain the click probability of each module;
Click probability is enumerated in the present embodiment to identify with percentage, such as:Touch-screen is divided into 4 modules, i.e. mould
Block 1, module 2, module 3, and module 4;Equipment is according to the click volume of collection, and the click probability for knowing module 1 is 40%, module 2
It is 30% to click on probability, and the click probability of module 3 is 20%, and the click probability of module 4 is 10%.Here only it is easy for the act understood
Example, not limitation of the present invention.
Selecting unit 303, for the click probability according to each module, choose a module;
Wherein, selecting unit, one natural number of random selection can be specifically used for, the span of the natural number is pre-
First set;According to the click probability of each module, the span of natural number is divided into multiple segmentations according to probability is clicked on, is segmented
Number it is identical with the quantity of module;Record segmentation and the corresponding relation of module;According to the value of randomly selected natural number, judge
The segmentation gone out where the value of the natural number, and then judge the module chosen, the module chosen is module corresponding to segmentation.
Test cell 304, tested for randomly selecting test point in the module selected.
It is in the device that touch-screen division is more by a kind of explanation of above-mentioned random key test device to shown in Fig. 3
Individual module, and probability unit is clicked on by obtaining, click probability of the user to each module is obtained, when carrying out random key test,
According to the click probability of each module, first by selecting unit, the module where test point is selected, then selected at random in the module at place
A test point is selected to be tested.The point randomly selected on touch-screen of the prior art that compares blindness is tested, to a lot
Meaningless also to be tested by the point that user clicks on, scheme provided in an embodiment of the present invention, simulation that can be more true to nature is used
The operating habit at family, improve the degree of accuracy and the testing efficiency of test result.
Preferably, the device also includes:Division module unit 305, for carrying out Module Division to touch-screen;Specific division
Method do not limit, a kind of specific splitting scheme is illustrated in such as 1 explanation and is readily appreciated, is not repeated herein.
Preferably, as shown in figure 4, obtaining click volume unit 301 in the device, in addition to:First acquisition unit 3011, sentences
Disconnected ownership unit 3012, and recording unit 3013.
First acquisition unit 3011, for when user clicks on to touch-screen, obtaining the current direction of touch-screen, and click on
The screen coordinate of point;
Ownership unit 3012 is judged, for according to the current direction of touch-screen, and the screen coordinate of clicking point, judging this
Module belonging to clicking point;
Recording unit 3013, for adding 1 on the click for the module judged record.So as to carry out random key when device
During test, the number of clicks of the module of record can be directly obtained.
Can be with one of ordinary skill in the art will appreciate that realizing that all or part of step in above-described embodiment method is
The hardware of correlation is instructed to complete by program, described program can be stored in a kind of computer-readable recording medium, on
It can be read-only storage to state the storage medium mentioned, disk or CD etc..
A kind of random key test method provided by the present invention and device are described in detail above, for ability
The those skilled in the art in domain, according to the thought of the embodiment of the present invention, change is had in specific embodiments and applications
Part, in summary, this specification content should not be construed as limiting the invention.
Claims (6)
1. a kind of random key test method, it is characterised in that methods described includes:
Obtain the click volume of each module on touch-screen;Wherein, the module number on touch-screen is at least above 1;
According to the click volume of each module, the click probability of each module is obtained;
According to the click probability of each module, a module is chosen;
Test point is randomly selected in the module selected to be tested;
According to the click probability of each module, a module is chosen, is specifically included:
A natural number is randomly choosed, the span of the natural number is pre-set;
According to the click probability of each module, the span of natural number is divided into multiple segmentations, of segmentation according to probability is clicked on
Number is identical with the quantity of module;
Record segmentation and the corresponding relation of module;
According to the value of randomly selected natural number, the segmentation where the value of the natural number is judged, and then judge the mould chosen
Block, the module chosen are module corresponding to segmentation.
2. according to the method for claim 1, it is characterised in that it is described to obtain on touch-screen before the click volume of each module,
Methods described also includes:
Module Division is carried out to touch-screen.
3. according to the method for claim 1, it is characterised in that the click volume for obtaining each module on touch-screen, including:
When user clicks on to touch-screen, the current direction of touch-screen, and the screen coordinate of clicking point are obtained;
According to the current direction of touch-screen, and the screen coordinate of clicking point, the module belonging to the clicking point is judged;
Add 1 on the click record for the module judged.
4. a kind of random key test device, it is characterised in that described device includes:Click volume unit is obtained, obtains and clicks on generally
Rate unit, selecting unit, and test cell;
The acquisition click volume unit, for obtaining the click volume of each module on touch-screen;Wherein, the module number on touch-screen
At least above 1;
Described obtain clicks on probability unit, for the click volume according to each module, obtains the click probability of each module;
The selecting unit, according to the click probability of each module, choose a module;
The test cell, tested for randomly selecting test point in the module selected;
The selecting unit, specifically for randomly choosing a natural number, the span of the natural number is pre-set;
According to the click probability of each module, the span of natural number is divided into multiple segmentations according to clicking on probability, the number of segmentation with
The quantity of module is identical;Record segmentation and the corresponding relation of module;According to the value of randomly selected natural number, the nature is judged
Segmentation where several values, and then judge the module chosen, the module chosen is module corresponding to segmentation.
5. device according to claim 4, it is characterised in that described device also includes:Division module unit, for touching
Touch screen and carry out Module Division.
6. device according to claim 4, it is characterised in that the acquisition click volume unit specifically includes:First obtains
Unit, judge to belong to unit, and recording unit;
The first acquisition unit, for when user clicks on to touch-screen, obtain the current direction of touch-screen, and clicking point
Screen coordinate;
It is described to judge ownership unit, for according to the current direction of touch-screen, and the screen coordinate of clicking point, judging the click
Module belonging to point;
The recording unit, for adding 1 on the click for the module judged record.
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 CN103678059A (en) | 2014-03-26 |
CN103678059B true 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) |
Families Citing this family (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN104301482A (en) * | 2014-09-26 | 2015-01-21 | 昆山迈致治具科技有限公司 | Home key testing device |
CN104461801B (en) * | 2014-11-28 | 2017-11-07 | 广东欧珀移动通信有限公司 | A kind of method of testing and system of touch-screen susceptibility |
CN110865258B (en) * | 2019-11-28 | 2022-02-22 | 西安中颖电子有限公司 | Key detection circuit and key detection method for segmented comparison by using multiple thresholds |
CN113448868B (en) * | 2021-07-16 | 2022-11-01 | 网易(杭州)网络有限公司 | Game software compatibility testing method, device, equipment and medium |
Citations (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
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 |
Family Cites Families (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US6982697B2 (en) * | 2002-02-07 | 2006-01-03 | Microsoft Corporation | 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 |
-
2012
- 2012-09-26 CN CN201210364822.9A patent/CN103678059B/en active Active
Patent Citations (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
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 |
Also Published As
Publication number | Publication date |
---|---|
CN103678059A (en) | 2014-03-26 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN104951393B (en) | Method of testing and test device | |
CN102819395B (en) | terminal and icon display method | |
CN102520928B (en) | Method and device for displaying status of page window | |
CN102272701B (en) | For providing the method for personalized user interface, device and computer program | |
CN107679300B (en) | It is a kind of emulation, test result consistency analysis system and method | |
CN103678059B (en) | A kind of random key test method and device | |
CN104731881B (en) | A kind of chat record method and its mobile terminal based on communications applications | |
CN103562835A (en) | Web browser with quick site access user interface | |
CN104063128B (en) | A kind of information processing method and electronic equipment | |
DE202012100020U1 (en) | Touchscreen user interfaces | |
CN108763486A (en) | Paper duplicate checking method, terminal and storage medium based on terminal | |
CN105183279A (en) | Search method and terminal | |
CN104462979A (en) | Automatic dynamic detection method and device of application program | |
CN107506104A (en) | Method for sorting, device, mobile terminal and the storage medium of desktop icons | |
CN104699408A (en) | Operation method and device of touch screen and touch device | |
CN106161133A (en) | The method of testing of a kind of web page loading time and device | |
CN103198107A (en) | Method, device and terminal for searching for application program | |
CN105975191A (en) | Icon arrangement method and terminal | |
DE112011102694B4 (en) | Portable electronic device and method of controlling the same | |
CN106022070A (en) | Operation method, device and terminal based on fingerprint recognition | |
CN105718363B (en) | Mobile phone response starting time point acquisition methods and device | |
CN106557223B (en) | Mobile terminal shortcut operation method and device | |
CN103870114A (en) | Information processing method and electronic equipment | |
CN109521914A (en) | Restore the methods, devices and systems of data in file | |
CN105892801A (en) | Desktop icon processing method and 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 |