CN104239202A - Non-Root testing method and system of interactive intelligent equipment - Google Patents

Non-Root testing method and system of interactive intelligent equipment Download PDF

Info

Publication number
CN104239202A
CN104239202A CN201410246791.6A CN201410246791A CN104239202A CN 104239202 A CN104239202 A CN 104239202A CN 201410246791 A CN201410246791 A CN 201410246791A CN 104239202 A CN104239202 A CN 104239202A
Authority
CN
China
Prior art keywords
event
intelligent equipment
smart machine
command stream
interactive intelligent
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.)
Pending
Application number
CN201410246791.6A
Other languages
Chinese (zh)
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.)
Individual
Original Assignee
Individual
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 Individual filed Critical Individual
Priority to CN201410246791.6A priority Critical patent/CN104239202A/en
Publication of CN104239202A publication Critical patent/CN104239202A/en
Pending legal-status Critical Current

Links

Landscapes

  • Telephone Function (AREA)

Abstract

The invention relates to a non-Root testing method and system of interactive intelligent equipment. The method includes: acquiring the information of an intelligent equipment drive event; executing one action of the drive event on the intelligent equipment, and capturing the even stream of the drive event; analyzing the event stream to generate the configuration file of the intelligent equipment; simulating various even operations according to the configuration file to generate corresponding command stream to be transmitted to the intelligent equipment, acquiring the result of the intelligent equipment executing the command stream, comparing the result with an expected executing result, and outputting the comparison result. The method and system has the advantages that testing of the intelligent equipment is performed through command operation of a mobile phone, no programs in the existing intelligent equipment need to be called, that is to say, the monkey runner program in the intelligent equipment needs not to be used, and the method and system is unlimited by the monkey runner program in the existing intelligent equipment, stable in operation and high in adaptability.

Description

The non-Root method of testing of interactive intelligent equipment and system
Technical field
The present invention relates to mobile phone test field, specifically a kind of non-Root method of testing of interactive intelligent equipment and system.
Background technology
Under current existing non-root, the technology of operating handset is all that the monkey runner provided based on android embedded in mobile phone operates.Operating process is roughly as follows: first, is started this service of monkey runner of mobile phone terminal by adb order; Then, pc end is communicated with the monkey runner of mobile phone terminal by socket, reaches control mobile phone and clicks, swipe, the long object by waiting operation; Finally, obtain mobile phone terminal to the result of corresponding operating and comparison, complete test.But, due to the application service that monkey is embedded in mobile phone, in the mobile phone that different cell phone manufacturer produces, the realization of monkey runner can not be just the same, also can not complete stability, monkey runner may be run more stable on the mobile phone had, the problems such as the monkey runnner that some mobile phones run exits after there is the operation of execution certain hour automatically, therefore realize the non-root operation of mobile phone with monkey runner in prior art and there is unstable problem.Wherein, in unix system (as AIX, BSD etc.) and class unix system (Linux as each distribution version such as Debian, Redhat, Ubuntu) and android system, the general called after root of power user, power user unique in root system, has authorities all in system.
Summary of the invention
For this reason, to be solved by this invention is operate based on the non-root of monkey runner the technical matters that the stability brought cannot ensure in existing mobile phone test, provides a kind of non-root method of testing and system of interactive intelligent equipment.
For solving the problems of the technologies described above, the technical solution used in the present invention is as follows:
A non-root method of testing for interactive intelligent equipment, comprises the steps:
S1: the driving incident file obtaining smart machine;
S2: perform the action that drives event on described smart machine, and catch the flow of event of this driving event according to described driving incident file;
S3: analyze described flow of event, generates the configuration file of smart machine described in this;
S4: according to described configuration file, the command stream simulating the generation of various event action corresponding sends to described smart machine;
S5: receive and perform described command stream;
S6: obtain the result that described smart machine performs described command stream, and compare with expected execution result, comparison result is exported.
Described driving event comprises click, swipe and grow by any one.
Described interactive intelligent equipment is Android intelligent.
Event in described configuration file includes head, body and tail three part, and wherein, described head is used for presentation of events to start, and described body is used for the particular content of presentation of events, and described tail is used for presentation of events to be terminated.
Meanwhile, a kind of non-root test macro of interactive intelligent equipment is provided, comprises:
Drive incident file acquisition module, for obtaining the driving incident file of smart machine;
The flow of event acquisition module of driving event, catches the flow of event of this driving event according to described driving incident file during for performing the action of a driving event on described smart machine;
Configuration file acquisition module, for analyzing described flow of event, generates the configuration file of smart machine described in this;
Command stream generation module, for according to described configuration file, simulates various event action and generates corresponding command stream and send to described smart machine;
Command stream execution module, for receiving and performing described command stream;
Comparing module, performs the result of described command stream, and compares with expected execution result for obtaining described smart machine, exported by comparison result.
Described driving event comprises click, swipe and grow by any one.
Described interactive intelligent equipment is Android intelligent.
Event in described configuration file includes head, body and tail three part, and wherein, described head is used for presentation of events to start, and described body is used for the particular content of presentation of events, and described tail is used for presentation of events to be terminated.
Technique scheme of the present invention has the following advantages compared to existing technology:
The non-root method of testing of a kind of interactive intelligent equipment of the present invention and system, drive event information by obtaining smart machine; And then on described smart machine, perform the action that drives event, and catch the flow of event of this driving event; Subsequently analyze this flow of event, generate the configuration file of described smart machine; Finally simulate various event action according to described configuration file to generate corresponding command stream and send to described smart machine, obtain the result that described smart machine performs described command stream, and compare with expected execution result, comparison result is exported.Thus, to the test of smart machine mainly through carrying out the command operation of mobile phone, any program called in existing smart machine is not related to, namely without the need to using the monkey runner program in smart machine.Therefore, the non-root method of testing of a kind of interactive intelligent equipment of the present invention and system, can not be limited by the monkey runner in existing smart machine, stable and applicability is stronger.
Accompanying drawing explanation
In order to make content of the present invention be more likely to be clearly understood, below according to a particular embodiment of the invention and by reference to the accompanying drawings, the present invention is further detailed explanation, wherein
Fig. 1 is the process flow diagram of the non-root method of testing of a kind of interactive intelligent equipment of one embodiment of the invention;
Fig. 2 is the structured flowchart of the non-root test macro of a kind of interactive intelligent equipment of one embodiment of the invention.
Embodiment
Shown in Figure 1, be the non-root method of testing of a kind of interactive intelligent equipment of one embodiment of the invention, it comprises the steps:
S1: the driving incident file obtaining smart machine.Described smart machine of the present invention is the intelligent terminal that can realize man-machine interaction comprising smart mobile phone, PAD etc.
S2: perform the action that drives event on described smart machine, and catch the flow of event of this driving event according to described driving incident file.
S3: analyze described flow of event, generates the configuration file of smart machine described in this.
S4: according to described configuration file, the command stream simulating the generation of various event action corresponding sends to described smart machine.
S5: described smart machine receives and performs described command stream;
S6: obtain the result that described smart machine performs described command stream, and compare with expected execution result, comparison result is exported.
In actual execution, the execution result of described smart machine can show, concrete tester can judge according to execution result, whether whether command stream be performed and be executed correctly, determining under the prerequisite that described command stream is not executed correctly, the process that described smart machine performs described command stream can be obtained, and analyze reason, complete verification.
As the non-root method of testing of the interactive intelligent equipment of another embodiment of the present invention, interactive intelligent mobile device is wherein Android intelligent, described driving event comprises click, swipe and grow by etc. screen operator action.The non-root method of testing of this Android intelligent specifically comprises the steps:
S21: perform adb shell getevent – p and obtain the result returned, analyze the result returned, obtain the driving incident file of screen, such as/dev/input/event3.Drive event for the driving event of screen in the present embodiment, as other embodiments, the present invention is also applicable to the Action Events in non-screen, and the switching on and shutting down that such as button realizes and volume adjusting, also form driving event of the present invention.
S22: fill order adb shell getevent/dev/input/event3 catches output stream;
S23: guide user to perform an operation swiped on screen, then catch the flow of event obtained in step S22.
S24: analyze the flow of event obtained in step S23, generates the configuration file for this mobile phone.
S25: according to generate configuration file, for click, swipe and grow by wait operation generation correspondence sendevent command stream send to mobile phone to carry out corresponding operating; And then by ordering the various operations simulated for mobile phone, realize the test to mobile phone.
S26: mobile phone receives and performs sendevent command stream.
The execution result that tester can show according to described mobile phone judges whether described sendevent command stream is performed and whether is executed correctly.The position such as clicked opens address list, if the result performed is that address list is opened, then judges that described command stream is executed correctly; Otherwise judge that command stream does not correctly perform, need manually search reason and solve.
Preferably, the event information of syntagmatic that has each other in configuration file represents with form that is assembled and superposition, and what is called has the event of syntagmatic, refers to an event with other events for basic composition unit.Specifically to click and to swipe, the event of swiping is the set of several click event, described click and the action swiped start to represent consistent with the information terminated, be exactly inconsistent in the event body information between end that starts, the main information such as clicked is exactly an X-coordinate and Y-coordinate information, and the main information swiped is then the superposition of multiple X-coordinate and Y-coordinate information; That the assembled of multiple click action is the same with superposition as swiping.Represent action start information with head in described temporal information, tail represents release information, and body is used for the main information of presentation of events, specifically see following example,
First be clicking operation:
Head: 0003 014a 00000001
Body: 0,003 0035 xxxxxxxx
0003?0036?yyyyyyyy
Tail: 0003 014a 00000000
0000?0002?00000000
0000?0000?00000000
Next is sliding screen operation:
Head: 0003 014a 00000001
Body: 0,003 0035 xxxxxxxx
0003?0036?yyyyyyyy
0003?0035?xxxxxxxx
0003?0036?yyyyyyyy
0003?0035?xxxxxxxx
0003?0036?yyyyyyyy
0003?0035?xxxxxxxx
0003?0036?yyyyyyyy
Tail: 0003 014a 00000000
0000?0002?00000000
0000?0000?00000000
Specific to the present embodiment, the above-mentioned body swiped divides the content comprising four bodies clicked and divide, for simplicity, above-mentioned click and the body partial coordinates swiped all represent with xxxxxxxx and yyyyyyyy, in fact, xxxxxxxx and yyyyyyyy that the body swiped divides is different, is used for representing click location different on screen.
Structured flowchart shown in Figure 2, is the non-root test macro of a kind of interactive intelligent equipment of one embodiment of the invention, comprises:
Drive incident file acquisition module, for obtaining the driving incident file of smart machine.
The flow of event acquisition module of driving event, catches the flow of event of this driving event according to described driving incident file during for performing the action of a driving event on described smart machine.
Configuration file acquisition module, for analyzing described flow of event, generates the configuration file of smart machine described in this.
Command stream generation module, for according to described configuration file, simulates various event action and generates corresponding command stream and send to described smart machine.
Command stream execution module, for receiving and performing described command stream.
Comparing module, obtains the result that described smart machine performs described command stream, and compares with expected execution result, exported by comparison result.
The non-root method of testing of a kind of interactive intelligent equipment of the present invention and system, drive event information by obtaining smart machine; And then on described smart machine, perform the action that drives event, and catch the flow of event of this driving event; Subsequently analyze this flow of event, generate the configuration file of described smart machine; Finally simulate various event action according to described configuration file to generate corresponding command stream and send to described smart machine, obtain the result that described smart machine performs described command stream, and compare with expected execution result, comparison result is exported.Thus, to the test of smart machine mainly through carrying out the command operation of mobile phone, any program called in existing smart machine is not related to, namely without the need to using the monkey runner program in smart machine.Therefore, the non-root method of testing of a kind of interactive intelligent equipment of the present invention and system, can not be limited by the monkey runner in existing smart machine, stable and applicability is stronger.
Obviously, above-described embodiment is only for clearly example being described, and the restriction not to embodiment.For those of ordinary skill in the field, can also make other changes in different forms on the basis of the above description.Here exhaustive without the need to also giving all embodiments.And thus the apparent change of extending out or variation be still in the protection domain of the invention.

Claims (8)

1. a non-root method of testing for interactive intelligent equipment, is characterized in that, comprise the steps:
S1: the driving incident file obtaining smart machine;
S2: perform the action that drives event on described smart machine, and catch the flow of event of this driving event according to described driving incident file;
S3: analyze described flow of event, generates the configuration file of smart machine described in this;
S4: according to described configuration file, the command stream simulating the generation of various event action corresponding sends to described smart machine;
S5: receive and perform described command stream;
S6: obtain the result that described smart machine performs described command stream, and compare with expected execution result, comparison result is exported.
2. the non-root method of testing of a kind of interactive intelligent equipment according to claim 1, is characterized in that, described driving event comprises click, swipe and grow by any one.
3. the non-root method of testing of a kind of interactive intelligent equipment according to claim 1 and 2, is characterized in that, described interactive intelligent equipment is Android intelligent.
4. the non-root method of testing of a kind of interactive intelligent equipment according to claim 3, it is characterized in that, event in described configuration file includes head, body and tail three part, wherein, described head is used for presentation of events to start, described body is used for the particular content of presentation of events, and described tail is used for presentation of events to be terminated.
5. a non-root test macro for interactive intelligent equipment, is characterized in that, comprising:
Drive incident file acquisition module, for obtaining the driving incident file of smart machine;
The flow of event acquisition module of driving event, catches the flow of event of this driving event according to described driving incident file during for performing the action of a driving event on described smart machine;
Configuration file acquisition module, for analyzing described flow of event, generates the configuration file of smart machine described in this;
Command stream generation module, for according to described configuration file, simulates various event action and generates corresponding command stream and send to described smart machine;
Command stream execution module, for receiving and performing described command stream;
Comparing module, performs the result of described command stream, and compares with expected execution result for obtaining described smart machine, exported by comparison result.
6. the non-root test macro of a kind of interactive intelligent equipment according to claim 5, is characterized in that, described driving event comprises click, swipe and grow by any one.
7. the non-root test macro of a kind of interactive intelligent equipment according to claim 5 or 6, is characterized in that, described interactive intelligent equipment is Android intelligent.
8. the non-root test macro of a kind of interactive intelligent equipment according to claim 7, it is characterized in that, event in described configuration file includes head, body and tail three part, wherein, described head is used for presentation of events to start, described body is used for the particular content of presentation of events, and described tail is used for presentation of events to be terminated.
CN201410246791.6A 2013-06-09 2014-06-05 Non-Root testing method and system of interactive intelligent equipment Pending CN104239202A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201410246791.6A CN104239202A (en) 2013-06-09 2014-06-05 Non-Root testing method and system of interactive intelligent equipment

Applications Claiming Priority (3)

Application Number Priority Date Filing Date Title
CN201310231188 2013-06-09
CN201310231188.6 2013-06-09
CN201410246791.6A CN104239202A (en) 2013-06-09 2014-06-05 Non-Root testing method and system of interactive intelligent equipment

Publications (1)

Publication Number Publication Date
CN104239202A true CN104239202A (en) 2014-12-24

Family

ID=52227318

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201410246791.6A Pending CN104239202A (en) 2013-06-09 2014-06-05 Non-Root testing method and system of interactive intelligent equipment

Country Status (1)

Country Link
CN (1) CN104239202A (en)

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106843814A (en) * 2016-12-28 2017-06-13 北京智能管家科技有限公司 For the MIMD processing method and processing device of robot system interaction
CN109800156A (en) * 2018-12-20 2019-05-24 交控科技股份有限公司 A kind of subway signal system automation test method based on profile command
CN110688298A (en) * 2019-02-25 2020-01-14 上海核工程研究设计院有限公司 Nuclear power plant man-machine interaction system automatic testing device based on event driving
CN111901471A (en) * 2020-07-06 2020-11-06 珠海世纪鼎利科技股份有限公司 Drive test system and method for non-root android mobile phone

Citations (4)

* 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
CN102841845A (en) * 2012-07-30 2012-12-26 广东欧珀移动通信有限公司 Automatic testing method of Android device software
US20130067281A1 (en) * 2011-09-09 2013-03-14 Askey Computer Corp. Testing system and method for handheld electronic device
CN103064781A (en) * 2011-10-18 2013-04-24 飞图科技(北京)有限公司 Mobile software automated testing method

Patent Citations (4)

* 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
US20130067281A1 (en) * 2011-09-09 2013-03-14 Askey Computer Corp. Testing system and method for handheld electronic device
CN103064781A (en) * 2011-10-18 2013-04-24 飞图科技(北京)有限公司 Mobile software automated testing method
CN102841845A (en) * 2012-07-30 2012-12-26 广东欧珀移动通信有限公司 Automatic testing method of Android device software

Cited By (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106843814A (en) * 2016-12-28 2017-06-13 北京智能管家科技有限公司 For the MIMD processing method and processing device of robot system interaction
CN109800156A (en) * 2018-12-20 2019-05-24 交控科技股份有限公司 A kind of subway signal system automation test method based on profile command
CN109800156B (en) * 2018-12-20 2022-05-06 交控科技股份有限公司 Subway signal system automatic test method based on configuration file command
CN110688298A (en) * 2019-02-25 2020-01-14 上海核工程研究设计院有限公司 Nuclear power plant man-machine interaction system automatic testing device based on event driving
CN111901471A (en) * 2020-07-06 2020-11-06 珠海世纪鼎利科技股份有限公司 Drive test system and method for non-root android mobile phone

Similar Documents

Publication Publication Date Title
CN103312850B (en) A kind of mobile phone automatized test macro and method of work
CN105608258B (en) A kind of Model-based diagnosis and information flow visual simulation system and method
CN106776294B (en) Automatic android mobile phone testing method and system
CN103268289B (en) Record the method and system of application testing script on mobile terminals
CN110493812B (en) Distribution network test processing method, device and system, processor and master control equipment
CN104461810A (en) Method for improving functional verification efficiency of embedded processor
CN107102949B (en) Application program offline testing method and tool
CN103064781A (en) Mobile software automated testing method
CN104281518A (en) Terminal application test method, device, system and platform and mobile terminal
WO2014169565A1 (en) Terminal testing method and device
CN101272422A (en) Mobile phone automatized test method
CN105653438B (en) The striding course automated testing method and device of Android device
CN105426298A (en) ADB (Android debug bridge)-based software test method and system
CN104239202A (en) Non-Root testing method and system of interactive intelligent equipment
CN109308241A (en) Monitor application program launching flow and method, device, terminal device and storage medium
CN104063324A (en) Method and system for Monkey test
CN108762765B (en) Development board program compiling and downloading method based on contiki system
CN110750453A (en) HTML 5-based intelligent mobile terminal testing method, system, server and storage medium
CN103729258A (en) Automatic testing method, terminal and system
CN112860559A (en) Upgrade test system and method
CN107391354B (en) Method and system for automatically monitoring terminal performance and storage device
CN103544099A (en) Method and device for testing programs on mobile device
CN107391329B (en) Method, system and storage device for testing repeated use of mobile terminal
CN105095093A (en) Intelligent terminal performance test method and system
CN111596203B (en) Chip testing device, platform and 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
RJ01 Rejection of invention patent application after publication
RJ01 Rejection of invention patent application after publication

Application publication date: 20141224