CN102141960B - Automatic test method based on Android - Google Patents

Automatic test method based on Android Download PDF

Info

Publication number
CN102141960B
CN102141960B CN 201110066300 CN201110066300A CN102141960B CN 102141960 B CN102141960 B CN 102141960B CN 201110066300 CN201110066300 CN 201110066300 CN 201110066300 A CN201110066300 A CN 201110066300A CN 102141960 B CN102141960 B CN 102141960B
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.)
Expired - Fee Related
Application number
CN 201110066300
Other languages
Chinese (zh)
Other versions
CN102141960A (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

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 were write and finished, reserved storage space was 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 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, in order to 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 were write and finished, reserved storage space was 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 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 namely produces random test;
(5) Log journal file: click and check that log can check the log that the problem of test back mobile phone appearance produces, 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 test procedure 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 were write and finished, reserved storage space was 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, it 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, it 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 CN102141960A (en) 2011-08-03
CN102141960B true 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)

Families Citing this family (28)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102999419B (en) * 2011-09-13 2016-03-16 百度在线网络技术(北京)有限公司 A kind of Android test incident record back method and device
CN102541740B (en) * 2012-01-04 2016-03-30 广东欧珀移动通信有限公司 A kind of mobile phone notes automated testing method based on Android
CN102693325B (en) * 2012-06-12 2014-06-11 腾讯科技(深圳)有限公司 File storing method and device
CN102799511A (en) * 2012-06-30 2012-11-28 成都西可科技有限公司 Android-based automatic test method and system
CN102855188B (en) * 2012-08-03 2015-12-02 福州瑞芯微电子有限公司 Based on the system pressure method of testing of Android
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
US10261611B2 (en) 2012-12-03 2019-04-16 Apkudo, Llc System and method for objectively measuring user experience of touch screen based devices
CN103024439B (en) * 2012-12-27 2014-12-17 贵阳海信电子有限公司 Detection method and system for smart televisions
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
CN103353858B (en) * 2013-06-06 2016-03-16 百度在线网络技术(北京)有限公司 A kind of automated testing method based on action touch simulation and device
CN103364659A (en) * 2013-06-28 2013-10-23 珠海全志科技股份有限公司 Android system-based electronic equipment test system and method
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
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
CN105279063B (en) * 2014-07-25 2019-11-22 腾讯科技(深圳)有限公司 A kind of test method, device and server
CN105446870B (en) * 2014-08-25 2019-04-05 北京畅游天下网络技术有限公司 The method and apparatus that automatic test is carried out to app application
CN104346279A (en) * 2014-10-27 2015-02-11 百度在线网络技术(北京)有限公司 Method and device for software 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
CN104461898B (en) * 2014-12-19 2019-02-15 北京奇虎科技有限公司 Using the method for test, control server, test terminal and system
CN104794032B (en) * 2015-04-23 2018-09-18 福州大学 A method of realizing intelligent display hardware module automatic test
CN104866427B (en) * 2015-06-05 2018-01-23 北京金山安全软件有限公司 Application testing method and device based on Monkey command and terminal
CN106126424B (en) * 2016-06-29 2018-09-14 厦门美图移动科技有限公司 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
CN108376115B (en) * 2018-01-29 2022-01-18 数据通信科学技术研究所 Automatic testing method and system across Android platform
CN111897720A (en) * 2020-07-10 2020-11-06 广东小天才科技有限公司 Test scene recognition method, test system, device and storage medium
CN112579438B (en) * 2020-12-01 2022-07-08 河南芯盾网安科技发展有限公司 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 (4)

* Cited by examiner, † Cited by third party
Title
基于python脚本的手机软件MTBF测试用例设计及实现;王亚民等;《Proceedings of International Conference of China Communication and Technology (ICCCT2010)》;20101231;126-129 *
手机测试管理系统的设计、实现及其优化;李曜;《北京交通大学硕士学位论文》;20100728;1-50 *
李曜.手机测试管理系统的设计、实现及其优化.《北京交通大学硕士学位论文》.2010,1-50.
王亚民等.基于python脚本的手机软件MTBF测试用例设计及实现.《Proceedings of International Conference of China Communication and Technology (ICCCT2010)》.2010,126-129.

Also Published As

Publication number Publication date
CN102141960A (en) 2011-08-03

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
CN104407980B (en) Mobile solution automatic test device and method
CN103425574B (en) A kind of method and device of test application program
CN102750145B (en) Network system software system framework and implementation method thereof
CN101706753B (en) Unit testing framework and method based on Perl
CN109597761A (en) A kind of automatic interface testing method based on Jmeter
CN105912473B (en) Mobile APP automatically testing platform and test method based on BDD
CN103064781A (en) Mobile software automated testing method
CN104484273A (en) Test method for application program, device and system
CN103268289B (en) Record the method and system of application testing script on mobile terminals
CN104268310A (en) Method for calling UVM verification environment through special graphical interface
CN105512036A (en) Test template for automatically generating test case according to preset rules and test method
CN102156784A (en) Verifying environment patterned chip verifying method and device
CN104461810A (en) Method for improving functional verification efficiency of embedded processor
CN103338290A (en) A method for automatically testing performance of an Android handset
CN104461846B (en) The method and apparatus for detecting application program power consumption
CN103544100A (en) Method, system and client side for testing APP of portable data processing equipment
CN100351785C (en) Method for debuging embedded system and equipment
CN105302549A (en) Multiple-language-supporting test process generating, debugging and executing system
CN104063324A (en) Method and system for Monkey test
CN106951575A (en) A kind of multidisciplinary Virtual Experiment Simulation method based on COSIM
Goli et al. Automatic equivalence checking for SystemC-TLM 2.0 models against their formal specifications
CN103207783A (en) Software development engine system based on browser/server mode and building method thereof

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
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.

CP02 Change in the address 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.

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

Granted publication date: 20130814