arrow
Return

Generating Test Cases for Programs that Are Coded against Interfaces and Annotations

delete2014-06-02
delete11
PRE
AI
M
Mainul Islam
C
Christoph Csallner *
DOI:10.1145/2544135delete
deleteOriginal
deleteOriginal request for help
deleteShare
deleteSave
Abstract

Abstract

En 中文
Automatic test case generation for software programs is very powerful but suffers from a key limitation. That is, most current test case generation techniques fail to cover testee code when covering that code requires additional pieces of code not yet part of the program under test. To address some of these cases, the Pex state-of-the-art test case generator can generate basic mock code. However, current test case generators cannot handle cases in which the code under test uses multiple interfaces, annotations, or reflection. To cover such code in an object-oriented setting, we describe a novel technique for generating test cases and mock classes. The technique consists of collecting constraints on interfaces, annotations, and reflection, combining them with program constraints collected during dynamic symbolic execution, encoding them in a constraint system, solving them with an off-the-shelf constraint solver, and mapping constraint solutions to test cases and custom mock classes. We demonstrate the value of this technique on open-source applications. Our approach covered such third-party code with generated mock classes, while competing approaches failed to cover the code and sometimes produced unintended side-effects such as filling the screen with dialog boxes and writing into the file system.
Keywords:
Algorithms
Reliability
Verification
Dynamic symbolic execution
mock classes
stubs
test case generation
AI Summary

AI Summary

Key information extracted from the uploaded paper, including a brief overview, abstract, background, key highlights, visual analysis, and future outlook.

Journal

A
ACM Transactions on Software Engineering and Methodology
IF:
6.2
Papers:
1.2K
Citations:
3.4K

Organization

U
university of texas system
Scholars:
18.5W
Papers: 15.6W
Citations: 210
Cited Papers

Cited Papers

err
IF0
err
err0
PREAI
err
errShare
errSave
DSD-Crasher: A hybrid analysis tool for bug finding
err2008-05-05
err80
PREAI
errCsallner, Christoph; Smaragdakis, Yannis; Xie, Tao
errShare
errSave
Calyceal Plication with Pyeloplasty in the Treatment of Giant Hydronephrosis in Children
err2006-06-01
err0
PREAI
errB. Župančić; L. Popović; D. Mikulić; Z. Vrtar; I. Fattorini; G. Augustin
errShare
errSave
errShare
errSave
ActS activates peptidoglycan amidases during outer membrane stress in Escherichia coli
err2021-03-23
err0
errOAAI
errCarlos K. Gurnani Serrano; Matthias Winkle; Alessandra M. Martorana; Jacob Biboy; Niccolo Morè; Patrick Moynihan; Manuel Banzhaf; Waldemar Vollmer; Alessandra Polissi
errShare
errSave
Erectile dysfunction due to ectopic penile vein
err1988-04-01
err0
errOAAI
errChristian G. Stief; Helmut Gall; Wolfgang Scherb; Wolfgang Bähren
errShare
errSave
errShare
errSave
researcher View more