2012 | OriginalPaper | Buchkapitel
Boosting Search Based Testing by Using Constraint Based Testing
verfasst von : Abdelilah Sakti, Yann-Gaël Guéhéneuc, Gilles Pesant
Erschienen in: Search Based Software Engineering
Verlag: Springer Berlin Heidelberg
Aktivieren Sie unsere intelligente Suche, um passende Fachinhalte oder Patente zu finden.
Wählen Sie Textabschnitte aus um mit Künstlicher Intelligenz passenden Patente zu finden. powered by
Markieren Sie Textabschnitte, um KI-gestützt weitere passende Inhalte zu finden. powered by
Search-Based Testing (SBT) uses an evolutionary algorithm to generate test cases. Traditionally, a random selection is used to generate an initial population and also, less often, during the evolution process. Such selection is likely to achieve lower coverage than a guided selection. We define two novel concepts: (1) a constrained population generator (CPG) that generates a diversified initial population that satisfies some test target constraints; and (2) a constrained evolution operator (CEO) that evolves test candidates according to some constraints of the test target. Either the CPG or CEO may substantially increase the chance of reaching adequate coverage with less effort. In this paper, we propose an approach that models a relaxed version of the unit under test as a constraint satisfaction problem. Based on this model and the test target, a CPG generates an initial population. Then, an evolutionary algorithm uses a CEO and this population to generate test input leading to the test target being covered. Our approach combines constraint-based testing (CBT) and SBT and overcomes the limitations associated with each of them. Using eToc, an open-source SBT tool, we implement a prototype of this approach. We present the empirical results of applying both CPG or CEO on three open-source programs and show that CPG or CEO improve SBT performance in terms of branch coverage by 11% while reducing computation time.