Capítulo de livro Revisado por pares

Specification-Driven Unit Test Generation for Java Generic Classes

2012; Springer Science+Business Media; Linguagem: Inglês

10.1007/978-3-642-30729-4_21

ISSN

1611-3349

Autores

Francisco Rebello de Andrade, João Pascoal Faria, Antónia Lopes, Ana C. R. Paiva,

Tópico(s)

Formal Methods in Verification

Resumo

Several approaches exist to automatically derive test cases that check the conformance of the implementation of abstract data types (ADTs) with respect to their specification. However, they lack support for the testing of implementations of ADTs defined by generic classes. In this paper, we present a novel technique to automatically derive, from specifications, unit test cases for Java generic classes that, in addition to the usual testing data, encompass implementations for the type parameters. The proposed technique relies on the use of Alloy Analyzer to find model instances for each test goal. JUnit test cases and Java implementations of the parameters are extracted from these model instances.

Referência(s)