|
ABSTRACT
The popularity of object-oriented programming has led to the wide use of container libraries. It is important for the reliability of these containers that they are tested adequately. We describe techniques for automated test input generation of Java container classes. Test inputs are sequences of method calls from the container interface. The techniques rely on state matching to avoid generation of redundant tests. Exhaustive techniques use model checking with explicit or symbolic execution to explore all the possible test sequences up to predefined input sizes. Lossy techniques rely on abstraction mappings to compute and store abstract versions of the concrete states; they explore underapproximations of all the possible test sequences.We have implemented the techniques on top of the Java PathFinder model checker and we evaluate them using four Java container classes. We compare state matching based techniques and random selection for generating test inputs, in terms of testing coverage. We consider basic block coverage and a form of predicate coverage - that measures whether all combinations of a predetermined set of predicates are covered at each basic block. The exhaustive techniques can easily obtain basic block coverage, but cannot obtain good predicate coverage before running out of memory. On the other hand, abstract matching turns out to be a powerful approach for generating test inputs to obtain high predicate coverage. Random selection performed well except on the examples that contained complex input spaces, where the lossy abstraction techniques performed better.
REFERENCES
Note: OCR errors may be found in this Reference List extracted from the full text article. ACM has opted to expose the complete List rather than only correct and linked references.
| |
1
|
|
| |
2
|
S. Anand, C. S. Pǎsǎreanu, and W. Visser. Symbolic execution with abstract subsumption checking. In Proc. 13th International SPIN Workshop, 2006.
|
| |
3
|
T. Ball. A theory of predicate-complete test coverage and generation, 2004. Microsoft Research Technical Report MSR-TR-2004--28.
|
| |
4
|
T. Ball, D. Hoffman, F. Ruskey, R. Webber, and L. J. White. State generation and automated class testing. Softw. Test., Verif. Reliab., 10(3):149--170, 2000.
|
 |
5
|
André Baresel , David Binkley , Mark Harman , Bogdan Korel, Evolutionary testing in the presence of loop-assigned flags: a testability transformation approach, Proceedings of the 2004 ACM SIGSOFT international symposium on Software testing and analysis, July 11-14, 2004, Boston, Massachusetts, USA
|
| |
6
|
|
 |
7
|
|
 |
8
|
James C. Corbett , Matthew B. Dwyer , John Hatcliff , Shawn Laubach , Corina S. Păsăreanu , Robby , Hongjun Zheng, Bandera: extracting finite-state models from Java source code, Proceedings of the 22nd international conference on Software engineering, p.439-448, June 04-11, 2000, Limerick, Ireland
[doi> 10.1145/337180.337234]
|
 |
9
|
|
 |
10
|
|
 |
11
|
|
 |
12
|
|
| |
13
|
A. Groce and W. Visser. Heuristics for model checking Java programs. STTT Journal, 6(4), December 2004.
|
| |
14
|
|
| |
15
|
M. P. E. Heimdahl, S. Rayadurgam, W. Visser, D. George, and J. Gao. Auto-generating test sequences using model checkers: A case study. In Proc. 3rd International Workshop on Formal Approaches to Testing of Software (FATES), Montreal, Canada, Oct. 2003.
|
| |
16
|
G. J. Holzmann and R. Joshi. Model-driven software verification. In Proc. 11th International SPIN Workshop, 2004.
|
| |
17
|
|
| |
18
|
|
| |
19
|
Java PathFinder. http://javapathfinder.sourceforge.net.
|
| |
20
|
JTest. http://www.parasoft.com/jsp/home.jsp.
|
| |
21
|
S. Khurshid, C. S. Pǎsǎreanu, and W. Visser. Generalized symbolic execution for model checking and testing. In Proc. 9th International Conference on Tools and Algorithms for the Construction and Analysis of Systems (TACAS), 2003.
|
 |
22
|
|
| |
23
|
|
| |
24
|
C. S. Pǎsǎreanu, R. Pelanek, and W. Visser. Concrete model checking with abstract matching. In Proc. 17th International Conference on Computer Aided Verification (CAV), 2005.
|
 |
25
|
|
 |
26
|
|
 |
27
|
|
| |
28
|
|
 |
29
|
|
 |
30
|
|
| |
31
|
|
| |
32
|
|
| |
33
|
T. Xie, D. Marinov, W. Schulte, and D. Notkin. Symstra: A framework for generating object-oriented unit tests using symbolic execution. In Proc. 11th International Conference on Tools and Algorithms for Construction and Analysis of Systems (TACAS), 2005.
|
CITED BY 18
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Corina S. Pǎsǎreanu , Peter C. Mehlitz , David H. Bushnell , Karen Gundy-Burlet , Michael Lowry , Suzette Person , Mark Pape, Combining unit-level symbolic execution and system-level concrete execution for testing nasa software, Proceedings of the 2008 international symposium on Software testing and analysis, July 20-24, 2008, Seattle, WA, USA
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|