Title

Integrating Random Testing With Constraints For Improved Efficiency And Diversity

Abstract

Random testing can be fully automated, eliminates subjectiveness in constructing test data, and increases the diversity of test data. However, randomly generated tests may not satisfy program's assumptions such as method preconditions. While constraint solving can satisfy such assumptions, it does not necessarily generate diverse tests and is hard to apply to large programs. We blend these techniques by extending random testing with constraint solving, improving the efficiency of generating valid test data while preserving diversity. For domains such as objects, we generate input values randomly; however, for values of finite domains such as integers, we represent test data generation as a constraint satisfaction problem by solving constraints extracted from the precondition of the method under test. We also increase the diversity of constraint-based solutions by incorporating randomness into the solver's enumeration process. In our experimental evaluation we observed an average improvement of 80 times without decreasing test data diversity, measured in terms of the time needed to generate a given number of valid test cases.

Publication Date

12-1-2008

Publication Title

20th International Conference on Software Engineering and Knowledge Engineering, SEKE 2008

Number of Pages

861-866

Document Type

Article; Proceedings Paper

Personal Identifier

scopus

Socpus ID

84886878256 (Scopus)

Source API URL

https://api.elsevier.com/content/abstract/scopus_id/84886878256

This document is currently not available here.

Share

COinS