Constraint-based Test Generation for Pointer-based Data Structures
نویسندگان
چکیده
In this paper, we propose an approach for automated test case generation based on techniques from Constraint Programming. We show how an imperative language can be extended with constraint variables and its operational semantics with constraints. By running a program in this extended language, we obtain constraints on the initial environment and heap. Solving these constrains, we obtain concrete test cases for the program. Our technique can handle primitive data such as integers, as well as arbitrary pointer-based data structures allocated on the heap. Standard CP search strategies can be used to express preferences on the generated test cases and to obtain the desired degree of coverage.
منابع مشابه
Generating input data structures for automated program testing
Automatic test data generation usually concerns identifying input values that cause a selected path to execute. If a given path involves pointers, then input values may be represented in terms of 2-dimensional dynamic data structures such as lists or trees. When testing is conducted for programs in the presence of pointers, it is very important to identify a shape of the input data structure de...
متن کاملThe Dynamic Domain Reduction Procedure for Test Data Generation: Design and Algorithms
Although there are many techniques and tools available to support the software testing process, one of the most crucial parts of testing, generating the test data, is usually done by hand. Test data generation is one of the most technically challenging steps in testing software, but unfortunately, most practical systems do not incorporate any automation in this step. This paper presents a new m...
متن کاملThe Dynamic Domain Reduction Procedure for Test
Although there are many techniques and tools available to support the software testing process, one of the most crucial parts of testing, generating the test data, is usually done by hand. Test data generation is one of the most technically challenging steps in testing software, but unfortunately, most practical systems do not incorporate any automation in this step. This paper presents a new m...
متن کاملCTGEN - a Unit Test Generator for C
We present a new unit test generator for C code, CTGEN. It generates test data for C1 structural coverage and functional coverage based on pre-/post-condition specifications or internal assertions. The generator supports automated stub generation, and data to be returned by the stub to the unit under test (UUT) may be specified by means of constraints. The typical application field for CTGEN is...
متن کاملAUSTIN: An open source tool for search based software testing of C programs
Context: Despite the large number of publications on Search–Based Software Testing (SBST), there remain few publicly available tools. This paper introduces AUSTIN, a publicly available open source SBST tool for the C language. The paper is an extension of previous work [1]. It includes a new hill climb algorithm implemented in AUSTIN and an investigation into the effectiveness and efficiency of...
متن کاملذخیره در منابع من
با ذخیره ی این منبع در منابع من، دسترسی به آن را برای استفاده های بعدی آسان تر کنید
عنوان ژورنال:
دوره شماره
صفحات -
تاریخ انتشار 2009