CN109324966A - A kind of generation and execution method and device of test script - Google Patents
A kind of generation and execution method and device of test script Download PDFInfo
- Publication number
- CN109324966A CN109324966A CN201811099248.2A CN201811099248A CN109324966A CN 109324966 A CN109324966 A CN 109324966A CN 201811099248 A CN201811099248 A CN 201811099248A CN 109324966 A CN109324966 A CN 109324966A
- Authority
- CN
- China
- Prior art keywords
- terminal
- test
- test operation
- script
- executed
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Granted
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/3684—Test management for test design, e.g. generating new test cases
Abstract
The generation and execution method and device that the present invention discloses a kind of test script improve the compatibility of test script, to improve the success rate and efficiency of test when for different mobile terminal generation test script.In script generation phase, a terminal and preset testing requirement can be first directed to, generate a test operation, and this test operation is executed in each terminal, when executing the terminal of failure if it exists, then a terminal is selected again from the terminal for executing failure, regenerate a new test operation, and this new test operation is executed by the terminal of each failure, if there is also the terminals for executing failure, aforesaid operations can then be repeated, until each terminal can be with one test operation of successful execution, test script can be generated according to the set of whole test operations at this time.In the script execution stage, each test operation in test script can be executed, by each terminal so as to utmostly ensure the available test result of each terminal.
Description
Technical field
The present invention relates to the generation methods and device of field of computer technology more particularly to a kind of test script, Yi Jiyi
The execution method and device of kind test script.
Background technique
As the continuous development of mobile terminal software and hardware has developed various answer for the various demands for meeting user
Use program.And for the function in application program, it is generally also required to be tested in automatic test environment.In test process
In, usually the test script comprising fc-specific test FC operation can be prerecorded out, for example can be according to different testing requirements
It operates, comprising the identification for image, text for the test script of shot operation, the data download operation of display interface etc..
The manufacturer of mobile terminal has produced a variety of different mobile terminals in product is developed and improved, than
As that can have different screen size, different screen shape, include different key.And the developer of application program is usual
Can by oneself exploitation application program fit in different terminals, such as fit in different screen size, different screen shape,
It,, may be different in different mobile terminals so as to cause the interface of identical function in mobile terminal comprising different key
Display mode, mode of operation etc..
So when executing the same test script in the interface of identical function, may due to the difference of mobile terminal, and
Appearance is unable to get the compatibility issues such as test result or result mistake.So needing to propose a kind of scheme, improve for difference
The compatibility of mobile terminal improves success rate and efficiency when carrying out automatic test to different mobile terminal.
Summary of the invention
The embodiment of the present invention provides the generation method and device of a kind of test script, for raw for different mobile terminal
When at test script, the compatibility of test script is improved.
The embodiment of the present invention provides a kind of execution method and device of test script, for executing to different mobile terminal
When test script, the success rate and efficiency of test are improved.
In order to solve the above technical problems, the embodiments of the present invention are implemented as follows:
The embodiment of the present invention adopts the following technical solutions:
A kind of generation method of test script, comprising:
In the n-th terminal of each of the n-th terminal set, the n-th test operation is executed, n-th test operation is according to
The control of n-th terminal in n-th terminal set and preset testing requirement generate, and n is positive integer;
When executing n-th test operation failure there are the n-th terminal, according to execution the n-th test operation failure
N-th terminal determines the (n+1)th terminal set;
In the (n+1)th terminal of each of the (n+1)th terminal set, the (n+1)th test operation, (n+1)th test are executed
Operation is generated according to the control and the preset testing requirement of (n+1)th terminal in the (n+1)th terminal set;
When each (n+1)th terminal, which executes (n+1)th test operation, to succeed, according to the collection of preceding n+1 test operation
Symphysis is at test script.
A kind of execution method of test script, comprising:
Each terminal test script comprising at least one test operation being sent in terminal set;
In each terminal, each test operation in the test script is executed respectively.
A kind of generating means of test script, comprising: the first execution unit, set determination unit, the second execution unit, with
And script generation unit, wherein
First execution unit, for executing the n-th test operation, institute in the n-th terminal of each of the n-th terminal set
The n-th test operation is stated according to the control element and preset testing requirement of n-th terminal in the n-th terminal set
It generates, n is positive integer;
The set determination unit is used for when executing n-th test operation failure there are the n-th terminal, according to execution
N-th terminal of the n-th test operation failure, determines the (n+1)th terminal set;
Second execution unit is surveyed in the (n+1)th terminal of each of the (n+1)th terminal set, executing (n+1)th
Examination operation, (n+1)th test operation according to the control element of (n+1)th terminal in the (n+1)th terminal set and
The preset testing requirement generates;
The script generation unit is used for when each (n+1)th terminal executes (n+1)th test operation and succeeds, root
Test script is generated according to the set of preceding n+1 test operation.
A kind of executive device of test script, comprising: script transmission unit and script executing unit, wherein
The script transmission unit, for will include that the test script of at least one test operation is sent in terminal set
Each terminal;
The script executing unit, for executing each survey in the test script respectively in each terminal
Examination operation.
A kind of terminal device, the terminal device include processor, memory and are stored on the memory and can be in institute
The computer program run on processor is stated, the step of the above method is realized when the computer program is executed by the processor
Suddenly.
A kind of computer readable storage medium stores computer program, the meter on the computer readable storage medium
The step of above method is realized when calculation machine program is executed by processor.
It, can be in the n-th terminal set by the technical solution of above embodiments offer as it can be seen that generating the test script stage
N-th terminal is selected, and the n-th test operation is being generated according to the control of n-th terminal and preset testing requirement
Afterwards, the n-th test operation is executed in the n-th terminal of each of the n-th terminal set, it, can be with when there is the n-th terminal for executing failure
Determine the (n+1)th terminal set according to the n-th terminal for executing failure, and select (n+1)th terminal, according to this (n+1)th
After the control of terminal and preset testing requirement generate the (n+1)th test operation again, in each of (n+1)th terminal set
The (n+1)th test operation is executed in (n+1)th terminal, when each (n+1)th terminal execute the (n+1)th test operation it is successful when, then can be with
Test script is generated according to the set of preceding n+1 test operation.The test script stage is being executed, test operation can will be included
Test script is sent respectively to each terminal to be measured, and executes the behaviour of each test in test script respectively by each terminal to be measured
Make, to realize test.That is, a terminal and preset testing requirement can be first directed to, a test operation is generated, and
This test operation is executed in each terminal, when executing the terminal of failure if it exists, is then chosen again from the terminal for executing failure
A terminal out regenerates a new test operation, and executes this new test operation by the terminal of each failure, if also
In the presence of execute failure terminal, then can repeat aforesaid operations, until each terminal can with one test operation of successful execution,
Test script can be generated according to the set of whole test operations at this time.It, can be by each terminal in implementation procedure hereafter
Each test operation in test script is executed, utmostly ensures the available test result of each terminal.Pass through the party
Method can generate available test script for different mobile terminals, to improve the compatibility of test script, Jin Er
When executing test script to different mobile terminal, the success rate and efficiency of test are improved.
Detailed description of the invention
It in order to illustrate the embodiments of the present invention more clearly or existing technical solution, below will be to embodiment or the prior art
Attached drawing needed in description is briefly described, it should be apparent that, the accompanying drawings in the following description is only in the present invention
The some embodiments recorded without any creative labor, may be used also for those of ordinary skill in the art
To obtain other drawings based on these drawings.
Fig. 1 is the flow diagram of the generation method of test script provided in an embodiment of the present invention;
Fig. 2 is the schematic diagram of the generation method of test script provided in an embodiment of the present invention;
Fig. 3 is the flow diagram of the execution method of test script provided in an embodiment of the present invention;
Fig. 4 is the schematic diagram of the execution method of test script provided in an embodiment of the present invention;
Fig. 5 is the structural schematic diagram of the generating means of test script provided in an embodiment of the present invention;
Fig. 6 is the structural schematic diagram of the executive device of test script provided in an embodiment of the present invention;
Fig. 7 is the structural schematic diagram of electronic equipment provided in an embodiment of the present invention;
Fig. 8 is the structural schematic diagram of electronic equipment provided in an embodiment of the present invention.
Specific embodiment
To make the object, technical solutions and advantages of the present invention clearer, below in conjunction with specific embodiment and accordingly
Technical solution of the present invention is clearly and completely described in attached drawing.Obviously, described embodiment is only a part of the invention
Embodiment, instead of all the embodiments.Based on the embodiments of the present invention, those of ordinary skill in the art are not making wound
Every other embodiment obtained under the premise of the property made labour, shall fall within the protection scope of the present invention.
Below in conjunction with attached drawing, each embodiment provides during the present invention will be described in detail technical solution.
Embodiment 1
As previously mentioned, the manufacturer of mobile terminal from screen size, resolution ratio, shape to key, produced it is various not
Same mobile terminal, and the developer of application program would generally carry out adaptation for different mobile terminal.So may go out
In present different terminals, even if the interface of identical function, the content of display is also possible to be deviated.For example, for letter to be measured
It the display position of breath the considerations of developer is for visual effect, can will be in different screen size and different resolution
Measurement information setting is shown in different positions.
And in automatic test, tester would generally have the mobile terminal of higher generation table that test is arranged for several moneys
Script, so as to be compatible with more mobile terminal as far as possible.However in practical applications, partial movement terminal still is executing
After test script, the compatibility that can not successfully obtain test result namely script is poor, and has an effect on the efficiency of test.So
Based on this demand, the embodiment of the present invention provides a kind of generation method of test script, can be raw for different mobile terminal
When at test script, the compatibility of test script is improved, to make different terminals can be complete by the test script of generation
At automatic test.Idiographic flow schematic diagram is as shown in Figure 1, comprising:
Step 102: in the n-th terminal of each of the n-th terminal set, executing the n-th test operation.
It can be mobile terminal configuration test operation to be measured in the test preparation stage.For example the test operation can be use
In obtain in application program display interface to measurement information, such as character, numerical value, image, video, etc.;It can also be for testing
The function of some key in the application such as returns to operation, handover operation, etc..And it may include at least one in test operation
A step, such as search, obtain, intercepting, triggering and etc..And in the test preparation stage, it will usually be carried out repeatedly to mobile terminal
Test, so that it is determined that can mobile terminal smoothly obtain test result after executing the test operation out.
So in this step, pre-generated test operation can be executed by each terminal first in terminal set.Tool
Body, which can be the set of terminal to be measured, for example, may include several brand, screen size, resolution ratio,
The not all the same mobile terminal of shape, key can also be mainstream model etc. on sale at present.And pre-generated test behaviour
Make, can be according to the control of a terminal in terminal set and the generation of preset testing requirement.Wherein, control can be with
It is a kind of graphical user-interface element, the information arrangement of display can be changed by user, such as form or text box.Control definition
The characteristics of can be for data-oriented it is direct operation individual interaction point is provided.Control can be a kind of basic visual component
Block, the interactive operation comprising in the application, controlling all data of program processing and about these data.
And tester can choose a terminal when generating test operation for mobile terminal in terminal set, and
After the control for obtaining the application program in the terminal, test operation is generated according to preset testing requirement.Than as it was noted above,
Numerical value element, pictorial element etc. can be selected from the control got, so as to according to preset testing requirement, life
At test operation, test operation, can execute respectively in each terminal accordingly.
Inventive concept of the invention mainly can be one terminal of selection from terminal set, generate test behaviour for the terminal
Make, and execute the test operation in each terminal, a terminal will be selected again in the terminal for executing failure, then execute mistake for this
The terminal lost generates new test operation, to gradually make each terminal in terminal set that can complete by test operation
Test.So in this step, terminal set can be used as the n-th terminal set, wherein including multiple n-th terminals, eventually according to n-th
The test operation that the control of n-th terminal in the set of end and preset testing requirement generate can be used as the n-th operation,
Wherein n can be positive integer.That is, when n is 1 namely tester is started as termination set symphysis into test script, the terminal
Set can be used as the 1st terminal set, and each terminal therein can be used as the 1st terminal, generate for one of those the 1st terminal
Test operation can be the 1st test operation.
As shown in Fig. 2, the schematic diagram of the generation method for test script, wherein may include 8 in the 1st terminal set
1st terminal has respective number respectively, can therefrom select a mobile terminal, for example can select " the 1st terminal-
7. ", to generate the 1st test operation, and by each 1st terminal point according to the control of the terminal and preset testing requirement
The 1st test operation is not executed.
Step 104: when executing the failure of the n-th test operation there are the n-th terminal, according to execution the n-th test operation failure
N-th terminal determines the (n+1)th terminal set.
By the agency of above, in different terminals, even if the interface of identical function, the content of display is also possible to
Deviation, so in abovementioned steps test operation can be generated for a terminal in terminal set to be measured, and by the set
Each terminal execute respectively, but execute result may be that can obtain test result, it is also possible to be unable to get test result.
It should be noted that terminal signified in the present invention executes the successful situation of test operation, it can refer to that terminal can be by holding
Row test operation and obtain desired test result, for terminal execute test operation failure, then can refer to that terminal is executing
Desired test result is unable to get after test operation.So in order to keep the test script generated with higher simultaneous
Capacitive can generate one again and execute test operation failure according to the terminal for executing test operation failure in this step
Terminal set.To generate test operation again in subsequent process for the terminal in this terminal set.
Specifically, the by the agency of in abovementioned steps, can select n-th terminal, and be in the n-th terminal set
The terminal generates the n-th test operation, so as to execute the n-th test operation by each n-th terminal, so in this step, when
When determining to execute the failure of the n-th test operation there are the n-th terminal, it can determine that execute the failure of the n-th test operation n-th is whole
End, and the n-th terminal to fail is executed according to these, then determine the (n+1)th terminal set.Such as the citing of abovementioned steps, when n is 1,
Namely tester, when starting as termination set symphysis into test script, each 1st terminal can execute the 1st test operation respectively,
When executing the failure of the 1st test operation there are the 1st terminal, can be determined according to the 1st terminal for executing the failure of the 1st test operation
2nd terminal set out.And specific method of determination can be and determine the 1st terminal of whole the 1st test operation of execution failures
For the 2nd terminal set;It can also be according to the similarity between terminal, from all 1st terminals for executing the failure of the 1st test operation
In, the higher terminal of similarity is selected, the 2nd terminal set is formed, etc..
As shown in Fig. 2, executing the 1st test operation after each 1st terminal executes the 1st test operation there are 3 terminals and losing
It loses, specially " the 1st terminal-is 3. ", " the 1st terminal-is 4. " and " the 1st terminal-is 8. ", so as to be determined as this 3 terminals
2nd terminal set.
In practical applications, the n-th test operation is generated even from n-th terminal in the n-th terminal set, also had
Test result can not be obtained by the n-th test operation by being likely to occur this n-th terminal, so in one embodiment, in order to
It enables the terminals to obtain test result by test operation, this method can also include: when each n-th terminal executes the n-th test
When operation fails, the n-th test operation is deleted, in the n-th terminal of each of the n-th terminal set, n-th regenerated is executed and surveys
Examination operation, wherein n-th test operation regenerated according to the control of n-th terminal in the n-th terminal set and
Preset testing requirement regenerates.That is, as shown in Fig. 2, the 1st test operation can be executed in each 1st terminal, if often
When the 1st test operation of a 1st terminal execution fails, then the 1st terminal can be chosen again again from the 1st terminal set,
For example " the 1st terminal-is 1. " can be selected, or " the 1st terminal-is 7. " can be selected again, and be directed to the terminal selected,
The 1st test operation is regenerated, and this 1st test operation regenerated is executed by each 1st terminal.
Step 106: in the (n+1)th terminal of each of the (n+1)th terminal set, executing the (n+1)th test operation.
The (n+1)th terminal set is defined according to the terminal for executing the failure of the n-th test operation in abovementioned steps, so being
The terminal in the (n+1)th terminal set is set can also to successfully complete test according to test script.This step can be similar to step
102, (n+1)th terminal is selected from the (n+1)th terminal set, and according to the control of the (n+1)th terminal and preset test
Demand generates the (n+1)th test operation, and executes the (n+1)th test operation by each (n+1)th terminal, so as to test each n-th+
1 terminal can reach testing requirement by the (n+1)th test operation.That is, such as the citing of abovementioned steps, when n is 1, in the 2nd collection
In the 2nd terminal of each of conjunction, the 2nd test operation is executed, and the 2nd test operation can be according in the 2nd terminal set
The 2nd terminal control and preset testing requirement generate.
As shown in Fig. 2, " the 1st terminal-is 4. " can be selected from the 2nd terminal set, thus according to the control of the terminal
And preset testing requirement, the 2nd test operation is generated, and the 1st test operation is executed by each 2nd terminal respectively.
Step 108: when each (n+1)th terminal, which executes the (n+1)th test operation, to succeed, according to preceding n+1 test operation
Set generate test script.
In the previous step, the (n+1)th test operation is generated for (n+1)th terminal in the (n+1)th terminal set, and by
Each (n+1)th terminal executes (n+1)th test operation, in this step, however, it is determined that goes out each (n+1)th terminal and executes the (n+1)th survey
Examination operation is successful, it may be considered that (n+1)th tests the terminal in compatible (n+1)th terminal set, and in abovementioned steps, n-th
Test operation has been compatible with the terminal in the n-th terminal set, and the incompatible part of the n-th test operation is grasped by the (n+1)th test
It is compatible with.So in this step, so that it may generate test script according to the set of preceding n+1 test operation.Namely according to working as
It, then can be according to (the i.e. the 1st test of preceding 2 test operations when each 2nd terminal, which executes the 2nd test operation, to succeed when n=1
Operation and the 2nd test operation) set generate may include in test script namely the test script there are two test behaviour
Make.
As shown in Fig. 2, when each 2nd terminal execute the 2nd test operation it is successful when, can according to the 1st test operation and
The set of 2nd test operation generates the test script for being directed to all mobile terminals.Then in test environment hereafter, each end
End can complete testing requirement according to the test script.
In practical applications, it can make each terminal that can test by one by way of repeating the above steps
Operation reaches testing requirement, for example, each 2nd terminal is when executing 2 test operation, it is also possible to occur executing the to fail
2 terminals then can be determined as the 3rd terminal set, and generate according to one of them the 3rd terminal in the 2nd terminal that will execute failure
3rd test operation, then the 3rd test operation is executed by each 3rd terminal, until each terminal can be by executing one n-th
Until test operation obtains test result, then using the 1st test operation, the 2nd test operation, until the n-th test operation as gather
Generate test script.
And in practical applications, it is possible to the test operation for occurring generating for the first time can meet all terminals,
The 1st test operation generated according to the 1st terminal, each 1st terminal can obtain test result, institute by execution
With in one embodiment, this method can also include: when n is 1, and when to execute the 1st test operation equal for each 1st terminal
When success, test script is generated according to the 1st test operation.That is, if the 1st test operation generated for the first time, Ke Yiyou
Each 1st terminal executes to obtain test result, then can generate test script according to the 1st test operation.
The method provided by above embodiments can be chosen as it can be seen that generating the test script stage in the n-th terminal set
N-th terminal out, and after generating the n-th test operation according to the control of n-th terminal and preset testing requirement,
The n-th test operation is executed in the n-th terminal of each of n-th terminal set, it, can basis when there is the n-th terminal for executing failure
The n-th terminal for executing failure determines the (n+1)th terminal set, and selects (n+1)th terminal, according to (n+1)th terminal
Control and after preset testing requirement generates the (n+1)th test operation again, in each of (n+1)th terminal set (n+1)th
The (n+1)th test operation is executed in terminal, it, then can be before when each (n+1)th terminal, which executes the (n+1)th test operation, to succeed
The set of n+1 test operation generates test script.That is, a terminal and preset testing requirement can be first directed to, generate
One test operation, and this test operation is executed in each terminal, when executing the terminal of failure if it exists, then from executing mistake
A terminal is selected in the terminal lost again, regenerates a new test operation, and this is executed by the terminal of each failure
New test operation, if aforesaid operations can be repeated there is also the terminal for executing failure, until each terminal can succeed
A test operation is executed, test script can be generated according to the set of whole test operations at this time.In this way, can be
Different mobile terminals generates available test script, to improve the compatibility of test script, and then to different shiftings
When dynamic terminal executes test script, the success rate and efficiency of test are improved.
Embodiment 2
Based on identical invention thinking, the embodiment of the present invention provides a kind of execution method of test script, can be used for
When executing test script to different mobile terminal, the success rate and efficiency of test are improved.The method that embodiment 1 is introduced can be in foot
This generation phase, and the method for the present embodiment introduction can be in the script execution stage, the idiographic flow schematic diagram of this method can be with
As shown in Figure 3, comprising:
Step 202: each terminal test script comprising at least one test operation being sent in terminal set.
In script generation phase, the test script comprising at least one test operation is generated, can specifically include
1st test operation, the 2nd test operation, until the n-th test operation, it is also possible to only include the 1st test operation.In this step, then
The each terminal that test script can be sent in terminal set, so that by each terminal foot can be tested with automated execution
This.Such as shown in figure 4, when the test script comprising at least one test operation can be sent to script generation phase
The 1st terminal of each of 1 terminal set, and test script is executed by each 1st terminal respectively.In this step, executing subject
It can be the terminal or server-side of user's control automatic test, be connected respectively with each terminal to be measured, so as to survey
Training is originally sent in each terminal.
Step 204: in each terminal, executing each test operation in the test script respectively.
According to the introduction of embodiment 1 it is found that each test operation may fit if there is multiple test operations in test script
Part terminal is matched, so in this step, each test behaviour in the test script can be executed respectively in each terminal
Make.As shown in figure 4, the 1st test operation and the 2nd test operation are executed in each terminal respectively.As shown in Figure 2, at 8
In mobile terminal, " the 1st terminal-is 3. ", " the 1st terminal-is 4. " and " the 1st terminal-is 8. " can be realized certainly by the 2nd test operation
Dynamicization test, and remaining terminal then can realize automatic test by the 1st test operation.That is, in script generation phase
The test operation of adaptation is generated for different terminals, then in the script execution stage, each terminal can be according to wherein at least one
A test operation obtains test result, realizes automatic operation.In this step, executing subject can be user's control automation
The terminal or server-side of test are connected with each terminal to be measured respectively, so as to trigger each terminal, execute the test foot
This.
It, can be by the survey comprising test operation by the method for above embodiments offer as it can be seen that executing the test script stage
Training is originally sent respectively to each terminal to be measured, and executes the behaviour of each test in test script respectively by each terminal to be measured
Make, to realize test.That is, in the process of implementation, each test operation in test script can be executed by each terminal,
Utmostly ensure the available test result of each terminal.In this way, since pre-generated test script has
Higher compatibility, and then when executing test script to different mobile terminal, improve the success rate and efficiency of test.
Embodiment 3
Based on identical design, the embodiment of the present invention 3 provides a kind of generating means of test script, can be for not
When generating test script with mobile terminal, the compatibility of test script is improved, to make different terminals that can pass through generation
Test script complete automatic test.The structural schematic diagram of the device is as shown in Figure 5, comprising: the first execution unit 302, collection
Close determination unit 304, the second execution unit 306 and script generation unit 308, wherein
First execution unit 302 can be used in each of the n-th terminal set the n-th terminal, execute the n-th test operation,
N-th test operation is generated according to the control of n-th terminal in the n-th terminal set and preset testing requirement, and n is positive
Integer;
Gather determination unit 304, can be used for when there is the n-th terminal and execute the failure of the n-th test operation, according to execution the
N-th terminal of n test operation failure, determines the (n+1)th terminal set;
Second execution unit 306 can be used in each of the (n+1)th terminal set the (n+1)th terminal, executes (n+1)th and surveys
Examination operation, the (n+1)th test operation is according to the control and preset test need of (n+1)th terminal in the (n+1)th terminal set
It seeks survival into;
Script generation unit 308 can be used for when each (n+1)th terminal executes the (n+1)th test operation and succeeds, according to
The set of preceding n+1 test operation generates test script
In one embodiment, when n is 1, script generation unit 308 be can be also used for:
When each 1st terminal, which executes the 1st test operation, to succeed, test script is generated according to the 1st test operation.
In one embodiment, which further includes that script deletes unit,
Script deletes unit, can be used for deleting the n-th test when each n-th terminal executes the n-th test operation and fails
Operation;
First execution unit 302 can be also used in each of the n-th terminal set the n-th terminal, executes and regenerates
N-th test operation, the n-th test operation regenerated according to the control element of n-th terminal in the n-th terminal set, with
And preset testing requirement regenerates.
Embodiment 4
Based on identical design, the embodiment of the present invention 4 provides a kind of executive device of test script, can be used for right
When different mobile terminal executes test script, the success rate and efficiency of test are improved.The device can be applied to server-side, specifically
Flow diagram is as shown in Figure 6, comprising: script transmission unit 402 and script executing unit 404, wherein
Script transmission unit 402 can be used for the test script comprising at least one test operation being sent to termination set
Each terminal in conjunction;
Script executing unit 404 can be used in each terminal, execute each test behaviour in test script respectively
Make.
The device provided by above embodiments can be chosen as it can be seen that generating the test script stage in the n-th terminal set
N-th terminal out, and after generating the n-th test operation according to the control of n-th terminal and preset testing requirement,
The n-th test operation is executed in the n-th terminal of each of n-th terminal set, it, can basis when there is the n-th terminal for executing failure
The n-th terminal for executing failure determines the (n+1)th terminal set, and selects (n+1)th terminal, according to (n+1)th terminal
Control and after preset testing requirement generates the (n+1)th test operation again, in each of (n+1)th terminal set (n+1)th
The (n+1)th test operation is executed in terminal, it, then can be before when each (n+1)th terminal, which executes the (n+1)th test operation, to succeed
The set of n+1 test operation generates test script.The test script stage is being executed, it can be by the test foot comprising test operation
Originally it is sent respectively to each terminal to be measured, and each test operation in test script is executed by each terminal to be measured respectively, from
And realize test.That is, a terminal and preset testing requirement can be first directed to, a test operation is generated, and each
This test operation is executed in terminal, when executing the terminal of failure if it exists, then selects one again from the terminal for executing failure
A terminal regenerates a new test operation, and executes this new test operation by the terminal of each failure, if there is also
The terminal for executing failure, then can repeat aforesaid operations, until each terminal can be with one test operation of successful execution, at this time
Test script can be generated according to the set of whole test operations.In implementation procedure hereafter, it can be executed by each terminal
Each test operation in test script utmostly ensures the available test result of each terminal.In this way, can
Think that different mobile terminals generates available test script, to improve the compatibility of test script, and then to not
When with mobile terminal execution test script, the success rate and efficiency of test are improved.
Fig. 7 and Fig. 8 is the structural schematic diagram of one embodiment of the present of invention electronic equipment.In hardware view, which is set
Standby includes processor, optionally further comprising internal bus, network interface, memory.Wherein, memory may include memory, example
Such as high-speed random access memory (Random-Access Memory, RAM), it is also possible to further include nonvolatile memory
(non-volatile memory), for example, at least 1 magnetic disk storage etc..Certainly, which is also possible that other industry
Hardware required for being engaged in.
Processor, network interface and memory can be connected with each other by internal bus, which can be ISA
(Industry Standard Architecture, industry standard architecture) bus, PCI (Peripheral
Component Interconnect, Peripheral Component Interconnect standard) bus or EISA (Extended Industry Standard
Architecture, expanding the industrial standard structure) bus etc..Bus can be divided into address bus, data/address bus, control bus
Deng.Only to be indicated with a four-headed arrow in Fig. 7 and Fig. 8, it is not intended that an only bus or a seed type convenient for indicating
Bus.
Memory, for storing program.Specifically, program may include program code, and said program code includes calculating
Machine operational order.Memory may include memory and nonvolatile memory, and provide instruction and data to processor.
Processor is from the then operation into memory of corresponding computer program is read in nonvolatile memory, in logical layer
The generation of test script and the executive device of test script are formed on face.Processor executes the program that memory is stored, and has
Body is for performing the following operations:
In the n-th terminal of each of the n-th terminal set, the n-th test operation is executed, n-th test operation is according to
The control of n-th terminal in n-th terminal set and preset testing requirement generate, and n is positive integer;
When executing n-th test operation failure there are the n-th terminal, according to execution the n-th test operation failure
N-th terminal determines the (n+1)th terminal set;
In the (n+1)th terminal of each of the (n+1)th terminal set, the (n+1)th test operation, (n+1)th test are executed
Operation is generated according to the control and the preset testing requirement of (n+1)th terminal in the (n+1)th terminal set;
When each (n+1)th terminal, which executes (n+1)th test operation, to succeed, according to the collection of preceding n+1 test operation
Symphysis is at test script.
And for performing the following operations:
Each terminal test script comprising at least one test operation being sent in terminal set;
In each terminal, each test operation in the test script is executed respectively.
Above-mentioned generation and test script such as Fig. 5 of the present invention and the test script of embodiment illustrated in fig. 6 offer executes dress
The method for setting execution can be applied in processor, or be realized by processor.Processor may be a kind of IC chip,
Processing capacity with signal.During realization, each step of the above method can pass through the integrated of the hardware in processor
The instruction of logic circuit or software form is completed.Above-mentioned processor can be general processor, including central processing unit
(Central Processing Unit, CPU), network processing unit (Network Processor, NP) etc.;It can also be number
Signal processor (Digital Signal Processor, DSP), specific integrated circuit (Application Specific
Integrated Circuit, ASIC), field programmable gate array (Field-Programmable Gate Array,
FPGA) either other programmable logic device, discrete gate or transistor logic, discrete hardware components.May be implemented or
Person executes disclosed each method, step and the logic diagram in the embodiment of the present invention.General processor can be microprocessor or
Person's processor is also possible to any conventional processor etc..
The step of method in conjunction with disclosed in the embodiment of the present invention, can be embodied directly in hardware decoding processor and execute
At, or in decoding processor hardware and software module combination execute completion.Software module can be located at random access memory,
This fields such as flash memory, read-only memory, programmable read only memory or electrically erasable programmable memory, register maturation
In storage medium.The storage medium is located at memory, and processor reads the information in memory, completes above-mentioned side in conjunction with its hardware
The step of method.
The electronic equipment can also carry out generation and the test script of test script that Fig. 5 and embodiment illustrated in fig. 6 provide
Executive device is respectively in the function of Fig. 7 and embodiment illustrated in fig. 8, and details are not described herein for the embodiment of the present invention.
The embodiment of the present invention also proposed a kind of computer readable storage medium, the computer-readable recording medium storage one
A or multiple programs, the one or more program include instruction, which holds when by the electronic equipment including multiple application programs
When row, it can make what the electronic equipment executed the generation of test script and test script in Fig. 5 and embodiment illustrated in fig. 6 to execute dress
The method for setting execution, and be specifically used for executing:
In the n-th terminal of each of the n-th terminal set, the n-th test operation is executed, n-th test operation is according to
The control of n-th terminal in n-th terminal set and preset testing requirement generate, and n is positive integer;
When executing n-th test operation failure there are the n-th terminal, according to execution the n-th test operation failure
N-th terminal determines the (n+1)th terminal set;
In the (n+1)th terminal of each of the (n+1)th terminal set, the (n+1)th test operation, (n+1)th test are executed
Operation is generated according to the control and the preset testing requirement of (n+1)th terminal in the (n+1)th terminal set;
When each (n+1)th terminal, which executes (n+1)th test operation, to succeed, according to the collection of preceding n+1 test operation
Symphysis is at test script.
And for performing the following operations:
Each terminal test script comprising at least one test operation being sent in terminal set;
In each terminal, each test operation in the test script is executed respectively.
System, device, module or the unit that above-described embodiment illustrates can specifically realize by computer chip or entity,
Or it is realized by the product with certain function.It is a kind of typically to realize that equipment is computer.Specifically, computer for example may be used
Think personal computer, laptop computer, cellular phone, camera phone, smart phone, personal digital assistant, media play
It is any in device, navigation equipment, electronic mail equipment, game console, tablet computer, wearable device or these equipment
The combination of equipment.
For convenience of description, it is divided into various units when description apparatus above with function to describe respectively.Certainly, implementing this
The function of each unit can be realized in the same or multiple software and or hardware when invention.
It should be understood by those skilled in the art that, the embodiment of the present invention can provide as method, system or computer program
Product.Therefore, complete hardware embodiment, complete software embodiment or reality combining software and hardware aspects can be used in the present invention
Apply the form of example.Moreover, it wherein includes the computer of computer usable program code that the present invention, which can be used in one or more,
The computer program implemented in usable storage medium (including but not limited to magnetic disk storage, CD-ROM, optical memory etc.) produces
The form of product.
The present invention be referring to according to the method for the embodiment of the present invention, the process of equipment (system) and computer program product
Figure and/or block diagram describe.It should be understood that every one stream in flowchart and/or the block diagram can be realized by computer program instructions
The combination of process and/or box in journey and/or box and flowchart and/or the block diagram.It can provide these computer programs
Instruct the processor of general purpose computer, special purpose computer, Embedded Processor or other programmable data processing devices to produce
A raw machine, so that being generated by the instruction that computer or the processor of other programmable data processing devices execute for real
The device for the function of being specified in present one or more flows of the flowchart and/or one or more blocks of the block diagram.
These computer program instructions, which may also be stored in, is able to guide computer or other programmable data processing devices with spy
Determine in the computer-readable memory that mode works, so that it includes referring to that instruction stored in the computer readable memory, which generates,
Enable the manufacture of device, the command device realize in one box of one or more flows of the flowchart and/or block diagram or
The function of being specified in multiple boxes.
These computer program instructions also can be loaded onto a computer or other programmable data processing device, so that counting
Series of operation steps are executed on calculation machine or other programmable devices to generate computer implemented processing, thus in computer or
The instruction executed on other programmable devices is provided for realizing in one or more flows of the flowchart and/or block diagram one
The step of function of being specified in a box or multiple boxes.
In a typical configuration, calculating equipment includes one or more processors (CPU), input/output interface, net
Network interface and memory.
Memory may include the non-volatile memory in computer-readable medium, random access memory (RAM) and/or
The forms such as Nonvolatile memory, such as read-only memory (ROM) or flash memory (flash RAM).Memory is computer-readable medium
Example.
Computer-readable medium includes permanent and non-permanent, removable and non-removable media can be by any method
Or technology come realize information store.Information can be computer readable instructions, data structure, the module of program or other data.
The example of the storage medium of computer includes, but are not limited to phase change memory (PRAM), static random access memory (SRAM), moves
State random access memory (DRAM), other kinds of random access memory (RAM), read-only memory (ROM), electric erasable
Programmable read only memory (EEPROM), flash memory or other memory techniques, read-only disc read only memory (CD-ROM) (CD-ROM),
Digital versatile disc (DVD) or other optical storage, magnetic cassettes, tape magnetic disk storage or other magnetic storage devices
Or any other non-transmission medium, can be used for storage can be accessed by a computing device information.As defined in this article, it calculates
Machine readable medium does not include temporary computer readable media (transitory media), such as the data-signal and carrier wave of modulation.
It should also be noted that, the terms "include", "comprise" or its any other variant are intended to nonexcludability
It include so that the process, method, commodity or the equipment that include a series of elements not only include those elements, but also to wrap
Include other elements that are not explicitly listed, or further include for this process, method, commodity or equipment intrinsic want
Element.In the absence of more restrictions, the element limited by sentence "including a ...", it is not excluded that including described want
There is also other identical elements in the process, method of element, commodity or equipment.
The present invention can describe in the general context of computer-executable instructions executed by a computer, such as program
Module.Generally, program module includes routines performing specific tasks or implementing specific abstract data types, programs, objects, group
Part, data structure etc..The present invention can also be practiced in a distributed computing environment, in these distributed computing environments, by
Task is executed by the connected remote processing devices of communication network.In a distributed computing environment, program module can be with
In the local and remote computer storage media including storage equipment.
Various embodiments are described in a progressive manner in the present invention, same and similar part between each embodiment
It may refer to each other, each embodiment focuses on the differences from other embodiments.Implement especially for system
For example, since it is substantially similar to the method embodiment, so being described relatively simple, related place is referring to embodiment of the method
Part illustrates.
The above description is only an embodiment of the present invention, is not intended to restrict the invention.For those skilled in the art
For, the invention may be variously modified and varied.All any modifications made within the spirit and principles of the present invention are equal
Replacement, improvement etc., should be included within scope of the presently claimed invention.
Claims (10)
1. a kind of generation method of test script characterized by comprising
In the n-th terminal of each of the n-th terminal set, the n-th test operation is executed, n-th test operation is whole according to described n-th
The control of n-th terminal in the set of end and preset testing requirement generate, and n is positive integer;
It is whole according to execute the n-th test operation failure n-th when executing n-th test operation failure there are the n-th terminal
End, determines the (n+1)th terminal set;
In the (n+1)th terminal of each of the (n+1)th terminal set, the (n+1)th test operation, (n+1)th test operation are executed
It is generated according to the control of (n+1)th terminal in the (n+1)th terminal set and the preset testing requirement;
When each (n+1)th terminal, which executes (n+1)th test operation, to succeed, according to the collection symphysis of preceding n+1 test operation
At test script.
2. the method as described in claim 1, which is characterized in that when n is 1, the method also includes:
When each 1st terminal, which executes the 1st test operation, to succeed, test script is generated according to the 1st test operation.
3. the method as described in claim 1, which is characterized in that the method also includes:
When each n-th terminal, which executes n-th test operation, to fail, n-th test operation is deleted;
In the n-th terminal of each of the n-th terminal set, the n-th test operation regenerated, n-th regenerated are executed
Test operation is regenerated according to the control and preset testing requirement of n-th terminal in the n-th terminal set.
4. a kind of execution method of test script characterized by comprising
Each terminal test script comprising at least one test operation being sent in terminal set;
In each terminal, each test operation in the test script is executed respectively.
5. a kind of generating means of test script characterized by comprising the first execution unit, set determination unit, second are held
Row unit and script generation unit, wherein
First execution unit executes the n-th test operation in the n-th terminal of each of the n-th terminal set, and described n-th
Test operation is generated according to the control of n-th terminal in the n-th terminal set and preset testing requirement, and n is positive
Integer;
The set determination unit is used for when executing n-th test operation failure there are the n-th terminal, according to execution
N-th terminal of the n-th test operation failure, determines the (n+1)th terminal set;
Second execution unit, in the (n+1)th terminal of each of the (n+1)th terminal set, executing the (n+1)th test behaviour
Make, (n+1)th test operation is according to the control of (n+1)th terminal in the (n+1)th terminal set and described default
Testing requirement generate;
The script generation unit is used for when each (n+1)th terminal executes (n+1)th test operation and succeeds, according to preceding n
The set of+1 test operation generates test script.
6. device as claimed in claim 5, which is characterized in that when n is 1, the script generation unit is also used to:
When each 1st terminal, which executes the 1st test operation, to succeed, test script is generated according to the 1st test operation.
7. device as claimed in claim 5, which is characterized in that described device further includes that script deletes unit, wherein
The script deletes unit, for deleting described n-th when each n-th terminal executes n-th test operation and fails
Test operation;
First execution unit is also used in each of the n-th terminal set the n-th terminal, executes the n-th test regenerated
Operation, n-th test operation regenerated is according to the control of n-th terminal in the n-th terminal set and pre-
If testing requirement regenerate.
8. a kind of executive device of test script characterized by comprising script transmission unit and script executing unit,
In,
The script transmission unit, for by include at least one test operation test script be sent to it is every in terminal set
A terminal;
The script executing unit, in each terminal, executing the behaviour of each test in the test script respectively
Make.
9. a kind of electronic equipment characterized by comprising
Processor;And
It is arranged to the memory of storage computer executable instructions, the executable instruction makes the processor when executed
Execute following operation:
In the n-th terminal of each of the n-th terminal set, the n-th test operation is executed, n-th test operation is whole according to described n-th
The control of n-th terminal in the set of end and preset testing requirement generate, and n is positive integer;
It is whole according to execute the n-th test operation failure n-th when executing n-th test operation failure there are the n-th terminal
End, determines the (n+1)th terminal set;
In the (n+1)th terminal of each of the (n+1)th terminal set, the (n+1)th test operation, (n+1)th test operation are executed
It is generated according to the control of (n+1)th terminal in the (n+1)th terminal set and the preset testing requirement;
When each (n+1)th terminal, which executes (n+1)th test operation, to succeed, according to the collection symphysis of preceding n+1 test operation
At test script.
10. a kind of electronic equipment characterized by comprising
Processor;And
It is arranged to the memory of storage computer executable instructions, the executable instruction makes the processor when executed
Execute following operation:
Each terminal test script comprising at least one test operation being sent in terminal set;
In each terminal, each test operation in the test script is executed respectively.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201811099248.2A CN109324966B (en) | 2018-09-20 | 2018-09-20 | Test script generation and execution method and device |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201811099248.2A CN109324966B (en) | 2018-09-20 | 2018-09-20 | Test script generation and execution method and device |
Publications (2)
Publication Number | Publication Date |
---|---|
CN109324966A true CN109324966A (en) | 2019-02-12 |
CN109324966B CN109324966B (en) | 2021-06-15 |
Family
ID=65265168
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201811099248.2A Active CN109324966B (en) | 2018-09-20 | 2018-09-20 | Test script generation and execution method and device |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN109324966B (en) |
Citations (8)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN103441900A (en) * | 2013-08-27 | 2013-12-11 | 上海新炬网络技术有限公司 | Centralization cross-platform automated testing system and control method thereof |
CN104166619A (en) * | 2013-05-20 | 2014-11-26 | 腾讯科技(深圳)有限公司 | Performance measuring method and terminal of application program |
US20150234730A1 (en) * | 2014-02-18 | 2015-08-20 | Zerodee, Inc. | Systems and methods for performing software debugging |
CN106484622A (en) * | 2016-10-18 | 2017-03-08 | 网易(杭州)网络有限公司 | Method of testing, apparatus and system |
CN107045475A (en) * | 2016-02-06 | 2017-08-15 | 北京京东尚科信息技术有限公司 | Method of testing and device |
US20170286266A1 (en) * | 2016-03-31 | 2017-10-05 | Ca, Inc. | Unified interface for development and testing of deployment resource architecture |
CN107357726A (en) * | 2017-07-04 | 2017-11-17 | 广州云测信息技术有限公司 | A kind of application compatibility method of testing and device |
CN108170608A (en) * | 2018-01-10 | 2018-06-15 | 上海展扬通信技术有限公司 | Compatibility test method, test terminal and storage medium |
-
2018
- 2018-09-20 CN CN201811099248.2A patent/CN109324966B/en active Active
Patent Citations (8)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN104166619A (en) * | 2013-05-20 | 2014-11-26 | 腾讯科技(深圳)有限公司 | Performance measuring method and terminal of application program |
CN103441900A (en) * | 2013-08-27 | 2013-12-11 | 上海新炬网络技术有限公司 | Centralization cross-platform automated testing system and control method thereof |
US20150234730A1 (en) * | 2014-02-18 | 2015-08-20 | Zerodee, Inc. | Systems and methods for performing software debugging |
CN107045475A (en) * | 2016-02-06 | 2017-08-15 | 北京京东尚科信息技术有限公司 | Method of testing and device |
US20170286266A1 (en) * | 2016-03-31 | 2017-10-05 | Ca, Inc. | Unified interface for development and testing of deployment resource architecture |
CN106484622A (en) * | 2016-10-18 | 2017-03-08 | 网易(杭州)网络有限公司 | Method of testing, apparatus and system |
CN107357726A (en) * | 2017-07-04 | 2017-11-17 | 广州云测信息技术有限公司 | A kind of application compatibility method of testing and device |
CN108170608A (en) * | 2018-01-10 | 2018-06-15 | 上海展扬通信技术有限公司 | Compatibility test method, test terminal and storage medium |
Non-Patent Citations (1)
Title |
---|
HOWARDZHANG: ""Web前端页面的浏览器兼容性测试心得(三)总结一些IE8兼容问题的解决方案"", 《HTTPS://WWW.CNBLOGS.COM/ZAMHOWN/P/6709932.HTML》 * |
Also Published As
Publication number | Publication date |
---|---|
CN109324966B (en) | 2021-06-15 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN109189682A (en) | A kind of script method for recording and device | |
CN107133174A (en) | Test case code automatically generating device and method | |
CN109656806A (en) | A kind of the playback test method and device of interface data | |
CN109598407A (en) | A kind of execution method and device of operation flow | |
CN109213685A (en) | Service logic test method and device | |
CN107357726A (en) | A kind of application compatibility method of testing and device | |
CN106649084A (en) | Function call information obtaining method and apparatus, and test device | |
CN107329899A (en) | A kind of application compatibility method of testing and device | |
CN109739762A (en) | A kind of performance test methods and device of application program | |
CN113268243B (en) | Memory prediction method and device, storage medium and electronic equipment | |
CN107729246A (en) | For the auxiliary test methods of intended application, device, equipment and storage medium | |
CN107622008A (en) | The traversal method and device of a kind of five application page | |
CN108388509A (en) | A kind of method for testing software, computer readable storage medium and terminal device | |
CN112463634A (en) | Software testing method and device under micro-service architecture | |
CN110008111A (en) | A kind of service test method and device | |
CN110334013A (en) | Test method, device and the electronic equipment of decision engine | |
CN110110000A (en) | Methods of exhibiting and device | |
CN107450959A (en) | A kind of edition data issue, acquisition methods, equipment and device and more new system | |
CN114185874A (en) | Big data based modeling method and device, development framework and equipment | |
US10372571B2 (en) | Method and apparatus for testing compatibility of 3D engine | |
CN106354841A (en) | Testing method and device of recommendation algorithms | |
CN109189677A (en) | A kind of test method and device for variable value more new state | |
CN110134568A (en) | A kind of application program launching time detection method, device and equipment | |
CN109542775A (en) | A kind of generation and execution method and device of test script | |
US9852048B2 (en) | Simulating process variable changes during process runtime |
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 | ||
GR01 | Patent grant | ||
GR01 | Patent grant | ||
TR01 | Transfer of patent right | ||
TR01 | Transfer of patent right |
Effective date of registration: 20210716 Address after: 100016 no.4301, No.52 Jiuxianqiao hospital, Chaoyang District, Beijing Patentee after: BEIJING TESTIN INFORMATION TECHNOLOGY Co.,Ltd. Address before: Room 2016, building 2, No.8, Fenghuang Third Road, Zhongxin Guangzhou Knowledge City, Guangzhou 510260, Guangdong Province Patentee before: GUANGZHOU TESTIN INFORMATION TECHNOLOGY Co.,Ltd. |