CN103914387B - The method and apparatus getting rid of abnormal interference in Android phone automatic test course - Google Patents

The method and apparatus getting rid of abnormal interference in Android phone automatic test course Download PDF

Info

Publication number
CN103914387B
CN103914387B CN201410166818.0A CN201410166818A CN103914387B CN 103914387 B CN103914387 B CN 103914387B CN 201410166818 A CN201410166818 A CN 201410166818A CN 103914387 B CN103914387 B CN 103914387B
Authority
CN
China
Prior art keywords
abnormal interference
test
broadcast
interference incident
automatic test
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.)
Expired - Fee Related
Application number
CN201410166818.0A
Other languages
Chinese (zh)
Other versions
CN103914387A (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.)
Guangdong Oppo Mobile Telecommunications Corp Ltd
Original Assignee
Guangdong Oppo Mobile Telecommunications Corp 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 Guangdong Oppo Mobile Telecommunications Corp Ltd filed Critical Guangdong Oppo Mobile Telecommunications Corp Ltd
Priority to CN201410166818.0A priority Critical patent/CN103914387B/en
Publication of CN103914387A publication Critical patent/CN103914387A/en
Application granted granted Critical
Publication of CN103914387B publication Critical patent/CN103914387B/en
Expired - Fee Related legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Landscapes

  • Mobile Radio Communication Systems (AREA)
  • Monitoring And Testing Of Transmission In General (AREA)

Abstract

The invention discloses the method and apparatus getting rid of abnormal interference in a kind of Android phone automatic test course, described method includes: S1, in described automatic test course, obtain the broadcast from android system, and filtered by key word, extracting the broadcast of abnormal interference incident, described abnormal interference incident includes the ejection unrelated with test event or redirects;S2, when described abnormal interference incident broadcast notify mobile phone perform described abnormal interference incident time, suspend automatic test, click action is generated again by analog subscriber operation, and send click event to android system to close described abnormal interference incident, after test interface to be returned, continue described automatic test.Described device includes the monitoring module for monitoring abnormal interference and for processing the abnormality processing module of abnormal interference.Methods and apparatus of the present invention can monitor and test unrelated exception and close exception on the premise of not affecting test automatically, improves accuracy rate and the efficiency of automatic test.

Description

The method and apparatus getting rid of abnormal interference in Android phone automatic test course
Technical field
The present invention relates to mobile phone automatized test, particularly relate in a kind of Android phone automatic test course The method and apparatus getting rid of abnormal interference.
Background technology
From strength to strength, renewal speed is fast, frequent for present cell-phone function, uses automatic test to replace tradition Manual testing, it is possible to being greatly shortened the release cycle of product, automatic test is particularly important and urgently. Along with the quantity of automatic test project, complexity etc. increase, abnormal owing to occurring in automatic test course Interference, it is abnormal that test platform is likely to direct discriminating test result, or directly results in test crash, serious shadow Accuracy rate and the efficiency of integrated testability are rung.
Summary of the invention
Present invention is primarily targeted at eliminating in a kind of Android phone automatic test course of offer abnormal the most dry The method and apparatus disturbed, to solve to occur in automatic test course that the exception interference unrelated with test event causes The technical problem of test crash.
The method getting rid of abnormal interference in the Android phone automatic test course that the present invention provides includes:
S1, in described automatic test course, obtain from the broadcast of android system, and by key Word filters, and extracts the broadcast of abnormal interference incident, and described abnormal interference incident includes the bullet unrelated with test event Go out or redirect;
S2, when described abnormal interference incident broadcast notify mobile phone perform described abnormal interference incident time, suspend from Dynamicization is tested, then generates click action by analog subscriber operation, and sends click event to android system To close described abnormal interference incident, after test interface to be returned, continue described automatic test.
Preferably: in described step S1 by android system register radio receiver so that described extensively Broadcast the broadcast from android system of the receptor active obtaining.
Preferably: described abnormal interference incident includes that incoming call ejects, note ejects, alarm clock sounds ejection, memorandum Record prompting ejects, in automatic test countdown terminate to eject and low capacity prompt eject in one or two with On.
Preferably: by calling android system method createPointEvent in described step S2, carry out mould Intend user operation and generate click action, then by calling android system method sendPointerSync, be System sends click event so that android system performs to close the action of described abnormal interference incident.
Present invention also offers the device getting rid of abnormal interference in a kind of Android phone automatic test course, Including monitoring module and abnormality processing module:
Described monitoring module includes that broadcast reception module and keyword filtering module, described broadcast reception module are used for Obtaining the broadcast from android system, described keyword filtering module is for extracting the wide of abnormal interference incident Broadcast, when described abnormal interference incident occurs, to indicate described abnormality processing module to described abnormal interference incident Processing, wherein, described abnormal interference incident includes the ejection unrelated with test event or redirects;
Described abnormality processing module includes testing control module and Abnormality remove module, and described testing control module is used In time occurring at described abnormal interference incident, control described automatic test and suspend;Described Abnormality remove module is used After described automatic test suspends, generate click action by analog subscriber operation, and send click event extremely Android system, to close described abnormal interference incident, makes mobile phone return test interface;Described testing and control Module is additionally operable to control described automatic test and proceeds after mobile phone returns test interface.
Preferably: by realizing described broadcast reception module to android system registration radio receiver.
Preferably: described abnormal interference incident includes that incoming call ejects, note ejects, alarm clock sounds ejection, memorandum In record prompting ejection, automatic test, countdown terminates or two in pointing out ejection, low capacity prompt to eject More than individual.
The said method of present invention offer and device, it is possible to the abnormal interference of monitoring in real time in automatic test course Event, when abnormal interference incident occurs, will suspend the automatic eliminating that automatic test goes to carry out disturbing, get rid of After be further continued for test, do not affect test process, improve test accuracy rate and the efficiency of automatic test on the whole.
Accompanying drawing explanation
Fig. 1 be a kind of Android phone automatic test course that the specific embodiment of the present invention provides is got rid of abnormal The method flow diagram of interference.
Detailed description of the invention
Below against accompanying drawing and combine preferred embodiment the invention will be further described.
Illustrate: " system " mentioned in present patent application contribution i.e. represents android system.
The specific embodiment of the invention provides in a kind of Android phone automatic test course as shown in Figure 1 and arranges Except the method for abnormal interference, with it, automatic test can not affected (mainly and interface operation Relevant test) on the premise of, automatically occur in eliminating automatic test course can cause test crash or survey The abnormal interference incident of test result mistake, these abnormal interference incidents generally include incoming call eject, come note eject, In memorandum prompting ejection, automatic test, countdown terminates the pop-up box interference such as ejection and low capacity prompt ejection Or page jump interference.
The method that the specific embodiment of the invention provides specifically includes that
S1, in described automatic test course, obtain from the broadcast of android system, and by key Word filters, and extracts the broadcast of abnormal interference incident, and described abnormal interference incident includes the bullet unrelated with test event Go out or redirect.Obtain the broadcast from android system, can be by the way of to registration broadcast, such as: By developing BroadcastReceiver(radio receiver in testing tool), then by this radio receiver Class or object registration in android system, the broadcast sent with active obtaining system.For different tests Project, arranges different key words and filters, and when test, the event that will appear from carries out key word filtration, extracts Go out abnormal interference incident.
S2, when occur described abnormal interference incident time, control described automatic test suspend, then calling system Method createPointEvent, carrys out analog subscriber operation and generates click action, recall system approach SendPointerSync, sends click event to system so that system performs to close the dynamic of described abnormal interference incident Make.Wherein abnormal interference incident can include that incoming call ejects, note ejects, alarm clock sounds ejection, memorandum prompting In ejection, automatic test, countdown terminates to eject and low capacity prompt ejection.Such as: key set in advance During word filters, by incoming call, carry out the above-mentioned event flags such as note for extremely, test process once occurring above-mentioned thing Part, as a example by incoming call: in test, suddenly send a telegram here, system sends the broadcast of incoming call, and whether mobile phone jumps to connect The page listened, owing to described radio receiver also receives the broadcast of this exception, then suspends automatic test, adjusts Use system approach createPointEvent, generate click action, go to click on " rejection " option, recall system Method sendPointerSync, the event that will click on " rejection " is sent to system, and system performs to close call again The action at interface, the interface the most whether answered closes, returns to test interface, automatic before being then further continued for Change test.
Specific embodiment of the invention part separately also provides for getting rid of in a kind of Android phone automatic test course The device of abnormal interference, including monitoring module and abnormality processing module: described monitoring module includes broadcast reception mould Block and keyword filtering module, described broadcast reception module, by realizing to system registry broadcast, is used for obtaining From the broadcast of android system, described keyword filtering module is used for extracting the broadcast of abnormal interference incident, When described abnormal interference incident occurs, to indicate described abnormality processing module that described abnormal interference incident is carried out Processing, wherein, described abnormal interference incident includes the ejection unrelated with test event or redirects;Described exception Reason module includes testing control module and Abnormality remove module, and described testing control module is for dry in described exception When event of disturbing occurs, control described automatic test and suspend;Described Abnormality remove module is surveyed for described automatization After examination suspends, generate click action by analog subscriber operation, and send click event to android system, To close described abnormal interference incident, mobile phone is made to return test interface;Described testing control module is additionally operable to control Described automatic test proceeds after mobile phone returns test interface.
For example: in test process, the memorandum of mobile phone just expires, and then test interface jumps out memorandum Record prompting frame, owing to, before the action of mobile phone execution ejection memorandum prompting frame, system sends the wide of correspondence in advance Broadcasting, broadcast reception module receives this broadcast already, and is different by keyword filtering module by this broadcast flag Often, abnormality processing module will carry out certain process to anomalous event: when test interface ejects prompting frame, surveys Examination control module auto-control test suspends, Abnormality remove module calling system method createPointEvent, Create the click action of an analog subscriber, go to click on the option that this memorandum prompting frame can be made to disappear, example Such as " closedown " " knowing " etc., recall system approach sendPointerSync and this click event is sent to being System, informs that notifications mobile phone goes to perform corresponding actions, so that memorandum prompting frame disappears, so far returns to elder generation Front test interface, the test of testing control module auto-control proceeds.Wherein, in order to ensure to disturb not Impact test, can be further continued for automatic test in 3~5 seconds after interface disappears.
Visible, that the present invention provides method and apparatus, can the actively abnormal interference of monitoring in automatic test course And on the premise of not affecting test automatic exclusive PCR, substantially increase in automatic test course test effect Rate and test accuracy rate.
Above content is to combine concrete preferred implementation further description made for the present invention, it is impossible to Assert the present invention be embodied as be confined to these explanations.For those skilled in the art For, without departing from the inventive concept of the premise, it is also possible to make some equivalents and substitute or obvious modification, and And performance or purposes identical, all should be considered as belonging to protection scope of the present invention.

Claims (7)

1. the method getting rid of abnormal interference in an Android phone automatic test course, it is characterised in that: Comprise the following steps:
S1, in described automatic test course, obtain from the broadcast of android system, and by key Word filters, and extracts the broadcast of abnormal interference incident, and described abnormal interference incident includes the bullet unrelated with test event Go out or redirect, wherein for different test events, pre-setting different filtering keys words, when test, Broadcast to the event occurred carries out key word filtration, extracts the broadcast of abnormal interference incident;
S2, when described abnormal interference incident broadcast notify mobile phone perform described abnormal interference incident time, suspend from Dynamicization is tested, then generates click action by analog subscriber operation, and sends click event to android system To close described abnormal interference incident, after test interface to be returned, continue described automatic test.
2. the method for claim 1, it is characterised in that: by Android in described step S1 System registry radio receiver, so that described radio receiver active obtaining is from the broadcast of android system.
3. the method for claim 1, it is characterised in that: described abnormal interference incident includes bullet of sending a telegram here Go out, note ejects, alarm clock sounds ejection, memorandum points out countdown in ejection, automatic test to terminate to eject With low capacity prompt eject in one or more.
4. the method for claim 1, it is characterised in that: by calling Android in described step S2 System approach createPointEvent, carrys out analog subscriber operation and generates click action, then by calling Android System approach sendPointerSync, sends click event to system so that android system performs described in closedown The action of abnormal interference incident.
5. an Android phone automatic test course is got rid of the device of abnormal interference, it is characterised in that: Including monitoring module and abnormality processing module:
Described monitoring module includes that broadcast reception module and keyword filtering module, described broadcast reception module are used for Obtaining the broadcast from android system, described keyword filtering module is for extracting the wide of abnormal interference incident Broadcast, when described abnormal interference incident occurs, to indicate described abnormality processing module to described abnormal interference incident Processing, wherein for different test events, described keyword filtering module pre-sets different filtrations Key word, when test, the broadcast of the described keyword filtering module event to occurring carries out key word filtration, Extracting the broadcast of abnormal interference incident, wherein, described abnormal interference incident includes the bullet unrelated with test event Go out or redirect;
Described abnormality processing module includes testing control module and Abnormality remove module, and described testing control module is used In time occurring at described abnormal interference incident, control described automatic test and suspend;Described Abnormality remove module is used After described automatic test suspends, generate click action by analog subscriber operation, and send click event extremely Android system, to close described abnormal interference incident, makes mobile phone return test interface;Described testing and control Module is additionally operable to control described automatic test and proceeds after mobile phone returns test interface.
6. device as claimed in claim 5, it is characterised in that: by connecing to android system registration broadcast Receive device and realize described broadcast reception module.
7. device as claimed in claim 5, it is characterised in that: described abnormal interference incident includes bullet of sending a telegram here Go out, note ejects, alarm clock sounds ejection, memorandum points out countdown in ejection, automatic test to terminate prompting Eject, low capacity prompt eject in one or more.
CN201410166818.0A 2014-04-23 2014-04-23 The method and apparatus getting rid of abnormal interference in Android phone automatic test course Expired - Fee Related CN103914387B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201410166818.0A CN103914387B (en) 2014-04-23 2014-04-23 The method and apparatus getting rid of abnormal interference in Android phone automatic test course

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201410166818.0A CN103914387B (en) 2014-04-23 2014-04-23 The method and apparatus getting rid of abnormal interference in Android phone automatic test course

Publications (2)

Publication Number Publication Date
CN103914387A CN103914387A (en) 2014-07-09
CN103914387B true CN103914387B (en) 2016-08-17

Family

ID=51040089

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201410166818.0A Expired - Fee Related CN103914387B (en) 2014-04-23 2014-04-23 The method and apparatus getting rid of abnormal interference in Android phone automatic test course

Country Status (1)

Country Link
CN (1) CN103914387B (en)

Families Citing this family (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104123226B (en) * 2014-07-30 2017-02-08 深圳市共进电子股份有限公司 Processing method for popup form in automatic testing
CN105183643B (en) * 2015-08-18 2020-09-29 Tcl移动通信科技(宁波)有限公司 Automatic testing anti-interference device of android mobile terminal
CN105159545A (en) * 2015-09-30 2015-12-16 北京奇虎科技有限公司 Method and device for processing popup box on intelligent terminal for test
CN105653452A (en) * 2015-12-30 2016-06-08 北京金山安全软件有限公司 Method and device for testing application program
CN106383783A (en) * 2016-09-14 2017-02-08 上海斐讯数据通信技术有限公司 Android system testing method and system
CN108427633B (en) * 2017-02-15 2021-08-06 腾讯科技(深圳)有限公司 Display interface processing method and device
CN109739761A (en) * 2018-12-28 2019-05-10 北京安和瑞福信息技术有限公司 Automated testing method and device
CN110046079B (en) * 2019-04-25 2024-03-12 广州方硅信息技术有限公司 Network request detection method, device and equipment

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101551777A (en) * 2009-05-08 2009-10-07 刘志方 Apparatus of mobile terminal software base on abnormity and interrupt mechanism and test method
CN102306119A (en) * 2011-06-30 2012-01-04 北京新媒传信科技有限公司 System for capturing global exception and method
CN103559136A (en) * 2013-11-22 2014-02-05 北京云测信息技术有限公司 Method and test system for intelligently executing script on mobile terminal

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101551777A (en) * 2009-05-08 2009-10-07 刘志方 Apparatus of mobile terminal software base on abnormity and interrupt mechanism and test method
CN102306119A (en) * 2011-06-30 2012-01-04 北京新媒传信科技有限公司 System for capturing global exception and method
CN103559136A (en) * 2013-11-22 2014-02-05 北京云测信息技术有限公司 Method and test system for intelligently executing script on mobile terminal

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
"Android应用软件自动化测试工具的研究与设计";吴辉;《中国优秀硕士学位论文全文数据库 信息科技辑 2013年》;20131215(第S2期);论文第30-33页第4.5节,第43-44页附录1,图4.8 *

Also Published As

Publication number Publication date
CN103914387A (en) 2014-07-09

Similar Documents

Publication Publication Date Title
CN103914387B (en) The method and apparatus getting rid of abnormal interference in Android phone automatic test course
CN103607498B (en) A kind of method and device showing Stranger Calls/de-electrifying number related information
US9493166B2 (en) Driver reaction time measurement
CN102265587A (en) A clock alarming method and a device thereof
CN105225662A (en) Smart bluetooth earphone plays method and the smart bluetooth earphone of external voice automatically
CN102572123B (en) Method for monitoring call record uploading of eavesdropping software X undercover
CN108513301B (en) Illegal user identification method and device
CN103401991A (en) Method and device for prompting communication event of terminal device
US8462926B2 (en) Method for filtering incoming calls to communication device
CN105138400B (en) Application program self-starting management method and device
CN106126183A (en) Electronic equipment and audio-frequency processing method
EP3823310A1 (en) Microphone hole clogging detection method and related products
CN104462973A (en) System and method for detecting dynamic malicious behaviors of application program in mobile terminal
CN106161749A (en) A kind of malicious call recognition methods, and device
CN106844026A (en) A kind of method and system for clearing up terminal device process
CN108111679A (en) The anti-interference method and Related product of electronic device
CN111246039A (en) Incoming call reminding method and device, communication equipment, storage medium and processor
CN104822128A (en) Communication event warning method
CN104378511A (en) Anti-theft method and device of mobile terminal and wearable device
CN105915682A (en) Alarm clock with alarm function and an emergency alarm method employing the alarm clock
CN104202463A (en) Call filter method and intelligent terminal
CN108874658A (en) A kind of sandbox analysis method, device, electronic equipment and storage medium
WO2014187478A1 (en) Fault tracking in a telecommunications system
CN105872775A (en) Silent uninstalling method and device for smart cloud TV application
CN106506859B (en) Incoming call delay based reminding method and device

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
CP01 Change in the name or title of a patent holder

Address after: Changan town in Guangdong province Dongguan 523860 usha Beach Road No. 18

Patentee after: GUANGDONG OPPO MOBILE TELECOMMUNICATIONS Corp.,Ltd.

Address before: Changan town in Guangdong province Dongguan 523860 usha Beach Road No. 18

Patentee before: GUANGDONG OPPO MOBILE TELECOMMUNICATIONS Corp.,Ltd.

CP01 Change in the name or title of a patent holder
CF01 Termination of patent right due to non-payment of annual fee

Granted publication date: 20160817

CF01 Termination of patent right due to non-payment of annual fee