CN116204445B - Test case generation method and device, code test method, device and medium - Google Patents

Test case generation method and device, code test method, device and medium Download PDF

Info

Publication number
CN116204445B
CN116204445B CN202310473155.6A CN202310473155A CN116204445B CN 116204445 B CN116204445 B CN 116204445B CN 202310473155 A CN202310473155 A CN 202310473155A CN 116204445 B CN116204445 B CN 116204445B
Authority
CN
China
Prior art keywords
node
population
test case
individuals
weight value
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.)
Active
Application number
CN202310473155.6A
Other languages
Chinese (zh)
Other versions
CN116204445A (en
Inventor
郭建文
符云越
王向科
席鑫
李拓
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Suzhou Inspur Intelligent Technology Co Ltd
Original Assignee
Suzhou Inspur Intelligent Technology Co Ltd
Priority date (The priority date 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 date listed.)
Filing date
Publication date
Application filed by Suzhou Inspur Intelligent Technology Co Ltd filed Critical Suzhou Inspur Intelligent Technology Co Ltd
Priority to CN202310473155.6A priority Critical patent/CN116204445B/en
Publication of CN116204445A publication Critical patent/CN116204445A/en
Application granted granted Critical
Publication of CN116204445B publication Critical patent/CN116204445B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/36Preventing errors by testing or debugging software
    • G06F11/3668Software testing
    • G06F11/3672Test management
    • G06F11/3684Test management for test design, e.g. generating new test cases
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/36Preventing errors by testing or debugging software
    • G06F11/3668Software testing
    • G06F11/3672Test management
    • G06F11/3676Test management for coverage analysis
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/36Preventing errors by testing or debugging software
    • G06F11/3668Software testing
    • G06F11/3672Test management
    • G06F11/3688Test management for test execution, e.g. scheduling of test suites
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06NCOMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS
    • G06N3/00Computing arrangements based on biological models
    • G06N3/12Computing arrangements based on biological models using genetic models
    • G06N3/126Evolutionary algorithms, e.g. genetic algorithms or genetic programming
    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02DCLIMATE CHANGE MITIGATION TECHNOLOGIES IN INFORMATION AND COMMUNICATION TECHNOLOGIES [ICT], I.E. INFORMATION AND COMMUNICATION TECHNOLOGIES AIMING AT THE REDUCTION OF THEIR OWN ENERGY USE
    • Y02D10/00Energy efficient computing, e.g. low power processors, power management or thermal management

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Biophysics (AREA)
  • Computer Hardware Design (AREA)
  • Quality & Reliability (AREA)
  • Health & Medical Sciences (AREA)
  • Life Sciences & Earth Sciences (AREA)
  • Evolutionary Biology (AREA)
  • Bioinformatics & Computational Biology (AREA)
  • Bioinformatics & Cheminformatics (AREA)
  • Computational Linguistics (AREA)
  • Genetics & Genomics (AREA)
  • Artificial Intelligence (AREA)
  • Biomedical Technology (AREA)
  • Physiology (AREA)
  • Data Mining & Analysis (AREA)
  • Evolutionary Computation (AREA)
  • General Health & Medical Sciences (AREA)
  • Molecular Biology (AREA)
  • Computing Systems (AREA)
  • Mathematical Physics (AREA)
  • Software Systems (AREA)
  • Debugging And Monitoring (AREA)

Abstract

The present invention relates to the field of software testing, and in particular, to a test case generating method, a device, a code testing method, a device, and a medium. The test case generation method comprises the following steps: the combination logic is used as a target condition to cover test points and a condition tree is generated by using a preset rule; constructing a population of genetic algorithm with each individual as an initial test case; node interception is carried out on the condition tree to obtain effective nodes and an initial weight value is given; taking individuals of the population as input of codes to be tested and running the codes to be tested on a verification platform; updating the weight value of the effective node according to the coverage times and the initial weight value of the effective node collected from the verification platform; calculating the fitness of individuals in the population according to the updated weight value and the coverage state of the effective nodes collected from the verification platform; and adjusting individuals of the population based on the fitness until a preset output condition is met, and outputting. The scheme of the invention greatly reduces the number of redundant test cases, improves the convergence rate and improves the test efficiency.

Description

Test case generation method and device, code test method, device and medium
Technical Field
The present invention relates to the field of software testing, and in particular, to a test case generating method, a device, a code testing method, a device, and a medium.
Background
The code coverage rate is a method for indirectly measuring the quality of software by calculating the proportion of the source codes executed in the test process to all the source codes. The method can potentially guarantee the quality of actual products when guaranteeing the test quality, and can further create new test cases to increase coverage rate based on searching places which are not tested by the test cases in the program. Ideally, code coverage testing is expected to reach one hundred percent coverage, but this is often difficult to reach, especially for large projects with large code volumes and complex logic, coverage of conditions, paths, etc. is even difficult to reach ninety percent, while for very demanding trigger conditions, conventional random testing runs for hours or even days without coverage of the corresponding test points.
In order to reduce the code test period, improve the code coverage rate and reduce the technical requirements on code testers, the industry introduces an intelligent search algorithm to automatically generate code coverage test cases. However, the test case generation method commonly used in the industry at present is based on a random algorithm or a constraint random algorithm, and the open loop method does not adjust the test case generation strategy based on the code state, so that a large number of redundant test cases are generated, and the test efficiency is low, so that improvement is needed.
Disclosure of Invention
In view of the foregoing, it is desirable to provide a test case generating method, a device, a code testing method, a device, and a medium for solving the above problems.
According to a first aspect of the present invention, there is provided a test case generating method, including:
analyzing the code to be tested to take the combination logic as a target condition coverage test point, and generating a condition tree for the target condition coverage test point by using a preset rule;
constructing a population of a genetic algorithm, wherein each individual in the population is an initial test case of the code to be tested;
node interception is carried out on the condition tree to obtain an effective node, and an initial weight value is given to the effective node;
taking individuals of the population as input of codes to be tested, and running the codes to be tested on a verification platform;
updating the weight value of the effective node according to the coverage times of the effective node collected from the verification platform and the initial weight value to obtain an updated weight value;
calculating the fitness of individuals in the population according to the updated weight value and the coverage state of the effective nodes collected from the verification platform;
And adjusting the individuals of the population based on the fitness until the preset output condition is met, and outputting the adjusted test case.
In some embodiments, the preset rules include at least one of:
taking the combinational logic corresponding to the target condition coverage test point as a root node;
processing the combination logic based on a preset child item segmentation rule, wherein the combination logic is taken as a father node, and child items of the father node combination logic are taken as child nodes;
for branch conditions, a branch causing the variation of the node variable is listed as a child node;
when the node is a code input parameter, the output of a code invisible component or the value change of a node variable has no logic relation with other variables, the node is a leaf node and is not decomposed;
the minimum number of nodes each node passes to reach the root node is taken as the layer number of the node.
In some embodiments, the preset sub-item segmentation rules include at least one of:
dividing rule one, converting logic operators to obtain combined logic only comprising and relation or relation;
dividing rule II, setting the relation or the priority of the relation to follow the design language rule of the code to be tested;
The segmentation rule III and the sub-items only have a single form logic relationship, and each sub-item corresponds to one sub-node;
the combination logic is simplified according to a logic operation rule before the segmentation rule IV and the sub-item decomposition are carried out so as to ensure that each item does not contain a logic operator;
the partitioning rule five changes the logical relation of the root node into the relation after the partitioning rule one, the partitioning rule two and the partitioning rule four are converted;
if the simplified logic relation contains both or the relation and the relation, the sub-node of the low-priority logic relation is decomposed first, and then the sub-node of the high-priority is decomposed from the generated sub-nodes.
In some embodiments, the preset output condition includes that a certain individual test exists in the current population and can cover the target condition coverage test point, and the iteration number of the current population reaches a preset iteration number.
In some embodiments, the step of adjusting the individuals in the population based on the fitness until the adjusted test case is output when a preset output condition is met includes:
and responding to the existence of a certain individual test in the current population and covering the target condition coverage test point or the iteration number of the current population reaches the preset iteration number, stopping iteration and outputting the test case corresponding to the certain individual or the test case corresponding to the individual in the population when the preset iteration number is reached.
In some embodiments, the step of adjusting the individuals in the population based on the fitness until the adjusted test case is output when a preset output condition is met further includes:
and responding to the situation that the individual tests in the current population cannot cover the target condition coverage test points and the iteration number of the current population does not reach the preset iteration number, and performing population changing operation on the individuals in the current population based on the fitness to generate a next generation population.
In some embodiments, the step of adjusting the individuals in the population based on the fitness until the adjusted test case is output when a preset output condition is met further includes:
and in response to generating the next generation population, returning to execute the step of taking the individuals of the population as the input of the code to be tested and running the code to be tested on a verification platform.
In some embodiments, the population changing operation comprises at least one of a selecting, crossing, and mutating operation.
In some embodiments, the step of performing node interception on the condition tree to obtain a valid node includes:
and selecting all nodes with node layer numbers smaller than or equal to the preset interception node layer number from the generated condition tree as effective nodes.
In some embodiments, the step of assigning an initial weight value to the active node includes:
each active node is assigned an initial weight value according to the following equation:
formula one;
wherein,,layer number representing node->Index number indicating node in layer, < >>The number of preset interception node layers is indicated,indicate->Total number of nodes in layer, ">Representing the value to which the logical attribute corresponds, +.>Indicate->Layer, th->Initial weight value of each node.
In some embodiments, the value rule corresponding to the logical attribute is as follows:
if the logical attribute of the node is AND, then
If the logical attribute of the node is OR, thenEqual to the number of child nodes included in the parent node corresponding to the node.
In some embodiments, the step of updating the weight value of the valid node according to the number of times of coverage of the valid node and the initial weight value collected from the verification platform to obtain an updated weight value includes:
updating a weight value for each effective node according to the following formula II;
a second formula;
wherein,,algebraic and +.>Greater than or equal to 1 +>Indicate->Layer, th->The personal node is using the +. >The number of times the generation population is covered when tested, < >>Represents the total number of individuals in the population, < >>Indicate->First->Layer, th->The updated weight value of the individual node.
In some embodiments, the step of calculating fitness of individuals in the population based on the updated weight value and the coverage status of the active nodes collected from the verification platform comprises:
calculating the fitness of each individual in the population according to the following formula III;
a formula III;
wherein,,indicate->In the generation group->Fitness of individual, ->Indicate use of->First->In individual test, the->Layer->And a value corresponding to the coverage status of each node.
In some embodiments, the value rule corresponding to the coverage state of the node is as follows:
if the node is coveredA value of 1;
if the node is not coveredThe value is 0.
In some embodiments, the code to be tested is used to verify a DUT.
In some embodiments, the DUT includes a memory chip, a processor, a SoC chip.
In some embodiments, each test case of the code to be tested includes a plurality of input parameters.
According to a second aspect of the present invention, there is provided a test case generating apparatus including:
The generating module is used for analyzing the code to be tested to take the combination logic as a target condition coverage test point and generating a condition tree for the target condition coverage test point by using a preset rule;
the construction module is used for constructing a population of a genetic algorithm, wherein each individual in the population is an initial test case of the code to be tested;
the intercepting module is used for intercepting the nodes of the condition tree to obtain effective nodes and endowing the effective nodes with initial weight values;
the running module is used for taking individuals of the population as input of codes to be tested and running the codes to be tested on the verification platform;
the updating module is used for updating the weight value of the effective node according to the coverage times of the effective node collected from the verification platform and the initial weight value to obtain an updated weight value;
the calculating module is used for calculating the fitness of individuals in the population according to the updated weight value and the coverage state of the effective nodes collected from the verification platform;
and the output module is used for adjusting the individuals of the population based on the fitness until the adjusted test cases are output when the preset output conditions are met.
According to a third aspect of the present invention, there is provided a code testing method for performing a test on a code using a test case output by the test case generating method described above.
According to a fourth aspect of the present invention there is also provided a computing device comprising:
at least one processor; and
the memory stores a computing device program which can be run on the processor, and the processor executes the program to execute the test case generation method.
According to a fifth aspect of the present invention, there is also provided a computing device readable storage medium storing a computing device program which when executed by a processor performs the foregoing test case generation method.
According to the test case generation method, the condition tree is generated by analyzing the code to be tested and using the preset rule as the target condition coverage test point, the required effective nodes are intercepted from the condition tree, the initial weight value is generated for each effective node, then the initial weight value is updated according to the coverage times of the effective nodes and the initial weight value in the population iteration process of the genetic algorithm, the adaptability of the population individuals is calculated according to the updated weight value, the population is adjusted, the test cases capable of covering the target condition coverage test point are generated through continuous iteration, the number of redundant test cases is greatly reduced, the adaptation degree is automatically adjusted according to the node hit probability, the iteration process can be obviously accelerated, the convergence speed is improved, the test case generation is independent of the technical level of code testers, the labor cost required by the test is reduced, and the test efficiency is obviously improved.
In addition, the invention also provides a test case generating device, a code testing method, a computing device and a computing device readable storage medium, which can also realize the technical effects and are not repeated here.
Drawings
In order to more clearly illustrate the embodiments of the invention or the technical solutions in the prior art, the drawings that are necessary for the description of the embodiments or the prior art will be briefly described, it being obvious that the drawings in the following description are only some embodiments of the invention and that other embodiments may be obtained according to these drawings without inventive effort for a person skilled in the art.
FIG. 1 is a flowchart of a test case generation method according to an embodiment of the present invention;
FIG. 2 is a flowchart of an embodiment of the present invention for automatically generating test cases using the method of the present invention;
FIG. 3 is a diagram of a condition tree corresponding to a certain combinational logic in a code to be tested according to an embodiment of the present invention;
FIG. 4 is a schematic structural diagram of a test case generating device according to another embodiment of the present invention;
fig. 5 is an internal structural diagram of a computing device according to another embodiment of the present invention.
Detailed Description
In order to make the objects, technical solutions and advantages of the present invention more apparent, the following embodiments of the present invention will be described in further detail with reference to the accompanying drawings.
It should be noted that, in the embodiments of the present invention, all the expressions "first" and "second" are used to distinguish two entities with the same name but different entities or different parameters, and it is noted that the "first" and "second" are only used for convenience of expression, and should not be construed as limiting the embodiments of the present invention, and the following embodiments are not described one by one.
In one embodiment, referring to fig. 1, the present invention provides a test case generating method 100, specifically, the test case generating method includes the following steps:
step 101, analyzing a code to be tested to take a combination logic as a target condition coverage test point, and generating a condition tree for the target condition coverage test point by using a preset rule;
in this embodiment, analyzing the code to be tested refers to analyzing the structure and logic of the code text, and specifically analyzing the program structure and logic based on the code programming language grammar. The combination logic at least comprises two or more logic operations, and the combination logic can be formed by combining the same logic operations or can be formed by combining a plurality of different logic operations, for example, a certain condition coverage test point comprises three AND operations and two OR operations. The preset rule is preset by a tester or a user to split and associate the combination logic so as to form a node relation tree comprising a root node and a plurality of child nodes.
102, constructing a population of a genetic algorithm, wherein each individual in the population is an initial test case of the code to be tested;
in this embodiment, the genetic algorithm is an evolutionary iterative search algorithm, after an initial population is generated, selecting, crossing and mutating individuals of the population according to specific rules according to the performance (also called fitness) of the individuals in the population to generate a new population, and the new population maintains the diversity and evolutionary possibility of the population on the basis of inheriting excellent genes of the original population, and finally generates an optimal population through continuous iteration. In order to improve the performance of genetic algorithms, a series of improved algorithms have been proposed, such as improved genetic algorithms, adaptive genetic algorithms, fuzzy genetic algorithms, etc. The adaptive genetic algorithm can improve the algorithm convergence accuracy and convergence speed through the adaptive adjustment of genetic parameters, and the adaptive genetic algorithm is preferably used for constructing the population. The initial test case refers to a test case which cannot cover the target condition coverage test point and is not subjected to iteration in the searching process, the initial test case can be a test case which is randomly generated and defined by a tester or is generated by the existing constraint method, and of course, the initial test case can also be a final test case which cannot cover the target condition coverage test point after the previous genetic algorithm searching is finished.
Step 103, node interception is carried out on the condition tree to obtain an effective node, and an initial weight value is given to the effective node;
in this embodiment, node interception refers to selecting a part of nodes from the condition tree, for example, intercepting a node near a root node in the condition tree or intercepting a node with a specific depth in the condition tree, and so on. The weight value refers to a measure of the importance or impact of a given set of data in solving a problem. The weight value may be calculated in various ways, and the specific method depends on the actual situation, for example, an existing weight calculation method may be used, for example, a relative weight method, a percentage method, a ranking method, a score method, a linear weighting method, or a combination of multiple methods.
104, taking individuals of the population as input of codes to be tested, and running the codes to be tested on a verification platform;
in this embodiment, the verification platform is a tool capable of running the code to be tested and collecting, analyzing and counting the running process result of the code, and the embodiment does not limit the version and type of the verification platform, and only has a corresponding analysis and statistics function.
Step 105, updating the weight value of the effective node according to the coverage times of the effective node and the initial weight value collected from the verification platform to obtain an updated weight value;
Step 106, calculating the fitness of individuals in the population according to the updated weight value and the coverage state of the effective nodes collected from the verification platform;
step 107 adjusts the individuals of the population based on the fitness until a preset output condition is satisfied, and outputs an adjusted test case.
In this embodiment, the adjustment of the population individuals means that the population is changed to form new individuals, and then each new individual forms a new population, and after the new population is formed, the execution of step 104 is returned again, so as to implement population iteration.
According to the test case generation method, the condition tree is generated by analyzing the code to be tested and using the preset rule as the target condition coverage test point, the required effective nodes are intercepted from the condition tree, the initial weight value is generated for each effective node, then the initial weight value is updated according to the coverage times of the effective nodes and the initial weight value in the population iteration process of the genetic algorithm, the adaptability of the population individuals is calculated according to the updated weight value, the population is adjusted, the test cases capable of covering the target condition coverage test point are generated through continuous iteration, the number of redundant test cases is greatly reduced, the adaptation degree is automatically adjusted according to the node hit probability, the iteration process can be obviously accelerated, the convergence speed is improved, the test case generation is independent of the technical level of code testers, the labor cost required by the test is reduced, and the test efficiency is obviously improved.
In some embodiments, the preset rules include at least one of:
taking the combinational logic corresponding to the target condition coverage test point as a root node;
processing the combination logic based on a preset child item segmentation rule, wherein the combination logic is taken as a father node, and child items of the father node combination logic are taken as child nodes;
for branch conditions, a branch causing the variation of the node variable is listed as a child node;
when the node is a code input parameter, the output of a code invisible component or the value change of a node variable has no logic relation with other variables, the node is a leaf node and is not decomposed;
the minimum number of nodes each node passes to reach the root node is taken as the layer number of the node.
In some embodiments, the preset sub-item segmentation rules include at least one of:
dividing rule one, converting logic operators to obtain combined logic only comprising and relation or relation;
dividing rule II, setting the relation or the priority of the relation to follow the design language rule of the code to be tested;
the segmentation rule III and the sub-items only have a single form logic relationship, and each sub-item corresponds to one sub-node;
the combination logic is simplified according to a logic operation rule before the segmentation rule IV and the sub-item decomposition are carried out so as to ensure that each item does not contain a logic operator;
The partitioning rule five changes the logical relation of the root node into the relation after the partitioning rule one, the partitioning rule two and the partitioning rule four are converted;
if the simplified logic relation contains both or the relation and the relation, the sub-node of the low-priority logic relation is decomposed first, and then the sub-node of the high-priority is decomposed from the generated sub-nodes.
In some embodiments, the preset output condition includes that a certain individual test exists in the current population and can cover the target condition coverage test point, and the iteration number of the current population reaches a preset iteration number.
In the embodiment, by setting two conditions for stopping the iteration, excessive invalid iteration can be effectively avoided, and stable execution of the genetic algorithm is ensured.
In this embodiment, the step 107 adjusts the individuals in the population based on the fitness until the adjusted test case is output when a preset output condition is satisfied, including:
and responding to the existence of a certain individual test in the current population and covering the target condition coverage test point or the iteration number of the current population reaches the preset iteration number, stopping iteration and outputting the test case corresponding to the certain individual or the test case corresponding to the individual in the population when the preset iteration number is reached.
In some embodiments, in step 107, the adjusting the individuals in the population based on the fitness until the preset output condition is met outputs the adjusted test case, and further includes:
and responding to the situation that the individual tests in the current population cannot cover the target condition coverage test points and the iteration number of the current population does not reach the preset iteration number, and performing population changing operation on the individuals in the current population based on the fitness to generate a next generation population.
In some embodiments, in step 107, the adjusting the individuals in the population based on the fitness until the preset output condition is met outputs the adjusted test case, and further includes:
and in response to generating the next generation population, returning to execute the step of taking the individuals of the population as the input of the code to be tested and running the code to be tested on a verification platform.
In some embodiments, the population changing operation comprises at least one of a selecting, crossing, and mutating operation.
In the implementation process, the three operations are preferably combined, for example, the selection operation is performed on the population individuals, then the cross operation is performed, and finally the mutation operation is performed, so that a new population is obtained.
In some embodiments, the node interception of the condition tree in the step 103 to obtain a valid node includes:
and selecting all nodes with node layer numbers smaller than or equal to the preset interception node layer number from the generated condition tree as effective nodes.
In some embodiments, assigning an initial weight value to the active node in the foregoing step 103 includes:
each active node is assigned an initial weight value according to the following equation:
formula one;
wherein,,layer number representing node->Index number indicating node in layer, < >>Representation ofThe number of layers of interception nodes is preset,indicate->Total number of nodes in layer, ">Representing the value to which the logical attribute corresponds, +.>Indicate->Layer, th->Initial weight value of each node.
In some embodiments, the value rule corresponding to the logical attribute is as follows:
if the logical attribute of the node is AND, then
If the logical attribute of the node is OR, thenEqual to the number of child nodes included in the parent node corresponding to the node.
In some embodiments, the foregoing step 105 updates the weight value of the valid node according to the coverage number of the valid node and the initial weight value collected from the verification platform to obtain an updated weight value, including:
Updating a weight value for each effective node according to the following formula II;
a second formula;
wherein,,algebraic and +.>Greater than or equal to 1 +>Indicate->Layer, th->The personal node is using the +.>The number of times the generation population is covered when tested, < >>Represents the total number of individuals in the population, < >>Indicate->First->Layer, th->The updated weight value of the individual node.
In some embodiments, the foregoing step 106 calculates the fitness of the individuals in the population according to the updated weight value and the coverage status of the valid nodes collected from the verification platform, including:
calculating the fitness of each individual in the population according to the following formula III;
a formula III;
wherein,,indicate->In the generation group->Fitness of individual, ->Indicate use of->First->In individual test, the->Layer->And a value corresponding to the coverage status of each node.
In some embodiments, the value rule corresponding to the coverage state of the node is as follows:
if the node is coveredA value of 1;
if the node is not coveredThe value is 0.
In some embodiments, the code to be tested is used to verify a DUT. Where the DUT is a acronym for Design under Test, the DUT may preferably be a memory chip, a processor, a SoC chip, etc. that is divided by function.
In some embodiments, each test case of the code to be tested includes a plurality of input parameters.
In a further embodiment, in order to facilitate understanding of the solution of the present invention, referring to fig. 2 below for various software testing application scenarios, this embodiment takes a specific combinational logic in a test case as an example, and details that the present invention provides a further test case generation method for code condition coverage test, specifically, generating a condition tree for a target coverage test point through code text analysis and a certain rule, intercepting nodes with required layers, generating fitness coefficients of each node according to an algorithm, and then generating a test case capable of covering the target condition coverage test point through continuous iteration according to an adaptive genetic algorithm and a designed fitness function, in this process, automatically adjusting the fitness function according to the node hit probability to accelerate an iterative process. The specific implementation process is as follows:
step one, analyzing codes to generate a condition tree; the program structure and logic are analyzed according to the code programming language grammar, a condition tree is generated by using specific rules, and the rules of the condition tree are generated as follows:
(1) And the root node is a target condition coverage test point, and the root node is a combinational logic.
(2) For the combinational logic, the parent node is the combinational logic itself, the child node is a child of the parent node combinational logic, and the child segmentation rule is as follows:
the first segmentation rule, the logical operator includes: and (& &), or (||) not (|), only the & & and|| operators are processed, and the | operation formula is converted, for example | (a = 1) is converted into (a |= 1);
the priority of the segmentation rules II, namely, the priorities of the & & and the | follow the corresponding programming language rules;
the segmentation rule three only has a single form logic relationship among the sub-items, each sub-item corresponds to one sub-node, the sub-node comprises a logic relationship attribute except the sub-items, if the logic relationship among the sub-items of the layer is I, the logic relationship attribute is OR, and if the logic relationship among the sub-items of the layer is &, the logic relationship attribute is AND;
the segmentation rule IV needs to simplify the combination logic according to the logic operation rule before sub-item decomposition, so that each item is ensured to contain no logic operator;
the fifth division rule is that for the root node, after the logic relation is converted by the first division rule, the second division rule and the fourth division rule, the |symbol is changed into the ++symbol, namely, the |symbol is converted into the relation no matter what the original logic relation among the sub-items is;
If the simplified logic relation formula contains | and & & | the segmentation rule six, the low-priority logic relation sub-nodes are decomposed firstly, and then the high-priority sub-nodes are decomposed from the generated sub-nodes;
for example, for the parent node combination logic (a > 1) & gt ((b= =5) & gt (c |=7)) || (d < 7) & gt (| (e |=1))), first change to (a > 1) & gt ((b= =5) & gt (c|=7))|| (d < 7) & gt (e= =1))) according to the division rule;
if the current node is not the root node, converting into (a > 1) & (b= =5) & (c |=7) | (d < 7) & (e= =1) according to the segmentation rule four; according to the division rule three, the operator has low priority, and can be decomposed into two layers, wherein the first layer is (a > 1) & (b= =5) &, (c |=7) and (d < 7) & (e= =1), the logical relationship attributes are respectively 'OR', the second layer is (a > 1), (b= =5), (c |=7) and (d < 7) and (e= =1), and the logical relationship attributes are respectively 'AND'.
If the current node is the root node, the current node is five-to- (a > 1) & (b= =5) & (c |=7) & (d < 7) & = =1), and if only one layer of child nodes is (a > 1), (b= =5), (c |=7), (d < 7), and (e= =1), the logical relationship attributes are and.
(3) For branch conditions, the branch which causes the variation of the node variable is listed as a child node, and the logical relation attributes are OR;
For example, for node (a > 1), the node variable is a, and if the state variable state causes a change when state+=1 and state+=3, the child nodes of (a > 1) are (state+=1) and (state+=3), and the logical relationship attributes are all "or".
(4) When the node is a code input parameter, the output of a code invisible component or the value change of a node variable has no logic relation with other variables, the node is a leaf node and is not decomposed.
(5) Each child node is set as the layer number of the node according to the minimum node number passed by the child node to reach the root node.
The condition tree generated based on the above rule is shown in fig. 3, each ellipse represents a node, and the interior is marked with a target relational expression (condition relational expression or condition, logic mixed relational expression), and the arrowed line segment beginning from the current node and ending at the father node is marked with the logic relational attribute of the current node.
And step two, intercepting corresponding nodes from the condition tree according to the interception layer number configuration. The configuration parameters are the number of node layers required to be intercepted, which are used for determining which nodes can be used for calculating the fitness, and the selected nodes are called valid nodes. The effective node selection rules are: when the node layer number is less than or equal to the configuration layer number, the node is an effective node
And thirdly, assigning initial weight values to each effective node according to an algorithm. The initial weight value of the effective node is set according to the following rule:
formula one;
the meaning of the parameters in equation one is explained as follows:
layer number representing node;
the index number of the node in the layer is represented, and the first layer node in fig. 3 may be taken as an example, the layer includes four nodes, and the index numbers of the four nodes from left to right can be respectively marked as 1 to 4;
representing the number of preset interception node layers;
indicate->Total number of nodes in the layer;
representing the value corresponding to the logical attribute, if the logical attribute of the node is "AND", then +.>The method comprises the steps of carrying out a first treatment on the surface of the If the logical property of the node is "OR", then +.>Equal to the number of child nodes included in the parent node corresponding to the node;
indicate->Layer, th->Initial weight value of each node.
And step four, refreshing the node weight. The node weights are used for calculating the fitness of individuals in the genetic algorithm, and the weight of each effective node is continuously optimized along with the evolution of the population so as to weaken the influence of non-key nodes on the fitness of the individuals, and then the population is evolved towards the direction of increasing the coverage rate of the key nodes. The node weight update is performed as follows:
a second formula;
the meaning of the parameters in equation two is explained as follows:
Algebraic and +.>1 or more;
indicate->Layer, th->The personal node is using the +.>The number of times the generation population is covered when tested;
representing the total number of individuals in the population;
indicate->First->Layer, th->The updated weight value of the individual node.
And fifthly, setting genetic parameters. And setting parameters such as the crossing rate, the mutation rate and the like of the genetic algorithm.
Step six, initializing a population. Genetic algorithm chromosomes are produced by binary encoding of input parameters, and populations are produced by constrained random algorithms.
And step seven, operating the verification platform and the code to be tested. Decoding the individual chromosomes to generate input parameters in the test cases, inputting the parameters to a verification platform, and running the verification platform and the code to be tested.
And step eight, collecting node coverage information. After testing the test cases corresponding to all individuals in the population, counting the coverage condition of each effective node, including whether each test case is covered or not and the coverage times in the current population.
And step nine, calculating fitness of individuals in the population. The fitness of the individual is calculated as follows:
a formula III;
the meaning of the parameters in formula three is explained as follows:
Indicate->In the generation group->Fitness of individual individuals
Indicate use of->First->In individual test, the->Layer->The value corresponding to the overlay state of the individual node, if the node is overlaid +.>The value is 1, if the node is not covered +.>The value is 0.
And step ten, analyzing population individuals. The method comprises the steps that whether a condition coverage test point is reached or not is mainly analyzed, if the condition coverage test point is reached or the allowed maximum evolution algebra is reached, the searching process is stopped, a test case is output when the condition coverage test point is reached, if the condition coverage test point is not reached, the searching fails, operation parameters are required to be adjusted, and searching is performed again; if the target condition coverage test point is not reached and the allowed maximum evolution algebra is not reached, carrying out the selection, crossover and mutation operations of the traditional genetic algorithm to generate a new population, and repeating the flow from the fourth step to the tenth step.
The test case generation method of the embodiment has at least the following beneficial technical effects:
(1) And providing a construction strategy of the condition tree, designing a self-adaptive weight generation and adjustment rule based on the condition tree and node coverage information, and then determining a corresponding fitness function to optimize the algorithm convergence speed.
(2) Based on the self-adaptive genetic algorithm, an initial population is generated in a constraint random mode, adaptability evaluation is carried out on test cases generated by decoding individual population according to running information, and based on the evaluation result, an optimized new population is generated through selection, crossing and mutation operations.
(3) And continuously optimizing the fitness calculation parameters according to the coverage information of the codes, increasing the weight of key (bottleneck) conditions, and accelerating algorithm convergence.
(4) In the new test case generation process, the code test process information is considered, the proportion of redundant test cases is greatly reduced, and the proportion is further reduced by adopting a self-adaptive fitness function.
(5) The operation parameters are only required to be manually configured, manual intervention is not required in the test case generation process, the condition nodes are not contacted with the inside of the code invisible component, the influence of the condition nodes is avoided, the test case generation difficulty and complexity are remarkably reduced, and the labor cost is reduced.
In some embodiments, referring to fig. 4, the present invention further provides a test case generating device 200, where the test case generating device includes:
a generating module 201, configured to analyze a code to be tested to take the combinational logic as a target condition coverage test point, and generate a condition tree for the target condition coverage test point by using a preset rule;
The construction module 202 is configured to construct a population of genetic algorithms, where each individual in the population is an initial test case of the code to be tested;
the intercepting module 203 is configured to intercept the condition tree to obtain an effective node, and assign an initial weight value to the effective node;
the operation module 204 is configured to take the individuals of the population as input of a code to be tested, and operate the code to be tested on a verification platform;
an updating module 205, configured to update the weight value of the valid node according to the coverage number of the valid node and the initial weight value collected from the verification platform to obtain an updated weight value;
a calculation module 206, configured to calculate fitness of individuals in the population according to the updated weight value and the coverage status of the valid nodes collected from the verification platform;
and the output module 207 is configured to adjust the individuals in the population based on the fitness until a preset output condition is met, and output the adjusted test case.
According to the test case generation device, the condition tree is generated by analyzing the code to be tested and using the preset rule as the target condition coverage test point, the required effective nodes are intercepted from the condition tree, the initial weight value is generated for each effective node, then the initial weight value is updated according to the coverage times of the effective nodes and the initial weight value in the population iteration process of the genetic algorithm, the adaptability of the population individuals is calculated according to the updated weight value, the population is adjusted, the test cases capable of covering the target condition coverage test point are generated through continuous iteration, the number of redundant test cases is greatly reduced, the adaptation degree is automatically adjusted according to the node hit probability, the iteration process can be obviously accelerated, the convergence speed is improved, the test case generation is independent of the technical level of code testers, the labor cost required by the test is reduced, and the test efficiency is obviously improved.
It should be noted that, the specific limitation of the test case generating device may refer to the limitation of the test case generating method in the above description, and will not be described herein. The respective modules in the test case generating device described above may be implemented in whole or in part by software, hardware, or a combination thereof. The above modules may be embedded in hardware or may be independent of a processor in the computing device, or may be stored in software in a memory in the computing device, so that the processor may invoke and execute operations corresponding to the above modules.
According to another aspect of the present invention, there is provided a code test method for executing a test on a code using a test case output by the test case generation method described in the above embodiment, the test case generation method including:
analyzing the code to be tested to take the combination logic as a target condition coverage test point, and generating a condition tree for the target condition coverage test point by using a preset rule;
constructing a population of a genetic algorithm, wherein each individual in the population is an initial test case of the code to be tested;
node interception is carried out on the condition tree to obtain an effective node, and an initial weight value is given to the effective node;
Taking individuals of the population as input of codes to be tested, and running the codes to be tested on a verification platform;
updating the weight value of the effective node according to the coverage times of the effective node collected from the verification platform and the initial weight value to obtain an updated weight value;
calculating the fitness of individuals in the population according to the updated weight value and the coverage state of the effective nodes collected from the verification platform;
and adjusting the individuals of the population based on the fitness until the preset output condition is met, and outputting the adjusted test case.
According to another aspect of the present invention, a computing device is provided, which may be a server, and an internal structure thereof is shown in fig. 5. The computing device includes a processor, memory, a network interface, and a database connected by a system bus. Wherein the processor of the computing device is configured to provide computing and control capabilities. The memory of the computing device includes a non-volatile storage medium, an internal memory. The non-volatile storage medium stores an operating system, computing device programs, and a database. The internal memory provides an environment for the operation of the operating system and computing device programs in the non-volatile storage media. The database of the computing device is used to store data. The network interface of the computing device is for communicating with an external terminal through a network connection. The method for generating the test case is realized when the computing device program is executed by a processor, and concretely comprises the following steps:
Analyzing the code to be tested to take the combination logic as a target condition coverage test point, and generating a condition tree for the target condition coverage test point by using a preset rule;
constructing a population of a genetic algorithm, wherein each individual in the population is an initial test case of the code to be tested;
node interception is carried out on the condition tree to obtain an effective node, and an initial weight value is given to the effective node;
taking individuals of the population as input of codes to be tested, and running the codes to be tested on a verification platform;
updating the weight value of the effective node according to the coverage times of the effective node collected from the verification platform and the initial weight value to obtain an updated weight value;
calculating the fitness of individuals in the population according to the updated weight value and the coverage state of the effective nodes collected from the verification platform;
and adjusting the individuals of the population based on the fitness until the preset output condition is met, and outputting the adjusted test case.
According to still another aspect of the present invention, there is provided a computing device readable storage medium having stored thereon a computing device program which, when executed by a processor, implements the test case generating method described above, and in particular includes performing the steps of:
Analyzing the code to be tested to take the combination logic as a target condition coverage test point, and generating a condition tree for the target condition coverage test point by using a preset rule;
constructing a population of a genetic algorithm, wherein each individual in the population is an initial test case of the code to be tested;
node interception is carried out on the condition tree to obtain an effective node, and an initial weight value is given to the effective node;
taking individuals of the population as input of codes to be tested, and running the codes to be tested on a verification platform;
updating the weight value of the effective node according to the coverage times of the effective node collected from the verification platform and the initial weight value to obtain an updated weight value;
calculating the fitness of individuals in the population according to the updated weight value and the coverage state of the effective nodes collected from the verification platform;
and adjusting the individuals of the population based on the fitness until the preset output condition is met, and outputting the adjusted test case.
Those skilled in the art will appreciate that implementing all or part of the above described methods may be accomplished by way of a computing device program stored on a non-volatile computing device readable storage medium, which when executed may comprise the steps of the embodiments of the methods described above. Any reference to memory, storage, database, or other medium used in the various embodiments provided herein may include non-volatile and/or volatile memory. The nonvolatile memory can include Read Only Memory (ROM), programmable ROM (PROM), electrically Programmable ROM (EPROM), electrically Erasable Programmable ROM (EEPROM), or flash memory. Volatile memory can include Random Access Memory (RAM) or external cache memory. By way of illustration and not limitation, RAM is available in a variety of forms such as Static RAM (SRAM), dynamic RAM (DRAM), synchronous DRAM (SDRAM), double Data Rate SDRAM (DDRSDRAM), enhanced SDRAM (ESDRAM), synchronous Link DRAM (SLDRAM), memory bus direct RAM (RDRAM), direct memory bus dynamic RAM (DRDRAM), and memory bus dynamic RAM (RDRAM), among others.
The technical features of the above embodiments may be arbitrarily combined, and all possible combinations of the technical features in the above embodiments are not described for brevity of description, however, as long as there is no contradiction between the combinations of the technical features, they should be considered as the scope of the description.
The above examples merely represent a few embodiments of the present application, which are described in more detail and are not to be construed as limiting the scope of the invention. It should be noted that it would be apparent to those skilled in the art that various modifications and improvements could be made without departing from the spirit of the present application, which would be within the scope of the present application. Accordingly, the scope of protection of the present application is to be determined by the claims appended hereto.

Claims (20)

1. The test case generation method is characterized by comprising the following steps:
analyzing the code to be tested to take the combination logic as a target condition coverage test point, and generating a condition tree for the target condition coverage test point by using a preset rule;
constructing a population of a genetic algorithm, wherein each individual in the population is an initial test case of the code to be tested;
Node interception is carried out on the condition tree to obtain an effective node, and an initial weight value is given to the effective node;
taking individuals of the population as input of codes to be tested, and running the codes to be tested on a verification platform;
updating the weight value of the effective node according to the coverage times of the effective node collected from the verification platform and the initial weight value to obtain an updated weight value;
calculating the fitness of individuals in the population according to the updated weight value and the coverage state of the effective nodes collected from the verification platform;
adjusting the individuals of the population based on the fitness until the preset output condition is met, and outputting an adjusted test case, wherein the adjustment of the individuals of the population refers to changing the population to form new individuals, further forming a new population by each new individual, returning to execute the step of taking the individuals of the population as the input of the code to be tested again after forming the new population, and running the code to be tested on a verification platform to realize population iteration;
the step of intercepting the nodes of the condition tree to obtain effective nodes comprises the following steps:
And selecting all nodes with node layer numbers smaller than or equal to the preset interception node layer number from the generated condition tree as effective nodes.
2. The test case generating method according to claim 1, wherein the preset rule includes at least one of:
taking the combinational logic corresponding to the target condition coverage test point as a root node;
performing child item segmentation on the combination logic based on a preset child item segmentation rule, so that the combination logic is taken as a father node, and the child item of the father node combination logic is taken as a child node;
for branch conditions, a branch causing the variation of the node variable is listed as a child node;
when the node is a code input parameter, the output of a code invisible component or the value change of a node variable has no logic relation with other variables, the node is a leaf node and is not decomposed;
the minimum number of nodes each node passes to reach the root node is taken as the layer number of the node.
3. The test case generating method according to claim 2, wherein the preset sub-item division rule includes at least one of:
dividing rule one, converting logic operators to obtain combined logic only comprising and relation or relation;
Dividing rule II, setting the relation or the priority of the relation to follow the design language rule of the code to be tested;
the segmentation rule III and the sub-items only have a single form logic relationship, and each sub-item corresponds to one sub-node;
the combination logic is simplified according to a logic operation rule before the segmentation rule IV and the sub-item decomposition are carried out so as to ensure that each item does not contain a logic operator;
the partitioning rule five changes the logical relation of the root node into the relation after the partitioning rule one, the partitioning rule two and the partitioning rule four are converted;
if the simplified logic relation contains both or the relation and the relation, the sub-node of the low-priority logic relation is decomposed first, and then the sub-node of the high-priority is decomposed from the generated sub-nodes.
4. The test case generating method according to claim 3, wherein the preset output condition includes that a certain individual test exists in the current population and can cover the target condition coverage test point, and the iteration number of the current population reaches a preset iteration number.
5. The test case generation method according to claim 4, wherein the step of adjusting the individuals of the population based on the fitness until the adjusted test case is output when a preset output condition is satisfied, comprises:
And responding to the existence of a certain individual test in the current population and covering the target condition coverage test point or the iteration number of the current population reaches the preset iteration number, stopping iteration and outputting the test case corresponding to the certain individual or the test case corresponding to the individual in the population when the preset iteration number is reached.
6. The test case generation method according to claim 4, wherein the step of adjusting the individuals of the population based on the fitness until the adjusted test case is output when a preset output condition is satisfied, further comprises:
and responding to the situation that the individual tests in the current population cannot cover the target condition coverage test points and the iteration number of the current population does not reach the preset iteration number, and performing population changing operation on the individuals in the current population based on the fitness to generate a next generation population.
7. The test case generation method according to claim 6, wherein the step of adjusting the individuals of the population based on the fitness until the adjusted test case is output when a preset output condition is satisfied, further comprises:
and in response to generating the next generation population, returning to execute the step of taking the individuals of the population as the input of the code to be tested and running the code to be tested on a verification platform.
8. The test case generating method of claim 7, wherein the population changing operation includes at least one of a selecting, crossing and mutating operation.
9. The test case generating method according to claim 7, wherein the step of assigning an initial weight value to the valid node comprises:
each active node is assigned an initial weight value according to the following equation:
formula one;
wherein,,layer number representing node->Index number indicating node in layer, < >>Representing the number of preset interception node layers, < > and the like>Indicate->Total number of nodes in layer, ">Representing the value to which the logical attribute corresponds, +.>Indicate->Layer, th->Initial weight value of each node.
10. The test case generating method according to claim 9, wherein the value rule corresponding to the logical attribute is as follows:
if the logical attribute of the node is AND, then
If node logicEditing attribute is OR, thenEqual to the number of child nodes included in the parent node corresponding to the node.
11. The test case generating method according to claim 10, wherein the step of updating the weight value of the valid node based on the number of times of coverage of the valid node and the initial weight value collected from the verification platform to obtain an updated weight value comprises:
Updating a weight value for each effective node according to the following formula II;
a second formula;
wherein,,algebraic and +.>Greater than or equal to 1 +>Indicate->Layer, th->The personal node is using the +.>The number of times the generation population is covered when tested, < >>Represents the total number of individuals in the population, < >>Indicate->First->Layer, th->The updated weight value of the individual node.
12. The test case generation method of claim 11, wherein the step of calculating fitness of individuals in the population based on the updated weight values and the coverage status of the active nodes collected from the verification platform comprises:
calculating the fitness of each individual in the population according to the following formula III;
a formula III;
wherein,,indicate->In the generation group->Fitness of individual, ->Indicate use of->First generation groupIn individual test, the->Layer->And a value corresponding to the coverage status of each node.
13. The test case generating method according to claim 12, wherein the value rule corresponding to the coverage state of the node is as follows:
if the node is coveredA value of 1;
if the node is not coveredThe value is 0.
14. The test case generation method of claim 1, wherein the code to be tested is used to verify a DUT.
15. The test case generation method of claim 14, wherein the DUT comprises a memory chip, a processor, a SoC chip.
16. The test case generating method according to claim 1, wherein each test case of the code to be tested includes a plurality of input parameters.
17. A test case generating device, characterized in that the test case generating device includes:
the generating module is used for analyzing the code to be tested to take the combination logic as a target condition coverage test point and generating a condition tree for the target condition coverage test point by using a preset rule;
the construction module is used for constructing a population of a genetic algorithm, wherein each individual in the population is an initial test case of the code to be tested;
the intercepting module is used for intercepting the nodes of the condition tree to obtain effective nodes and endowing the effective nodes with initial weight values;
the running module is used for taking individuals of the population as input of codes to be tested and running the codes to be tested on the verification platform;
The updating module is used for updating the weight value of the effective node according to the coverage times of the effective node collected from the verification platform and the initial weight value to obtain an updated weight value;
the calculating module is used for calculating the fitness of individuals in the population according to the updated weight value and the coverage state of the effective nodes collected from the verification platform;
the output module is used for adjusting the individuals of the population based on the fitness until the adjusted test cases are output when preset output conditions are met, wherein the adjustment of the individuals of the population refers to the change of the population to form new individuals, each new individual forms a new population, and the new population returns to the operation module again after the new population is formed to realize population iteration;
wherein the intercept module is further to:
and selecting all nodes with node layer numbers smaller than or equal to the preset interception node layer number from the generated condition tree as effective nodes.
18. A code testing method, wherein the code testing method uses the test case output by the test case generating method according to any one of claims 1 to 16 to perform a test on a code.
19. A computing device, comprising:
At least one processor; and
a memory storing a computing device program executable in the processor, the processor executing the test case generation method of any one of claims 1-16 when the program is executed.
20. A computing device readable storage medium storing a computing device program, wherein the computing device program, when executed by a processor, performs the test case generation method of any of claims 1-16.
CN202310473155.6A 2023-04-27 2023-04-27 Test case generation method and device, code test method, device and medium Active CN116204445B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202310473155.6A CN116204445B (en) 2023-04-27 2023-04-27 Test case generation method and device, code test method, device and medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202310473155.6A CN116204445B (en) 2023-04-27 2023-04-27 Test case generation method and device, code test method, device and medium

Publications (2)

Publication Number Publication Date
CN116204445A CN116204445A (en) 2023-06-02
CN116204445B true CN116204445B (en) 2023-07-21

Family

ID=86507978

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202310473155.6A Active CN116204445B (en) 2023-04-27 2023-04-27 Test case generation method and device, code test method, device and medium

Country Status (1)

Country Link
CN (1) CN116204445B (en)

Families Citing this family (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN116909934B (en) * 2023-09-13 2024-01-19 深圳鸿芯微纳技术有限公司 Command test method, device, equipment and medium of electronic automation design software
CN117194275B (en) * 2023-11-03 2024-01-26 吉贝克信息技术(北京)有限公司 Automatic software automatic test plan generation method and system based on intelligent algorithm
CN117632770B (en) * 2024-01-25 2024-04-19 江西财经大学 Multipath coverage test case generation method and system

Citations (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN115248769A (en) * 2021-04-27 2022-10-28 中移(苏州)软件技术有限公司 Test case optimization method, device, equipment and storage medium

Family Cites Families (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US5805795A (en) * 1996-01-05 1998-09-08 Sun Microsystems, Inc. Method and computer program product for generating a computer program product test that includes an optimized set of computer program product test cases, and method for selecting same
CN112769654A (en) * 2021-01-21 2021-05-07 国网河南省电力公司电力科学研究院 Modbus TCP protocol fuzzy test method based on genetic algorithm

Patent Citations (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN115248769A (en) * 2021-04-27 2022-10-28 中移(苏州)软件技术有限公司 Test case optimization method, device, equipment and storage medium

Also Published As

Publication number Publication date
CN116204445A (en) 2023-06-02

Similar Documents

Publication Publication Date Title
CN116204445B (en) Test case generation method and device, code test method, device and medium
Mohamed et al. A comparative study of reduced error pruning method in decision tree algorithms
Tawosi et al. Multi-objective software effort estimation: A replication study
Minku et al. An analysis of multi-objective evolutionary algorithms for training ensemble models based on different performance measures in software effort estimation
CN111340493A (en) Multi-dimensional distributed abnormal transaction behavior detection method
CN104281522B (en) Multiple target test data reduction method with defects detection is covered based on sentence
Kattan et al. Evolving radial basis function networks via gp for estimating fitness values using surrogate models
CN114969953A (en) Shield underpass tunnel optimization design method and device based on Catboost-NSGA-III
Yıldız VC-dimension of univariate decision trees
de Haan et al. Fixed-parameter tractable reductions to SAT
Cano et al. Approximate inference in Bayesian networks using binary probability trees
Basgalupp et al. Evolving decision trees with beam search-based initialization and lexicographic multi-objective evaluation
CN109409434A (en) The method of liver diseases data classification Rule Extraction based on random forest
Rezapoor Mirsaleh et al. A learning automata-based memetic algorithm
CN113095501A (en) Deep reinforcement learning-based unbalanced classification decision tree generation method
Rodriguez et al. Multi-objective information retrieval-based NSGA-II optimization for requirements traceability recovery
Křen et al. Automatic creation of machine learning workflows with strongly typed genetic programming
Saremi et al. Improving evolutionary decision tree induction with multi‐interval discretization
Sanchez-Diaz et al. A review of algorithms to computing irreducible testors applied to feature selection
Makkar et al. Optimization of software quality attributes using evolutionary algorithm
Bouchekir et al. Learning-based symbolic assume-guarantee reasoning for Markov decision process by using interval Markov process
CN114881158A (en) Defect value filling method and device based on random forest and computer equipment
Cano et al. Learning recursive probability trees from probabilistic potentials
Xiang et al. Compressing Bayesian networks: Swarm-based descent, efficiency, and posterior accuracy
Pagnozzi et al. Evaluating the impact of grammar complexity in automatic algorithm design

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant