CN103970649A - Test method and device for Android terminal application programs - Google Patents

Test method and device for Android terminal application programs Download PDF

Info

Publication number
CN103970649A
CN103970649A CN201310038455.8A CN201310038455A CN103970649A CN 103970649 A CN103970649 A CN 103970649A CN 201310038455 A CN201310038455 A CN 201310038455A CN 103970649 A CN103970649 A CN 103970649A
Authority
CN
China
Prior art keywords
file
program
user operation
video file
playback
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
CN201310038455.8A
Other languages
Chinese (zh)
Other versions
CN103970649B (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.)
Tencent Technology Shenzhen Co Ltd
Original Assignee
Tencent Technology Shenzhen Co 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 Tencent Technology Shenzhen Co Ltd filed Critical Tencent Technology Shenzhen Co Ltd
Priority to CN201310038455.8A priority Critical patent/CN103970649B/en
Publication of CN103970649A publication Critical patent/CN103970649A/en
Application granted granted Critical
Publication of CN103970649B publication Critical patent/CN103970649B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Abstract

The embodiment of the invention provides a test method and device for Android terminal application programs, and the test method and device are used for testing various Android application programs without restrictions of the Android application programs. The method comprises the following steps: running a recording program to generate a video file of a user operation event file; after generating the video file of the user operation event file, storing the video file; replaying the video file in a replay program according to a replay command input by a user. As the recording program and the replay program are third-party executable files independent of a tested program, an interaction mode of the method provided by the invention is very simple, the recording and replay of interface operation of cross application, namely different application programs are supported, the restriction of the tested program is not existent, and third-party application programs without source codes and system applications can be conveniently and automatically operated. In addition, the method provided by the invention supports all user operation types.

Description

The method of testing of Android end application and device
Technical field
The present invention relates to terminal applies field, relate in particular to method of testing and the device of Android end application.
Background technology
Android is that a kind of Linux of take is basic open source code operating system, just because of it is increased income freely, add Android operating system simple and practical, be subject to the preference of lots of manufacturers, in smart mobile phone field, obtain tremendous development especially, having surpassed at present Apple Macintosh operating system becomes the first intelligent operating system, moreover, in the increasing manufacturer of the other fields such as panel computer, intelligent television, all starts to be progressively inclined to selection Android operating system.
Why intelligent terminal can be subject to liking of consumers in general, is because it has the application program of magnanimity, by different application programs, realizes different functions, has enriched user's life, improves user's experience.No exception for Android mobile phone, exactly because system is increased income, vast program development fan can join the environment of this Android program development.But then, before coming into the market as formal software product, need the meticulous test job of tester to guarantee software quality, on the other hand, Android operating system update is also more and more faster, in operating system update, also need the software of previous exploitation whether can be used on the Android platform of redaction and carry out validation test, for example, some softwares that can normally move on Android2.1-update1 version just may cause collapse on Android2.1-update3 and Android2.2, this just means need to carry out a large amount of test jobs that repeat.
The method of a kind of testing software product that prior art provides is called Instrumentation method, the method is a kind of mechanism that Google official provides for Android system testing, specifically in Instrumentation inside, provide the method that is similar to " sendKeyDownUpSync " to trigger the operation to keyboard or screen, can pass through the pc client program of its realization or the operation of Web program monitoring users, then play this operation.
The method of testing defect that above-mentioned prior art provides is to record and playback for the interface of tested Android application program itself, does not support the test operation across application program.
Summary of the invention
The embodiment of the present invention provides method of testing and the device of Android end application, various Android application programs are tested under the constraint not being subject to Android application program itself.
The embodiment of the present invention provides a kind of method of testing of Android end application, and described method comprises:
By operation, record program, generate the video file of user operation case file;
The video file of described user operation case file is preserved described video file after generating;
According to the playback command of user's input, video file described in playback in playback program.
The embodiment of the present invention provides a kind of proving installation of Android end application, and described device comprises:
Video file generation module, for recording program by operation, generates the video file of user operation case file;
Video file is preserved module, after generating, preserves described video file for the video file at described user operation case file;
Playback module, for the playback command of inputting according to user, video file described in playback in playback program.
From the invention described above embodiment, the program of recording is based on its corresponding video file of user operation case file generated, then, and these video files of playback in playback program.Owing to recording program and playback program, it is the third party's executable file that is independent of tested program, therefore, on the one hand, the method interactive mode that the embodiment of the present invention provides is extremely simple, and user only need to move the simplest program can start recording process and replayed section; On the other hand, support across application to be the recording and playback of interface operation of different application program, be not subject to the constraint of tested program self, can to passive coding third party application and system applies, realize automatic operation easily.Finally, because specific catalogue under Android system can user operation case file corresponding to the nearly all Action Events of recording user, therefore, the method that the embodiment of the present invention provides is supported nearly all user's action type, can as prior art, can not miss the operation that some upper layer application are not supported.
Accompanying drawing explanation
In order to be illustrated more clearly in the technical scheme of the embodiment of the present invention, to the accompanying drawing of required use in prior art or embodiment description be briefly described below, apparently, accompanying drawing in the following describes is only some embodiments of the present invention, for those skilled in the art, can also obtain as these accompanying drawings other accompanying drawing.
Fig. 1 is the method for testing schematic flow sheet of the Android end application that provides of the embodiment of the present invention;
Fig. 2 is the proving installation structural representation of the Android end application that provides of the embodiment of the present invention;
Fig. 3 is the proving installation structural representation of the Android end application that provides of another embodiment of the present invention;
Fig. 4-a is the proving installation structural representation of the Android end application that provides of another embodiment of the present invention;
Fig. 4-b is the proving installation structural representation of the Android end application that provides of another embodiment of the present invention;
Fig. 5 is the proving installation structural representation of the Android end application that provides of another embodiment of the present invention;
Fig. 6-a is the proving installation structural representation of the Android end application that provides of another embodiment of the present invention;
Fig. 6-b is the proving installation structural representation of the Android end application that provides of another embodiment of the present invention.
Embodiment
Below in conjunction with the accompanying drawing in the embodiment of the present invention, the technical scheme in the embodiment of the present invention is clearly and completely described, obviously, described embodiment is only the present invention's part embodiment, rather than whole embodiment.Embodiment based in the present invention, the every other embodiment that those skilled in the art obtain, belongs to the scope of protection of the invention.
Referring to accompanying drawing 1, is the method for testing schematic flow sheet of the Android end application that provides of the embodiment of the present invention, is mainly used in Android intelligent terminal, for example, and smart mobile phone, panel computer etc.The method of testing of the Android end application of accompanying drawing 1 example mainly comprises step S101, step S102 and step S103, is described in detail as follows:
S101, records program by operation, generates the video file of user operation case file.
The program of recording can be a kind of use common programs language, for example c language development out and be independent of the executable file of tested application program, before carrying out the method for testing of Android end application, this need to be recorded to program copy to Android terminal.In embodiments of the present invention, user operation case can be the event producing by the action of Android terminal operation, comprises entity, virtual key, entity, virtual functions button and application icon of clicking in Android terminal etc.Linux input system due to Android system use standard, therefore, user operation case, for example, in a series of files under all can be recorded to/dev/input/ of click event of KeyEvent, screen etc. catalogue, this paper series recording under/dev/input/ catalogue is exactly user operation case file.By operation, record program, generate the video file of user operation case file.
As the present invention, by operation, record program, generate an embodiment of the video file of user operation case file, first, start the above-mentioned program of recording that copies to Android terminal.As previously mentioned, for example, because the program of recording is an executable file that uses common programs language (, c language) to develop, therefore, startup is recorded program user is not difficult, and directly double-clicks.After the program of recording has started, the incident file in scanning system, and the described user operation case file that arrives of writing scan, for example, by the described user operation case file record scanning in array to copy these user operation case files.Finally, the described user operation case file synchronization scanning is copied to the video file that the file of recording program appointment forms described user operation case file, particularly, can synchronously monitor the user operation case file scanning, the process of the event code writing system file causing because of user's operation is synchronously copied in the specified file of the program of recording.After synchronous reproduction process completes, the content in the specified file of the program of recording is exactly the video file of described user operation case file, and in essence, it is the portion copy of described user operation case file.It should be noted that, because some test has specific precondition, therefore, when program is recorded in operation, can described in initialization, record program.
S102 preserves the video file of user operation case file after the video file of user operation case file generates.
When preserving the video file of user operation case file, need to be to a discernible filename of playback program of this video file name, to can identify during the playback of subsequent playback program.
S103, according to the playback command of user's input, video file described in playback in playback program.
With aforementioned to record program similar, in embodiments of the present invention, playback program can be a kind of use common programs language, for example c language development out and be independent of the executable file of tested application program, before carrying out the method for testing of Android end application, this playback program need to be copied to Android terminal.The playback command of inputting according to user as the present invention, video file embodiment described in playback in playback program, first, after starting playback program, detect the playback command of user's input, playback command comprises and generates the title of video file of user operation case file and the number of times of the video file of this user operation case file of playback early stage.Then, the described user operation case file that incident file queue in scanning system writing scan are arrived, for example, the described user operation case file record scanning, in array, is inserted into the incident file queue in system so that follow-up by these user operation case files.The 3rd step is that the video file that reads user operation case file is aforementionedly from the customer incident file of system, to copy out the video file generating.Finally, by the incident file queue in the video file insertion system of the described user operation case file reading, consequently for the behavior that system starts in earlier stage to record according to user operates.Playback program is according to the playback number of times of the user's input detecting, and the behavior that repeats in earlier stage to record according to user operates.As aforementioned, record program similar, because some test has specific precondition, therefore, in operation during playback program, can initialization described in playback program.
The method of testing of the Android end application providing from the invention described above embodiment, the program of recording is based on its corresponding video file of user operation case file generated, then, these video files of playback in playback program.Owing to recording program and playback program, it is the third party's executable file that is independent of tested program, therefore, on the one hand, the method interactive mode that the embodiment of the present invention provides is extremely simple, and user only need to move the simplest program can start recording process and replayed section; On the other hand, support across application to be the recording and playback of interface operation of different application program, be not subject to the constraint of tested program self, can to passive coding third party application and system applies, realize automatic operation easily.Finally, because specific catalogue under Android system can user operation case file corresponding to the nearly all Action Events of recording user, therefore, the method that the embodiment of the present invention provides is supported nearly all user's action type, can as prior art, can not miss the operation that some upper layer application are not supported.
Referring to accompanying drawing 2, is the proving installation structural representation of the Android end application that provides of the embodiment of the present invention.For convenience of explanation, only show the part relevant to the embodiment of the present invention.The proving installation of the Android end application of accompanying drawing 2 examples can be for example, certain functional module/unit in intelligent terminal (Android terminal), it comprises video file generation module 201, video file preservation module 202 and playback module 203, wherein:
Video file generation module 201, for recording program by operation, generates the video file of user operation case file;
Video file is preserved module 202, after generating, preserves described video file for the video file at described user operation case file;
Playback module 203, for the playback command of inputting according to user, video file described in playback in playback program.
It should be noted that, in the embodiment of the proving installation of above Android end application, the division of each functional module only illustrates, can be as required in practical application, for example the facility of the configuration requirement of corresponding hardware or the realization of software is considered, and above-mentioned functions is distributed, by different functional modules, completed, the inner structure that is about to the proving installation of described Android end application is divided into different functional modules, to complete all or part of function described above.And, in practical application, corresponding functional module in the present embodiment can be to be realized by corresponding hardware, also can be completed by the corresponding software of corresponding hardware implement, for example, aforesaid video file generation module, can be to have to carry out aforementionedly by operation, to record program, generate the hardware of the video file of user operation case file, video file maker for example, thus can be also to carry out general processor or other hardware devices that corresponding computer program completes aforementioned function; For another example aforesaid playback module, can be to have to carry out the aforementioned playback command of inputting according to user, the hardware of video file function described in playback in playback program, playback device for example, thus can be also to carry out general processor or other hardware devices (each embodiment that this instructions provides can apply foregoing description principle) that corresponding computer program completes aforementioned function.
The video file generation module 201 of accompanying drawing 2 examples can comprise start and stop unit 301, the first scanning element 302 and synchronous copied cells 303, the proving installation of the Android end application that another embodiment of the present invention provides as shown in Figure 3, wherein:
Program is recorded in start and stop unit 301 described in starting or stoping;
The first scanning element 302, the described user operation case file arriving for incident file the writing scan of scanning system;
Synchronous copied cells 303, forms the video file of described user operation case file for recording the file of program appointment described in the described user operation case file synchronization scanning is copied to.
The proving installation of the Android end application of accompanying drawing 1 or accompanying drawing 2 examples can also comprise the first initialization module 401, the proving installation of the Android end application that another embodiment of the present invention provides as shown in accompanying drawing 4-a or accompanying drawing 4-b.The first initialization module 401 is recorded program for initialization.
The playback module 203 of accompanying drawing 2 examples can comprise detecting unit 501, the second scanning element 502, reading unit 503 and plug-in unit 504, the proving installation of the Android end application that another embodiment of the present invention provides as shown in Figure 5, wherein:
Detecting unit 501, for detection of the playback command of user's input;
The second scanning element 502, the described user operation case file arriving for incident file the writing scan of scanning system;
Reading unit 503, for reading the video file of described user operation case file;
Plug-in unit 504, for by the incident file queue of the video file insertion system of the described user operation case file reading.
The proving installation of the Android end application of accompanying drawing 1 or accompanying drawing 5 examples can also comprise the second initialization module 601, the proving installation of the Android end application that another embodiment of the present invention provides as shown in accompanying drawing 6-a or accompanying drawing 6-b.The second initialization module 601 is for initialization playback program.
It should be noted that, the contents such as the information interaction between each module/unit of said apparatus, implementation, due to the inventive method embodiment based on same design, its technique effect bringing is identical with the inventive method embodiment, particular content can, referring to the narration in the inventive method embodiment, repeat no more herein.
One of ordinary skill in the art will appreciate that all or part of step in the whole bag of tricks of above-described embodiment is to come the hardware that instruction is relevant to complete by program, such as following the whole bag of tricks one or more or all:
By operation, record program, generate the video file of user operation case file;
After generating, the video file of described user operation case file preserves described video file;
According to the playback command of user's input, video file described in playback in playback program.
One of ordinary skill in the art will appreciate that all or part of step in the whole bag of tricks of above-described embodiment is to come the hardware that instruction is relevant to complete by program, this program can be stored in a computer-readable recording medium, storage medium can comprise: ROM (read-only memory) (ROM, Read Only Memory), random access memory (RAM, Random Access Memory), disk or CD etc.
Method of testing and the device of the Android the end application above embodiment of the present invention being provided are described in detail, applied specific case herein principle of the present invention and embodiment are set forth, the explanation of above embodiment is just for helping to understand method of the present invention and core concept thereof; , for one of ordinary skill in the art, according to thought of the present invention, all will change in specific embodiments and applications, in sum, this description should not be construed as limitation of the present invention meanwhile.

Claims (10)

1. a method of testing for Android end application, is characterized in that, described method comprises:
By operation, record program, generate the video file of user operation case file;
After generating, the video file of described user operation case file preserves described video file;
According to the playback command of user's input, video file described in playback in playback program.
2. the method for claim 1, is characterized in that, describedly by operation, records program, and the video file that generates user operation case file comprises:
Described in startup, record program;
The described user operation case file that incident file in scanning system writing scan are arrived;
The file of recording program appointment described in the described user operation case file synchronization scanning is copied to forms the video file of described user operation case file.
3. method as claimed in claim 1 or 2, is characterized in that, described method also comprises:
Described in initialization, record program.
4. the method for claim 1, is characterized in that, described according to the playback command of user's input, in playback program, described in playback, video file comprises:
Detect the playback command of user's input;
The described user operation case file that incident file in scanning system writing scan are arrived;
Read the video file of described user operation case file;
By the incident file queue in the video file insertion system of the described user operation case file reading.
5. the method as described in claim 1 or 4, is characterized in that, described method also comprises:
Playback program described in initialization.
6. a proving installation for Android end application, is characterized in that, described device comprises:
Video file generation module, for recording program by operation, generates the video file of user operation case file;
Video file is preserved module, after generating, preserves described video file for the video file at described user operation case file;
Playback module, for the playback command of inputting according to user, video file described in playback in playback program.
7. device as claimed in claim 6, is characterized in that, described video file generation module comprises:
Program is recorded in start and stop unit described in starting or stoping;
The first scanning element, the described user operation case file arriving for incident file the writing scan of scanning system;
Synchronous copied cells, forms the video file of described user operation case file for recording the file of program appointment described in the described user operation case file synchronization scanning is copied to.
8. the device as described in claim 6 or 7, is characterized in that, described device also comprises:
The first initialization module, records program for described in initialization.
9. device as claimed in claim 6, is characterized in that, described playback module comprises:
Detecting unit, for detection of the playback command of user's input;
The second scanning element, the described user operation case file arriving for incident file the writing scan of scanning system;
Reading unit, for reading the video file of described user operation case file;
Plug-in unit, for by the incident file queue of the video file insertion system of the described user operation case file reading.
10. the device as described in claim 6 or 9, is characterized in that, described device also comprises:
The second initialization module, for playback program described in initialization.
CN201310038455.8A 2013-01-31 2013-01-31 The test method and device of Android terminal application program Active CN103970649B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201310038455.8A CN103970649B (en) 2013-01-31 2013-01-31 The test method and device of Android terminal application program

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201310038455.8A CN103970649B (en) 2013-01-31 2013-01-31 The test method and device of Android terminal application program

Publications (2)

Publication Number Publication Date
CN103970649A true CN103970649A (en) 2014-08-06
CN103970649B CN103970649B (en) 2018-04-27

Family

ID=51240178

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201310038455.8A Active CN103970649B (en) 2013-01-31 2013-01-31 The test method and device of Android terminal application program

Country Status (1)

Country Link
CN (1) CN103970649B (en)

Cited By (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103995718A (en) * 2014-05-08 2014-08-20 百度在线网络技术(北京)有限公司 Method and device for collecting program information
CN104572447A (en) * 2014-12-19 2015-04-29 中国电子科技集团公司第十五研究所 Method and system for business process recording and replaying based on Android operation system
CN104866420A (en) * 2015-04-27 2015-08-26 深圳市祈锦通信技术有限公司 Precisely recorded mobile phone software testing method
CN105512031A (en) * 2015-11-30 2016-04-20 惠州Tcl移动通信有限公司 Mobile terminal and automatic test method
CN106469113A (en) * 2015-08-18 2017-03-01 腾讯科技(深圳)有限公司 Applied program testing method and system
CN106792193A (en) * 2016-12-23 2017-05-31 Tcl集团股份有限公司 A kind of repair system and restorative procedure based on Android TVs
CN107832205A (en) * 2017-10-16 2018-03-23 深圳天珑无线科技有限公司 Terminal and its record screen method of running, external equipment, storage device
CN109902030A (en) * 2019-04-25 2019-06-18 安然 A kind of method of application program of mobile phone automatic test step record and playback

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US6067639A (en) * 1995-11-09 2000-05-23 Microsoft Corporation Method for integrating automated software testing with software development
CN101957793A (en) * 2010-09-03 2011-01-26 中国科学院软件研究所 Android and android derivative system-oriented method for playing back software operation record
CN102521118A (en) * 2011-11-11 2012-06-27 福建星网视易信息系统有限公司 Automatic testing method of Android program

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US6067639A (en) * 1995-11-09 2000-05-23 Microsoft Corporation Method for integrating automated software testing with software development
CN101957793A (en) * 2010-09-03 2011-01-26 中国科学院软件研究所 Android and android derivative system-oriented method for playing back software operation record
CN102521118A (en) * 2011-11-11 2012-06-27 福建星网视易信息系统有限公司 Automatic testing method of Android program

Cited By (13)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103995718B (en) * 2014-05-08 2017-05-10 百度在线网络技术(北京)有限公司 Method and device for collecting program information
CN103995718A (en) * 2014-05-08 2014-08-20 百度在线网络技术(北京)有限公司 Method and device for collecting program information
CN104572447A (en) * 2014-12-19 2015-04-29 中国电子科技集团公司第十五研究所 Method and system for business process recording and replaying based on Android operation system
CN104572447B (en) * 2014-12-19 2017-09-29 中国电子科技集团公司第十五研究所 Operation flow recording and replaying method and system based on Android operation system
CN104866420A (en) * 2015-04-27 2015-08-26 深圳市祈锦通信技术有限公司 Precisely recorded mobile phone software testing method
CN106469113B (en) * 2015-08-18 2023-08-08 腾讯科技(深圳)有限公司 Application program testing method and system
CN106469113A (en) * 2015-08-18 2017-03-01 腾讯科技(深圳)有限公司 Applied program testing method and system
CN105512031A (en) * 2015-11-30 2016-04-20 惠州Tcl移动通信有限公司 Mobile terminal and automatic test method
CN106792193A (en) * 2016-12-23 2017-05-31 Tcl集团股份有限公司 A kind of repair system and restorative procedure based on Android TVs
CN106792193B (en) * 2016-12-23 2020-06-23 Tcl科技集团股份有限公司 Android television-based repair system and repair method
CN107832205A (en) * 2017-10-16 2018-03-23 深圳天珑无线科技有限公司 Terminal and its record screen method of running, external equipment, storage device
CN109902030A (en) * 2019-04-25 2019-06-18 安然 A kind of method of application program of mobile phone automatic test step record and playback
CN109902030B (en) * 2019-04-25 2022-05-24 安然 Method for recording and replaying automatic test steps of mobile phone application program

Also Published As

Publication number Publication date
CN103970649B (en) 2018-04-27

Similar Documents

Publication Publication Date Title
CN103970649A (en) Test method and device for Android terminal application programs
RU2733919C2 (en) Method of recording, editing and recreating a computer session
Gonsalves Evaluating the mobile development frameworks Apache Cordova and Flutter and their impact on the development process and application characteristics
US10083159B1 (en) Method for recording, editing and reproduction of web browser session
Summerfield Advanced Qt programming: creating great software with C++ and Qt 4
Kaasila et al. Testdroid: automated remote UI testing on Android
US10409564B2 (en) Recording and playback of development sessions
CN104424022B (en) Screen recording method and device
CN111818123B (en) Network front-end remote playback method, device, equipment and storage medium
Darcey et al. Sams teach yourself Android application development in 24 hours
CN104572447B (en) Operation flow recording and replaying method and system based on Android operation system
US20140132571A1 (en) Automated testing of gesture-based applications
US8135572B2 (en) Integrated debugger simulator
TW201518933A (en) Testing device and testing method thereof
JP2008117093A (en) User operation recording/reproducing method and device
CN1938774A (en) Reproduction device and program
US20130138381A1 (en) Handheld electronic device testing method
CN111143200A (en) Method and device for recording and playing back touch event, storage medium and equipment
CN103853658A (en) Automated testing method for production and playback in Android equipment and Android equipment
US8984487B2 (en) Resource tracker
KR20190131074A (en) Virtual scene display method and device, and storage medium
US11941728B2 (en) Previewing method and apparatus for effect application, and device, and storage medium
US20130290934A1 (en) Monitoring applications executing on a computer device using programmatic triggers
CN113485909A (en) Test method, test device, computing device, and medium
CN110837467B (en) Software testing method, device and system

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
EXSB Decision made by sipo to initiate substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant