CN105740141B - A kind of automated detection method and its device - Google Patents

A kind of automated detection method and its device Download PDF

Info

Publication number
CN105740141B
CN105740141B CN201410773731.XA CN201410773731A CN105740141B CN 105740141 B CN105740141 B CN 105740141B CN 201410773731 A CN201410773731 A CN 201410773731A CN 105740141 B CN105740141 B CN 105740141B
Authority
CN
China
Prior art keywords
icon
text information
application
detected
terminal
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.)
Active
Application number
CN201410773731.XA
Other languages
Chinese (zh)
Other versions
CN105740141A (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.)
China Mobile Communications Group Co Ltd
Original Assignee
China Mobile Communications Group 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 China Mobile Communications Group Co Ltd filed Critical China Mobile Communications Group Co Ltd
Priority to CN201410773731.XA priority Critical patent/CN105740141B/en
Publication of CN105740141A publication Critical patent/CN105740141A/en
Application granted granted Critical
Publication of CN105740141B publication Critical patent/CN105740141B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Landscapes

  • User Interface Of Digital Computer (AREA)

Abstract

The embodiment of the invention discloses a kind of automated detection methods, comprising: in script template operational process, executes first in application, obtaining first icon of at least one of the terminal interface to be detected when needing to control terminal to be detected;It is determining to apply corresponding target icon with described first in first icon of at least one of the terminal interface to be detected;The terminal to be detected, which is controlled, by the target icon executes first application.The embodiment of the invention also discloses a kind of automatic detection devices.

Description

Automatic detection method and device
Technical Field
The invention relates to a mobile terminal testing technology, in particular to an automatic detection method and a device thereof.
Background
With the large-scale popularization of mobile internet application, more and more intelligent devices emerge; the time period from research and development to marketing of a single intelligent device is shorter and shorter, so that the compiling work of an automatic test script needs to be completed in a short time so as to ensure that the test of the intelligent device is performed quickly.
In the automatic testing process, an important and labor-consuming task is to compile an automatic testing script; in the prior art, an automatic test script is generally generated in a manner that an automatic script compiling environment is established at first, specifically, an automatic test framework is established, and parameters of a mobile terminal to be tested are configured; secondly, compiling automatic test scripts one by one according to the test cases of the mobile terminal.
With the continuous increase of the styles, the number and the number of test cases of the mobile terminals, the time for compiling the automatic test scripts is exponentially increased, so that the existing automatic test method consumes a large amount of manpower and material resources and has low efficiency; meanwhile, the types of the existing mobile terminals are various, User Interfaces (UIs) of the mobile terminals are not restricted, and icons with the same functional significance are different in the display forms of icon styles, contents and icon names, so that the reusability of an automatic test script is low, and the efficiency of automatic testing is further reduced.
Disclosure of Invention
In order to solve the existing technical problem, embodiments of the present invention provide an automated detection method and an apparatus thereof, which can achieve the purpose of performing automated testing on a terminal to be detected.
The technical scheme of the embodiment of the invention is realized as follows: the embodiment of the invention provides an automatic detection method, which comprises the following steps:
in the running process of the script template, when a terminal to be detected needs to be controlled to execute a first application, acquiring at least one first icon in an interface of the terminal to be detected;
determining a target icon corresponding to the first application in at least one first icon in the terminal interface to be detected;
and controlling the terminal to be detected to execute the first application through the target icon.
In the above scheme, the first icon includes first text information;
correspondingly, the acquiring at least one first icon in the terminal interface to be detected includes:
acquiring at least one first icon in the terminal interface to be detected;
based on each first icon, first text information corresponding to each first icon is extracted.
In the above scheme, the script template includes a second icon corresponding to the first application; the second icon comprises second text information;
determining a target icon corresponding to the first application in at least one first icon in the terminal interface to be detected, including:
comparing a second icon and second text information corresponding to the first application with each first icon and first text information in the terminal interface to be detected respectively;
when the second icon corresponding to the first application is successfully compared with any first icon in the terminal interface to be detected, the first icon which is successfully compared with the second icon is the target icon; or,
and when the second text information corresponding to the first application is successfully compared with any first text information in the terminal interface to be detected, the first icon corresponding to the first text information which is successfully compared with the second text information is the target icon.
In the above scheme, the script template includes a second icon corresponding to the first application; the second icon comprises second text information;
determining a target icon corresponding to the first application in at least one first icon in the terminal interface to be detected, including:
comparing a second icon and second text information corresponding to the first application with each first icon and first text information in the terminal interface to be detected respectively;
when it is determined that the comparison between the second icon corresponding to the first application and any first icon in the terminal interface to be detected fails, and it is determined that the comparison between the second text information corresponding to the first application and any first text information in the terminal interface to be detected fails, all third icons corresponding to the first application in an icon library are obtained; the third icon comprises third text information;
comparing each third icon and third text information corresponding to the first application with each first icon and first text information in the terminal interface to be detected respectively;
when the third icon corresponding to the first application is successfully compared with any first icon in the terminal interface to be detected, the first icon which is successfully compared with the third icon is the target icon; or,
and when the third text information corresponding to the first application is successfully compared with any first text information in the terminal interface to be detected, the first icon corresponding to the first text information successfully compared with the third text information is the target icon.
In the foregoing scheme, the controlling, by the target icon, the terminal to be detected to execute the first application includes:
replacing a second icon in the script template with a target icon;
and controlling the terminal to be detected to execute the first application through the target icon.
The embodiment of the invention also provides an automatic detection device, which comprises:
the acquisition unit is used for acquiring at least one first icon in the interface of the terminal to be detected when the terminal to be detected needs to be controlled to execute a first application in the running process of the script template;
the determining unit is used for determining a target icon corresponding to the first application in at least one first icon in the terminal interface to be detected;
and the control unit is used for controlling the terminal to be detected to execute the first application through the target icon.
In the above scheme, the first icon includes first text information; in a corresponding manner, the first and second electrodes are,
the obtaining unit is further configured to extract, based on each first icon, first text information corresponding to each first icon.
In the above scheme, the script template includes a second icon corresponding to the first application; the second icon comprises second text information;
the determination unit includes:
the first comparison subunit is used for comparing a second icon and second text information corresponding to the first application with each first icon and first text information in the terminal interface to be detected respectively;
the first determining subunit is used for determining a first icon successfully compared with a second icon as a target icon when it is determined that the second icon corresponding to the first application is successfully compared with any first icon in the terminal interface to be detected; or,
and when the second text information corresponding to the first application is successfully compared with any first text information in the terminal interface to be detected, determining a first icon corresponding to the first text information successfully compared with the second text information as a target icon.
In the above scheme, the script template includes a second icon corresponding to the first application; the second icon comprises second text information;
the determination unit includes:
the first comparison subunit is used for comparing a second icon and second text information corresponding to the first application with each first icon and first text information in the terminal interface to be detected respectively;
the first determining subunit is configured to, when it is determined that the comparison between the second icon corresponding to the first application and any one of the first icons in the terminal interface to be detected fails, and it is determined that the comparison between the second text information corresponding to the first application and any one of the first text information in the terminal interface to be detected fails, acquire all third icons corresponding to the first application in the icon library; the third icon comprises third text information;
the second comparison subunit is used for comparing each third icon and third text information corresponding to the first application with each first icon and first text information in the terminal interface to be detected respectively;
the second determining subunit is used for determining the first icon successfully compared with the third icon as a target icon when it is determined that the third icon corresponding to the first application is successfully compared with any first icon in the terminal interface to be detected; or,
and when determining that the third text information corresponding to the first application is successfully compared with any first text information in the terminal interface to be detected, determining a first icon corresponding to the first text information successfully compared with the third text information as a target icon.
In the above solution, the control unit includes:
the replacing subunit is used for replacing the second icon in the script template with a target icon;
and the control subunit is used for controlling the terminal to be detected to execute the first application through the target icon.
According to the automatic detection method and the device provided by the embodiment of the invention, the target icon corresponding to the first application is determined in all the first icons in the interface of the terminal to be detected, and the terminal to be detected is controlled to execute the first application through the target icon, wherein the first application is the application which is in the script template and controls the terminal to be detected to be executed in advance, so that the purpose of testing the terminal to be detected is achieved.
Drawings
FIG. 1 is a schematic flow chart illustrating an implementation of an automated inspection method according to an embodiment of the present invention;
FIG. 2 is a schematic structural diagram of an automated inspection apparatus according to an embodiment of the present invention;
FIG. 3 is a first schematic structural diagram of a determining unit according to an embodiment of the present invention;
FIG. 4 is a second schematic structural diagram of a determining unit according to an embodiment of the present invention;
FIG. 5 is a schematic structural diagram of a control unit according to an embodiment of the present invention;
fig. 6 is a flowchart illustrating a specific implementation of a second automated detection method according to an embodiment of the present invention.
Detailed Description
So that the manner in which the features and aspects of the present invention can be understood in detail, a more particular description of the invention, briefly summarized above, may be had by reference to embodiments, some of which are illustrated in the appended drawings.
Example one
FIG. 1 is a schematic flow chart illustrating an implementation of an automated inspection method according to an embodiment of the present invention; the method is applied to an automatic detection device; as shown in fig. 1, the method includes:
step 101: in the running process of the script template, when a terminal to be detected needs to be controlled to execute a first application, acquiring at least one first icon in an interface of the terminal to be detected;
in the above scheme, the first icon includes first text information;
correspondingly, the acquiring at least one first icon in the terminal interface to be detected includes:
acquiring at least one first icon in the terminal interface to be detected;
based on each first icon, first text information corresponding to each first icon is extracted.
In this embodiment, a unit with an image acquisition function, for example, a camera, may be used to acquire the first icon in the terminal interface to be detected.
In addition, in this embodiment, an Optical Character Recognition (OCR) technology may be adopted to provide the first text information in the first icon.
The embodiment is applied to a scene of carrying out automatic detection on the terminal to be detected, and in the scene, the terminal to be detected is detected through an automatic detection device, so that the purpose of testing the terminal is realized.
Here, before detecting the terminal to be detected, a script template needs to be preset, including:
and taking the general test case step script as a script template.
In this embodiment, the script template includes text information corresponding to a first application for controlling the terminal to be detected to execute; the script template also comprises a second icon corresponding to the first application; the second icon comprises second text information; in the process of running the script template, when a terminal to be detected is required to be controlled to execute a first application, the automatic detection device only needs to replace a second icon in the script template by a target icon corresponding to the first application in the terminal to be detected, so that a test script matched with the terminal to be detected can be automatically generated, and the automatic detection process of the terminal to be detected is further realized; meanwhile, in the embodiment of the invention, no matter what the type of the icon in the terminal to be detected is, the test script matched with the terminal to be detected can be automatically generated only by replacing the second icon in the script template with the target icon corresponding to the first application in the terminal to be detected, so that the embodiment of the invention not only can save the process that technicians write the test script one by one according to the factors such as the type of the icon in the terminal to be detected, but also can realize the purpose of automatically and quickly generating the test script, thus improving the reuse rate of the script template, improving the test efficiency of the terminal to be detected and laying a foundation for reducing the development period or the test period of the terminal.
Step 102: determining a target icon corresponding to the first application in at least one first icon in the terminal interface to be detected;
in the above scheme, the script template includes a second icon corresponding to the first application; the second icon comprises second text information;
determining a target icon corresponding to the first application in at least one first icon in the terminal interface to be detected, including:
comparing a second icon and second text information corresponding to the first application with each first icon and first text information in the terminal interface to be detected respectively;
when the second icon corresponding to the first application is successfully compared with any first icon in the terminal interface to be detected, the first icon which is successfully compared with the second icon is the target icon; or,
and when the second text information corresponding to the first application is successfully compared with any first text information in the terminal interface to be detected, the first icon corresponding to the first text information which is successfully compared with the second text information is the target icon.
In this embodiment, when the icon or the text information corresponding to the second icon or the second text information is not found in all the first icons and the first text information in the terminal to be detected, at this time, an icon in an icon library needs to be called, a target icon corresponding to the first application in the terminal to be detected is determined through the icon information in the icon library, the second icon in the script template is replaced by the target icon corresponding to the first application in the terminal to be detected, and then, the purpose of automatically detecting the terminal to be detected is achieved through the target icon.
In this embodiment, replacing the second icon in the script template with the target icon corresponding to the first application in the terminal to be detected is an automatic replacement process, so that the automatic detection method according to the embodiment of the present invention can automatically generate the test script based on the script template, so that the automatic detection method according to the embodiment of the present invention can improve the reuse rate of the script template, improve the test efficiency of testing the terminal to be detected, and lay a foundation for reducing the development cycle or the test cycle of the terminal.
In the above scheme, the script template includes a second icon corresponding to the first application; the second icon comprises second text information;
determining a target icon corresponding to the first application in at least one first icon in the terminal interface to be detected, including:
comparing a second icon and second text information corresponding to the first application with each first icon and first text information in the terminal interface to be detected respectively;
when it is determined that the comparison between the second icon corresponding to the first application and any first icon in the terminal interface to be detected fails, and it is determined that the comparison between the second text information corresponding to the first application and any first text information in the terminal interface to be detected fails, all third icons corresponding to the first application in an icon library are obtained; the third icon comprises third text information;
comparing each third icon and third text information corresponding to the first application with each first icon and first text information in the terminal interface to be detected respectively;
when the third icon corresponding to the first application is successfully compared with any first icon in the terminal interface to be detected, the first icon which is successfully compared with the third icon is the target icon; or,
and when the third text information corresponding to the first application is successfully compared with any first text information in the terminal interface to be detected, the first icon corresponding to the first text information successfully compared with the third text information is the target icon.
In practical application, since icons corresponding to the same application are different in different terminals, and text information in the icon corresponding to the same application is different, when an icon or text information which is successfully compared with a second icon or second text information corresponding to the first application is not found in all first icons and first text information of the terminal to be detected, it cannot be directly determined that all first icons and first text information in the terminal to be detected are not corresponding to the first application, and therefore, icon information in an icon library is also needed to be borrowed to determine all third icons and third text information corresponding to the first application in the icon library, and thus, all third icons and third text information in the terminal to be detected are finally determined by comparing all third icons and third text information with the first icon and first text information in the terminal to be detected respectively, A target icon corresponding to the first application.
Step 103: and controlling the terminal to be detected to execute the first application through the target icon.
In the foregoing scheme, the controlling, by the target icon, the terminal to be detected to execute the first application includes:
replacing a second icon in the script template with a target icon;
and controlling the terminal to be detected to execute the first application through the target icon.
In the embodiment of the invention, after the target icon corresponding to the first application in the terminal to be detected is determined, the target icon needs to be replaced by a second icon corresponding to the first application in the script template, so as to automatically generate the test script based on the script template, and thus, a foundation is laid for carrying out automatic detection on the terminal;
in addition, after the test script based on the script template is automatically generated, the automatic detection device controls the terminal to be detected to execute the first application through a target icon in the test script, so that automatic detection over-weighing of the terminal is realized.
In the above scheme, the method further comprises:
storing a first icon, namely a target icon, which is successfully compared with the third icon in the icon library so as to update the icon library; or,
and storing a first icon corresponding to the first text information, namely a target icon, which is successfully compared with the third text information, in the icon library so as to update the icon library.
In the embodiment of the invention, the icon library is arranged in the automatic detection device or the storage device which can be called by the automatic detection device, and various icons corresponding to various applications and various text information corresponding to various icons are stored in the icon library, so that when the icon in the terminal to be detected is unsuccessfully compared with the icon corresponding to the application which is pre-run in the script template, the icon in the icon library can be borrowed, so that the icon corresponding to the application which is pre-run in the terminal to be detected is determined, and a foundation is laid for the automatic detection of the terminal to be detected.
In order to implement the foregoing method, an embodiment of the present invention further provides an automatic detection apparatus, as shown in fig. 2, the apparatus includes:
the acquiring unit 21 is configured to acquire at least one first icon in an interface of a terminal to be detected when the terminal to be detected needs to be controlled to execute a first application in the running process of the script template;
the determining unit 22 is configured to determine, in at least one first icon in the terminal interface to be detected, a target icon corresponding to the first application;
and the control unit 23 is configured to control the terminal to be detected to execute the first application through the target icon.
In the above scheme, the first icon includes first text information; in a corresponding manner, the first and second electrodes are,
the obtaining unit 21 is further configured to extract, based on each first icon, first text information corresponding to each first icon.
In the above scheme, the script template includes a second icon corresponding to the first application; the second icon comprises second text information;
as shown in fig. 3, the determining unit 22 includes:
the first comparison subunit 221 is configured to compare the second icon and the second text information corresponding to the first application with each of the first icons and the first text information in the terminal interface to be detected respectively;
a first determining subunit 222, configured to, when it is determined that the second icon corresponding to the first application is successfully compared with any first icon in the terminal interface to be detected, determine the first icon successfully compared with the second icon as a target icon; or,
and when the second text information corresponding to the first application is successfully compared with any first text information in the terminal interface to be detected, determining a first icon corresponding to the first text information successfully compared with the second text information as a target icon.
Alternatively, as shown in fig. 4, the determining unit 22 includes:
the first comparison subunit 221 is configured to compare the second icon and the second text information corresponding to the first application with each of the first icons and the first text information in the terminal interface to be detected respectively;
a first determining subunit 222, configured to, when it is determined that the comparison between the second icon corresponding to the first application and any first icon in the terminal interface to be detected fails, and it is determined that the comparison between the second text information corresponding to the first application and any first text information in the terminal interface to be detected fails, obtain all third icons corresponding to the first application in the icon library; the third icon comprises third text information;
a second comparison subunit 223, configured to compare each third icon and third text information corresponding to the first application with each first icon and first text information in the terminal interface to be detected respectively;
a second determining subunit 224, configured to, when it is determined that the third icon corresponding to the first application is successfully compared with any first icon in the terminal interface to be detected, determine the first icon successfully compared with the third icon as a target icon; or,
and when determining that the third text information corresponding to the first application is successfully compared with any first text information in the terminal interface to be detected, determining a first icon corresponding to the first text information successfully compared with the third text information as a target icon.
In the foregoing solution, as shown in fig. 5, the control unit 23 includes:
a replacing subunit 231, configured to replace a second icon in the script template with a target icon;
and a control subunit 232, configured to control, through the target icon, the terminal to be detected to execute the first application.
The acquiring unit 21, the determining unit 22 and the controlling unit 23 may all be run on a computer, and may be implemented by a Central Processing Unit (CPU), a microprocessor unit (MPU), a Digital Signal Processor (DSP) or a programmable gate array (FPGA) on the computer.
In the first embodiment provided in the present application, it should be understood that the described apparatus embodiment is only illustrative, for example, the division of the unit is only one logic function division, and there may be other division ways in actual implementation, such as: multiple units or components may be combined, or may be integrated into another system, or some features may be omitted, or not implemented. Based on this, the embodiment of the present invention further provides another dividing and combining manner, as described in the following second embodiment, and the automated detection method described in the embodiment of the present invention is implemented by the apparatus described in the following second embodiment.
Example two
The embodiment of the invention provides a specific implementation method of an automatic detection method based on an automatic detection system, and the device comprises the following steps: the device comprises a control module, an automatic test module and a script generator module;
the control module is used for connecting, driving and controlling the automatic test module so as to realize the automatic detection process of the terminal to be detected through the automatic test module; the control module may be implemented by a computer, including: an automatic detection tool software system, an icon library, an icon comparator and the like; the icon library and the icon comparer can analyze and store the icon information fed back by the automatic detection module.
The automatic test module mainly executes the instruction issued by the control module, acquires the icon in the interface of the terminal to be detected through an image acquisition sub-module with an image acquisition function, such as a camera, corresponding to the automatic test module, and feeds the acquired icon back to the control module; for example, the automated testing module may be implemented by a robot having image capture capabilities.
The script generator module is used for generating a script template, wherein the script template is a universal test case step script written by using an automatic test module, and the universal test case step script is the script template in the embodiment, namely the test template; on the basis of the test template, a complete test script suitable for the terminal to be detected can be generated only by replacing the UI icon in the terminal to be detected with the icon corresponding to the pre-executed application; here, the replaced UI icon is a corresponding icon in the terminal to be detected, which is a pre-executed application.
The terminal to be detected is a mobile terminal with a UI icon.
The automatic detection method according to the embodiment of the present invention is further explained based on the apparatus according to the second embodiment;
FIG. 6 is a flowchart illustrating an implementation of a second automated inspection method according to an embodiment of the present invention; as shown in fig. 6, the method includes:
step 601: the script template in the script generator module is led into the control module;
step 602: after receiving the script template, the control module issues an instruction for operating the script template to an automatic test module;
step 603: the automatic test module calls a script template in the control module based on the instruction and runs the script template in the automatic test module;
step 604: in the process of running the script template, when a terminal to be detected needs to be controlled to execute a first application, the automatic detection module drives an image acquisition sub-module of the automatic detection module to acquire all first UI icons in an interface of the terminal to be detected; the script template comprises a second UI icon corresponding to the first application; the second UI icon comprises second text information;
step 605: the automatic test module sends all the collected first UI icons to an icon comparator of the control module;
step 606: the icon comparer of the control module extracts first text information corresponding to each first UI icon through an OCR technology based on all the first UI icons;
step 607: the icon comparer of the control module compares a second UI icon and second text information corresponding to the first application with each first UI icon and first text information in the terminal interface to be detected respectively;
step 608: when the icon comparer of the control module determines that the comparison between the second UI icon corresponding to the first application and any first UI icon in the terminal interface to be detected fails and determines that the comparison between the second text information corresponding to the first application and any first text information in the terminal interface to be detected fails, all third UI icons corresponding to the first application are acquired from an icon library of the control module; the third UI icon comprises third text information;
step 609: the icon comparer of the control module compares each third UI icon and third text information corresponding to the first application with each first UI icon and first text information in the terminal interface to be detected respectively;
step 610: when the icon comparer of the control module determines that the third UI icon corresponding to the first application is successfully compared with any first UI icon in the terminal interface to be detected, the first UI icon which is successfully compared with the third UI icon is the target icon; or,
when the icon comparer of the control module determines that the third text information corresponding to the first application is successfully compared with any first text information in the terminal interface to be detected, the first UI icon corresponding to the first text information which is successfully compared with the third text information is the target icon;
step 611: an icon comparer in the control module sends a message carrying the target icon to the automatic detection module;
step 612: replacing a second icon in the script template by a target icon by the automatic detection module;
step 613: and the automatic detection module controls the terminal to be detected to execute the first application through the target icon so as to realize the normal operation of the script template.
Here, in order to update the icon library immediately and lay a foundation for subsequent comparison, the method of this embodiment further includes:
storing a first icon, namely a target icon, which is successfully compared with the third icon in the icon library so as to update the icon library; or,
and storing a first icon corresponding to the first text information, namely a target icon, which is successfully compared with the third text information, in the icon library so as to update the icon library.
As will be appreciated by one skilled in the art, embodiments of the present invention may be provided as a method, system, or computer program product. Accordingly, the present invention may take the form of a hardware embodiment, a software embodiment, or an embodiment combining software and hardware aspects. Furthermore, the present invention may take the form of a computer program product embodied on one or more computer-usable storage media (including, but not limited to, disk storage, optical storage, and the like) having computer-usable program code embodied therein.
The present invention is described with reference to flowchart illustrations and/or block diagrams of methods, apparatus (systems), and computer program products according to embodiments of the invention. It will be understood that each flow and/or block of the flow diagrams and/or block diagrams, and combinations of flows and/or blocks in the flow diagrams and/or block diagrams, can be implemented by computer program instructions. These computer program instructions may be provided to a processor of a general purpose computer, special purpose computer, embedded processor, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, create means for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be stored in a computer-readable memory that can direct a computer or other programmable data processing apparatus to function in a particular manner, such that the instructions stored in the computer-readable memory produce an article of manufacture including instruction means which implement the function specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be loaded onto a computer or other programmable data processing apparatus to cause a series of operational steps to be performed on the computer or other programmable apparatus to produce a computer implemented process such that the instructions which execute on the computer or other programmable apparatus provide steps for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
The foregoing is merely an example of the embodiments of the present invention, and it should be noted that, for those skilled in the art, various modifications and decorations can be made without departing from the principle of the embodiments of the present invention, and these modifications and decorations should also be regarded as the protection scope of the embodiments of the present invention.

Claims (8)

1. An automated detection method, the method comprising:
in the running process of the script template, when a terminal to be detected needs to be controlled to execute a first application, acquiring at least one first icon in an interface of the terminal to be detected;
determining a target icon corresponding to the first application in at least one first icon in the terminal interface to be detected;
controlling the terminal to be detected to execute the first application through the target icon;
the script template comprises a second icon corresponding to the first application, and the target icon controls the terminal to be detected to execute the first application, including:
replacing a second icon in the script template with a target icon;
and controlling the terminal to be detected to execute the first application through the target icon.
2. The method according to claim 1, wherein the first icon comprises first text information;
correspondingly, the acquiring at least one first icon in the terminal interface to be detected includes:
acquiring at least one first icon in the terminal interface to be detected;
based on each first icon, first text information corresponding to each first icon is extracted.
3. The method of claim 2, wherein the script template includes a second icon corresponding to the first application; the second icon comprises second text information;
determining a target icon corresponding to the first application in at least one first icon in the terminal interface to be detected, including:
comparing a second icon and second text information corresponding to the first application with each first icon and first text information in the terminal interface to be detected respectively;
when the second icon corresponding to the first application is successfully compared with any first icon in the terminal interface to be detected, the first icon which is successfully compared with the second icon is the target icon; or,
and when the second text information corresponding to the first application is successfully compared with any first text information in the terminal interface to be detected, the first icon corresponding to the first text information which is successfully compared with the second text information is the target icon.
4. The method of claim 2, wherein the script template includes a second icon corresponding to the first application; the second icon comprises second text information;
determining a target icon corresponding to the first application in at least one first icon in the terminal interface to be detected, including:
comparing a second icon and second text information corresponding to the first application with each first icon and first text information in the terminal interface to be detected respectively;
when it is determined that the comparison between the second icon corresponding to the first application and any first icon in the terminal interface to be detected fails, and it is determined that the comparison between the second text information corresponding to the first application and any first text information in the terminal interface to be detected fails, all third icons corresponding to the first application in an icon library are obtained; the third icon comprises third text information;
comparing each third icon and third text information corresponding to the first application with each first icon and first text information in the terminal interface to be detected respectively;
when the third icon corresponding to the first application is successfully compared with any first icon in the terminal interface to be detected, the first icon which is successfully compared with the third icon is the target icon; or,
and when the third text information corresponding to the first application is successfully compared with any first text information in the terminal interface to be detected, the first icon corresponding to the first text information successfully compared with the third text information is the target icon.
5. An automated inspection device, the device comprising:
the acquisition unit is used for acquiring at least one first icon in the interface of the terminal to be detected when the terminal to be detected needs to be controlled to execute a first application in the running process of the script template;
the determining unit is used for determining a target icon corresponding to the first application in at least one first icon in the terminal interface to be detected;
the control unit is used for controlling the terminal to be detected to execute the first application through the target icon;
wherein, contain the second icon corresponding with said first application in the said script template, the said control unit includes:
the replacing subunit is used for replacing the second icon in the script template with a target icon;
and the control subunit is used for controlling the terminal to be detected to execute the first application through the target icon.
6. The apparatus of claim 5, wherein the first icon comprises first text information; in a corresponding manner, the first and second electrodes are,
the obtaining unit is further configured to extract, based on each first icon, first text information corresponding to each first icon.
7. The apparatus according to claim 6, wherein the script template comprises a second icon corresponding to the first application; the second icon comprises second text information;
the determination unit includes:
the first comparison subunit is used for comparing a second icon and second text information corresponding to the first application with each first icon and first text information in the terminal interface to be detected respectively;
the first determining subunit is used for determining a first icon successfully compared with a second icon as a target icon when it is determined that the second icon corresponding to the first application is successfully compared with any first icon in the terminal interface to be detected; or,
and when the second text information corresponding to the first application is successfully compared with any first text information in the terminal interface to be detected, determining a first icon corresponding to the first text information successfully compared with the second text information as a target icon.
8. The apparatus according to claim 6, wherein the script template comprises a second icon corresponding to the first application; the second icon comprises second text information;
the determination unit includes:
the first comparison subunit is used for comparing a second icon and second text information corresponding to the first application with each first icon and first text information in the terminal interface to be detected respectively;
the first determining subunit is configured to, when it is determined that the comparison between the second icon corresponding to the first application and any one of the first icons in the terminal interface to be detected fails, and it is determined that the comparison between the second text information corresponding to the first application and any one of the first text information in the terminal interface to be detected fails, acquire all third icons corresponding to the first application in the icon library; the third icon comprises third text information;
the second comparison subunit is used for comparing each third icon and third text information corresponding to the first application with each first icon and first text information in the terminal interface to be detected respectively;
the second determining subunit is used for determining the first icon successfully compared with the third icon as a target icon when it is determined that the third icon corresponding to the first application is successfully compared with any first icon in the terminal interface to be detected; or,
and when determining that the third text information corresponding to the first application is successfully compared with any first text information in the terminal interface to be detected, determining a first icon corresponding to the first text information successfully compared with the third text information as a target icon.
CN201410773731.XA 2014-12-12 2014-12-12 A kind of automated detection method and its device Active CN105740141B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201410773731.XA CN105740141B (en) 2014-12-12 2014-12-12 A kind of automated detection method and its device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201410773731.XA CN105740141B (en) 2014-12-12 2014-12-12 A kind of automated detection method and its device

Publications (2)

Publication Number Publication Date
CN105740141A CN105740141A (en) 2016-07-06
CN105740141B true CN105740141B (en) 2018-12-04

Family

ID=56241633

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201410773731.XA Active CN105740141B (en) 2014-12-12 2014-12-12 A kind of automated detection method and its device

Country Status (1)

Country Link
CN (1) CN105740141B (en)

Families Citing this family (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN108984399A (en) * 2018-06-29 2018-12-11 上海连尚网络科技有限公司 Detect method, electronic equipment and the computer-readable medium of interface difference
CN111192578B (en) * 2019-12-28 2023-04-07 惠州Tcl移动通信有限公司 Application control method and device, storage medium and electronic equipment

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102946470A (en) * 2012-10-19 2013-02-27 北京小米科技有限责任公司 Display method and device of icon within display region of mobile terminal, and mobile terminal
CN103176727A (en) * 2011-12-23 2013-06-26 宇龙计算机通信科技(深圳)有限公司 Application program starting method and communication terminal
CN103544100A (en) * 2012-07-12 2014-01-29 腾讯科技(深圳)有限公司 Method, system and client side for testing APP of portable data processing equipment
CN103914231A (en) * 2013-01-07 2014-07-09 上海斐讯数据通信技术有限公司 Method for quickly entering application program and mobile terminal

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US7092995B2 (en) * 2002-06-25 2006-08-15 Microsoft Corporation Testing distributed applications

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103176727A (en) * 2011-12-23 2013-06-26 宇龙计算机通信科技(深圳)有限公司 Application program starting method and communication terminal
CN103544100A (en) * 2012-07-12 2014-01-29 腾讯科技(深圳)有限公司 Method, system and client side for testing APP of portable data processing equipment
CN102946470A (en) * 2012-10-19 2013-02-27 北京小米科技有限责任公司 Display method and device of icon within display region of mobile terminal, and mobile terminal
CN103914231A (en) * 2013-01-07 2014-07-09 上海斐讯数据通信技术有限公司 Method for quickly entering application program and mobile terminal

Also Published As

Publication number Publication date
CN105740141A (en) 2016-07-06

Similar Documents

Publication Publication Date Title
CN106528395B (en) The generation method and device of test case
US8984349B2 (en) Method and system for automating the process of testing a device
US10176079B2 (en) Identification of elements of currently-executing component script
CN107733985B (en) Method and device for deploying functional components of cloud computing system
CN103150188B (en) The compatible video card fast initializing method of the x86 of non-x 86 instruction set computer
US9411711B2 (en) Adopting an existing automation script to a new framework
CN103455403B (en) Method of testing and device
CN104246702A (en) Workflow compilation
US20180322029A1 (en) Method and apparatus for automatic cross-system program debugging
CN102306119A (en) System for capturing global exception and method
US20140137099A1 (en) Rapid configuration of software
US20140033179A1 (en) Application testing
CN104199667B (en) Method and system for newly building MTK project and submitting codes
CN111143188A (en) Method and equipment for automatically testing application
CN106528429A (en) UI testing method and device
CN106021101A (en) Method and device for testing mobile terminal
CN105740141B (en) A kind of automated detection method and its device
CN110990285A (en) UI automation test method and device
CN105224450A (en) Concurrent testing method and device
CN105446873A (en) Automatic test method and system of APK (AndroidPackage) software on the basis of android platform
CN102707943A (en) Implementation method of remote control automation tool
CN104239202A (en) Non-Root testing method and system of interactive intelligent equipment
CN105867894A (en) Automatic creating method and system of development environment
CN102306109A (en) Method for realizing logic programming in communication management machine
CN109522217A (en) The internal storage testing method and terminal device of application program

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
C10 Entry into substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant