CN102110053A - Random testing method based on Android - Google Patents

Random testing method based on Android Download PDF

Info

Publication number
CN102110053A
CN102110053A CN2011100662022A CN201110066202A CN102110053A CN 102110053 A CN102110053 A CN 102110053A CN 2011100662022 A CN2011100662022 A CN 2011100662022A CN 201110066202 A CN201110066202 A CN 201110066202A CN 102110053 A CN102110053 A CN 102110053A
Authority
CN
China
Prior art keywords
monkey
test
cmd
order
android
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
CN2011100662022A
Other languages
Chinese (zh)
Other versions
CN102110053B (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 201110066202 priority Critical patent/CN102110053B/en
Publication of CN102110053A publication Critical patent/CN102110053A/en
Application granted granted Critical
Publication of CN102110053B publication Critical patent/CN102110053B/en
Expired - Fee Related legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Landscapes

  • Debugging And Monitoring (AREA)

Abstract

A random testing method based on Android comprises the following steps: (1) using a Windows CMD (command) to guide a user to conduct testing; (2) calling each.bat file by use of the CMD to carry out monkey testing; (3) using the CMD to help monkey generate a random parameter; (4) using the monkey command to conduct random testing; (5) using the CMD to export a log file of monkey; (6) using the CMD to screen the existing log file of monkey; and (7) using the CMD to determine whether the file is occupied so as to determine whether to continue the testing program or not. By integrating the CMD of the Windows with the Monkey command of Android, the method can simplify the software testing of mobile phones, improve the testing efficiency and lower the use threshold.

Description

A kind of random testing method based on Android
Technical field
The present invention relates to a kind of method of testing, particularly relate to a kind of random testing method based on Android.
Background technology
In the existing smart mobile phone, the abbreviation of the CMD(command of Windows) order is isolated operation respectively with the random test monkey order of Android.When personnel operation, the test more complicated of getting up, and when test, operating personnel must know clearly that test command could carry out this test command, and need order the monkey of random test and carry out a series of study and could operate, testing efficiency is low.
How the CMD order of windows and the Monkey command history of android are got up, the software test of mobile phone is oversimplified, CMD order soon and Monkey order are carried out comprehensive, use the test function of system, file, document management function, integration of user interaction functionality and the monkey of CMD, both are combined; Can allow the tester needn't carry out Monkey test study, only need just can carry out test according to prompting operation, improve testing efficiency, reduce and use threshold, and a series of automatic tests are together in series, make full use of free time, improving testing efficiency is the technical barrier that those skilled in the art face.
Summary of the invention
The objective of the invention is to overcome the deficiencies in the prior art, a kind of random testing method based on Android is provided, make the CMD order of windows and the random test Monkey order of Android combine, realize test automatically, improved efficient.
In order to achieve the above object, the technical solution used in the present invention is, a kind of random testing method based on Android, and its step is as follows:
The CMD order guiding user of step 1, use Windows tests;
Step 2, each .bat file of use CMD command calls carry out the monkey test;
Step 3, use CMD order help monkey to produce stray parameter;
Step 4, use monkey order carrying out random test;
The log journal file of monkey is derived in step 5, use CMD order;
Step 6, the log journal file that uses CMD order filtering monkey to occur;
Step 7, use CMD to order to judge that thereby file is whether occupied judges whether test procedure continues.
Stray parameter in the above-mentioned steps 3 is the number of times and the test duration spacing of test seed number, test.Described seed is any one random number, and same random number produces same action, carries out same test, can reappear problem if test goes wrong by same seed.
Compared with prior art, the invention has the beneficial effects as follows: the first, the Monkey command history of the CMD of windows order and android is oversimplified the software test of mobile phone; The second, can allow the tester needn't carry out Monkey test study, only need just can carry out test, improve testing efficiency, reduce and use threshold according to prompting operation; Three, a series of automatic tests are together in series, make full use of free time to test, improve testing efficiency.
Description of drawings
Fig. 1 is a software flow pattern of the present invention;
Fig. 2 is a concrete operations example flow chart of the present invention.
Embodiment
Purport of the present invention is to overcome the deficiencies in the prior art, a kind of random testing method based on Android is provided, carry out CMD order and Monkey order comprehensive, use the test function of system, file, document management function, integration of user interaction functionality and the random test monkey of CMD, both are combined, realize automatic test, improve testing efficiency.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 random testing method based on Android, its step is as follows:
The CMD order guiding user of step 1, use Windows tests;
Step 2, each .bat file of use CMD command calls carry out the monkey test;
Step 3, use CMD order help monkey to produce stray parameter;
Step 4, use monkey order carrying out random test;
The log journal file of monkey is derived in step 5, use CMD order;
Step 6, the log journal file that uses CMD order filtering monkey to occur;
Step 7, use CMD to order to judge that thereby file is whether occupied judges whether test procedure continues
Stray parameter in the above-mentioned steps 3 is the number of times and the test duration spacing of test seed number, test.
The concrete operations example flow chart of method of testing of the present invention as shown in Figure 2, on the android mobile phone that uses click-through software, test, click-through software only need be double-clicked mouse for the user, according to the prompting input parameter not even the needs input parameter just can test, simple and quick, the operation steps on the android mobile phone of click-through software is as follows:
Step 1, click-through .bat program bring into operation;
Step 2, the current item that can test of demonstration, the user selects the own input test bag of test event user name;
Step 3, the input by the user are judged and the .bat file that calls each module is tested;
Step 4, manual input test number of times or using system default number of times;
Step 5, input seed number or use random number;
Step 6, input test operation ratio or use default scale;
Step 7, test beginning show parameter such as start time, number of times, seed and these parameters are imported in the log journal file;
In step 8, the test, program is carried out the monkey random test;
Step 9, the complete log journal file of generation;
Step 10, prompting user test are finished, and show log journal file storeroom;
Step 11, whether file to occur occupied;
Step 12, the occupied then operation problem of file solve .bat and judge whether to continue test, and unoccupied then directly the judging whether of file continues to test;
Step 13, program are proceeded test and are then skipped to step 2, do not continue then termination routine.
Seed described in the above-mentioned steps 5 is any one random number, and same random number produces same action, carries out same test, can reappear problem if test goes wrong by same seed.
In addition, program is adjusted down a little, then do not needed the user to carry out any input and only need double-click the .bat instrument of opening, then the .bat instrument will be tested all modules to be tested, make full use of the vacant time, the user can utilize and open computer evening and automatically instrument is tested.Adjusted program step is as follows:
Step 1, user double-click and open .Bat;
Step 2, use CMD order help monkey to produce stray parameter;
Step 3, use monkey order begin all modules are carried out random test;
Step 4, test beginning show parameter such as start time, number of times, seed and these parameters are imported in the log journal file;
Step 5, test produce log, and derive log by CMD;
Step 6, CMD screen log;
Step 7, the complete log journal file of generation;
Step 8, prompting user test are finished, and show log journal file storeroom.
Although the present invention has made clear and complete description to how to realize based on the random 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 (2)

1. random testing method based on Android, its step is as follows:
The CMD order guiding user of step 1, use Windows tests;
Step 2, each .bat file of use CMD command calls carry out the monkey test;
Step 3, use CMD order help monkey to produce stray parameter;
Step 4, use monkey order carrying out random test;
The log journal file of monkey is derived in step 5, use CMD order;
Step 6, the log journal file that uses CMD order filtering monkey to occur;
Step 7, use CMD to order to judge that thereby file is whether occupied judges whether test procedure continues.
2. the random testing method based on Android according to claim 1 is characterized in that: the stray parameter described in the step 3 is the number of times and the test duration spacing of test seed number, test.
CN 201110066202 2011-03-18 2011-03-18 Random testing method based on Android Expired - Fee Related CN102110053B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN 201110066202 CN102110053B (en) 2011-03-18 2011-03-18 Random testing method based on Android

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN 201110066202 CN102110053B (en) 2011-03-18 2011-03-18 Random testing method based on Android

Publications (2)

Publication Number Publication Date
CN102110053A true CN102110053A (en) 2011-06-29
CN102110053B CN102110053B (en) 2013-09-18

Family

ID=44174219

Family Applications (1)

Application Number Title Priority Date Filing Date
CN 201110066202 Expired - Fee Related CN102110053B (en) 2011-03-18 2011-03-18 Random testing method based on Android

Country Status (1)

Country Link
CN (1) CN102110053B (en)

Cited By (13)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102419727A (en) * 2011-09-30 2012-04-18 宇龙计算机通信科技(深圳)有限公司 Automatic test method and device
CN103077115A (en) * 2013-01-17 2013-05-01 广东欧珀移动通信有限公司 Set-up method and device for compatibility test platform
WO2014117320A1 (en) * 2013-01-29 2014-08-07 Hewlett-Packard Development Company, L.P. Generating test code to test executable code
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
CN104866427A (en) * 2015-06-05 2015-08-26 北京金山安全软件有限公司 Application testing method and device based on Monkey command and terminal
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
CN105446876A (en) * 2015-11-03 2016-03-30 北京京东尚科信息技术有限公司 Service dimension based automatic testing method, apparatus and system
CN106383780A (en) * 2016-09-05 2017-02-08 努比亚技术有限公司 Monkey test method and device
US9578133B2 (en) 2012-12-03 2017-02-21 Apkudo, Llc System and method for analyzing user experience of a software application across disparate devices
CN107025157A (en) * 2017-04-21 2017-08-08 济南浪潮高新科技投资发展有限公司 A kind of algorithm self-checking circuit and method
US10261611B2 (en) 2012-12-03 2019-04-16 Apkudo, Llc System and method for objectively measuring user experience of touch screen based devices
CN110727551A (en) * 2019-09-20 2020-01-24 苏州浪潮智能科技有限公司 Random divergent configuration testing method, system and storage medium
CN113342672A (en) * 2021-06-25 2021-09-03 上海闻泰信息技术有限公司 Monkey testing method and apparatus for terminal equipment

Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20100229045A1 (en) * 2009-03-09 2010-09-09 Quantia Communications, Inc. Computer Method and Apparatus Providing Invocation of Device-Specific Application Through a Generic HTTP Link
CN101957793A (en) * 2010-09-03 2011-01-26 中国科学院软件研究所 Android and android derivative system-oriented method for playing back software operation record

Patent Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20100229045A1 (en) * 2009-03-09 2010-09-09 Quantia Communications, Inc. Computer Method and Apparatus Providing Invocation of Device-Specific Application Through a Generic HTTP Link
CN101957793A (en) * 2010-09-03 2011-01-26 中国科学院软件研究所 Android and android derivative system-oriented method for playing back software operation record

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
谢红霞等: "基于Android的自动化测试的设计与实现", 《计算机时代》 *

Cited By (27)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102419727B (en) * 2011-09-30 2016-05-18 宇龙计算机通信科技(深圳)有限公司 A kind of automated testing method and device
CN102419727A (en) * 2011-09-30 2012-04-18 宇龙计算机通信科技(深圳)有限公司 Automatic test method and device
US10261611B2 (en) 2012-12-03 2019-04-16 Apkudo, Llc System and method for objectively measuring user experience of touch screen based 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
US9578133B2 (en) 2012-12-03 2017-02-21 Apkudo, Llc System and method for analyzing user experience of a software application across disparate devices
CN103077115B (en) * 2013-01-17 2015-12-23 广东欧珀移动通信有限公司 A kind of compatibility testing platform building method and device
CN103077115A (en) * 2013-01-17 2013-05-01 广东欧珀移动通信有限公司 Set-up method and device for compatibility test platform
WO2014117320A1 (en) * 2013-01-29 2014-08-07 Hewlett-Packard Development Company, L.P. Generating test code to test executable code
US9710366B2 (en) 2013-01-29 2017-07-18 Hewlett Packard Enterprise Development Lp Generating test code to test executable code
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
US10452527B2 (en) 2013-03-15 2019-10-22 Apkudo, Llc System and method for facilitating field testing of a test application
US9858178B2 (en) 2013-03-15 2018-01-02 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
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
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
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
CN104866427A (en) * 2015-06-05 2015-08-26 北京金山安全软件有限公司 Application testing method and device based on Monkey command and terminal
CN104866427B (en) * 2015-06-05 2018-01-23 北京金山安全软件有限公司 Application testing method and device based on Monkey command and terminal
CN105446876A (en) * 2015-11-03 2016-03-30 北京京东尚科信息技术有限公司 Service dimension based automatic testing method, apparatus and system
CN106383780A (en) * 2016-09-05 2017-02-08 努比亚技术有限公司 Monkey test method and device
CN107025157B (en) * 2017-04-21 2019-08-02 浪潮集团有限公司 A kind of algorithm self-checking circuit and method
CN107025157A (en) * 2017-04-21 2017-08-08 济南浪潮高新科技投资发展有限公司 A kind of algorithm self-checking circuit and method
CN110727551A (en) * 2019-09-20 2020-01-24 苏州浪潮智能科技有限公司 Random divergent configuration testing method, system and storage medium
CN110727551B (en) * 2019-09-20 2022-07-19 苏州浪潮智能科技有限公司 Random divergent configuration testing method, system and storage medium
CN113342672A (en) * 2021-06-25 2021-09-03 上海闻泰信息技术有限公司 Monkey testing method and apparatus for terminal equipment
CN113342672B (en) * 2021-06-25 2022-06-03 上海闻泰信息技术有限公司 Monkey testing method and apparatus for terminal equipment

Also Published As

Publication number Publication date
CN102110053B (en) 2013-09-18

Similar Documents

Publication Publication Date Title
CN102110053B (en) Random testing method based on Android
CN102141960B (en) Automatic test method based on Android
CN103338290B (en) A kind of method of automatic test Android phone touch screen performance
CN104331373A (en) Monkey test system and method
CN102141962A (en) Safety distributed test framework system and test method thereof
CN104461846B (en) The method and apparatus for detecting application program power consumption
CN104536863B (en) The method of testing of a kind of application program and device
CN105187608B (en) The method and apparatus of application program power consumption on a kind of acquisition mobile terminal
CN103699122A (en) Finished car controller test platform and control method
CN103941207A (en) Electric power measurement automation terminal detection method and system
CN102937913B (en) A kind of method and device managing default application
CN110134574A (en) A kind of software performance testing method, system, medium and electronic equipment
CN104794057A (en) Automatic testing method and device for crossed event
CN104978262A (en) Terminal test method and terminal test device
CN103207730B (en) One can locate pull-alongs flow process drawing generating method and process flow diagram maker
CN110287113A (en) Automation interface test method
CN102750143A (en) Digital signal processing (DSP) developing method based on matrix laboratory (MATLAB) component object model (COM) component calling
CN104156308A (en) Mobile application testing method on basis of playback of execution trace of users
CN106708688B (en) Module test method and terminal
CN103957531A (en) Method and device for signal testing by adoption of intelligent communication terminal
CN102801484A (en) Automatic Bluetooth rate test method based on Android
CN104331361A (en) A test device and method for performing white-box testing on coverage calculation visualization
CN103287400A (en) Vehicle data diagnostic system and method
CN103186465B (en) The browser compatibility method of testing of web user interface and system
CN109753281A (en) A kind of microgrid energy management strategy visualization toolkit based on graphic programming

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: 20130918