CN103914387A - Method and device for eliminating abnormal interference in Android mobile phone automated testing process - Google Patents

Method and device for eliminating abnormal interference in Android mobile phone automated testing process Download PDF

Info

Publication number
CN103914387A
CN103914387A CN201410166818.0A CN201410166818A CN103914387A CN 103914387 A CN103914387 A CN 103914387A CN 201410166818 A CN201410166818 A CN 201410166818A CN 103914387 A CN103914387 A CN 103914387A
Authority
CN
China
Prior art keywords
abnormal interference
test
interference incident
broadcast
mobile phone
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
CN201410166818.0A
Other languages
Chinese (zh)
Other versions
CN103914387B (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
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Abstract

The invention discloses a method and device for eliminating abnormal interference in an Android mobile phone automated testing process. The method comprises the steps that (1), in the automated testing process, broadcasts from an Android system are obtained, a broadcast of an abnormal interference event is extracted through key word filtration, and the abnormal interference event comprises popping up or skipping irrelevant to a testing item; (2) when the broadcast of the abnormal interference event informs a mobile phone to execute the abnormal interference event, automated testing is paused, a click action is generated by simulating user operations, a click event is sent to the Android system to close the abnormal interference event, and the automated testing is continued after a testing interference is displayed. The device comprises a monitoring module used for monitoring the abnormal interference, and an abnormity handling module used for handling the abnormal interference. According to the method and device for eliminating the abnormal interference in the Android mobile phone automated testing process, on the premise that automated testing is not affected, abnormities irrelevant to testing are monitored and closed, and accuracy and efficiency of automated testing are improved.

Description

In the mobile phone automatized test process of Android, get rid of the abnormal method and apparatus disturbing
Technical field
The present invention relates to mobile phone automatized test, relate in particular to the method and apparatus of getting rid of abnormal interference in the mobile phone automatized test process of a kind of Android.
Background technology
From strength to strength, renewal speed is fast, frequent for present cell-phone function, adopts automatic test to replace traditional manual testing, can greatly shorten the release cycle of product, and it is particularly important and urgent that automatic test seems.Along with the increase such as quantity, complexity of automatic test project, in automatic test course, disturb because appearance is abnormal, test platform probably directly judges that test result is as abnormal, or directly causes test crash, has had a strong impact on accuracy rate and the efficiency of integrated testability.
Summary of the invention
Fundamental purpose of the present invention is to provide in the mobile phone automatized test process of a kind of Android gets rid of the abnormal method and apparatus disturbing, and occurs that to solve in automatic test course the abnormal interference irrelevant with test event causes the technical matters of test crash.
In the mobile phone automatized test process of Android provided by the invention, getting rid of the abnormal method of disturbing comprises:
S1, in described automatic test course, obtain the broadcast from Android system, and filter by keyword, extract the broadcast of abnormal interference incident, described abnormal interference incident comprises the ejection irrelevant with test event or redirect;
S2, in the time that the broadcast announcement mobile phone of described abnormal interference incident is carried out described abnormal interference incident, suspend automatic test, operate and generate click action by analog subscriber again, and send click event to Android system to close described abnormal interference incident, after returning to test interface, continue described automatic test.
Preferably: in described step S1, pass through to Android system registry radio receiver, so that described radio receiver active obtaining is from the broadcast of Android system.
Preferably: ejections, p.m.entry prompting that described abnormal interference incident comprises that incoming call ejects, note ejects, alarm clock sounds is ejected, in automatic test countdown finish to eject and low capacity prompt ejection in one or more.
Preferably: in described step S2 by calling Android systems approach createPointEvent, carry out analog subscriber operation and generate click action, by calling Android systems approach sendPointerSync, send click event so that Android system is carried out the action of closing described abnormal interference incident to system again.
The present invention also provides in the mobile phone automatized test process of a kind of Android and has got rid of the abnormal device disturbing, and comprises monitoring module and abnormality processing module:
Described monitoring module comprises broadcast reception module and keyword filtering module, described broadcast reception module is for obtaining the broadcast from Android system, the broadcast of described keyword filtering module for extracting abnormal interference incident, with in the time that described abnormal interference incident occurs, indicate described abnormality processing module to process described abnormal interference incident, wherein, described abnormal interference incident comprises the ejection irrelevant with test event or redirect;
Described abnormality processing module comprises testing control module and extremely gets rid of module, and described testing control module, in the time that described abnormal interference incident occurs, is controlled described automatic test and suspended; Described abnormal eliminating module is operated and is generated click action by analog subscriber, and send click event to Android system after suspending for described automatic test, to close described abnormal interference incident, makes mobile phone return to test interface; Described testing control module is also proceeded after mobile phone returns to test interface for controlling described automatic test.
Preferably: by realizing described broadcast reception module to Android system registry radio receiver.
Preferably: ejections, p.m.entry prompting that described abnormal interference incident comprises that incoming call ejects, note ejects, alarm clock sounds is ejected, in automatic test countdown finish that prompting is ejected, one or more in low capacity prompt ejection.
Said method provided by the invention and device, can in automatic test course, monitor abnormal interference incident in real time, when abnormal interference incident occurs, just can suspend automatic test and go the automatic eliminating of disturbing, after eliminating, continue again test, do not affect test process, improved on the whole test accuracy rate and the efficiency of automatic test.
Brief description of the drawings
Fig. 1 is provided in the mobile phone automatized test process of a kind of Android that provides of specific embodiments of the invention by the abnormal method flow diagram disturbing.
Embodiment
Preferred embodiment the invention will be further described to contrast accompanying drawing combination below.
Illustrate: " system " in present patent application contribution, mentioned represents Android system.
The specific embodiment of the invention provides the method for getting rid of abnormal interference in the mobile phone automatized test process of a kind of Android as shown in Figure 1, pass through the method, can not affect under the prerequisite of automatic test (being mainly the test relevant with interface operation), automatically get rid of the abnormal interference incident that can cause test crash or test result mistake occurring in automatic test course, these abnormal interference incidents generally include incoming call and eject, carrying out note ejects, p.m.entry prompting is ejected, in automatic test, countdown finishes 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 mainly comprises:
S1, in described automatic test course, obtain the broadcast from Android system, and filter by keyword, extract the broadcast of abnormal interference incident, described abnormal interference incident comprises the ejection irrelevant with test event or redirect.Obtain the broadcast from Android system, can be by the mode to registration broadcast, for example: by develop BroadcastReceiver(radio receiver in testing tool), again by the class of this radio receiver or object registration on Android system, the broadcast of sending with active obtaining system.For different test events, different keywords is set and filters, in the time of test, the event of appearance is carried out to keyword filtration, extract abnormal interference incident.
S2, when occurring when described abnormal interference incident, controlling described automatic test suspends, then calling system method createPointEvent, carry out analog subscriber operation and generate click action, calling system method sendPointerSync again, sends click event so that system is carried out the action of closing described abnormal interference incident to system.Wherein interference incident can comprise that incoming call ejection, note eject, alarm clock sounds ejection, p.m.entry points out countdown in ejection, automatic test to finish to eject and low capacity prompt ejection extremely.For example: during predefined keyword filters, to send a telegram here, carry out the above-mentioned event flags such as note for abnormal, once there is above-mentioned event in test process, taking incoming call as example: in test, suddenly incoming call, system sends the broadcast of incoming call, mobile phone jumps to the page of whether answering, because also receiving this, described radio receiver extremely broadcasts, so time-out automatic test, calling system method createPointEvent, generate click action, remove to click " rejection " option, calling system method sendPointerSync again, the event of clicking " rejection " is sent to system, system is carried out the action of closing call interface again, the interface of so far whether answering is closed, get back to test interface, and then continuation automatic test before.
Specific embodiment of the invention part separately also provides the device of getting rid of abnormal interference in the mobile phone automatized test process of a kind of Android, comprise monitoring module and abnormality processing module: described monitoring module comprises broadcast reception module and keyword filtering module, described broadcast reception module is by broadcasting to realize to system registry, for obtaining the broadcast from Android system, the broadcast of described keyword filtering module for extracting abnormal interference incident, with in the time that described abnormal interference incident occurs, indicate described abnormality processing module to process described abnormal interference incident, wherein, described abnormal interference incident comprises the ejection irrelevant with test event or redirect, described abnormality processing module comprises testing control module and extremely gets rid of module, and described testing control module, in the time that described abnormal interference incident occurs, is controlled described automatic test and suspended, described abnormal eliminating module is operated and is generated click action by analog subscriber, and send click event to Android system after suspending for described automatic test, to close described abnormal interference incident, makes mobile phone return to test interface, described testing control module is also proceeded after mobile phone returns to test interface for controlling described automatic test.
For instance: in test process, the p.m.entry of mobile phone just expires, so test interface is jumped out p.m.entry prompting frame, due to before mobile phone is carried out the action of ejecting p.m.entry prompting frame, system sends corresponding broadcast in advance, broadcast reception module receives this broadcast already, and be abnormal by keyword filtering module by this broadcast flag, abnormality processing module will be carried out certain processing to anomalous event: when test interface ejects prompting frame, the test of testing control module auto-control suspends, the abnormal module calling system method createPointEvent that gets rid of, create the click action of an analog subscriber, remove to click the option that can make this p.m.entry prompting frame disappear, for example " close " " knowing " etc., this click event is sent to system by calling system method sendPointerSync again, apprizing system notice mobile phone goes to carry out corresponding actions, thereby p.m.entry prompting frame is disappeared, so far get back to previous test interface, the test of testing control module auto-control is proceeded.Wherein, not affect test in order ensureing to disturb, can after interface disappears, within 3~5 seconds, to continue again automatic test.
Visible, method and apparatus provided by the invention can initiatively be monitored abnormal interference and under the prerequisite that does not affect test, automatically get rid of interference in automatic test course, has greatly improved the testing efficiency in automatic test course and has tested accuracy rate.
Above content is in conjunction with concrete preferred implementation further description made for the present invention, can not assert that specific embodiment of the invention is confined to these explanations.For those skilled in the art, without departing from the inventive concept of the premise, can also make some being equal to substitute or obvious modification, and performance or purposes identical, all should be considered as belonging to protection scope of the present invention.

Claims (7)

1. in the mobile phone automatized test process of Android, get rid of an abnormal method of disturbing, it is characterized in that: comprise the following steps:
S1, in described automatic test course, obtain the broadcast from Android system, and filter by keyword, extract the broadcast of abnormal interference incident, described abnormal interference incident comprises the ejection irrelevant with test event or redirect;
S2, in the time that the broadcast announcement mobile phone of described abnormal interference incident is carried out described abnormal interference incident, suspend automatic test, operate and generate click action by analog subscriber again, and send click event to Android system to close described abnormal interference incident, after returning to test interface, continue described automatic test.
2. the method for claim 1, is characterized in that: in described step S1, pass through to Android system registry radio receiver, so that described radio receiver active obtaining is from the broadcast of Android system.
3. the method for claim 1, is characterized in that: ejections, p.m.entry prompting that described abnormal interference incident comprises that incoming call ejects, note ejects, alarm clock sounds is ejected, in automatic test countdown finish to eject and low capacity prompt ejection in one or more.
4. the method for claim 1, it is characterized in that: in described step S2 by calling Android systems approach createPointEvent, carry out analog subscriber operation and generate click action, by calling Android systems approach sendPointerSync, send click event so that Android system is carried out the action of closing described abnormal interference incident to system again.
5. in the mobile phone automatized test process of Android, get rid of the abnormal device disturbing, it is characterized in that: comprise monitoring module and abnormality processing module:
Described monitoring module comprises broadcast reception module and keyword filtering module, described broadcast reception module is for obtaining the broadcast from Android system, the broadcast of described keyword filtering module for extracting abnormal interference incident, with in the time that described abnormal interference incident occurs, indicate described abnormality processing module to process described abnormal interference incident, wherein, described abnormal interference incident comprises the ejection irrelevant with test event or redirect;
Described abnormality processing module comprises testing control module and extremely gets rid of module, and described testing control module, in the time that described abnormal interference incident occurs, is controlled described automatic test and suspended; Described abnormal eliminating module is operated and is generated click action by analog subscriber, and send click event to Android system after suspending for described automatic test, to close described abnormal interference incident, makes mobile phone return to test interface; Described testing control module is also proceeded after mobile phone returns to test interface for controlling described automatic test.
6. device as claimed in claim 5, is characterized in that: by realizing described broadcast reception module to Android system registry radio receiver.
7. device as claimed in claim 5, is characterized in that: ejections, p.m.entry prompting that described abnormal interference incident comprises that incoming call ejects, note ejects, alarm clock sounds is ejected, in automatic test countdown finish that prompting is ejected, one or more in low capacity prompt ejection.
CN201410166818.0A 2014-04-23 2014-04-23 The method and apparatus getting rid of abnormal interference in Android phone automatic test course Active 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 true CN103914387A (en) 2014-07-09
CN103914387B CN103914387B (en) 2016-08-17

Family

ID=51040089

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201410166818.0A Active 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)

Cited By (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104123226A (en) * 2014-07-30 2014-10-29 深圳市共进电子股份有限公司 Processing method for popup form in automatic testing
CN105159545A (en) * 2015-09-30 2015-12-16 北京奇虎科技有限公司 Method and device for processing popup box on intelligent terminal for test
CN105183643A (en) * 2015-08-18 2015-12-23 惠州Tcl移动通信有限公司 Automatic testing interference preventing method and apparatus for Android mobile terminal
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
CN108427633A (en) * 2017-02-15 2018-08-21 腾讯科技(深圳)有限公司 The processing method and processing device of display interface
CN109739761A (en) * 2018-12-28 2019-05-10 北京安和瑞福信息技术有限公司 Automated testing method and device
CN110046079A (en) * 2019-04-25 2019-07-23 广州华多网络科技有限公司 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年》 *

Cited By (11)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104123226A (en) * 2014-07-30 2014-10-29 深圳市共进电子股份有限公司 Processing method for popup form in automatic testing
CN104123226B (en) * 2014-07-30 2017-02-08 深圳市共进电子股份有限公司 Processing method for popup form in automatic testing
CN105183643A (en) * 2015-08-18 2015-12-23 惠州Tcl移动通信有限公司 Automatic testing interference preventing method and apparatus for Android mobile terminal
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
CN108427633A (en) * 2017-02-15 2018-08-21 腾讯科技(深圳)有限公司 The processing method and processing device of display interface
CN109739761A (en) * 2018-12-28 2019-05-10 北京安和瑞福信息技术有限公司 Automated testing method and device
CN110046079A (en) * 2019-04-25 2019-07-23 广州华多网络科技有限公司 Network request detection method, device and equipment
CN110046079B (en) * 2019-04-25 2024-03-12 广州方硅信息技术有限公司 Network request detection method, device and equipment

Also Published As

Publication number Publication date
CN103914387B (en) 2016-08-17

Similar Documents

Publication Publication Date Title
CN103914387A (en) Method and device for eliminating abnormal interference in Android mobile phone automated testing process
CN105096521B (en) Safe early warning method and relevant apparatus
US11345194B2 (en) Method and apparatus for activating tire pressure sensor, storage medium and front-end server title
CN104361076B (en) The abnormality eliminating method and device of browser
CN105554575B (en) Method and device for processing media playing function in multiple systems
CN103986833A (en) Abnormal condition monitoring method and device
CN104918005A (en) Device, system and method for intercepting and sending monitoring record in real-time
CN102663868A (en) Security protection realizing method and system of mobile intelligent terminal
CN102209073A (en) IOT (Internet of Things)-based Linux operation-level comprehensive security management platform
CN107436777A (en) Mobile terminal, application crash processing method and processing device
CN106341259A (en) Fault information report method and device
CN107203369A (en) Bullet frame reminding method and device based on Android
CN102509546A (en) Noise reduction and abnormal sound detection method applied to rail transit
CN105376417A (en) Automatic control method and automatic control system for flight mode
CN106126183A (en) Electronic equipment and audio-frequency processing method
CN102118874A (en) Call processing method and mobile switching center
CN104506735A (en) Mobile terminal and control method thereof
CN106227498A (en) A kind of voice-operated method and apparatus
CN104504853A (en) Mobile terminal and control device thereof
CN108965598A (en) Mobile terminal and its voice prompting method of alarm clock event, device and storage medium
CN105915682A (en) Alarm clock with alarm function and an emergency alarm method employing the alarm clock
CN104548259A (en) Alarming method of injection pump and injection pump
CN104469020A (en) Mobile terminal and control method thereof
CN104202463A (en) Call filter method and intelligent terminal
US20170171374A1 (en) Method and electronic device for user manual callouting in smart phone

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