CN105224456B - A kind of test script generation method, device and system - Google Patents
A kind of test script generation method, device and system Download PDFInfo
- Publication number
- CN105224456B CN105224456B CN201510633183.5A CN201510633183A CN105224456B CN 105224456 B CN105224456 B CN 105224456B CN 201510633183 A CN201510633183 A CN 201510633183A CN 105224456 B CN105224456 B CN 105224456B
- Authority
- CN
- China
- Prior art keywords
- intelligent terminal
- test script
- unit
- connection
- operational order
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Active
Links
Landscapes
- User Interface Of Digital Computer (AREA)
- Debugging And Monitoring (AREA)
Abstract
The invention discloses a kind of test script generation methods, device and system, this method comprises: establishing connection with intelligent terminal;The synchronous displaying information on screen for obtaining the intelligent terminal, and simultaneous display exports;And operational order of the user on the interface of display output is received, and operational order is synchronized to the intelligent terminal to realize and carry out corresponding operation to the intelligent terminal;By each operational order relevant information preservation of the user on the interface of display output into historical operation file;When instruction is completed in the operation for receiving user, by the Content Transformation in the historical operation file at test code, and then the test script for executing identical process is generated.Joint-action mechanism is formed between technical solution provided by the invention and intelligent terminal, by the coordination and response to user's operation, generates the test script for being able to reflect entire operation process.Human cost needed for the program greatly reduces test script generating process and time cost improve testing cost formation efficiency.
Description
Technical field
The present invention relates to internet the field of test technology, and in particular to a kind of test script generation method, device and system.
Background technique
In the prior art, the generating process of test script is manually completed by tester, is obtained by writing code
Corresponding document wants the test logic of realization to characterize, for example, application to be measured for one, needs holding according to the application to be measured
Row logic corresponds to the test logic write out to it, and the process is very complicated, time-consuming and laborious, also, with Internet technology
Rapid development, the renewal speed of an application to be measured quickly, cause the variation of the execution logic of application to be measured quite frequent, may
Staff does not write the test script of the application to be measured of a version also, which, which has pushed away, brings out a new edition, and needs
Its new version is tested, tester corrects test script according to the test logic of new version again again, causes to test
The development cycle of script is very long, inefficiency.
Summary of the invention
In view of the above problems, it proposes on the present invention overcomes the above problem or at least be partially solved in order to provide one kind
State a kind of test script generation method, the device and system of problem.
According to one aspect of the present invention, a kind of test script generation method is provided, this method comprises:
Connection is established with intelligent terminal;
The synchronous displaying information on screen for obtaining the intelligent terminal, and simultaneous display exports;And it receives user and is showing
Operational order on the interface of output, and operational order is synchronized to the intelligent terminal to realize and carry out to the intelligent terminal
Corresponding operation;
By each operational order relevant information preservation of the user on the interface of display output into historical operation file;
When receive user operation complete instruction when, by the Content Transformation in the historical operation file at test code,
And then generate the test script for executing identical process.
Optionally, specified application is installed on the intelligent terminal;
The operational order that user is received on the interface of display output, and operational order is synchronized to the intelligence eventually
End is to realize that carrying out corresponding operation to the intelligent terminal includes: to receive user on the interface of display output to described specified
The intelligent terminal is synchronized to using the operational order of progress, and by operational order to realize and carry out accordingly to the specified application
Operation;
Then test script generated is the test script for being tested the specified application.
Optionally, described to establish connection with intelligent terminal and include:
Connection is established by USB wired connection mode and intelligent terminal;
Alternatively,
Connection is established by WiFi radio connection and intelligent terminal.
Optionally, this method further comprises:
While obtaining the displaying information on screen of the intelligent terminal, the attribute of an element information shown on screen is obtained;
When the mouse of user stops on an element on the interface of display output, display exports the attribute of an element
Information.
Optionally, this method further comprises:
User is received to instruct the modification that the content in historical operation file is modified;
The content in the historical operation file is modified accordingly according to modification instruction.
Optionally, this method further comprises:
The intelligent terminal is sent by test script generated, and is run on intelligent terminal, to verify the test
Script.
Optionally, described to send the intelligent terminal for test script generated and include:
If establishing connection by USB wired connection mode and intelligent terminal, will be generated by the USB wired connection
Test script be sent to the intelligent terminal;
If establishing connection by WiFi radio connection and intelligent terminal, the address of the test script is passed through
HTTP mode is sent to the intelligent terminal, so that intelligent terminal downloads the test script according to address.
According to another aspect of the invention, a kind of test script generating means are provided, which includes:
Connection unit, suitable for establishing connection with intelligent terminal;
Synchronous acquiring unit, suitable for the synchronous displaying information on screen for obtaining the intelligent terminal, and simultaneous display is output to
Display unit;
Display unit is adapted for simultaneous display output;
Receiving unit suitable for receiving operational order of the user on the interface of display output, and operational order is synchronized to
The intelligent terminal carries out corresponding operation to the intelligent terminal to realize;
Recording unit, suitable for showing the relevant information preservation of each operational order on the interface exported to history user
In operation file;
Converting unit, when instruction is completed in the operation suitable for receiving user in the receiving unit, by the historical operation
Content Transformation in file generates the test script for executing identical process at test code.
Optionally, specified application is installed on the intelligent terminal;
The receiving unit refers to suitable for receiving the operation that user carries out the specified application on the interface of display output
It enables, and operational order is synchronized to the intelligent terminal to realize and carry out corresponding operation to the specified application;
The test script that then converting unit generates is the test script for being tested the specified application.
Optionally, the connection unit, suitable for establishing connection by USB wired connection mode and intelligent terminal;Alternatively, logical
It crosses WiFi radio connection and intelligent terminal establishes connection.
Optionally, the acquiring unit obtains while suitable for the synchronous displaying information on screen for obtaining the intelligent terminal
The attribute of an element information shown on screen;When the mouse of user stops on an element on the interface of display output,
It shows on the display unit and exports the attribute of an element information.
Optionally, receiving unit is further adapted for reception user and repairs to what the content in historical operation file was modified
Change instruction;
Recording unit is further adapted for carrying out the content in the historical operation file according to the modification instruction corresponding
Modification.
Optionally, which further comprises:
Authentication unit.Suitable for sending the intelligent terminal for test script generated, and run on intelligent terminal,
To verify the test script.
Optionally, the authentication unit, suitable for being built by USB wired connection mode with intelligent terminal when the connection unit
When vertical connection, the intelligent terminal is sent for test script generated by the USB wired connection;Suitable for working as the connection
When unit establishes connection by WiFi radio connection and intelligent terminal, the address of the test script is passed through into HTTP mode
It is sent to the intelligent terminal, so that intelligent terminal downloads the test script according to address.
Another aspect according to the present invention, provides a kind of test script generation system, which includes: terminal side dress
It sets and test script generating means as described in any one of the above embodiments;
The terminal side device is located in intelligent terminal, which includes:
Synchronization unit, suitable for obtaining the displaying information on screen of the intelligent terminal and being sent to test script generating means,
And the operational order that test script generating means are sent is received, and the operational order is executed on the intelligent terminal.
Optionally, the synchronization unit while displaying information on screen suitable for obtaining the intelligent terminal, obtains screen
The attribute of an element information of upper display, and it is sent to test script generating means together.
Optionally, the terminal side device further include:
Execution unit is verified, suitable for receiving the test script of test script generating means transmission and on the intelligent terminal
Operation;Alternatively, being suitable for receiving the address that test script generating means are sent, test script is downloaded according to the address and in the intelligence
It can be run in terminal.
It can be seen from the above, technical solution provided by the invention passes through the connection between intelligent terminal, simultaneous display and intelligence
The identical displaying information on screen of energy terminal, and the operational order of user is synchronized to intelligent terminal to realize corresponding control, shape
At the joint-action mechanism between intelligent terminal, so that user, which can choose any front end, executes visual operation to intelligent terminal
Process;Also, in visual operating process, each operational order relevant information of the user in front end is saved in history behaviour
Make in file, after the completion of operation, the Content Transformation in historical operation file is able to reflect entire operation process at generation
Test script.Human cost needed for the program greatly reduces test script generating process and time cost improve survey
Try cost formation efficiency.
The above description is only an overview of the technical scheme of the present invention, in order to better understand the technical means of the present invention,
And it can be implemented in accordance with the contents of the specification, and in order to allow above and other objects of the present invention, feature and advantage can
It is clearer and more comprehensible, the followings are specific embodiments of the present invention.
Detailed description of the invention
By reading the following detailed description of the preferred embodiment, various other advantages and benefits are common for this field
Technical staff will become clear.The drawings are only for the purpose of illustrating a preferred embodiment, and is not considered as to the present invention
Limitation.And throughout the drawings, the same reference numbers will be used to refer to the same parts.In the accompanying drawings:
Fig. 1 shows a kind of test script generation method flow chart according to an embodiment of the invention;
Fig. 2 shows a kind of test script generating means schematic diagrames according to an embodiment of the invention;
Fig. 3 shows a kind of test script generating means schematic diagram in accordance with another embodiment of the present invention;
Fig. 4 shows a kind of test script according to an embodiment of the invention and generates system schematic;
Fig. 5 shows a kind of test script in accordance with another embodiment of the present invention and generates system schematic.
Specific embodiment
Exemplary embodiments of the present disclosure are described in more detail below with reference to accompanying drawings.Although showing the disclosure in attached drawing
Exemplary embodiment, it being understood, however, that may be realized in various forms the disclosure without should be by embodiments set forth here
It is limited.On the contrary, these embodiments are provided to facilitate a more thoroughly understanding of the present invention, and can be by the scope of the present disclosure
It is fully disclosed to those skilled in the art.
Fig. 1 shows a kind of test script generation method flow chart according to an embodiment of the invention.As shown in Figure 1,
This method comprises:
Step S110 establishes connection with intelligent terminal.
Step S120, the synchronous displaying information on screen for obtaining intelligent terminal, and simultaneous display exports;And it receives user and exists
It shows the operational order on the interface of output, and operational order is synchronized to intelligent terminal to realize and carry out accordingly to intelligent terminal
Operation.
Step S130, by each operational order relevant information preservation of the user on the interface of display output to historical operation
In file.
Step S140, when instruction is completed in the operation for receiving user, by the Content Transformation in historical operation file at test
Code, and then generate the test script for executing identical process.
As it can be seen that method shown in FIG. 1 passes through the connection between intelligent terminal, simultaneous display screen identical with intelligent terminal
Curtain display information, and the operational order of user is synchronized to intelligent terminal to realize corresponding control, formed with intelligent terminal it
Between joint-action mechanism so that user, which can choose any front end, executes visual operating process to intelligent terminal;Also, can
In operating process depending on change, each operational order relevant information of the user in front end is saved in historical operation file, is waited until
After the completion of operation, the Content Transformation in historical operation file is able to reflect to the test script of entire operation process at generation.It should
Human cost needed for scheme greatly reduces test script generating process and time cost improve testing cost and generate effect
Rate.
In one embodiment of the invention, the step S110 of method shown in Fig. 1, described and intelligent terminal establish connection packet
It includes: connection is established by USB wired connection mode and intelligent terminal;Alternatively, passing through WiFi radio connection and intelligent terminal
Establish connection.
Method shown in FIG. 1 is illustrated under application test scene:
It is equipped with and is specified using A on intelligent terminal, specifying to this and carrying out functional test using A includes: to infuse broker program
Enter into the system process of intelligent terminal, so that the auxiliary text that system not only wants load operating system primary when starting
Part will also load the content of broker program, realize initialization context layout of the broker program under system environments, be subsequent function
It can execute and prepare;It is specified using A that this is run on intelligent terminal, what method as shown in Figure 1 generated surveys about specified application A
Training this this specified is tested using A.
Specifically, wherein generating about the method for the specified test script using A includes: to install one on intelligent terminal
Telescript, after front end and intelligent terminal establish connection, the Telescript may be implemented the Socket between front end communicate or
Http communication.It runs to specify on intelligent terminal and applies A, Telescript is by calling the above-mentioned agency being injected into system process
Program obtains the displaying information on screen (the specified current interface information using A) of intelligent terminal and is sent to front end, so that front end
Simultaneous display output;When user front end display output interface on when operating, front end by corresponding operation instruct send out
It send to Telescript, Telescript passes through again calls broker program to send corresponding operating instruction to specified application A, so that specified
It changes or jumps according to corresponding operating instruction using the display interface of A;Further, Telescript is by calling agency
Program obtains the display interface after variation and is sent to front end, so that front end simultaneous display exports;When user show in front end it is defeated
When being operated on interface out, corresponding operation instruction is sent to Telescript by front end, and Telescript passes through again calls generation
Reason program modelling customer behavior sends corresponding operating instruction to specified application A, so that the specified display interface using A is according to being somebody's turn to do
Corresponding operating instruction occurs to change or jump again;And so on, all controls on specified all interfaces using A can be traversed
Part all records all operating process, and final operation terminates to generate test script;The test script is issued to largely
In the intelligent terminal of test, realize to the specified test process using A.
Wherein, the operating system of intelligent terminal is Android operation system, includes Hook function in broker program, then communicates foot
Originally it is by way of calling broker program to obtain the specified current interface information using A: because of the GUI of Android system
(Graphical User Interface, graphic user interface) belongs to client-server end mode, that is to say, that Android
System, can be to a service SurfaceFlinger (server-side) of Android using (client) when showing an interface
Interface information to be shown, SurfaceFlinger are sent to OpenGL (Open after synthesizing visible region by multiple calculating
Graphics Library, open graphic library) interface, it is shown on the screen of intelligent terminal after being handled by the interface.Based on this
Principle, in order to obtain the displaying information on screen of intelligent terminal, this programme intercepts and captures specified answer by the Hook function in broker program
The interface information about current interface of service SurfaceFlinger is sent to A.And Telescript passes through calling generation again
Reason program sends corresponding operating instruction to specified application A, so that the specified display interface using A is instructed according to the corresponding operating
The mode for changing or jumping is: it is corresponding in current interface according to finding for instructing corresponding coordinate position with the corresponding operating
Control, the primary triggering function of this control is called directly to trigger the control, so that specified exist using the display interface of A
The control changes or jumps after being triggered;Alternatively, by Hook function using the corresponding coordinate position of the operational order as
Parameter is sent to a triggering function, so that modelling customer behavior is triggered in corresponding position when the triggering function operation.
In one embodiment of the invention, method shown in FIG. 1 further comprises: the screen for obtaining intelligent terminal is shown
While information, the attribute of an element information shown on screen is obtained;When the mouse of user is showing one on the interface exported
When stopping on a element, display exports the attribute of an element information.
In example described above, Telescript is by calling the broker program being injected into system process to get intelligence
Can terminal displaying information on screen, and then know the attribute of an element information shown on the screen of current intelligent terminal, such as screen
Each control of upper display and coordinate position, type, display format, the display content of each control etc..Telescript will more than
Information is sent to front end, is shown and is exported by front end, when the mouse of user is showing the element such as one on the interface exported
When being stopped on a control, it can emerge and play frame out, play and record above- mentioned information inside frame.Accordingly, user can be more convenient, more effectively
It is operated in the display output of front end, to generate test script.
When operating mistake inevitably occurs in operation in user, if the operation note is irreversible will lead to
The test script of generation error, therefore, in one embodiment of the invention, method shown in FIG. 1 further comprises: receiving and uses
Family instructs the modification that the content in historical operation file is modified;It is instructed according to the modification to the historical operation file
In content modified accordingly.Specifically, the operation note crossed performed by user can be also shown in front end, user can be from
In know the operation history of oneself, if operation error wherein has occurred, can the step corresponding to operation error modify,
To ultimately generate correct test script.
Further, since the generating process of test script provided by the present invention is to establish connection between front end and intelligent terminal
Mechanism, the information shown on the screen of front end simultaneous display intelligent terminal, the operation in response to user to front end refer to operation
Order is returned to intelligent terminal, drives the variation of the output of front end as feedback using the interface information of intelligent terminal;During being somebody's turn to do, have
There may be the problem of be: front end receiver to the interface information that sends of intelligent terminal be code form, and front end needs
The code is converted into visual form for a user, but due to the resolution ratio of different screens be it is different, should
Conversion process will lead to the offset of the coordinate position of the element in the interface shown in screen, and in response to the operation of user, it is preceding
The operational order that operational order returns to intelligent terminal is based on coordinate position by end;Therefore, in some instances, for life
At test script, need further to verify it on intelligent terminal, to correct coordinate position that may be present offset
The problem of.
Then method shown in FIG. 1 further comprises: sending the intelligent terminal for test script generated, and in intelligence
It can be run in terminal, to verify the test script.Wherein, sending the intelligent terminal for test script generated includes:
If establishing connection by USB wired connection mode and intelligent terminal, pass through the USB wired connection for test foot generated
Originally it is sent to the intelligent terminal;If connection is established by WiFi radio connection and intelligent terminal, by the test
The address of script is sent to the intelligent terminal by HTTP mode, so that intelligent terminal downloads the test foot according to address
This.
In one embodiment of the invention, test script generated is .Lua format, when holding in an intelligent terminal
When the row test script, need to turn the test script of .Lua format using a Lua-Java mapping library in intelligent terminal
It changes the test script of .Java format into, can be run in the system environments of intelligent terminal.The present embodiment is not influencing to survey
On the basis of the operation of training originally in an intelligent terminal, the language rule for efficiently utilizing .Lua is simple, learning cost is low etc.
Advantage.
Fig. 2 shows a kind of test script generating means schematic diagrames according to an embodiment of the invention, as shown in Fig. 2,
The test script generating means 200 include:
Connection unit 210, suitable for establishing connection with intelligent terminal.
Synchronous acquiring unit 220, suitable for the synchronous displaying information on screen for obtaining the intelligent terminal, and simultaneous display exports
To display unit.
Display unit 230 is adapted for simultaneous display output.
Receiving unit 240, suitable for receiving operational order of the user on the interface of display output, and operational order is synchronous
Corresponding operation is carried out to the intelligent terminal to realize to the intelligent terminal.
Recording unit 250, suitable for arriving each operational order relevant information preservation of the user on the interface of display output
In historical operation file.
Converting unit 260 grasps the history when instruction is completed in the operation suitable for receiving user in the receiving unit
Make the Content Transformation in file into test code, and then generates the test script for executing identical process.
As it can be seen that device shown in Fig. 2 passes through the connection between connection unit and intelligent terminal, simultaneous display and intelligent terminal
Identical displaying information on screen, and the operational order of user is synchronized to intelligent terminal to realize corresponding control, formation and intelligence
Joint-action mechanism between energy terminal, so that user, which can choose any front end, executes visual operating process to intelligent terminal;
Also, in visual operating process, each operational order relevant information of the user in front end is saved in historical operation text
In part, after the completion of operation, the Content Transformation in historical operation file is able to reflect to the survey of entire operation process at generation
Training sheet.Human cost needed for the program greatly reduces test script generating process and time cost, improve test at
This formation efficiency.
In one embodiment of the invention, specified application is installed on the intelligent terminal;Receiving unit 240, is suitable for
The operational order that user carries out the specified application on the interface of display output is received, and operational order is synchronized to described
Intelligent terminal carries out corresponding operation to the specified application to realize;Then converting unit 260 generate test script be for
The test script that the specified application is tested.
In one embodiment of the invention, the connection unit is suitable for passing through USB wired connection mode and intelligent terminal
Establish connection;Alternatively, establishing connection by WiFi radio connection and intelligent terminal.
In one embodiment of the invention, the acquiring unit, it is aobvious suitable for the synchronous screen for obtaining the intelligent terminal
While showing information, the attribute of an element information shown on screen is obtained;When the mouse of user is on the interface of display output
When being stopped on one element, shows export the attribute of an element information on the display unit.
In one embodiment of the invention, receiving unit 240 are further adapted for receiving user in historical operation file
Content modify modification instruction;Recording unit 250 is further adapted for being instructed according to the modification to the historical operation
Content in file is modified accordingly.
Fig. 3 shows a kind of test script generating means schematic diagram in accordance with another embodiment of the present invention, such as Fig. 3 institute
Show, which includes: connection unit 310, synchronous acquiring unit 320, display unit 330, receiving unit
340, recording unit 350, converting unit 360 and authentication unit 370.
Wherein, connection unit 310, synchronous acquiring unit 320, display unit 330, receiving unit 340, recording unit 350,
Converting unit 360 respectively in Fig. 2 shown device connection unit 210, synchronous acquiring unit 220, display unit 230, receive
Unit 240, recording unit 250, the correspondence of converting unit 260 are identical, and details are not described herein.
Authentication unit 370.Suitable for sending the intelligent terminal for test script generated, and transported on intelligent terminal
Row, to verify the test script.
Wherein, when the connection unit establishes connection by USB wired connection mode and intelligent terminal, pass through the USB
Test script generated is sent the intelligent terminal by wired connection;When the connection unit passes through the wireless connection side WiFi
When formula and intelligent terminal establish connection, the address of the test script is sent to the intelligent terminal by HTTP mode, with
So that intelligent terminal downloads the test script according to address.
It should be noted that each embodiment pair of method shown in each embodiment of Fig. 2 to Fig. 3 shown device and figure 1 above
It answers identical, has been described in detail above, details are not described herein.
Fig. 4 shows a kind of test script according to an embodiment of the invention and generates system schematic, as shown in figure 4,
It includes: terminal side device 410 and test script generating means 420 that the test script, which generates system 400,;Wherein, test script is raw
Identical as above-mentioned Fig. 2-test script generating means 200/300 shown in Fig. 3 at device 420, details are not described herein.
Terminal side device 410 is located in intelligent terminal, which includes:
Synchronization unit 411 generates dress suitable for obtaining the displaying information on screen of the intelligent terminal and being sent to test script
It sets, and receives the operational order that test script generating means are sent, and execute the operational order on the intelligent terminal.
In one embodiment of the invention, synchronization unit 411, suitable for obtaining the displaying information on screen of the intelligent terminal
While, the attribute of an element information shown on screen is obtained, and be sent to test script generating means together.
Fig. 5 shows a kind of test script in accordance with another embodiment of the present invention and generates system schematic, such as Fig. 5 institute
Show, it includes: terminal side device 510 and test script generating means 520 which, which generates system 500,;Wherein, test script
Generating means 520 are identical as above-mentioned test script generating means 420 shown in Fig. 4, and details are not described herein.
Terminal side device 510 includes: synchronization unit 511 and verifies execution unit 512, wherein synchronization unit 511 and Fig. 4 institute
The synchronization unit 411 shown is identical, and details are not described herein.
Execution unit 512 is verified, suitable for receiving the test script of test script generating means transmission and described intelligent whole
It is run on end;Alternatively, being suitable for receiving the address that test script generating means are sent, test script is downloaded according to the address and in institute
It states and is run on intelligent terminal.
In conclusion technical solution provided by the invention passes through the connection between intelligent terminal, simultaneous display and intelligence
The identical displaying information on screen of terminal, and the operational order of user is synchronized to intelligent terminal to realize corresponding control, it is formed
Joint-action mechanism between intelligent terminal, so that user, which can choose any front end, executes visual operation stream to intelligent terminal
Journey;Also, in visual operating process, each operational order relevant information of the user in front end is saved in historical operation
In file, after the completion of operation, the Content Transformation in historical operation file is able to reflect entire operation process at generation
Test script.Human cost needed for the program greatly reduces test script generating process and time cost improve test
Cost formation efficiency.
It should be understood that
Algorithm and display be not inherently related to any certain computer, virtual bench or other equipment provided herein.
Various fexible units can also be used together with teachings based herein.As described above, it constructs required by this kind of device
Structure be obvious.In addition, the present invention is also not directed to any particular programming language.It should be understood that can use various
Programming language realizes summary of the invention described herein, and the description done above to language-specific is to disclose this hair
Bright preferred forms.
In the instructions provided here, numerous specific details are set forth.It is to be appreciated, however, that implementation of the invention
Example can be practiced without these specific details.In some instances, well known method, structure is not been shown in detail
And technology, so as not to obscure the understanding of this specification.
Similarly, it should be understood that in order to simplify the disclosure and help to understand one or more of the various inventive aspects,
Above in the description of exemplary embodiment of the present invention, each feature of the invention is grouped together into single implementation sometimes
In example, figure or descriptions thereof.However, the disclosed method should not be interpreted as reflecting the following intention: i.e. required to protect
Shield the present invention claims features more more than feature expressly recited in each claim.More precisely, as following
Claims reflect as, inventive aspect is all features less than single embodiment disclosed above.Therefore,
Thus the claims for following specific embodiment are expressly incorporated in the specific embodiment, wherein each claim itself
All as a separate embodiment of the present invention.
Those skilled in the art will understand that can be carried out adaptively to the module in the equipment in embodiment
Change and they are arranged in one or more devices different from this embodiment.It can be the module or list in embodiment
Member or component are combined into a module or unit or component, and furthermore they can be divided into multiple submodule or subelement or
Sub-component.Other than such feature and/or at least some of process or unit exclude each other, it can use any
Combination is to all features disclosed in this specification (including adjoint claim, abstract and attached drawing) and so disclosed
All process or units of what method or apparatus are combined.Unless expressly stated otherwise, this specification is (including adjoint power
Benefit require, abstract and attached drawing) disclosed in each feature can carry out generation with an alternative feature that provides the same, equivalent, or similar purpose
It replaces.
In addition, it will be appreciated by those of skill in the art that although some embodiments described herein include other embodiments
In included certain features rather than other feature, but the combination of the feature of different embodiments mean it is of the invention
Within the scope of and form different embodiments.For example, in the following claims, embodiment claimed is appointed
Meaning one of can in any combination mode come using.
Various component embodiments of the invention can be implemented in hardware, or to run on one or more processors
Software module realize, or be implemented in a combination thereof.It will be understood by those of skill in the art that can be used in practice
Microprocessor or digital signal processor (DSP) are realized in a kind of test script generating means according to an embodiment of the present invention
Some or all components some or all functions.The present invention is also implemented as executing side as described herein
Some or all device or device programs (for example, computer program and computer program product) of method.It is such
It realizes that program of the invention can store on a computer-readable medium, or can have the shape of one or more signal
Formula.Such signal can be downloaded from an internet website to obtain, and perhaps be provided on the carrier signal or with any other shape
Formula provides.
It should be noted that the above-mentioned embodiments illustrate rather than limit the invention, and ability
Field technique personnel can be designed alternative embodiment without departing from the scope of the appended claims.In the claims,
Any reference symbol between parentheses should not be configured to limitations on claims.Word "comprising" does not exclude the presence of not
Element or step listed in the claims.Word "a" or "an" located in front of the element does not exclude the presence of multiple such
Element.The present invention can be by means of including the hardware of several different elements and being come by means of properly programmed computer real
It is existing.In the unit claims listing several devices, several in these devices can be through the same hardware branch
To embody.The use of word first, second, and third does not indicate any sequence.These words can be explained and be run after fame
Claim.
The invention discloses A1, a kind of test script generation method, wherein this method comprises:
Connection is established with intelligent terminal;
The synchronous displaying information on screen for obtaining the intelligent terminal, and simultaneous display exports;And it receives user and is showing
Operational order on the interface of output, and operational order is synchronized to the intelligent terminal to realize and carry out to the intelligent terminal
Corresponding operation;
By each operational order relevant information preservation of the user on the interface of display output into historical operation file;
When receive user operation complete instruction when, by the Content Transformation in the historical operation file at test code,
And then generate the test script for executing identical process.
A2, method as described in a1, wherein
Specified application is installed on the intelligent terminal;
The operational order that user is received on the interface of display output, and operational order is synchronized to the intelligence eventually
End is to realize that carrying out corresponding operation to the intelligent terminal includes: to receive user on the interface of display output to described specified
The intelligent terminal is synchronized to using the operational order of progress, and by operational order to realize and carry out accordingly to the specified application
Operation;
Then test script generated is the test script for being tested the specified application.
A3, method as described in a1, wherein described to establish connection with intelligent terminal and include:
Connection is established by USB wired connection mode and intelligent terminal;
Alternatively,
Connection is established by WiFi radio connection and intelligent terminal.
A4, method as described in a1, wherein this method further comprises:
While obtaining the displaying information on screen of the intelligent terminal, the attribute of an element information shown on screen is obtained;
When the mouse of user stops on an element on the interface of display output, display exports the attribute of an element
Information.
A5, method as described in a1, wherein this method further comprises:
User is received to instruct the modification that the content in historical operation file is modified;
The content in the historical operation file is modified accordingly according to modification instruction.
A6, method as described in a1, wherein this method further comprises:
The intelligent terminal is sent by test script generated, and is run on intelligent terminal, to verify the test
Script.
A7, the method as described in A6, wherein described to send the intelligent terminal for test script generated and include:
If establishing connection by USB wired connection mode and intelligent terminal, will be generated by the USB wired connection
Test script be sent to the intelligent terminal;
If establishing connection by WiFi radio connection and intelligent terminal, the address of the test script is passed through
HTTP mode is sent to the intelligent terminal, so that intelligent terminal downloads the test script according to address.
The invention also discloses B8, a kind of test script generating means, wherein the device includes:
Connection unit, suitable for establishing connection with intelligent terminal;
Synchronous acquiring unit, suitable for the synchronous displaying information on screen for obtaining the intelligent terminal, and simultaneous display is output to
Display unit;
Display unit is adapted for simultaneous display output;
Receiving unit suitable for receiving operational order of the user on the interface of display output, and operational order is synchronized to
The intelligent terminal carries out corresponding operation to the intelligent terminal to realize;
Recording unit, suitable for showing the relevant information preservation of each operational order on the interface exported to history user
In operation file;
Converting unit, when instruction is completed in the operation suitable for receiving user in the receiving unit, by the historical operation
Content Transformation in file generates the test script for executing identical process at test code.
B9, the device as described in B8, wherein specified application is installed on the intelligent terminal;
The receiving unit refers to suitable for receiving the operation that user carries out the specified application on the interface of display output
It enables, and operational order is synchronized to the intelligent terminal to realize and carry out corresponding operation to the specified application;
The test script that then converting unit generates is the test script for being tested the specified application.
B10, the device as described in B8, wherein
The connection unit, suitable for establishing connection by USB wired connection mode and intelligent terminal;Alternatively, passing through WiFi
Radio connection and intelligent terminal establish connection.
B11, the device as described in B8, wherein
The acquiring unit obtains on screen while suitable for the synchronous displaying information on screen for obtaining the intelligent terminal
The attribute of an element information of display;When the mouse of user stops on an element on the interface of display output, showing
It is shown on unit and exports the attribute of an element information.
B12, the device as described in B8, wherein
Receiving unit is further adapted for receiving the modification instruction that user modifies to the content in historical operation file;
Recording unit is further adapted for carrying out the content in the historical operation file according to the modification instruction corresponding
Modification.
B13, the device as described in B8, wherein the device further comprises:
Authentication unit.Suitable for sending the intelligent terminal for test script generated, and run on intelligent terminal,
To verify the test script.
B14, the device as described in B13, wherein
The authentication unit, suitable for establishing connection by USB wired connection mode and intelligent terminal when the connection unit
When, the intelligent terminal is sent for test script generated by the USB wired connection;Suitable for leading to when the connection unit
It crosses WiFi radio connection and when intelligent terminal establishes connection, the address of the test script is sent to by HTTP mode
The intelligent terminal, so that intelligent terminal downloads the test script according to address.
The present invention discloses C15 again, a kind of test script generates system, wherein the system includes: terminal side device and such as
Test script generating means described in any one of B8-B14;
The terminal side device is located in intelligent terminal, which includes:
Synchronization unit, suitable for obtaining the displaying information on screen of the intelligent terminal and being sent to test script generating means,
And the operational order that test script generating means are sent is received, and the operational order is executed on the intelligent terminal.
C16, the system as described in C15, wherein
The synchronization unit while displaying information on screen suitable for obtaining the intelligent terminal, is obtained and is shown on screen
Attribute of an element information, and be sent to test script generating means together.
C17, the system as described in C15, wherein the terminal side device further include:
Execution unit is verified, suitable for receiving the test script of test script generating means transmission and on the intelligent terminal
Operation;Alternatively, being suitable for receiving the address that test script generating means are sent, test script is downloaded according to the address and in the intelligence
It can be run in terminal.
Claims (19)
1. a kind of test script generation method, wherein this method comprises:
Connection is established with intelligent terminal;
The synchronous displaying information on screen for obtaining the intelligent terminal, and simultaneous display exports;And it receives user and is exported in display
Interface on operational order, and operational order is synchronized to the intelligent terminal with realize the intelligent terminal is carried out it is corresponding
Operation;
By each operational order relevant information preservation of the user on the interface of display output into historical operation file;
When instruction is completed in the operation for receiving user, by the Content Transformation in the historical operation file at test code, in turn
Generate the test script that can be run on the intelligent terminal for executing identical process;
Wherein, specified application is installed on the intelligent terminal;
The displaying information on screen is that the broker program by being injected into the intelligent terminal system process passes through the intercepting and capturing finger
What the fixed interface information about current interface using transmission obtained.
2. the method for claim 1, wherein operational order for receiving user on the interface of display output, and
Operational order is synchronized to the intelligent terminal to realize that carrying out corresponding operation to the intelligent terminal includes: to receive user to exist
Show the operational order carried out on the interface of output to the specified application, and by operational order be synchronized to the intelligent terminal with
It realizes and corresponding operation is carried out to the specified application;
Then test script generated is the test script for being tested the specified application.
3. establishing connection with intelligent terminal described in the method for claim 1, wherein includes:
Connection is established by USB wired connection mode and intelligent terminal;
Alternatively,
Connection is established by WiFi radio connection and intelligent terminal.
4. the method for claim 1, wherein this method further comprises:
While obtaining the displaying information on screen of the intelligent terminal, the attribute of an element information shown on screen is obtained;
When the mouse of user stops on an element on the interface of display output, display exports attribute of an element letter
Breath.
5. the method for claim 1, wherein this method further comprises:
User is received to instruct the modification that the content in historical operation file is modified;
The content in the historical operation file is modified accordingly according to modification instruction.
6. the method for claim 1, wherein this method further comprises:
The intelligent terminal is sent by test script generated, and is run on intelligent terminal, to verify the test script.
7. method as claimed in claim 6, wherein described to send the intelligent terminal packet for test script generated
It includes:
If establishing connection by USB wired connection mode and intelligent terminal, pass through the USB wired connection for survey generated
Training is originally sent to the intelligent terminal;
If establishing connection by WiFi radio connection and intelligent terminal, the address of the test script is passed through into HTTP
Mode is sent to the intelligent terminal, so that intelligent terminal downloads the test script according to address.
8. a kind of test script generating means, wherein the device includes:
Connection unit, suitable for establishing connection with intelligent terminal;
Synchronous acquiring unit, suitable for the synchronous displaying information on screen for obtaining the intelligent terminal, and simultaneous display is output to display
Unit;
Display unit is adapted for simultaneous display output;
Receiving unit suitable for receiving operational order of the user on the interface of display output, and operational order is synchronized to described
Intelligent terminal carries out corresponding operation to the intelligent terminal to realize;
Recording unit, suitable for showing the relevant information preservation of each operational order on the interface exported to historical operation user
In file;
Converting unit, when instruction is completed in the operation suitable for receiving user in the receiving unit, by the historical operation file
In Content Transformation at test code, and then generate execute identical process the test foot that can be run on the intelligent terminal
This;
Wherein, specified application is installed on the intelligent terminal;
The displaying information on screen is that the broker program by being injected into the intelligent terminal system process passes through the intercepting and capturing finger
What the fixed interface information about current interface using transmission obtained.
9. device as claimed in claim 8, wherein
The receiving unit, the operational order that the specified application is carried out on the interface of display output suitable for receiving user,
And operational order is synchronized to the intelligent terminal to realize and carry out corresponding operation to the specified application;
The test script that then converting unit generates is the test script for being tested the specified application.
10. device as claimed in claim 8, wherein
The connection unit, suitable for establishing connection by USB wired connection mode and intelligent terminal;Alternatively, wireless by WiFi
Connection type and intelligent terminal establish connection.
11. device as claimed in claim 8, wherein
The acquiring unit is obtained and is shown on screen while suitable for the synchronous displaying information on screen for obtaining the intelligent terminal
Attribute of an element information;When the mouse of user stops on an element on the interface of display output, in display unit
Upper display exports the attribute of an element information.
12. device as claimed in claim 8, wherein
Receiving unit is further adapted for receiving the modification instruction that user modifies to the content in historical operation file;
Recording unit is further adapted for being instructed according to the modification and be repaired accordingly to the content in the historical operation file
Change.
13. device as claimed in claim 8, wherein the device further comprises:
Authentication unit suitable for sending the intelligent terminal for test script generated, and is run on intelligent terminal, to test
Demonstrate,prove the test script.
14. device as claimed in claim 13, wherein
The authentication unit, suitable for leading to when the connection unit establishes connection by USB wired connection mode and intelligent terminal
It crosses the USB wired connection and sends the intelligent terminal for test script generated;Suitable for passing through when the connection unit
When WiFi radio connection and intelligent terminal establish connection, the address of the test script is sent to institute by HTTP mode
Intelligent terminal is stated, so that intelligent terminal downloads the test script according to address.
15. a kind of test script generates system, wherein the system includes: any in terminal side device and such as claim 8-14
Test script generating means described in;
The terminal side device is located in intelligent terminal, which includes:
Synchronization unit, suitable for obtaining the displaying information on screen of the intelligent terminal and be sent to test script generating means, and
The operational order that test script generating means are sent is received, and executes the operational order on the intelligent terminal.
16. system as claimed in claim 15, wherein
The synchronization unit while displaying information on screen suitable for obtaining the intelligent terminal, obtains the member shown on screen
The attribute information of element, and it is sent to test script generating means together.
17. system as claimed in claim 15, wherein the terminal side device further include:
Execution unit is verified, suitable for receiving the test script of test script generating means transmission and transporting on the intelligent terminal
Row;Alternatively, being suitable for receiving the address that test script generating means are sent, test script is downloaded according to the address and in the intelligence
It is run in terminal.
18. a kind of electronic equipment, wherein include: processor;And it is arranged to the storage of storage computer executable instructions
Device, the executable instruction make the processor execute method according to any one of claims 1-7 when executed.
19. a kind of computer readable storage medium, wherein the computer-readable recording medium storage one or more program,
One or more of programs are when the electronic equipment for being included multiple application programs executes, so that the electronic equipment executes root
According to method of any of claims 1-7.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201510633183.5A CN105224456B (en) | 2015-09-29 | 2015-09-29 | A kind of test script generation method, device and system |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201510633183.5A CN105224456B (en) | 2015-09-29 | 2015-09-29 | A kind of test script generation method, device and system |
Publications (2)
Publication Number | Publication Date |
---|---|
CN105224456A CN105224456A (en) | 2016-01-06 |
CN105224456B true CN105224456B (en) | 2019-05-31 |
Family
ID=54993441
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201510633183.5A Active CN105224456B (en) | 2015-09-29 | 2015-09-29 | A kind of test script generation method, device and system |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN105224456B (en) |
Cited By (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN112003928A (en) * | 2020-08-21 | 2020-11-27 | 深圳市康冠智能科技有限公司 | Multifunctional screen synchronous control method, device and equipment |
Families Citing this family (12)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN108306778A (en) * | 2016-09-01 | 2018-07-20 | 深圳市中兴微电子技术有限公司 | A kind of mobile terminal test method, device and system |
CN106874190B (en) * | 2016-12-30 | 2018-03-16 | 上海壹账通金融科技有限公司 | The method of testing and server of user interface |
CN107145440B (en) * | 2017-04-06 | 2020-07-24 | 百富计算机技术(深圳)有限公司 | Application program testing method and device and computer equipment |
CN108804302B (en) * | 2017-05-04 | 2023-04-18 | 腾讯科技(深圳)有限公司 | Remote testing method, system and related equipment |
CN108763086B (en) * | 2018-05-31 | 2024-04-02 | 康键信息技术(深圳)有限公司 | Script recording method, terminal and computer readable storage medium based on remote true machine |
CN109542775B (en) * | 2018-11-05 | 2021-07-30 | 北京云测信息技术有限公司 | Test script generation and execution method and device |
CN111382424A (en) * | 2018-12-27 | 2020-07-07 | 全球能源互联网研究院有限公司 | Mobile application sensitive behavior detection method and system based on controlled environment |
CN110928787B (en) * | 2019-11-22 | 2023-04-11 | 北京博睿宏远数据科技股份有限公司 | Automatic test script recording and playback method, device, equipment and storage medium |
CN112866312A (en) * | 2019-11-27 | 2021-05-28 | 北京奇艺世纪科技有限公司 | Script generation method, remote operation method and related equipment |
CN111966435A (en) * | 2020-07-14 | 2020-11-20 | 维沃移动通信有限公司 | Operation flow sharing method and device of electronic equipment |
CN113282502A (en) * | 2021-06-04 | 2021-08-20 | 青岛海尔科技有限公司 | Script generation method, device, storage medium and electronic device |
CN114338490A (en) * | 2021-12-30 | 2022-04-12 | 奇安信科技集团股份有限公司 | Test method and test management module of terminal equipment |
Citations (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN103365779A (en) * | 2013-07-09 | 2013-10-23 | 广东欧珀移动通信有限公司 | Software test method and system |
CN104679627A (en) * | 2013-12-02 | 2015-06-03 | 腾讯科技(深圳)有限公司 | Testing method and device |
Family Cites Families (6)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN101620564B (en) * | 2008-06-30 | 2011-10-19 | 福建升腾资讯有限公司 | Method for automatically testing recording playback mode of terminal system |
CN101620565B (en) * | 2008-07-04 | 2012-05-09 | 福建升腾资讯有限公司 | Method for automatically testing functions of terminal system |
CN102419732B (en) * | 2011-12-27 | 2015-03-18 | Tcl集团股份有限公司 | Android-platform-based automated testing method and testing tool |
CN102799428A (en) * | 2012-06-28 | 2012-11-28 | 北京大学 | Operation recording and playback method for interactive software |
TWI510913B (en) * | 2013-11-12 | 2015-12-01 | Inst Information Industry | Testing device and testing method thereof |
CN104881364A (en) * | 2015-06-26 | 2015-09-02 | 上海斐讯数据通信技术有限公司 | Automated testing method and system applied to Android system |
-
2015
- 2015-09-29 CN CN201510633183.5A patent/CN105224456B/en active Active
Patent Citations (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN103365779A (en) * | 2013-07-09 | 2013-10-23 | 广东欧珀移动通信有限公司 | Software test method and system |
CN104679627A (en) * | 2013-12-02 | 2015-06-03 | 腾讯科技(深圳)有限公司 | Testing method and device |
Cited By (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN112003928A (en) * | 2020-08-21 | 2020-11-27 | 深圳市康冠智能科技有限公司 | Multifunctional screen synchronous control method, device and equipment |
CN112003928B (en) * | 2020-08-21 | 2021-06-25 | 深圳市康冠智能科技有限公司 | Multifunctional screen synchronous control method, device and equipment |
Also Published As
Publication number | Publication date |
---|---|
CN105224456A (en) | 2016-01-06 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN105224456B (en) | A kind of test script generation method, device and system | |
CN106021102B (en) | The generation method and device of automatic test file | |
US9274935B1 (en) | Application testing system with application programming interface | |
CN108733552B (en) | FPGA remote debugging system and remote debugging method | |
US9910764B2 (en) | Automated software testing | |
US10235477B2 (en) | Prototyping an image processing algorithm and emulating or simulating execution on a hardware accelerator to estimate resource usage or performance | |
CN107688529B (en) | Component debugging method and device | |
CN105094783A (en) | Method and device for testing Android application stability | |
JP2014510482A (en) | System and method for testing content of a mobile communication device | |
CN105653056B (en) | The test method and device of input method | |
US20180039559A1 (en) | Method and apparatus for creating reference images for an automated test of software with a graphical user interface | |
CN110196809B (en) | Interface testing method and device | |
US20190171546A1 (en) | Application screen mapping for mobile analytics | |
CN106649114B (en) | The method and apparatus that application crash is positioned | |
CN106708528A (en) | Script generating method and device | |
CN105760300B (en) | A kind of automated testing method and test macro of STK/UTK business | |
CN105224457B (en) | A kind of test frame implementation method and device | |
US9823996B2 (en) | Debugging code for controlling intelligent devices using log data from executed object code | |
CN106325647B (en) | A kind of UI method of adjustment, device and mobile terminal | |
CN105893235B (en) | A kind of emulation test method, device and server | |
US20150286374A1 (en) | Embedded System User Interface Design Validator | |
CN104834594B (en) | Web system method of testing and device | |
JP2006309290A (en) | Method and device for supporting preparation of test program | |
JP6130011B1 (en) | Software operation verification apparatus and software operation verification method | |
US10678681B2 (en) | Method and device for automatic testing |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
C06 | Publication | ||
PB01 | Publication | ||
C10 | Entry into substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
GR01 | Patent grant | ||
GR01 | Patent grant | ||
TR01 | Transfer of patent right | ||
TR01 | Transfer of patent right |
Effective date of registration: 20220707 Address after: Room 801, 8th floor, No. 104, floors 1-19, building 2, yard 6, Jiuxianqiao Road, Chaoyang District, Beijing 100015 Patentee after: BEIJING QIHOO TECHNOLOGY Co.,Ltd. Address before: 100088 room 112, block D, 28 new street, new street, Xicheng District, Beijing (Desheng Park) Patentee before: BEIJING QIHOO TECHNOLOGY Co.,Ltd. Patentee before: Qizhi software (Beijing) Co.,Ltd. |