Assertion-Driven Development: Assessing the Quality of Contracts using Meta-Mutations

Publikation: Beitrag zu KonferenzenPaperBeigetragenBegutachtung

Beitragende

Abstract

Agile development methods have gained momentum in
the last few years and, as a consequence, test-driven development
has become more prevalent in practice. However, test cases are
not sufficient for producing dependable software and we rather
advocate approaches that emphasize the use of assertions or
contracts over that of test cases. Yet, writing self-checks in code
has been shown to be difficult and is itself prone to errors. A
standard technique to specify runtime properties is design-by-
contract (DbC). But how can one test if the contracts themselves
are sensible and sufficient? We propose a measure to quantify
the goodness of contracts (or assertions in a broader sense). We
introduce meta-mutations at the source code level to simulate
common programmer errors that the self-checks are supposed
to detect. We then use random mutation testing to determine
a lower and upper bound on the detectable mutations and
compare these bounds with the number of mutants detected by
the contracts. Contracts are considered “good” if they detect a
certain percentage of the detectable mutations. We have evaluated
our tools on Java classes with contracts specified using the
Java Modeling Language (JML). We have additionally tested the
contract quality of 19 implementations, written independently by
students, based on the same specification.

Details

OriginalspracheEnglisch
Seiten182-191
Seitenumfang10
PublikationsstatusVeröffentlicht - 2009
Peer-Review-StatusJa

Konferenz

Titel ICSTW '09: IEEE International Conference on Software Testing, Verification, and Validation Workshops, IEEE Computer Society, 2009
Kurztitel ICSTW '09
Veranstaltungsnummer
Dauer1 April 2009
BekanntheitsgradInternationale Veranstaltung
Ort
StadtDenver
LandUSA/Vereinigte Staaten

Externe IDs

Scopus 69949086632

Schlagworte

Forschungsprofillinien der TU Dresden

DFG-Fachsystematik nach Fachkollegium

Schlagwörter

  • Design-by-contract, self-checks, mutation testing