CN103019923B - The method and system of simulation hit testing - Google Patents

The method and system of simulation hit testing Download PDF

Info

Publication number
CN103019923B
CN103019923B CN201110283899.9A CN201110283899A CN103019923B CN 103019923 B CN103019923 B CN 103019923B CN 201110283899 A CN201110283899 A CN 201110283899A CN 103019923 B CN103019923 B CN 103019923B
Authority
CN
China
Prior art keywords
control
simulation
control information
click
module
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
Application number
CN201110283899.9A
Other languages
Chinese (zh)
Other versions
CN103019923A (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.)
Shenzhen Tencent Computer Systems 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 CN201110283899.9A priority Critical patent/CN103019923B/en
Publication of CN103019923A publication Critical patent/CN103019923A/en
Application granted granted Critical
Publication of CN103019923B publication Critical patent/CN103019923B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Landscapes

  • Debugging And Monitoring (AREA)

Abstract

The present invention relates to a kind of method and system simulating hit testing.The method of this simulation hit testing comprises the following steps: in control event process function, arrange control information; Interface is carried out simulation points hit; Judge described simulation clicks whether click control, if so, then trigger control event handling function, obtains and record the control information corresponding to described control and triggered time, otherwise proceeds to simulate click; Judge whether occur mistake on described interface, if so, then stop simulation clicking, otherwise proceed simulation click; Obtain control information and the triggered time of record, described control information and triggered time are processed, generate and click track time sequence information.The method and system of above-mentioned simulation hit testing, can follow the trail of according to this click track time sequence information problem of implementation and exception procedure is recurred, and have greatly saved track problems cost, have improve the efficiency of looking up the fault.

Description

The method and system of simulation hit testing
[technical field]
The present invention relates to software test field, particularly a kind of method and system simulating hit testing.
[background technology]
In software development process, need be tested it to the control in software and whether can normally perform.Extensive utilization be the simulation hit testing of robotization, this simulation hit testing, without the need to manual intervention, can be tested the scene being manually difficult to test, substantially increase the efficiency of test and the coverage rate of test point.
But the simulation hit testing of robotization has randomness or randomness, be unfavorable for that tester carries out track problems, and the track occurring exception when simulation is clicked can not be preserved, exception procedure cannot be realized and recur.
[summary of the invention]
Based on this, be necessary to provide a kind of method simulating hit testing, can problem of implementation follow the trail of and exception procedure recurrence.
Simulate a method for hit testing, comprise the following steps:
In control event process function, control information is set;
Interface is carried out simulation points hit;
Judge described simulation clicks whether click control, if so, then trigger control event handling function, obtains and record the control information corresponding to described control and triggered time, otherwise proceeds to simulate click;
Judge whether occur mistake on described interface, if so, then stop simulation clicking, otherwise proceed simulation click;
Obtain control information and the triggered time of record, described control information and triggered time are processed, generate and click track time sequence information.
Preferably, the operational order that described control information comprises control name, control location, control place window name, control are triggered.
Preferably, describedly on interface, carry out the step that simulation points hits be specially: produce random clicking point by random number, and on interface, carry out simulation points by described random clicking point and hit.
Preferably, also comprise the step of the threshold value of the record control information quantity storing setting, also comprise step: judge whether the control information quantity recorded is greater than described threshold value, if so, then delete according to the sequencing in triggered time the control information exceeding number of thresholds.
Preferably, also step is comprised: by the click track time sequence information of described generation stored in abnormal trail file folder; Check that the click track time sequence information in described abnormal trail file folder or the click track time sequence information recurrence simulation in pressing from both sides according to described abnormal trail file are clicked.
In addition, there is a need to provide a kind of system simulating hit testing, can problem of implementation follow the trail of and exception procedure recurrence.
Simulate a system for hit testing, comprising:
Application program module, for arranging control information in control event process function;
Module is clicked in simulation, hits for carrying out simulation points on interface;
Described application program is also clicked for receiving described simulation, judges described simulation clicks whether click control, and when clicking control, trigger control event handling function, obtains the control information corresponding to described control and triggered time;
Shared drive module, for recording described control information and triggered time;
Described application program module, also for judging whether occur mistake on described interface, when an error occurs, notifies that described simulation is clicked module and stopped simulation clicking;
Described simulation clicks module also for obtaining control information and the triggered time of record from described shared drive module, carries out process and generates click track time sequence information.
Preferably, the operational order that described control information comprises control name, control location, control place window name, control are triggered.
Preferably, described simulation is clicked module and is also produced random clicking point by random number, and on interface, carries out simulation points by described random clicking point and hit.
Preferably, described shared drive module is also for storing the threshold value of the record control information quantity of setting; Described shared drive module also for judging whether the control information quantity recorded is greater than described threshold value, and when judging that the control information quantity recorded is greater than described threshold value, deletes according to the sequencing in triggered time the control information exceeding number of thresholds.
Preferably, also comprise and check module and/or recur module, described simulation click module also for by the click track time sequence information of described generation stored in abnormal trail file folder; Describedly check that module is for checking the click track time sequence information in described abnormal trail file folder; Described recurrence module is used for recurring simulation according to the click track time sequence information in described abnormal trail file folder and clicks.
The method and system of above-mentioned simulation hit testing, adopt and establish control information in control event process function, trigger control is clicked by simulation, record control information and the triggered time of the control that is triggered, and when there is mistake at interface, simulation is stopped to click, according to control information and the triggered time generation click track time sequence information of record, thus can follow the trail of according to this click track time sequence information problem of implementation and exception procedure recurrence, greatly save track problems cost, improve the efficiency of looking up the fault.
[accompanying drawing explanation]
Fig. 1 is the method flow diagram of simulating hit testing in an embodiment;
Fig. 2 is the structural representation of simulating the system of hit testing in an embodiment;
Fig. 3 is the structural representation of the system simulating hit testing in another embodiment.
[embodiment]
Below in conjunction with specific embodiment and accompanying drawing, technical scheme is described in detail.
As shown in Figure 1, in an embodiment, a kind of method simulating click, comprises the following steps:
Step S101, arranges control information in control event process function.
Have control event process function in the program code of application program, control information is set in control event process function, after application program is run, the interface of application program will exist corresponding control.The operational order that control information comprises control name, control location (position relative to place window), control place window name, control are triggered.As being provided with the control information such as " insertion ", " picture " in the control event process function of word application program, " picture " control arranges in the first row the 3rd of " insertion " window, will perform the operation of insert pictures after " picture " control is triggered.Word interface has corresponding " insertion " and " picture " control.
Step S103, interface is carried out simulation points and hits.
In one embodiment, step S103 is specially: produce random clicking point according to random number, and on interface, carries out simulation points by this random clicking point and hit.By simulation click program, process is carried out to random number and produce random clicking point.Random clicking point analog mouse on the interface of application program is clicked.
Step S105, judges this simulation clicks whether click control, if so, performs step S107, otherwise return step S103.
When random clicking point is clicked, and the click of not all can click the control on interface, after only clicking control, and just can trigger control event handling function.
Step S107, trigger control event handling function, obtains and records the control information corresponding to this control and triggered time.
After clicking control, application program captures this click, trigger control event handling function, the control information corresponding to this control is obtained from control event process function, obtain the triggered time simultaneously, then record this control information and triggered time, process so that follow-up.
Step S109, judges whether occur mistake on interface, if so, performs step S111, otherwise returns step S103.
Obtain control information and after the triggered time; perform corresponding control logic; mistake may be there is in control logic implementation; cause interface occurring exception or application crash; because judging whether occur mistake on interface, if there is mistake, then program stopped simulation click is clicked in application notification simulation; if there is no mistake, then proceed simulation and click.
Step S111, stops simulation clicking.
Step S113, obtains control information and the triggered time of record, processes this control information and triggered time, generate and click track time sequence information.
After simulation is clicked and occur mistake on interface, simulation is stopped to click, have recorded in appearance mistake (when comprising appearance mistake) front all control information clicking control and triggered time, obtain control information and the triggered time of this record, the control information of this record and triggered time are processed, generate and click track time sequence information, namely according to the control information be triggered that time order and function sequence is formed.
In one embodiment, before the step in the control information that the record in step S107 is corresponding to this control and triggered time, also step is comprised: the threshold value storing the record control information quantity of setting.Preset the maximum number of the quantity of the control information of record, i.e. threshold value.This threshold value can be set by system or user, define the threshold value of the quantity of the control information of record, avoid control information too much occupy memory headroom.
After the record control information corresponding to this control and the step in triggered time, also comprise: judge whether the control information quantity recorded is greater than this threshold value, if so, then delete according to the sequencing in triggered time the control information exceeding number of thresholds, otherwise do not delete.The quantity of record control information exceedes threshold value, then the total quantity of record is deducted the quantity that threshold value obtains the control information that will delete, and deletes control information according to the sequencing in the triggered time of control.
In one embodiment, also step is comprised after step sl 13: in being pressed from both sides stored in abnormal trail file by the click track time sequence information generated; Check that the click track time sequence information in abnormal trail file folder or the click track time sequence information recurrence simulation in pressing from both sides according to this abnormal trail file are clicked.
During the click track time sequence information generated is pressed from both sides stored in abnormal trail file, check tracing problem based to facilitate user or recur simulation click process.
As shown in Figure 2, in one embodiment, a kind of system simulating hit testing, comprises application program module 210, module 220 and shared drive module 230 is clicked in simulation.
Application program module 210 for arranging control information in control event process function.The operational order that control information comprises control name, control location (position relative to place window), control place window name, control are triggered.As being provided with the control information such as " choosing ", " transmission instant messages " in the control event process function of Instant Messenger (IM) software, " transmission instant messages " control, in the first row the first row of " choosing " window, will eject dialog box after " transmission instant messages " control is triggered.Instant communication client interface has corresponding " choosing " and " transmission instant messages " control.
Simulation is clicked module 220 and is hit for carrying out simulation points on interface.Simulation is clicked module 220 pairs of random numbers and is carried out the random clicking point of process generation, and on interface, carries out simulation points by this random clicking point and hit.Random clicking point analog mouse on the interface of application program that module 220 generation is clicked in simulation is clicked.
Application program module 210 is also clicked for receiving this simulation, judges this simulation clicks whether click control, and when clicking control, trigger control event handling function, obtains the control information corresponding to described control and triggered time.When random clicking point is clicked, and the click of not all can click the control on interface, after only clicking control, and just can trigger control event handling function.After clicking control, application program module 210 captures this click, trigger control event handling function, obtains the control information corresponding to this control, obtain the triggered time simultaneously from control event process function.
Shared drive module 230 is for recording this control information and triggered time.As clickedly in control " transmission instant messages " to arrive, the operational order " ejection dialog box " that the first row the first row that control information comprises control name " transmission instant messages ", control is positioned at " choosing A " window of this control, control are triggered, during 10 days 10 June of 2011 triggered time 10 points 10 seconds, shared drive module 230 records control information and triggered time.
Application program module 210 is also for judging whether occur mistake on interface, and when an error occurs, notice simulation is clicked module 220 and stopped simulation clicking.Application program module 210 obtains control information and after the triggered time; perform corresponding control logic; mistake may be there is in control logic implementation; cause interface occurring exception or application crash; and then judge whether occur mistake on interface, if there is mistake, then application program module 210 notifies that simulation is clicked module 220 and stopped simulation clicking; if do not have mistake, then simulation is clicked module 220 and is continued on interface, carry out simulation points and hit.
Simulation clicks module 220 also for obtaining control information and the triggered time of record from shared drive module 230, carries out process and generates click track time sequence information.After simulation is clicked and occur mistake on interface, simulation is stopped to click, have recorded in appearance mistake (when comprising appearance mistake) front all control information clicking control and triggered time, obtain control information and the triggered time of this record, the control information of this record and triggered time are processed, generate and click track time sequence information, namely according to the control information be triggered that time order and function sequence is formed.
In preferred embodiment, shared drive module 230 is also for storing the threshold value of the record control information quantity of setting, also for judging whether the control information quantity recorded is greater than this threshold value, and when judging that the control information quantity recorded is greater than this threshold value, delete according to the sequencing in triggered time the control information exceeding number of thresholds.This threshold value can be set by system or user, define the threshold value of the quantity of the control information of record, avoid control information too much occupy memory headroom.The quantity of record control information exceedes threshold value, and the total quantity of record is deducted the quantity that threshold value obtains the control information that will delete by shared drive module 230, deletes control information according to the sequencing in the triggered time of control.
In one embodiment, the system of above-mentioned simulation hit testing, except comprising application program module 210, module 220 and shared drive module 230 are clicked in simulation, also comprise and check module 240 and/or recur module 250.
During the click track time sequence information of simulation click module 220 also for generating presss from both sides stored in abnormal trail file.
Check that module 240 is for checking the click track time sequence information in this abnormal trail file folder.User checks click track time sequence information in abnormal trail file by seeing module 240, searches error reason.
Recur module 250 to click for recurring simulation according to the click track time sequence information in this abnormal trail file folder.
The method and system of above-mentioned simulation hit testing, adopt and establish control information in control event process function, trigger control is clicked by simulation, record control information and the triggered time of the control that is triggered, and when there is mistake at interface, simulation is stopped to click, according to control information and the triggered time generation click track time sequence information of record, thus can follow the trail of according to this click track time sequence information problem of implementation and exception procedure recurrence, greatly save track problems cost, improve the efficiency of looking up the fault.
In addition, the clicking point immediately produced by random number, is carried out simulation and clicks, be easy to immediately pinpoint the problems; The threshold value of setting recording control information quantity, can improve the utilization rate of internal memory; Being stored in clicking track time sequence information in special abnormal document folder, conveniently carrying out checking and recurring.
The above embodiment only have expressed several embodiment of the present invention, and it describes comparatively concrete and detailed, but therefore can not be interpreted as the restriction to the scope of the claims of the present invention.It should be pointed out that for the person of ordinary skill of the art, without departing from the inventive concept of the premise, can also make some distortion and improvement, these all belong to protection scope of the present invention.Therefore, the protection domain of patent of the present invention should be as the criterion with claims.

Claims (6)

1. simulate a method for hit testing, comprise the following steps:
In control event process function, control information is set;
Produce random clicking point by random number, and on interface, carry out simulation points by described random clicking point and hit;
Judge described simulation clicks whether click control, if so, then trigger control event handling function, obtains and record the control information corresponding to described control and triggered time, otherwise proceeds to simulate click;
Judge whether occur mistake on described interface, if so, then stop simulation clicking, otherwise proceed simulation click;
Obtain control information and the triggered time of record, process described control information and triggered time, generate and click track time sequence information, described click track time sequence information is the control information be triggered formed according to time order and function order;
Store the threshold value of the record control information quantity of setting;
Judge whether the control information quantity recorded is greater than described threshold value, if so, then delete according to the sequencing in triggered time the control information exceeding number of thresholds.
2. the method for simulation hit testing according to claim 1, is characterized in that, the operational order that described control information comprises control name, control location, control place window name, control are triggered.
3. the method for simulation hit testing according to claim 1 and 2, is characterized in that, also comprise step: by the click track time sequence information of described generation stored in abnormal trail file folder; Check that the click track time sequence information in described abnormal trail file folder or the click track time sequence information recurrence simulation in pressing from both sides according to described abnormal trail file are clicked.
4. simulate a system for hit testing, it is characterized in that, comprising:
Application program module, for arranging control information in control event process function;
Module is clicked in simulation, for producing random clicking point by random number, and on interface, carries out simulation points by described random clicking point and hits;
Described application program is also clicked for receiving described simulation, judges described simulation clicks whether click control, and when clicking control, trigger control event handling function, obtains the control information corresponding to described control and triggered time;
Shared drive module, for recording described control information and triggered time;
Described application program module, also for judging whether occur mistake on described interface, when an error occurs, notifies that described simulation is clicked module and stopped simulation clicking;
Described simulation clicks module also for obtaining control information and the triggered time of record from described shared drive module, carry out process and generate click track time sequence information, described click track time sequence information is the control information be triggered formed according to time order and function order;
Described shared drive module is also for storing the threshold value of the record control information quantity of setting; Described shared drive module also for judging whether the control information quantity recorded is greater than described threshold value, and when judging that the control information quantity recorded is greater than described threshold value, deletes according to the sequencing in triggered time the control information exceeding number of thresholds.
5. the system of simulation hit testing according to claim 4, is characterized in that, the operational order that described control information comprises control name, control location, control place window name, control are triggered.
6. the system of the simulation hit testing according to claim 4 or 5, is characterized in that, also comprises and checks module and/or recur module, described simulation click module also for by the click track time sequence information of described generation stored in abnormal trail file folder; Describedly check that module is for checking the click track time sequence information in described abnormal trail file folder; Described recurrence module is used for recurring simulation according to the click track time sequence information in described abnormal trail file folder and clicks.
CN201110283899.9A 2011-09-22 2011-09-22 The method and system of simulation hit testing Active CN103019923B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201110283899.9A CN103019923B (en) 2011-09-22 2011-09-22 The method and system of simulation hit testing

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201110283899.9A CN103019923B (en) 2011-09-22 2011-09-22 The method and system of simulation hit testing

Publications (2)

Publication Number Publication Date
CN103019923A CN103019923A (en) 2013-04-03
CN103019923B true CN103019923B (en) 2015-10-21

Family

ID=47968549

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201110283899.9A Active CN103019923B (en) 2011-09-22 2011-09-22 The method and system of simulation hit testing

Country Status (1)

Country Link
CN (1) CN103019923B (en)

Families Citing this family (12)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104156305B (en) * 2013-05-15 2018-01-09 腾讯科技(深圳)有限公司 A kind of applied program testing method and device
CN104866413B (en) * 2014-02-24 2018-09-28 腾讯科技(深圳)有限公司 The method and device of multi-process test
CN105512023B (en) * 2014-09-26 2019-02-19 腾讯科技(深圳)有限公司 A kind of Monkey test method and device
CN107562611B (en) * 2016-06-30 2021-07-06 阿里巴巴集团控股有限公司 Method and device for realizing simulation test
CN107977306A (en) * 2016-10-25 2018-05-01 百度在线网络技术(北京)有限公司 Method and apparatus for testing Android application stability
CN106569938B (en) * 2016-10-27 2019-07-05 厦门美图之家科技有限公司 The method for testing pressure and device of application program
CN107193733A (en) * 2017-05-12 2017-09-22 微梦创科网络科技(中国)有限公司 Simulate the methods, devices and systems of Monkey tests
CN108957171A (en) * 2018-05-30 2018-12-07 太仓鸿策拓达科技咨询有限公司 A kind of touch screen number of clicks test macro
CN109345383A (en) * 2018-08-13 2019-02-15 兴业证券股份有限公司 Security software information service monitoring method and storage medium
CN114780437B (en) * 2022-05-24 2023-01-31 广州掌动智能科技有限公司 Auxiliary correction method and system for software automatic test script
CN115658552A (en) * 2022-12-26 2023-01-31 海马云(天津)信息技术有限公司 Test data recommendation method and device, storage medium and electronic equipment
CN117850403B (en) * 2024-03-06 2024-05-17 西安晟昕科技股份有限公司 Dynamic detection method for initiating and controlling system

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2001071535A2 (en) * 2000-03-23 2001-09-27 Vividence Corporation Automated target-market sampler
CN101620564A (en) * 2008-06-30 2010-01-06 福建升腾资讯有限公司 Method for automatically testing recording playback mode of terminal system
CN101930399A (en) * 2010-08-16 2010-12-29 于秀山 Method for recording software test

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US8935176B2 (en) * 2007-07-16 2015-01-13 International Business Machines Corporation Cursor path vector analysis for detecting click fraud

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2001071535A2 (en) * 2000-03-23 2001-09-27 Vividence Corporation Automated target-market sampler
CN101620564A (en) * 2008-06-30 2010-01-06 福建升腾资讯有限公司 Method for automatically testing recording playback mode of terminal system
CN101930399A (en) * 2010-08-16 2010-12-29 于秀山 Method for recording software test

Also Published As

Publication number Publication date
CN103019923A (en) 2013-04-03

Similar Documents

Publication Publication Date Title
CN103019923B (en) The method and system of simulation hit testing
CN104268055B (en) The monitoring method and device of a kind of program exception
CN101295280B (en) Automatic software debugging method and system
CN110298976A (en) The charging module of mobile power source leased equipment and its data transmission method between mobile power source
CN102323873B (en) In order to trigger the method and system that icon is replied in instant messaging
CN104009964B (en) Network linking detection method and system
CN104866296B (en) Data processing method and device
CN107678940A (en) Automation exploratory testing method and system based on Android APP
CN110458681A (en) A kind of method, apparatus, server and the storage medium of data reconciliation decision
CN109639719A (en) A kind of auth method and device based on temporary identifier
CN105635044B (en) Information synchronization method and device
CN103353858B (en) A kind of automated testing method based on action touch simulation and device
CN105512562B (en) Vulnerability mining method and device and electronic equipment
CN106559419A (en) The application and identification method and identification terminal of short message verification code
CN111459811B (en) Buried point data verification method and device
CN110908880A (en) Embedded point code injection method, event reporting method and related equipment thereof
CN105528546B (en) Vulnerability mining method and device and electronic equipment
CN107659842B (en) Method and system for reporting in video friend making
CN109088872A (en) Application method, device, electronic equipment and the medium of cloud platform with service life
CN109741786A (en) A kind of solid state hard disk monitoring method, device and equipment
CN111857932A (en) Web substitution and filling method for operation and maintenance auditing system based on puppeteer
CN101982949A (en) Detection system of intelligent network equipment and method
CN100487669C (en) Locating method and system for repeated memory release
CN108491740A (en) A kind of TF card performance method of real-time
CN115269415A (en) Interface test system and method based on simulation scene use case

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
C10 Entry into substantive examination
SE01 Entry into force of request for substantive examination
C14 Grant of patent or utility model
GR01 Patent grant
C41 Transfer of patent application or patent right or utility model
TR01 Transfer of patent right

Effective date of registration: 20151231

Address after: The South Road in Guangdong province Shenzhen city Fiyta building 518000 floor 5-10 Nanshan District high tech Zone

Patentee after: Shenzhen Tencent Computer System Co., Ltd.

Address before: Shenzhen Futian District City, Guangdong province 518044 Zhenxing Road, SEG Science Park 2 East Room 403

Patentee before: Tencent Technology (Shenzhen) Co., Ltd.