CN108763085A - On-line debugging device, method and the computer readable storage medium of test cases - Google Patents
On-line debugging device, method and the computer readable storage medium of test cases Download PDFInfo
- Publication number
- CN108763085A CN108763085A CN201810544750.3A CN201810544750A CN108763085A CN 108763085 A CN108763085 A CN 108763085A CN 201810544750 A CN201810544750 A CN 201810544750A CN 108763085 A CN108763085 A CN 108763085A
- Authority
- CN
- China
- Prior art keywords
- task
- debugging
- code
- test
- case
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Pending
Links
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F11/00—Error detection; Error correction; Monitoring
- G06F11/36—Preventing errors by testing or debugging software
- G06F11/3668—Software testing
- G06F11/3672—Test management
- G06F11/3684—Test management for test design, e.g. generating new test cases
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F11/00—Error detection; Error correction; Monitoring
- G06F11/36—Preventing errors by testing or debugging software
- G06F11/362—Software debugging
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)
- Debugging And Monitoring (AREA)
Abstract
The invention discloses a kind of on-line debugging device of test cases, including memory and processor, the case debugging routine that can be run on a processor is stored on memory, which realizes following steps when being executed by processor:When detecting the case edit instruction of user's transmission, presenting case editing interface;It obtains the code of test cases and stores to code library;When detecting the debugging instruction triggered based on test cases, establishes debugging task and determine the parameter of the task;Debugging task is added in task queue, debugging task is transferred from task queue by execution machine cluster and is executed, and task data is written back in presetting database;If detecting, debugging task is completed, and task data is read from presetting database and is shown.The present invention also proposes a kind of on-line debugging method of test cases and a kind of computer readable storage medium.The present invention solves the technical issues of existing adjustment method is difficult to accurately completely embody test case.
Description
Technical field
The present invention relates to field of computer technology more particularly to on-line debugging device, method and the meters of a kind of test cases
Calculation machine readable storage medium storing program for executing.
Background technology
Existing Testing Platform does not support on-line debugging function, therefore in the debugging link of test cases, generally all
Using local calling, i.e., debugging enironment locally is being built, the test cases of editor debugged, but due to locally building
Debugging enironment is difficult to keep consistent with the actual application environment of system, i.e., running environment when test cases is debugged and test cases
It is different in the running environment of actual test, cause to there are problems that being difficult to accurately completely embodying test case.
Invention content
The present invention provides a kind of on-line debugging device, method and the computer readable storage medium of test cases, main
Purpose is to solve the technical issues of existing adjustment method is difficult to accurately completely embody test case.
To achieve the above object, the present invention provides a kind of on-line debugging device of test cases, which includes memory
And processor, the case debugging routine that can be run on the processor is stored in the memory, the case debugs journey
Sequence realizes following steps when being executed by the processor:
When detecting the case edit instruction that user is sent based on user terminal, presenting case editing interface is for user
Edit test cases;
The code for the test cases that user is write based on the case editing interface is obtained, and the code was stored to generation
Code library;
When detecting the debugging instruction triggered based on the test cases, debugging task is established according to the debugging instruction
And determine the parameter of the debugging task;
The debugging task is added in task queue, by the execution for being currently at idle state in execution machine cluster
The debugging task is transferred from the task queue according to preset Task Scheduling Mechanism and executed to machine, with to system under test (SUT) into
Row test, and task data is written back in presetting database by execution machine;
If detecting, the debugging task is completed, and the task data is read from the presetting database and is shown.
Optionally, described when detecting the case edit instruction that user is sent based on user terminal, presenting case editor
Interface includes for the step of user edits test cases:
When detecting the case edit instruction that user is sent based on user terminal, the corresponding survey of the edit instruction is determined
Try case;
The code of the test cases, presenting case editing interface, and the code exhibition that will be found are searched from code library
Show on the case editing interface, so that user carries out online editing to the code of the test cases.
Optionally, the task parameters include the preset quantity of execution machine, and the on-line debugging program can also be by the place
It manages device to execute, to realize following steps:
It is pending shape by the status indication of the debugging task after the debugging task is added to task queue
State;
Whenever having detected that execution machine transfers the debugging task, judge the debugging task state task whether be
Pending state;
If the task status of the debugging task is pending state, the debugging task quilt is added for the debugging task
The status information that the execution machine is transferred, and transferring the debugging task and downloading the execution machine of corresponding code from the code library
Quantity reach the preset quantity after, by the status modifier of the debugging task be execution state;
If the state task of the debugging task is execution state, the response for transferring mission failure is sent to the execution machine
Information;
When the state for detecting the debugging task is execution state, the execution machine for controlling the preset quantity executes institute
Debugging task is stated, to test system under test (SUT).
Optionally, the case debugging routine can also be executed by the processor, if to detect that the debugging task is complete
At after the step of reading the task data in the presetting database and showing, also realizing following steps:
If receive the case modification instruction triggered based on the task data, the survey is obtained from the code library
The code of case and displaying are tried, so that user modifies to the code according to the task data;
If detecting, code revision is completed, will be in the storage to the code library of modified code update.
Optionally, the case debugging routine can also be executed by the processor, to realize following steps:
When receiving the test scene modification instruction that user is sent based on user terminal, refer to from test scene modification
Scenario parameters are obtained in order, and determine that the scene modification instructs corresponding test scene;
Acquisition and the matched test code of test scene from code library, and the scenario parameters change the test generation
Code, the modified test code update is stored to the code library.
In addition, to achieve the above object, the present invention also provides a kind of on-line debugging method of test cases, this method packets
It includes:
When detecting the case edit instruction that user is sent based on user terminal, presenting case editing interface is for user
Edit test cases;
The code for the test cases that user is write based on the case editing interface is obtained, and the code was stored to generation
Code library;
When detecting the debugging instruction triggered based on the test cases, debugging task is established according to the debugging instruction
And determine the parameter of the debugging task;
The debugging task is added in task queue, by the execution for being currently at idle state in execution machine cluster
The debugging task is transferred from the task queue according to preset Task Scheduling Mechanism and executed to machine, with to system under test (SUT) into
Row test, and task data is written back in presetting database by execution machine;
If detecting, the debugging task is completed, and the task data is read from the presetting database and is shown.
Optionally, described when detecting the case edit instruction that user is sent based on user terminal, presenting case editor
Interface includes for the step of user edits test cases:
When detecting the case edit instruction that user is sent based on user terminal, the corresponding survey of the edit instruction is determined
Try case;
The code of the test cases, presenting case editing interface, and the code exhibition that will be found are searched from code library
Show on the case editing interface, so that user carries out online editing to the code of the test cases.
Optionally, the method further includes following steps:
It is pending shape by the status indication of the debugging task after the debugging task is added to task queue
State;
Whenever having detected that execution machine transfers the debugging task, judge the debugging task state task whether be
Pending state;
If the task status of the debugging task is pending state, the debugging task quilt is added for the debugging task
The status information that the execution machine is transferred, and transferring the debugging task and downloading the execution machine of corresponding code from the code library
Quantity reach the preset quantity after, by the status modifier of the debugging task be execution state;
If the state task of the debugging task is execution state, the response for transferring mission failure is sent to the execution machine
Information;
When the state for detecting the debugging task is execution state, the execution machine for controlling the preset quantity executes institute
Debugging task is stated, to test system under test (SUT).
Optionally, the method further includes following steps:
When receiving the test scene modification instruction that user is sent based on user terminal, refer to from test scene modification
Scenario parameters are obtained in order, and determine that the scene modification instructs corresponding test scene;
Acquisition and the matched test code of test scene from code library, and the scenario parameters change the test generation
Code, the modified test code update is stored to the code library.
In addition, to achieve the above object, it is described computer-readable the present invention also provides a kind of computer readable storage medium
Case debugging routine is stored on storage medium, the case debugging routine can be executed by one or more processor, with reality
Now the step of on-line debugging method of test cases as described above.
On-line debugging device, method and the computer readable storage medium of test cases proposed by the present invention, when detecting
When the case edit instruction that user is sent based on user terminal, presenting case editing interface edits test cases for user, obtains
Test cases of the family based on case editing interface editor is taken, by the code of test cases storage to code library, when detecting
Based on test cases triggering debugging instruction when, according to debugging instruction establish debugging task and determine debugging task parameter, will
Debugging task is added in task queue, by the execution machine for being currently at idle state in execution machine cluster according to preset
Debugging task is transferred from task queue and executed to business scheduling mechanism, to test system under test (SUT), that is to say, that Yong Hubian
After writing complete test cases, need not test environment locally be being built, the case can be executed by execution machine cluster with to case
Example is debugged, and can ensure that the debugging enironment of test cases is consistent with actual test environment, while task data being written back to
In presetting database, after the completion of debugging task, task data is read from presetting database and is shown, it is accurate complete to realize
Ground shows test case, so that tester understands the test case of case.
Description of the drawings
Fig. 1 is the schematic diagram of the on-line debugging device preferred embodiment of test cases of the present invention;
Fig. 2 illustrates for the program module of case debugging routine in one embodiment of on-line debugging device of test cases of the present invention
Figure;
Fig. 3 is the flow chart of the on-line debugging method first embodiment of test cases of the present invention.
The embodiments will be further described with reference to the accompanying drawings for the realization, the function and the advantages of the object of the present invention.
Specific implementation mode
It should be appreciated that the specific embodiments described herein are merely illustrative of the present invention, it is not intended to limit the present invention.
The present invention provides a kind of on-line debugging device of test cases.Shown in referring to Fig.1, exist for test cases of the present invention
The schematic diagram of line debugging apparatus preferred embodiment.
In the present embodiment, the on-line debugging device 1 of test cases can be PC (Personal Computer, personal electricity
Brain), can also be the terminal devices such as smart mobile phone, tablet computer, pocket computer.
The on-line debugging device 1 of the test cases includes at least memory 11, processor 12, communication bus 13 and net
Network interface 14.
Wherein, memory 11 include at least a type of readable storage medium storing program for executing, the readable storage medium storing program for executing include flash memory,
Hard disk, multimedia card, card-type memory (for example, SD or DX memories etc.), magnetic storage, disk, CD etc..Memory 11
Can be the internal storage unit of the on-line debugging device 1 of test cases in some embodiments, for example, the test cases
The hard disk of line debugging apparatus 1.Memory 11 can also be the outer of the on-line debugging device 1 of test cases in further embodiments
The plug-in type hard disk being equipped in portion's storage device, such as the on-line debugging device 1 of test cases, intelligent memory card
(SmartMedia Card, SMC), secure digital (Secure Digital, SD) card, flash card (Flash Card) etc..Into one
Step ground, memory 11 can also both include test cases on-line debugging device 1 internal storage unit and also including external storage
Equipment.Memory 11 can be not only used for storing the application software for the on-line debugging device 1 for being installed on test cases and all kinds of numbers
According to, for example, case debugging routine 01 code etc., can be also used for temporarily storing the data that has exported or will export.
Processor 12 can be in some embodiments a central processing unit (Central Processing Unit,
CPU), controller, microcontroller, microprocessor or other data processing chips, the program for being stored in run memory 11
Code or processing data, such as execute case debugging routine 01 etc..
Communication bus 13 is for realizing the connection communication between these components.
Network interface 14 may include optionally standard wireline interface and wireless interface (such as WI-FI interface), be commonly used in
Communication connection is established between the device 1 and other electronic equipments.
Fig. 1 illustrates only the on-line debugging device 1 of the test cases with component 11-14 and case debugging routine 01,
It should be understood that be not required for implementing all components shown, the implementation that can be substituted is more or less component.
Optionally, which can also include user interface, and user interface may include display (Display), input
Unit such as keyboard (Keyboard), optional user interface can also include standard wireline interface and wireless interface.It is optional
Ground, in some embodiments, display can be light-emitting diode display, liquid crystal display, touch-control liquid crystal display and OLED
(Organic Light-Emitting Diode, Organic Light Emitting Diode) touches device etc..Wherein, display can also be appropriate
Referred to as display screen or display unit, for being shown in the information handled in the on-line debugging device 1 of test cases and for showing
Show visual user interface.
In 1 embodiment of device shown in Fig. 1, case debugging routine 01 is stored in memory 11;Processor 12 executes
Following steps are realized when the case debugging routine 01 stored in memory 11:
When detecting the case edit instruction that user is sent based on user terminal, presenting case editing interface is for user
Edit test cases.
The code for the test cases that user is write based on the case editing interface is obtained, and the code was stored to generation
Code library.
On-line debugging device in the present embodiment establishes communication connection as server and user terminal, and provides test case
The online editing function and on-line debugging function of example.In addition, on-line debugging device is connect with machine cluster is executed, and control execution machine
Cluster executes test cases, wherein it includes more execution machines to execute in machine cluster.When user needs to write new test cases
Or when modifying to the test cases write, case edit instruction can be triggered based on the display interface of user terminal,
For on-line debugging device when receiving case edit instruction, presenting case editing interface writes test cases, user for user
After the completion of case is write, on-line debugging device obtains the code for the test cases that user is write based on case editing interface, will
The code stores after the number association of the test cases to code library.The pre-set code library is for storing tester
The code of test cases write and uploaded.
It is understood that above-mentioned case edit instruction can be newly-built case instruction, it can be case modification instruction, use
Family corresponding instruction is triggered according to the control on the display interface of user terminal.It instructs, then directly displays if it is newly-built case
Case editing interface;It is instructed if it is case modification, when detecting the case edit instruction that user is sent based on user terminal,
Determine the corresponding test cases of the edit instruction;The code of the test cases, presenting case editor are searched from code library
Interface, and the code found is illustrated on the case editing interface, for user to the code of the test cases into
Row online editing.
When detecting the debugging instruction triggered based on the test cases, debugging task is established according to the debugging instruction
And determine the parameter of the debugging task.
When on-line debugging device detects the debugging instruction that user terminal is sent, the corresponding test of the debugging instruction is determined
Case, and establish corresponding debugging task and determine the task parameters of the task.Wherein, task parameters mainly include but unlimited
In the following contents:Execute quantity, task ID, the task status etc. of the execution machine of the task.Task status is in the whole of debugging task
It include following state in a debugging cycle:Pending state executes state and executes completion status.Execution in task parameters
The quantity of machine can be arranged by tester according to the specific requirements of the test cases.
The debugging task is added in task queue, by the execution for being currently at idle state in execution machine cluster
The debugging task is transferred from the task queue according to preset Task Scheduling Mechanism and executed to machine, with to system under test (SUT) into
Row test, and task data is written back in presetting database by execution machine.
After creating debugging task, which is added in task queue.On-line debugging device can receive
Therefore, in task queue the debugging task that multiple user terminals are sent may have multiple in executing or pending tune
Trial be engaged in, and execute in machine cluster execution machine state it is also different, may have the execution machine being in idle condition, also have just
In the execution machine of processing debugging task.Therefore, after addition task, the execution by being in idle condition in execution machine cluster is needed
Machine takes task according to preset Task Scheduling Mechanism and is executed from task queue.Specifically, which may include following thin
Change step:
It is pending shape by the status indication of the debugging task after the debugging task is added to task queue
State;Whenever having detected that execution machine transfers the debugging task, judge whether the state task of the debugging task is to wait holding
Row state;If the task status of the debugging task is pending state, the debugging task quilt is added for the debugging task
The status information that the execution machine is transferred, and transferring the debugging task and downloading the execution machine of corresponding code from the code library
Quantity reach the preset quantity after, by the status modifier of the debugging task be execution state;If the debugging task
State task is execution state, then the response message for transferring mission failure is sent to the execution machine;Detecting the debugging times
When the state of business is execution state, the execution machine for controlling the preset quantity executes the debugging task, with to system under test (SUT) into
Row test.
During task scheduling, by realizing the management to executing machine scheduler task to the management of task status,
When task status is pending state, allows the execution machine being in idle condition to transfer the task and downloaded from code library and correspond to
The code of test cases then should when the quantity of the execution machine for task of having transferred has reached the preset quantity of setting
The status modifier of task is execution state, other execution machines is no longer allowed to transfer the task.Also, when the shape for detecting the task
When state is execution state, the more execution machines by having transferred the task synchronously execute the test cases, and each execution machine
The task data that test cases obtains will be executed to be written back in presetting database.Optionally, which is time series data
Library.
If detecting, the debugging task is completed, and the task data is read from the presetting database and is shown.
After the completion of debugging task executes, on-line debugging device reads the result data of task execution simultaneously from the database
Displaying, so that tester modifies to the script of test cases according to the result data of displaying, while holding according to task
Market condition generates daily record data and shows.If tester is needed by the analysis to task data, determination to test cases
It modifies, then can be based on user terminal and send case modification instruction, if on-line debugging device is received based on the task
When the case modification instruction of data-triggered, the code of the test cases and displaying are obtained from the code library, for user
It is modified to the code according to the task data;If detecting, code revision is completed, by modified code update
It stores in the code library.
Above-mentioned on-line debugging device provides the debugging enironment of a unified test cases, and tester writes completion and surveys
After trying case, it can be directly uploaded to the device, by the device store code and debugging task is established, be actual test environment
It runs the code in consistent running environment, and the operation result of code is fed back into user terminal, is i.e. tester need not be
Test environment locally is built, the trouble of test environment built not only is eliminated, improves the efficiency of test cases write, and
And it ensure that the unification of debugging enironment and actual test environment so that more accurate to the debugging result of test cases.
The on-line debugging device for the test cases that the present embodiment proposes, when the case for detecting user and being sent based on user terminal
When example edit instruction, presenting case editing interface edits test cases for user, obtains user and is compiled based on case editing interface
The code of the test cases is stored to code library, is referred to when detecting the debugging triggered based on test cases by the test cases collected
When enabling, debugging task is established according to debugging instruction and determines the parameter of debugging task, debugging task is added in task queue,
It is adjusted from task queue according to preset Task Scheduling Mechanism by the execution machine for being currently at idle state in execution machine cluster
Debugging task is taken and executes, to test system under test (SUT), that is to say, that after user writes completion test cases, be not required to
Test environment locally is being built, the case can be executed by execution machine cluster to be debugged to case, can ensure to test
The debugging enironment of case is consistent with actual test environment, while task data being written back in presetting database, works as debugging task
After the completion, task data is read from presetting database and is shown, accurately completely shows test case to realize, for surveying
Examination personnel understand the test case of case.
Further, in another embodiment, which also provides the online modification function to test scene, specifically,
Case debugging routine can also be executed by the processor, to realize following steps:It is sent based on user terminal receiving user
Test scene modification instruction when, obtain scenario parameters from test scene modification instruction, and determine the scene modification
Instruct corresponding test scene;Acquisition and the matched test code of test scene from code library, and the scenario parameters are changed
The test code stores the modified test code update to the code library.
Wherein, scenario parameters can include but is not limited to following data:Allow the quantity for opening the Virtual User tested, surveys
Try duration etc..In addition, after user setting completes test scene, show that the scene is performed according to preset visual presentation mode
When design sketch.For example, the test scene of user setting is:In preset duration T, the quantity of test assignment is progressively increased to
It is N number of, it is previously provided with the scene code suitable for the test scene of this mobilism in systems, user can set this
The value of parameter T, N in scape, system modify to corresponding value in scene code, are deposited after generating the scene code for meeting the scene
Storage.
Optionally, in other examples, case debugging routine can also be divided into one or more module, and one
A or multiple modules are stored in memory 11, and are held by one or more processors (the present embodiment is by processor 12)
For row to complete the present invention, the so-called module of the present invention is the series of computation machine program instruction section for referring to complete specific function,
For describing implementation procedure of the case debugging routine in the on-line debugging device of test cases.
Shown in Fig. 2, journey is debugged for the case in one embodiment of on-line debugging device of test cases of the present invention
The program module schematic diagram of sequence, in the embodiment, case debugging routine can be divided into showing interface module 10, Code obtaining
Module 20, task creation module 30, task scheduling modules 40 and data display module 50, illustratively:
Showing interface module 10 is used for:When detecting the case edit instruction that user is sent based on user terminal, displaying
Case editing interface edits test cases for user;
Code obtaining module 20 is used for:The code for the test cases that user is write based on the case editing interface is obtained,
And the code is stored to code library;
Task creation module 30 is used for:When detecting the debugging instruction triggered based on the test cases, according to described
Debugging instruction establishes debugging task and determines the parameter of the debugging task;
Task scheduling modules 40 are used for:The debugging task is added in task queue, by working as in execution machine cluster
Before the execution machine that is in idle condition transferred from the task queue according to preset Task Scheduling Mechanism and execute the tune
Trial is engaged in, and to test system under test (SUT), and task data is written back in presetting database by execution machine;
Data display module 50 is used for:If detecting, the debugging task is completed, and institute is read from the presetting database
It states task data and shows.
Above-mentioned showing interface module 10, Code obtaining module 20, task creation module 30, task scheduling modules 40 and data
The program modules such as display module 50 are performed realized functions or operations step and are substantially the same with above-described embodiment, herein not
It repeats again.
In addition, the present invention also provides a kind of on-line debugging methods of test cases.With reference to shown in Fig. 3, for present invention test
The flow chart of the on-line debugging method first embodiment of case.This method can be executed by a device, which can be by soft
Part and/or hardware realization.
In the present embodiment, the on-line debugging method of test cases includes:
Step S10, when detecting the case edit instruction that user is sent based on user terminal, presenting case editing interface
So that user edits test cases.
Step S20, obtains the code of test cases that user is write based on the case editing interface, and by the code
It stores to code library.
The embodiment of the method for the present invention is illustrated using on-line debugging device as executive agent in the following contents.Online
Debugging apparatus establishes communication connection as server and user terminal, and the online editing function of providing test cases is adjusted with online
Try function.In addition, on-line debugging device is connect with machine cluster is executed, and control execution machine cluster and execute test cases, wherein holds
Include more execution machines in row machine cluster.When user need to write new test cases or the test cases to having write into
When row modification, case edit instruction can be triggered based on the display interface of user terminal, on-line debugging device is receiving case
When edit instruction, presenting case editing interface writes test cases for user, and user is after the completion of case is write, on-line debugging
Device obtains the code for the test cases that user is write based on case editing interface, and the number by the code in the test cases is closed
It is stored after connection to code library.The pre-set code library is used to store generation of test cases that tester writes and uploads
Code.
It is understood that above-mentioned case edit instruction can be newly-built case instruction, it can be case modification instruction, use
Family corresponding instruction is triggered according to the control on the display interface of user terminal.It instructs, then directly displays if it is newly-built case
Case editing interface;It is instructed if it is case modification, when detecting the case edit instruction that user is sent based on user terminal,
Determine the corresponding test cases of the edit instruction;The code of the test cases, presenting case editor are searched from code library
Interface, and the code found is illustrated on the case editing interface, for user to the code of the test cases into
Row online editing.
Step S30 is established when detecting the debugging instruction triggered based on the test cases according to the debugging instruction
Debugging task and the parameter for determining the debugging task.
When on-line debugging device detects the debugging instruction that user terminal is sent, the corresponding test of the debugging instruction is determined
Case, and establish corresponding debugging task and determine the task parameters of the task.Wherein, task parameters mainly include but unlimited
In the following contents:Execute quantity, task ID, the task status etc. of the execution machine of the task.Task status is in the whole of debugging task
It include following state in a debugging cycle:Pending state executes state and executes completion status.Execution in task parameters
The quantity of machine can be arranged by tester according to the specific requirements of the test cases.
The debugging task is added in task queue by step S40, by being currently at idle shape in execution machine cluster
The execution machine of state is transferred from the task queue according to preset Task Scheduling Mechanism and executes the debugging task, with to quilt
Examining system is tested, and task data is written back in presetting database by execution machine.
After creating debugging task, which is added in task queue.On-line debugging device can receive
Therefore, in task queue the debugging task that multiple user terminals are sent may have multiple in executing or pending tune
Trial be engaged in, and execute in machine cluster execution machine state it is also different, may have the execution machine being in idle condition, also have just
In the execution machine of processing debugging task.Therefore, after addition task, the execution by being in idle condition in execution machine cluster is needed
Machine takes task according to preset Task Scheduling Mechanism and is executed from task queue.Specifically, step S40 may include following thin
Change step:
It is pending shape by the status indication of the debugging task after the debugging task is added to task queue
State;Whenever having detected that execution machine transfers the debugging task, judge whether the state task of the debugging task is to wait holding
Row state;If the task status of the debugging task is pending state, the debugging task quilt is added for the debugging task
The status information that the execution machine is transferred, and transferring the debugging task and downloading the execution machine of corresponding code from the code library
Quantity reach the preset quantity after, by the status modifier of the debugging task be execution state;If the debugging task
State task is execution state, then the response message for transferring mission failure is sent to the execution machine;Detecting the debugging times
When the state of business is execution state, the execution machine for controlling the preset quantity executes the debugging task, with to system under test (SUT) into
Row test.
During task scheduling, by realizing the management to executing machine scheduler task to the management of task status,
When task status is pending state, allows the execution machine being in idle condition to transfer the task and downloaded from code library and correspond to
The code of test cases then should when the quantity of the execution machine for task of having transferred has reached the preset quantity of setting
The status modifier of task is execution state, other execution machines is no longer allowed to transfer the task.Also, when the shape for detecting the task
When state is execution state, the more execution machines by having transferred the task synchronously execute the test cases, and each execution machine
The task data that test cases obtains will be executed to be written back in presetting database.Optionally, which is time series data
Library.
Step S50, if detecting, the debugging task is completed, and the task data is read from the presetting database simultaneously
Displaying.
After the completion of debugging task executes, on-line debugging device reads the result data of task execution simultaneously from the database
Displaying, so that tester modifies to the script of test cases according to the result data of displaying, while holding according to task
Market condition generates daily record data and shows.If tester is needed by the analysis to task data, determination to test cases
It modifies, then can be based on user terminal and send case modification instruction, if on-line debugging device is received based on the task
When the case modification instruction of data-triggered, the code of the test cases and displaying are obtained from the code library, for user
It is modified to the code according to the task data;If detecting, code revision is completed, by modified code update
It stores in the code library.
This method provides the debugging enironment of a unified test cases, after tester writes completion test cases,
It can be directly uploaded to the device, by the device store code and establish debugging task, be that actual test environment is unanimously run
The code is run in environment, and the operation result of code is fed back into user terminal, i.e. tester need not build locally
Test environment not only eliminates the trouble of test environment built, and improves the efficiency of test cases write, and ensure that
The unification of debugging enironment and actual test environment so that more accurate to the debugging result of test cases.
The on-line debugging method for the test cases that the present embodiment proposes, when the case for detecting user and being sent based on user terminal
When example edit instruction, presenting case editing interface edits test cases for user, obtains user and is compiled based on case editing interface
The code of the test cases is stored to code library, is referred to when detecting the debugging triggered based on test cases by the test cases collected
When enabling, debugging task is established according to debugging instruction and determines the parameter of debugging task, debugging task is added in task queue,
It is adjusted from task queue according to preset Task Scheduling Mechanism by the execution machine for being currently at idle state in execution machine cluster
Debugging task is taken and executes, to test system under test (SUT), that is to say, that after user writes completion test cases, be not required to
Test environment locally is being built, the case can be executed by execution machine cluster to be debugged to case, can ensure to test
The debugging enironment of case is consistent with actual test environment, while task data being written back in presetting database, works as debugging task
After the completion, task data is read from presetting database and is shown, accurately completely shows test case to realize, for surveying
Examination personnel understand the test case of case.
Further, in another embodiment, which also provides the online modification function to test scene, specifically,
This method further includes following steps:When the test scene for receiving user and being sent based on user terminal changes instruction, from described
Scenario parameters are obtained in test scene modification instruction, and determine that the scene modification instructs corresponding test scene;From code library
Middle acquisition and the matched test code of test scene, and the scenario parameters change the test code, it will be modified described
Test code update is stored to the code library.
Wherein, scenario parameters can include but is not limited to following data:Allow the quantity for opening the Virtual User tested, surveys
Try duration etc..In addition, after user setting completes test scene, show that the scene is performed according to preset visual presentation mode
When design sketch.For example, the test scene of user setting is:In preset duration T, the quantity of test assignment is progressively increased to
It is N number of, it is previously provided with the scene code suitable for the test scene of this mobilism in systems, user can set this
The value of parameter T, N in scape, system modify to corresponding value in scene code, are deposited after generating the scene code for meeting the scene
Storage.
In addition, the embodiment of the present invention also proposes a kind of computer readable storage medium, the computer readable storage medium
On be stored with case debugging routine, the case debugging routine can be executed by one or more processors, to realize following operation:
When detecting the case edit instruction that user is sent based on user terminal, presenting case editing interface is for user
Edit test cases;
The code for the test cases that user is write based on the case editing interface is obtained, and the code was stored to generation
Code library;
When detecting the debugging instruction triggered based on the test cases, debugging task is established according to the debugging instruction
And determine the parameter of the debugging task;
The debugging task is added in task queue, by the execution for being currently at idle state in execution machine cluster
The debugging task is transferred from the task queue according to preset Task Scheduling Mechanism and executed to machine, with to system under test (SUT) into
Row test, and task data is written back in presetting database by execution machine;
If detecting, the debugging task is completed, and the task data is read from the presetting database and is shown.
On-line debugging device and side of the computer readable storage medium specific implementation mode of the present invention with above-mentioned test cases
Each embodiment of method is essentially identical, does not make tired state herein.
It should be noted that the embodiments of the present invention are for illustration only, can not represent the quality of embodiment.And
The terms "include", "comprise" herein or any other variant thereof is intended to cover non-exclusive inclusion, so that packet
Process, device, article or the method for including a series of elements include not only those elements, but also include being not explicitly listed
Other element, or further include for this process, device, article or the intrinsic element of method.Do not limiting more
In the case of, the element that is limited by sentence "including a ...", it is not excluded that in the process including the element, device, article
Or there is also other identical elements in method.
Through the above description of the embodiments, those skilled in the art can be understood that above-described embodiment side
Method can add the mode of required general hardware platform to realize by software, naturally it is also possible to by hardware, but in many cases
The former is more preferably embodiment.Based on this understanding, technical scheme of the present invention substantially in other words does the prior art
Going out the part of contribution can be expressed in the form of software products, which is stored in one as described above
In storage medium (such as ROM/RAM, magnetic disc, CD), including some instructions use so that a station terminal equipment (can be mobile phone,
Computer, server or network equipment etc.) execute method described in each embodiment of the present invention.
It these are only the preferred embodiment of the present invention, be not intended to limit the scope of the invention, it is every to utilize this hair
Equivalent structure or equivalent flow shift made by bright specification and accompanying drawing content is applied directly or indirectly in other relevant skills
Art field, is included within the scope of the present invention.
Claims (10)
1. a kind of on-line debugging device of test cases, which is characterized in that described device includes memory and processor, described to deposit
The case debugging routine that can be run on the processor is stored on reservoir, the case debugging routine is held by the processor
Following steps are realized when row:
When detecting the case edit instruction that user is sent based on user terminal, presenting case editing interface is edited for user
Test cases;
The code for the test cases that user is write based on the case editing interface is obtained, and the code is stored to code
Library;
When detecting the debugging instruction triggered based on the test cases, debugging task and true is established according to the debugging instruction
The parameter of the fixed debugging task;
The debugging task is added in task queue, by the execution machine for being currently at idle state in execution machine cluster by
The debugging task is transferred and executed from the task queue according to preset Task Scheduling Mechanism, to be surveyed to system under test (SUT)
Examination, and task data is written back in presetting database by execution machine;
If detecting, the debugging task is completed, and the task data is read from the presetting database and is shown.
2. the on-line debugging device of test cases as described in claim 1, which is characterized in that described to be based on when detecting user
When the case edit instruction that user terminal is sent, presenting case editing interface includes for the step of user edits test cases:
When detecting the case edit instruction that user is sent based on user terminal, the corresponding test case of the edit instruction is determined
Example;
The code of the test cases, presenting case editing interface are searched from code library, and the code found is illustrated in
On the case editing interface, so that user carries out online editing to the code of the test cases.
3. the on-line debugging device of test cases as described in claim 1, which is characterized in that the task parameters include executing
The preset quantity of machine, the on-line debugging program can also be executed by the processor, to realize following steps:
It is pending state by the status indication of the debugging task after the debugging task is added to task queue;
Whenever having detected that execution machine transfers the debugging task, judge whether the state task of the debugging task is to wait holding
Row state;
If the task status of the debugging task is pending state, adds the debugging task for the debugging task and held by this
The status information that row machine is transferred, and the number of the execution machine transferring the debugging task and from the corresponding code of code library download
It is execution state by the status modifier of the debugging task after amount reaches the preset quantity;
If the state task of the debugging task is execution state, the response letter for transferring mission failure is sent to the execution machine
Breath;
When the state for detecting the debugging task is execution state, the execution machine for controlling the preset quantity executes the tune
Trial is engaged in, to test system under test (SUT).
4. the on-line debugging device of the test cases as described in any one of claims 1 to 3, which is characterized in that the case
Example debugging routine can also be executed by the processor, if to detect that the debugging task is completed, from the presetting database
After the step of reading the task data and showing, following steps are also realized:
If receive the case modification instruction triggered based on the task data, the test case is obtained from the code library
Example code and displaying, so that user modifies to the code according to the task data;
If detecting, code revision is completed, will be in the storage to the code library of modified code update.
5. the on-line debugging device of the test cases as described in any one of claims 1 to 3, which is characterized in that the case
Example debugging routine can also be executed by the processor, to realize following steps:
When receiving the test scene modification instruction that user is sent based on user terminal, from test scene modification instruction
Scenario parameters are obtained, and determine that the scene modification instructs corresponding test scene;
Acquisition and the matched test code of test scene from code library, and the scenario parameters change the test code, it will
The modified test code update is stored to the code library.
6. a kind of on-line debugging method of test cases, which is characterized in that the method includes:
When detecting the case edit instruction that user is sent based on user terminal, presenting case editing interface is edited for user
Test cases;
The code for the test cases that user is write based on the case editing interface is obtained, and the code is stored to code
Library;
When detecting the debugging instruction triggered based on the test cases, debugging task and true is established according to the debugging instruction
The parameter of the fixed debugging task;
The debugging task is added in task queue, by the execution machine for being currently at idle state in execution machine cluster by
The debugging task is transferred and executed from the task queue according to preset Task Scheduling Mechanism, to be surveyed to system under test (SUT)
Examination, and task data is written back in presetting database by execution machine;
If detecting, the debugging task is completed, and the task data is read from the presetting database and is shown.
7. the on-line debugging method of test cases as claimed in claim 6, which is characterized in that described to be based on when detecting user
When the case edit instruction that user terminal is sent, presenting case editing interface includes for the step of user edits test cases:
When detecting the case edit instruction that user is sent based on user terminal, the corresponding test case of the edit instruction is determined
Example;
The code of the test cases, presenting case editing interface are searched from code library, and the code found is illustrated in
On the case editing interface, so that user carries out online editing to the code of the test cases.
8. the on-line debugging method of test cases as claimed in claim 6, which is characterized in that the method further includes walking as follows
Suddenly:
It is pending state by the status indication of the debugging task after the debugging task is added to task queue;
Whenever having detected that execution machine transfers the debugging task, judge whether the state task of the debugging task is to wait holding
Row state;
If the task status of the debugging task is pending state, adds the debugging task for the debugging task and held by this
The status information that row machine is transferred, and the number of the execution machine transferring the debugging task and from the corresponding code of code library download
It is execution state by the status modifier of the debugging task after amount reaches the preset quantity;
If the state task of the debugging task is execution state, the response letter for transferring mission failure is sent to the execution machine
Breath;
When the state for detecting the debugging task is execution state, the execution machine for controlling the preset quantity executes the tune
Trial is engaged in, to test system under test (SUT).
9. the on-line debugging method of the test cases as described in any one of claim 6 to 8, which is characterized in that the method
Further include following steps:
When receiving the test scene modification instruction that user is sent based on user terminal, from test scene modification instruction
Scenario parameters are obtained, and determine that the scene modification instructs corresponding test scene;
Acquisition and the matched test code of test scene from code library, and the scenario parameters change the test code, it will
The modified test code update is stored to the code library.
10. a kind of computer readable storage medium, which is characterized in that be stored with case tune on the computer readable storage medium
Program is tried, the case debugging routine can be executed by one or more processor, to realize as any in claim 6 to 9
The step of on-line debugging method of test cases described in.
Priority Applications (2)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201810544750.3A CN108763085A (en) | 2018-05-31 | 2018-05-31 | On-line debugging device, method and the computer readable storage medium of test cases |
PCT/CN2018/102104 WO2019227708A1 (en) | 2018-05-31 | 2018-08-24 | Online debugging apparatus and method for test case, and computer-readable storage medium |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201810544750.3A CN108763085A (en) | 2018-05-31 | 2018-05-31 | On-line debugging device, method and the computer readable storage medium of test cases |
Publications (1)
Publication Number | Publication Date |
---|---|
CN108763085A true CN108763085A (en) | 2018-11-06 |
Family
ID=64000931
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201810544750.3A Pending CN108763085A (en) | 2018-05-31 | 2018-05-31 | On-line debugging device, method and the computer readable storage medium of test cases |
Country Status (2)
Country | Link |
---|---|
CN (1) | CN108763085A (en) |
WO (1) | WO2019227708A1 (en) |
Cited By (9)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN110543429A (en) * | 2019-09-10 | 2019-12-06 | 深圳前海微众银行股份有限公司 | Test case debugging method and device and storage medium |
CN110781074A (en) * | 2019-09-18 | 2020-02-11 | 平安银行股份有限公司 | Automatic testing method and device and storage medium |
CN110908899A (en) * | 2019-11-08 | 2020-03-24 | 北京奇艺世纪科技有限公司 | Application program debugging method, mobile terminal and computer readable storage medium |
CN111061630A (en) * | 2019-11-26 | 2020-04-24 | 歌尔股份有限公司 | Product debugging method, debugging device and readable storage medium |
CN111078525A (en) * | 2019-10-11 | 2020-04-28 | 中国平安财产保险股份有限公司 | Method and device for adjusting system running time, computer equipment and storage medium |
CN111427790A (en) * | 2020-03-26 | 2020-07-17 | 中国建设银行股份有限公司 | Test method, test device, terminal equipment and storage medium |
CN112597030A (en) * | 2020-12-26 | 2021-04-02 | 中国农业银行股份有限公司 | Task issuing method and device, and task executing method, device and system |
CN113626309A (en) * | 2021-07-06 | 2021-11-09 | 深圳点猫科技有限公司 | Method and device for simulating operation of mobile terminal, electronic equipment and storage medium |
CN114996166A (en) * | 2022-08-02 | 2022-09-02 | 杭州高达软件***股份有限公司 | Code online debugging method, system and storage medium |
Citations (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN1601483A (en) * | 2004-10-22 | 2005-03-30 | 中国工商银行 | Automation software testing system based on script explanatory tool |
CN101719097A (en) * | 2009-12-24 | 2010-06-02 | 深圳市金蝶移动互联技术有限公司 | Debug method and system of automation test script and automation application server |
CN103984624A (en) * | 2014-04-29 | 2014-08-13 | 北京京东尚科信息技术有限公司 | Automatic testing method and system for webpage |
CN106452830A (en) * | 2016-08-22 | 2017-02-22 | 平安科技(深圳)有限公司 | Test task execution machine distribution method and device |
US20180121318A1 (en) * | 2016-10-28 | 2018-05-03 | International Business Machines Corporation | Code component debugging in an application program |
Family Cites Families (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN102722440B (en) * | 2012-06-07 | 2017-03-15 | 中兴通讯股份有限公司 | A kind of debugging apparatus of embedded system executable code, adjustment method and embedded system |
CN106021257B (en) * | 2015-12-31 | 2019-10-18 | 广州华多网络科技有限公司 | A kind of crawler capturing data method, apparatus and system for supporting online programming |
CN107315678A (en) * | 2016-04-27 | 2017-11-03 | 龙芯中科技术有限公司 | The call method and device of debugging acid |
-
2018
- 2018-05-31 CN CN201810544750.3A patent/CN108763085A/en active Pending
- 2018-08-24 WO PCT/CN2018/102104 patent/WO2019227708A1/en active Application Filing
Patent Citations (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN1601483A (en) * | 2004-10-22 | 2005-03-30 | 中国工商银行 | Automation software testing system based on script explanatory tool |
CN101719097A (en) * | 2009-12-24 | 2010-06-02 | 深圳市金蝶移动互联技术有限公司 | Debug method and system of automation test script and automation application server |
CN103984624A (en) * | 2014-04-29 | 2014-08-13 | 北京京东尚科信息技术有限公司 | Automatic testing method and system for webpage |
CN106452830A (en) * | 2016-08-22 | 2017-02-22 | 平安科技(深圳)有限公司 | Test task execution machine distribution method and device |
US20180121318A1 (en) * | 2016-10-28 | 2018-05-03 | International Business Machines Corporation | Code component debugging in an application program |
Cited By (11)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN110543429A (en) * | 2019-09-10 | 2019-12-06 | 深圳前海微众银行股份有限公司 | Test case debugging method and device and storage medium |
CN110543429B (en) * | 2019-09-10 | 2023-05-16 | 深圳前海微众银行股份有限公司 | Test case debugging method, device and storage medium |
CN110781074A (en) * | 2019-09-18 | 2020-02-11 | 平安银行股份有限公司 | Automatic testing method and device and storage medium |
CN111078525A (en) * | 2019-10-11 | 2020-04-28 | 中国平安财产保险股份有限公司 | Method and device for adjusting system running time, computer equipment and storage medium |
CN110908899A (en) * | 2019-11-08 | 2020-03-24 | 北京奇艺世纪科技有限公司 | Application program debugging method, mobile terminal and computer readable storage medium |
CN111061630A (en) * | 2019-11-26 | 2020-04-24 | 歌尔股份有限公司 | Product debugging method, debugging device and readable storage medium |
CN111427790A (en) * | 2020-03-26 | 2020-07-17 | 中国建设银行股份有限公司 | Test method, test device, terminal equipment and storage medium |
CN112597030A (en) * | 2020-12-26 | 2021-04-02 | 中国农业银行股份有限公司 | Task issuing method and device, and task executing method, device and system |
CN113626309A (en) * | 2021-07-06 | 2021-11-09 | 深圳点猫科技有限公司 | Method and device for simulating operation of mobile terminal, electronic equipment and storage medium |
CN114996166A (en) * | 2022-08-02 | 2022-09-02 | 杭州高达软件***股份有限公司 | Code online debugging method, system and storage medium |
CN114996166B (en) * | 2022-08-02 | 2022-10-21 | 杭州高达软件***股份有限公司 | Code online debugging method, system and storage medium |
Also Published As
Publication number | Publication date |
---|---|
WO2019227708A1 (en) | 2019-12-05 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN108763085A (en) | On-line debugging device, method and the computer readable storage medium of test cases | |
CN109302522B (en) | Test method, test device, computer system, and computer medium | |
WO2020155777A1 (en) | Ui automated function testing method, testing device, testing apparatus, and storage medium | |
CN112270149B (en) | Verification platform automatic integration method and system, electronic equipment and storage medium | |
CN106302008A (en) | Data-updating method and device | |
US20130263090A1 (en) | System and method for automated testing | |
CN108519943A (en) | Testing and control and test execution device, method and computer storage media | |
CN106933729A (en) | A kind of method of testing and system based on cloud platform | |
CN111858371A (en) | Software testing method, system, storage medium and computer equipment | |
US20150248343A1 (en) | Method and apparatus for implementing instrumentation code | |
CN110377520A (en) | The test method and device, electronic equipment and readable storage medium storing program for executing for scene of trading | |
CN104123187B (en) | Create the method and hardware component of the software of hardware component | |
CN109783351A (en) | Interface detection method, apparatus and computer readable storage medium | |
CN108717391A (en) | Monitoring device, method and the computer readable storage medium of test process | |
CN108664372A (en) | Monitoring device, method and the computer readable storage medium of test process | |
CN109902005A (en) | A kind of method and system of automatic test | |
CN108563579A (en) | White-box testing method, apparatus, system and storage medium | |
CN113778898A (en) | User interface automatic testing method and device, electronic equipment and storage medium | |
CN110471853A (en) | APP test method, device, computer equipment and storage medium | |
CN112463588A (en) | Automatic test system and method, storage medium and computing equipment | |
CN109558318A (en) | A kind of code administration method and code storage distributed system | |
CN109739704A (en) | A kind of interface test method, server-side and computer readable storage medium | |
CN108021503A (en) | The method, apparatus and computer-readable storage medium of automated function test | |
CN113535567B (en) | Software testing method, device, equipment and medium | |
CN112241373A (en) | Automatic test method, test device, processor and test system |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
PB01 | Publication | ||
PB01 | Publication | ||
SE01 | Entry into force of request for substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
RJ01 | Rejection of invention patent application after publication | ||
RJ01 | Rejection of invention patent application after publication |
Application publication date: 20181106 |