CN106776277A - A kind of method of striding course test, device and electronic equipment - Google Patents
A kind of method of striding course test, device and electronic equipment Download PDFInfo
- Publication number
- CN106776277A CN106776277A CN201611035713.7A CN201611035713A CN106776277A CN 106776277 A CN106776277 A CN 106776277A CN 201611035713 A CN201611035713 A CN 201611035713A CN 106776277 A CN106776277 A CN 106776277A
- Authority
- CN
- China
- Prior art keywords
- test command
- simulated action
- instruments
- simulated
- instruction
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Pending
Links
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F11/00—Error detection; Error correction; Monitoring
- G06F11/36—Preventing errors by testing or debugging software
- G06F11/3668—Software testing
- G06F11/3672—Test management
- G06F11/3688—Test 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)
Abstract
Method, device and electronic equipment the invention discloses a kind of test of striding course, wherein, the method includes:The first test command based on the encapsulation of instruments classes instrument is obtained, the first test command includes that simulated action is instructed and simulated action parameter corresponding with simulated action instruction;The first test command is parsed, the first test command is converted into the second test command for calling non-instruments classes instrument, the second test command includes simulated action instruction and simulated action parameter;Second test command is sent to non-instruments classes instrument, so that non-instruments classes instrument parses the second test command, and simulated operation is performed according to simulated action instruction and simulated action parameter.I.e. the method is while measuring stability is ensured, it is possible to achieve striding course is tested.
Description
Technical field
The present invention relates to software testing technology field, more particularly to a kind of method of striding course test, device and electronics set
It is standby.
Background technology
The automated test tool of current Android system is divided into two major classes, and the first kind is the survey based on Instruments classes
Trial work has, and can be controlled based on instruments frameworks and test application program;Equations of The Second Kind is the survey of non-Instruments classes
Trial work has.
Commonly used in the prior art is that, based on Instruments class testing instruments, such as instrument Robotium, test is used
Example is run in same process so as to realize operating tested application, detect with tested program.Wherein, Robotium is
A Android automated test frames, the application mainly for Android platform carries out black box automatic test, and it is provided
Various controls can be grasped by the various gesture operations of simulation (clicking on, length is pressed, slided), the API for searching and asserting mechanism
Make.
Based on this, it was found by the inventors of the present invention that it is higher based on Instruments class testing tool stabilities, but
The application program of each equipment can only one by one be tested, cause to compare limitation, nothing for the test scene of Android device
Method realizes the test to the event injection of striding course.Such as process A needs calling process B, and process A to will click on event and be injected into
Journey B;If being tested using based on Instruments class testing instruments, above-mentioned process A can not be tested and will click on event
Injection process B.
The information for being disclosed in the background section is merely intended to increase the understanding to general background of the invention, without answering
In being considered as recognizing or imply in any form that the information structure has been the prior art well known to persons skilled in the art.
The content of the invention
Method, device and electronic equipment it is an object of the invention to provide a kind of test of striding course, so as to overcome
Instruments class testings instrument can not realize the defect of striding course test.
A kind of method of striding course test provided in an embodiment of the present invention, including:Obtain and be based on instruments class instruments
Encapsulation the first test command, the first test command include simulated action instruct and with the simulated action corresponding simulated action of instruction
Parameter;Parse the first test command, and the first test command is converted to for calling non-instruments classes instrument second
Test command, the second test command includes simulated action instruction and simulated action parameter;Second test command is sent to non-
Instruments class instruments, so that non-instruments classes instrument parses the second test command, and instruct according to simulated action
Simulated operation is performed with simulated action parameter.
In a kind of possible implementation, the first test command based on the encapsulation of instruments classes instrument, bag are obtained
Include:Obtain in instruments class instruments encapsulate initial test command, initial test command include simulated action instruction and
Simulated action parameter corresponding with simulated action instruction;Initial test command is converted to the first test command of JSON forms.
In a kind of possible implementation, simulated action parameter includes the element mark of coordinate parameters and/or intended application
Know;When simulated action parameter includes the component identification of coordinate parameters and intended application, instructed according to simulated action and simulation is dynamic
Make parameter execution simulated operation to specifically include:Corresponding control element is searched according to component identification, the position of control element is obtained
Information;According to the positional information and coordinate parameters of control element, it is determined that to the operating area of control element;Referred to according to simulated action
Order, corresponding simulated operation is performed to control element in operating area.
In a kind of possible implementation, the first test command is converted to for calling non-instruments classes work
Second test command of tool, including:Jar bags are generated according to the first test command, and is the second test command by jar encapsulations.
In a kind of possible implementation, generating jar bags according to the first test command includes:According to the life of preset kind
Make and the simulated action instruction in the first test command and simulated action parameter are transferred in jar bags.
Based on same inventive concept, the embodiment of the present invention also provides a kind of device of striding course test, including:Obtain mould
Block, for obtaining the first test command based on the encapsulation of instruments classes instrument, the first test command refers to including simulated action
Order and simulated action parameter corresponding with simulated action instruction;Modular converter, for parsing the first test command, and first is surveyed
Examination order is converted to the second test command for calling non-instruments classes instrument, and the second test command includes that simulation is dynamic
Make instruction and corresponding simulated action parameter;Sending module, for the second test command to be sent to non-instruments classes
Instrument, so that non-instruments classes instrument parses the second test command, and according to simulated action instruction and simulated action parameter
Perform corresponding simulated operation.
In a kind of possible implementation, acquisition module includes:Acquiring unit, for obtaining in instruments classes
The initial test command encapsulated in instrument, initial test command includes that simulated action is instructed and corresponding with simulated action instruction
Simulated action parameter;Converting unit, the first test command for initial test command to be converted to JSON forms.
In a kind of possible implementation, simulated action parameter includes the element mark of coordinate parameters and/or intended application
Know;When the simulated action parameter includes the component identification of coordinate parameters and intended application, the sending module includes:Obtain
Unit, for searching corresponding control element according to the component identification, obtains the positional information of the control element;It is determined that single
Unit, for the positional information according to the control element and the coordinate parameters, it is determined that to the operating area of the control element;
Processing unit, for being instructed according to the simulated action, corresponding simulation is performed to the control element in the operating area
Operation.
In a kind of possible implementation, modular converter is used for:Jar bags are generated according to the first test command, and by jar
Encapsulation is the second test command.
In a kind of possible implementation, modular converter is used for:Order according to preset kind is tested described first
Simulated action instruction and the simulated action parameter in order are transferred in jar bags.
The method and device of a kind of striding course test provided in an embodiment of the present invention, by will be based on instruments classes
First test command of instrument encapsulation is converted to the second test command for calling non-instruments classes instrument, so that real
Existing striding course test.Simultaneously as the first test command is the order based on the encapsulation of instruments classes instrument, have
Stability higher, thereby may be ensured that the second test command also has stability higher.I.e. the method is ensureing test surely
While qualitative, it is possible to achieve striding course is tested.It is convenient in instruments classes using the first test command of JSON forms
Transmit order between instrument and non-instruments classes instrument, method is simple and efficiency high.
For achieving the above object, another further aspect, the embodiment of the invention provides a kind of electronic equipment, including:At least
One processor;And the memory being connected with least one processor communication;Wherein, have can quilt for the memory storage
The instruction of at least one computing device, the instruction by least one computing device so that described at least one
Method described in individual computing device above various aspects.
For achieving the above object, another further aspect, it is readable that the embodiment of the present application additionally provides a kind of non-transient computer
Storage medium, be stored with computer executable instructions, and the computer executable instructions are used to perform described in above various aspects
Method.
For achieving the above object, another further aspect, the embodiment of the invention provides a kind of computer program product, described
Computer program product includes computer program of the storage on non-transient computer readable storage medium storing program for executing, the computer program
Including programmed instruction, when described program instruction is computer-executed, the computer is set to perform described in above various aspects
Method.
Other features and advantages of the present invention will be illustrated in the following description, also, the partly change from specification
Obtain it is clear that or being understood by implementing the present invention.The purpose of the present invention and other advantages can be by the explanations write
Specifically noted structure is realized and obtained in book, claims and accompanying drawing.
Brief description of the drawings
One or more embodiments are illustrative by the picture in corresponding accompanying drawing, these exemplary theorys
The bright restriction not constituted to embodiment, the element with same reference numbers label is expressed as similar element in accompanying drawing, removes
It is non-to have especially statement, the figure not composition limitation in accompanying drawing.
Fig. 1 is the method flow diagram of striding course test in the embodiment of the present invention;
Fig. 2 is to obtain the method flow diagram of the first test command in the embodiment of the present invention;
Fig. 3 is the method flow diagram of striding course test in the embodiment of the present invention 1;
Fig. 4 is the structure chart of the device of striding course test in the embodiment of the present invention;
Fig. 5 is the structure chart of acquisition module in the embodiment of the present invention;
Fig. 6 is the structure chart of sending module in the embodiment of the present invention;
Fig. 7 is the structural representation of the electronic equipment of striding course test in the embodiment of the present invention.
Specific embodiment
Below in conjunction with the accompanying drawings, specific embodiment of the invention is described in detail, it is to be understood that guarantor of the invention
Shield scope is not limited by specific embodiment.
To make the purpose, technical scheme and advantage of the embodiment of the present invention clearer, below in conjunction with the embodiment of the present invention
In accompanying drawing, the technical scheme in the embodiment of the present invention is clearly and completely described, it is clear that described embodiment is
A part of embodiment of the present invention, rather than whole embodiments.Based on the embodiment in the present invention, those of ordinary skill in the art
The every other embodiment obtained under the premise of creative work is not made, belongs to the scope of protection of the invention.Unless
Separately there are other to explicitly indicate that, otherwise in entire disclosure and claims, term " including " or its conversion such as "comprising" or
" including " etc. will be understood to comprise stated element or part, and not exclude other elements or other compositions
Part.
Special word " exemplary " means " being used as example, embodiment or illustrative " herein.Here as " exemplary "
Illustrated any embodiment should not necessarily be construed as preferred or advantageous over other embodiments.
In addition, in order to better illustrate the present invention, numerous details are given in specific embodiment below.
It will be appreciated by those skilled in the art that without some details, the present invention can equally be implemented.In some instances, for
Method well known to those skilled in the art, means, element are not described in detail, in order to highlight purport of the invention.
Explicitly indicated that unless otherwise other, otherwise in entire disclosure and claims, term " including " or its change
Change such as "comprising" or " including " etc. and will be understood to comprise stated element or part, and do not exclude other units
Part or other parts.
According to embodiments of the present invention, there is provided a kind of method of striding course test, Fig. 1 is the flow chart of the method, by electricity
Sub- equipment is performed, and the method specifically includes step 101-103:
Step 101:The first test command based on the encapsulation of instruments classes instrument is obtained, the first test command includes
Simulated action is instructed and simulated action parameter corresponding with simulated action instruction.
In the embodiment of the present invention, instruments class instruments are referred to based on instruments class testing instruments, example
Such as instrument Robotium.For such testing tool, test operation is limited only to application to be measured in itself, if application to be measured
During the execution logic that middle presence is interacted with other application, this test frame cannot be tested, i.e., can not realize calling
Other processes participate in test.For example, instant messaging process is frequently necessary to invoking web page browser, terminal photograph album in use
Deng other processes, the function that instruments classes instrument cannot be called to striding course is simulated test.
First test command is the order based on the encapsulation generation of instruments classes instrument, i.e., based on instruments classes
The executable test command of instrument generates first test command.First test command include simulated action instruct and with simulation
The corresponding simulated action parameter of action command.
Step 102:The first test command is parsed, and the first test command is converted to for calling non-instruments
Second test command of class instrument, the second test command includes simulated action instruction and simulated action parameter.
In the embodiment of the present invention, the first test command of parsing can determine the simulated action instruction in the first test command
With corresponding simulated action parameter;And then it is non-for calling according to simulated action instruction and simulated action parameter determination
Second test command of instruments class instruments, i.e., can call non-instruments classes work according to second test command
Tool, non-instruments classes instrument can perform second test command.Simultaneously as the second test command is based on first
The order that test command is converted, therefore the second test command also includes that simulated action instruction and corresponding simulated action are joined
Number.
In the embodiment of the present invention, non-instruments classes instrument is to be not needed upon instruments class testing works
Tool, such as uiautomator;Non- instruments classes instrument supports that striding course is called.
Step 103:Second test command is sent to non-instruments classes instrument, so that non-instruments classes work
Tool the second test command of parsing, and simulated operation is performed according to simulated action instruction and simulated action parameter.
In the embodiment of the present invention, the second test command is being sent to non-instruments classes instrument, it is non-
Instruments classes instrument can parse the second test command and obtain simulated action and instruct and corresponding with simulated action instruction
Simulated action parameter, non-instruments classes instrument according to the simulated action instruction and simulated action parameter i.e. can be correct
The corresponding simulated operation of execution.
The method of a kind of striding course test provided in an embodiment of the present invention, by that will be sealed based on instruments classes instrument
First test command of dress is converted to for calling the second test command of non-instruments classes instrument, so as to realize stepping into
Journey is tested.Simultaneously as the first test command is the order based on the encapsulation of instruments classes instrument, with higher
Stability, thereby may be ensured that the second test command also has stability higher.I.e. the method is ensureing measuring stability
Simultaneously, it is possible to achieve striding course is tested.
The method that another embodiment of the present invention provides a kind of test of striding course, including step 101 shown in Fig. 1 arrives step
103, its realization principle and beneficial effect may be referred to the embodiment shown in Fig. 1.Specifically, shown in Figure 2, above-mentioned steps
" the first test command based on the encapsulation of instruments classes instrument is obtained, the first test command includes simulated action in 101
Instruction and simulated action parameter corresponding with simulated action instruction " includes step 201-202:
Step 201:The initial test command encapsulated in instruments class instruments is obtained, initial test command includes
Simulated action is instructed and simulated action parameter corresponding with simulated action instruction.
Step 202:Initial test command is converted to the first test command of JSON forms.
In the embodiment of the present invention, initial test command is the order encapsulated in instruments class instruments,
Instruments classes instrument can perform the initial test command.Initial test command is converted into JSON afterwards
(a kind of first test command of (JavaScript Object Notation are data interchange formats of lightweight) form, by
In JSON using the text formatting for being totally independent of language, it is easy to which people reads and writes, while be also easy to machine parsing and generate,
Conveniently transmit first test command.
Specifically, by taking the JOSN forms of key-value pair structure as an example, if desired testing clicking operation, now exist
Initial test command clickOnText (x, y) is encapsulated in the testing tool of instruments ends, wherein x, y parameters will be clicked on
Coordinate parameters, it is assumed that respectively 128 and 134;Being according to the initial test command afterwards can be with determination key value to the first of structure
Test command:{action:”clickOnText”,parameters:”128,134”}.
Wherein, in a kind of possible implementation, the simulated action is instructed and operated for analog subscriber, and it specifically may be used
Think:Simulation click commands, simulation are long by instruction, simulation slip instruction etc..Simulated action parameter can include coordinate parameters and/
Or the component identification of intended application;Wherein, coordinate parameters are a coordinate in respective operations region;The component identification of intended application
Can be the triggering object of simulated action set in advance instruction, the title of the specified control of such as intended application, control ID or
Other are used to recognize the identification information of control.
When simulated action parameter includes the component identification of coordinate parameters and intended application, according to institute in above-mentioned steps 103
State simulated action instruction and the simulated action parameter performs simulated operation and specifically includes:Correspondence is searched according to the component identification
Control element, obtain the positional information of the control element;Positional information and the coordinate ginseng according to the control element
Number, it is determined that to the operating area of the control element;Instructed according to the simulated action, to the control element in the operation
Region performs corresponding simulated operation.
In a kind of possible implementation, the first test command is converted to for calling non-instruments classes work
Second test command of tool, including:Jar bags are generated according to the first test command, and is the second test command by jar encapsulations.
Specifically, the order of the preset kind according to preset kind instructs and institute the simulated action in first test command
State simulated action parameter to be transferred in jar bags, in a kind of possible implementation, the order of the preset kind is adb
Shell-command, with the order that " adb shell " starts, can first carry out adb shell-commands into target device
Linux Shell environment, then performs " adb shell " order afterwards again in the Linux Shell of target device.Such as
Adb shell dumpsys activity, can first carry out adb shell, then be performed again in Linux Shell
dumpsys activity.Conveniently the parameter in the first test command can be transferred to using adb shell-commands
In second test command, simple to operate and efficiency high.
It is afterwards the second test by jar encapsulations according to the jar bags that the first test command is generated in the embodiment of the present invention
Order.Specifically, second test command specifically can be as follows:“adb shell uiautomator runtest
UIA.jar–c com.letv.xxx.Test–e{action:”clickOnText”,parameters:" 128,134 " ", it is non-
After instruments class instruments receive the second test command, the json { action in parsing-e parameters:”
clickOnText”,parameters:" 128,134 ", find corresponding operating method ClickOnText and carry out actual point
Hit operation.Wherein, UIA.jar is the name of the jar bags generated according to the first test command, and com.letv.xxx.Test is bag
Name and it is used to the class name for calling;The effect of whole sentence order is that batch processing script calls the jar bags to carry out performing corresponding test case
com.letv.xxx.Test。
The flow of the method is discussed in detail below by one embodiment.
In the present embodiment, initial test command is converted into the first test command by instruments classes instrument.Specifically
, shown in Figure 3, the method includes:Step 301-306:
Step 301:Instruments classes instrument encapsulates initial test command, and the initial test command includes simulated action
Instruction and simulated action parameter corresponding with simulated action instruction.
Specifically, in embodiment 1 by taking clicking operation as an example, the initial test command can be clickOnText (x, y),
Wherein x, y parameter are the coordinate parameters to be clicked on, and 128 and 134 are respectively in embodiment 1.
Step 302:Initial test command is converted to the first test command of JSON forms, and the first test command is sent out
Deliver to middle tone service.
Specifically, the first test command is { action:”clickOnText”,parameters:”128,134”}.
Step 303:Middle tone receives the first test command with service.
In embodiment 1, middle tone is located between instruments classes instrument and non-instruments classes instrument with service,
For calling service for the two is provided.
Step 304:The first test command is parsed, and the first test command is converted to for calling non-instruments
Second test command of class instrument.
Wherein, the second test command specifically can be as follows:“adb shell uiautomator runtest UIA.jar–
c com.letv.xxx.Test–e{action:”clickOnText”,parameters:”128,134”}”。
Step 305:Middle tone service sends to non-instruments classes instrument the second test command.
Step 306:Non- instruments classes instrument parses the second test command, and instructs and simulate according to simulated action
Action parameter performs corresponding simulated operation.
Specifically, after non-instruments ending tools receive the second test command ,-e ginsengs in the second test command of parsing
Json { action in number:”clickOnText”,parameters:" 128,134 ", find corresponding operating method
ClickOnText simultaneously carries out actual click operation.
The method of a kind of striding course test provided in an embodiment of the present invention, by that will be sealed based on instruments classes instrument
First test command of dress is converted to for calling the second test command of non-instruments classes instrument, so as to realize stepping into
Journey is tested.Simultaneously as the first test command is the order based on the encapsulation of instruments classes instrument, with higher
Stability, thereby may be ensured that the second test command also has stability higher.I.e. the method is ensureing measuring stability
Simultaneously, it is possible to achieve striding course is tested.Using the first test command of JSON forms, it is convenient instruments classes instrument with
Transmit order between non-instruments classes instrument, method is simple and efficiency high.
A kind of method flow of striding course test is described in detail above, and the method can also be by corresponding device reality
It is existing, the 26S Proteasome Structure and Function of the device is described in detail below.
A kind of device of striding course test provided in an embodiment of the present invention, it is shown in Figure 4, including:Acquisition module 41, turn
Mold changing block 42 and sending module 43.
Acquisition module 41 is used to obtain the first test command based on the encapsulation of instruments classes instrument, the first test life
Order includes simulated action instruction and simulated action parameter corresponding with simulated action instruction.
Modular converter 42 is used to parse the first test command, and the first test command is converted to non-for calling
Second test command of instruments class instruments, the second test command includes simulated action instruction and simulated action parameter.
Sending module 43 is used to send the second test command to non-instruments classes instrument, so that non-
Instruments classes instrument parses the second test command, and performs simulation behaviour according to simulated action instruction and simulated action parameter
Make.
In a kind of possible implementation, the first test command is the order of JSON forms.
Another embodiment of the present invention provides a kind of device of striding course test, including acquisition module 41 shown in Fig. 4, turns
Mold changing block 42 and sending module 43, its realization principle and beneficial effect may be referred to the embodiment shown in Fig. 4.Wherein, the present invention
Shown in Figure 5 in embodiment, acquisition module 41 includes:Acquiring unit 411 and converting unit 412.
Acquiring unit 411 is used to obtain the initial test command encapsulated in instruments class instruments, initial testing life
Order includes simulated action instruction and simulated action parameter corresponding with simulated action instruction.Converting unit 412 is used to initially to survey
Examination order is converted to the first test command of JSON forms.
In a kind of possible implementation, simulated action parameter includes the element mark of coordinate parameters and/or intended application
Know.When simulated action parameter includes the component identification of coordinate parameters and intended application, shown in Figure 6, sending module 43 is wrapped
Include:Acquiring unit 431, determining unit 432 and processing unit 433.
Acquiring unit 431 is used to search corresponding control element according to component identification, obtains the positional information of control element.
Determining unit 432 is used for positional information and coordinate parameters according to control element, it is determined that the operation to control element
Region.
Processing unit 433 is used to be instructed according to simulated action, and corresponding simulation behaviour is performed in operating area to control element
Make.
In a kind of possible implementation, modular converter 42 specifically for:Jar bags are generated according to the first test command,
And by jar encapsulations be the second test command.
In a kind of possible implementation, modular converter 42 is used for:The first test is ordered in order according to preset kind
Simulated action instruction and simulated action parameter in order are transferred in jar bags.
The method and device of a kind of striding course test provided in an embodiment of the present invention, by will be based on instruments classes
First test command of instrument encapsulation is converted to the second test command for calling non-instruments classes instrument, so that real
Existing striding course test.Simultaneously as the first test command is the order based on the encapsulation of instruments classes instrument, have
Stability higher, thereby may be ensured that the second test command also has stability higher.I.e. the method is ensureing test surely
While qualitative, it is possible to achieve striding course is tested.It is convenient in instruments classes using the first test command of JSON forms
Transmit order between instrument and non-instruments classes instrument, method is simple and efficiency high.
The embodiment of the present application provides a kind of nonvolatile computer storage media, and the computer-readable storage medium is stored with
Computer executable instructions, the computer executable instructions can perform the processing method in above-mentioned any means embodiment.
Fig. 7 is the hardware architecture diagram of the electronic equipment of the method for the striding course test that the embodiment of the present application is provided, such as
Shown in Fig. 7, the equipment includes one or more processors 610 and memory 620.In Fig. 7 by taking a processor 610 as an example.
The equipment can also include:Input unit 630 and output device 640.
Processor 610, memory 620, input unit 630 and output device 640 can be by bus or other modes
Connection, in Fig. 7 as a example by being connected by bus.
Memory 620 can be used to store non-volatile software journey as a kind of non-volatile computer readable storage medium storing program for executing
Sequence, non-volatile computer executable program and module.Processor 610 is non-easy in memory 620 by running storage
The property lost software program, instruction and module, so as to perform various function application and the data processing of electronic equipment, that is, realize
State the processing method of embodiment of the method.
Memory 620 can include storing program area and storage data field, wherein, storing program area can store operation system
Application program required for system, at least one function;Storage data field can data storage etc..Additionally, memory 620 can include
High-speed random access memory, can also include nonvolatile memory, for example, at least one disk memory, flash memories
Part or other non-volatile solid state memory parts.In certain embodiments, memory 620 is optional including relative to processor 610
Remotely located memory, these remote memories can be by network connection to processing unit.The example of above-mentioned network includes
But it is not limited to internet, intranet, LAN, mobile radio communication and combinations thereof.
Input unit 630 can receive the numeral or character information of input, and produce signal input.Output device 640 can
The display device such as including display screen.
One or more of modules are stored in the memory 620, when by one or more of processors
During 610 execution, perform:The first test command based on the encapsulation of instruments classes instrument is obtained, the first test command includes mould
Intend action command and simulated action parameter corresponding with simulated action instruction;The first test command is parsed, and the first test is ordered
Order is converted to the second test command for calling non-instruments classes instrument, and the second test command refers to including simulated action
Order and simulated action parameter;Second test command is sent to non-instruments classes instrument, so that non-instruments classes
Instrument parses the second test command, and performs simulated operation according to simulated action instruction and simulated action parameter.
In a kind of possible implementation, the first test command is the order of JSON forms.
In a kind of possible implementation, the first test command based on the encapsulation of instruments classes instrument, bag are obtained
Include:Obtain in instruments class instruments encapsulate initial test command, initial test command include simulated action instruction and
Simulated action parameter corresponding with simulated action instruction;Initial test command is converted to the first test command of JSON forms.
In a kind of possible implementation, simulated action parameter includes the element mark of coordinate parameters and/or intended application
Know;When simulated action parameter includes the component identification of coordinate parameters and intended application, instructed according to simulated action and simulation is dynamic
Make parameter execution simulated operation to specifically include:Corresponding control element is searched according to component identification, the position of control element is obtained
Information;According to the positional information and coordinate parameters of control element, it is determined that to the operating area of control element;Referred to according to simulated action
Order, corresponding simulated operation is performed to control element in operating area.
In a kind of possible implementation, the first test command is converted to for calling non-instruments classes work
Second test command of tool, including:Jar bags are generated according to the first test command, and is the second test command by jar encapsulations.
In a kind of possible implementation, generating jar bags according to the first test command includes:According to the life of preset kind
Make and the simulated action instruction in the first test command and simulated action parameter are transferred in jar bags.
The method that the executable the embodiment of the present application of the said goods is provided, possesses the corresponding functional module of execution method and has
Beneficial effect.Not ins and outs of detailed description in the present embodiment, reference can be made to the method that the embodiment of the present application is provided.
The electronic equipment of the embodiment of the present application exists in a variety of forms, including but not limited to:
(1) mobile communication equipment:The characteristics of this kind equipment is that possess mobile communication function, and to provide speech, data
It is main target to communicate.This Terminal Type includes:Smart mobile phone (such as iPhone), multimedia handset, feature mobile phone, and it is low
End mobile phone etc..
(2) super mobile personal computer equipment:This kind equipment belongs to the category of personal computer, there is calculating and treatment work(
Can, typically also possess mobile Internet access characteristic.This Terminal Type includes:PDA, MID and UMPC equipment etc., such as iPad.
(3) portable entertainment device:This kind equipment can show and play content of multimedia.The kind equipment includes:Audio,
Video player (such as iPod), handheld device, e-book, and intelligent toy and portable car-mounted navigation equipment.
(4) server:The equipment for providing the service of calculating, the composition of server includes that processor, hard disk, internal memory, system are total
Line etc., server is similar with general computer architecture, but due to needing to provide highly reliable service, therefore in treatment energy
The requirement of the aspects such as power, stability, reliability, security, scalability, manageability is higher.
(5) other have the electronic installation of data interaction function.
Device embodiment described above is only schematical, wherein the unit illustrated as separating component can
To be or may not be physically separate, the part shown as unit can be or may not be physics list
Unit, you can with positioned at a place, or can also be distributed on multiple NEs.It can according to the actual needs be selected
In some or all of module realize the purpose of this embodiment scheme.
Through the above description of the embodiments, those skilled in the art can be understood that each implementation method can
Realized by the mode of software plus general hardware platform, naturally it is also possible to by hardware.Based on such understanding, above-mentioned technology
The part that scheme substantially contributes to correlation technique in other words can be embodied in the form of software product, the computer
Software product can be stored in a computer-readable storage medium, and such as ROM/RAM, magnetic disc, CD, including some instructions are used to
So that computer equipment (can be personal computer, server, or network equipment etc.) perform each embodiment or
Method described in some parts of embodiment.
Finally it should be noted that:Above example is only used to illustrate the technical scheme of the application, rather than its limitations;Although
The application has been described in detail with reference to the foregoing embodiments, it will be understood by those within the art that:It still may be used
Modified with to the technical scheme described in foregoing embodiments, or equivalent is carried out to which part technical characteristic;
And these modification or replace, do not make appropriate technical solution essence depart from each embodiment technical scheme of the application spirit and
Scope.
Claims (11)
1. a kind of method that striding course is tested, it is characterised in that including:
The first test command based on the encapsulation of instruments classes instrument is obtained, first test command includes simulated action
Instruction and simulated action parameter corresponding with simulated action instruction;
First test command is parsed, first test command is converted to for calling non-instruments classes instrument
The second test command, second test command include the simulated action instruction and the simulated action parameter;
Second test command is sent to the non-instruments classes instrument, so that the non-instruments classes work
Tool parsing second test command, and simulated operation is performed according to simulated action instruction and the simulated action parameter.
2. method according to claim 1, it is characterised in that the acquisition is based on the encapsulation of instruments classes instrument
First test command, including:
The initial test command encapsulated in instruments class instruments is obtained, the initial test command includes simulated action
Instruction and simulated action parameter corresponding with simulated action instruction;
The initial test command is converted to the first test command of JSON forms.
3. method according to claim 1 and 2, it is characterised in that the simulated action parameter include coordinate parameters and/or
The component identification of intended application;
It is described according to the simulated action when the simulated action parameter includes the component identification of coordinate parameters and intended application
Instruction and the simulated action parameter perform simulated operation and specifically include:Corresponding control unit is searched according to the component identification
Element, obtains the positional information of the control element;
Positional information and the coordinate parameters according to the control element, it is determined that to the operating area of the control element;
Instructed according to the simulated action, corresponding simulated operation is performed in the operating area to the control element.
4. method according to claim 1 and 2, it is characterised in that it is described by first test command be converted to for
The second test command of non-instruments classes instrument is called, including:
Jar bags are generated according to first test command, and is the second test command by the jar encapsulations.
5. method according to claim 4, it is characterised in that described jar bags are generated according to first test command to wrap
Include:
The simulated action instruction in first test command and the simulated action are joined in order according to preset kind
Number is transferred in jar bags.
6. the device that a kind of striding course is tested, it is characterised in that including:
Acquisition module, for obtaining the first test command based on the encapsulation of instruments classes instrument, first test command
Including simulated action instruction and simulated action parameter corresponding with simulated action instruction;
Modular converter, for parsing first test command, and first test command is converted to non-for calling
Second test command of instruments class instruments, second test command includes simulated action instruction and the mould
Intend action parameter;
Sending module, for second test command to be sent to the non-instruments classes instrument, so that described non-
Instruments classes instrument parses second test command, and according to simulated action instruction and simulated action ginseng
Number performs corresponding simulated operation.
7. device according to claim 6, it is characterised in that the acquisition module includes:
Acquiring unit, for obtaining the initial test command encapsulated in instruments class instruments, the initial test command
Including simulated action instruction and simulated action parameter corresponding with simulated action instruction;
Converting unit, the first test command for the initial test command to be converted to JSON forms.
8. the device according to claim 6 or 7, it is characterised in that the simulated action parameter include coordinate parameters and/or
The component identification of intended application;
When the simulated action parameter includes the component identification of coordinate parameters and intended application, the sending module includes:
Acquiring unit, for searching corresponding control element according to the component identification, obtains the position letter of the control element
Breath;
Determining unit, for the positional information according to the control element and the coordinate parameters, it is determined that to the control element
Operating area;
Processing unit, for being instructed according to the simulated action, performs corresponding to the control element in the operating area
Simulated operation.
9. the device according to claim 6 or 7, it is characterised in that the modular converter is used for:According to the described first test
Order generation jar bags, and be the second test command by the jar encapsulations.
10. device according to claim 9, it is characterised in that the modular converter is used for:According to the order of preset kind
Simulated action instruction in first test command and the simulated action parameter are transferred in jar bags.
11. a kind of electronic equipment, including:
At least one processor;And,
The memory being connected with least one processor communication;Wherein,
The memory storage has can be by the instruction of at least one computing device, and the instruction is by described at least one
Reason device is performed, so that at least one processor is able to carry out the method any one of claim 1-5.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201611035713.7A CN106776277A (en) | 2016-11-18 | 2016-11-18 | A kind of method of striding course test, device and electronic equipment |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201611035713.7A CN106776277A (en) | 2016-11-18 | 2016-11-18 | A kind of method of striding course test, device and electronic equipment |
Publications (1)
Publication Number | Publication Date |
---|---|
CN106776277A true CN106776277A (en) | 2017-05-31 |
Family
ID=58971330
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201611035713.7A Pending CN106776277A (en) | 2016-11-18 | 2016-11-18 | A kind of method of striding course test, device and electronic equipment |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN106776277A (en) |
Cited By (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN109783352A (en) * | 2018-12-13 | 2019-05-21 | 平安普惠企业管理有限公司 | The method, apparatus and computer equipment tested using jenkins package platforms |
CN110231959A (en) * | 2018-03-06 | 2019-09-13 | 优酷网络技术(北京)有限公司 | A kind of synchronous method of manipulation instruction, system and control centre |
CN112564999A (en) * | 2020-11-02 | 2021-03-26 | 鹏城实验室 | Network measurement method, measurement management server, system and storage medium |
Citations (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US20090199047A1 (en) * | 2008-01-31 | 2009-08-06 | Yahoo! Inc. | Executing software performance test jobs in a clustered system |
CN102053911A (en) * | 2010-12-30 | 2011-05-11 | 东莞宇龙通信科技有限公司 | Automated testing method and system based on Android and mobile terminal |
CN105320595A (en) * | 2014-07-31 | 2016-02-10 | 腾讯科技(深圳)有限公司 | Application test method and device |
-
2016
- 2016-11-18 CN CN201611035713.7A patent/CN106776277A/en active Pending
Patent Citations (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US20090199047A1 (en) * | 2008-01-31 | 2009-08-06 | Yahoo! Inc. | Executing software performance test jobs in a clustered system |
CN102053911A (en) * | 2010-12-30 | 2011-05-11 | 东莞宇龙通信科技有限公司 | Automated testing method and system based on Android and mobile terminal |
CN105320595A (en) * | 2014-07-31 | 2016-02-10 | 腾讯科技(深圳)有限公司 | Application test method and device |
Cited By (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN110231959A (en) * | 2018-03-06 | 2019-09-13 | 优酷网络技术(北京)有限公司 | A kind of synchronous method of manipulation instruction, system and control centre |
CN109783352A (en) * | 2018-12-13 | 2019-05-21 | 平安普惠企业管理有限公司 | The method, apparatus and computer equipment tested using jenkins package platforms |
CN112564999A (en) * | 2020-11-02 | 2021-03-26 | 鹏城实验室 | Network measurement method, measurement management server, system and storage medium |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN106383786B (en) | Interface pressure performance testing method and device and electronic equipment | |
CN107273280B (en) | Log processing method and device, electronic equipment and storage medium | |
CN106022483B (en) | The method and apparatus converted between machine learning model | |
CN105302732B (en) | A kind of automatic test approach and device of mobile terminal | |
CN104657140B (en) | Code generating method and device | |
CN108415826B (en) | Application testing method, terminal device and computer readable storage medium | |
CA2915116A1 (en) | Automated generation of scripted and manual test cases | |
CN112286485B (en) | Method and device for controlling application through voice, electronic equipment and storage medium | |
CN104915297B (en) | A kind of automated testing method of the APP power consumption of android equipment | |
CN105677306A (en) | Automation script compiling method and device | |
CN112416775B (en) | Software automatic test method and device based on artificial intelligence and electronic equipment | |
CN108228444A (en) | A kind of test method and device | |
CN106776277A (en) | A kind of method of striding course test, device and electronic equipment | |
CN106469113A (en) | Applied program testing method and system | |
CN109460365B (en) | A kind of system performance testing method, apparatus, equipment and storage medium | |
CN107357728A (en) | The method and electronic equipment of test software | |
CN107807841A (en) | Server analogy method, device, equipment and readable storage medium storing program for executing | |
CN109637536A (en) | A kind of method and device of automatic identification semantic accuracy | |
CN109616106A (en) | Vehicle-mounted control screen voice recognition process testing method, electronic equipment and system | |
CN103079180B (en) | Remote assistance method and system | |
CN115115048A (en) | Model conversion method, device, computer equipment and storage medium | |
CN104008043B (en) | Cross-terminal method of testing, end to be tested and test lead | |
CN104347081A (en) | Method and device for testing scene statement coverage | |
CN110737900B (en) | Webpage function testing method and device, server and computer readable storage medium | |
CN110427277B (en) | Data verification method, device, equipment and storage medium |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
PB01 | Publication | ||
PB01 | Publication | ||
SE01 | Entry into force of request for substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
WD01 | Invention patent application deemed withdrawn after publication |
Application publication date: 20170531 |
|
WD01 | Invention patent application deemed withdrawn after publication |