CN112019839A - Android smart television application automatic testing method - Google Patents
Android smart television application automatic testing method Download PDFInfo
- Publication number
- CN112019839A CN112019839A CN202010988052.XA CN202010988052A CN112019839A CN 112019839 A CN112019839 A CN 112019839A CN 202010988052 A CN202010988052 A CN 202010988052A CN 112019839 A CN112019839 A CN 112019839A
- Authority
- CN
- China
- Prior art keywords
- scene
- television application
- migration
- scenes
- testing method
- 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
Links
Images
Classifications
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04N—PICTORIAL COMMUNICATION, e.g. TELEVISION
- H04N17/00—Diagnosis, testing or measuring for television systems or their details
- H04N17/004—Diagnosis, testing or measuring for television systems or their details for digital television systems
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F11/00—Error detection; Error correction; Monitoring
- G06F11/36—Preventing errors by testing or debugging software
- G06F11/3668—Software testing
- G06F11/3672—Test management
Landscapes
- Engineering & Computer Science (AREA)
- Theoretical Computer Science (AREA)
- Computer Hardware Design (AREA)
- General Health & Medical Sciences (AREA)
- Multimedia (AREA)
- Signal Processing (AREA)
- Health & Medical Sciences (AREA)
- Quality & Reliability (AREA)
- Physics & Mathematics (AREA)
- General Engineering & Computer Science (AREA)
- General Physics & Mathematics (AREA)
- Biomedical Technology (AREA)
- Testing, Inspecting, Measuring Of Stereoscopic Televisions And Televisions (AREA)
Abstract
The invention relates to the field of television application testing, discloses an automatic testing method for android intelligent television application, and solves the problems of low testing efficiency and low testing coverage rate of the existing testing mode. The android intelligent television application method comprises the steps of abstracting each interface scene and migration among the scenes into a directed graph, constructing nodes in the directed graph by using XML files representing page structures generated by dump instructions of UIAutomators, enabling the scenes to be the nodes in the graph, operating by using a minibutton tool in an STF frame to realize migration among the nodes, and utilizing a minibutton tool in the STF frame to capture pictures to realize real-time display of processes and serve as a basis for comparison of subsequent results. The method is suitable for the automatic test of the android intelligent television application.
Description
Technical Field
The invention relates to the field of television application testing, in particular to an automatic android intelligent television application testing method.
Background
In recent years, with the development and maturity of mobile communication technology and android (android) intelligent operating systems, the number of intelligent devices equipped with android operating systems has increased, and a large amount of application software for the intelligent devices has come on line. In order to solve the problem of adaptation between equipment and applications, each large application platform constructs a corresponding adaptability test platform, but most of the platforms aim at the identification of the applications and mobile terminal equipment such as mobile phones. Like the smart television products, because of numerous models and sizes, the adaptive test requirements of applications also exist, but the technical method adopted in the field is mainly manual test and is assisted by specific tools such as Monkey and the like, and the specific flow is to design a test case after the test requirements are analyzed, prepare a test environment if the tools are assisted, and then implement the test in a manual execution and tool assistance mode.
When the test mode is used for adaptive tests, because a plurality of tested devices are tested and verified one by one, the workload is very large, and the test efficiency and the test coverage rate are difficult to ensure, an automatic test means is urgently needed. The automation of testing of the android intelligent television application is realized, a set of automatic testing method needs to be researched and mastered, and the key point is to solve the problems of traversal and operation of all application scenes.
Disclosure of Invention
The technical problem to be solved by the invention is as follows: the automatic testing method for the android smart television application is provided, and the problems of low testing efficiency and low testing coverage rate of the existing testing mode are solved.
In order to solve the problems, the invention adopts the technical scheme that: abstracting each interface scene of the android smart television application and migration among the scenes into a directed graph, constructing nodes (the scenes are the nodes in the graph) in the directed graph by using XML files representing page structures generated by dump instructions of UIAutomators, operating by using a minitouch tool in an STF frame to realize migration among the nodes, and capturing images by using a minitap tool in the STF frame to realize real-time display of the process and serve as a basis for comparison of subsequent results.
The implementation mode of the invention is as follows:
an automatic android intelligent television application testing method comprises the following steps:
a. acquiring the characteristics and the migration path of a scene, and carrying out screenshot on the scene and displaying the screenshot in real time;
b. taking the current scene as an iteration layer, checking whether the operation of the migration path of the current scene is finished or not, if not, finishing the iteration of the current layer, and if not, sequentially operating the acquired migration path to form a new iteration layer;
c. during path migration, taking a scene reached by a current scene as a new scene, acquiring scene characteristics and a migration path of the new scene, carrying out screenshot on the scene, and displaying the scene in real time; if the scene characteristics of the new scene are different from the scene characteristics of all existing scenes, returning to the step b; and if the scene characteristics of the new scene are the same as those of the existing scene, returning to the scene of the previous iteration layer, and ending the iteration of the current layer.
Further, in the steps a and c, the characteristics and the migration path of the scene are obtained by using the UIAutomator, and the method comprises the following steps:
abstracting migration among various interface scenes and scenes of the android smart television application into a directed graph, and constructing nodes in the directed graph by using XML (extensible markup language) files representing page structures generated by dump instructions of UIAutomators, wherein the scenes are the nodes in the graph.
Further, step b utilizes click, stroke and other operation events of the minibutton tool in the STF framework to operate the migration path.
Further, step a uses a minicap tool in the STF framework to perform screenshot.
The invention has the beneficial effects that: according to the Android intelligent television application adaptation test method, through comprehensive application of a plurality of technologies in UIAutomator and STF frames, traversal operation of Android intelligent television applications is achieved, operation processes and results are presented in real time through quick screenshot, simultaneous operation on multiple devices is supported, traversal test can be conducted on Android applications in large batch, automation of Android intelligent television application adaptation test is achieved, manual test can be replaced, and the problem that test efficiency and test coverage rate are not high is solved.
Drawings
FIG. 1 is a flow chart of a method provided in an embodiment of the present invention.
Detailed Description
The invention provides an automatic testing method aiming at adaptive testing of android intelligent television application, which realizes traversal operation of the android intelligent television application by mashup application of a control acquisition technology in an UIAutomator and a minor operation technology, a minor display technology and the like in an STF frame, can screenshot in real time to present an operation process and a result, and can support simultaneous operation on multiple devices, thereby realizing automation of adaptive testing of the android intelligent television application, replacing manual testing and solving the problems of low testing efficiency and testing coverage rate.
The invention mainly comprises 3 aspects: the method comprises the main processes of traversing each interface of the android smart television application and controlling each interface control, and simultaneously obtaining each interface screenshot for judging the result of the adaptation test.
The key idea for realizing the technical scheme is that each interface scene of the android intelligent television application and the migration among the scenes are abstracted into a directed graph, a node (the scene is the node in the graph) in the directed graph is constructed by using an XML (extensible markup language) file representing a page structure generated by a dump instruction of a UIAutomator, the migration condition is a path in the directed graph, and all the nodes, namely all the scenes, are traversed through a depth-first traversal algorithm of the graph. And operating by using a minipatch tool in the STF framework to realize the migration between nodes, and performing screenshot by using a minitap tool in the STF framework to realize the real-time display of the process and serve as a comparison basis of subsequent results.
The invention is further illustrated by the following specific examples.
The embodiment provides an android intelligent television application automatic testing method based on UIAutomator and STF, and as shown in FIG. 1, the execution flow is as follows:
1. setting the application entry interface as a starting point scene as a first layer, and acquiring the characteristics and the migration path of the application entry interface by using the UIAutomator. The migration among various interface scenes and scenes of the android smart television application is abstracted into a directed graph, an XML file which is generated by using dump instruction of UIAutomator and represents a page structure is used for constructing nodes in the directed graph, and the scenes are the nodes in the graph
2. Taking the current scene as an iteration layer, judging whether the migration path of the layer is completely accessed, and if not, entering the step 3; otherwise, the iteration layer is exited and step 5 is entered.
3. And (4) executing operations such as clicking, drawing and the like by using a minibutton tool in the STF, accessing the migration path, entering a new scene, and entering the step 4.
4. And judging whether a new scene already exists, if so, returning to the previous scene, and then repeating the step 2, and if not, directly repeating the step 2.
5. And (4) judging whether the scene is a first-layer scene, if not, repeating the step (2), if so, indicating that the scene is completely traversed successfully, and ending.
6. And entering each scene in the process, and utilizing a minisap tool to perform screenshot transmission test environment end, and displaying and storing.
The following technical details exist in the embodiment when the above flow is executed:
1. and each scene records a path for returning to the scene, and after the last iteration layer scene is traversed, all the scenes are sequentially returned to the first layer.
2. In order to accelerate the test, when the existing scene is detected, the scene does not immediately return to the previous iteration layer scene, but the detection progress of the iteration layer corresponding to the scene is directly inherited, and the test is continuously carried out, so that the time for returning to the previous iteration layer scene is saved.
3. And multiple applications or multiple devices are supported to be tested simultaneously.
5. To improve the overall execution efficiency, an overall iteration layer number upper limit may be set. Because all interfaces can be entered by general application through specific times of operations, the traversal efficiency can be improved under the condition of complete traversal by setting the upper limit of the iteration layer number.
In conclusion, by adopting the technical method, the android intelligent television application can be automatically traversed and tested, and the problem of unattended automatic testing of large-scale application is solved, so that manual testing is replaced, and the testing efficiency and the testing coverage rate are greatly improved.
Claims (5)
1. An automatic android intelligent television application testing method is characterized by comprising the following steps:
a. acquiring the characteristics and the migration path of a scene, and carrying out screenshot on the scene and displaying the screenshot in real time;
b. taking the current scene as an iteration layer, checking whether the operation of the migration path of the current scene is finished or not, if not, finishing the iteration of the current layer, and if not, sequentially operating the acquired migration path to form a new iteration layer;
c. during path migration, taking a scene reached by a current scene as a new scene, acquiring scene characteristics and a migration path of the new scene, carrying out screenshot on the scene, and displaying the scene in real time; if the scene characteristics of the new scene are different from the scene characteristics of all existing scenes, returning to the step b; and if the scene characteristics of the new scene are the same as those of the existing scene, returning to the scene of the previous iteration layer, and ending the iteration of the current layer.
2. The automated android smart television application testing method of claim 1, wherein in steps a and c, the UIAutomator is used to obtain the characteristics and the migration path of the scene, and the method comprises the following steps:
abstracting migration among various interface scenes and scenes of the android smart television application into a directed graph, and constructing nodes in the directed graph by using XML (extensible markup language) files representing page structures generated by dump instructions of UIAutomators, wherein the scenes are the nodes in the graph.
3. The automated android smart television application testing method of claim 1, wherein step b operates the migration path using a minibutton tool in the STF framework.
4. The automated android smart television application testing method of claim 1, wherein step a uses a minicap tool in an STF framework for screenshot.
5. The automated android smart television application testing method of claim 1, wherein the new scenario inherits the detection progress of the iteration layer corresponding to the scenario before the scenario of the previous iteration layer is returned in step c.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202010988052.XA CN112019839A (en) | 2020-09-18 | 2020-09-18 | Android smart television application automatic testing method |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202010988052.XA CN112019839A (en) | 2020-09-18 | 2020-09-18 | Android smart television application automatic testing method |
Publications (1)
Publication Number | Publication Date |
---|---|
CN112019839A true CN112019839A (en) | 2020-12-01 |
Family
ID=73521901
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN202010988052.XA Pending CN112019839A (en) | 2020-09-18 | 2020-09-18 | Android smart television application automatic testing method |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN112019839A (en) |
Citations (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US20140307106A1 (en) * | 2010-11-05 | 2014-10-16 | Google Inc. | Methods and Systems for Remotely Controlling Electronic Devices |
CN104484273A (en) * | 2014-12-19 | 2015-04-01 | 广州博冠信息科技有限公司 | Test method for application program, device and system |
CN108009078A (en) * | 2016-11-01 | 2018-05-08 | 腾讯科技(深圳)有限公司 | A kind of application interface traversal method, system and test equipment |
CN109086204A (en) * | 2018-07-20 | 2018-12-25 | 北京小米移动软件有限公司 | The foundation of node relationships tree, page marks and recognition methods, device and storage medium |
-
2020
- 2020-09-18 CN CN202010988052.XA patent/CN112019839A/en active Pending
Patent Citations (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US20140307106A1 (en) * | 2010-11-05 | 2014-10-16 | Google Inc. | Methods and Systems for Remotely Controlling Electronic Devices |
CN104484273A (en) * | 2014-12-19 | 2015-04-01 | 广州博冠信息科技有限公司 | Test method for application program, device and system |
CN108009078A (en) * | 2016-11-01 | 2018-05-08 | 腾讯科技(深圳)有限公司 | A kind of application interface traversal method, system and test equipment |
CN109086204A (en) * | 2018-07-20 | 2018-12-25 | 北京小米移动软件有限公司 | The foundation of node relationships tree, page marks and recognition methods, device and storage medium |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN104598380B (en) | A kind of automated testing method and system based on control | |
US9098633B2 (en) | Application testing | |
CN103744787A (en) | Cellphone automated testing method | |
CN102141962A (en) | Safety distributed test framework system and test method thereof | |
CN104980552B (en) | Realize the method and system of Android mobile terminal automatic test | |
CN105892304B (en) | Curve data automatic interpretation method | |
CN114003451B (en) | Interface testing method, device, system and medium | |
CN105204986A (en) | Automated product testing method, server and mobile equipment | |
CN110096422A (en) | A kind of server calculated performance test method and device based on container | |
CN105760300B (en) | A kind of automated testing method and test macro of STK/UTK business | |
CN111382424A (en) | Mobile application sensitive behavior detection method and system based on controlled environment | |
CN113452965A (en) | Automatic testing method and system for testing compatibility of switch and network camera | |
CN112019839A (en) | Android smart television application automatic testing method | |
CN101969442B (en) | Process running environment perception and migration based network analog framework implementation method | |
CN103902903A (en) | Malicious code analyzing method and system based on dynamic sandbox environment | |
CN114925516A (en) | Method and device for automatic modeling and simulation | |
CN109861789B (en) | Assembly line telemetering data batch processing system suitable for slow-recording and fast-sending | |
CN112214201A (en) | Method, device, equipment and storage medium for authenticating bottom interface of vehicle machine system | |
CN111163309A (en) | Testing method based on behavior simulation, television equipment and storage medium | |
CN112579431A (en) | Cross-platform script recording and playback method based on image recognition | |
CN114253867B (en) | Automatic testing method, device and system based on neural network model | |
CN108667911B (en) | Data acquisition method and system for application program | |
CN114826615B (en) | Mobile terminal acquisition method and system based on mobile phone simulator | |
CN105407112B (en) | Equipment capability learning method, device and system | |
CN112486819B (en) | Method and system for batch testing of communication equipment |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
PB01 | Publication | ||
PB01 | Publication | ||
SE01 | Entry into force of request for 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: 20201201 |