CN105204992A - Test script generating device and method - Google Patents

Test script generating device and method Download PDF

Info

Publication number
CN105204992A
CN105204992A CN201510543958.XA CN201510543958A CN105204992A CN 105204992 A CN105204992 A CN 105204992A CN 201510543958 A CN201510543958 A CN 201510543958A CN 105204992 A CN105204992 A CN 105204992A
Authority
CN
China
Prior art keywords
test script
mobile terminal
test
steering order
mtbf
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN201510543958.XA
Other languages
Chinese (zh)
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 CN201510543958.XA priority Critical patent/CN105204992A/en
Publication of CN105204992A publication Critical patent/CN105204992A/en
Pending legal-status Critical Current

Links

Landscapes

  • Telephone Function (AREA)
  • Mobile Radio Communication Systems (AREA)

Abstract

The invention discloses a test script generating device. The test script generating device comprises a first acquisition module, a second acquisition module and a generation module, wherein the first acquisition module is used for acquiring control instructions corresponding to all test steps in a preset MTBF (mean time between failure) test process; the second acquisition module is used for acquiring identification information of executive controls of the control instructions on the basis of a Uiautomator frame; the generation module is used for generating a test script of the preset MTBF test process according to the control instructions of the preset MTBF test process and the identification information of the executive controls of the control instructions. The invention further discloses a test script generating method. The writing efficiency of the test script can be improved.

Description

Test script generating apparatus and method
Technical field
The present invention relates to automatic test field, particularly relate to a kind of test script generating apparatus and method.
Background technology
MTBF (MeanTimeBetweenFailure, mean time between failures) is the index weighing product reliability, specifically, is exactly the Mean Time Between Replacement between adjacent twice fault.For the mobile terminal taking mobile phone as representative, MTBF test is exactly the stability of testing mobile terminal, by the basic function of continuous repeatable operation mobile terminal, check that whether mobile terminal is normal, and in whole test process, whether occurred dodging move back, without respond, reports an error, crash, restart, the fault such as automatic shutdown, and by the number of faults in the calculating test duration, obtain MTBF value, thus the stability of the system of measurement.In prior art, by writing test script, and each steering order performed in test script by mobile terminal simulates staff to the operation of control in user interface, realizes the robotization of MTBF test.But, current method of testing operates control based on coordinate, and the coordinate of the same control of different screen size mobile terminal is different, need the mobile terminal for different screen size again to write test script, cause test script to write efficiency lower.
Summary of the invention
Fundamental purpose of the present invention is to provide a kind of test script generating apparatus and method, and that is intended to raising test script writes efficiency.
For achieving the above object, the invention provides a kind of test script generating apparatus, this test script generating apparatus comprises:
First acquisition module, for obtaining the steering order that in default mean time between failures MTBF testing process, each testing procedure is corresponding;
Second acquisition module, for obtaining the identification information of the execution control of each described steering order based on Uiautomator framework;
Generation module, for the steering order comprised based on described default MTBF testing process, and the identification information of the execution control of each described steering order, generate the test script of described default MTBF testing process.
Preferably, described second acquisition module comprises:
Information acquisition unit, for obtaining the descriptor of the execution control of each described steering order based on Uiautomator framework, wherein, whether described descriptor comprises text message, dimension information, the positional information of control and can click;
Identification generation unit, for respectively based on the descriptor of each described execution control, generates the unique identification information of each described execution control.
Preferably, described test script generating apparatus also comprises:
Script distribution module, for when receiving test instruction, is sent to mobile terminal by described test script, performs the test script received for described mobile terminal, and returns the execution journal performing described test script and generate;
Report generation module, for receiving and generating test report based on the execution journal that described mobile terminal returns.
Preferably, described test script generating apparatus also comprises localization of fault module, for when receiving the execution journal that described mobile terminal returns, obtaining described mobile terminal and performing running log during described test script; And carry out localization of fault based on the described running log obtained.
Preferably, described test script generating apparatus also comprises update module, for when receiving update instruction, and the mapping relations between refresh test step and steering order.
In addition, for achieving the above object, the present invention also provides a kind of test script generation method, and this test script generation method comprises:
Obtain and preset the steering order that in mean time between failures MTBF testing process, each testing procedure is corresponding;
The identification information of the execution control of each described steering order is obtained based on Uiautomator framework;
Based on the steering order that described default MTBF testing process comprises, and the identification information of the execution control of each described steering order, generate the test script of described default MTBF testing process.
Preferably, the described step obtaining the identification information of the execution control of each described steering order based on Uiautomator framework comprises:
Obtain the descriptor of the execution control of each described steering order based on Uiautomator framework, wherein, whether described descriptor comprises text message, dimension information, the positional information of control and can click;
Respectively based on the descriptor of each described execution control, generate the unique identification information of each described execution control.
Preferably, the described steering order comprised based on described default MTBF testing process, and the identification information of the execution control of each described steering order, after generating the step of the test script of described default MTBF testing process, also comprise:
When receiving test instruction, described test script being sent to mobile terminal, performing the test script received for described mobile terminal, and return the execution journal performing described test script and generate;
Receive and generate test report based on the execution journal that described mobile terminal returns.
Preferably, described test script generation method also comprises:
When receiving the execution journal that described mobile terminal returns, obtaining described mobile terminal and performing running log during described test script;
Localization of fault is carried out based on the described running log obtained.
Preferably, described test script generation method also comprises:
When receiving update instruction, the mapping relations between refresh test step and steering order.
The present invention is by carrying out writing of test script based on Uiautomator framework, and the manual action achieved based on control is simulated, and without the need to repeating to write test script for the mobile terminal of different screen size, that effectively can improve test script writes efficiency.
Accompanying drawing explanation
Fig. 1 is the hardware configuration schematic diagram of the mobile terminal realizing each embodiment of the present invention;
Fig. 2 is the wireless communication system schematic diagram of mobile terminal as shown in Figure 1;
Fig. 3 is the high-level schematic functional block diagram of test script generating apparatus first embodiment of the present invention;
Fig. 4 is the topological structure schematic diagram of testing server and mobile terminal in test script generating apparatus the 3rd embodiment of the present invention;
Fig. 5 is the schematic flow sheet of test script generation method first embodiment of the present invention.
The realization of the object of the invention, functional characteristics and advantage will in conjunction with the embodiments, are described further with reference to accompanying drawing.
Embodiment
Should be appreciated that specific embodiment described herein only in order to explain the present invention, be 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 of such as " module ", " parts " or " unit " for representing element only in order to be conducive to explanation of the present invention, itself is specific meaning not.Therefore, " module " and " parts " can mixedly use.
Mobile terminal can be implemented in a variety of manners.Such as, the terminal described in the present invention can comprise the such as mobile terminal of mobile phone, smart phone, notebook computer, digit broadcasting receiver, PDA (personal digital assistant), PAD (panel computer), PMP (portable media player), guider etc. and the fixed terminal of such as digital TV, desk-top computer etc.Below, suppose that terminal is mobile terminal.But it will be appreciated by those skilled in the art that except the element except being used in particular for mobile object, structure according to the embodiment of the present invention also can be applied to the terminal of fixed type.
Fig. 1 is the hardware configuration signal of the mobile terminal realizing each embodiment of the present invention.
Mobile terminal 100 can comprise wireless communication unit 110, A/V (audio/video) input block 120, user input unit 130, sensing cell 140, output unit 150, storer 160, interface unit 170, controller 180 and power supply unit 190 etc.Fig. 1 shows the mobile terminal with various assembly, it should be understood that, does not require to implement all assemblies illustrated.Can alternatively implement more or less 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 wireless communication between mobile terminal 100 and wireless communication system or network.Such as, wireless communication unit can comprise at least one in broadcast reception module 111, mobile communication module 112, wireless Internet module 113, short range communication module 114 and positional information module 115.
Broadcast reception module 111 via broadcast channel from external broadcasting management server receiving broadcast signal and/or broadcast related information.Broadcast channel can comprise satellite channel and/or terrestrial channel.Broadcast management server can be generate and send the server of broadcast singal and/or broadcast related information or the broadcast singal generated before receiving and/or broadcast related information and send it to the server of terminal.Broadcast singal can comprise TV broadcast singal, radio signals, data broadcasting signal etc.And broadcast singal may further include the broadcast singal combined with TV or radio signals.Broadcast related information also can provide via mobile communications network, and in this case, broadcast related information can be received by mobile communication module 112.Broadcast singal can exist in a variety of manners, such as, it can exist with the form of the electronic service guidebooks (ESG) of the electronic program guides of DMB (DMB) (EPG), digital video broadcast-handheld (DVB-H) etc.Broadcast reception module 111 can by using the broadcast of various types of broadcast system Received signal strength.Especially, broadcast reception module 111 can by using such as multimedia broadcasting-ground (DMB-T), DMB-satellite (DMB-S), digital video broadcasting-hand-held (DVB-H), forward link media (MediaFLO ) Radio Data System, received terrestrial digital broadcasting integrated service (ISDB-T) etc. digit broadcasting system receive digital broadcasting.Broadcast reception module 111 can be constructed to be applicable to providing the various broadcast system of broadcast singal and above-mentioned digit broadcasting system.The broadcast singal received via broadcast reception module 111 and/or broadcast related information can be stored in storer 160 (or storage medium of other type).
Radio signal is sent at least one in base station (such as, access point, Node B etc.), exterior terminal and server and/or receives radio signals from it by mobile communication module 112.Various types of data that such radio signal can comprise voice call signal, video calling signal or send according to text and/or Multimedia Message and/or receive.
Wireless Internet module 113 supports the Wi-Fi (Wireless Internet Access) of mobile terminal.This module can be inner or be externally couple to terminal.Wi-Fi (Wireless Internet Access) technology involved by this module can comprise WLAN (WLAN) (Wi-Fi), Wibro (WiMAX), Wimax (worldwide interoperability for microwave access), HSDPA (high-speed downlink packet access) etc.
Short range communication module 114 is the modules for supporting junction service.Some examples of short-range communication technology comprise bluetooth tM, radio-frequency (RF) identification (RFID), Infrared Data Association (IrDA), ultra broadband (UWB), purple honeybee tMetc..
Positional information module 115 is the modules of positional information for checking or obtain mobile terminal.The typical case of positional information module is GPS (GPS).According to current technology, GPS module 115 calculates from the range information of three or more satellite and correct time information and for the Information application triangulation calculated, thus calculates three-dimensional current location information according to longitude, latitude and pin-point accuracy.Current, the method for calculating position and temporal information uses three satellites and by using the error of the position that goes out of an other satellite correction calculation and temporal information.In addition, GPS module 115 can carry out computing velocity information by Continuous plus current location information in real time.
A/V input block 120 is for audio reception or vision signal.A/V input block 120 can comprise camera 121 and microphone 1220, and the view data of camera 121 to the static images obtained by image capture apparatus in Video Capture pattern or image capture mode or video processes.Picture frame after process may be displayed on display unit 151.Picture frame after camera 121 processes can be stored in storer 160 (or other storage medium) or via wireless communication unit 110 and send, and can provide two or more cameras 1210 according to the structure of mobile terminal.Such acoustic processing can via microphones sound (voice data) in telephone calling model, logging mode, speech recognition mode etc. operational mode, and can be voice data by microphone 122.Audio frequency (voice) data after process can be converted to the formatted output that can be sent to mobile communication base station via mobile communication module 112 when telephone calling model.Microphone 122 can be implemented various types of noise and eliminate (or suppress) algorithm and receiving and sending to eliminate (or suppression) noise or interference that produce in the process of sound signal.
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 keyboard, the young sheet of pot, touch pad (such as, detecting the touch-sensitive assembly of the change of the resistance, pressure, electric capacity etc. that cause owing to being touched), roller, rocking bar etc. can be comprised.Especially, when touch pad is superimposed upon on display unit 151 as a layer, touch-screen can be formed.
Sensing cell 140 detects the current state of mobile terminal 100, (such as, mobile terminal 100 open or close state), the position of mobile terminal 100, user for mobile terminal 100 contact (namely, touch input) presence or absence, the orientation of mobile terminal 100, the acceleration or deceleration of mobile terminal 100 move and direction etc., and generate order or the signal of the operation for controlling mobile terminal 100.Such as, when mobile terminal 100 is embodied as sliding-type mobile phone, sensing cell 140 can sense this sliding-type phone and open or close.In addition, whether whether sensing cell 140 can detect power supply unit 190 provides electric power or interface unit 170 to couple with external device (ED).Sensing cell 140 can comprise proximity transducer 1410 and will be described this in conjunction with touch-screen below.
Interface unit 170 is used as at least one external device (ED) and is connected the interface that can pass through with mobile terminal 100.Such as, external device (ED) can comprise wired or wireless head-band earphone port, external power source (or battery charger) port, wired or wireless FPDP, memory card port, for connecting the port, audio frequency I/O (I/O) port, video i/o port, ear port etc. of the device with identification module.Identification module can be that storage uses the various information of mobile terminal 100 for authentication of users and can comprise subscriber identification module (UIM), client identification module (SIM), Universal Subscriber identification module (USIM) etc.In addition, the device (hereinafter referred to " recognition device ") with identification module can take the form of smart card, and therefore, recognition device can be connected with mobile terminal 100 via port or other coupling arrangement.Interface unit 170 may be used for receive from external device (ED) input (such as, data message, electric power etc.) and the input received be transferred to the one or more element in mobile terminal 100 or may be used for transmitting data between mobile terminal and external device (ED).
In addition, when mobile terminal 100 is connected with external base, interface unit 170 can be used as to allow by it electric power to be provided to the path of mobile terminal 100 from base or can be used as the path that allows to be transferred to mobile terminal by it from the various command signals of base input.The various command signal inputted from base or electric power can be used as and identify whether mobile terminal is arranged on the signal base exactly.Output unit 150 is constructed to provide output signal (such as, sound signal, vision signal, alarm signal, vibration signal etc.) with vision, audio frequency and/or tactile manner.Output unit 150 can comprise display unit 151, dio Output Modules 152, alarm unit 153 etc.
Display unit 151 may be displayed on the information of process in mobile terminal 100.Such as, when mobile terminal 100 is in telephone calling model, display unit 151 can show with call or other communicate (such as, text messaging, multimedia file are downloaded etc.) be correlated with user interface (UI) or graphic user interface (GUI).When mobile terminal 100 is in video calling pattern or image capture mode, display unit 151 can the image of display capture and/or the image of reception, UI or GUI that video or image and correlation function are shown etc.
Meanwhile, when display unit 151 and touch pad as a layer superposed on one another to form touch-screen time, display unit 151 can be used as input media and output unit.Display unit 151 can comprise 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 displays can be constructed to transparence and watch from outside to allow user, and this can be called transparent display, and typical transparent display can be such as TOLED (transparent organic light emitting diode) display etc.According to the specific embodiment wanted, mobile terminal 100 can comprise two or more display units (or other display device), such as, mobile terminal can comprise outernal display unit (not shown) and inner display unit (not shown).Touch-screen can be used for detecting touch input pressure and touch input position and touch and inputs area.
When dio Output Modules 152 can be under the isotypes such as call signal receiving mode, call mode, logging mode, speech recognition mode, broadcast reception mode at mobile terminal, voice data convert audio signals that is that wireless communication unit 110 is received or that store in storer 160 and exporting as sound.And dio Output Modules 152 can provide the audio frequency relevant to the specific function that mobile terminal 100 performs to export (such as, call signal receives sound, message sink sound etc.).Dio Output Modules 152 can comprise loudspeaker, hummer etc.
Alarm unit 153 can provide and export that event informed to mobile terminal 100.Typical event can comprise calling reception, message sink, key signals input, touch input etc.Except audio or video exports, alarm unit 153 can provide in a different manner and export with the generation of notification event.Such as, alarm unit 153 can provide output with the form of vibration, when receive calling, message or some other enter communication (incomingcommunication) time, alarm unit 153 can provide sense of touch to export (that is, vibrating) to notify to user.By providing such sense of touch to export, even if when the mobile phone of user is in the pocket of user, user also can identify the generation of various event.Alarm unit 153 also can provide the output of the generation of notification event via display unit 151 or dio Output Modules 152.
Storer 160 software program that can store process and the control operation performed by controller 180 etc., or temporarily can store oneself through exporting the data (such as, telephone directory, message, still image, video etc.) that maybe will export.And, storer 160 can store about when touch be applied to touch-screen time the vibration of various modes that exports and the data of sound signal.
Storer 160 can comprise the storage medium of at least one type, described storage medium comprises flash memory, hard disk, multimedia card, card-type storer (such as, SD or DX storer etc.), random access storage device (RAM), static random-access memory (SRAM), ROM (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 memory function of execute store 160 network storage device with by network cooperates.
Controller 180 controls the overall operation of mobile terminal usually.Such as, controller 180 performs the control relevant to voice call, data communication, video calling etc. and process.In addition, controller 180 can comprise the multi-media module 1810 for reproducing (or playback) multi-medium data, and multi-media module 1810 can be configured in controller 180, or can be configured to be separated with controller 180.Controller 180 can pattern recognition process, is identified as character or image so that input is drawn in the handwriting input performed on the touchscreen or picture.
Power supply unit 190 receives external power or internal power and provides each element of operation and the suitable electric power needed for assembly under the control of controller 180.
Various embodiment described herein can to use such as computer software, the computer-readable medium of hardware or its any combination implements.For hardware implementation, embodiment described herein can 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 at least one performed in the electronic unit of function described herein and implementing, in some cases, such embodiment can be implemented in controller 180.For implement software, the embodiment of such as process or function can be implemented with allowing the independent 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 storer 160 and to be performed by controller 180.
So far, oneself is through the mobile terminal according to its functional description.Below, for the sake of brevity, by the slide type mobile terminal that describes in various types of mobile terminals of such as folded form, board-type, oscillating-type, slide type mobile terminal etc. exemplarily.Therefore, the present invention can be applied to the mobile terminal of any type, and is not limited to slide type mobile terminal.
Mobile terminal 100 as shown in Figure 1 can be constructed to utilize and send the such as wired and wireless communication system of data via frame or grouping and satellite-based communication system operates.
Describe wherein according to the communication system that mobile terminal of the present invention can operate referring now to Fig. 2.
Such communication system can use different air interfaces and/or Physical layer.Such as, the air interface used by communication system comprises such as frequency division multiple access (FDMA), time division multiple access (TDMA) (TDMA), CDMA (CDMA) and universal mobile telecommunications system (UMTS) (especially, Long Term Evolution (LTE)), global system for mobile communications (GSM) etc.As non-limiting example, description below relates to cdma communication system, but such instruction is equally applicable to the system of other type.
With reference to figure 2, cdma wireless communication system can comprise multiple mobile terminal 100, multiple base station (BS) 270, base station controller (BSC) 275 and mobile switching centre (MSC) 280.MSC280 is constructed to form interface with Public Switched Telephony Network (PSTN) 290.MSC280 is also constructed to form interface with the BSC275 that can be couple to base station 270 via back haul link.Back haul link can construct according to any one in some interfaces that oneself knows, described interface comprises such as E1/T1, ATM, IP, PPP, frame relay, HDSL, ADSL or xDSL.Will be appreciated that system as shown in Figure 2 can comprise multiple BSC2750.
Each BS270 can serve one or more subregion (or region), by multidirectional antenna or point to specific direction each subregion of antenna cover radially away from BS270.Or each subregion can by two or more antenna covers for diversity reception.Each BS270 can be constructed to support multiple parallel compensate, and each parallel compensate has specific frequency spectrum (such as, 1.25MHz, 5MHz etc.).
Subregion can be called as CDMA Channel with intersecting of parallel compensate.BS270 also can be called as base station transceiver subsystem (BTS) or other equivalent terms.Under these circumstances, term " base station " may be used for broadly representing single BSC275 and at least one BS270.Base station also can be called as " cellular station ".Or each subregion of particular B S270 can be called as multiple cellular station.
As shown in Figure 2, broadcast singal is sent to the mobile terminal 100 at operate within systems by broadcsting transmitter (BT) 295.Broadcast reception module 111 as shown in Figure 1 is arranged on mobile terminal 100 and sentences the broadcast singal receiving and sent by BT295.In fig. 2, several GPS (GPS) satellite 300 is shown.Satellite 300 helps at least one in the multiple mobile terminal 100 in location.
In fig. 2, depict multiple satellite 300, but understand, the satellite of any number can be utilized to obtain useful locating information.GPS module 115 as shown in Figure 1 is constructed to coordinate to obtain the locating information wanted with satellite 300 usually.Substitute GPS tracking technique or outside GPS tracking technique, can use can other technology of position of tracking mobile terminal.In addition, at least one gps satellite 300 optionally or extraly can process satellite dmb transmission.
As a typical operation of wireless communication system, BS270 receives the reverse link signal from various mobile terminal 100.Mobile terminal 100 participates in call usually, information receiving and transmitting communicates with other type.Each reverse link signal that certain base station 270 receives is processed by particular B S270.The data obtained are forwarded to relevant BSC275.BSC provides call Resourse Distribute and comprises the mobile management function of coordination of the soft switching process between BS270.The data received also are routed to MSC280 by BSC275, and it is provided for the extra route service forming interface with PSTN290.Similarly, PSTN290 and MSC280 forms interface, and MSC and BSC275 forms interface, and BSC275 correspondingly control BS270 so that forward link signals is sent to mobile terminal 100.
Based on above-mentioned mobile terminal hardware configuration and communication system, each embodiment of test script generating apparatus of the present invention is proposed.
With reference to Fig. 3, in the first embodiment of test script generating apparatus of the present invention, described test script generating apparatus comprises:
First acquisition module 10, for obtaining the steering order that in default mean time between failures MTBF testing process, each testing procedure is corresponding;
The test script generating apparatus that the present embodiment provides, MTBF (the MeanTimeBetweenFailure of the mobile terminals such as mobile phone, notebook computer, digit broadcasting receiver, PDA (personal digital assistant), PAD (panel computer), PMP (portable media player) can be applied to, mean time between failures) test in, such as, when the MTBF test carrying out batch mobile phone, test script is write based on Uiautomator framework, can perform for the mobile phone of different screen size, and write test script without the need to repeating.
It should be noted that, different common carriers has respective MTBF testing standard, and such as external AT & T is different with the MTBF testing standard of the China Mobile of China, is specifically embodied by test case.Following examples are described with the mobile terminal based on android system.
Consider that Uiautomator provides the mode of operation based on control and coordinate, can simulated implementation almost UI (UserInterface, user interface) operation of layer all people work, and can the api function of direct calling system, can facilitate and easily test case is converted into test script, therefore, the present embodiment preferably adopts Uiautomator to carry out the exploitation of test script.
MTBF test be the conventional basic function of mobile phone, a whole set of test case can be divided into following a few class by using function: communication class, info class, mail class, browser and download class, multimedia class and individual service class, in addition, also comprise the special test use-case for different mobile phones, such as, for the stability special test use-case of Nubia mobile phone.Comprise again several use-case under each large class, each use-case according to action the need of repeating, and can be divided into several son example again, and finally, son example will become minimum test cell, and sub-example is the set of action, and a son example the inside at least exists an action.It will be appreciated by persons skilled in the art that the action focusing on aforementioned test case being comprised of automatic test by steering order to simulate artificial execution, the set of these steering orders forms test script.
First default test case is split as the set of steering order by the present embodiment, concrete, the stability test flow process that different test cases is corresponding different, and different testing processs comprises different testing procedures, such as, testing process corresponding to the test case of certain testing mobile phone multimedia stability comprises display and the shortcut of master menu, the order of menu, video playback capability service condition three testing procedures.Aforementioned testing procedure can be split as at least one independently action, such as, can be by video playback capability service condition partial resolution: select any program to start to play, click when program is play and suspend, click during program break and play, click when program is play and stop, clicking when program plays stopping and playing, when clicking full frame and program broadcasting when program is play, click the self contained functions such as volume adjusting.Action, after the set whole testing process being split as action, is converted to steering order by the first acquisition module 10.
Second acquisition module 20, for obtaining the identification information of the execution control of each described steering order based on Uiautomator framework;
In the present embodiment, the second acquisition module 20 obtains the identification information of the execution control of each described steering order based on Uiautomator framework.Alternatively, the second acquisition module 20 identifies execution control corresponding to each described steering order by ATM layer relationsATM method and class indexing method, for it distributes unique identification information, thus can according to the operation of identification information realization based on control.
Generation module 30, for the steering order comprised based on described default MTBF testing process, and the identification information of the execution control of each described steering order, generate the test script of described default MTBF testing process.
In the present embodiment, at the first acquisition module 10, test case is split as steering order, second acquisition module 20 and get each described steering order the identification information of execution control after, generation module 30 uses JAVA to carry out writing of test script, finally obtains the test script of jar packet form.It will be appreciated by persons skilled in the art that and the test script write is distributed to mobile terminal, the mobile terminal receiving test script will automatically perform test script, namely automatically perform the test case of MTBF test.
In addition, in order to the execution result of statistical test script, the present embodiment introduces the mechanism of asserting in test script, whether successfully its realization is as follows: judging the operation key point of use-case, insert checkpoint, and preset correct result, as the criterion asserted, when test execution is to corresponding action time, assert that meeting active and preset result match, and provide conclusion.Concrete, the mode asserted has multiple, and the present embodiment mainly adopts the contrast of control, and when control contrast was lost efficacy, additional character String matching, when part NULI character string, adopted the contrast of picture.The result asserted, as action whether successful execution basis for estimation, adds up the result of each action, thus the result of every strip example, finally obtain the result of all use-cases, and obtain the test result of integrated testability use-case.
The test script generating apparatus that the present embodiment provides, writing of test script is carried out based on Uiautomator framework, the manual action achieved based on control is simulated, and without the need to repeating to write test script for the mobile terminal of different screen size, that effectively can improve test script writes efficiency.
Further, based on the first embodiment, propose the second embodiment of test script generating apparatus of the present invention, in the present embodiment, described second acquisition module 20 comprises:
Information acquisition unit, for obtaining the descriptor of the execution control of each described steering order based on Uiautomator framework, wherein, whether described descriptor comprises text message, dimension information, the positional information of control and can click;
Identification generation unit, for respectively based on the descriptor of each described execution control, generates the unique identification information of each described execution control.
In the present embodiment, the function that first information acquisition unit provides based on Uiautomator framework obtains the descriptor of each described steering order, and wherein, whether described descriptor comprises text message, dimension information, the positional information of control and can click.Then identification generation unit is respectively based on the descriptor of each described execution control, generates the unique identification information of each described execution control.Alternatively, the mark of control is performed by such as under type realization:
1, hierarchical relationship method (Indexlist)
All control element of user interface of mobile terminal arrange with hierarchical relationship, such as, a frame comprises two view, wherein first view comprises two button, and each control element has an index, for identifying its position (0-based) in father's element, such as aforementioned two button, if think mark first button, so its Indexlist is exactly: 000, the 0th button element in the 0th view in the 0th frame.
2, class indexing method (ClassIndex)
All control element of user interface of mobile terminal are all classification, and such as frame, view and button etc., can count the number of times that all elements type occurs, and number, such as:
Frame:frame0、frame1、frame2、frame3……
View:view0、view1、view2、view3、view4……
Button:button0、button1、button2、button3……
In time resolving all elements, the element that each appearance one is of the same type, just add up the number of times that this element occurs, this number of times is exactly Classindex, both hierarchical structure flattening is shown.
Further, based on the first or second embodiment, propose the 3rd embodiment of test script generating apparatus of the present invention, in the present embodiment, described test script generating apparatus also comprises:
Script distribution module, for when receiving test instruction, is sent to mobile terminal by described test script, performs the test script received for described mobile terminal, and returns the execution journal performing described test script and generate;
Report generation module, for receiving and generating test report based on the execution journal that described mobile terminal returns.
It should be noted that, the realization of the present embodiment connects based on the communication between testing server and mobile terminal, with reference to Fig. 4, alternatively, enough electric current inputs can be had in order to ensure mobile terminal in the implementation of test script, the present embodiment with the addition of hardware device voltage stabilizer between testing server and mobile terminal, and is responsible for the data interaction between described testing server and described mobile terminal by voltage stabilizer.
With the test case of multimedia stability, the present embodiment is elaborated below:
With reference to Fig. 4, before the test begins, testing server and mobile terminal are established a communications link by voltage stabilizer.The selection interface of the test case that user provides based on testing server at script distribution module is chosen the test case of above-mentioned testing mobile phone multimedia stability, the test case that script distribution module is chosen according to user obtains corresponding test script, and the described test script obtained is sent to mobile terminal.
After test starts, mobile terminal performs the steering order in test script successively: mobile terminal display master menu, mobile terminal enters the arbitrary submenu under master menu, mobile terminal returns master menu, mobile terminal returns standby interface (completing the display of master menu and the testing procedure of shortcut), mobile terminal enters into online the rendition list, mobile terminal enters into the excellent recommendation option under the rendition list, the online the rendition list of mobile terminal to update, the arbitrary program of mobile terminal playing, mobile terminal stops playing, mobile terminal returns online the rendition list, mobile terminal returns standby interface (completing the sequential testing step of menu), any program of mobile terminal playing, mobile terminal suspends to be play, mobile terminal starts to play, mobile terminal stops playing, mobile terminal starts to play, mobile terminal played in full screen, mobile terminal adjustment volume, mobile terminal stops playing, mobile terminal returns standby interface (completing video playback capability service condition testing procedure).Mobile terminal is after executing all steering orders in test script, and the execution journal being performed the generation of described test script is sent to described testing server.
Report generation module is when receiving the execution journal that mobile terminal returns based on testing server, analyze the execution result of each steering order in described execution journal, generate the test report comprising MTBF (MeanTimeBetweenFailure, the mean time between failures) value of each described mobile terminal.Concrete, described report generation module is when analyzing described execution journal, if the execution result of steering order is unsuccessfully, then regard as primary fault, thus according to the lasting duration of stability test (mobile terminal performs the duration of test script), and in described lasting duration, the fault of mobile terminal is total, generates the test report comprising the MTBF value of described mobile terminal.
In addition, the present embodiment provides a kind of test mode of batch mobile terminal, first user can select the mobile terminal that needs to carry out testing, and the setting of test case can be carried out for different mobile terminal, such as, user can be every platform mobile terminal and selects different test cases, also can select identical test case for multiple stage mobile terminal.Concrete, the specific interface input test instruction that user can be provided based on testing server by script distribution module; When described script distribution module receives test instruction, the selection interface of display mobile terminal and test case, carry out the selection of mobile terminal and corresponding test case based on described selection interface for user, user can carry out the selection of mobile terminal and test case according to actual needs, such as, in the stability test of 10 mobile phones of same batch, 3 corresponding aforementioned multimedia stability test use-cases of mobile phone, 2 mobile phone corresponding web page browsing stability test use-cases, 5 mobile phone corresponding short message receiving-transmitting stability test use-cases.After completing test cases selection, script distribution module is based on the mapping relations between test case and test script, obtain the test script that each mobile terminal is corresponding, and the test script of acquisition is distributed to mobile terminal corresponding to each test script, perform for it and return execution journal.
Further, based on the 3rd embodiment, 4th embodiment of test script generating apparatus of the present invention is proposed, in the present embodiment, described test script generating apparatus also comprises localization of fault module, for when receiving the execution journal that described mobile terminal returns, obtaining described mobile terminal and performing running log during described test script; And carry out localization of fault based on the described running log obtained.
It should be noted that, mobile terminal in the course of the work, its relevant operational factor etc. when performing the operation carried out of steering order and its executable operations of real time record, generating run daily record.In the present embodiment, localization of fault module based on testing server when receiving the execution journal of the test script that mobile terminal returns, based on the temporal information that described execution journal comprises, obtain described mobile terminal and perform running log during described test script, with the execution result of the steering order comprised according to described execution journal, and mobile terminal described in described running log performs the relevant operational factor of described steering order, carry out localization of fault, research staff can fix a breakdown as early as possible according to the result of localization of fault.
Such as, when carrying out stability test to the mobile phone based on android system, localization of fault module obtains mobile phone by the Logcat class of calling mobile phone and performs running log during test script, to carry out localization of fault.
Further, present embodiments provide running log and obtain instrument, this running log obtains the system cloud gray model that instrument is embedded in mobile terminal, and localization of fault module is by calling the running log during this running log acquisition instrument extraction mobile terminal execution test script.
Further, based on the first embodiment, the 5th embodiment of test script generating apparatus of the present invention is proposed, in the present embodiment, described test script generating apparatus also comprises update module, for when receiving update instruction, and the mapping relations between refresh test step and steering order.
Be understandable that, along with technical progress, MTBF testing standard is also constantly update.In the present embodiment, when MTBF testing standard upgrades, Trigger update instruction, the mapping relations between update module refresh test step and steering order.Such as, the video playback capability service condition testing procedure of the MTBF testing standard after renewal has deleted volume adjusting action, then need the mapping relations between corresponding refresh test step and steering order.The embodiment of the present invention, by the mapping relations between refresh test step and steering order, can meet the testing requirement that user constantly changes.
The present invention further provides a kind of test script generation method, with reference to Fig. 5, in the first embodiment of test script generation method of the present invention, described test script generation method comprises:
Step S10, obtains and presets the steering order that in mean time between failures MTBF testing process, each testing procedure is corresponding;
The test script generation method that the present embodiment provides, MTBF (the MeanTimeBetweenFailure of the mobile terminals such as mobile phone, notebook computer, digit broadcasting receiver, PDA (personal digital assistant), PAD (panel computer), PMP (portable media player) can be applied to, mean time between failures) test in, such as, when the MTBF test carrying out batch mobile phone, test script is write based on Uiautomator framework, can perform for the mobile phone of different screen size, and write test script without the need to repeating.
It should be noted that, different common carriers has respective MTBF testing standard, and such as external AT & T is different with the MTBF testing standard of the China Mobile of China, is specifically embodied by test case.Following examples are described for the mobile terminal based on android system.
Consider that Uiautomator provides the mode of operation based on control and coordinate, can simulated implementation almost UI (UserInterface, user interface) operation of layer all people work, and can the api function of direct calling system, can facilitate and easily test case is converted into test script, therefore, the present embodiment preferably adopts Uiautomator to carry out the exploitation of test script.
MTBF test be the conventional basic function of mobile phone, a whole set of test case can be divided into following a few class by using function: communication class, info class, mail class, browser and download class, multimedia class and individual service class, in addition, also comprise the special test use-case for different mobile phones, such as, for the stability special test use-case of Nubia mobile phone.Comprise again several use-case under each large class, each use-case according to action the need of repeating, and can be divided into several son example again, and finally, son example will become minimum test cell, and sub-example is the set of action, and a son example the inside at least exists an action.It will be appreciated by persons skilled in the art that the action focusing on aforementioned test case being comprised of automatic test by steering order to simulate artificial execution, the set of these steering orders forms test script.
First default test case is split as the set of steering order by the present embodiment, concrete, the stability test flow process that different test cases is corresponding different, and different testing processs comprises different testing procedures, such as, testing process corresponding to the test case of certain testing mobile phone multimedia stability comprises display and the shortcut of master menu, the order of menu, video playback capability service condition three testing procedures.Aforementioned testing procedure can be split as at least one independently action, such as, can be by video playback capability service condition partial resolution: select any program to start to play, click when program is play and suspend, click during program break and play, click when program is play and stop, clicking when program plays stopping and playing, when clicking full frame and program broadcasting when program is play, click the self contained functions such as volume adjusting.After the set whole testing process being split as action, action is converted to steering order.
Step S20, obtains the identification information of the execution control of each described steering order based on Uiautomator framework;
In the present embodiment, obtain the identification information of the execution control of each described steering order based on Uiautomator framework.Alternatively, identify execution control corresponding to each described steering order by ATM layer relationsATM method and class indexing method, for it distributes unique identification information, thus can according to the operation of identification information realization based on control.
Step S30, based on the steering order that described default MTBF testing process comprises, and the identification information of the execution control of each described steering order, generate the test script of described default MTBF testing process.
In the present embodiment, test case is being split as steering order, and after the identification information of execution control getting each described steering order, is using JAVA to carry out writing of test script, finally obtain the test script of jar packet form.It will be appreciated by persons skilled in the art that and the test script write is distributed to mobile terminal, the mobile terminal receiving test script will automatically perform test script, namely automatically perform the test case of MTBF test.
In addition, in order to the execution result of statistical test script, the present embodiment introduces the mechanism of asserting in test script, whether successfully its realization is as follows: judging the operation key point of use-case, insert checkpoint, and preset correct result, as the criterion asserted, when test execution is to corresponding action time, assert that meeting active and preset result match, and provide conclusion.Concrete, the mode asserted has multiple, and the present embodiment mainly adopts the contrast of control, and when control contrast was lost efficacy, additional character String matching, when part NULI character string, adopted the contrast of picture.The result asserted, as action whether successful execution basis for estimation, adds up the result of each action, thus the result of every strip example, finally obtain the result of all use-cases, and obtain the test result of integrated testability use-case.
The test script generation method that the present embodiment provides, writing of test script is carried out based on Uiautomator framework, the manual action achieved based on control is simulated, and without the need to repeating to write test script for the mobile terminal of different screen size, that effectively can improve test script writes efficiency.
Further, based on the first embodiment, propose the second embodiment of test script generation method of the present invention, in the present embodiment, above-mentioned steps S20 comprises:
Obtain the descriptor of the execution control of each described steering order based on Uiautomator framework, wherein, whether described descriptor comprises text message, dimension information, the positional information of control and can click;
Respectively based on the descriptor of each described execution control, generate the unique identification information of each described execution control.
In the present embodiment, the function first provided based on Uiautomator framework obtains the descriptor of each described steering order, and wherein, whether described descriptor comprises text message, dimension information, the positional information of control and can click.Then respectively based on the descriptor of each described execution control, the unique identification information of each described execution control is generated.Alternatively, the mark of control is performed by such as under type realization:
1, hierarchical relationship method (Indexlist)
All control element of user interface of mobile terminal arrange with hierarchical relationship, such as, a frame comprises two view, wherein first view comprises two button, and each control element has an index, for identifying its position (0-based) in father's element, such as aforementioned two button, if think mark first button, so its Indexlist is exactly: 000, the 0th button element in the 0th view in the 0th frame.
2, class indexing method (ClassIndex)
All control element of user interface of mobile terminal are all classification, and such as frame, view and button etc., can count the number of times that all elements type occurs, and number, such as:
Frame:frame0、frame1、frame2、frame3……
View:view0、view1、view2、view3、view4……
Button:button0、button1、button2、button3……
In time resolving all elements, the element that each appearance one is of the same type, just add up the number of times that this element occurs, this number of times is exactly Classindex, both hierarchical structure flattening is shown.
Further, based on the first or second embodiment, propose the 3rd embodiment of test script generation method of the present invention, in the present embodiment, after above-mentioned steps S30, also comprise:
When receiving test instruction, described test script being sent to mobile terminal, performing the test script received for described mobile terminal, and return the execution journal performing described test script and generate;
Receive and generate test report based on the execution journal that described mobile terminal returns.
It should be noted that, the realization of the present embodiment connects based on the communication between testing server and mobile terminal, with reference to Fig. 4, alternatively, enough electric current inputs can be had in order to ensure mobile terminal in the implementation of test script, the present embodiment with the addition of hardware device voltage stabilizer between testing server and mobile terminal, and is responsible for the data interaction between described testing server and described mobile terminal by voltage stabilizer.
With the test case of multimedia stability, the present embodiment is elaborated below:
With reference to Fig. 4, before the test begins, testing server and mobile terminal are established a communications link by voltage stabilizer.The selection interface of the test case that user provides at testing server is chosen the test case of above-mentioned testing mobile phone multimedia stability, the test case that testing server is chosen according to user obtains corresponding test script, and the described test script obtained is sent to mobile terminal.
After test starts, mobile terminal performs the steering order in test script successively: mobile terminal display master menu, mobile terminal enters the arbitrary submenu under master menu, mobile terminal returns master menu, mobile terminal returns standby interface (completing the display of master menu and the testing procedure of shortcut), mobile terminal enters into online the rendition list, mobile terminal enters into the excellent recommendation option under the rendition list, the online the rendition list of mobile terminal to update, the arbitrary program of mobile terminal playing, mobile terminal stops playing, mobile terminal returns online the rendition list, mobile terminal returns standby interface (completing the sequential testing step of menu), any program of mobile terminal playing, mobile terminal suspends to be play, mobile terminal starts to play, mobile terminal stops playing, mobile terminal starts to play, mobile terminal played in full screen, mobile terminal adjustment volume, mobile terminal stops playing, mobile terminal returns standby interface (completing video playback capability service condition testing procedure).Mobile terminal is after executing all steering orders in test script, and the execution journal being performed the generation of described test script is sent to described testing server.
Described testing server is when receiving the execution journal that mobile terminal returns, analyze the execution result of each steering order in described execution journal, generate the test report comprising MTBF (MeanTimeBetweenFailure, the mean time between failures) value of each described mobile terminal.Concrete, described testing server is when analyzing described execution journal, if the execution result of steering order is unsuccessfully, then regard as primary fault, thus according to the lasting duration of stability test (mobile terminal performs the duration of test script), and in described lasting duration, the fault of mobile terminal is total, generates the test report comprising the MTBF value of described mobile terminal.
In addition, the present embodiment provides a kind of test mode of batch mobile terminal, first user can select the mobile terminal that needs to carry out testing, and the setting of test case can be carried out for different mobile terminal, such as, user can be every platform mobile terminal and selects different test cases, also can select identical test case for multiple stage mobile terminal.Concrete, the specific interface input test instruction that user can be provided by testing server; When described testing server receives test instruction, the selection interface of display mobile terminal and test case, carry out the selection of mobile terminal and corresponding test case based on described selection interface for user, user can carry out the selection of mobile terminal and test case according to actual needs, such as, in the stability test of 10 mobile phones of same batch, 3 corresponding aforementioned multimedia stability test use-cases of mobile phone, 2 mobile phone corresponding web page browsing stability test use-cases, 5 mobile phone corresponding short message receiving-transmitting stability test use-cases.After completing test cases selection, testing server is based on the mapping relations between test case and test script, obtain the test script that each mobile terminal is corresponding, and the test script of acquisition is distributed to mobile terminal corresponding to each test script, perform for it and return execution journal.
Further, based on the 3rd embodiment, propose the 4th embodiment of test script generation method of the present invention, in the present embodiment, described test script generation method also comprises:
When receiving the execution journal that described mobile terminal returns, obtaining described mobile terminal and performing running log during described test script;
Localization of fault is carried out based on the described running log obtained.
It should be noted that, mobile terminal in the course of the work, its relevant operational factor etc. when performing the operation carried out of steering order and its executable operations of real time record, generating run daily record.In the present embodiment, described testing server is when receiving the execution journal of the test script that mobile terminal returns, based on the temporal information that described execution journal comprises, obtain described mobile terminal and perform running log during described test script, with the execution result of the steering order comprised according to described execution journal, and mobile terminal described in described running log performs the relevant operational factor of described steering order, carry out localization of fault, research staff can fix a breakdown as early as possible according to the result of localization of fault.
Such as, when carrying out stability test to the mobile phone based on android system, the Logcat class by calling mobile phone obtains the running log during mobile phone execution test script, to carry out localization of fault.
Further, present embodiments provide running log and obtain instrument, this running log obtains the system cloud gray model that instrument is embedded in mobile terminal, by calling the running log during this running log acquisition instrument extraction mobile terminal execution test script.
Further, based on the first embodiment, propose the 5th embodiment of test script generation method of the present invention, in the present embodiment, described test script generation method also comprises:
When receiving update instruction, the mapping relations between refresh test step and steering order.
Be understandable that, along with technical progress, MTBF testing standard is also constantly update.In the present embodiment, when MTBF testing standard upgrades, Trigger update instruction, the mapping relations between refresh test step and steering order.Such as, the video playback capability service condition testing procedure of the MTBF testing standard after renewal has deleted volume adjusting action, then need the mapping relations between corresponding refresh test step and steering order.The embodiment of the present invention, by the mapping relations between refresh test step and steering order, can meet the testing requirement that user constantly changes.
It should be noted that, in each embodiment of test script generating apparatus of the present invention and method, test script can be completed by PC main frame and write, and serve as testing server by PC main frame, be responsible for the Control on Communication between PC main frame and each mobile terminal by the Monkeyrunner instrument running on PC main frame, realize the robotization of MTBF test.
It should be noted that, in this article, term " comprises ", " comprising " or its any other variant are intended to contain comprising of nonexcludability, thus make to comprise the process of a series of key element, method, article or device and not only comprise those key elements, but also comprise other key elements clearly do not listed, or also comprise by the intrinsic key element of this process, method, article or device.When not more restrictions, the key element limited by statement " comprising ... ", and be not precluded within process, method, article or the device comprising this key element and also there is other identical element.
The invention described above embodiment sequence number, just to describing, does not represent the quality of embodiment.
Through the above description of the embodiments, those skilled in the art can be well understood to the mode that above-described embodiment method can add required general hardware platform by software and realize, hardware can certainly be passed through, but in a lot of situation, the former is better embodiment.Based on such understanding, technical scheme of the present invention can embody with the form of software product the part that prior art contributes in essence in other words, this computer software product is stored in a storage medium (as ROM/RAM, magnetic disc, CD), comprising some instructions in order to make a station terminal equipment (can be mobile phone, computing machine, server, air conditioner, or the network equipment etc.) perform method described in each embodiment of the present invention.
These are only the preferred embodiments of the present invention; not thereby the scope of the claims of the present invention is limited; every utilize instructions of the present invention and accompanying drawing content to do equivalent structure or equivalent flow process conversion; or be directly or indirectly used in other relevant technical fields, be all in like manner included in scope of patent protection of the present invention.

Claims (10)

1. a test script generating apparatus, is characterized in that, described test script generating apparatus comprises:
First acquisition module, for obtaining the steering order that in default mean time between failures MTBF testing process, each testing procedure is corresponding;
Second acquisition module, for obtaining the identification information of the execution control of each described steering order based on Uiautomator framework;
Generation module, for the steering order comprised based on described default MTBF testing process, and the identification information of the execution control of each described steering order, generate the test script of described default MTBF testing process.
2. test script generating apparatus as claimed in claim 1, it is characterized in that, described second acquisition module comprises:
Information acquisition unit, for obtaining the descriptor of the execution control of each described steering order based on Uiautomator framework, wherein, whether described descriptor comprises text message, dimension information, the positional information of control and can click;
Identification generation unit, for respectively based on the descriptor of each described execution control, generates the unique identification information of each described execution control.
3. test script generating apparatus as claimed in claim 1 or 2, it is characterized in that, described test script generating apparatus also comprises:
Script distribution module, for when receiving test instruction, is sent to mobile terminal by described test script, performs the test script received for described mobile terminal, and returns the execution journal performing described test script and generate;
Report generation module, for receiving and generating test report based on the execution journal that described mobile terminal returns.
4. test script generating apparatus as claimed in claim 3, it is characterized in that, described test script generating apparatus also comprises localization of fault module, for when receiving the execution journal that described mobile terminal returns, obtaining described mobile terminal and performing running log during described test script; And carry out localization of fault based on the described running log obtained.
5. test script generating apparatus as claimed in claim 1, it is characterized in that, described test script generating apparatus also comprises update module, for when receiving update instruction, the mapping relations between refresh test step and steering order.
6. a test script generation method, is characterized in that, described test script generation method comprises:
Obtain and preset the steering order that in mean time between failures MTBF testing process, each testing procedure is corresponding;
The identification information of the execution control of each described steering order is obtained based on Uiautomator framework;
Based on the steering order that described default MTBF testing process comprises, and the identification information of the execution control of each described steering order, generate the test script of described default MTBF testing process.
7. test script generation method as claimed in claim 6, is characterized in that, the described step obtaining the identification information of the execution control of each described steering order based on Uiautomator framework comprises:
Obtain the descriptor of the execution control of each described steering order based on Uiautomator framework, wherein, whether described descriptor comprises text message, dimension information, the positional information of control and can click;
Respectively based on the descriptor of each described execution control, generate the unique identification information of each described execution control.
8. test script generation method as claimed in claims 6 or 7, it is characterized in that, the described steering order comprised based on described default MTBF testing process, and the identification information of the execution control of each described steering order, after generating the step of the test script of described default MTBF testing process, also comprise:
When receiving test instruction, described test script being sent to mobile terminal, performing the test script received for described mobile terminal, and return the execution journal performing described test script and generate;
Receive and generate test report based on the execution journal that described mobile terminal returns.
9. test script generation method as claimed in claim 8, it is characterized in that, described test script generation method also comprises:
When receiving the execution journal that described mobile terminal returns, obtaining described mobile terminal and performing running log during described test script;
Localization of fault is carried out based on the described running log obtained.
10. test script generation method as claimed in claim 6, it is characterized in that, described test script generation method also comprises:
When receiving update instruction, the mapping relations between refresh test step and steering order.
CN201510543958.XA 2015-08-28 2015-08-28 Test script generating device and method Pending CN105204992A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201510543958.XA CN105204992A (en) 2015-08-28 2015-08-28 Test script generating device and method

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201510543958.XA CN105204992A (en) 2015-08-28 2015-08-28 Test script generating device and method

Publications (1)

Publication Number Publication Date
CN105204992A true CN105204992A (en) 2015-12-30

Family

ID=54952686

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201510543958.XA Pending CN105204992A (en) 2015-08-28 2015-08-28 Test script generating device and method

Country Status (1)

Country Link
CN (1) CN105204992A (en)

Cited By (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106445764A (en) * 2016-09-29 2017-02-22 福州大学 Method for realizing automatic testing of stability of android facility
CN108345485A (en) * 2018-01-30 2018-07-31 口碑(上海)信息技术有限公司 identification method and device for interface view
CN108829606A (en) * 2018-06-29 2018-11-16 北京金山安全软件有限公司 Input method performance test method and device
CN110515835A (en) * 2019-07-30 2019-11-29 上海云扩信息科技有限公司 A kind of test method based on machine vision and DOM tree structure
CN110764746A (en) * 2019-10-21 2020-02-07 招商局金融科技有限公司 Script generation method and device and computer readable storage medium
CN111367791A (en) * 2020-02-19 2020-07-03 北京字节跳动网络技术有限公司 Method, device, medium and electronic equipment for generating test case
WO2020143030A1 (en) * 2019-01-11 2020-07-16 Entit Software Llc Test script generation based on event data and video frames

Citations (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1851667A (en) * 2006-02-15 2006-10-25 华为技术有限公司 Graphic user interface test method and system
CN101339534A (en) * 2008-06-17 2009-01-07 金蝶软件(中国)有限公司 Software test apparatus and test method
CN102419732A (en) * 2011-12-27 2012-04-18 Tcl集团股份有限公司 Android-platform-based automated testing method and testing tool
CN102819492A (en) * 2012-08-02 2012-12-12 中山大学 Keyword driven automatic testing frame on basis of Android
US20130139129A1 (en) * 2011-11-29 2013-05-30 Askey Computer Corp. Test method for handheld electronic device application
CN104331363A (en) * 2014-10-17 2015-02-04 上海斐讯数据通信技术有限公司 Automatic testing method for Android device
CN104375934A (en) * 2014-10-22 2015-02-25 江苏科技大学 Method for testing reliability of Android mobile phone software
CN104503919A (en) * 2015-01-13 2015-04-08 中国船舶重工集团公司第七二二研究所 Method for software reliability evaluation

Patent Citations (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1851667A (en) * 2006-02-15 2006-10-25 华为技术有限公司 Graphic user interface test method and system
CN101339534A (en) * 2008-06-17 2009-01-07 金蝶软件(中国)有限公司 Software test apparatus and test method
US20130139129A1 (en) * 2011-11-29 2013-05-30 Askey Computer Corp. Test method for handheld electronic device application
CN102419732A (en) * 2011-12-27 2012-04-18 Tcl集团股份有限公司 Android-platform-based automated testing method and testing tool
CN102819492A (en) * 2012-08-02 2012-12-12 中山大学 Keyword driven automatic testing frame on basis of Android
CN104331363A (en) * 2014-10-17 2015-02-04 上海斐讯数据通信技术有限公司 Automatic testing method for Android device
CN104375934A (en) * 2014-10-22 2015-02-25 江苏科技大学 Method for testing reliability of Android mobile phone software
CN104503919A (en) * 2015-01-13 2015-04-08 中国船舶重工集团公司第七二二研究所 Method for software reliability evaluation

Non-Patent Citations (2)

* Cited by examiner, † Cited by third party
Title
RAIN: "使用uiautomator做UI测试", 《HTTP://BLOG.CHENGYUNFENG.COM/?P=504》 *
袁建国等: "智能手机系统的MTBF自动测试分析与研究", 《电子测试》 *

Cited By (10)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106445764A (en) * 2016-09-29 2017-02-22 福州大学 Method for realizing automatic testing of stability of android facility
CN108345485A (en) * 2018-01-30 2018-07-31 口碑(上海)信息技术有限公司 identification method and device for interface view
CN108345485B (en) * 2018-01-30 2021-05-07 口碑(上海)信息技术有限公司 Identification method and device for interface view
CN108829606A (en) * 2018-06-29 2018-11-16 北京金山安全软件有限公司 Input method performance test method and device
WO2020143030A1 (en) * 2019-01-11 2020-07-16 Entit Software Llc Test script generation based on event data and video frames
US11704230B2 (en) 2019-01-11 2023-07-18 Micro Focus Llc Test script generation based on event data and video frames
CN110515835A (en) * 2019-07-30 2019-11-29 上海云扩信息科技有限公司 A kind of test method based on machine vision and DOM tree structure
CN110764746A (en) * 2019-10-21 2020-02-07 招商局金融科技有限公司 Script generation method and device and computer readable storage medium
CN110764746B (en) * 2019-10-21 2023-03-31 招商局金融科技有限公司 Script generation method and device and computer readable storage medium
CN111367791A (en) * 2020-02-19 2020-07-03 北京字节跳动网络技术有限公司 Method, device, medium and electronic equipment for generating test case

Similar Documents

Publication Publication Date Title
CN105204992A (en) Test script generating device and method
CN105159533A (en) Mobile terminal and automatic verification code input method thereof
CN104750417A (en) Frameless terminal application switching method and frameless terminal
CN105718027A (en) Management method of background application programs and mobile terminal
CN104869230A (en) Mobile terminal control method and apparatus
CN105093016A (en) Automation testing method and device for mobile terminal
CN104765543A (en) Audio playing parameter adjustment method and device
CN105204996A (en) Memory leak detection device and method and terminal
CN105183308A (en) Picture display method and apparatus
CN104731483A (en) Method and terminal for fast adjusting set parameters
CN106161134A (en) Mobile terminal automation testing method, device and mobile terminal
CN104954867A (en) Media playing method and device
CN106383780A (en) Monkey test method and device
CN105303398A (en) Information display method and system
CN105739820A (en) Message prompt display method and device
CN106453939A (en) Streaming media access method and apparatus
CN104731411A (en) Single-click action recognition method and device of mobile terminal
CN106095464B (en) A kind of method and device of the seamless operation of application program
CN105426036A (en) Interface display upgrade method, apparatus and system for application
CN105094642A (en) Message processing method and device
CN105224647A (en) Image display method and device
CN106598538A (en) Method and system for updating instruction set
CN106445830A (en) Application program running environment detection method and mobile terminal
CN105573916A (en) Fault detection method and mobile terminal
CN105204849A (en) Pressure test system and implementation method thereof

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
C10 Entry into substantive examination
SE01 Entry into force of request for substantive examination
RJ01 Rejection of invention patent application after publication

Application publication date: 20151230

RJ01 Rejection of invention patent application after publication