The content of the invention
The purpose of the application is to provide a kind of method and apparatus for being used to automate the execution of use-case, to solve
Certainly automation use-case execution efficiency is low, time longer problem is performed, so as to improve the efficiency of test execution.
It is used to perform automation use-case in the first equipment end there is provided one kind according to the one side of the application
Method, including:
The related some executive modules of automation use-case and its execution sequence information are obtained, wherein, it is described to hold
Execution logic of the execution sequence information of row component based on the automation use-case is determined;
Execution sequence information based on the executive module performs the corresponding executive module successively, wherein,
Concurrently perform multiple executive modules with identical execution sequence information;
Generate final implementing result.
It is used to perform automation use-case in the second equipment end there is provided one kind according to the one side of the application
Method, including:
Obtain the registration request of the first equipment transmission;
It is each executive module registration one with identical execution sequence information based on the registration request
Individual execution task;
Some 3rd equipment are transferred to concurrently to perform respectively the execution task;
The implementing result of the 3rd equipment feedback is obtained, and the implementing result is sent to described first
Equipment.
It is used to perform automation use-case in the 3rd equipment end there is provided one kind according to the one side of the application
Method, including:
Obtain what second equipment was registered based on the executive module with identical execution sequence information
Execution task;
The corresponding execution task is performed, and implementing result is fed back into second equipment.
According to the one side of the application there is provided a kind of method for being used to perform automation use-case, including:
First equipment obtains the related some executive modules of automation use-case and its execution sequence information, wherein,
Execution logic of the execution sequence information of the executive module based on the automation use-case is determined;
Execution sequence information of first equipment based on the executive module performs the corresponding execution successively
Component, when going to multiple executive modules with identical execution sequence information, to the second equipment
Initiate registration request;
Second equipment described is held based on the registration request for each with identical execution sequence information
One execution task of row component register;
The execution task will be transferred to some 3rd equipment concurrently to perform respectively by second equipment;
Some 3rd equipment perform the corresponding execution task, and implementing result is fed back into described the
Two equipment;
Second equipment obtains the implementing result of the 3rd equipment feedback, and the implementing result is sent out
Give first equipment;
First equipment generates final implementing result.
According to the another aspect of the application, a kind of the first equipment for being used to perform automation use-case is additionally provided,
Including:
First acquisition device, some executive modules and its execution sequence related for obtaining automation use-case
Information, wherein, execution logic of the execution sequence information based on the automation use-case of the executive module
It is determined that;
Performs device, accordingly described hold is performed for the execution sequence information based on the executive module successively
Row component, wherein, concurrently perform multiple executive modules with identical execution sequence information;
Generating means, for generating final implementing result.
According to the another aspect of the application, a kind of the second equipment for being used to perform automation use-case is additionally provided,
Including:
Second acquisition device, for obtaining the registration request that the first equipment is sent;
Register device, for being each described with identical execution sequence information based on the registration request
Executive module registers an execution task;
Distributor, for transferring to some 3rd equipment concurrently to perform respectively the execution task;
Retransmission unit, the implementing result for obtaining the 3rd equipment feedback, and by the implementing result
It is sent to first equipment.
According to the another aspect of the application, a kind of the 3rd equipment for being used to perform automation use-case is additionally provided,
Including:
3rd acquisition device, for obtaining second equipment based on the institute with identical execution sequence information
State the execution task that executive module is registered;
Feedback device, for performing the corresponding execution task, and feeds back to described second by implementing result
Equipment.
According to the another aspect of the application, a kind of system for being used to perform automation use-case, bag are additionally provided
Include:First equipment, the second equipment and some 3rd equipment;
Wherein, first equipment includes:First acquisition device, for obtaining automation use-case correlation
Some executive module and its execution sequence information, wherein, the execution sequence information of the executive module is based on
The execution logic of the automation use-case is determined;Performs device, for the execution based on the executive module
Order information performs the corresponding executive module successively, when going to many of identical execution sequence information
During the individual executive module, to the second equipment initiate registration request, using ask second equipment as with
Each executive module of identical execution sequence information registers one and performs task and by the execution task
Transfer to some 3rd equipment concurrently to perform respectively, and obtain the implementing result that second equipment is sent;It is raw
Into device, for generating final implementing result;
Second equipment includes:Second acquisition device, for obtaining the registration request that the first equipment is sent;
Register device, for being each executive module with identical execution sequence information based on the request
One execution task of registration;Distributor, for the execution task to be transferred into some 3rd equipment respectively
Concurrently perform;Retransmission unit, for obtaining the implementing result of the 3rd equipment feedback, and holds described
Row result is sent to first equipment;
3rd equipment includes:3rd acquisition device, is based on having phase for obtaining second equipment
The execution task registered with the executive module of execution sequence information;Feedback device, for performing phase
The execution task is answered, and implementing result is fed back into second equipment.
Compared with prior art, according to the method and apparatus of the embodiment of the present application, automated by obtaining
The related some executive modules of use-case and its execution sequence information;So as to be known by the decomposition to executive module
Do not go out logic module and verification component;Execution sequence information based on the executive module is performed accordingly successively
The executive module, wherein, when going to multiple executive modules with identical execution sequence information
When, set up some concurrent threads and concurrently perform;Or a task is registered into the execution of each component, so
Multiple tasks are assigned to many machine execution afterwards, the concurrent thread on single machine can also be embodied as.
Further, some concurrent threads are set up on one machine, are performed with concurrently performing with identical
The executive module of order information;Or registration request is initiated to the second equipment, to ask described second to set
It is standby to register an execution task for each executive module with identical numbering and distinguish the execution task
Some 3rd equipment are transferred to concurrently to perform, to realize the scheduling mode using distributed task scheduling;First equipment
Generate final implementing result.So as to by the executive module of analysis automated use-case, write correspondence group respectively
The realization of part, and then for the executive module that can concurrently run using multithreading or distributed task dispatching
Executive mode, to improve the execution efficiency and durability of automation use-case.
Embodiment
The application is described in further detail below in conjunction with the accompanying drawings.
Fig. 1 shows a kind of the first equipment for being used to perform automation use-case according to the application one side
Structural representation.First equipment 1 includes the first acquisition device 11, performs device 12 and generating means
13;Wherein, first acquisition device 11 obtains the related some executive modules of automation use-case and its held
Row order information, wherein, execution sequence information the holding based on the automation use-case of the executive module
Row logic is determined;Execution sequence information of the performs device 12 based on the executive module performs corresponding institute successively
Executive module is stated, wherein, concurrently perform multiple executive modules with identical execution sequence information;
Generating means 13 generate final implementing result.
Here, first equipment 1 includes but is not limited to user equipment or user equipment and the network equipment
Constituted equipment is integrated by network.The user equipment its include but is not limited to any one can be with
User carries out the mobile electronic product of man-machine interaction, such as smart mobile phone, PDA, institute by touch pad
Any operating system, such as android operating systems, iOS operation system can be used by stating mobile electronic product
System etc..Wherein, the network equipment include it is a kind of can be according to the instruction for being previously set or storing, automatically
Carry out the electronic equipment of numerical computations and information processing, its hardware includes but is not limited to microprocessor, special
Integrated circuit (ASIC), programmable gate array (FPGA), digital processing unit (DSP), embedded device
Deng.The network include but is not limited to internet, wide area network, Metropolitan Area Network (MAN), LAN, VPN,
Wireless self-organization network (Ad Hoc networks) etc..Preferably, the first equipment 1, which can also be, runs on institute
User equipment or user equipment is stated with the network equipment, touch terminal or the network equipment and touch terminal to pass through
Network is integrated the shell script in constituted equipment.Certainly, those skilled in the art will be understood that
State the first equipment 1 to be only for example, other first equipment 1 that are existing or being likely to occur from now on are such as applicable
In the application, it should also be included within the application protection domain, and be incorporated herein by reference herein.
Constantly worked between above-mentioned each device, here, it will be understood by those skilled in the art that " lasting "
Refer to above-mentioned each device respectively in real time or according to the mode of operation requirement of setting or real-time adjustment, example
The first acquisition device 11 persistently obtains the related some executive modules of automation use-case and its execution as described
Order information, wherein, execution of the execution sequence information based on the automation use-case of the executive module
Logic is determined;Persistently the execution sequence information based on the executive module is performed the performs device 12 successively
The corresponding executive module, wherein, concurrently perform multiple execution with identical execution sequence information
Component;The generating means 13 are continuously generated final implementing result, until first equipment 1 is completed really
Recognize the work of request user identity or be stopped.
First equipment 1 described in the embodiment of the application one is used to perform automation use-case, by the way that automation is used
Example carries out the classification of executive module, is appointed for the executive module that can concurrently run using multithreading or distribution
The executive mode of business scheduling, to improve the execution efficiency of automation use-case.
Specifically, the first acquisition device 11 obtains the related some executive modules of automation use-case and its execution
Order information, wherein, execution of the execution sequence information based on the automation use-case of the executive module
Logic is determined.
Herein, it is preferable that the executive module includes logic module and verification component.For example, online
Multiple systems may be related to when transferring accounts, for the full link automatic test cases under this scene, needed
Different systems is called and verified.Therefore, an automation use-case should include multiple perform
The step of logic, such as data initialization, logic are performed, database verification, return value verification etc., will be certainly
These steps of dynamicization use-case are defined as executive module, wherein the part for being responsible for configuration processor logic is defined as
Logic module, the part for being responsible for verifying work is defined as examining component.Pass through logic module and verification component
Combination, you can be assembled into one automation use-case.The mark that automation use-case runs succeeded is all
Logic module and verification component can smoothly be performed and passed through.As shown in Figure 2 according to the application on one side
A preferred embodiment it is a kind of be used for perform automation use-case executive module implementation procedure signal
Figure, use-case is performed from logic module first, is then performed verification component, is waited all component of the use-case to hold
Row is finished, then completes the implementation procedure of an automation use-case, wherein, logic module can be certain called
One method, algorithm, verify verification, message, return value verification of component such as database etc., each group
Part includes the input and output of component, and in being preferable to carry out shown in Fig. 2, the input of logic module is institute
The parameter that call method needs, is output as the input of corresponding verification component.It should be noted that verification group
The input of part can be the output of logic module, or the output of other assemblies, such as verification component.
In one embodiment, acquired executive module is carried out decompositing logic module and executive module,
The realization of correspondence component is write respectively, i.e., executive module is compiled according to the execution sequence of automation use-case
Number, such as from 1~n, n is the integer more than 1, if some logic modules or executive module can be concurrent,
The label that then can be achieved to concurrent logic module or executive module is set to same value.And then first equipment
1 obtains the related some executive modules of automation use-case and has entered holding for the executive module of line label accordingly
Row order information.
Specifically, execution sequence information of the performs device 12 based on the executive module performs corresponding institute successively
Executive module is stated, wherein, concurrently perform multiple executive modules with identical execution sequence information.
In automation use-case, there is the synchronous place of needs in logic module and verification component, because of major part
Check part be to need to first carry out service logic, then carry out the verification of use-case.Performed in logic module
Into rear, it is necessary to carry out the verification of a variety of situations, such as calibration database, verification return value etc., and these
The process of component execution is verified without synchronous, concurrent process can be used.Similarly, between logic module
There is also the process concurrently performed, such as the initialization procedure of environment is, it is necessary to initialization data storehouse, construction
Method parameter etc., the executive module of these initialization contexts can also be performed concurrently.
Here, then executive module concurrently can will many by execution one task of registration of each component
Individual task is assigned to many machine execution, can also be embodied as the concurrent thread on single machine.For holding
Row component, if without serial wait relation before them, it is possible to be considered as concurrent.Precedent is connect,
Get after the execution sequence information of corresponding executive module, according to numbering execution sequence from small to large order
Executive module, if there is multiple components that numbering is same value, then sets up some on one machine
Concurrent thread, concurrently to perform the executive module with identical execution sequence information;Or set to second
Preparation plays registration request, to ask second equipment as each executive module registration with identical numbering
The execution task is simultaneously transferred to some 3rd equipment concurrently to perform by one execution task respectively, is adopted with realizing
The operation concurrently performed to component with the scheduling mode of distributed task scheduling.
Specifically, generating means 13 generate final implementing result.
Continue to connect precedent, performed after all component, the result performed is returned to, to generate final execution
As a result, such as transfer services, it is not that " success of having transferred accounts " is exactly " transferring accounts unsuccessfully " to ultimately generate result,
The result that ultimately generates after the executive module of use-case is finished only has two, i.e. success or failure.
Preferably, the performs device 12 is used for:When going to the multiple of identical execution sequence information
During the executive module, some concurrent threads are set up, concurrently to perform with identical execution sequence information
The executive module.
In one embodiment, after the execution sequence information of corresponding executive module is got, according to numbering
Execution sequence order executive module from small to large, if there is multiple components that numbering is same value, then
Performed by the way of concurrent thread, wait multiple components of same numbering to be carried out finishing, be further continued for performing
The component of next number.The process of concurrent thread executive module on single machine is as shown in figure 3, first
Be write automation use-case each component get module information and according to use-case execution sequence to component
Number to obtain the execution sequence information of executive module, be that execution sequence information is carried out according to the order of numbering
Each component is performed, the implementing result that use-case is returned after all component has been performed.
In a preferred embodiment, such as transfer services, it is necessary to two database verification components, respectively school
The remaining sum (a) of A accounts is tested, the remaining sum (b) of B accounts, the result message checking (c) of return is verified.
Component a and b due to be in same affairs, can be with so the priority without the time, when verification
Concurrently perform.Component c returned packet, after needing wait a, b component to run succeeded, can just be returned
Return result message.Therefore component c execution may be needed after component a, b are performed.Only ab groups
Part is verified successfully, could complete the verification (c) of returned packet.
Fig. 4 shows the knot of the performs device 12 of a preferred embodiment according to the application one side
Structure schematic diagram;The performs device 12 includes:Transmitting element 121 and acquiring unit 122, wherein, hair
Unit 121 is sent when going to multiple executive modules with identical execution sequence information, to second
Equipment initiates registration request, to ask second equipment as each institute with identical execution sequence information
Executive module is stated to register an execution task and transfer to some 3rd equipment concurrent respectively the execution task
Perform;Acquiring unit 122 obtains the implementing result that second equipment is sent.
, can be using distribution when going to multiple executive modules with identical execution sequence information
The mode of task call carries out concurrent executive module.In one embodiment, automation use-case exists first
Some server node (the first equipment) is performed, if running into the component that can be concurrent of identical numbering,
Then send and ask to the second equipment so that the second equipment is each one task of component register, wherein, the
Two equipment can be task Centroid, and the execution task of component can be assigned to some three and set by the second equipment
It is standby, wherein, the 3rd equipment is other server nodes, is waited after the completion of all nodes execution, first sets
It is standby to obtain implementing result from the second equipment, finally continue the execution of subsequent component in first equipment
Process.
Preferably, first acquisition device 11 also includes:Obtain the (not shown) of multiplexing assembly unit 111
With the (not shown) of determining unit 112, wherein, obtain multiplexing assembly unit 111 from common package module
Obtain the related some executive modules of automation use-case;Determining unit 112 is based on the automation use-case
Execution logic determines the execution sequence of some executive modules.
Here, in the preferred embodiment of the application one, the executive module for automating use-case being decomposed and identified
After logic module and executive module, also need to set up the multiplexing mechanism of executive module, by patrolling for having abstracted
Collect component and verification component is stored in common package module as public component, automation afterwards is used
Example can be directly multiplexed in compiling procedure.Reuse the logic module taken out and verification component
When need to obtain and be multiplexed from common package module, it is then true according to the execution logic for automating use-case
The execution sequence of the executive module of fixed some multiplexings, then, the execution sequence letter based on the executive module
Breath performs the corresponding executive module successively, returns to the execution that implementing result completes automation use-case.
Fig. 5 shows a kind of system equipment for being used to perform automation use-case according to the application one side
Structural representation, wherein, the system includes:First equipment 1, the second equipment 2 and the 3rd equipment
3.First equipment 1 includes the first acquisition device 11, performs device 12 and generating means 13, the second equipment
2 include register device 21, distributor 22 and retransmission unit 23, and the 3rd equipment 3 includes the 3rd and obtained
Device 31 and feedback device 32.
Those skilled in the art it should be understood that the system with the first equipment 1 and the second equipment 2,
Or the system with the first equipment 1, the second equipment 2 and the 3rd equipment 3, to realize distributed task scheduling
The scheme that the mode of scheduling performs automation use-case is both contained within the scope of the application is claimed.
Here, second equipment 2 can be with multiple cooperatings of 3rd equipment 3, second equipment
2 can select the 3rd different equipment according to strategy completes the first equipment 1 or the 3rd equipment 3 shown in Fig. 5
Work.The first acquisition device 11 in first equipment 1 obtains the related some execution groups of automation use-case
Part and its execution sequence information, wherein, the execution sequence information of the executive module is based on the automation
The execution logic of use-case is determined;Execution sequence information of the performs device 12 based on the executive module is held successively
The corresponding executive module of row, when going to multiple executive modules with identical execution sequence information
When, initiate registration request to the second equipment.The second acquisition device 21 in second equipment 2 obtains first and set
Standby 1 registration request sent;Register device 22 is with identical execution sequence information based on the request
Each executive module registers an execution task;Distributor 23 transfers to the execution task respectively
Some 3rd equipment are concurrently performed;The 3rd acquisition device 31 in 3rd equipment 3 obtains second equipment
The 2 execution tasks registered based on the executive module with identical execution sequence information;Feedback device
32 perform the corresponding execution task, and implementing result is fed back into second equipment 2.Then,
The implementing result that the 3rd acquired equipment 3 is fed back is sent to described by the retransmission unit 24 in two equipment 2
Generating means 13 in first equipment 1, the first equipment 1 generate final implementing result.
In the coupled system of the first equipment 1 and the second equipment 2 and the 3rd equipment 3, the first equipment 1
It is distributed in from the 3rd equipment 3 on different server nodes, some 3rd equipment 3 are distributed in different clothes
It is engaged on device node, is appointed during multiple executive modules to handle identical execution sequence information using distributed
The mode of business scheduling realizes the concurrent operations of executive module, improves execution efficiency and the multiplexing of automation use-case
Property.
Specifically, the registration that the first equipment of second acquisition device 21 acquisition is sent in second equipment 2 please
Ask;Register device 22 is each executive module with identical execution sequence information based on the request
One execution task of registration;The execution task is transferred to some 3rd equipment concurrent by distributor 23 respectively
Perform;Retransmission unit 24 obtains the implementing result of the 3rd equipment feedback, and the implementing result is sent out
Give first equipment.
Here, in a distributed system, node device centered on the second equipment 2 obtains other sections
The request of point device simultaneously registers corresponding task according to request, according to central node equipment managed from section
The resource utilization of point device task is assigned to it is some from node device, in embodiments herein,
3rd equipment is from node device, in a preferred embodiment, operation of first equipment in executive module
Some components of identical execution sequence information, such as component A, component B, component C execution are run into journey
Order is all n, then the second acquisition device 21 obtains registration associated component A, the component of the first device request
B, the request post-registration device 22 of component C execution task are respectively component A, component B, component C
Register a task (task A, task B, task C);Distributor 23 is according to can be scheduled
Task A, task B, task C are assigned to 1 or 2 by the resource utilization of all 3rd equipment
Or in 3 the 3rd equipment, operation, retransmission unit 24 are concurrently performed through what some 3rd equipment realized component
The implementing result of the feedback of the 3rd equipment of the task that is assigned to is obtained, the school in task A, B, C is such as performed
The implementing result for testing component is probably that three tasks are all successfully completed, it is also possible to two therein or one
Successfully complete, the implementing result that executive module that can be concurrent is performed using the 3rd equipment is sent to described the
One equipment.
Including with the 3rd equipment 3 of the first equipment 1 and the cooperating of the second equipment 2 shown in Fig. 5:
3rd acquisition device 31 and feedback device 32.Wherein, the 3rd acquisition device 31 obtains second equipment
The execution task registered based on the executive module with identical execution sequence information;Feedback device 32
The corresponding execution task is performed, and implementing result is fed back into second equipment.
Here, in a distributed system, the 3rd equipment 3 is set by what the second equipment was managed from node
It is standby, distribute on some servers, the equipment 3 of the second equipment scheduling the 3rd, the 3rd acquisition device 31 is obtained
The execution task distributed to the second equipment, carries out performing the task, in a preferred embodiment, such as turns
Account is serviced, it is necessary to which two database verification components, respectively verify the remaining sum (a) of A accounts, verify B
The remaining sum (b) of account, the result message checking (c) of return.Component a and b is due to being in same thing
In business, so the priority without the time, can concurrently be performed when verification.3rd acquisition device 31 is obtained
Component a and/or component b execution task are got, starts to verify the remaining sum of A accounts and/or verification B accounts
The remaining sum at family, after the completion of component needs a, b component to perform, implementing result is returned to the by feedback device 32
Forwarding of two equipment through the second equipment sends final implementing result to the first equipment, and the first equipment is according to group
The implementing result of part, carries out the execution of follow-up component.In the implementing result that the first equipment is obtained, only
There are ab components to verify successfully, the verification (c) of returned packet could be completed.
In a preferred embodiment, Fig. 6 is shown according to a preferred embodiment of the application one side
The schematic diagram of component concurrent operations is realized by the way of distributed task dispatching.System includes multiple services
Device node and a task Centroid, wherein, server node 1 is the first equipment 1, task center
For the second equipment 2, server node 2,3,4 is the 3rd equipment 3.The registration of the responsible business in task center
And scheduling, server node is responsible for the execution of task.Use-case is automated first in some server node (clothes
Business device node 1) perform, if running into the identical execution sequence information component that such as numbering identical can be concurrent,
It is then each one task of component register at task center, the execution task of component is assigned to by task center
On all server nodes, such as it is assigned on server node 2,3,4, receives the clothes of distribution task
Business device node starts execution task, waits after the completion of all nodes execution, implementing result is fed back into task
Center, task center again returns to the implementing result of feedback initial server node 1, finally at this
Node continues the implementation procedure of subsequent component.
The identification of use-case progress component will be automated by the embodiment of the application, logic module is identified
With verification component, by the way of concurrent thread and distributed task scheduling, progress is performed to component
Concurrent operation, improves the execution efficiency and durability of automation use-case, reduces and performs automation use-case
Time, and then improve product testing efficiency.
Fig. 7 shows to be used to perform automation in the first equipment end according to a kind of of the application other side
The schematic flow sheet of the method for use-case.Methods described includes step S11, step S12 and step S13;
Wherein, in step s 11, the related some executive modules of automation use-case and its execution sequence letter are obtained
Breath, wherein, execution logic of the execution sequence information based on the automation use-case of the executive module is true
It is fixed;In step s 12, the execution sequence information based on the executive module performs accordingly described hold successively
Row component, wherein, concurrently perform multiple executive modules with identical execution sequence information;In step
In rapid S13, final implementing result is generated.
It is used to perform the method for automating use-case described in the embodiment of the application one in the first equipment end, by inciting somebody to action
Automate the classification that use-case carries out executive module, for the executive module that can concurrently run using multithreading or
The executive mode of distributed task dispatching, to improve the execution efficiency of automation use-case.
Specifically, in step s 11, the related some executive modules of automation use-case and its execution are obtained
Order information, wherein, execution of the execution sequence information based on the automation use-case of the executive module
Logic is determined.
Herein, it is preferable that the executive module includes logic module and verification component.For example, online
Multiple systems may be related to when transferring accounts, for the full link automatic test cases under this scene, needed
Different systems is called and verified.Therefore, an automation use-case should include multiple perform
The step of logic, such as data initialization, logic are performed, database verification, return value verification etc., will be certainly
These steps of dynamicization use-case are defined as executive module, wherein the part for being responsible for configuration processor logic is defined as
Logic module, the part for being responsible for verifying work is defined as examining component.Pass through logic module and verification component
Combination, you can be assembled into one automation use-case.The mark that automation use-case runs succeeded is all
Logic module and verification component can smoothly be performed and passed through.As shown in Figure 2 according to the application on one side
A preferred embodiment it is a kind of be used for perform automation use-case executive module implementation procedure signal
Figure, use-case is performed from logic module first, is then performed verification component, is waited all component of the use-case to hold
Row is finished, then completes the implementation procedure of an automation use-case, wherein, logic module can be certain called
One method, algorithm, verify verification, message, return value verification of component such as database etc., each group
Part includes the input and output of component, and in being preferable to carry out shown in Fig. 2, the input of logic module is institute
The parameter that call method needs, is output as the input of corresponding verification component.It should be noted that verification group
The input of part can be the output of logic module, or the output of other assemblies, such as verification component.
In one embodiment, acquired executive module is carried out decompositing logic module and executive module,
The realization of correspondence component is write respectively, i.e., executive module is compiled according to the execution sequence of automation use-case
Number, such as from 1~n, wherein n is integer more than 1, if some logic modules or executive module can be with
Concurrently, then the label that can be achieved to concurrent logic module or executive module is set to same value.And then the
One equipment 1 obtains the related some executive modules of automation use-case and has entered the execution group of line label accordingly
The execution sequence information of part.
Specifically, in step s 12, the execution sequence information based on the executive module performs phase successively
The executive module is answered, wherein, concurrently perform multiple execution groups with identical execution sequence information
Part.
In automation use-case, there is the synchronous place of needs in logic module and verification component, because of major part
Check part be to need to first carry out service logic, then carry out the verification of use-case.Performed in logic module
Into rear, it is necessary to carry out the verification of a variety of situations, such as calibration database, verification return value etc., and these
The process of component execution is verified without synchronous, concurrent process can be used.Similarly, between logic module
There is also the process concurrently performed, such as the initialization procedure of environment is, it is necessary to initialization data storehouse, construction
Method parameter etc., the executive module of these initialization contexts can also be performed concurrently.
Here, then executive module concurrently can will many by execution one task of registration of each component
Individual task is assigned to many machine execution, can also be embodied as the concurrent thread on single machine.For holding
Row component, if without serial wait relation before them, it is possible to be considered as concurrent.Precedent is connect,
Get after the execution sequence information of corresponding executive module, according to numbering execution sequence from small to large order
Executive module, if there is multiple components that numbering is same value, then sets up some on one machine
Concurrent thread, concurrently to perform the executive module with identical execution sequence information;Or set to second
Preparation plays registration request, to ask second equipment as each executive module registration with identical numbering
The execution task is simultaneously transferred to some 3rd equipment concurrently to perform by one execution task respectively, is adopted with realizing
The operation concurrently performed to component with the scheduling mode of distributed task scheduling.
Specifically, in step s 13, final implementing result is generated.
Continue to connect precedent, performed after all component, the result performed is returned to, to generate final execution
As a result, such as transfer services, it is not that " success of having transferred accounts " is exactly " transferring accounts unsuccessfully " to ultimately generate result,
The result that ultimately generates after the executive module of use-case is finished only has two, i.e. success or failure.
Preferably, the step S12 includes:When going to multiple institutes with identical execution sequence information
When stating executive module, some concurrent threads are set up, concurrently to perform the institute with identical execution sequence information
State executive module.
In one embodiment, after the execution sequence information of corresponding executive module is got, according to numbering
Execution sequence order executive module from small to large, if there is multiple components that numbering is same value, then
Performed by the way of concurrent thread, wait multiple components of same numbering to be carried out finishing, be further continued for performing
The component of next number.The process of concurrent thread executive module on single machine is as shown in figure 3, first
Be write automation use-case each component get module information and according to use-case execution sequence to component
Number to obtain the execution sequence information of executive module, be that execution sequence information is carried out according to the order of numbering
Each component is performed, the implementing result that use-case is returned after all component has been performed.
In a preferred embodiment, such as transfer services, it is necessary to two database verification components, respectively school
The remaining sum (a) of A accounts is tested, the remaining sum (b) of B accounts, the result message checking (c) of return is verified.
Component a and b due to be in same affairs, can be with so the priority without the time, when verification
Concurrently perform.Component c returned packet, after needing wait a, b component to run succeeded, can just be returned
Return result message.Therefore component c execution may be needed after component a, b are performed.Only ab groups
Part is verified successfully, could complete the verification (c) of returned packet.
Fig. 8 shows the step S12 of a preferred embodiment according to the application other side flow
Schematic diagram;The step S12 includes:Step S121 and step S122, wherein, in step S121
In, when going to multiple executive modules with identical execution sequence information, sent out to the second equipment
Registration request is played, to ask second equipment as each execution with identical execution sequence information
The execution task is simultaneously transferred to some 3rd equipment concurrently to perform by one execution task of component register respectively;
In step S122, the implementing result that second equipment is sent is obtained.
, can be using distribution when going to multiple executive modules with identical execution sequence information
The mode of task call carries out concurrent executive module.In one embodiment, automation use-case exists first
Some server node (the first equipment) is performed, if running into the component that can be concurrent of identical numbering,
Then send and ask to the second equipment so that the second equipment is each one task of component register, wherein, the
Two equipment can be task Centroid, and the execution task of component can be assigned to some three and set by the second equipment
It is standby, wherein, the 3rd equipment is other server nodes, is waited after the completion of all nodes execution, first sets
It is standby to obtain implementing result from the second equipment, finally continue the execution of subsequent component in first equipment
Process.
Preferably, the step S11 also includes:Step S111 (not shown) and step S112, wherein,
In step S111, the related some executive modules of automation use-case are obtained from common package module;
In step S112, the execution logic based on the automation use-case determines the execution of some executive modules
Sequentially.
Here, in the preferred embodiment of the application one, the executive module for automating use-case being decomposed and identified
After logic module and executive module, also need to set up the multiplexing mechanism of executive module, by patrolling for having abstracted
Collect component and verification component is stored in common package module as public component, automation afterwards is used
Example can be directly multiplexed in compiling procedure.Reuse the logic module taken out and verification component
When need to obtain and be multiplexed from common package module, it is then true according to the execution logic for automating use-case
The execution sequence of the executive module of fixed some multiplexings, then, the execution sequence letter based on the executive module
Breath performs the corresponding executive module successively, returns to the execution that implementing result completes automation use-case.
Fig. 9 shows a kind of system side for being used to perform automation use-case according to the application other side
The schematic flow sheet of method, wherein, methods described includes:Step S11, the step S12 at the end of the first equipment 1
With step S13, step S21, step S22 and the step S23 at the end of the second equipment 2, the end of the 3rd equipment 3
Step S31 and step S32.
Those skilled in the art it should be understood that the system with the first equipment 1 and the second equipment 2,
Or the system with the first equipment 1, the second equipment 2 and the 3rd equipment 3, to realize distributed task scheduling
The scheme that the mode of scheduling performs automation use-case is both contained within the scope of the application is claimed.
Here, second equipment 2 can be with multiple cooperatings of 3rd equipment 3, second equipment
2 can select the 3rd different equipment according to strategy completes the first equipment 1 or the 3rd equipment 3 shown in Fig. 5
Work.The step S11 at the end of the first equipment 1:Obtain the related some executive modules of automation use-case and
Its execution sequence information, wherein, the execution sequence information of the executive module is based on the automation use-case
Execution logic determine;Step S12:Execution sequence information based on the executive module performs phase successively
The executive module is answered, when going to multiple executive modules with identical execution sequence information,
Registration request is initiated to the second equipment.The step S21 at the end of the second equipment 2:The first equipment 1 is obtained to send
Registration request;Step S22:It is each described with identical execution sequence information based on the request
Executive module registers an execution task;Step 23:Some three are transferred to set respectively the execution task
It is standby concurrently to perform;The step S31 at the end of the 3rd equipment 3:Second equipment 2 is obtained to be based on identical
The execution task that the executive module of execution sequence information is registered;Step S32:Perform corresponding described
Execution task, and implementing result is fed back into second equipment 2.Then, the step at the end of the second equipment 2
Rapid S24:The implementing result that the 3rd acquired equipment 3 is fed back is sent to first equipment 1, first
The step S13 at the end of equipment 1:Generate final implementing result.
In the coupled system of the first equipment 1 and the second equipment 2 and the 3rd equipment 3, the first equipment 1
It is distributed in from the 3rd equipment 3 on different server nodes, some 3rd equipment 3 are distributed in different clothes
It is engaged on device node, is appointed during multiple executive modules to handle identical execution sequence information using distributed
The mode of business scheduling realizes the concurrent operations of executive module, improves execution efficiency and the multiplexing of automation use-case
Property.
Specifically, in the step S21, the registration request that the first equipment is sent is obtained;In step S22
In, register one for each executive module with identical execution sequence information based on the request and hold
Row task;In step S23, some 3rd equipment are transferred to concurrently to perform respectively the execution task;
In step s 24, the implementing result of the 3rd equipment feedback is obtained, and the implementing result is sent
To first equipment.
Here, in a distributed system, node device centered on the second equipment 2 obtains other sections
The request of point device simultaneously registers corresponding task according to request, according to central node equipment managed from section
The resource utilization of point device task is assigned to it is some from node device, in embodiments herein,
3rd equipment is from node device, in a preferred embodiment, operation of first equipment in executive module
Some components of identical execution sequence information, such as component A, component B, component C execution are run into journey
Order is all n, then by step S21 obtain the registration associated component A of the first device request, component B,
By being respectively component A, component B, component in step S22 after the request of component C execution task
C registers a task (task A, task B, task C);Then step S23 is carried out, according to can enter
Task A, task B, task C are assigned to 1 by the resource utilization of all 3rd equipment of row scheduling
In individual or 2 or 3 the 3rd equipment, operation is concurrently performed through what some 3rd equipment realized component,
The implementing result of the feedback of the 3rd equipment of the task that is assigned to is obtained in step S24, such as perform task A, B,
The implementing result of verification component in C is probably that three tasks are all successfully completed, it is also possible to therein two
It is individual or one successfully complete, will using the 3rd equipment perform can be concurrent executive module implementing result send
To first equipment.
Shown in Fig. 9 with the first equipment 1 and the 3rd equipment 3 of the cooperating of the second equipment 2,
3rd equipment end includes:Step S31 and step S32.Wherein, in step S31, described the is obtained
The execution task that two equipment are registered based on the executive module with identical execution sequence information;In step
In rapid S32, the corresponding execution task is performed, and implementing result is fed back into second equipment.
Here, in a distributed system, the 3rd equipment 3 is set by what the second equipment was managed from node
It is standby, distribute on some servers, the equipment 3 of the second equipment scheduling the 3rd is got in step S31
The execution task that second equipment is distributed, carries out performing the task, in a preferred embodiment, such as transfers accounts
Service is, it is necessary to which two database verification components, respectively verify the remaining sum (a) of A accounts, verify B accounts
The remaining sum (b) at family, the result message checking (c) of return.Component a and b is due to being in same affairs
In, so the priority without the time, can concurrently be performed when verification.3rd acquisition device 31 is obtained
To component a and/or component b execution task, start to verify the remaining sum of A accounts and/or verification B accounts
Remaining sum, when component need a, b component perform after the completion of, implementing result is returned to second by step S32
Forwarding of the equipment through the second equipment sends final implementing result to the first equipment, and the first equipment is according to component
Implementing result, carry out the execution of follow-up component.In the implementing result that the first equipment is obtained, only
Ab components are verified successfully, could complete the verification (c) of returned packet.
In a preferred embodiment, Fig. 6 is shown according to a preferred embodiment of the application one side
The schematic diagram of component concurrent operations is realized by the way of distributed task dispatching.System includes multiple services
Device node and a task Centroid, wherein, server node 1 is the first equipment 1, task center
For the second equipment 2, server node 2,3,4 is the 3rd equipment 3.The registration of the responsible business in task center
And scheduling, server node is responsible for the execution of task.Use-case is automated first in some server node (clothes
Business device node 1) perform, if running into the identical execution sequence information component that such as numbering identical can be concurrent,
It is then each one task of component register at task center, the execution task of component is assigned to by task center
On all server nodes, such as it is assigned on server node 2,3,4, receives the clothes of distribution task
Business device node starts execution task, waits after the completion of all nodes execution, implementing result is fed back into task
Center, task center again returns to the implementing result of feedback initial server node 1, finally at this
Node continues the implementation procedure of subsequent component.
The identification of use-case progress component will be automated by the embodiment of the application, logic module is identified
With verification component, by the way of concurrent thread and distributed task scheduling, progress is performed to component
Concurrent operation, improves the execution efficiency and durability of automation use-case, reduces and performs automation use-case
Time, and then improve product testing efficiency.
It should be noted that the application can be carried out in the assembly of software and/or software and hardware, example
Such as, it can be set using application specific integrated circuit (ASIC), general purpose computer or any other similar hardware
It is standby to realize.In one embodiment, the software program of the application can be realized by computing device
Steps described above or function.Similarly, the software program (including related data structure) of the application
Can be stored in computer readable recording medium storing program for performing, for example, RAM memory, magnetically or optically driver or
Floppy disc and similar devices.In addition, some steps or function of the application can employ hardware to realize, example
Such as, as coordinating with processor so as to performing the circuit of each step or function.
In addition, the part of the application can be applied to computer program product, such as computer journey
Sequence is instructed, and when it is computer-executed, by the operation of the computer, can be called or be provided
According to the present processes and/or technical scheme.And the programmed instruction of the present processes is called, can
It can be stored in fixed or moveable recording medium, and/or be held by broadcast or other signals
Carry the data flow in media and be transmitted, and/or be stored in the meter according to described program instruction operation
In the working storage for calculating machine equipment.Here, including a dress according to one embodiment of the application
Put, the device includes being used to store the memory of computer program instructions and for execute program instructions
Processor, wherein, when the computer program instructions are by the computing device, trigger the device
The methods and/or techniques scheme based on foregoing multiple embodiments according to the application of operation.
It is obvious to a person skilled in the art that the application is not limited to the thin of above-mentioned one exemplary embodiment
Section, and in the case of without departing substantially from spirit herein or essential characteristic, can be with other specific
Form realizes the application.Therefore, no matter from the point of view of which point, embodiment all should be regarded as exemplary
, and be nonrestrictive, scope of the present application is limited by appended claims rather than described above
It is fixed, it is intended that all changes fallen in the implication and scope of the equivalency of claim are included
In the application.The right that any reference in claim should not be considered as involved by limitation will
Ask.Furthermore, it is to be understood that the word of " comprising " one is not excluded for other units or step, odd number is not excluded for plural number.Dress
Software can also be passed through by a unit or device by putting the multiple units stated in claim or device
Or hardware is realized.The first, the second grade word is used for representing title, and is not offered as any specific
Order.