CN102141960A - Automatic test method based on Android - Google Patents

Automatic test method based on Android Download PDF

Info

Publication number
CN102141960A
CN102141960A CN2011100663006A CN201110066300A CN102141960A CN 102141960 A CN102141960 A CN 102141960A CN 2011100663006 A CN2011100663006 A CN 2011100663006A CN 201110066300 A CN201110066300 A CN 201110066300A CN 102141960 A CN102141960 A CN 102141960A
Authority
CN
China
Prior art keywords
test
android
kinds
program
method based
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
CN2011100663006A
Other languages
Chinese (zh)
Other versions
CN102141960B (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 CN 201110066300 priority Critical patent/CN102141960B/en
Publication of CN102141960A publication Critical patent/CN102141960A/en
Application granted granted Critical
Publication of CN102141960B publication Critical patent/CN102141960B/en
Expired - Fee Related legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Landscapes

  • Telephone Function (AREA)

Abstract

The invention discloses an automatic test method based on Android, which comprises the following steps: 1. calling various test programs and internal shell commands of Android; 2. encoding the various test programs and the internal shell commands; 3. after encoding, forming a series of test sequences which can be called randomly and generating corresponding test events; 4. after the encoding is finished, reserving a storage space for compiling expand interface programs; 5. compiling codes in a Linux compiling environment to form an executable file; and 6. carrying out a random test on the various test programs by the executable file during the test through calling the monkey random test command of the Android. The automatic test method disclosed by the invention is simple and convenient to operate, integrates various automatic tests, can carry out an automatic test only through a mobile phone and has high efficiency.

Description

A kind of automated testing method based on Android
Technical field
The present invention relates to a kind of method of testing, particularly relate to a kind of automated testing method based on Android.
Background technology
Traditional mobile phone is tested by computing machine when carrying out all kinds of automatic test, and need manually carry out the whole process supervision, when all kinds of test procedures are tested, when testing a program, need the next program that needs test of input, time is long, efficient is low, and the cost height.
Summary of the invention
The objective of the invention is to overcome the deficiencies in the prior art, a kind of automated testing method based on Android is provided, simple to operation, and all kinds of automatic tests are carried out integrated, only need a mobile phone just can carry out automatic test, efficient height.
In order to achieve the above object, the technical solution used in the present invention is, a kind of automated testing method based on Android, and step is as follows:
Step 1, all kinds of test procedures that call Android and inner shell instruction;
Step 2, code is compiled in instruction to all kinds of test procedures and inner shell;
But form a series of random call cycle testss behind step 3, the volume code, and produce corresponding test event;
After step 4, code compiling are finished, and reserved storage space is in order to writing the expansion interface program;
Step 5, code is compiled by the Linux translation and compiling environment, form executable file;
Step 6, executable file call the monkey random test order of Android all kinds of test procedures are carried out random test when test.
All kinds of test procedures described in the above-mentioned steps 1,2 comprise software automated testing program, file management class automatic test program, outfield class automatic test program and hardware automatic test program etc.; Executable file described in the above-mentioned steps 5 is the abbreviation of APK(Android Package) file of form.
Compared with prior art, the invention has the beneficial effects as follows: the monkey method of the first, calling android by the inner shell instruction of integrated Android principle, what be implemented in the mobile phone side passes through the equipment simulating manually-operated, form reliable software stability test system, various test procedures are encoded, test by calling each test procedure during test, test simple and conveniently, improve testing efficiency; The second, operation interface is visual, does not need by PC, only needs an Android mobile phone just can test whenever and wherever possible; Three, coding the time is reserved with expansion interface, can add other test procedures as required, with the test procedure into test procedure of encoding, in order to test, has good extendability; Four, be adapted to the mobile phone of android system, favorable compatibility is arranged.
Description of drawings
Fig. 1 is a software flow pattern of the present invention.
Embodiment
Purport of the present invention is to overcome the deficiencies in the prior art, a kind of automated testing method based on Android is provided, call the monkey method of android by the inner shell instruction of integrated android principle, what be implemented in the mobile phone side passes through the equipment simulating manually-operated, forms reliable software stability test system.All kinds of test procedures are comprised that software automated testing program, file management class automatic test program and outfield class automatic test program etc. encode, program energy all kinds of test procedures of random call behind the coding also carry out automatic test, form an automatic test system, all kinds of test procedures are concentrated within a framework, can be called each class method at any time and carry out automatic test.The code that writes is compiled by the translation and compiling environment on the linux, and formation can be installed in the executable file installation kit on the mobile phone, carries out each class testing anywhere or anytime thereby make anyone only need that executable file is installed on mobile phone and according to explanation.
Be elaborated with reference to accompanying drawing below in conjunction with embodiment, so that technical characterictic of the present invention and advantage are carried out more deep annotation.
Software flow pattern of the present invention as shown in Figure 1, a kind of automated testing method based on Android, step is as follows:
Step 1, all kinds of test procedures that call Android and inner shell instruction;
Step 2, code is compiled in instruction to all kinds of test procedures and inner shell;
But form a series of random call cycle testss behind step 3, the volume code, and produce corresponding test event;
After step 4, code compiling are finished, and reserved storage space is in order to writing the expansion interface program;
Step 5, code is compiled by the Linux translation and compiling environment, form executable file;
Step 6, executable file call the monkey random test order of Android all kinds of test procedures are carried out random test when test.
All kinds of test procedures described in the above-mentioned steps 1,2 comprise software automated testing program, file management class automatic test program, outfield class automatic test program and hardware automatic test program etc.; Executable file described in the above-mentioned steps 5 is the file of APK form.
Need a series of parameter at the execution automatic test, as,
(1) all kinds of test procedure module code names: the corresponding corresponding module of corresponding code name, the test subscriber can select need oneself to feel the module of test;
(2) starting index: i.e. SEED, different SEED produces different random test sequence samples, and the random occurrence that same SEED carries out out is the same, can reappear problem by same SEED;
(3) test time delay: the interval between per two random actions is a unit with the millisecond, if there is not time delay or very little, may cause procedure termination by keydipatchtimeout;
(4) testing time: the number of clicks that promptly produces random test;
(5) Log journal file: click and check that log can check the log that problem produced that test back mobile phone occurs, the log title is with " bag name "+" date "+" time " .txt name.
In the use, executable file is installed on the Android mobile phone, open executable file, then the automatic test catalogue can appear, catalogue is all kinds of test name, as software automated testing, file management class automatic test, outfield class automatic test and other tests, use for the convenience of the user, in catalogue, add and use imprint.After the test event of user in the hit testing catalogue, then enter corresponding testing program and test, test result can form the log journal file, and test result is presented on the mobile phone screen.
Although the present invention has made the clear description finished to how to realize based on the automated testing method of Android by instantiation, but the present invention is not limited only to described embodiment, and to reach identical purpose be contingent and all be included in the present invention by simple reprogramming.

Claims (3)

1. automated testing method based on Android, step is as follows:
Step 1, all kinds of test procedures that call Android and inner shell instruction;
Step 2, code is compiled in instruction to all kinds of test procedures and inner shell;
But form a series of random call cycle testss behind step 3, the volume code, and produce corresponding test event;
After step 4, code compiling are finished, and reserved storage space is in order to writing the expansion interface program;
Step 5, code is compiled by the Linux translation and compiling environment, form executable file;
Step 6, executable file call the monkey random test order of Android all kinds of test procedures are carried out random test when test.
2. the automated testing method based on Android according to claim 1 is characterized in that: all kinds of test procedures described in the step 1 comprise software automated testing program, file management class automatic test program, outfield class automatic test program and hardware automatic test program.
3. the automated testing method based on Android according to claim 2 is characterized in that: the executable file described in the step 5 is the file of APK form.
CN 201110066300 2011-03-18 2011-03-18 Automatic test method based on Android Expired - Fee Related CN102141960B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN 201110066300 CN102141960B (en) 2011-03-18 2011-03-18 Automatic test method based on Android

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN 201110066300 CN102141960B (en) 2011-03-18 2011-03-18 Automatic test method based on Android

Publications (2)

Publication Number Publication Date
CN102141960A true CN102141960A (en) 2011-08-03
CN102141960B CN102141960B (en) 2013-08-14

Family

ID=44409494

Family Applications (1)

Application Number Title Priority Date Filing Date
CN 201110066300 Expired - Fee Related CN102141960B (en) 2011-03-18 2011-03-18 Automatic test method based on Android

Country Status (1)

Country Link
CN (1) CN102141960B (en)

Cited By (29)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102541740A (en) * 2012-01-04 2012-07-04 广东欧珀移动通信有限公司 Android-based automatic test method for mobile phone notes
CN102799511A (en) * 2012-06-30 2012-11-28 成都西可科技有限公司 Android-based automatic test method and system
CN102855188A (en) * 2012-08-03 2013-01-02 福州瑞芯微电子有限公司 Android based system pressure testing method
CN102938040A (en) * 2012-09-29 2013-02-20 中兴通讯股份有限公司 Malicious Android application program detection method, system and device
CN102999419A (en) * 2011-09-13 2013-03-27 百度在线网络技术(北京)有限公司 Android test incident record and playback methods and device
CN103024439A (en) * 2012-12-27 2013-04-03 青岛海信电器股份有限公司 Detection method and system for smart televisions
CN103353858A (en) * 2013-06-06 2013-10-16 百度在线网络技术(北京)有限公司 Automatic testing method and device based on action touch simulation
CN103364659A (en) * 2013-06-28 2013-10-23 珠海全志科技股份有限公司 Android system-based electronic equipment test system and method
WO2013185563A1 (en) * 2012-06-12 2013-12-19 腾讯科技(深圳)有限公司 File storage method and apparatus, and storage medium
CN103514069A (en) * 2012-11-22 2014-01-15 Tcl集团股份有限公司 Method and system for testing APIs of HAL of Android system
CN104053051A (en) * 2014-06-12 2014-09-17 广东欧珀移动通信有限公司 Automated testing method and device achieving compatibility of mobile phone audios and mobile phone videos
CN104063324A (en) * 2014-07-10 2014-09-24 上海斐讯数据通信技术有限公司 Method and system for Monkey test
WO2014169565A1 (en) * 2013-08-21 2014-10-23 中兴通讯股份有限公司 Terminal testing method and device
CN104346279A (en) * 2014-10-27 2015-02-11 百度在线网络技术(北京)有限公司 Method and device for software testing
CN104461898A (en) * 2014-12-19 2015-03-25 北京奇虎科技有限公司 Application testing method, center control server, test terminal and system
US9075781B2 (en) 2013-03-15 2015-07-07 Apkudo, Llc System and method for coordinating field user testing results for a mobile application across various mobile devices
CN104794032A (en) * 2015-04-23 2015-07-22 福州大学 Method for automatically testing hardware module of intelligent displayer
CN104866427A (en) * 2015-06-05 2015-08-26 北京金山安全软件有限公司 Application testing method and device based on Monkey command and terminal
CN105279063A (en) * 2014-07-25 2016-01-27 腾讯科技(深圳)有限公司 Test method and apparatus, and server
CN105279077A (en) * 2014-06-24 2016-01-27 腾讯科技(深圳)有限公司 Method and device for automated testing
US9283672B1 (en) 2014-12-11 2016-03-15 Apkudo, Llc Robotic testing device and method for more closely emulating human movements during robotic testing of mobile devices
CN105446870A (en) * 2014-08-25 2016-03-30 北京畅游天下网络技术有限公司 Method and apparatus for performing automation test on app
CN106126424A (en) * 2016-06-29 2016-11-16 厦门美图移动科技有限公司 A kind of visual automated testing method of script, device and mobile terminal
CN106371994A (en) * 2016-09-04 2017-02-01 南京理工大学 Dynamic mobile APP testing method based on natural language processing
US9578133B2 (en) 2012-12-03 2017-02-21 Apkudo, Llc System and method for analyzing user experience of a software application across disparate devices
CN108376115A (en) * 2018-01-29 2018-08-07 数据通信科学技术研究所 Across the Android platform automated testing method of one kind and system
US10261611B2 (en) 2012-12-03 2019-04-16 Apkudo, Llc System and method for objectively measuring user experience of touch screen based devices
CN111897720A (en) * 2020-07-10 2020-11-06 广东小天才科技有限公司 Test scene recognition method, test system, device and storage medium
CN112579438A (en) * 2020-12-01 2021-03-30 河南芯盾网安科技发展有限公司 Multifunctional automatic test tool and test method

Citations (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101957793A (en) * 2010-09-03 2011-01-26 中国科学院软件研究所 Android and android derivative system-oriented method for playing back software operation record

Patent Citations (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101957793A (en) * 2010-09-03 2011-01-26 中国科学院软件研究所 Android and android derivative system-oriented method for playing back software operation record

Non-Patent Citations (2)

* Cited by examiner, † Cited by third party
Title
李曜: "手机测试管理系统的设计、实现及其优化", 《北京交通大学硕士学位论文》 *
王亚民等: "基于python脚本的手机软件MTBF测试用例设计及实现", 《PROCEEDINGS OF INTERNATIONAL CONFERENCE OF CHINA COMMUNICATION AND TECHNOLOGY (ICCCT2010)》 *

Cited By (46)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102999419A (en) * 2011-09-13 2013-03-27 百度在线网络技术(北京)有限公司 Android test incident record and playback methods and device
CN102541740B (en) * 2012-01-04 2016-03-30 广东欧珀移动通信有限公司 A kind of mobile phone notes automated testing method based on Android
CN102541740A (en) * 2012-01-04 2012-07-04 广东欧珀移动通信有限公司 Android-based automatic test method for mobile phone notes
WO2013185563A1 (en) * 2012-06-12 2013-12-19 腾讯科技(深圳)有限公司 File storage method and apparatus, and storage medium
US10013419B2 (en) 2012-06-12 2018-07-03 Tencent Technology (Shenzhen) Company Limited File storage method and apparatus, and storage medium
CN102799511A (en) * 2012-06-30 2012-11-28 成都西可科技有限公司 Android-based automatic test method and system
CN102855188A (en) * 2012-08-03 2013-01-02 福州瑞芯微电子有限公司 Android based system pressure testing method
CN102938040A (en) * 2012-09-29 2013-02-20 中兴通讯股份有限公司 Malicious Android application program detection method, system and device
CN103514069A (en) * 2012-11-22 2014-01-15 Tcl集团股份有限公司 Method and system for testing APIs of HAL of Android system
US9578133B2 (en) 2012-12-03 2017-02-21 Apkudo, Llc System and method for analyzing user experience of a software application across disparate devices
US10860122B2 (en) 2012-12-03 2020-12-08 Apkudo, Inc. System and method for objectively measuring user experience of touch screen based devices
US10671367B2 (en) 2012-12-03 2020-06-02 Apkudo, Llc System and method for analyzing user experience of a software application across disparate devices
US10261611B2 (en) 2012-12-03 2019-04-16 Apkudo, Llc System and method for objectively measuring user experience of touch screen based devices
CN103024439A (en) * 2012-12-27 2013-04-03 青岛海信电器股份有限公司 Detection method and system for smart televisions
US10452527B2 (en) 2013-03-15 2019-10-22 Apkudo, Llc System and method for facilitating field testing of a test application
US9367436B2 (en) 2013-03-15 2016-06-14 Apkudo, Llc System and method for coordinating field user testing results for a mobile application across various mobile devices
US9075781B2 (en) 2013-03-15 2015-07-07 Apkudo, Llc System and method for coordinating field user testing results for a mobile application across various mobile devices
US9858178B2 (en) 2013-03-15 2018-01-02 Apkudo, Llc System and method for facilitating field testing of a test application
CN103353858B (en) * 2013-06-06 2016-03-16 百度在线网络技术(北京)有限公司 A kind of automated testing method based on action touch simulation and device
CN103353858A (en) * 2013-06-06 2013-10-16 百度在线网络技术(北京)有限公司 Automatic testing method and device based on action touch simulation
CN103364659A (en) * 2013-06-28 2013-10-23 珠海全志科技股份有限公司 Android system-based electronic equipment test system and method
WO2014169565A1 (en) * 2013-08-21 2014-10-23 中兴通讯股份有限公司 Terminal testing method and device
CN104424089A (en) * 2013-08-21 2015-03-18 中兴通讯股份有限公司 Terminal testing method and device
CN104053051B (en) * 2014-06-12 2017-10-17 广东欧珀移动通信有限公司 It is a kind of to realize handset audio, the automated testing method and device of video compatibility
CN104053051A (en) * 2014-06-12 2014-09-17 广东欧珀移动通信有限公司 Automated testing method and device achieving compatibility of mobile phone audios and mobile phone videos
CN105279077A (en) * 2014-06-24 2016-01-27 腾讯科技(深圳)有限公司 Method and device for automated testing
CN104063324B (en) * 2014-07-10 2017-11-24 上海斐讯数据通信技术有限公司 A kind of Monkey method of testings and system
CN104063324A (en) * 2014-07-10 2014-09-24 上海斐讯数据通信技术有限公司 Method and system for Monkey test
CN105279063A (en) * 2014-07-25 2016-01-27 腾讯科技(深圳)有限公司 Test method and apparatus, and server
CN105279063B (en) * 2014-07-25 2019-11-22 腾讯科技(深圳)有限公司 A kind of test method, device and server
CN105446870A (en) * 2014-08-25 2016-03-30 北京畅游天下网络技术有限公司 Method and apparatus for performing automation test on app
CN104346279A (en) * 2014-10-27 2015-02-11 百度在线网络技术(北京)有限公司 Method and device for software testing
US9469037B2 (en) 2014-12-11 2016-10-18 Apkudo, Llc Robotic testing device and method for more closely emulating human movements during robotic testing of mobile devices
US9283672B1 (en) 2014-12-11 2016-03-15 Apkudo, Llc Robotic testing device and method for more closely emulating human movements during robotic testing of mobile devices
US9718196B2 (en) 2014-12-11 2017-08-01 Apkudo, Llc Robotic testing device and method for more closely emulating human movements during robotic testing of a user device
CN104461898A (en) * 2014-12-19 2015-03-25 北京奇虎科技有限公司 Application testing method, center control server, test terminal and system
CN104794032B (en) * 2015-04-23 2018-09-18 福州大学 A method of realizing intelligent display hardware module automatic test
CN104794032A (en) * 2015-04-23 2015-07-22 福州大学 Method for automatically testing hardware module of intelligent displayer
CN104866427B (en) * 2015-06-05 2018-01-23 北京金山安全软件有限公司 Application testing method and device based on Monkey command and terminal
CN104866427A (en) * 2015-06-05 2015-08-26 北京金山安全软件有限公司 Application testing method and device based on Monkey command and terminal
CN106126424A (en) * 2016-06-29 2016-11-16 厦门美图移动科技有限公司 A kind of visual automated testing method of script, device and mobile terminal
CN106371994B (en) * 2016-09-04 2018-11-13 南京理工大学 Dynamic mobile APP test methods based on natural language processing
CN106371994A (en) * 2016-09-04 2017-02-01 南京理工大学 Dynamic mobile APP testing method based on natural language processing
CN108376115A (en) * 2018-01-29 2018-08-07 数据通信科学技术研究所 Across the Android platform automated testing method of one kind and system
CN111897720A (en) * 2020-07-10 2020-11-06 广东小天才科技有限公司 Test scene recognition method, test system, device and storage medium
CN112579438A (en) * 2020-12-01 2021-03-30 河南芯盾网安科技发展有限公司 Multifunctional automatic test tool and test method

Also Published As

Publication number Publication date
CN102141960B (en) 2013-08-14

Similar Documents

Publication Publication Date Title
CN102141960B (en) Automatic test method based on Android
CN102110053B (en) Random testing method based on Android
CN102880546B (en) Software integration testing method and system based on extensible markup language (XML) database
CN106371813B (en) A kind of electric vehicle motor controller method for producing software based on Simulink
CN104407980B (en) Mobile solution automatic test device and method
CN101706753B (en) Unit testing framework and method based on Perl
CN107368408A (en) A kind of software fault towards interface injects automated testing method
CN103268289B (en) Record the method and system of application testing script on mobile terminals
CN104484273A (en) Test method for application program, device and system
CN103064781A (en) Mobile software automated testing method
CN105512036A (en) Test template for automatically generating test case according to preset rules and test method
CN104063325A (en) Automatic generation device and method for test cases of embedded software
CN104268310A (en) Method for calling UVM verification environment through special graphical interface
CN101888318B (en) A kind of system and method for testing performance index of communication system
CN103544100A (en) Method, system and client side for testing APP of portable data processing equipment
CN105302549A (en) Multiple-language-supporting test process generating, debugging and executing system
CN103294599A (en) Cloud-based method for cross test of embedded software
CN106951575A (en) A kind of multidisciplinary Virtual Experiment Simulation method based on COSIM
CN103207783A (en) Software development engine system based on browser/server mode and building method thereof
CN103942092A (en) HLA co-simulation method supporting LabView graphical programming
CN104239202A (en) Non-Root testing method and system of interactive intelligent equipment
CN103399813B (en) A kind of embedded system off-line trace analysis method based on Trace information
CN103186465B (en) The browser compatibility method of testing of web user interface and system
CN105224437A (en) A kind ofly obtain affairs on mobile terminal and perform method and apparatus consuming time
CN103017815A (en) Visual general test system and visual general test method

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, Guangdong province 523860 usha Beach Road Dongguan City, No. 18 Guangdong Oupo Mobile Communication Co Ltd

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

Address before: Changan Town, Guangdong province 523860 usha Beach Road Dongguan City, No. 18 Guangdong Oupo Mobile Communication Co Ltd

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

CP01 Change in the name or title of a patent holder
CP02 Change in the address 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, Guangdong province 523860 usha Beach Road Dongguan City, No. 18 Guangdong Oupo Mobile Communication Co Ltd

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

CP02 Change in the address of a patent holder
CF01 Termination of patent right due to non-payment of annual fee

Granted publication date: 20130814

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