CN105740141B - A kind of automated detection method and its device - Google Patents
A kind of automated detection method and its device Download PDFInfo
- 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
- detected
- application
- terminal interface
- 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
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
Technical field
The present invention relates to mobile terminal test technology more particularly to a kind of automated detection methods and its device.
Background technique
Extensive with mobile Internet application is popularized, and more and more smart machines emerge;Single paragraph is intelligently set
The standby time cycle from research and development to listing is shorter and shorter, this just needs to complete writing for automatic test script within a very short time
Work, to guarantee quickly to carry out the test of the smart machine.
In automatic test course, important and labor intensive a job is exactly to write automatic test script;It is existing
It in technology, generallys use under type such as and generates automatic test script, that is, put up automation first and write script environment, have
Body, build automated test frame, configure the parameter of mobile terminal to be tested etc.;Secondly, the test of control mobile terminal
Use-case writes automatic test script one by one.
As mobile terminal style, quantity, test case quantity are continuously increased, the time of automatic test script is write
Exponentially increase, therefore, existing automated testing method can consume a large amount of manpower and material resources, inefficiency;At the same time, existing
Mobile terminal style is many kinds of, and the user interface (UI, User Interface) of mobile terminal is not restricted to one pattern, identical function meaning
The icon of justice, it is different in form in showing for icon style, style, content and icon name, in this way, causing to automate
Test script reusability is low, further reduced the efficiency of automatic test.
Summary of the invention
To solve existing technical problem, the embodiment of the invention provides a kind of automated detection method and its dresses
It sets, can be realized the purpose for carrying out automatic test to terminal to be detected.
The technical solution of the embodiment of the present invention is achieved in that the embodiment of the invention provides a kind of automatic detection sides
Method, which comprises
In script template operational process, first is executed in application, obtaining described to be checked when needing to control terminal to be detected
Survey the first icon of at least one of terminal interface;
It is determining to apply corresponding mesh with described first in first icon of at least one of the terminal interface to be detected
It marks on a map;
The terminal to be detected, which is controlled, by the target icon executes first application.
It include the first text information in first icon in above scheme;
It is accordingly, described to obtain first icon of at least one of the terminal interface to be detected, comprising:
Obtain first icon of at least one of the terminal interface to be detected;
Based on each the first icon, the first text information corresponding with each first icon is extracted.
It include to apply corresponding second icon with described first in above scheme, in the script template;Described second
It include the second text information in icon;
It is described in first icon of at least one of the terminal interface to be detected, it is determining applied with described first it is corresponding
Target icon, comprising:
Will with it is described first application corresponding second icon and the second text information, respectively with the terminal interface to be detected
Each of the first icon and the first text information compare;
When determine it is described first application corresponding second icon and the terminal interface to be detected in any first icon
When comparing successfully, comparing successful first icon with second icon is target icon;Alternatively,
When determine it is described first apply corresponding second text information and any in the terminal interface to be detected
When first text information is compared successfully, corresponding first icon of successful first text information is compared with second text information
As target icon.
It include to apply corresponding second icon with described first in above scheme, in the script template;Described second
It include the second text information in icon;
It is described in first icon of at least one of the terminal interface to be detected, it is determining applied with described first it is corresponding
Target icon, comprising:
Will with it is described first application corresponding second icon and the second text information, respectively with the terminal interface to be detected
Each of the first icon and the first text information compare;
When determine it is described first application corresponding second icon and the terminal interface to be detected in any first icon
Failure is compared, and determines that described first applies corresponding second text information and any in the terminal interface to be detected
It when first text information compares failure, obtains in icon library, apply corresponding all third icons with described first;Third icon
In include third text information;
By it is described first application corresponding each third icon and third text information, respectively with terminal circle to be detected
The first icon of each of face and the first text information compare;
When determine it is described first application corresponding third icon and the terminal interface to be detected in any first icon
When comparing successfully, comparing successful first icon with the third icon is target icon;Alternatively,
When determine it is described first application corresponding third text information and the terminal interface to be detected in any first
When text information is compared successfully, comparing corresponding first icon of successful first text information with the third text information is
Target icon.
It is described that terminal execution to be detected first application, packet are controlled by the target icon in above scheme
It includes:
The second icon in the script template is replaced with into target icon;
The terminal to be detected, which is controlled, by the target icon executes first application.
The embodiment of the invention also provides a kind of automatic detection device, described device includes:
Acquiring unit, in script template operational process, when need to control terminal to be detected execute first in application,
Obtain first icon of at least one of the terminal interface to be detected;
Determination unit, it is determining with described the in first icon of at least one of the terminal interface to be detected
One applies corresponding target icon;
Control unit executes first application for controlling the terminal to be detected by the target icon.
It include the first text information in first icon in above scheme;Accordingly,
The acquiring unit is also used to extract and each the first icon corresponding first based on each first icon
Text information.
It include to apply corresponding second icon with described first in above scheme, in the script template;Described second
It include the second text information in icon;
The determination unit, comprising:
First comparison subunit, being used for will be with first corresponding second icon of application and the second text information, difference
It is compared with first icon of each of the terminal interface to be detected and the first text information;
First determines subelement, for when determining first corresponding second icon of application and terminal circle to be detected
When any first icon in face is compared successfully, successful first icon will be compared with second icon and be determined as target figure
Mark;Alternatively,
For when in determining first corresponding second text information of application and the terminal interface to be detected
When any first text information is compared successfully, successful first text information corresponding will be compared with second text information
One icon is determined as target icon.
It include to apply corresponding second icon with described first in above scheme, in the script template;Described second
It include the second text information in icon;
The determination unit, comprising:
First comparison subunit, being used for will be with first corresponding second icon of application and the second text information, difference
It is compared with first icon of each of the terminal interface to be detected and the first text information;
First determines subelement, for when determining first corresponding second icon of application and terminal circle to be detected
Any first icon in face compares failure, and determine first corresponding second text information of application with it is described to be checked
It when any first text information surveyed in terminal interface compares failure, obtains in icon library, apply corresponding institute with described first
There is third icon;It include third text information in third icon;
Second comparison subunit is used for the first corresponding each third icon of application and third text information, divides
It is not compared with first icon of each of the terminal interface to be detected and the first text information;
Second determines subelement, for when the determining first corresponding third icon of application and terminal circle to be detected
When any first icon in face is compared successfully, successful first icon will be compared with the third icon and be determined as target figure
Mark;Alternatively,
When determine it is described first application corresponding third text information and the terminal interface to be detected in any first
When text information is compared successfully, it is true that corresponding first icon of successful first text information will be compared with the third text information
It is set to target icon.
In above scheme, described control unit includes:
Subelement is replaced, for the second icon in the script template to be replaced with target icon;
Subelement is controlled, executes first application for controlling the terminal to be detected by the target icon.
Automated detection method and its device provided by the embodiment of the present invention pass through the institute in terminal interface to be detected
Have in the first icon, determines to apply corresponding target icon with first, and then described to be checked by target icon control
It surveys terminal and executes first application, wherein first application is held in advance in the script template, control terminal to be detected
Capable application, in this way, realizing the purpose tested terminal to be detected.
Detailed description of the invention
Fig. 1 is the implementation process schematic diagram of automated detection method of the embodiment of the present invention;
Fig. 2 is the structural schematic diagram of automatic detection device of the embodiment of the present invention;
Fig. 3 is the structural schematic diagram one of determination unit of the embodiment of the present invention;
Fig. 4 is the structural schematic diagram two of determination unit of the embodiment of the present invention;
Fig. 5 is the structural schematic diagram of control unit of the embodiment of the present invention;
Fig. 6 is the flow diagram of the specific implementation of two automated detection method of the embodiment of the present invention.
Specific embodiment
In order to more fully hereinafter understand the features of the present invention and technology contents, with reference to the accompanying drawing to reality of the invention
It is now described in detail, appended attached drawing purposes of discussion only for reference, is not used to limit the present invention.
Embodiment one
Fig. 1 is the implementation process schematic diagram of automated detection method of the embodiment of the present invention;The method is applied to automation
In detection device;As shown in Figure 1, which comprises
Step 101: in script template operational process, executing first in application, obtaining when needing to control terminal to be detected
First icon of at least one of the terminal interface to be detected;
It include the first text information in first icon in above scheme;
It is accordingly, described to obtain first icon of at least one of the terminal interface to be detected, comprising:
Obtain first icon of at least one of the terminal interface to be detected;
Based on each the first icon, the first text information corresponding with each first icon is extracted.
In the present embodiment, the end to be detected can be acquired using the unit with image collecting function, such as camera
Hold the first icon in interface.
In addition, optical character identification (OCR, Optical Character can be used in the present embodiment
Recognition) technology proposes the first text information in the first icon.
The scene that the present embodiment is applied to carry out terminal to be detected automatic detection passes through automation in this scene
Detection device detects the terminal to be detected, in this way, realizing the purpose to terminal test.
Here, before detecting to terminal to be detected, default script template is needed, comprising:
Using general test case step script as script template.
It include that control terminal to be detected executes first using corresponding text in the present embodiment, in the script template
Information;It wherein, also include to apply corresponding second icon with described first in the script template;It is wrapped in second icon
Contain the second text information;Automatic detection device is held during Run Script template when needing to control terminal to be detected
Row first in terminal to be detected with the corresponding target icon of first application in application, need to only be replaced in the script template
The second icon, the test script with the terminal coupling to be detected can be automatically generated, and then realize to terminal to be detected
Automatic detection process;Simultaneously as in the embodiment of the present invention, no matter the icon in terminal to be detected why seed type, only need
The second icon in the script template is replaced using corresponding target icon with described first in terminal to be detected, it can be certainly
The dynamic test script generated with the terminal coupling to be detected, therefore, the embodiment of the present invention is not only able to save technical staff's root
The factors such as the type according to the icon in terminal to be detected write the process of test script one by one, additionally it is possible to realize automatically and fast
The purpose of test script is generated fastly, in this way, promoting the reusability of script template, improves the survey tested terminal to be detected
Efficiency is tried, is laid the foundation to reduce development cycle or the test period of terminal.
Step 102: determining to be applied with described first in first icon of at least one of the terminal interface to be detected
Corresponding target icon;
It include to apply corresponding second icon with described first in above scheme, in the script template;Described second
It include the second text information in icon;
It is described in first icon of at least one of the terminal interface to be detected, it is determining applied with described first it is corresponding
Target icon, comprising:
Will with it is described first application corresponding second icon and the second text information, respectively with the terminal interface to be detected
Each of the first icon and the first text information compare;
When determine it is described first application corresponding second icon and the terminal interface to be detected in any first icon
When comparing successfully, comparing successful first icon with second icon is target icon;Alternatively,
When determine it is described first apply corresponding second text information and any in the terminal interface to be detected
When first text information is compared successfully, corresponding first icon of successful first text information is compared with second text information
As target icon.
In the present embodiment, in all first icons and the first text information in the terminal to be detected, do not find
Icon corresponding with second icon or second text information or text information, at this time, it may be necessary to call in icon library
Icon, by the icon information in icon library, determine it is in the terminal to be detected, apply corresponding target with described first
Icon, to replace the second figure in the script template using corresponding target icon with described first in terminal to be detected
Mark realizes the purpose detected automatically to terminal to be detected by the target icon in turn.
In the present embodiment, the script template is replaced with the corresponding target icon of first application in terminal to be detected
In the second icon be an automatic replacement process, therefore, automated detection method described in the embodiment of the present invention can give birth to automatically
At the test script based on script template, in this way, automated detection method described in the embodiment of the present invention is made to be able to ascend foot
The reusability of this template improves the testing efficiency tested terminal to be detected, for development cycle or the test for reducing terminal
Period lays the foundation.
It include to apply corresponding second icon with described first in above scheme, in the script template;Described second
It include the second text information in icon;
It is described in first icon of at least one of the terminal interface to be detected, it is determining applied with described first it is corresponding
Target icon, comprising:
Will with it is described first application corresponding second icon and the second text information, respectively with the terminal interface to be detected
Each of the first icon and the first text information compare;
When determine it is described first application corresponding second icon and the terminal interface to be detected in any first icon
Failure is compared, and determines that described first applies corresponding second text information and any in the terminal interface to be detected
It when first text information compares failure, obtains in icon library, apply corresponding all third icons with described first;Third icon
In include third text information;
By it is described first application corresponding each third icon and third text information, respectively with terminal circle to be detected
The first icon of each of face and the first text information compare;
When determine it is described first application corresponding third icon and the terminal interface to be detected in any first icon
When comparing successfully, comparing successful first icon with the third icon is target icon;Alternatively,
When determine it is described first application corresponding third text information and the terminal interface to be detected in any first
When text information is compared successfully, comparing corresponding first icon of successful first text information with the third text information is
Target icon.
In practical applications, since in different terminals, the corresponding icon of same application is different, and same application is corresponding
Text information in icon is different, therefore, when in all first icons of the terminal to be detected and the first text information not
Find with it is described first application corresponding second icon or the second text information compare successful icon or text information when, not
It can directly conclude that all first icons in the terminal to be detected and the first text information be not corresponding with the first application, because
This, it is also necessary to borrow the icon information in icon library, determine first apply in icon library corresponding all third icons and
Third text information, in this way, by by all third icons and third text information, respectively with the in the terminal to be detected
One icon and the first text information compare, and finally determine in the terminal to be detected, corresponding with first application
Target icon.
Step 103: the terminal to be detected being controlled by the target icon and executes first application.
It is described that terminal execution to be detected first application, packet are controlled by the target icon in above scheme
It includes:
The second icon in the script template is replaced with into target icon;
The terminal to be detected, which is controlled, by the target icon executes first application.
In the embodiment of the present invention, determine it is in the terminal to be detected, with it is described first apply corresponding target icon
Later, it is also necessary to by it is in the script template, with described first replace with the target icon using corresponding second icon,
To automatically generate the test script based on the script template, in this way, laying the foundation to carry out automatic detection to terminal;
In addition, the automatic detection device passes through institute after automatically generating the test script based on the script template
The target icon control terminal to be detected stated in test script executes first application, to realize the automation to terminal
Detected title.
In above scheme, the method also includes:
Successful first icon will be compared with the third icon, i.e. target icon is stored in the icon library, with more
The new icon library;Alternatively,
The third text information is compared into corresponding first icon of successful first text information, i.e. target icon stores
In the icon library, to update the icon library.
In the embodiment of the present invention, the icon library is set in the automatic detection device or can be by described automatic
Change in the storage device that detection device is called, and is stored with various icons corresponding with various applications in the icon library, and
Various text informations corresponding with various icons, in this way, prerun is answered in icon and script template in the terminal to be detected
When comparing unsuccessful with corresponding icon, the icon in the icon library can be borrowed, in terminal to be detected, determine
With prerun using corresponding icon, lay the foundation to carry out automatic detection to terminal to be detected.
To realize the above method, the embodiment of the invention also provides a kind of automatic detection devices, as shown in Fig. 2, described
Device includes:
Acquiring unit 21, for executing the first application when needing to control terminal to be detected in script template operational process
When, obtain first icon of at least one of the terminal interface to be detected;
Determination unit 22, in first icon of at least one of the terminal interface to be detected, it is determining with it is described
First applies corresponding target icon;
Control unit 23 executes first application for controlling the terminal to be detected by the target icon.
It include the first text information in first icon in above scheme;Accordingly,
The acquiring unit 21, is also used to based on each first icon, extracts corresponding with each first icon the
One text information.
It include to apply corresponding second icon with described first in above scheme, in the script template;Described second
It include the second text information in icon;
As shown in figure 3, the determination unit 22, comprising:
First comparison subunit 221, for that will apply corresponding second icon and the second text information with described first, divide
It is not compared with first icon of each of the terminal interface to be detected and the first text information;
First determines subelement 222, for when determining first corresponding second icon of application and the end to be detected
When any first icon in the interface of end is compared successfully, successful first icon will be compared with second icon and be determined as target
Icon;Alternatively,
For when in determining first corresponding second text information of application and the terminal interface to be detected
When any first text information is compared successfully, successful first text information corresponding will be compared with second text information
One icon is determined as target icon.
Alternatively, as shown in figure 4, the determination unit 22, comprising:
First comparison subunit 221, for that will apply corresponding second icon and the second text information with described first, divide
It is not compared with first icon of each of the terminal interface to be detected and the first text information;
First determines subelement 222, for when determining first corresponding second icon of application and the end to be detected
Hold interface in any first icon compare failure, and determine it is described first application corresponding second text information with it is described
When any first text information in terminal interface to be detected compares failure, obtain in icon library, with described first using corresponding
All third icons;It include third text information in third icon;
Second comparison subunit 223, for will described first apply corresponding each third icon and third text information,
It is compared respectively with first icon of each of the terminal interface to be detected and the first text information;
Second determines subelement 224, for when the determining first corresponding third icon of application and the end to be detected
When any first icon in the interface of end is compared successfully, successful first icon will be compared with the third icon and be determined as target
Icon;Alternatively,
When determine it is described first application corresponding third text information and the terminal interface to be detected in any first
When text information is compared successfully, it is true that corresponding first icon of successful first text information will be compared with the third text information
It is set to target icon.
In above scheme, as shown in figure 5, described control unit 23 includes:
Subelement 231 is replaced, for the second icon in the script template to be replaced with target icon;
Subelement 232 is controlled, executes first application for controlling the terminal to be detected by the target icon.
The acquiring unit 21, determination unit 22 and control unit 23 can be run on computer, can be by being located at meter
Central processing unit (CPU) or microprocessor (MPU) or digital signal processor (DSP) or programmable gate array on calculation machine
(FPGA) it realizes.
In embodiment one provided herein, it should be understood that described Installation practice is only schematic
, for example, the division of the unit, only a kind of logical function partition, there may be another division manner in actual implementation,
Such as: multiple units or components can combine, or be desirably integrated into another system, or some features can be ignored or not executed.
Based on this, the embodiment of the invention also provides another division and combinations, as the following examples described in two, by following
Device described in embodiment two realizes automated detection method described in the embodiment of the present invention.
Embodiment two
The embodiment of the invention provides the concrete methods of realizing of an automated detection method based on automated detection system,
Described device includes: control module, automatic test module, script generator module;
Wherein, the control module for connect, drive, auto-control test module, with by the automation survey
Die trial block realizes the automatic detection process to terminal to be detected;The control module can be realized by computer, comprising: from
Dynamicization detection instrument software systems, icon library, icon comparative device etc.;The icon library and icon comparative device can be to described automatic
Change the icon information that is fed back of detection module and the processing such as is analyzed, saved.
The automatic test module mainly executes the instruction that control module issues, and corresponding with image by itself
Acquire the Image Acquisition submodule of function, such as camera acquires the icon in terminal interface to be detected, and by collected figure
Mark feeds back to control module;For example, the automatic test module can be realized by the robot with image collecting function.
The script generator module is for generating script template, wherein the script template is to use automatic test
The general test case step script that module writes, this general test case step script is described in the present embodiment
Script template namely test template;On the basis of this test template, the UI icon in terminal to be detected need to only be replaced to pre-
Execution using corresponding icon, a test script that is complete, being adapted to terminal to be detected can be generated;Here, it replaces
UI icon be pre-execution application, the corresponding icon in terminal to be detected.
The terminal to be detected is the mobile terminal with UI icon.
Below based on device described in embodiment two, the automated detection method described in the embodiment of the present invention is done further
It explains;
Fig. 6 is the flow diagram of the specific implementation of two automated detection method of the embodiment of the present invention;As shown in fig. 6, institute
The method of stating includes:
Step 601: the script template in script generator module is imported in control module;
Step 602: after the control module receives the script template, being issued described in operation to automatic test module
The instruction of script template;
Step 603: the automatic test module is based on described instruction, calls the script template in the control module,
And the script template is run in itself;
Step 604: the automatic detection module is during running the script template, when needing to control end to be detected
End execute first in application, the automatic test module drive itself Image Acquisition submodule, acquire end to be detected
Hold all first UI icons in interface;It include to apply corresponding 2nd UI icon with described first in the script template;
It include the second text information in the 2nd UI icon;
Step 605: collected all first UI icons are sent to the control module by the automatic test module
Icon comparative device in;
Step 606: the icon comparative device of the control module is based on all first UI icons, is extracted by OCR technique every
First text information corresponding to one the oneth UI icon;
Step 607: the icon comparative device of the control module applies corresponding 2nd UI icon and second for described first
Text information, respectively in the terminal interface to be detected every one first UI icon and the first text information compare;
Step 608: when the icon comparative device of the control module determine it is described first application corresponding 2nd UI icon with
Any first UI icon in the terminal interface to be detected compares failure, and determines that described first applies corresponding described second
When any first text information in text information and the terminal interface to be detected compares unsuccessfully, to the figure of the control module
Library is marked to obtain with described first using corresponding all 3rd UI icons;It include third text information in 3rd UI icon;
Step 609: the icon comparative device of the control module by it is described first application corresponding each 3rd UI icon and
Third text information is compared with first UI icon of each of the terminal interface to be detected and the first text information respectively;
Step 610: when the icon comparative device of the control module determine it is described first application corresponding 3rd UI icon with
When any first UI icon in the terminal interface to be detected is compared successfully, successful first is compared with the 3rd UI icon
UI icon is target icon;Alternatively,
When the icon comparative device of the control module determine it is described first application corresponding third text information and it is described to
When any first text information in detection terminal interface is compared successfully, successful first text is compared with the third text information
The corresponding first UI icon of this information is target icon;
Step 611: the message for carrying the target icon is sent to institute by the icon comparative device in the control module
It states in automatic detection module;
Step 612: the second icon in the script template is replaced with target icon by the automatic detection module;
Step 613: the automatic detection module is controlled described in the terminal execution to be detected by the target icon
First application, to realize the normal operation of script template.
It here, is icon library described in immediate updating, to lay the foundation for subsequent comparison, the present embodiment the method is also wrapped
It includes:
Successful first icon will be compared with the third icon, i.e. target icon is stored in the icon library, with more
The new icon library;Alternatively,
The third text information is compared into corresponding first icon of successful first text information, i.e. target icon stores
In the icon library, to update the icon library.
It should be understood by those skilled in the art that, the embodiment of the present invention can provide as method, system or computer program
Product.Therefore, the shape of hardware embodiment, software implementation or embodiment combining software and hardware aspects can be used in the present invention
Formula.Moreover, the present invention, which can be used, can use storage in the computer that one or more wherein includes computer usable program code
The form for the computer program product implemented on medium (including but not limited to magnetic disk storage and optical memory etc.).
The present invention be referring to according to the method for the embodiment of the present invention, the process of equipment (system) and computer program product
Figure and/or block diagram describe.It should be understood that every one stream in flowchart and/or the block diagram can be realized by computer program instructions
The combination of process and/or box in journey and/or box and flowchart and/or the block diagram.It can provide these computer programs
Instruct the processor of general purpose computer, special purpose computer, Embedded Processor or other programmable data processing devices to produce
A raw machine, so that being generated by the instruction that computer or the processor of other programmable data processing devices execute for real
The device for the function of being specified in present one or more flows of the flowchart and/or one or more blocks of the block diagram.
These computer program instructions, which may also be stored in, is able to guide computer or other programmable data processing devices with spy
Determine in the computer-readable memory that mode works, so that it includes referring to that instruction stored in the computer readable memory, which generates,
Enable the manufacture of device, the command device realize in one box of one or more flows of the flowchart and/or block diagram or
The function of being specified in multiple boxes.
These computer program instructions also can be loaded onto a computer or other programmable data processing device, so that counting
Series of operation steps are executed on calculation machine or other programmable devices to generate computer implemented processing, thus in computer or
The instruction executed on other programmable devices is provided for realizing in one or more flows of the flowchart and/or block diagram one
The step of function of being specified in a box or multiple boxes.
The above is only the embodiment of the embodiment of the present invention, it is noted that for the ordinary skill of the art
For personnel, without departing from the principles of the embodiments of the present invention, can also make several improvements and retouch, these improve and
Retouching also should be regarded as the protection scope of the embodiment of the present invention.
Claims (8)
1. a kind of automated detection method, which is characterized in that the described method includes:
In script template operational process, first is executed in application, obtaining the end to be detected when needing to control terminal to be detected
Hold the first icon of at least one of interface;
It is determining to apply corresponding target figure with described first in first icon of at least one of the terminal interface to be detected
Mark;
The terminal to be detected, which is controlled, by the target icon executes first application;
It wherein, include to apply corresponding second icon with described first in the script template, it is described to pass through the target figure
The mark control terminal to be detected executes first application, comprising:
The second icon in the script template is replaced with into target icon;
The terminal to be detected, which is controlled, by the target icon executes first application.
2. the method according to claim 1, wherein including the first text information in first icon;
It is accordingly, described to obtain first icon of at least one of the terminal interface to be detected, comprising:
Obtain first icon of at least one of the terminal interface to be detected;
Based on each the first icon, the first text information corresponding with each first icon is extracted.
3. according to the method described in claim 2, it is characterized in that, including in the script template and first application pair
The second icon answered;It include the second text information in second icon;
It is described in first icon of at least one of the terminal interface to be detected, it is determining with the corresponding mesh of first application
It marks on a map, comprising:
It will be with the first application corresponding second icon and second text information, respectively and in the terminal interface to be detected
Each first icon and the first text information compare;
When determining that corresponding second icon of first application compares with any first icon in the terminal interface to be detected
When success, comparing successful first icon with second icon is target icon;Alternatively,
When determine it is described first application corresponding second text information and the terminal interface to be detected in any first
When text information is compared successfully, comparing corresponding first icon of successful first text information with second text information is
Target icon.
4. according to the method described in claim 2, it is characterized in that, including in the script template and first application pair
The second icon answered;It include the second text information in second icon;
It is described in first icon of at least one of the terminal interface to be detected, it is determining with the corresponding mesh of first application
It marks on a map, comprising:
It will be with the first application corresponding second icon and second text information, respectively and in the terminal interface to be detected
Each first icon and the first text information compare;
When determining that corresponding second icon of first application compares with any first icon in the terminal interface to be detected
Failure, and determine first corresponding second text information of application and any first in the terminal interface to be detected
It when text information compares failure, obtains in icon library, apply corresponding all third icons with described first;It is wrapped in third icon
Contain third text information;
By the first application corresponding each third icon and the third text information, respectively and in the terminal interface to be detected
Each first icon and the first text information compare;
When determining that the corresponding third icon of first application compares with any first icon in the terminal interface to be detected
When success, comparing successful first icon with the third icon is target icon;Alternatively,
When determine it is described first application corresponding third text information and the terminal interface to be detected in any first text
When information comparison success, comparing corresponding first icon of successful first text information with the third text information is target
Icon.
5. a kind of automatic detection device, which is characterized in that described device includes:
Acquiring unit, for executing first in application, obtaining when needing to control terminal to be detected in script template operational process
First icon of at least one of the terminal interface to be detected;
Determination unit, in first icon of at least one of the terminal interface to be detected, determination to be answered with described first
With corresponding target icon;
Control unit executes first application for controlling the terminal to be detected by the target icon;
It wherein, include to apply corresponding second icon with described first in the script template, described control unit includes:
Subelement is replaced, for the second icon in the script template to be replaced with target icon;
Subelement is controlled, executes first application for controlling the terminal to be detected by the target icon.
6. device according to claim 5, which is characterized in that include the first text information in first icon;It is right
Ying Di,
The acquiring unit is also used to extract the first text corresponding with each first icon based on each first icon
Information.
7. device according to claim 6, which is characterized in that include in the script template and first application pair
The second icon answered;It include the second text information in second icon;
The determination unit, comprising:
First comparison subunit, for will with it is described first application corresponding second icon and the second text information, respectively with institute
It states first icon of each of terminal interface to be detected and the first text information compares;
First determines subelement, for when in determining first corresponding second icon of application and the terminal interface to be detected
Any first icon when comparing successfully, successful first icon will be compared with second icon and be determined as target icon;Or
Person,
For when determining described first using corresponding second text information and any in the terminal interface to be detected
When first text information is compared successfully, corresponding first figure of successful first text information will be compared with second text information
Mark is determined as target icon.
8. device according to claim 6, which is characterized in that include in the script template and first application pair
The second icon answered;It include the second text information in second icon;
The determination unit, comprising:
First comparison subunit, for will with it is described first application corresponding second icon and the second text information, respectively with institute
It states first icon of each of terminal interface to be detected and the first text information compares;
First determines subelement, for when in determining first corresponding second icon of application and the terminal interface to be detected
Any first icon compare failure, and determine the first application corresponding second text information and end to be detected
When any first text information in interface being held to compare failure, obtain in icon library, with described first using corresponding all the
Three icons;It include third text information in third icon;
Second comparison subunit, for will described first apply corresponding each third icon and third text information, respectively with
First icon of each of the terminal interface to be detected and the first text information compare;
Second determines subelement, for when in the determining first corresponding third icon of application and the terminal interface to be detected
Any first icon when comparing successfully, successful first icon will be compared with the third icon and be determined as target icon;Or
Person,
When determine it is described first application corresponding third text information and the terminal interface to be detected in any first text
When information comparison success, corresponding first icon of successful first text information will be compared with the third text information and will be determined as
Target icon.
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)
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)
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)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US7092995B2 (en) * | 2002-06-25 | 2006-08-15 | Microsoft Corporation | Testing distributed applications |
-
2014
- 2014-12-12 CN CN201410773731.XA patent/CN105740141B/en active Active
Patent Citations (4)
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 |
---|---|---|
CN106528424B (en) | Test method and test platform based on background system service or interface | |
CN107766194A (en) | Method of testing, device, system, terminal device and computer-readable recording medium | |
CN104778124A (en) | Automatic testing method for software application | |
CN107733985B (en) | Method and device for deploying functional components of cloud computing system | |
CN107203473A (en) | The automatization test system and method for automatic expansion interface test case | |
CN107133174A (en) | Test case code automatically generating device and method | |
CN108897724A (en) | Function schedule determines method and device | |
CN109408367A (en) | A kind of method and terminal of the control element identifying interactive interface | |
CN105095088A (en) | Calculator automatic test method and test system based on uiautomator test framework | |
CN106383764A (en) | Data acquisition method and device | |
CN104246702A (en) | Workflow compilation | |
CN110347407A (en) | A kind of method, apparatus, computer equipment and medium obtaining EMS memory occupation amount | |
CN111651365B (en) | Automatic interface testing method and device | |
CN106777036A (en) | A kind of data rendering method and data render system | |
CN105279092A (en) | Software testing method and apparatus | |
CN105740141B (en) | A kind of automated detection method and its device | |
CN107357721B (en) | Method and device for testing system | |
CN105550114A (en) | Automated testing method and apparatus and mobile terminal | |
CN106919501A (en) | Static Analysis Method and instrument based on defect mode | |
CN109753976A (en) | Corpus labeling device and method | |
CN112269588B (en) | Algorithm upgrading method, device, terminal and computer readable storage medium | |
CN104182348A (en) | Software test method and device | |
CN110673874B (en) | Method, storage medium, and apparatus for changing configuration of wizard programming software | |
CN109144840A (en) | A kind of test method, device and its equipment | |
CN105867894A (en) | Automatic creating method and system of development environment |
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 |