CN109902023A - A kind of test code handoffs control method and device - Google Patents
A kind of test code handoffs control method and device Download PDFInfo
- Publication number
- CN109902023A CN109902023A CN201910203983.1A CN201910203983A CN109902023A CN 109902023 A CN109902023 A CN 109902023A CN 201910203983 A CN201910203983 A CN 201910203983A CN 109902023 A CN109902023 A CN 109902023A
- Authority
- CN
- China
- Prior art keywords
- node
- task amount
- processing task
- amount
- node processing
- 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
Landscapes
- Engineering & Computer Science (AREA)
- Theoretical Computer Science (AREA)
- Computer Hardware Design (AREA)
- Quality & Reliability (AREA)
- Physics & Mathematics (AREA)
- General Engineering & Computer Science (AREA)
- General Physics & Mathematics (AREA)
- Mobile Radio Communication Systems (AREA)
Abstract
The present invention relates to software testing technology fields, disclose a kind of test code handoffs control method and device, comprising: when detecting handoff instructions, determine node processing task amount according to the node load condition information in nodal information;Judge whether node processing task amount is lower than default node processing task amount;When judging that node tasks amount is greater than default node processing task amount, according to node processing power acquisition of information node processing rate;Using node processing rate and node tasks amount as foundation, the transfer timing node that test code matches is generated;When judging that node tasks amount is lower than default node processing task amount, current time is determined as the transfer timing node that test code matches.Under the method, be based on software testing technology, carry out test code handoffs on appropriate opportunity, solve the problems, such as test code handoffs test environment opportunity it is bad cause transfer duration it is too long.
Description
Technical field
The present invention relates to software testing technology field, in particular to a kind of test code handoffs control method and device.
Background technique
Currently, system testing has been widely used in the operation system of different field, by carrying out system to operation system
Test can find in time operation system there are the problem of and be resolved, so as to improve operation system reliability of operation.
When being tested for the operation system group for covering multiple operation systems, it will usually by business in need of test
The corresponding test code handoffs of system test environment.In practice, it has been found that the corresponding test code handoffs test of the operation system
During environment, it often will appear and transfer phenomenon out of season, such as transferred when testing environment congestion, to lead
It causes to transfer duration and occurs considerably beyond normal the case where transferring duration.
To sum up, drawback of the prior art is that: test code handoffs test environment opportunity it is bad cause transfer duration mistake
It is long.
Summary of the invention
Opportunity in order to solve present in the relevant technologies test code handoffs test environment is bad to cause to transfer duration mistake
Long problem, the present invention provides a kind of test code handoffs control method and device.
First aspect of the embodiment of the present invention discloses a kind of test code handoffs control method, which comprises
When detect be used to indicate by it is described test code handoffs to test environment handoff instructions when, obtain the test
Nodal information in environment, the nodal information include at least node load condition information and node processing power information;
Node processing task amount is determined according to the node load condition information;
Judge whether the node processing task amount is lower than default node processing task amount;
When judging the node tasks amount greater than the default node processing task amount, according to the section
Point processing capacity acquisition of information node processing rate;
Using the node processing rate and the node tasks amount as foundation, the transfer that the test code matches is generated
Timing node;
When judging the node tasks amount lower than the default node processing task amount, institute will be determined as current time
State the transfer timing node that test code matches.
Second aspect of the embodiment of the present invention discloses a kind of test code handoffs control device, and described device includes:
First acquisition unit refers to the transfer of the test code handoffs to test environment for that ought detect to be used to indicate
When enabling, the nodal information in the test environment is obtained, the nodal information includes at least node load condition information and node
Processing capacity information;
First determination unit, for determining node processing task amount according to the node load condition information;
Judging unit, for judging whether the node processing task amount is lower than default node processing task amount;
Second acquisition unit judges that the node tasks amount is appointed greater than the default node processing for working as
When business amount, according to the node processing power acquisition of information node processing rate;
Generation unit, for generating the test generation using the node processing rate and the node tasks amount as foundation
The transfer timing node that code matches;
Second determination unit, for when judging the node tasks amount lower than the default node processing task amount,
Current time is determined as the transfer timing node that the test code matches.
The third aspect of the embodiment of the present invention discloses a kind of electronic equipment, and the electronic equipment includes:
Processor;
Memory is stored with computer-readable instruction on the memory, and the computer-readable instruction is by the processing
When device executes, foregoing method is realized.
Fourth aspect of the embodiment of the present invention discloses a kind of computer readable storage medium, stores computer program, described
Computer program makes computer execute foregoing method.
The technical solution that the embodiment of the present invention provides can include the following benefits:
Test code handoffs control method provided by the present invention includes the following steps, is used to indicate and will test when detecting
When code handoffs to the handoff instructions for testing environment, the nodal information in test environment is obtained, nodal information includes at least node
Load condition information and node processing power information;Node processing task amount is determined according to node load condition information;Judgement section
Whether point processing task amount is lower than default node processing task amount;Node is preset when judging that node tasks amount is greater than
When handling task amount, according to node processing power acquisition of information node processing rate;With node processing rate and node tasks amount
For foundation, the transfer timing node that test code matches is generated;Node processing times is preset when judging that node tasks amount is lower than
When business amount, current time is determined as the transfer timing node that test code matches.
Under the method, it is based on software testing technology, when detecting that the handoff instructions of test code are transferred in instruction, Neng Gougen
The opportunity of test code handoffs is determined according to the nodal information in test environment, it is not high with this node tasks amount in test environment
When transfer test code, reduce transfer the time, solve test code handoffs test environment opportunity it is bad cause transfer duration
Too long problem.
It should be understood that the above general description and the following detailed description are merely exemplary, this can not be limited
Invention.
Detailed description of the invention
The drawings herein are incorporated into the specification and forms part of this specification, and shows and meets implementation of the invention
Example, and in specification together principle for explaining the present invention.
Fig. 1 is a kind of schematic diagram for testing code handoffs control device shown according to an exemplary embodiment;
Fig. 2 is a kind of flow chart for testing code handoffs control method shown according to an exemplary embodiment;
Fig. 3 is the flow chart of another test code handoffs control method shown according to an exemplary embodiment;
Fig. 4 is a kind of block diagram for testing code handoffs control device shown according to an exemplary embodiment;
Fig. 5 is the block diagram of another test code handoffs control device shown according to an exemplary embodiment.
Specific embodiment
Here will the description is performed on the exemplary embodiment in detail, the example is illustrated in the accompanying drawings.Following description is related to
When attached drawing, unless otherwise indicated, the same numbers in different drawings indicate the same or similar elements.Following exemplary embodiment
Described in embodiment do not represent all embodiments consistented with the present invention.On the contrary, they be only with it is such as appended
The example of device and method being described in detail in claims, some aspects of the invention are consistent.
Implementation environment of the invention can be portable mobile equipment, such as smart phone, tablet computer, desktop computer.
Fig. 1 is a kind of test code handoffs control device schematic diagram shown according to an exemplary embodiment.Device 100 can
To be above-mentioned portable mobile equipment.As shown in Figure 1, device 100 may include following one or more components: processing component 102,
Memory 104, power supply module 106, multimedia component 108, audio component 110, sensor module 114 and communication component 116.
The integrated operation of the usual control device 100 of processing component 102, such as with display, telephone call, data communication, phase
Machine operation and the associated operation of record operation etc..Processing component 102 may include one or more processors 118 to execute
Instruction, to complete all or part of the steps of following methods.In addition, processing component 102 may include one or more modules,
For convenient for the interaction between processing component 102 and other assemblies.For example, processing component 102 may include multi-media module, use
In to facilitate the interaction between multimedia component 108 and processing component 102.
Memory 104 is configured as storing various types of data to support the operation in device 100.These data are shown
Example includes the instruction of any application or method for operating on the device 100.Memory 104 can be by any kind of
Volatibility or non-volatile memory device or their combination are realized, such as static random access memory (Static Random
Access Memory, abbreviation SRAM), electrically erasable programmable read-only memory (Electrically Erasable
Programmable Read-Only Memory, abbreviation EEPROM), Erasable Programmable Read Only Memory EPROM (Erasable
Programmable Read Only Memory, abbreviation EPROM), programmable read only memory (Programmable Red-
Only Memory, abbreviation PROM), read-only memory (Read-Only Memory, abbreviation ROM), magnetic memory, flash
Device, disk or CD.It is also stored with one or more modules in memory 104, is configured to for the one or more module
It is executed by the one or more processors 118, to complete all or part of step in method as follows.
Power supply module 106 provides electric power for the various assemblies of device 100.Power supply module 106 may include power management system
System, one or more power supplys and other with for device 100 generate, manage, and distribute the associated component of electric power.
Multimedia component 108 includes the screen of one output interface of offer between described device 100 and user.One
In a little embodiments, screen may include liquid crystal display (Liquid Crystal Display, abbreviation LCD) and touch panel.
If screen includes touch panel, screen may be implemented as touch screen, to receive input signal from the user.Touch panel
Including one or more touch sensors to sense the gesture on touch, slide, and touch panel.The touch sensor can be with
The boundary of a touch or slide action is not only sensed, but also detects duration associated with the touch or slide operation and pressure
Power.Screen can also include display of organic electroluminescence (Organic Light Emitting Display, abbreviation OLED).
Audio component 110 is configured as output and/or input audio signal.For example, audio component 110 includes a Mike
Wind (Microphone, abbreviation MIC), when device 100 is in operation mode, such as call model, logging mode and speech recognition mould
When formula, microphone is configured as receiving external audio signal.The received audio signal can be further stored in memory
104 or via communication component 116 send.In some embodiments, audio component 110 further includes a loudspeaker, for exporting
Audio signal.
Sensor module 114 includes one or more sensors, and the state for providing various aspects for device 100 is commented
Estimate.For example, sensor module 114 can detecte the state that opens/closes of device 100, the relative positioning of component, sensor group
Part 114 can be with the position change of 100 1 components of detection device 100 or device and the temperature change of device 100.Some
In embodiment, which can also include Magnetic Sensor, pressure sensor or temperature sensor.
Communication component 116 is configured to facilitate the communication of wired or wireless way between device 100 and other equipment.Device
100 can access the wireless network based on communication standard, such as WiFi (Wireless-Fidelity, Wireless Fidelity).Show at one
In example property embodiment, communication component 116 receives broadcast singal or broadcast from external broadcasting management system via broadcast channel
Relevant information.In one exemplary embodiment, the communication component 116 further includes near-field communication (Near Field
Communication, abbreviation NFC) module, for promote short range communication.For example, radio frequency identification can be based in NFC module
(Radio Frequency Identification, abbreviation RFID) technology, Infrared Data Association (Infrared Data
Association, abbreviation IrDA) technology, ultra wide band (Ultra Wideband, abbreviation UWB) technology, Bluetooth technology and other skills
Art is realized.
In the exemplary embodiment, device 100 can be by one or more application specific integrated circuit (Application
Specific Integrated Circuit, abbreviation ASIC), it is digital signal processor, digital signal processing appts, programmable
Logical device, field programmable gate array, controller, microcontroller, microprocessor or other electronic components are realized, for executing
Following methods.
Fig. 2 is a kind of flow chart for testing code handoffs control method shown according to an exemplary embodiment.Such as Fig. 2 institute
Show, the method the following steps are included:
Step 201, it when detecting the handoff instructions for being used to indicate and testing code handoffs to test environment, obtains and tests
Nodal information in environment, nodal information include at least node load condition information and node processing power information.
In the embodiment of the present invention, testing includes several nodes in environment, and each node can handle corresponding test and appoint
Business, also, the nodal information of each node can include but is not limited to node processing power information and node load situation letter
Breath, wherein node processing power information can indicate the manageable task quantity of node, and node load condition information can refer to
Show the task quantity that node is presently processing.
Step 202, node processing task amount is determined according to node load condition information.
As an alternative embodiment, determining that node processing task amount can wrap according to node load condition information
It includes:
The processing task amount of each node is obtained according to node load condition information;
The average value for handling task amount of each node is calculated, and average value is determined as node processing task amount.
It include the processing task amount of each node in the embodiment of the present invention, in node load condition information, it will be each
The average value for handling task amount of node reflects the whole section of current whole nodes with this as node processing task amount
Point processing task amount situation, enhances the assurance to integral node processing task amount situation.
By implementing this optional embodiment, can be calculated according to the processing task amount of each node
Handle task amount average value, average value is determined as node processing task amount, with this obtain can overall merit node just
In the index of processing task amount, code handoffs timing node is tested to determine accordingly, it is relatively reliable.
Step 203, judge whether node processing task amount is lower than default node processing task amount, if so, executing step
206, if not, executing 204 to step 205.
In the embodiment of the present invention, presetting node processing task amount can be pre-set test environment normal operation
Under maximum node handle task amount.If node processing task amount is lower than default node processing task amount, when illustrating current
The node processing task amount at quarter is within the scope of the node processing task amount that test environment works normally, at this time can be when will be current
It carves and is determined as testing the transfer timing node that code matches.If node processing task amount is greater than at default node
Task amount is managed, then illustrates that the node processing task amount at current time is not at the node processing task amount that test environment works normally
In range, it can further be determined according to node processing rate and node tasks amount transfer timing node at this time.
Step 204, according to node processing power acquisition of information node processing rate.
In the embodiment of the present invention, node processing power information is including at least each node just in processing speed, Ke Yigen
Average value just is calculated in processing speed according to each node, as node processing rate, wherein node processing rate is used for
React the velocity information of current time node processing data.
As an alternative embodiment, may include: according to node processing power acquisition of information node processing rate
According to the node of each node of node processing power acquisition of information just in processing speed;
The node of each node is calculated just in the average value of processing speed, and average value is determined as node processing rate.
By implementing this optional embodiment, can just saved according to the node of each node in processing speed to calculate
Point just in the average value of processing speed, average value is determined as node processing rate, with this obtain can overall merit node just
In the index of processing speed, code handoffs timing node is tested to determine accordingly, it is relatively reliable.
Step 205, using node processing rate and node tasks amount as foundation, the transfer time that test code matches is generated
Node.
As an alternative embodiment, generating test code using node processing rate and node tasks amount as foundation
The transfer timing node to match may include:
The section that predicted time node matches is calculated according to node tasks amount, node processing rate and preset predictive formula
The following processing task amount of point, wherein preset predictive formula is as follows:
X=a-v × t
Wherein, a indicates node tasks amount, and v indicates node processing rate, and t indicates predicted time node, when x indicates prediction
The node future that intermediate node matches handles task amount;
By the storage corresponding with the node future processing task amount that predicted time node matches of predicted time node, saved
Point time series forecasting summary table;
The mesh that node future processing task amount is less than default node processing task amount is chosen in node time series forecasting summary table
Mark node processing task amount;
The target prediction timing node that destination node processing task amount matches is determined as the shifting that test code matches
Hand over timing node.
In the embodiment of the present invention, it can specify that the unit of node processing rate v is task quantity/per second, predicted time section
The unit of point t can be the second, and predicted time node t can indicate to begin to pass through t from current time, for example, working as predicted time section
When point t is 30s, at the time of expression by after 30 seconds.Following several moment can be calculated by the preset predictive formula
(at the time of after 1s, 2s, 3s etc.) node future corresponding with the moment handles task quantity.
By implementing this optional embodiment, several predicted time nodes and each predicted time section can be calculated
The node future processing task amount that point matches, obtains node time series forecasting summary table, section is determined from node time series forecasting summary table
The following processing task amount of point is less than the target prediction timing node of default node processing task amount, thus smaller in node tasks amount
Under the premise of it is as early as possible carry out test code handoffs, improve the precision for choosing test code handoffs opportunity.
Step 206, current time is determined as the transfer timing node that test code matches.
Under the above method, it is based on software testing technology, it, can when detecting that the handoff instructions of test code are transferred in instruction
The opportunity of test code handoffs is determined according to the nodal information in test environment, not with this node tasks amount in test environment
When high transfer test code, reduce transfer the time, solve test code handoffs test environment opportunity it is bad cause transfer when
Long too long problem.
Fig. 3 is the flow chart of another test code handoffs control method shown according to another exemplary embodiment.Such as
Shown in Fig. 3, the method the following steps are included:
Step 301, it when detecting the handoff instructions for being used to indicate and testing code handoffs to test environment, obtains and tests
Nodal information in environment, nodal information include at least node load condition information and node processing power information.
Step 302, node processing task amount is determined according to node load condition information.
Step 303, judge whether node processing task amount is lower than default node processing task amount, if so, executing step
304 to step 305, if not, executing step 306 to step 307.
Step 304, according to node processing power acquisition of information node processing rate.
Step 305, using node processing rate and node tasks amount as foundation, the transfer time that test code matches is generated
Node.
Step 306, the node processing task amount distributed intelligence in test environment is obtained.
In the embodiment of the present invention, node processing task amount distributed intelligence may include each node tested in environment and its
The node processing task amount to match.
Step 307, judge whether the distributed intelligence of node processing task amount matches with deviation profile information, if so, knot
Shu Benci process, if not, executing step 308.
Default underload node deviation ratio and default height are included at least in the embodiment of the present invention, in deviation profile information
Load bus deviation ratio, default underload node deviation ratio are that pre-set underload node can account for total node number amount
Maximum ratio, default high load capacity node deviation ratio is the maximum that pre-set high load capacity node can account for total node number amount
Ratio.
As an alternative embodiment, judge the distributed intelligence of node processing task amount and deviation profile information whether phase
Matching may include:
High load capacity number of nodes and underload number of nodes are obtained according to node processing task amount distributed intelligence;
The first ratio that underload number of nodes accounts for total node number amount is calculated, and calculates high load capacity number of nodes Zhan and always saves
Second ratio of point quantity;
Obtain the default underload node deviation ratio and default high load capacity node deviation ratio in deviation profile information;
Judge whether the first ratio is higher than default underload node deviation ratio and to judge whether the second ratio is higher than pre-
If high load capacity node deviation ratio;
When the first ratio is less than or equal to less than or equal to default underload node deviation ratio and/or the second ratio
When default high load capacity node deviation ratio, determine that the distributed intelligence of node processing task amount is not matched that with deviation profile information;
When the first ratio is higher than default underload node deviation ratio and the second ratio is higher than default high load capacity node deviation
When ratio, determine that the distributed intelligence of node processing task amount matches with deviation profile information.
In the embodiment of the present invention, when the first ratio is higher than default underload node deviation ratio and the second ratio higher than default
When high load capacity node deviation ratio, illustrate that node processing task amount is unevenly distributed at this time, it accordingly can be to node processing task amount
The case where being unevenly distributed determines without transferring.
By implementing this optional embodiment, can be sentenced according to high load capacity number of nodes and underload number of nodes
Whether disconnected node processing task amount distributed intelligence matches with deviation profile information, and present node load is illustrated if matching not
, although the average task amount that handling is lower, probably because node load unevenness causes the transfer time elongated, at this time
Without transferring, the reliability on determining transfer opportunity is improved.
As an alternative embodiment, according to node processing task amount distributed intelligence obtain high load capacity number of nodes and
Underload number of nodes may include:
According to the gauge load task amount of each node of node processing power acquisition of information;
Using the distributed intelligence of node processing task amount as foundation, the gauge load task amount and node processing of each node are calculated
The difference of task amount;
The absolute value of difference is greater than preset difference value and difference and is determined as underload node for the node of positive number, and will be poor
The absolute value of value is greater than preset difference value and difference and is determined as high load capacity node for the node of negative;
Count the corresponding underload number of nodes of underload node, and the corresponding high load capacity node of statistics high load capacity node
Quantity.
In the embodiment of the present invention, gauge load task amount is the normal tasks amount that the node is capable of handling, if task amount
Much higher than gauge load task amount, illustrates that the node is the node of overwork, that is to say, which is determined as high load capacity
Node illustrates that the node is the node of underload work, that is to say, by this if task amount is much smaller than gauge load task amount
Node is determined as underload node.
It, can be according to the gauge load task amount and node processing of each node by implementing this optional embodiment
Task distribution amount accurately obtains underload number of nodes and high load capacity number of nodes, to improve to node load unevenness feelings
The accuracy of condition identification.
As an alternative embodiment, judging the distributed intelligence of node processing task amount and deviation profile information phase
After matching, following steps can also be performed:
The maintenance terminal to match to test environment sends the prompt for prompting the node load unevenness in test environment
Message.
In the embodiment of the present invention, the maintenance terminal that test environment matches can be the maintenance personnel of the configuration test environment
Used electronic equipment.
By implementing this optional embodiment, the maintenance people at maintenance terminal that test environment can be prompted to match
Member safeguards the situation of test environment interior joint load unevenness, to improve the stability of test environment.
Step 308, current time is determined as the transfer timing node that test code matches.
Under the above method, it is based on software testing technology, it, can when detecting that the handoff instructions of test code are transferred in instruction
The opportunity of test code handoffs is determined according to the nodal information in test environment, not with this node tasks amount in test environment
When high transfer test code, reduce transfer the time, solve test code handoffs test environment opportunity it is bad cause transfer when
Long too long problem.
It is the device of the invention embodiment below.
Fig. 4 is a kind of block diagram for testing code handoffs control device shown according to an exemplary embodiment.Such as Fig. 4 institute
Show, which includes:
First acquisition unit 401 detects that being used to indicate the transfer that will test code handoffs extremely test environment refers to for working as
When enabling, the nodal information in test environment is obtained, nodal information includes at least node load condition information and node processing power
Information.
In the embodiment of the present invention, testing includes several nodes in environment, and each node can handle corresponding test and appoint
Business, also, the nodal information of each node can include but is not limited to node processing power information and node load situation letter
Breath, wherein node processing power information can indicate the manageable task quantity of node, and node load condition information can refer to
Show the task quantity that node is presently processing.
First determination unit 402, for determining node processing task amount according to node load condition information.
As an alternative embodiment, the first determination unit 402 determines at node according to node load condition information
Managing task amount may include:
First determination unit 402 obtains the processing task amount of each node according to node load condition information;
First determination unit 402 calculates the average value for handling task amount of each node, and average value is determined as
Node processing task amount.
It include the processing task amount of each node in the embodiment of the present invention, in node load condition information, it will be each
The average value for handling task amount of node reflects the whole section of current whole nodes with this as node processing task amount
Point processing task amount situation, enhances the assurance to integral node processing task amount situation.
By implementing this optional embodiment, can be calculated according to the processing task amount of each node
Handle task amount average value, average value is determined as node processing task amount, with this obtain can overall merit node just
In the index of processing task amount, code handoffs timing node is tested to determine accordingly, it is relatively reliable.
Judging unit 403, for judging whether node processing task amount is lower than default node processing task amount.
In the embodiment of the present invention, presetting node processing task amount can be pre-set test environment normal operation
Under maximum node handle task amount.If node processing task amount is lower than default node processing task amount, when illustrating current
The node processing task amount at quarter is within the scope of the node processing task amount that test environment works normally, at this time can be when will be current
It carves and is determined as testing the transfer timing node that code matches.If node processing task amount is greater than at default node
Task amount is managed, then illustrates that the node processing task amount at current time is not at the node processing task amount that test environment works normally
In range, it can further be determined according to node processing rate and node tasks amount transfer timing node at this time.
Second acquisition unit 404 judges that node tasks amount is greater than default node processing task amount for working as
When, according to node processing power acquisition of information node processing rate.
In the embodiment of the present invention, node processing power information is including at least each node just in processing speed, Ke Yigen
Average value just is calculated in processing speed according to each node, as node processing rate, wherein node processing rate is used for
React the velocity information of current time node processing data.
As an alternative embodiment, second acquisition unit 404 according to node processing power acquisition of information node at
Managing rate may include:
Second acquisition unit 404 is according to the node of each node of node processing power acquisition of information just in processing speed;
Second acquisition unit 404 calculates the node of each node just in the average value of processing speed, and average value is determined
For node processing rate.
By implementing this optional embodiment, can just saved according to the node of each node in processing speed to calculate
Point just in the average value of processing speed, average value is determined as node processing rate, with this obtain can overall merit node just
In the index of processing speed, code handoffs timing node is tested to determine accordingly, it is relatively reliable.
Generation unit 405 tests what code matched for generating using node processing rate and node tasks amount as foundation
Transfer timing node.
As an alternative embodiment, generation unit 405 is using node processing rate and node tasks amount as foundation, it is raw
May include: at the transfer timing node that test code matches
Generation unit 405 calculates predicted time section according to node tasks amount, node processing rate and preset predictive formula
The node future processing task amount that point matches, wherein preset predictive formula is as follows:
X=a-v × t
Wherein, a indicates node tasks amount, and v indicates node processing rate, and t indicates predicted time node, when x indicates prediction
The node future that intermediate node matches handles task amount;
Generation unit 405 is corresponding with the node future processing task amount that predicted time node matches by predicted time node
Storage obtains node time series forecasting summary table;
Generation unit 405 chooses node future processing task amount in node time series forecasting summary table and is less than default node processing
The destination node of task amount handles task amount;
Generation unit 405 is determined as the target prediction timing node that destination node processing task amount matches to test code
The transfer timing node to match.
By implementing this optional embodiment, several predicted time nodes and each predicted time section can be calculated
The node future processing task amount that point matches, obtains node time series forecasting summary table, section is determined from node time series forecasting summary table
The following processing task amount of point is less than the target prediction timing node of default node processing task amount, thus smaller in node tasks amount
Under the premise of it is as early as possible carry out test code handoffs, improve the precision for choosing test code handoffs opportunity.
Second determination unit 406 will be current for when judging that node tasks amount is lower than default node processing task amount
Moment is determined as testing the transfer timing node that code matches.
As it can be seen that being based on software testing technology by implementing the described test code handoffs control device of Fig. 4, detecting
When transferring the handoff instructions of test code to instruction, test code handoffs can be determined according to the nodal information in test environment
Opportunity is transferred test code when the node tasks amount tested in environment is not high with this, reduces and transfer the time, solve test generation
Code transfers the opportunity bad problem for causing transfer duration too long of test environment.
Fig. 5 is the block diagram of another test code handoffs control device shown according to an exemplary embodiment.Fig. 5 be
Optimization obtains on the basis of Fig. 4, compared with test code handoffs control device shown in Fig. 4, test code handoffs shown in fig. 5
Control device can also include:
Third acquiring unit 407, for obtaining the node processing task amount distributed intelligence in test environment.
In the embodiment of the present invention, node processing task amount distributed intelligence may include each node tested in environment and its
The node processing task amount to match.
Judging unit 403, is also used to judge whether the distributed intelligence of node processing task amount matches with deviation profile information,
If mismatched, the second determination unit 406 of triggering, which executes, above-mentioned to be determined as current time to test the transfer that matches of code
Timing node.
Default underload node deviation ratio and default height are included at least in the embodiment of the present invention, in deviation profile information
Load bus deviation ratio, default underload node deviation ratio are that pre-set underload node can account for total node number amount
Maximum ratio, default high load capacity node deviation ratio is the maximum that pre-set high load capacity node can account for total node number amount
Ratio.
As an alternative embodiment, judging unit 403 judges the distributed intelligence of node processing task amount and deviation point
Whether cloth information matches
Judging unit 403 obtains high load capacity number of nodes and underload number of nodes according to node processing task amount distributed intelligence
Amount;
Judging unit 403 calculates the first ratio that underload number of nodes accounts for total node number amount, and calculates high load capacity section
Point quantity accounts for the second ratio of total node number amount;
Judging unit 403 obtains the default underload node deviation ratio and default high load capacity section in deviation profile information
Point deviation ratio;
Judging unit 403 judges whether the first ratio is higher than default underload node deviation ratio and judges the second ratio
Whether default high load capacity node deviation ratio is higher than;
When the first ratio is less than or equal to less than or equal to default underload node deviation ratio and/or the second ratio
When default high load capacity node deviation ratio, judging unit 403 determines the distributed intelligence of node processing task amount and deviation profile information
It does not match that;
When the first ratio is higher than default underload node deviation ratio and the second ratio is higher than default high load capacity node deviation
When ratio, judging unit 403 determines that the distributed intelligence of node processing task amount matches with deviation profile information.
In the embodiment of the present invention, when the first ratio is higher than default underload node deviation ratio and the second ratio higher than default
When high load capacity node deviation ratio, illustrate that node processing task amount is unevenly distributed at this time, it accordingly can be to node processing task amount
The case where being unevenly distributed determines without transferring.
By implementing this optional embodiment, can be sentenced according to high load capacity number of nodes and underload number of nodes
Whether disconnected node processing task amount distributed intelligence matches with deviation profile information, and present node load is illustrated if matching not
, although the average task amount that handling is lower, probably because node load unevenness causes the transfer time elongated, at this time
Without transferring, the reliability on determining transfer opportunity is improved.
As another optional embodiment, judging unit 403 obtains high according to node processing task amount distributed intelligence
Load bus quantity and underload number of nodes may include:
Judging unit 403 is according to the gauge load task amount of each node of node processing power acquisition of information;
Judging unit 403 calculates the gauge load task of each node using the distributed intelligence of node processing task amount as foundation
The difference of amount and node processing task amount;
The absolute value of difference is greater than preset difference value and difference and is determined as underload section for the node of positive number by judging unit 403
Point, and the absolute value of difference is greater than preset difference value and difference and is determined as high load capacity node for the node of negative;
Judging unit 403 counts the corresponding underload number of nodes of underload node, and statistics high load capacity node corresponds to
High load capacity number of nodes.
In the embodiment of the present invention, gauge load task amount is the normal tasks amount that the node is capable of handling, if task amount
Much higher than gauge load task amount, illustrates that the node is the node of overwork, that is to say, which is determined as high load capacity
Node illustrates that the node is the node of underload work, that is to say, by this if task amount is much smaller than gauge load task amount
Node is determined as underload node.
It, can be according to the gauge load task amount and node processing of each node by implementing this optional embodiment
Task distribution amount accurately obtains underload number of nodes and high load capacity number of nodes, to improve to node load unevenness feelings
The accuracy of condition identification.
As another optional embodiment, judging unit 403 judge the distributed intelligence of node processing task amount with
After deviation profile information matches, judging unit 403 be can be also used for:
The maintenance terminal to match to test environment sends the prompt for prompting the node load unevenness in test environment
Message.
In the embodiment of the present invention, the maintenance terminal that test environment matches can be the maintenance personnel of the configuration test environment
Used electronic equipment.
By implementing this optional embodiment, the maintenance people at maintenance terminal that test environment can be prompted to match
Member safeguards the situation of test environment interior joint load unevenness, to improve the stability of test environment.
As it can be seen that being based on software testing technology by implementing the described test code handoffs control device of Fig. 5, detecting
When transferring the handoff instructions of test code to instruction, test code handoffs can be determined according to the nodal information in test environment
Opportunity is transferred test code when the node tasks amount tested in environment is not high with this, reduces and transfer the time, solve test generation
Code transfers the opportunity bad problem for causing transfer duration too long of test environment.
The present invention also provides a kind of electronic equipment, which includes:
Processor;
Memory is stored with computer-readable instruction on the memory, when which is executed by processor,
Realize test code handoffs control method as previously shown.
The electronic equipment, which can be, tests code handoffs device 100 shown in Fig. 1.
In one exemplary embodiment, the present invention also provides a kind of computer readable storage mediums, are stored thereon with calculating
Machine program when the computer program is executed by processor, realizes test code handoffs control method as previously shown.
It should be understood that the present invention is not limited to the precise structure already described above and shown in the accompanying drawings, and
And various modifications and change can executed without departing from the scope.The scope of the present invention is limited only by the attached claims.
Claims (10)
1. a kind of test code handoffs control method, which is characterized in that the described method includes:
When detect be used to indicate by it is described test code handoffs to test environment handoff instructions when, obtain the test environment
In nodal information, the nodal information include at least node load condition information and node processing power information;
Node processing task amount is determined according to the node load condition information;
Judge whether the node processing task amount is lower than default node processing task amount;
When judging the node tasks amount greater than the default node processing task amount, at the node
Manage capability information obtaining node processing rate;
Using the node processing rate and the node tasks amount as foundation, the transfer time that the test code matches is generated
Node;
When judging the node tasks amount lower than the default node processing task amount, the survey will be determined as current time
The transfer timing node that examination code matches.
2. the method according to claim 1, wherein described determine node according to the node load condition information
Handle task amount, comprising:
The processing task amount of each node is obtained according to the node load condition information;
The average value for handling task amount of each node is calculated, and the average value is determined as node processing task
Amount.
3. the method according to claim 1, wherein described with the node processing rate and the node tasks
Amount is foundation, generates the transfer timing node that the test code matches, comprising:
Predicted time node is calculated according to the node tasks amount, the node processing rate and preset predictive formula to match
Node future handle task amount, wherein the preset predictive formula is as follows:
X=a-v × t
Wherein, a indicates the node tasks amount, and the v indicates the node processing rate, and the t indicates the prediction
Timing node, the x indicate the node future processing task amount that the predicted time node matches;
By node future processing that the predicted time node and the predicted time node match, task amount is corresponding deposits
Storage obtains node time series forecasting summary table;
The node future processing task amount is chosen in the node time series forecasting summary table to appoint less than the default node processing
The destination node of business amount handles task amount;
The target prediction timing node that destination node processing task amount matches is determined as the test code to match
Transfer timing node.
4. method according to any one of claims 1 to 3, which is characterized in that the nodal information further includes node processing
Task amount distributed intelligence is judging the node tasks amount lower than after the default node processing task amount and described
Current time is determined as before the transfer timing node that the test code matches, the method also includes:
Obtain the node processing task amount distributed intelligence in the test environment;
Judge whether the node processing task amount distributed intelligence matches with deviation profile information;
If mismatched, the transfer timing node that current time is determined as to the test code and is matched is executed.
5. according to the method described in claim 4, it is characterized in that, the judgement node processing task amount distributed intelligence with
Whether deviation profile information matches, comprising:
High load capacity number of nodes and underload number of nodes are obtained according to the node processing task amount distributed intelligence;
The first ratio that the underload number of nodes accounts for total node number amount is calculated, and calculates the high load capacity number of nodes and accounts for
Second ratio of the total node number amount;
Obtain the default underload node deviation ratio and default high load capacity node deviation ratio in deviation profile information;
Judge whether first ratio is higher than the default underload node deviation ratio and judges that second ratio is
It is no to be higher than the default high load capacity node deviation ratio;
When first ratio is less than less than or equal to the default underload node deviation ratio and/or second ratio
Or when being equal to the default high load capacity node deviation ratio, determine the node processing task amount distributed intelligence and the deviation
Distributed intelligence does not match that;
When first ratio is higher than the default underload node deviation ratio and second ratio is higher than the default height
When load bus deviation ratio, determine that the node processing task amount distributed intelligence matches with the deviation profile information.
6. according to the method described in claim 5, it is characterized in that, described obtain according to the node processing task amount distributed intelligence
Take high load capacity number of nodes and underload number of nodes, comprising:
According to the gauge load task amount of each node of node processing power acquisition of information;
Using the node processing task amount distributed intelligence as foundation, calculate the gauge load task amount of each node with
The difference of the node processing task amount;
The absolute value of the difference is greater than preset difference value and the difference and is determined as underload node for the node of positive number, and
The absolute value of the difference is greater than the preset difference value and the difference and is determined as high load capacity node for the node of negative;
Count the corresponding underload number of nodes of the underload node, and the corresponding high load capacity of the statistics high load capacity node
Number of nodes.
7. according to the method described in claim 4, it is characterized in that, judge the node processing task amount distributed intelligence with
After the deviation profile information matches, the method also includes:
The maintenance terminal to match to the test environment is sent for prompting the node load unevenness in the test environment
Prompting message.
8. a kind of test code handoffs control device, which is characterized in that described device includes:
First acquisition unit is used to indicate for that ought detect by the test code handoffs to the handoff instructions for testing environment
When, the nodal information in the test environment is obtained, the nodal information includes at least at node load condition information and node
Manage ability information;
First determination unit, for determining node processing task amount according to the node load condition information;
Judging unit, for judging whether the node processing task amount is lower than default node processing task amount;
Second acquisition unit judges the node tasks amount greater than the default node processing task amount for working as
When, according to the node processing power acquisition of information node processing rate;
Generation unit, for generating the test code phase using the node processing rate and the node tasks amount as foundation
Matched transfer timing node;
Second determination unit, for that will work as when judging the node tasks amount lower than the default node processing task amount
The preceding moment is determined as the transfer timing node that the test code matches.
9. a kind of electronic equipment, which is characterized in that the electronic equipment includes:
Processor;
Memory is stored with computer-readable instruction on the memory, and the computer-readable instruction is held by the processor
When row, method as described in any one of claim 1 to 7 is realized.
10. a kind of computer readable storage medium, which is characterized in that it stores computer program, and the computer program makes
Computer perform claim requires 1~7 described in any item methods.
Priority Applications (2)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201910203983.1A CN109902023B (en) | 2019-03-18 | 2019-03-18 | Test code handover control method and device |
PCT/CN2019/117654 WO2020186781A1 (en) | 2019-03-18 | 2019-11-12 | Test code handover control method and apparatus, electronic device, and computer non-volatile readable storage medium |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201910203983.1A CN109902023B (en) | 2019-03-18 | 2019-03-18 | Test code handover control method and device |
Publications (2)
Publication Number | Publication Date |
---|---|
CN109902023A true CN109902023A (en) | 2019-06-18 |
CN109902023B CN109902023B (en) | 2022-06-03 |
Family
ID=66953654
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201910203983.1A Active CN109902023B (en) | 2019-03-18 | 2019-03-18 | Test code handover control method and device |
Country Status (2)
Country | Link |
---|---|
CN (1) | CN109902023B (en) |
WO (1) | WO2020186781A1 (en) |
Cited By (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
WO2020186781A1 (en) * | 2019-03-18 | 2020-09-24 | 平安普惠企业管理有限公司 | Test code handover control method and apparatus, electronic device, and computer non-volatile readable storage medium |
Citations (8)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN102711177A (en) * | 2012-04-26 | 2012-10-03 | 北京邮电大学 | Service prediction based load balancing method |
CN105471933A (en) * | 2014-08-07 | 2016-04-06 | 腾讯科技(深圳)有限公司 | Server overload protecting method, server overload protecting system and server |
CN105786592A (en) * | 2014-12-15 | 2016-07-20 | 北大方正集团有限公司 | Method and device for processing distributed transactions |
CN106203662A (en) * | 2016-07-13 | 2016-12-07 | 华南理工大学 | A kind of based on ETC system realize highway pass through reservation method |
US20180068250A1 (en) * | 2016-09-08 | 2018-03-08 | International Business Machines Corporation | Using run time and historical customer profiling and analytics to determine customer test vs. production differences, and to enhance customer test effectiveness |
CN108564247A (en) * | 2018-03-02 | 2018-09-21 | 阿里巴巴集团控股有限公司 | Data adjustment method, device and server |
CN109102169A (en) * | 2018-07-24 | 2018-12-28 | 武汉空心科技有限公司 | Development approach and system based on function metering |
CN109284895A (en) * | 2018-08-15 | 2019-01-29 | 平安普惠企业管理有限公司 | Project task distribution method, device, computer equipment and storage medium |
Family Cites Families (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN102096602A (en) * | 2009-12-15 | 2011-06-15 | 中国移动通信集团公司 | Task scheduling method, and system and equipment thereof |
CN103473345B (en) * | 2013-09-23 | 2017-03-29 | 融创天下(上海)科技发展有限公司 | A kind of method for estimating duration |
TWI549053B (en) * | 2014-10-14 | 2016-09-11 | The Dynamic Operation Environment Adjustment System and Method Based on Computing Work | |
CN107480041A (en) * | 2016-06-07 | 2017-12-15 | 中兴通讯股份有限公司 | The task automation method of testing and system of a kind of big data |
CN109902023B (en) * | 2019-03-18 | 2022-06-03 | 平安普惠企业管理有限公司 | Test code handover control method and device |
-
2019
- 2019-03-18 CN CN201910203983.1A patent/CN109902023B/en active Active
- 2019-11-12 WO PCT/CN2019/117654 patent/WO2020186781A1/en active Application Filing
Patent Citations (8)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN102711177A (en) * | 2012-04-26 | 2012-10-03 | 北京邮电大学 | Service prediction based load balancing method |
CN105471933A (en) * | 2014-08-07 | 2016-04-06 | 腾讯科技(深圳)有限公司 | Server overload protecting method, server overload protecting system and server |
CN105786592A (en) * | 2014-12-15 | 2016-07-20 | 北大方正集团有限公司 | Method and device for processing distributed transactions |
CN106203662A (en) * | 2016-07-13 | 2016-12-07 | 华南理工大学 | A kind of based on ETC system realize highway pass through reservation method |
US20180068250A1 (en) * | 2016-09-08 | 2018-03-08 | International Business Machines Corporation | Using run time and historical customer profiling and analytics to determine customer test vs. production differences, and to enhance customer test effectiveness |
CN108564247A (en) * | 2018-03-02 | 2018-09-21 | 阿里巴巴集团控股有限公司 | Data adjustment method, device and server |
CN109102169A (en) * | 2018-07-24 | 2018-12-28 | 武汉空心科技有限公司 | Development approach and system based on function metering |
CN109284895A (en) * | 2018-08-15 | 2019-01-29 | 平安普惠企业管理有限公司 | Project task distribution method, device, computer equipment and storage medium |
Non-Patent Citations (4)
Title |
---|
M. EL ZARKI: "-1 Distributecl Routing Sclierne for Networks of the Future", 《HTTPS://IEEEXPLORE.IEEE.ORG/STAMP/STAMP.JSP?TP=&ARNUMBER=138299》 * |
刘晓飞: "计算机网络拥塞控制算法综述", 《铜仁学院学报》 * |
我不爱机器学习: "时间序列分析和预测", 《HTTPS://BLOG.CSDN.NET/MENGJIZHIYOU/ARTICLE/DETAILS/82683448》 * |
李军; 张国柱; 雍少为: "代码移交测试模型及其应用", 《现代电子技术》 * |
Cited By (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
WO2020186781A1 (en) * | 2019-03-18 | 2020-09-24 | 平安普惠企业管理有限公司 | Test code handover control method and apparatus, electronic device, and computer non-volatile readable storage medium |
Also Published As
Publication number | Publication date |
---|---|
CN109902023B (en) | 2022-06-03 |
WO2020186781A1 (en) | 2020-09-24 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN103155428B (en) | The device and method of adaptive gesture identification are used in portable terminal | |
CN108257378B (en) | Traffic flow prediction method and device | |
CN109509017B (en) | User retention prediction method and device based on big data analysis | |
CN106354628A (en) | Payment app test method and device thereof | |
CN104991137B (en) | Apparatus testing method and device | |
CN110347672A (en) | Verification method and device, the electronic equipment and storage medium of tables of data related update | |
CN110134574A (en) | A kind of software performance testing method, system, medium and electronic equipment | |
CN110018920A (en) | A kind of detection method, device and the equipment of page presentation exception | |
CN104020924B (en) | Label creation method, device and terminal | |
CN109992965A (en) | Process handling method and device, electronic equipment, computer readable storage medium | |
CN110134593A (en) | Method for testing software, device, electronic equipment and storage medium | |
CN110008008A (en) | Applied program processing method and device, electronic equipment, computer readable storage medium | |
CN108268366A (en) | Test example executing method and device | |
CN108616653A (en) | Information processing method, device, mobile terminal and computer readable storage medium | |
CN105094465B (en) | Ambient light measurement method and device | |
CN106250430A (en) | The sort method of smart machine list and device | |
CN106790895A (en) | A kind of fault handling method and device | |
CN109753425A (en) | Pop-up processing method and processing device | |
CN107566624A (en) | A kind of power consumption of terminal and the display methods of temperature and terminal | |
CN107323111A (en) | Predict method, device and the storage medium of printer ink head clearance time | |
CN114760339A (en) | Fault prediction method, apparatus, device, medium, and product | |
CN108764283A (en) | A kind of the loss value-acquiring method and device of disaggregated model | |
CN109902023A (en) | A kind of test code handoffs control method and device | |
CN110119354A (en) | Method for testing software, device and electronic equipment based on Test cases technology | |
CN110267125A (en) | Intelligent meter reading method and Related product |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
PB01 | Publication | ||
PB01 | Publication | ||
CB02 | Change of applicant information | ||
CB02 | Change of applicant information |
Address after: 201, room 518000, building A, No. 1, front Bay Road, Qianhai Shenzhen Guangdong Shenzhen Hong Kong cooperation zone (Qianhai business secretary) Applicant after: Pingan Pu Hui Enterprise Management Co., Ltd. Address before: 518000 Guangdong city of Shenzhen province Qianhai Shenzhen Hong Kong cooperation zone before Bay Road No. 1 building 201 room A Applicant before: Pingan Pu Hui Enterprise Management Co., Ltd. |
|
SE01 | Entry into force of request for substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
GR01 | Patent grant | ||
GR01 | Patent grant |