CN110287121A - A kind of test method and device automating use-case - Google Patents
A kind of test method and device automating use-case Download PDFInfo
- Publication number
- CN110287121A CN110287121A CN201910580562.0A CN201910580562A CN110287121A CN 110287121 A CN110287121 A CN 110287121A CN 201910580562 A CN201910580562 A CN 201910580562A CN 110287121 A CN110287121 A CN 110287121A
- Authority
- CN
- China
- Prior art keywords
- testing procedure
- test result
- test
- trigger condition
- 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/3688—Test management for test execution, e.g. scheduling of test suites
Abstract
The present invention is suitable for financial technology field, and disclose a kind of test method and device for automating use-case, wherein, method includes: to obtain operation use-case, according to operation use-case, the logical relation of the corresponding test case of operation use-case is obtained, since logical relation preset initial testing step, it repeats preset selection and executes step, until completing to execute the preset termination step in logical relation;It includes: the test result by currently running first testing procedure as parametric variable that selection, which executes step, and based on the trigger condition in the first logical construction corresponding to parametric variable and the first testing procedure, determines and execute the next testing procedure that need to be run;Export implementing result of the preset test result for terminating step as operation use-case.The technical solution is tested to be suitable for the use-case with more test results, improves the flexibility of automatic test.
Description
Technical field
The present embodiments relate to the financial technology field (Fintech) more particularly to a kind of test sides for automating use-case
Method and device.
Background technique
With the development of computer technology, more and more technical applications are in financial field, and traditional financial industry is gradually
Change to financial technology, automation use-case measuring technology is no exception, but due to finance, the safety of payment industry, real-time
It is required that the higher requirement also proposed to technology.
In the test of existing automation use-case, the main process executed using sequence, i.e., for an automation use-case, according to
It is secondary execute the automation use-case testing procedure, such as successively execute testing procedure 1, testing procedure 2 ... testing procedure N, but should
In kind mode, the testing procedure process CIMS for automating use-case is single, and is not suitable for having the use-case of more test results to test.
Summary of the invention
The embodiment of the present invention provides a kind of test method and device for automating use-case, to be suitable for having more test knots
The use-case of fruit is tested, and the flexibility of automatic test is improved.
A kind of test method automating use-case provided in an embodiment of the present invention, comprising:
Obtain operation use-case;
According to the operation use-case, the logical relation of the corresponding test case of the operation use-case is obtained;The logic is closed
Record has the logical construction and testing procedure of the test case in system;Trigger condition is configured in the logical construction;
Since the logical relation preset initial testing step, repeats preset selection and execute step, directly
To the preset termination step completed in the execution logical relation;It includes: by currently running that the selection, which executes step,
The test result of one testing procedure is as parametric variable, and based on the parameter corresponding to variable and first testing procedure
The first logical construction in trigger condition, determine simultaneously execute the next testing procedure that need to be run;
Export implementing result of the preset test result for terminating step as the operation use-case.
In above-mentioned technical proposal, running in the logical relation of use-case includes logical construction and testing procedure, passes through logic knot
Trigger condition in structure is directed toward different testing procedures, to realize in the test of automation use-case, by a upper test step
Multiple test results in rapid are respectively directed to next testing procedure corresponding with each test result, so that the survey of test case
It is controllable to try steps flow chart, improves the flexibility of automatic test;Further, tester is avoided in order to test different tests
Step as a result, write the test case step of redundancy, efficiency is write in raising.
Optionally, first logical construction is loop structure, in the loop structure configured with the first trigger condition and
Second trigger condition;First trigger condition indicates the first testing procedure;Second trigger condition indicates the second test step
Suddenly;
The test result by currently running first testing procedure is as parametric variable, and variable based on the parameter
And trigger condition in the first logical construction corresponding to first testing procedure, determining and executing next need to run
Testing procedure, comprising:
If the test result of first testing procedure meets first trigger condition, by first testing procedure
Test result continue to input first testing procedure, until the test result of first testing procedure meets described second
Trigger condition;
The test result of each first testing procedure is recorded;
The test result of each first testing procedure is input in second testing procedure, described second is generated and surveys
The rapid output result of try.
In above-mentioned technical proposal, the first logical construction is loop structure, in loop structure configured with the first trigger condition and
Second trigger condition, the first trigger condition still point to the first testing procedure, i.e., when the test result of the first testing procedure is to meet
When the first trigger condition, then the first testing procedure is repeated, until the test result of the first testing procedure meets the second triggering
Condition can realize batch operation in implementation of test cases, an input parameter is such as input to first by loop structure
Testing procedure, and pass through loop structure, the test result of multiple first testing procedures can be generated, and then can be by multiple first
The test result of testing procedure is input to the second testing procedure.
Optionally, first logical construction is exception handling structure, is touched in the exception handling structure configured with third
Clockwork spring part and the 4th trigger condition;The third trigger condition indicates third testing procedure, and the third testing procedure is used for will
The test result of first testing procedure marks abnormality code;4th trigger condition indicates the 4th testing procedure;
The test result by currently running first testing procedure is as parametric variable, and variable based on the parameter
And trigger condition in the first logical construction corresponding to first testing procedure, determining and executing next need to run
Testing procedure, comprising:
If the test result of first testing procedure is abnormality, by the test result of first testing procedure
It is input to the third testing procedure, executes the third testing procedure, described the of the abnormality code will be marked with
The test result of one testing procedure is input to the 4th testing procedure;
If the test result of first testing procedure is normal condition, by the test result of first testing procedure
It is input to the 4th testing procedure.
In above-mentioned technical proposal, the first logical construction is exception handling structure, when the test result of the first testing procedure goes out
When now abnormal, not will lead to operation use-case terminates, but can be input to third testing procedure, executes third testing procedure, mark
Remember abnormality code, and continue to be input to the 4th testing procedure, to will not terminate to test and specific exception can be marked
Problem.
Optionally, first logical construction is condition selection structure, at least configured with the in condition selection structure
Five trigger conditions and the 6th trigger condition;5th trigger condition indicates the 5th testing procedure;6th trigger condition refers to
Show the 6th testing procedure;
The test result by currently running first testing procedure is as parametric variable, and variable based on the parameter
And trigger condition in the first logical construction corresponding to first testing procedure, determining and executing next need to run
Testing procedure, comprising:
If the test result of first testing procedure meets the 5th trigger condition, by first testing procedure
Test result input the 5th testing procedure;If the test result of first testing procedure meets the 6th triggering article
The test result of first testing procedure is then inputted the 6th testing procedure by part.
In above-mentioned technical proposal, the first logical construction is condition selection structure, and condition selects in structure to may include multiple
The test result that trigger condition, i.e. the first testing procedure generate can be to be a variety of, and condition selects structure can be according to a variety of tests
As a result multiple testing procedures are directed toward, increase the diversity of test result, and improve the flexibility of automatic test.
Optionally, after the preset termination step completed in the execution logical relation, further includes: execute clear
Logical construction is managed, the cleaning logical construction is used to discharge the occupied resource in the operation use-case.
In above-mentioned technical proposal, after having executed operation use-case, cleaning logical construction can also be performed, for use will to be run
Occupied resource release in example, to avoid in next operation use-case, resource, which does not discharge, leads to exception.
Optionally, the execution knot in the output preset test result for terminating step as the operation use-case
After fruit, further includes:
Each testing procedure executed in test process is formed into execution route and is exported.
In above-mentioned technical proposal, by multiple logical constructions, all execution steps are determined, and can be generated and execute road
Diameter so that the test path of current operation use-case is understood more intuitively in tester, and is improved for showing tester
User experience of the tester in automatic test.
Correspondingly, the embodiment of the invention also provides a kind of test devices for automating use-case, comprising:
Acquiring unit, for obtaining operation use-case;According to the operation use-case, the corresponding test of the operation use-case is obtained
The logical relation of use-case;Record has the logical construction and testing procedure of the test case in the logical relation;The logic
Trigger condition is configured in structure;
Processing unit, for initial testing step preset since the logical relation, repeat preset choosing
Execution step is selected, until completing to execute the preset termination step in the logical relation;The selection execute step include: by
The test result of currently running first testing procedure is as parametric variable, and variable and first survey based on the parameter
Trigger condition in rapid the first corresponding logical construction of try, determines and executes the next testing procedure that need to be run;Output
Implementing result of the preset test result for terminating step as the operation use-case.
The processing unit, is specifically used for:
If the test result of first testing procedure meets first trigger condition, by first testing procedure
Test result continue to input first testing procedure, until the test result of first testing procedure meets described second
Trigger condition;
The test result of each first testing procedure is recorded;
The test result of each first testing procedure is input in second testing procedure, described second is generated and surveys
The rapid output result of try.
Optionally, first logical construction is exception handling structure, is touched in the exception handling structure configured with third
Clockwork spring part and the 4th trigger condition;The third trigger condition indicates third testing procedure, and the third testing procedure is used for will
The test result of first testing procedure marks abnormality code;4th trigger condition indicates the 4th testing procedure;
The processing unit, is specifically used for:
If the test result of first testing procedure is abnormality, by the test result of first testing procedure
It is input to the third testing procedure, executes the third testing procedure, described the of the abnormality code will be marked with
The test result of one testing procedure is input to the 4th testing procedure;
If the test result of first testing procedure is normal condition, by the test result of first testing procedure
It is input to the 4th testing procedure.
Optionally, first logical construction is condition selection structure, at least configured with the in condition selection structure
Five trigger conditions and the 6th trigger condition;5th trigger condition indicates the 5th testing procedure;6th trigger condition refers to
Show the 6th testing procedure;
The processing unit, is specifically used for:
If the test result of first testing procedure meets the 5th trigger condition, by first testing procedure
Test result input the 5th testing procedure;If the test result of first testing procedure meets the 6th triggering article
The test result of first testing procedure is then inputted the 6th testing procedure by part.
Optionally, the processing unit, is also used to:
After the preset termination step completed in the execution logical relation, cleaning logical construction, institute are executed
Cleaning logical construction is stated to be used to discharge the occupied resource in the operation use-case.
Optionally, the processing unit, is also used to:
After implementing result of the output preset test result for terminating step as the operation use-case,
Each testing procedure executed in test process is formed into execution route and is exported.
Correspondingly, the embodiment of the invention also provides a kind of calculating equipment, comprising:
Memory, for storing program instruction;
Processor executes above-mentioned automatic for calling the program instruction stored in the memory according to the program of acquisition
Change the test method of use-case.
Correspondingly, the embodiment of the invention also provides a kind of computer-readable non-volatile memory medium, including computer
Readable instruction, when computer is read and executes the computer-readable instruction, so that computer executes above-mentioned automation use-case
Test method.
Detailed description of the invention
To describe the technical solutions in the embodiments of the present invention more clearly, make required in being described below to embodiment
Attached drawing is briefly introduced, it should be apparent that, drawings in the following description are only some embodiments of the invention, for this
For the those of ordinary skill in field, without creative efforts, it can also be obtained according to these attached drawings other
Attached drawing.
Fig. 1 is the flow diagram of the test method of the first automation use-case provided in an embodiment of the present invention;
Fig. 2 is the flow diagram of the test method of second provided in an embodiment of the present invention automation use-case;
Fig. 3 is a kind of logical construction and testing procedure of self-defined combination provided in an embodiment of the present invention;
Fig. 4 is a kind of logical relation tree provided in an embodiment of the present invention;
Fig. 5 is the flow diagram of the test method of the third automation use-case provided in an embodiment of the present invention;
Fig. 6 is the flow diagram of the test method of 4th kind provided in an embodiment of the present invention automation use-case;
Fig. 7 is a kind of structural schematic diagram of test device for automating use-case provided in an embodiment of the present invention.
Specific embodiment
To make the objectives, technical solutions, and advantages of the present invention clearer, below in conjunction with attached drawing to the present invention make into
It is described in detail to one step, it is clear that described embodiments are only a part of the embodiments of the present invention, rather than whole implementation
Example.Based on the embodiments of the present invention, obtained by those of ordinary skill in the art without making creative efforts
All other embodiment, shall fall within the protection scope of the present invention.
If Fig. 1 is the process that the first automation use-case provided in an embodiment of the present invention is tested.Wherein, use-case A is automated
Testing procedure be successively a, b, c, d, the test path of automation use-case A is a → b → c → d.Specifically, first to data into
Row prediction processing, i.e., execute initialization procedure, such as some parameter initializations, assignment etc., financial section to use-case data to be tested
In skill field, such as information initializings such as account holder's name, identification card numbers during opening an account;Then test is successively executed
Step, testing procedure may be that interface resource, script resource and some scenes customize resource etc., pass through parametrization configuration money
Source, and then test resource is called to be tested;For each testing procedure execute checkpoint verification, judge testing procedure the result is that
The no test scene that meets is expected, and next step is executed if meeting, and otherwise terminates use-case operation.
But in above-mentioned technical proposal, testing procedure process CIMS is single, inflexible, for example, the test of automation use-case A
There are three types of test results by step c, then above-mentioned automatic test scheme can not only judge whether to verify by checkpoint and execute
Testing procedure d after testing procedure c is not suitable for having the use-case of more test results to test.
In order to overcome the above problem, Fig. 2 illustratively shows second of automation use-case provided in an embodiment of the present invention
Test method process, which can be executed by the test device of automation use-case.
As shown in Fig. 2, the process specifically includes:
Step 201, operation use-case is obtained.
Use-case is run i.e. to the use-case after test case assignment, is equivalent to and initialization is executed to use-case data to be tested, such as
Parameter initialization, assignment etc..Running includes mark, the parametric variable etc. for corresponding to test case in use-case.
Step 202, according to the operation use-case, the logical relation of the corresponding test case of the operation use-case is obtained.
The logical relation is pre-generated and stores into database that the logical relation can be corresponding according to operation use-case
Test case be determined, and record the logical construction and testing procedure for having test case.Configured with touching in logical construction
Clockwork spring part, for determining the corresponding testing procedure of trigger condition according to the parameter being input in logical construction.
In a kind of feasible implementation, it can be tester and create automation use-case, is i.e. configuration is completed automation and used
After the information such as example title, test scene, running environment, parametric variable, logical construction and testing procedure (interface resource) are created,
Specifically, tester is according to automation use-case test scene self-defined combination logical construction, and under logical construction, addition is surveyed
Try is rapid, is equivalent to, and configures the trigger condition of testing procedure indicated by logical construction and each testing procedure, can be such as Fig. 3
It is shown, it is logical construction and testing procedure of the tester according to automation use-case test scene self-defined combination.Tester
The logical construction and testing procedure of configuration respectively correspond the first character string, i.e., the type of the first character string can for logical construction or
Testing procedure.
Correspondingly, after receiving each first character string that tester issues test character string can be formed, the test
Character string is that the test case of corresponding tester's creation obtains each according to the type of each first character string in test character string
The parameter of first character string, and in binding test character string each first character string sequence, generate logical relation.First character string
It can be xml structure character string.
Herein, when the type of the first character string is logical construction, the parameter of the first character string is the structure of logical construction
Type and the corresponding trigger condition of structure type, i.e. logical construction are used to determine triggering according to the parameter being input in logical construction
The corresponding testing procedure of condition, different structure types correspond to different trigger conditions.
The structure type of logical construction can be included at least with Types Below: loop structure, exception handling structure, condition selection
Structure, cleaning logical construction;Wherein, loop structure can have while, for;Exception handling structure can have try, catch,
finally;Condition selection structure can have if, else, if-else, switch, case;Cleaning logical construction can have
cleanup;The explanation of each logical construction can be as shown in table 1.
Table 1
Optionally, above-mentioned logical construction is saved using xml format, it is entire automate the storage of use-case logical construction with <
Logic></logic>start, storing data format is as shown in table 2.
Table 2
In the embodiment of the present invention, according to test character string, the logical relation of generation specifically can be as shown in Figure 4, wherein should
Logical relation can be logical relation tree, including root node, branch node and leaf node, wherein branch node, that is, logic is closed
Logical construction in system, such as if, else, if-else, While, the testing procedure in leaf node, that is, logical relation, that is, connect
Mouth resource.
Step 203, it since the logical relation preset initial testing step, repeats preset selection and executes
Step, until completing to execute the preset termination step in the logical relation.
In the embodiment of the present invention, it includes: to do the test result of currently running first testing procedure that selection, which executes step,
For parametric variable, and based on the trigger condition in the first logical construction corresponding to parametric variable and the first testing procedure, really
Determine and executes the next testing procedure that need to be run.
First logical construction can be loop structure, exception handling structure, condition selection structure, cleaning logical construction
Deng, for different structures, logic therein difference, in the following, being described in detail for each logical construction.
(1) first logical construction is loop structure
The first trigger condition and the second trigger condition are configured in loop structure, the first trigger condition indicates the first test step
Suddenly, that is, after having executed the first testing procedure, if the test result of the first testing procedure meets the first trigger condition, execution is recycled
First testing procedure;Second trigger condition indicates the second testing procedure.Specifically, if the test result of the first testing procedure accords with
The first trigger condition is closed, then continues the test result of the first testing procedure to input the first testing procedure, until the first test step
Rapid test result meets the second trigger condition;The purpose of this loop structure is the automatic test suitable for batch, simultaneously
Suitable for the generation data of batch, in this loop structure, the test result of each first testing procedure is recorded, such as the first test step
Rapid circulation 10 times, then can generate the test result of 10 the first testing procedures, and then by the test result of each first testing procedure
It is input in the second testing procedure, generates the output of the second testing procedure as a result, being equivalent to the survey of 10 the first testing procedures
Test result is separately input into the second testing procedure, obtains the test result of 10 the second testing procedures.
(2) first logical constructions are exception handling structures
Third trigger condition and the 4th trigger condition are configured in exception handling structure, third trigger condition indicates that third is surveyed
Try is rapid, and third testing procedure is used to the test result of the first testing procedure marking abnormality code, is equivalent to, when the first survey
When the rapid test result of try occurs abnormal, not will lead to operation use-case terminates, but can be input to third testing procedure, holds
Row third testing procedure marks abnormality code;4th trigger condition indicates the 4th testing procedure.Specifically, if the first test
The test result of step is abnormality, then the test result of the first testing procedure is input to third testing procedure, executes the
The test result for being marked with the first testing procedure of abnormality code is input to the 4th testing procedure by three testing procedures;If
The test result of first testing procedure is normal condition, then the test result of the first testing procedure is input to the 4th test step
Suddenly.
(3) first logical constructions are condition selection structures
Condition selects at least to be configured with the 5th trigger condition and the 6th trigger condition in structure, the 5th trigger condition instruction the
Five testing procedures, the 6th trigger condition indicate the 6th testing procedure;Specifically, if the test result of the first testing procedure meets
The test result of first testing procedure is then inputted the 5th testing procedure by five trigger conditions;If the test knot of the first testing procedure
Fruit meets the 6th trigger condition, then the test result of the first testing procedure is inputted the 6th testing procedure.In addition, condition selection knot
Can be configured with 3,4 or more trigger conditions in structure, each trigger condition can indicate different testing procedures,
To determine corresponding testing procedure according to the test result of the first testing procedure.
After completing to execute the preset termination step in logical relation, cleaning logical construction can also be performed, clear up
Logical construction is used to run the occupied resource release in use-case.
Further, each testing procedure executed in test process can also be formed to execution route and exported.It can be used
Depth Priority Algorithm is scheduled each logical construction, to execute testing procedure based on the logic defined, and will
The testing procedure group determined becomes the execution route of operation use-case.
For example, automation use-case contains testing procedure a, b, c, d, e, f, g, h, i, and given value x, y, z are defined and first
Beginningization parametric variable v_var1, v_var2, v_var3;In process as shown in Figure 5:
Step 501, in data preprocessing phase, in addition to definition and initiation parameter variable v_var1, v_var2, v_var3
Outside, it is necessary to which calling some interfaces is that subsequent testing procedure executes preceding preparation, it is necessary to which for recycles 10 execution testing procedures
a。
Step 502, testing procedure b is executed, and obtains the response results of testing procedure b, the value in the response results is assigned
It is worth and gives parametric variable v_var1.
Step 503, into if-else logical construction, if v_var1==x, testing procedure c is executed, is otherwise held
Row testing procedure d.
Step 504, testing procedure e is executed, and obtains the response results of testing procedure e, the value in the response results is assigned
It is worth and gives parametric variable v_var2.
Step 505, into while logical construction, condition is and if only if v_var2!Under=y, while loop structure
It is testing procedure f, the response results of testing procedure f are assigned to v_var2, work as v_var2==y, exit while loop structure.
Step 506, into try logical construction, testing procedure g is executed, it is different whether the response results of testing procedure g occur
Normal state, if so, into catch logical construction, and testing procedure h is executed, abnormality value is generated, into finally
In logical construction, testing procedure i is executed;If abnormality does not occur in testing procedure g, it is directly entered finally structure
Execute testing procedure i;Judge whether testing procedure g abnormality occurs, if so, directly terminating, otherwise, executes testing procedure
j。
Step 507, testing procedure j is executed.
The embodiment of the present invention provides the process of the test method of another automation use-case, can be as shown in Figure 6.
Step 601, tester creates automation use-case;
Step 602, tester creates logical construction, adds testing procedure (interface resource);
Tester adds under logical construction and surveys according to automation use-case test scene self-defined combination logical construction
Try is rapid, is equivalent to creation automation use-case step tree, and the step tree is as shown in Figure 3.
Step 603, front end system generates automation use-case logical construction xml, and saves to database;
The automation use-case step tree that front end system is created according to tester, according to each logic knot defined above
Structure storing data mode generates xml character string, saves database corresponding to automation use-case.
Step 604, tester triggers automation use-case and executes;
Tester clicks operation automation use-case, and the backstage scheduling of triggering logical construction executes testing procedure.
Step 605, back-end system parses use-case logical construction xml character string, construction logic structure tree;
Back-end system reads corresponding logical structure data xml character string, and resolution logic according to automation use-case information
Structure xml character string, according to logical construction xml create-rule, construction logic structure tree, leaf node corresponds to testing procedure, i.e.,
Interface resource, non-leaf nodes (branch node) counterlogic structure, logical structure tree are illustrated in fig. 4 shown below.
Step 606, back-end system traverses logical structure tree according to preset algorithm, executes testing procedure;
On the basis of construction logic structure tree, preset algorithm, such as Depth Priority Algorithm is can be used in back-end system,
Each logical construction is scheduled, to execute testing procedure based on the logic defined.
Step 607, automation use-case testing procedure result is write into database and saved by back-end system;
The testing procedure of automation use-case has been executed according to logical construction, testing procedure result can be stored list and write into
Database saves;
Step 608, front end system shows that the testing procedure of logical construction executes structure and its path;
Front end system carries out automation use-case testing procedure result and its execution route according to the result that database saves
It shows.
In above-mentioned technical proposal, running in the logical relation of use-case includes logical construction and testing procedure, passes through logic knot
Trigger condition in structure is directed toward different testing procedures, to realize in the test of automation use-case, by a upper test step
Multiple test results in rapid are respectively directed to next testing procedure corresponding with each test result, so that the survey of test case
It is controllable to try steps flow chart, improves the flexibility of automatic test;Further, tester is avoided in order to test different tests
Step as a result, write the test case step of redundancy, efficiency is write in raising.
Based on the same inventive concept, Fig. 7 illustratively shows a kind of automation use-case provided in an embodiment of the present invention
The structure of test device, the device can execute the process of the test method of automation use-case.
The device, comprising:
Acquiring unit 701, for obtaining operation use-case;According to the operation use-case, it is corresponding to obtain the operation use-case
The logical relation of test case;Record has the logical construction and testing procedure of the test case in the logical relation;It is described
Trigger condition is configured in logical construction;
Processing unit 702, for initial testing step preset since the logical relation, repeat preset
Selection executes step, until completing to execute the preset termination step in the logical relation;The selection executes step
By the test result of currently running first testing procedure as parametric variable, and variable and described first based on the parameter
Trigger condition in first logical construction corresponding to testing procedure determines and executes the next testing procedure that need to be run;It is defeated
Implementing result of the preset test result for terminating step as the operation use-case out.
Optionally, first logical construction is loop structure, in the loop structure configured with the first trigger condition and
Second trigger condition;First trigger condition indicates the first testing procedure;Second trigger condition indicates the second test step
Suddenly;
The processing unit 702, is specifically used for:
If the test result of first testing procedure meets first trigger condition, by first testing procedure
Test result continue to input first testing procedure, until the test result of first testing procedure meets described second
Trigger condition;
The test result of each first testing procedure is recorded;
The test result of each first testing procedure is input in second testing procedure, described second is generated and surveys
The rapid output result of try.
Optionally, first logical construction is exception handling structure, is touched in the exception handling structure configured with third
Clockwork spring part and the 4th trigger condition;The third trigger condition indicates third testing procedure, and the third testing procedure is used for will
The test result of first testing procedure marks abnormality code;4th trigger condition indicates the 4th testing procedure;
The processing unit 702, is specifically used for:
If the test result of first testing procedure is abnormality, by the test result of first testing procedure
It is input to the third testing procedure, executes the third testing procedure, described the of the abnormality code will be marked with
The test result of one testing procedure is input to the 4th testing procedure;
If the test result of first testing procedure is normal condition, by the test result of first testing procedure
It is input to the 4th testing procedure.
Optionally, first logical construction is condition selection structure, at least configured with the in condition selection structure
Five trigger conditions and the 6th trigger condition;5th trigger condition indicates the 5th testing procedure;6th trigger condition refers to
Show the 6th testing procedure;
The processing unit 702, is specifically used for:
If the test result of first testing procedure meets the 5th trigger condition, by first testing procedure
Test result input the 5th testing procedure;If the test result of first testing procedure meets the 6th triggering article
The test result of first testing procedure is then inputted the 6th testing procedure by part.
Optionally, the processing unit 702, is also used to:
After the preset termination step completed in the execution logical relation, cleaning logical construction, institute are executed
Cleaning logical construction is stated to be used to discharge the occupied resource in the operation use-case.
Optionally, the processing unit 702, is also used to:
After implementing result of the output preset test result for terminating step as the operation use-case,
Each testing procedure executed in test process is formed into execution route and is exported.
Based on the same inventive concept, the embodiment of the invention also provides a kind of calculating equipment, comprising:
Memory, for storing program instruction;
Processor executes above-mentioned automatic for calling the program instruction stored in the memory according to the program of acquisition
Change the test method of use-case.
Based on the same inventive concept, the embodiment of the invention also provides a kind of computer-readable non-volatile memory medium,
Including computer-readable instruction, when computer is read and executes the computer-readable instruction, so that computer execution is above-mentioned
Automate the test method of use-case.
The present invention be referring to according to the method for the embodiment of the present invention, the process of equipment (system) and computer program product
Figure and/or block diagram describe.It should be understood that every one stream in flowchart and/or the block diagram can be realized by computer program instructions
The combination of process and/or box in journey and/or box and flowchart and/or the block diagram.It can provide these computer programs
Instruct the processor of general purpose computer, special purpose computer, Embedded Processor or other programmable data processing devices to produce
A raw machine, so that being generated by the instruction that computer or the processor of other programmable data processing devices execute for real
The device for the function of being specified in present one or more flows of the flowchart and/or one or more blocks of the block diagram.
These computer program instructions, which may also be stored in, is able to guide computer or other programmable data processing devices with spy
Determine in the computer-readable memory that mode works, so that it includes referring to that instruction stored in the computer readable memory, which generates,
Enable the manufacture of device, the command device realize in one box of one or more flows of the flowchart and/or block diagram or
The function of being specified in multiple boxes.
These computer program instructions also can be loaded onto a computer or other programmable data processing device, so that counting
Series of operation steps are executed on calculation machine or other programmable devices to generate computer implemented processing, thus in computer or
The instruction executed on other programmable devices is provided for realizing in one or more flows of the flowchart and/or block diagram one
The step of function of being specified in a box or multiple boxes.
Although preferred embodiments of the present invention have been described, it is created once a person skilled in the art knows basic
Property concept, then additional changes and modifications may be made to these embodiments.So it includes excellent that the following claims are intended to be interpreted as
It selects embodiment and falls into all change and modification of the scope of the invention.
Obviously, various changes and modifications can be made to the invention without departing from essence of the invention by those skilled in the art
Mind and range.In this way, if these modifications and changes of the present invention belongs to the range of the claims in the present invention and its equivalent technologies
Within, then the present invention is also intended to include these modifications and variations.
Claims (14)
1. a kind of test method for automating use-case characterized by comprising
Obtain operation use-case;
According to the operation use-case, the logical relation of the corresponding test case of the operation use-case is obtained;In the logical relation
Record has the logical construction and testing procedure of the test case;Trigger condition is configured in the logical construction;
Since the logical relation preset initial testing step, repeats preset selection and execute step, until complete
At the preset termination step executed in the logical relation;It includes: to survey currently running first that the selection, which executes step,
The rapid test result of try is as parametric variable, and based on the parameter corresponding to variable and first testing procedure
Trigger condition in one logical construction determines and executes the next testing procedure that need to be run;
Export implementing result of the preset test result for terminating step as the operation use-case.
2. the method as described in claim 1, which is characterized in that first logical construction is loop structure, the circulation knot
The first trigger condition and the second trigger condition are configured in structure;First trigger condition indicates the first testing procedure;Described
Two trigger conditions indicate the second testing procedure;
The test result by currently running first testing procedure as parametric variable, and based on the parameter variable and
Trigger condition in first logical construction corresponding to first testing procedure determines and executes the next test that need to be run
Step, comprising:
If the test result of first testing procedure meets first trigger condition, by the survey of first testing procedure
Test result continues to input first testing procedure, until the test result of first testing procedure meets second triggering
Condition;
The test result of each first testing procedure is recorded;
The test result of each first testing procedure is input in second testing procedure, second test step is generated
Rapid output result.
3. the method as described in claim 1, which is characterized in that first logical construction is exception handling structure, described different
Third trigger condition and the 4th trigger condition are configured in normal processing structure;The third trigger condition indicates third test step
Suddenly, the third testing procedure is used to the test result of first testing procedure marking abnormality code;4th touching
Clockwork spring part indicates the 4th testing procedure;
The test result by currently running first testing procedure as parametric variable, and based on the parameter variable and
Trigger condition in first logical construction corresponding to first testing procedure determines and executes the next test that need to be run
Step, comprising:
If the test result of first testing procedure is abnormality, the test result of first testing procedure is inputted
To the third testing procedure, the third testing procedure is executed, described the first of the abnormality code will be marked with and surveyed
The rapid test result of try is input to the 4th testing procedure;
If the test result of first testing procedure is normal condition, the test result of first testing procedure is inputted
To the 4th testing procedure.
4. the method as described in claim 1, which is characterized in that first logical construction is condition selection structure, the item
Part selects at least to be configured with the 5th trigger condition and the 6th trigger condition in structure;The 5th test of 5th trigger condition instruction
Step;6th trigger condition indicates the 6th testing procedure;
The test result by currently running first testing procedure as parametric variable, and based on the parameter variable and
Trigger condition in first logical construction corresponding to first testing procedure determines and executes the next test that need to be run
Step, comprising:
If the test result of first testing procedure meets the 5th trigger condition, by the survey of first testing procedure
Test result inputs the 5th testing procedure;If the test result of first testing procedure meets the 6th trigger condition,
The test result of first testing procedure is then inputted into the 6th testing procedure.
5. the method as described in claim 1, which is characterized in that complete to execute the preset end in the logical relation described
After halting suddenly, further includes:
Cleaning logical construction is executed, the cleaning logical construction is used to discharge the occupied resource in the operation use-case.
6. such as method described in any one of claim 1 to 5, which is characterized in that in the output preset termination step
Test result as it is described operation use-case implementing result after, further includes:
Each testing procedure executed in test process is formed into execution route and is exported.
7. a kind of test device for automating use-case characterized by comprising
Acquiring unit, for obtaining operation use-case;According to the operation use-case, the corresponding test case of the operation use-case is obtained
Logical relation;Record has the logical construction and testing procedure of the test case in the logical relation;The logical construction
In be configured with trigger condition;
Processing unit, for initial testing step preset since the logical relation, repeat it is preset selection hold
Row step, until completing to execute the preset termination step in the logical relation;The selection execution step includes: will be current
The test result of first testing procedure of operation is as parametric variable, and variable and first test step based on the parameter
Trigger condition in rapid the first corresponding logical construction, determines and executes the next testing procedure that need to be run;Described in output
Implementing result of the preset test result for terminating step as the operation use-case.
8. device as claimed in claim 7, which is characterized in that first logical construction is loop structure, the circulation knot
The first trigger condition and the second trigger condition are configured in structure;First trigger condition indicates the first testing procedure;Described
Two trigger conditions indicate the second testing procedure;
The processing unit, is specifically used for:
If the test result of first testing procedure meets first trigger condition, by the survey of first testing procedure
Test result continues to input first testing procedure, until the test result of first testing procedure meets second triggering
Condition;
The test result of each first testing procedure is recorded;
The test result of each first testing procedure is input in second testing procedure, second test step is generated
Rapid output result.
9. device as claimed in claim 7, which is characterized in that first logical construction is exception handling structure, described different
Third trigger condition and the 4th trigger condition are configured in normal processing structure;The third trigger condition indicates third test step
Suddenly, the third testing procedure is used to the test result of first testing procedure marking abnormality code;4th touching
Clockwork spring part indicates the 4th testing procedure;
The processing unit, is specifically used for:
If the test result of first testing procedure is abnormality, the test result of first testing procedure is inputted
To the third testing procedure, the third testing procedure is executed, described the first of the abnormality code will be marked with and surveyed
The rapid test result of try is input to the 4th testing procedure;
If the test result of first testing procedure is normal condition, the test result of first testing procedure is inputted
To the 4th testing procedure.
10. device as claimed in claim 7, which is characterized in that first logical construction is condition selection structure, the item
Part selects at least to be configured with the 5th trigger condition and the 6th trigger condition in structure;The 5th test of 5th trigger condition instruction
Step;6th trigger condition indicates the 6th testing procedure;
The processing unit, is specifically used for:
If the test result of first testing procedure meets the 5th trigger condition, by the survey of first testing procedure
Test result inputs the 5th testing procedure;If the test result of first testing procedure meets the 6th trigger condition,
The test result of first testing procedure is then inputted into the 6th testing procedure.
11. device as claimed in claim 7, which is characterized in that the processing unit is also used to:
After the preset termination step completed in the execution logical relation, cleaning logical construction is executed, it is described clear
Logical construction is managed to be used to discharge the occupied resource in the operation use-case.
12. such as the described in any item devices of claim 7 to 11, which is characterized in that the processing unit is also used to:
After implementing result of the output preset test result for terminating step as the operation use-case, it will survey
Each testing procedure executed during examination forms execution route and exports.
13. a kind of calculating equipment characterized by comprising
Memory, for storing program instruction;
Processor requires 1 to 6 according to the program execution benefit of acquisition for calling the program instruction stored in the memory
Described in any item methods.
14. a kind of computer-readable non-volatile memory medium, which is characterized in that including computer-readable instruction, work as computer
When reading and executing the computer-readable instruction, so that computer executes such as method as claimed in any one of claims 1 to 6.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201910580562.0A CN110287121A (en) | 2019-06-28 | 2019-06-28 | A kind of test method and device automating use-case |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201910580562.0A CN110287121A (en) | 2019-06-28 | 2019-06-28 | A kind of test method and device automating use-case |
Publications (1)
Publication Number | Publication Date |
---|---|
CN110287121A true CN110287121A (en) | 2019-09-27 |
Family
ID=68019842
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201910580562.0A Pending CN110287121A (en) | 2019-06-28 | 2019-06-28 | A kind of test method and device automating use-case |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN110287121A (en) |
Cited By (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN115687140A (en) * | 2022-11-10 | 2023-02-03 | 江苏衫数科技集团有限公司 | Test case compiling method and system based on automatic test |
-
2019
- 2019-06-28 CN CN201910580562.0A patent/CN110287121A/en active Pending
Cited By (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN115687140A (en) * | 2022-11-10 | 2023-02-03 | 江苏衫数科技集团有限公司 | Test case compiling method and system based on automatic test |
CN115687140B (en) * | 2022-11-10 | 2024-01-30 | 江苏衫数科技集团有限公司 | Test case writing method and system based on automatic test |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN104820640B (en) | A kind of webpage test method and device | |
CN105068929B (en) | Test script generation method and device, method of testing, test device and test system | |
CN103164328B (en) | The regression testing method of a kind of business function, Apparatus and system | |
CN109960653A (en) | Regression testing method, device, equipment and storage medium | |
US20110016452A1 (en) | Method and system for identifying regression test cases for a software | |
CN105512036A (en) | Test template for automatically generating test case according to preset rules and test method | |
CN104794057B (en) | A kind of crossing event automated testing method and device | |
CN109240755A (en) | A kind of configuration file comparison method and configuration file Compare System | |
CN108932191A (en) | Automated testing method, system, computer equipment and readable storage medium storing program for executing | |
CN110188036A (en) | A kind of method for testing software and device | |
CN109934507A (en) | A kind of method and device of operation flow scheduling | |
CN103823145A (en) | Automation test platform for hardware | |
CN105279092A (en) | Software testing method and apparatus | |
CN111797006B (en) | Method, device and equipment for testing thread and storage medium | |
CN110287121A (en) | A kind of test method and device automating use-case | |
CN107703773A (en) | A kind of method for testing software and device based on hardware-in-loop simulation system | |
CN113568825B (en) | Program flow debugging method, device, equipment and storage medium | |
CN105093096B (en) | A kind of FPGA test device | |
US10719482B2 (en) | Data comparison | |
CN110737573B (en) | Method and device for automatically testing user interface UI | |
CN110347735A (en) | The data forwarding of configurationization mends processing method, device and readable storage medium storing program for executing extremely | |
CN114185874A (en) | Big data based modeling method and device, development framework and equipment | |
CN110399284A (en) | A kind of test case writes and executes method and device | |
US20240086165A1 (en) | Systems and methods for building and deploying machine learning applications | |
CN110597728A (en) | Method, device and system for constructing test data |
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 |