12
Automatic Test Data Generation Using Constraint Solving Techniques Arnaud Gotlieb Bernard Botella Michel Rueher

Automatic Test Data Generation Using Constraint Solving Techniques

  • Upload
    valin

  • View
    43

  • Download
    1

Embed Size (px)

DESCRIPTION

Automatic Test Data Generation Using Constraint Solving Techniques. Arnaud Gotlieb Bernard Botella Michel Rueher. Problem and Contribution. Problem Automatic Test Data Generation Leads to identify input values on which a selected point on a procedure is executed Main Contribution - PowerPoint PPT Presentation

Citation preview

Page 1: Automatic Test Data Generation Using Constraint Solving Techniques

Automatic Test Data Generation Using Constraint Solving Techniques

Arnaud GotliebBernard Botella

Michel Rueher

Page 2: Automatic Test Data Generation Using Constraint Solving Techniques

Problem and Contribution

Problem Automatic Test Data Generation

Leads to identify input values on which a selected point on a procedure is executed

Main Contribution A new method based on constraint

solving techniques for automatic test data generation

Page 3: Automatic Test Data Generation Using Constraint Solving Techniques

Key Points

Take advantage of constraint techniques when solving the constraint system

Global constraints used on preliminary steps to detect some non feasible paths

Partial consistency techniques help to reduce the domains of possible values of the test data

Page 4: Automatic Test Data Generation Using Constraint Solving Techniques

Proposed Method A procedure is statically transformed

into a constraint system by the use of Static Single Assignment (SSA) form and control dependencies. Result: Set of constraints (Kset)

Constraints generated for the entire procedure Constraints specific to the selected point

Kset is solved to check whether there exists at least one feasible path which goes through the selected point.

Test data corresponding to one of these paths are generated. Identify test data by using search

methods based on enumeration and inference processes.

Page 5: Automatic Test Data Generation Using Constraint Solving Techniques

Generation of Kset

Generation of the SSA form Generation of a set of constraints

corresponding to the procedure p (pKset(p))

Generation of a set of constraints corresponding to the control dependencies of a selected point n (cKset(n))

Kset(p, n) = pKset(p) cKset(n)

Page 6: Automatic Test Data Generation Using Constraint Solving Techniques

Control Flow Graphs

path < 1, 2, 4, 5, 6 > is non-feasible.block 5 is control dependenton block 4

Page 7: Automatic Test Data Generation Using Constraint Solving Techniques

SSA Form SSA form is a semantically equivalent

version of a procedure on which every variable has a unique definition and every use of a variable is reached by this definition.

SSA form(linear sequence of code) = renaming of the variables. (i i0, i i1, …)

SSA form(control structures) = special assignments called -functions, in the junction nodes of the CFG. A -function returns one of its arguments

depending on the control flow.

Page 8: Automatic Test Data Generation Using Constraint Solving Techniques

Example

SSA form

Page 9: Automatic Test Data Generation Using Constraint Solving Techniques

Generation of pKset pKset(p) is a set of both atomic and global

constraints associated with a procedure p. Atomic constraint is a relation between

logical variables. Global constraints are designed to handle

more efficiently set of atomic constraints. Example of global constraint:

ELEMENT/3 2 : ELEMENT(k, L, v) constraints the kth argument of the list L to be equal to v.

Generation of pKset is driven by the syntax. Different generation techniques for

declaration, assignment and decision, conditional statement, loop statement, array and record,

Page 10: Automatic Test Data Generation Using Constraint Solving Techniques

Generation of cKset

cKset(n) is the set of constraints of the statements and the branches on which n is control-dependent.

For example, node 5 is control-dependant on node 4: cKset(5) = {j2 = 2}

Page 11: Automatic Test Data Generation Using Constraint Solving Techniques

Example (Sets generated)

Page 12: Automatic Test Data Generation Using Constraint Solving Techniques

Solving the Constraint System