CN106021108A - Application program testing device, mobile terminal and method - Google Patents

Application program testing device, mobile terminal and method Download PDF

Info

Publication number
CN106021108A
CN106021108A CN201610338641.7A CN201610338641A CN106021108A CN 106021108 A CN106021108 A CN 106021108A CN 201610338641 A CN201610338641 A CN 201610338641A CN 106021108 A CN106021108 A CN 106021108A
Authority
CN
China
Prior art keywords
application program
target area
program picture
similarity
picture
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Granted
Application number
CN201610338641.7A
Other languages
Chinese (zh)
Other versions
CN106021108B (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.)
Nubia Technology Co Ltd
Original Assignee
Nubia Technology 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 Nubia Technology Co Ltd filed Critical Nubia Technology Co Ltd
Priority to CN201610338641.7A priority Critical patent/CN106021108B/en
Publication of CN106021108A publication Critical patent/CN106021108A/en
Application granted granted Critical
Publication of CN106021108B publication Critical patent/CN106021108B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/36Preventing errors by testing or debugging software
    • G06F11/3668Software testing
    • G06F11/3672Test management
    • G06F11/3684Test management for test design, e.g. generating new test cases
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/36Preventing errors by testing or debugging software
    • G06F11/3668Software testing
    • G06F11/3672Test management
    • G06F11/3688Test management for test execution, e.g. scheduling of test suites

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Computer Hardware Design (AREA)
  • Quality & Reliability (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Stored Programmes (AREA)
  • Telephone Function (AREA)

Abstract

The invention discloses an application program testing method. The method comprises the following steps: acquiring a target region with pixel values in a display interface of a mobile terminal matched with that of a prestored application program picture; acquiring similarity of the target region and the application program picture; when the similarity of the target region and the application program picture is greater than a preset similar threshold, executing an appointed operation in the target region, and performing corresponding testing on the application program according to the appointed operation. The invention further discloses an application program testing device and the mobile terminal. The problem that the control cannot be used for testing the application program is solved, the testing convenience and accuracy of the mobile terminal to the application program are improved.

Description

Application testing device, mobile terminal and method
Technical field
The present invention relates to mobile terminal device technical field, particularly relate to a kind of Application testing device, mobile terminal and method.
Background technology
In the application development of mobile terminal, application program is carried out test is requisite, such as, tests the user interface (User Interface, UI) of application program.The test mode of application program is included: (1) tester craft testing results to verify the correctness of application program, but, this method of testing is very time-consuming, and error-prone, reduces accuracy, very inconvenient.(2) the test frame automatization of application program is used to carry out UI test, such as, by obtaining the snapshot at current UI interface, it is provided that each application program control on mobile terminals is checked at a visual interface.Search control and mainly search control according to attribute informations such as resource ID, word, index, class name and bag names, but in some application programs such as browser, game, whole interface is one piece of painting canvas, cannot be according to attribute information orient control, thus control cannot be quoted application program is tested, the most convenient.
Summary of the invention
Present invention is primarily targeted at a kind of Application testing device of offer, mobile terminal and method, it is intended to improve convenience and accuracy that application program is tested by mobile terminal.
For achieving the above object, the invention provides a kind of Application testing device, including:
Target area acquisition module, the target area that the pixel value in the display interface obtaining mobile terminal mates with the pixel value of the application program picture prestored;
Similarity acquisition module, for obtaining the similarity of described target area and described application program picture;
Test module, for when described target area is more than preset similar threshold value with the similarity of described application program picture, performs assigned operation in described target area, tests application program accordingly according to described assigned operation.
Alternatively, when described application program picture is tetragon, described target area acquisition module includes:
Matching unit, for obtaining the pixel value of edge specified pixel point in described application program picture, mates with each pixel value in described display interface successively by the pixel value of described specified pixel point;
Determine unit, for when the pixel value that there is corresponding pixel points in described display interface is consistent with the pixel value of described specified pixel point, obtain the number that region that described corresponding pixel points formed is identical with pixel value in described application program picture, regions most for same number is defined as described target area.
Alternatively, described similarity acquisition module is additionally operable to, obtain the grey level histogram of described target area and described application program picture respectively, according to the grey level histogram of described target area Yu described application program picture, obtained the similarity of described target area and described application program picture by Pasteur's Coefficient Algorithm.
Alternatively, described similarity acquisition module includes:
Area division unit, for being divided into multiple region by the most corresponding with described application program picture for described target area, sets the weighted value of regional;
Acquiring unit, for obtaining the grey level histogram of regional in described target area and described application program picture respectively, according to described target area and the grey level histogram of regional in described application program picture, obtain described target area and the similarity of regional in described application program picture;
Similarity acquiring unit, obtains the similarity of described target area and described application program picture for the similarity according to described regional and weighted value.
Additionally, for achieving the above object, present invention also offers a kind of mobile terminal, described mobile terminal includes the Application testing device of said structure.
Additionally, for achieving the above object, present invention also offers a kind of applied program testing method, including:
Obtain the target area that the pixel value in the display interface of mobile terminal mates with the pixel value of the application program picture prestored;
Obtain the similarity of described target area and described application program picture;
When described target area is more than preset similar threshold value with the similarity of described application program picture, in described target area, performs assigned operation, according to described assigned operation, application program is tested accordingly.
Alternatively, when described application program picture is tetragon, the pixel value in the display interface of described acquisition mobile terminal includes with the step of the target area that the pixel value of the application program picture prestored mates:
Obtain the pixel value of edge specified pixel point in described application program picture, the pixel value of described specified pixel point is mated successively with each pixel value in described display interface;
When the pixel value that there is corresponding pixel points in described display interface is consistent with the pixel value of described specified pixel point, obtain the number that region that described corresponding pixel points formed is identical with pixel value in described application program picture, regions most for same number is defined as described target area.
Alternatively, the described target area of described acquisition includes with the step of the similarity of described application program picture:
Obtain the grey level histogram of described target area and described application program picture respectively, according to the grey level histogram of described target area Yu described application program picture, obtained the similarity of described target area and described application program picture by Pasteur's Coefficient Algorithm.
Alternatively, the described grey level histogram obtaining described target area and described application program picture respectively, according to the grey level histogram of described target area Yu described application program picture, the step obtaining described target area and the similarity of described application program picture includes:
It is divided into multiple region by the most corresponding with described application program picture for described target area, sets the weighted value of regional;
Obtain described target area and the grey level histogram of regional in described application program picture respectively, according to described target area and the grey level histogram of regional in described application program picture, obtain described target area and the similarity of regional in described application program picture;
Similarity according to described regional and weighted value obtain the similarity of described target area and described application program picture.
Alternatively, described when described target area is more than preset similar threshold value with the similarity of described application program picture, in described target area, perform assigned operation, include according to the step that application program is tested by described assigned operation accordingly:
When described target area is more than preset similar threshold value with the similarity of described application program picture, obtain the central area of described target area, in described central area, perform assigned operation, according to described assigned operation, application program is tested accordingly.
Embodiment of the present invention mobile terminal, when testing application program, by obtaining the target area that the pixel value in display interface mates with the pixel value of the application program picture prestored, then obtains the similarity of this target area and application program picture.When the similarity obtained is more than preset similar threshold value, by performing assigned operation in the target area determined, application program is tested accordingly.Make mobile terminal pass through pixel value coupling and can be accurately positioned application program position in display interface, solve and cannot quote the problem that application program is tested by control, improve convenience and accuracy that application program is tested by mobile terminal.
Accompanying drawing explanation
Fig. 1 is the hardware architecture diagram realizing each one optional mobile terminal of embodiment of the present invention;
Fig. 2 is the radio communication device schematic diagram of mobile terminal as shown in Figure 1;
Fig. 3 is the module diagram of Application testing device first embodiment of the present invention;
Fig. 4 is the schematic diagram of the application program picture that mobile terminal of the present invention prestores;
Fig. 5 is the schematic diagram of mobile terminal display interface of the present invention;
Fig. 6 is the module diagram of target area acquisition module in Application testing device of the present invention;
Fig. 7 is the module diagram of similarity acquisition module in Application testing device of the present invention;
Fig. 8 is the schematic flow sheet of applied program testing method first embodiment of the present invention;
Fig. 9 is in applied program testing method of the present invention, obtains the schematic flow sheet of the target area that the pixel value in the display interface of mobile terminal mates with the pixel value of the application program picture prestored;
Figure 10 is in applied program testing method of the present invention, obtains the schematic flow sheet of target area and the similarity of application program picture.
The realization of the object of the invention, functional characteristics and advantage will in conjunction with the embodiments, are described further referring to the drawings.
Detailed description of the invention
Should be appreciated that specific embodiment described herein, only in order to explain the present invention, is not intended to limit the present invention.
The mobile terminal realizing each embodiment of the present invention is described referring now to accompanying drawing.In follow-up description, use the suffix being used for representing such as " module ", " parts " or " unit " of element only for the explanation of the beneficially present invention, itself do not have specific meaning.Therefore, " module " can mixedly use with " parts ".
Mobile terminal can be implemented in a variety of manners.Such as, the terminal described in the present invention can include mobile terminal and the fixed terminal of such as numeral TV, desk computer etc. of such as mobile phone, notebook computer, PDA (personal digital assistant), PAD (panel computer), guider etc..Hereinafter it is assumed that terminal is mobile terminal.However, it will be understood by those skilled in the art that, in addition to being used in particular for the element of mobile purpose, structure according to the embodiment of the present invention can also apply to the terminal of fixed type.
Fig. 1 is the hardware architecture diagram realizing each one optional mobile terminal of embodiment of the present invention.
Mobile terminal 100 can include wireless communication unit 110, interface unit 120, user input unit 130, output unit 140, memorizer 150, controller 160 and power subsystem 170 etc..Fig. 1 shows the mobile terminal with various assembly, it should be understood that be not required for implementing all assemblies illustrated.Can alternatively implement more or less of assembly.Will be discussed in more detail below the element of mobile terminal.
Wireless communication unit 110 generally includes one or more assembly, and it allows the radio communication between mobile terminal 100 and radio communication device or network.Such as, at least one during wireless communication unit can include mobile communication module 111, wireless Internet module 112 and short range communication module 113.
Mobile communication module 111 sends radio signals at least one in base station (such as, access point, node B etc.), exterior terminal and server and/or receives from it radio signal.Such radio signal can include voice call signal, video calling signal or the various types of data sending according to text and/or Multimedia Message and/or receiving.
Wireless Internet module 112 supports the Wi-Fi (Wireless Internet Access) of mobile terminal.This module can internally or externally be couple to terminal.Wi-Fi (Wireless Internet Access) technology involved by this module can include WLAN (WLAN) (Wi-Fi), Wibro (WiMAX), Wimax (worldwide interoperability for microwave access), HSDPA (high-speed downlink packet access) etc..
Short range communication module 113 is the module for supporting junction service.Some examples of short-range communication technology include bluetoothTM, RF identification (RFID), Infrared Data Association (IrDA), ultra broadband (UWB), purple honeybeeTMEtc..
User input unit 130 can generate key input data to control the various operations of mobile terminal according to the order of user's input.User input unit 130 allows user to input various types of information, and can include keyboard, metal dome, trigger board (such as, detection due to touched and cause resistance, pressure, the sensitive component of change of electric capacity etc.), roller, rocking bar etc..Especially, when trigger board is superimposed upon on display unit 141 as a layer, triggering screen can be formed.
Interface unit 120 is used as at least one external device (ED) and is connected, with mobile terminal 100, the interface that can pass through.Such as, external device (ED) can include wired or wireless head-band earphone port, external power source (or battery charger) port, wired or wireless FPDP, memory card port, have the port of device of identification module, audio frequency input/output (I/O) port, video i/o port, ear port etc. for connecting.Identification module can be that storage is for verifying that user uses the various information of mobile terminal 100 and can include subscriber identification module (UIM), client identification module (SIM), Universal Subscriber identification module (USIM) etc..It addition, the device (hereinafter referred to as " identification device ") with identification module can be to take the form of smart card, therefore, identify that device can be connected with mobile terminal 100 via port or other attachment means.Interface unit 120 may be used for receiving from the input (such as, data message, electric power etc.) of external device (ED) and the one or more elements input received being transferred in mobile terminal 100 or may be used for transmitting data between mobile terminal and external device (ED).
Additionally, when mobile terminal 100 is connected with external base, interface unit 120 can serve as allowing to provide the path of mobile terminal 100 or can serve as to allow from the various command signals of base input from base electric power by it and is transferred to the path of mobile terminal by it.May serve as identifying whether mobile terminal is accurately fitted within the signal base from various command signals or the electric power of base input.Output unit 140 is configured to provide output signal (such as, audio signal, video signal, vibration signal etc.) with vision, audio frequency and/or tactile manner.
Output unit 140 can include that display unit 141, display unit 141 may be displayed on the information processed in mobile terminal 100.Such as, when mobile terminal 100 is in telephone calling model, display unit 141 can show the user interface (UI) relevant with call or other communicate (such as, text messaging, multimedia file download etc.) or graphic user interface (GUI).When mobile terminal 100 is in video calling pattern or image capture mode, display unit 141 can show image and/or the image of reception, UI or GUI illustrating video or image and correlation function etc. of capture.
Meanwhile, when display unit 141 and trigger board the most superposed on one another with formed trigger screen time, display unit 141 can serve as input equipment and output device.Display unit 141 can include at least one in liquid crystal display (LCD), thin film transistor (TFT) LCD (TFT-LCD), Organic Light Emitting Diode (OLED) display, flexible display, three-dimensional (3D) display etc..Some in these display may be constructed such that transparence to allow user to watch from outside, this is properly termed as transparent display, and typical transparent display can for example, TOLED (transparent organic light emitting diode) display etc..According to the specific embodiment wanted, mobile terminal 100 can include two or more display units (or other display device), such as, mobile terminal can include outernal display unit (not shown) and inner display unit (not shown).Trigger screen can be used for detection triggering input pressure and trigger input position and trigger input area.
Memorizer 150 can store the process performed by controller 160 and control the software program etc. of operation
Deng, or can temporarily store the data (such as, telephone directory, message, still image, video etc.) that oneself maybe will export through output.And, memorizer 150 can be with storage about when triggering the vibration and the data of audio signal being applied to the various modes of output when triggering is shielded.
Memorizer 150 can include the storage medium of at least one type, described storage medium includes flash memory, hard disk, multimedia card, card-type memorizer (such as, SD or DX memorizer etc.), random access storage device (RAM), static random-access memory (SRAM), read only memory (ROM), Electrically Erasable Read Only Memory (EEPROM), programmable read only memory (PROM), magnetic storage, disk, CD etc..And, mobile terminal 100 can be connected the network storage device of the storage function performing memorizer 150 and cooperate with by network.
Controller 160 generally controls the overall operation of mobile terminal.Such as, controller 160 performs the control relevant to voice call, data communication, video calling etc. and process.It addition, controller 160 can include the multi-media module 161 for reproducing (or playback) multi-medium data, multi-media module 161 can construct in controller 160, or it is so structured that separates with controller 160.Controller 160 can perform pattern recognition process, to be identified as character or image by drawing input in the handwriting input or picture triggering execution on screen.
Power subsystem 170 receives external power or internal power under the control of controller 160 and provides the suitable electric power operated needed for each element and assembly.
Various embodiment described herein can be implemented to use such as computer software, hardware or its any combination of computer-readable medium.Hardware is implemented, embodiment described herein can be by using application-specific IC (ASIC), digital signal processor (DSP), digital signal processing device (DSPD), programmable logic device (PLD), field programmable gate array (FPGA), processor, controller, microcontroller, microprocessor, being designed to perform at least one in the electronic unit of function described herein and implement, in some cases, such embodiment can be implemented in controller 160.Implementing for software, the embodiment of such as process or function can be implemented with allowing the single software module performing at least one function or operation.Software code can be implemented by the software application (or program) write with any suitable programming language, and software code can be stored in memorizer 150 and be performed by controller 160.
So far, oneself is through describing mobile terminal according to its function.Below, for the sake of brevity, the slide type mobile terminal in the various types of mobile terminals that will describe such as folded form, board-type, oscillating-type, slide type mobile terminal etc. is as example.Therefore, the present invention can be applied to any kind of mobile terminal, and is not limited to slide type mobile terminal.
Mobile terminal 100 may be constructed such that utilization operates via frame or the most wired and radio communication device of packet transmission data and satellite-based communicator as shown in Figure 1.
The communicator being wherein operable to according to the mobile terminal of the present invention is described referring now to Fig. 2.
Such communicator can use different air interfaces and/or physical layer.Such as, the air interface used by communicator includes such as frequency division multiple access (FDMA), time division multiple acess (TDMA), CDMA (CDMA) and universal mobile communications device (UMTS) (especially, Long Term Evolution (LTE)), global mobile communication device (GSM) etc..As non-limiting example, explained below relates to cdma communication device, but such teaching is equally applicable to other type of device.
With reference to Fig. 2, cdma wireless communication device can include multiple mobile terminal 100, multiple base station (BS) 270, base station controller (BSC) 275 and mobile switching centre (MSC) 280.MSC280 is configured to form interface with Public Switched Telephony Network (PSTN) 290.MSC280 is also structured to and the BSC275 formation interface that can be couple to base station 270 via back haul link.If back haul link can construct according to any one in the interface that Ganji knows, described interface includes such as E1/T1, ATM, IP, PPP, frame relay, HDSL, ADSL or xDSL.It will be appreciated that device as shown in Figure 2 can include multiple BSC275.
Each BS270 can service one or more subregion (or region), by each subregion of multidirectional antenna or the antenna covering pointing to specific direction radially away from BS270.Or, each subregion can be covered by two or more antennas for diversity reception.Each BS270 may be constructed such that support multiple frequencies distribution, and the distribution of each frequency has specific frequency spectrum (such as, 1.25MHz, 5MHz etc.).
Intersecting that subregion and frequency are distributed can be referred to as CDMA Channel.BS270 can also be referred to as the sub-device of base station transceiver (BTS) or other equivalent terms.In this case, term " base station " may be used for broadly representing single BSC275 and at least one BS270.Base station can also be referred to as " cellular station ".Or, each subregion of specific BS270 can be referred to as multiple cellular station.
As shown in Figure 2, broadcast singal is sent in device the mobile terminal 100 operated by broadcsting transmitter (BT) 295.In fig. 2 it is shown that several global pick devices (GPS) satellite 300.Satellite 300 helps to position at least one in multiple mobile terminals 100.
In fig. 2, depict multiple satellite 300, but it is understood that, it is possible to use any number of satellite obtains useful location information.Substitute GPS tracking technique or outside GPS tracking technique, it is possible to use other technology of the position of mobile terminal can be followed the tracks of.It addition, at least one gps satellite 300 can optionally or additionally process satellite dmb transmission.
As a typical operation of radio communication device, BS270 receives the reverse link signal from various mobile terminals 100.Mobile terminal 100 generally participates in call, information receiving and transmitting communicates with other type of.Each reverse link signal that certain base station 270 receives is processed in specific BS270.The data obtained are forwarded to the BSC275 being correlated with.BSC provides call resource distribution and the mobile management function of the coordination of soft switching process included between BS270.The data received also are routed to MSC280 by BSC275, and it provides the extra route service for forming interface with PSTN290.Similarly, PSTN290 Yu MSC280 forms interface, MSC Yu BSC275 forms interface, and BSC275 correspondingly controls BS270 so that forward link signals to be sent to mobile terminal 100.
Based on above-mentioned mobile terminal hardware configuration, the structure of communicator, each embodiment of the inventive method is proposed.
As shown in Figure 3, it is shown that one Application testing device first embodiment of the present invention.The Application testing device of this embodiment includes:
Target area acquisition module 10, the target area that the pixel value in the display interface obtaining mobile terminal mates with the pixel value of the application program picture prestored;
In the present embodiment, the type of mobile terminal can be configured according to actual needs, and such as, this mobile terminal can include mobile phone, iPad etc..Mobile terminal is previously stored with application program picture, and this application program picture is to need to carry out the picture that the application program tested is corresponding, and this application program picture can intercept in advance in the display interface of this application program place mobile terminal.Such as, the test if desired wechat application program being correlated with, then can intercept the region shown in the display interface of mobile terminal by wechat icon as wechat application program picture.
Before carrying out Application testing, mobile terminal first turns on the display interface at application program place to be tested, the pixel value of the application program picture prestored is compared with the pixel value in this display interface in this display interface by target area acquisition module 10, obtaining the target area that the pixel value in this display interface mates with the pixel value of application program picture, this target area is the position primarily determining that in the display interface of application program place according to application program picture.
It should be noted that, the acquisition of target area can be by each pixel value in display interface one by one with each pixel value in application program picture, if in display interface in certain region of the same size with application program picture, store the number identical with pixel value in application program picture more than predetermined number, this region is then defined as the target area of coupling, and this predetermined number can be configured according to actual needs.Certainly, the acquisition of target area can also be arranged as the case may be and flexibly.
Similarity acquisition module 20, for obtaining the similarity of described target area and described application program picture;
Behind the target area mated with application program picture in determining display interface, similarity acquisition module 20 obtains the similarity of target area and application program picture further, in order to mobile terminal finally determines the region that application program carries out in display interface test operation according to similarity.Specifically, similarity acquisition module 20 can first obtain grey level histogram and the grey level histogram of application program picture of target area, obtains the similarity of target area and application program picture according to grey level histogram, and following example will be described in more detail.
Test module 30, for when described target area is more than preset similar threshold value with the similarity of described application program picture, performs assigned operation in described target area, tests application program accordingly according to described assigned operation.
After similarity between above-mentioned acquisition target area and application program picture, test module 30 judges that whether the similarity between target area and application program picture is more than preset similar threshold value, this preset similar threshold value can be configured as the case may be, such as, similar threshold value may be configured as 90%.If the similarity between target area and application program picture is more than preset similar threshold value, then can determine that application program to be tested position in display interface, now test module 30 can perform assigned operation in target area, tests application program accordingly.This assigned operation may be configured as clicking operation or slide etc., such as, when needing the opening time of camera application program is tested, after determining this camera application program region in display interface according to camera application program picture, clicking operation is carried out in this region, open camera application program, and the opening time of camera application program is carried out timing.
If the similarity between target area and application program picture is less than or equal to preset similar threshold value, then determine that this target area is not for the position in application program place display interface to be tested, the most do not perform assigned operation, need to redefine target area, or in the display interface of mobile terminal, display cannot determine the relevant information of application program position to be tested, to point out tester.
Hereinafter will be illustrated, assume mobile terminal to need the opening time of wechat application program to test, mobile terminal prestores wechat application program picture as shown in Figure 4, the first display interface at mobile terminal display wechat application program place, as shown in Figure 5.The pixel value of the pixel value in display interface with wechat application program picture is compared by mobile terminal, and the target area mated with wechat application program picture in obtaining display interface, to primarily determine that wechat application program position in display interface.Obtain the grey level histogram of target area and wechat application program picture the most respectively, obtain the similarity between target area and wechat application program picture according to the grey level histogram of target area and wechat application program picture.When similarity between target area and wechat application program picture is more than preset similar threshold value, determine that this target area is the position in the display interface of wechat application program place, in target area, now perform clicking operation, wechat application program is opened according to clicking operation, and the opening time of wechat application program is carried out timing, it is achieved that the opening time of wechat application program is tested.
Embodiment of the present invention mobile terminal, when testing application program, by obtaining the target area that the pixel value in display interface mates with the pixel value of the application program picture prestored, then obtains the similarity of this target area and application program picture.When the similarity obtained is more than preset similar threshold value, by performing assigned operation in the target area determined, application program is tested accordingly.Make mobile terminal pass through pixel value coupling and can be accurately positioned application program position in display interface, solve and cannot quote the problem that application program is tested by control, improve convenience and accuracy that application program is tested by mobile terminal.
Further, as shown in Figure 6, based on above-mentioned Application testing device first embodiment, propose Application testing device the second embodiment of the present invention, the present embodiment is with the difference of Application testing device first embodiment of the present invention, first the pixel value of application program picture middle finger fixation vegetarian refreshments is mated with the pixel value in display interface, again the pixel value that each pixel value in the region of coupling is corresponding with application program picture is compared and determine target area, to improve the accuracy obtaining target area.In the present embodiment, above-mentioned target area acquisition module 10 includes:
Matching unit 11, for obtaining the pixel value of edge specified pixel point in described application program picture, mates with each pixel value in described display interface successively by the pixel value of described specified pixel point;
Determine unit 12, for when the pixel value that there is corresponding pixel points in described display interface is consistent with the pixel value of described specified pixel point, obtain the number that region that described corresponding pixel points formed is identical with pixel value in described application program picture, regions most for same number is defined as described target area.
nullIn the present embodiment,During the target area that the target area acquisition module 10 pixel value in obtaining display interface mates with the pixel value of the application program picture prestored,First matching unit 11 is had to obtain the pixel value of edge specified pixel point in application program picture,Such as,When application program picture is tetragon,First matching unit can be according to the size of application program picture,Obtain the pixel value on four summits in this application program picture,Four points that four summits of application program picture are mapped on display interface,The corresponding pixel value of each pixel in traversal display interface,The pixel value on these four summits is mated with each pixel value in display interface simultaneously successively,In judging display interface, the pixel value of corresponding four points is the most consistent with the pixel value on four summits in application program picture,If it is consistent,The quadrilateral area that then in record display interface, the position of corresponding four points is formed,Until completing to travel through each pixel value in display interface.It is of course also possible to the pixel value of application program picture four edges is mated, obtain the target area in display interface, do not limit the present invention.
When record obtains single quadrilateral area, determine that unit 12 can directly determine that this quadrilateral area is target area.It is understandable that, determine that the pixel value that each pixel value in this quadrilateral area is corresponding with application program picture also 12 can be compared by unit one by one, when the number consistent with the pixel value in application program picture when the pixel value in this quadrilateral area is more than predetermined number, this quadrilateral area is defined as target area;When the number consistent with the pixel value in application program picture when the pixel value in this quadrilateral area is less than or equal to predetermined number, illustrating that this quadrilateral area is not target area, this predetermined number can be configured according to actual needs.
When record obtains multiple quadrilateral area, determine that the pixel value that each pixel value in each quadrilateral area in display interface is corresponding with application program picture is compared by unit 12 respectively one by one, obtain the number that the pixel value in each quadrilateral area is consistent with the pixel value in application program picture, quadrilateral areas most for number consistent for pixel value is defined as target area.
It should be noted that when the application program picture prestored in mobile terminal is not tetragon, the target area in corresponding mode can being used to determine display interface according to the concrete shape of application program picture, do not limit the present invention.Such as, when application program picture is circular, the multiple or whole pixel values that can obtain on circular application program image edge circular arc mate, and obtain the target area in display interface.
The pixel value of application program picture middle finger fixation vegetarian refreshments can be mated by the present embodiment mobile terminal with the pixel value in display interface, then compared by the pixel value that each pixel value in the region of coupling is corresponding with application program picture and determine target area.Make mobile terminal can determine target area according to the comparison of pixel value, improve the accuracy that target area determines.
Further, based on above-mentioned Application testing device first embodiment, propose Application testing device the 3rd embodiment of the present invention, the present embodiment is with the difference of Application testing device first embodiment of the present invention, grey level histogram according to target area Yu application program picture, the similarity between target area and application program picture is obtained, to improve the convenience that application program is tested by mobile terminal by Pasteur's Coefficient Algorithm.In the present embodiment, above-mentioned similarity acquisition module 20 is additionally operable to, obtain the grey level histogram of described target area and described application program picture respectively, according to the grey level histogram of described target area Yu described application program picture, obtained the similarity of described target area and described application program picture by Pasteur's Coefficient Algorithm.
In the present embodiment, mobile terminal is during obtaining the target area similarity with application program picture, first obtained the gray value of each pixel in target area by similarity acquisition module 20, obtain the grey level histogram of target area according to the gray value of each pixel in target area.Such as, can obtain gray value according to gray value algorithm, gray value algorithm is gray=0.299*R+0.587*G+0.114*B, wherein, gray is the gray value of pixel, and R is the red color component value of pixel, G is the green component values of pixel, and B is the blue color component value of pixel.And, similarity acquisition module 20 obtains the gray value of each pixel in application program picture, obtains the grey level histogram of application program picture according to the gray value of each pixel in application program picture.
Then, similarity acquisition module 20, according to the grey level histogram of target area Yu application program picture, obtains the similarity between target area and application program picture by Pasteur's Coefficient Algorithm.This Pasteur's Coefficient Algorithm is:
s i m i l a r i t y = Σ n = 1 n h i s t o g r a m 1 ( n ) t o t a l 1 * h i s t o g r a m 2 ( n ) t o t a l 2 ,
Wherein, similarity is similarity, and the span of similarity is 0≤similarity≤1;Histogram1 (n) is the 1st the pixel number to the n-th gray value in target area, total1 is pixel number in target area, histogram2 (n) is the 1st the pixel number to the n-th gray value in application program picture, and total2 is pixel number in application program picture.
Specifically, similarity acquisition module 20 obtains the pixel number of each gray value and the first ratio of pixel sum according to the grey level histogram of target area;And the pixel number of each gray value and the second ratio of pixel sum is obtained according to the grey level histogram of target area.Carry out the numerical value sum obtained by evolution after being multiplied respectively by second ratio of the first ratio of each gray value of target area with application program each gray value of picture, be set as the similarity between target area and application program picture.
The present embodiment mobile terminal is according to the grey level histogram of target area Yu application program picture, the similarity between target area and application program picture is obtained by Pasteur's Coefficient Algorithm, so that mobile terminal positions application program position in display interface according to similarity, improve convenience and accuracy that application program is tested by mobile terminal.
Further, as shown in Figure 7, based on above-mentioned Application testing device the 3rd embodiment, propose Application testing device the 4th embodiment of the present invention, the present embodiment is with the difference of Application testing device the 3rd embodiment of the present invention, it is divided into multiple region by the most corresponding with application program picture for target area, and set the weighted value of regional, similarity according to regional and weighted value obtain the similarity of target area and application program picture, improve the accuracy that similarity obtains.In the present embodiment, above-mentioned similarity acquisition module 20 includes:
Area division unit 21, for being divided into multiple region by the most corresponding with described application program picture for described target area, sets the weighted value of regional;
Acquiring unit 22, for obtaining the grey level histogram of regional in described target area and described application program picture respectively, according to described target area and the grey level histogram of regional in described application program picture, obtain described target area and the similarity of regional in described application program picture;
Similarity acquiring unit 23, obtains the similarity of described target area and described application program picture for the similarity according to described regional and weighted value.
In the present embodiment, in order to improve the accuracy determining application program position in display interface according to similarity further, behind the above-mentioned target area determined in display interface, area division unit 21 can be divided into multiple region by the most corresponding with application program picture for target area, can divide according to features such as the size of application program picture and shapes, such as, when application program picture is tetragon, target area and application program picture are respectively divided into 9 regions or 4 regions.Then setting corresponding weighted value for regional, owing to feature to be matched is predominantly located at the medium position of application program picture, the weighted value that can arrange zone line is high, and the weighted value of marginal area is low, and the weighted value summation of regional is 1.Such as, when application program picture is divided into 9 regions, the 8 region weight values arranging edge are 0.1, and the weighted value in a middle region is 0.2.
By target area the most corresponding with application program picture be divided into multiple region after, acquiring unit 22 obtains target area and the gray value of regional in application program picture respectively, target area and the grey level histogram of regional in application program picture is obtained respectively according to target area and the gray value of regional in application program picture, according to target area and the grey level histogram of regional in application program picture, obtain target area and the similarity of regional in application program picture by above-mentioned Pasteur's Coefficient Algorithm.Then similarity acquiring unit 23 is sued for peace after the similarity obtaining each region being multiplied with corresponding weighted value the numerical value obtained, and is set as the similarity of target area and application program picture.Such as, when application program picture is divided into first area and second area, the weighted value of first area is 0.8 and the weighted value of second area is 0.2, the similarity in the region that first area is corresponding with target area is 90%, the similarity in the region that second area is corresponding with target area is 60%, then target area is 0.8*90%+0.2*60%=84% with the similarity of application program picture.
The present embodiment mobile terminal is divided into multiple region by the most corresponding with application program picture for target area, and set the weighted value of regional, similarity according to regional and weighted value obtain the similarity of target area and application program picture, improve the accuracy that similarity obtains.
Further, based on above-mentioned Application testing device any embodiment, propose Application testing device the 5th embodiment of the present invention, the present embodiment is with the difference of Application testing device any embodiment of the present invention, obtain the central area of target area, in this central area, perform assigned operation application program is tested accordingly, improve the effectiveness that application program in display interface is operated.In the present embodiment, above-mentioned test module 30 is additionally operable to, when described target area is more than preset similar threshold value with the similarity of described application program picture, obtain the central area of described target area, in described central area, perform assigned operation, according to described assigned operation, application program is tested accordingly.
In this enforcement, after the above-mentioned similarity obtaining target area and application program picture, when target area is more than preset similar threshold value with the similarity of application program picture, test module 30 carries out during application program tested by assigned operation accordingly in target area, in order to improve the effectiveness that application program in display interface is operated, now, test module 30 can first obtain the central area of target area, the big I of this central area is configured according to actual needs, such as, the central area of target area could be arranged to the central pixel point of target area.Then in this central area, perform the assigned operations such as click, pressing or slip, according to assigned operation, application program is tested accordingly, it is achieved that application program is carried out the test of automatization.
The present embodiment mobile terminal can obtain the central area of target area, performs assigned operation and tests application program accordingly, improve the effectiveness operating application program in display interface in this central area.
Accordingly, proposing one mobile terminal of the present invention, this mobile terminal includes the Application testing device of said structure, and the operation principle of this Application testing device and implementation can refer to the embodiment of Fig. 3 to Fig. 7 and correspondence thereof, containing all technical characteristics therein, therefore not to repeat here.This mobile terminal can be mobile phone, iPad etc..In mobile terminal embodiment of the present invention, owing to there is above-mentioned mobile terminal when application program is tested, by obtaining the target area that the pixel value in display interface mates with the pixel value of the application program picture prestored, then obtain the similarity of this target area and application program picture.When the similarity obtained is more than preset similar threshold value, by performing assigned operation in the target area determined, application program is tested accordingly.Make mobile terminal pass through pixel value coupling and can be accurately positioned application program position in display interface, solve and cannot quote the problem that application program is tested by control, improve convenience and accuracy that application program is tested by mobile terminal.
Accordingly, as shown in Figure 8, one applied program testing method first embodiment of the present invention is proposed.The present embodiment applied program testing method is corresponding with above-mentioned Application testing device first embodiment, and the applied program testing method of this embodiment includes:
Step S10, the target area mated with the pixel value of the application program picture prestored of pixel value obtained in the display interface of mobile terminal;
In the present embodiment, the type of mobile terminal can be configured according to actual needs, and such as, this mobile terminal can include mobile phone, iPad etc..Mobile terminal is previously stored with application program picture, and this application program picture is to need to carry out the picture that the application program tested is corresponding, and this application program picture can intercept in advance in the display interface of this application program place mobile terminal.Such as, the test if desired wechat application program being correlated with, then can intercept the region shown in the display interface of mobile terminal by wechat icon as wechat application program picture.
Before carrying out Application testing, mobile terminal first turns on the display interface at application program place to be tested, in this display interface, the pixel value of the application program picture prestored is compared with the pixel value in this display interface, obtaining the target area that the pixel value in this display interface mates with the pixel value of application program picture, this target area is the position primarily determining that in the display interface of application program place according to application program picture.
It should be noted that, the acquisition of target area can be by each pixel value in display interface one by one with each pixel value in application program picture, if in display interface in certain region of the same size with application program picture, store the number identical with pixel value in application program picture more than predetermined number, this region is then defined as the target area of coupling, and this predetermined number can be configured according to actual needs.Certainly, the acquisition of target area can also be arranged as the case may be and flexibly.
Step S20, obtain the similarity of described target area and described application program picture;
Behind the target area mated with application program picture in determining display interface, obtain further the similarity of target area and application program picture, in order to mobile terminal finally determines the region that application program carries out in display interface test operation according to similarity.Specifically, mobile terminal can first obtain grey level histogram and the grey level histogram of application program picture of target area, obtains the similarity of target area and application program picture according to grey level histogram, and following example will be described in more detail.
Step S30, when the similarity of described target area and described application program picture is more than preset similar threshold value, in described target area, perform assigned operation, according to described assigned operation, application program tested accordingly.
After similarity between above-mentioned acquisition target area and application program picture, mobile terminal judges that whether the similarity between target area and application program picture is more than preset similar threshold value, this preset similar threshold value can be configured as the case may be, such as, similar threshold value may be configured as 90%.If the similarity between target area and application program picture is more than preset similar threshold value, then can determine that application program to be tested position in display interface, now can perform assigned operation in target area, application program is tested accordingly.This assigned operation may be configured as clicking operation or slide etc., such as, when needing the opening time of camera application program is tested, after determining this camera application program region in display interface according to camera application program picture, clicking operation is carried out in this region, open camera application program, and the opening time of camera application program is carried out timing.
If the similarity between target area and application program picture is less than or equal to preset similar threshold value, then determine that this target area is not for the position in application program place display interface to be tested, the most do not perform assigned operation, need to redefine target area, or in the display interface of mobile terminal, display cannot determine the relevant information of application program position to be tested, to point out tester.
Hereinafter will be illustrated, assume mobile terminal to need the opening time of wechat application program to test, mobile terminal prestores wechat application program picture as shown in Figure 4, the first display interface at mobile terminal display wechat application program place, as shown in Figure 5.The pixel value of the pixel value in display interface with wechat application program picture is compared by mobile terminal, and the target area mated with wechat application program picture in obtaining display interface, to primarily determine that wechat application program position in display interface.Obtain the grey level histogram of target area and wechat application program picture the most respectively, obtain the similarity between target area and wechat application program picture according to the grey level histogram of target area and wechat application program picture.When similarity between target area and wechat application program picture is more than preset similar threshold value, determine that this target area is the position in the display interface of wechat application program place, in target area, now perform clicking operation, wechat application program is opened according to clicking operation, and the opening time of wechat application program is carried out timing, it is achieved that the opening time of wechat application program is tested.
Embodiment of the present invention mobile terminal, when testing application program, by obtaining the target area that the pixel value in display interface mates with the pixel value of the application program picture prestored, then obtains the similarity of this target area and application program picture.When the similarity obtained is more than preset similar threshold value, by performing assigned operation in the target area determined, application program is tested accordingly.Make mobile terminal pass through pixel value coupling and can be accurately positioned application program position in display interface, solve and cannot quote the problem that application program is tested by control, improve convenience and accuracy that application program is tested by mobile terminal.
Further, as it is shown in figure 9, based on above-mentioned applied program testing method first embodiment, it is proposed that applied program testing method the second embodiment of the present invention, the present embodiment applied program testing method is corresponding with above-mentioned Application testing device the second embodiment.The present embodiment is with the difference of applied program testing method first embodiment of the present invention, first the pixel value of application program picture middle finger fixation vegetarian refreshments is mated with the pixel value in display interface, again the pixel value that each pixel value in the region of coupling is corresponding with application program picture is compared and determine target area, to improve the accuracy obtaining target area.In the present embodiment, above-mentioned steps S10 includes:
Step S11, obtain the pixel value of edge specified pixel point in described application program picture, the pixel value of described specified pixel point is mated successively with each pixel value in described display interface;
Step S12, when the pixel value that there is corresponding pixel points in described display interface is consistent with the pixel value of described specified pixel point, obtain the number that region that described corresponding pixel points formed is identical with pixel value in described application program picture, regions most for same number is defined as described target area.
nullIn the present embodiment,During the target area that mobile terminal pixel value in obtaining display interface mates with the pixel value of the application program picture prestored,First the pixel value of edge specified pixel point in application program picture is obtained,Such as,When application program picture is tetragon,First mobile terminal can be according to the size of application program picture,Obtain the pixel value on four summits in this application program picture,Four points that four summits of application program picture are mapped on display interface,The corresponding pixel value of each pixel in traversal display interface,The pixel value on these four summits is mated with each pixel value in display interface simultaneously successively,In judging display interface, the pixel value of corresponding four points is the most consistent with the pixel value on four summits in application program picture,If it is consistent,The quadrilateral area that then in record display interface, the position of corresponding four points is formed,Until completing to travel through each pixel value in display interface.It is of course also possible to the pixel value of application program picture four edges is mated, obtain the target area in display interface, do not limit the present invention.
When record obtains single quadrilateral area, determine that this quadrilateral area is target area.It is understandable that, the pixel value that each pixel value in this quadrilateral area is corresponding with application program picture can also be compared one by one, when the number consistent with the pixel value in application program picture when the pixel value in this quadrilateral area is more than predetermined number, this quadrilateral area is defined as target area;When the number consistent with the pixel value in application program picture when the pixel value in this quadrilateral area is less than or equal to predetermined number, illustrating that this quadrilateral area is not target area, this predetermined number can be configured according to actual needs.
When record obtains multiple quadrilateral area, respectively the pixel value that each pixel value in each quadrilateral area in display interface is corresponding with application program picture is compared one by one, obtain the number that the pixel value in each quadrilateral area is consistent with the pixel value in application program picture, quadrilateral areas most for number consistent for pixel value is defined as target area.
It should be noted that when the application program picture prestored in mobile terminal is not tetragon, the target area in corresponding mode can being used to determine display interface according to the concrete shape of application program picture, do not limit the present invention.Such as, when application program picture is circular, the multiple or whole pixel values that can obtain on circular application program image edge circular arc mate, and obtain the target area in display interface.
The pixel value of application program picture middle finger fixation vegetarian refreshments can be mated by the present embodiment mobile terminal with the pixel value in display interface, then compared by the pixel value that each pixel value in the region of coupling is corresponding with application program picture and determine target area.Make mobile terminal can determine target area according to the comparison of pixel value, improve the accuracy that target area determines.
Further, based on above-mentioned applied program testing method first embodiment, it is proposed that applied program testing method the 3rd embodiment of the present invention, the present embodiment applied program testing method is corresponding with above-mentioned Application testing device the 3rd embodiment.The present embodiment is with the difference of applied program testing method first embodiment of the present invention, grey level histogram according to target area Yu application program picture, the similarity between target area and application program picture is obtained, to improve the convenience that application program is tested by mobile terminal by Pasteur's Coefficient Algorithm.In the present embodiment, above-mentioned steps S20 includes: obtain the grey level histogram of described target area and described application program picture respectively, according to the grey level histogram of described target area Yu described application program picture, obtained the similarity of described target area and described application program picture by Pasteur's Coefficient Algorithm.
In the present embodiment, mobile terminal, during obtaining the target area similarity with application program picture, first obtains the gray value of each pixel in target area, obtains the grey level histogram of target area according to the gray value of each pixel in target area.Such as, can obtain gray value according to gray value algorithm, gray value algorithm is gray=0.299*R+0.587*G+0.114*B, wherein, gray is the gray value of pixel, and R is the red color component value of pixel, G is the green component values of pixel, and B is the blue color component value of pixel.And, obtain the gray value of each pixel in application program picture, obtain the grey level histogram of application program picture according to the gray value of each pixel in application program picture.
Then, mobile terminal, according to the grey level histogram of target area Yu application program picture, obtains the similarity between target area and application program picture by Pasteur's Coefficient Algorithm.This Pasteur's Coefficient Algorithm is:
s i m i l a r i t y = Σ n = 1 n h i s t o g r a m 1 ( n ) t o t a l 1 * h i s t o g r a m 2 ( n ) t o t a l 2 ,
Wherein, similarity is similarity, and the span of similarity is 0≤similarity≤1;Histogram1 (n) is the 1st the pixel number to the n-th gray value in target area, total1 is pixel number in target area, histogram2 (n) is the 1st the pixel number to the n-th gray value in application program picture, and total2 is pixel number in application program picture.
Specifically, mobile terminal obtains the pixel number of each gray value and the first ratio of pixel sum according to the grey level histogram of target area;And the pixel number of each gray value and the second ratio of pixel sum is obtained according to the grey level histogram of target area.Carry out the numerical value sum obtained by evolution after being multiplied respectively by second ratio of the first ratio of each gray value of target area with application program each gray value of picture, be set as the similarity between target area and application program picture.
The present embodiment mobile terminal is according to the grey level histogram of target area Yu application program picture, the similarity between target area and application program picture is obtained by Pasteur's Coefficient Algorithm, so that mobile terminal positions application program position in display interface according to similarity, improve convenience and accuracy that application program is tested by mobile terminal.
Further, as shown in Figure 10, based on above-mentioned applied program testing method the 3rd embodiment, it is proposed that applied program testing method the 4th embodiment of the present invention, the present embodiment applied program testing method is corresponding with above-mentioned Application testing device the 4th embodiment.The present embodiment is with the difference of applied program testing method the 3rd embodiment of the present invention, it is divided into multiple region by the most corresponding with application program picture for target area, and set the weighted value of regional, similarity according to regional and weighted value obtain the similarity of target area and application program picture, improve the accuracy that similarity obtains.In the present embodiment, above-mentioned steps S20 includes:
Step S21, it is divided into multiple region by the most corresponding with described application program picture for described target area, sets the weighted value of regional;
Step S22, obtain the grey level histogram of regional in described target area and described application program picture respectively, according to described target area and the grey level histogram of regional in described application program picture, obtain described target area and the similarity of regional in described application program picture;
Step S23, obtain the similarity of described target area and described application program picture according to the similarity of described regional and weighted value.
In the present embodiment, in order to improve the accuracy determining application program position in display interface according to similarity further, behind the above-mentioned target area determined in display interface, multiple region can be divided into by the most corresponding with application program picture for target area, can divide according to features such as the size of application program picture and shapes, such as, when application program picture is tetragon, target area and application program picture are respectively divided into 9 regions or 4 regions.Then setting corresponding weighted value for regional, owing to feature to be matched is predominantly located at the medium position of application program picture, the weighted value that can arrange zone line is high, and the weighted value of marginal area is low, and the weighted value summation of regional is 1.Such as, when application program picture is divided into 9 regions, the 8 region weight values arranging edge are 0.1, and the weighted value in a middle region is 0.2.
By target area the most corresponding with application program picture be divided into multiple region after, obtain target area and the gray value of regional in application program picture respectively, target area and the grey level histogram of regional in application program picture is obtained respectively according to target area and the gray value of regional in application program picture, according to target area and the grey level histogram of regional in application program picture, obtain target area and the similarity of regional in application program picture by above-mentioned Pasteur's Coefficient Algorithm.Then sue for peace after the similarity obtaining each region being multiplied with corresponding weighted value the numerical value obtained, be set as the similarity of target area and application program picture.Such as, when application program picture is divided into first area and second area, the weighted value of first area is 0.8 and the weighted value of second area is 0.2, the similarity in the region that first area is corresponding with target area is 90%, the similarity in the region that second area is corresponding with target area is 60%, then target area is 0.8*90%+0.2*60%=84% with the similarity of application program picture.
The present embodiment mobile terminal is divided into multiple region by the most corresponding with application program picture for target area, and set the weighted value of regional, similarity according to regional and weighted value obtain the similarity of target area and application program picture, improve the accuracy that similarity obtains.
Further, based on above-mentioned applied program testing method any embodiment, it is proposed that applied program testing method the 5th embodiment of the present invention, the present embodiment applied program testing method is corresponding with above-mentioned Application testing device the 5th embodiment.The present embodiment is with the difference of applied program testing method any embodiment of the present invention, obtain the central area of target area, in this central area, perform assigned operation application program is tested accordingly, improve the effectiveness that application program in display interface is operated.In the present embodiment, above-mentioned steps S30 includes: when described target area is more than preset similar threshold value with the similarity of described application program picture, obtain the central area of described target area, in described central area, perform assigned operation, according to described assigned operation, application program is tested accordingly.
In this enforcement, after the above-mentioned similarity obtaining target area and application program picture, when target area is more than preset similar threshold value with the similarity of application program picture, carry out during application program tested by assigned operation accordingly in target area, in order to improve the effectiveness that application program in display interface is operated, now, mobile terminal can first obtain the central area of target area, the big I of this central area is configured according to actual needs, such as, the central area of target area could be arranged to the central pixel point of target area.Then in this central area, perform the assigned operations such as click, pressing or slip, according to assigned operation, application program is tested accordingly, it is achieved that application program is carried out the test of automatization.
The present embodiment mobile terminal can obtain the central area of target area, performs assigned operation and tests application program accordingly, improve the effectiveness operating application program in display interface in this central area.
Through the above description of the embodiments, those skilled in the art is it can be understood that can add the mode of required general hardware platform by software to above-described embodiment method and realize, can certainly pass through hardware, but a lot of in the case of the former is more preferably embodiment.Based on such understanding, the part that prior art is contributed by technical scheme the most in other words can embody with the form of software product, this computer software product is stored in a storage medium (such as ROM/RAM, magnetic disc, CD), including some instructions with so that a station terminal equipment (can be mobile phone, computer, server, air-conditioner, or the network equipment etc.) perform the method described in each embodiment of the present invention.
These are only the alternative embodiment of the present invention; not thereby the scope of the claims of the present invention is limited; every equivalent structure utilizing description of the invention and accompanying drawing content to be made or equivalence flow process conversion; or directly or indirectly it is used in other relevant technical fields, the most in like manner it is included in the scope of patent protection of the present invention.

Claims (10)

1. an Application testing device, it is characterised in that described Application testing device includes:
Target area acquisition module, pixel value in obtaining the display interface of mobile terminal with prestore The target area of the pixel value coupling of application program picture;
Similarity acquisition module, for obtaining the similarity of described target area and described application program picture;
Test module, for when described target area and the similarity of described application program picture are more than preset Similar threshold value time, in described target area perform assigned operation, according to described assigned operation to application Program is tested accordingly.
2. Application testing device as claimed in claim 1, it is characterised in that when described application journey When sequence picture is tetragon, described target area acquisition module includes:
Matching unit, for obtaining the pixel value of edge specified pixel point in described application program picture, will The pixel value of described specified pixel point mates successively with each pixel value in described display interface;
Determine unit, for when there is the pixel value of corresponding pixel points and described finger in described display interface When the pixel value of fixation vegetarian refreshments is consistent, obtain region and described application journey that described corresponding pixel points is formed The number that in sequence picture, pixel value is identical, is defined as described target area by regions most for same number.
3. Application testing device as claimed in claim 1, it is characterised in that described similarity obtains Delivery block is additionally operable to, and obtains the grey level histogram of described target area and described application program picture respectively, According to the grey level histogram of described target area Yu described application program picture, obtained by Pasteur's Coefficient Algorithm Take the similarity of described target area and described application program picture.
4. Application testing device as claimed in claim 3, it is characterised in that described similarity obtains Delivery block includes:
Area division unit, for dividing the most corresponding with described application program picture for described target area For multiple regions, set the weighted value of regional;
Acquiring unit, for obtaining described target area and regional in described application program picture respectively Grey level histogram, straight with the gray scale of regional in described application program picture according to described target area Fang Tu, obtains described target area and the similarity of regional in described application program picture;
Similarity acquiring unit, obtains described mesh for the similarity according to described regional and weighted value Mark region and the similarity of described application program picture.
5. a mobile terminal, it is characterised in that described mobile terminal includes as claim 1-4 is arbitrary Application testing device described in Xiang.
6. an applied program testing method, it is characterised in that described applied program testing method includes:
Obtain the pixel value of the pixel value in the display interface of mobile terminal and the application program picture prestored The target area joined;
Obtain the similarity of described target area and described application program picture;
When described target area is more than preset similar threshold value with the similarity of described application program picture, In described target area, perform assigned operation, according to described assigned operation, application program is carried out accordingly Test.
7. applied program testing method as claimed in claim 6, it is characterised in that described acquisition is moved The target area that pixel value in the display interface of terminal mates with the pixel value of the application program picture prestored Step include:
Obtain the pixel value of edge specified pixel point in described application program picture, by described specified pixel point Pixel value and described display interface in each pixel value mate successively;
Pixel when the pixel value Yu described specified pixel point that there is corresponding pixel points in described display interface When being worth consistent, obtain region and pixel value in described application program picture that described corresponding pixel points is formed Identical number, is defined as described target area by regions most for same number.
8. applied program testing method as claimed in claim 6, it is characterised in that described in described acquisition Target area includes with the step of the similarity of described application program picture:
Obtain the grey level histogram of described target area and described application program picture respectively, according to described mesh Mark region and the grey level histogram of described application program picture, obtain described target by Pasteur's Coefficient Algorithm Region and the similarity of described application program picture.
9. applied program testing method as claimed in claim 8, it is characterised in that described obtain respectively Described target area and the grey level histogram of described application program picture, according to described target area with described The grey level histogram of application program picture, obtains described target area similar to described application program picture The step of degree includes:
It is divided into multiple region by the most corresponding with described application program picture for described target area, sets each The weighted value in individual region;
Obtain described target area and the grey level histogram of regional in described application program picture respectively, According to described target area and the grey level histogram of regional in described application program picture, obtain described Target area and the similarity of regional in described application program picture;
Similarity and weighted value according to described regional obtain described target area and described application program The similarity of picture.
10. the applied program testing method as described in any one of claim 6-9, it is characterised in that institute State when described target area is more than preset similar threshold value with the similarity of described application program picture, Perform assigned operation in described target area, according to described assigned operation, application program is surveyed accordingly The step of examination includes:
When described target area is more than preset similar threshold value with the similarity of described application program picture, Obtain the central area of described target area, in described central area, perform assigned operation, according to described Application program is tested by assigned operation accordingly.
CN201610338641.7A 2016-05-19 2016-05-19 application testing device, mobile terminal and method Active CN106021108B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201610338641.7A CN106021108B (en) 2016-05-19 2016-05-19 application testing device, mobile terminal and method

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201610338641.7A CN106021108B (en) 2016-05-19 2016-05-19 application testing device, mobile terminal and method

Publications (2)

Publication Number Publication Date
CN106021108A true CN106021108A (en) 2016-10-12
CN106021108B CN106021108B (en) 2018-11-20

Family

ID=57096292

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201610338641.7A Active CN106021108B (en) 2016-05-19 2016-05-19 application testing device, mobile terminal and method

Country Status (1)

Country Link
CN (1) CN106021108B (en)

Cited By (13)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106502891A (en) * 2016-10-19 2017-03-15 广州视源电子科技股份有限公司 Automatic detection method and device for user interface
CN108664364A (en) * 2017-03-31 2018-10-16 腾讯科技(深圳)有限公司 A kind of terminal test method and device
CN109117358A (en) * 2017-06-23 2019-01-01 百度在线网络技术(北京)有限公司 test method and test device for electronic equipment
CN110308346A (en) * 2019-06-24 2019-10-08 中国航空无线电电子研究所 Cockpit display system automatic test approach and system based on image recognition
CN110738185A (en) * 2019-10-23 2020-01-31 腾讯科技(深圳)有限公司 Form object identification method and device and storage medium
CN110765015A (en) * 2019-10-24 2020-02-07 北京云聚智慧科技有限公司 Method for testing application to be tested and electronic equipment
CN111079793A (en) * 2019-11-21 2020-04-28 北京云聚智慧科技有限公司 Icon similarity determining method and electronic equipment
CN111124902A (en) * 2019-12-12 2020-05-08 腾讯科技(深圳)有限公司 Object operating method and device, computer-readable storage medium and electronic device
CN111143188A (en) * 2018-11-02 2020-05-12 中移(杭州)信息技术有限公司 Method and equipment for automatically testing application
CN111309617A (en) * 2020-02-21 2020-06-19 北京字节跳动网络技术有限公司 Application program control method and device, storage medium and electronic equipment
CN111858356A (en) * 2020-07-23 2020-10-30 北京首汽智行科技有限公司 UI automatic testing method based on image recognition technology
CN112559314A (en) * 2019-09-26 2021-03-26 上海汽车集团股份有限公司 Testing method and testing device for human-computer interaction interface
CN113094257A (en) * 2021-03-08 2021-07-09 上海硬通网络科技有限公司 Application testing method and device and electronic equipment

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20020087935A1 (en) * 2000-12-29 2002-07-04 Evans David J. Method and apparatus for finding variable length data patterns within a data stream
CN104866414A (en) * 2014-02-24 2015-08-26 腾讯科技(深圳)有限公司 Method, device and system for testing application program
CN105138255A (en) * 2015-06-24 2015-12-09 努比亚技术有限公司 Terminal and image information acquisition method
CN105302413A (en) * 2015-10-14 2016-02-03 惠州Tcl移动通信有限公司 UI test method and system for control

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20020087935A1 (en) * 2000-12-29 2002-07-04 Evans David J. Method and apparatus for finding variable length data patterns within a data stream
CN104866414A (en) * 2014-02-24 2015-08-26 腾讯科技(深圳)有限公司 Method, device and system for testing application program
CN105138255A (en) * 2015-06-24 2015-12-09 努比亚技术有限公司 Terminal and image information acquisition method
CN105302413A (en) * 2015-10-14 2016-02-03 惠州Tcl移动通信有限公司 UI test method and system for control

Cited By (19)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106502891B (en) * 2016-10-19 2019-05-17 广州视源电子科技股份有限公司 Automatic detection method and device for user interface
CN106502891A (en) * 2016-10-19 2017-03-15 广州视源电子科技股份有限公司 Automatic detection method and device for user interface
CN108664364A (en) * 2017-03-31 2018-10-16 腾讯科技(深圳)有限公司 A kind of terminal test method and device
CN109117358A (en) * 2017-06-23 2019-01-01 百度在线网络技术(北京)有限公司 test method and test device for electronic equipment
CN111143188A (en) * 2018-11-02 2020-05-12 中移(杭州)信息技术有限公司 Method and equipment for automatically testing application
CN111143188B (en) * 2018-11-02 2023-09-22 中移(杭州)信息技术有限公司 Method and equipment for automatically testing application
CN110308346A (en) * 2019-06-24 2019-10-08 中国航空无线电电子研究所 Cockpit display system automatic test approach and system based on image recognition
CN110308346B (en) * 2019-06-24 2021-10-26 中国航空无线电电子研究所 Automatic testing method and system for cockpit display system based on image recognition
CN112559314A (en) * 2019-09-26 2021-03-26 上海汽车集团股份有限公司 Testing method and testing device for human-computer interaction interface
CN112559314B (en) * 2019-09-26 2024-05-31 上海汽车集团股份有限公司 Testing method and testing device for man-machine interaction interface
CN110738185B (en) * 2019-10-23 2023-07-07 腾讯科技(深圳)有限公司 Form object identification method, form object identification device and storage medium
CN110738185A (en) * 2019-10-23 2020-01-31 腾讯科技(深圳)有限公司 Form object identification method and device and storage medium
CN110765015A (en) * 2019-10-24 2020-02-07 北京云聚智慧科技有限公司 Method for testing application to be tested and electronic equipment
CN111079793A (en) * 2019-11-21 2020-04-28 北京云聚智慧科技有限公司 Icon similarity determining method and electronic equipment
CN111124902A (en) * 2019-12-12 2020-05-08 腾讯科技(深圳)有限公司 Object operating method and device, computer-readable storage medium and electronic device
CN111309617A (en) * 2020-02-21 2020-06-19 北京字节跳动网络技术有限公司 Application program control method and device, storage medium and electronic equipment
CN111858356A (en) * 2020-07-23 2020-10-30 北京首汽智行科技有限公司 UI automatic testing method based on image recognition technology
CN113094257A (en) * 2021-03-08 2021-07-09 上海硬通网络科技有限公司 Application testing method and device and electronic equipment
CN113094257B (en) * 2021-03-08 2024-04-05 上海硬通网络科技有限公司 Application testing method and device and electronic equipment

Also Published As

Publication number Publication date
CN106021108B (en) 2018-11-20

Similar Documents

Publication Publication Date Title
CN106021108A (en) Application program testing device, mobile terminal and method
CN105791581B (en) Application operating method, device and mobile terminal
CN106027791A (en) Mobile terminal and application service switching method
CN105809645A (en) Word display method and device and mobile terminal
CN104750417A (en) Frameless terminal application switching method and frameless terminal
CN106095217A (en) Application sharing apparatus, system and method
CN105978947A (en) Same account number login equipment number control method and mobile terminal
CN106161134A (en) Mobile terminal automation testing method, device and mobile terminal
CN106033570A (en) Mobile payment device and method
CN106375962A (en) Network searching method and mobile terminal
CN105681582A (en) Control color adjusting method and terminal
CN106055230A (en) Application evaluation device, mobile terminal and method
CN106412334A (en) Notification message shielding device and method
CN105871398A (en) Information display method and mobile terminal
CN106791022A (en) A kind of mobile terminal and screenshot method
CN105893490A (en) Picture display device and method
CN105843478A (en) Icon display control method and apparatus for shortcut switch
CN105760055A (en) Mobile terminal and control method thereof
CN106055208A (en) Icon arrangement method and terminal
CN106535228A (en) System upgrading device and method
CN105975500A (en) Data processing method, data statistical system and backstage management system
CN106502526A (en) A kind of back-stage management method and terminal
CN106376004A (en) Information processing method and terminal
CN105898264A (en) Device and method for obtaining image processing manner
CN105955474A (en) Prompting method of application evaluation, and mobile terminal

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