Systems and Means of Informatics
2014, Volume 24, Issue 2, pp 99-113
SOURCE CODE AND PARTIAL SPECIFICATIONS ANALYSIS FOR AUTOMATED GENERATION OF UNIT TESTS
- A. Andrianova
- V. Itsykson
Abstract
Low level of software quality is one of the main problems of software
engineering. Automated testing is one of the most effective strategies used to
improve the quality of the software. This paper describes a technique of automated
unit tests creation combining both functional and structural approaches of
software testing. In thismethod, information extracted fromthe original program
is used to ensure test coverage of program paths. Partial specifications given in
the form of contracts are used to form test oracles and to distribute parameters of
tests on definition domain. The developed approach was implemented as a tool
that analyzes Java programs and generates test cases for class methods in JUnit
format, using CoFoJa to specify the contracts. Designed tool testing on a number
of test cases showed efficiency of the approach.
[+] References (14)
- Contracts for Java. Available at: https://code.google.com/p/cofoja/ (accessed
March 18, 2014).
- Meyer, B. 1991.Design by contract. Advances in object-oriented software engineering.
Eds. D.Mandrioli and B.Meyer.Upper Saddle River, NJ, USA: Prentice Hall. 1-50.
- Z3: An efficient SMT solver.Available at: http://z3.codeplex.com (accessed March 18,
2014).
- Meyer, B., I. Ciupa, A. Leitner, A. Fiva, W. Yi, and E. Stapf. 2009. Programs that
test themselves. IEEE Comp. 42(9):46-55.
- Tillmann, N., and J. Halleux. 2008. Pex:White box test generation for .Net. TAP'08:
2nd Conference (International) on Tests and Proofs Proceedings. Berlin, Heidelberg:
Springer-Verlag. 134-153.
- Pex and Moles | isolation and white box unit testing for .NET. Available at:
http://research.microsoft.com/en-us/projects/pex/ (accessed March 18, 2014).
- Unit testing with Microsoft Moles. Tutorial for lightweight test stubs and
detours for .NET applications. Available at: http://research.microsoft.com/enus/
projects/pex/molestutorial.pdf (accessed March 18, 2014).
- Engel, C., and R. H.ahnle. 2007. Generating unit tests from formal proofs. Tests and
proofs. Eds. Yu. Gurevich and B.Meyer. Berlin-Heidelberg: Springer-Verlag. Lecture
notes in computer science ser. 4454:169-188.
- Deng, X., J. Lee, and Robby. 2006. Bogor/Kiasan: A k-bounded symbolic execution
for checking strong heap properties of open systems. 21st IEEE/ACM Conference
(International) on Automated Software Engineering (ASE'06) Proceedings. IEEE
Computer Society,Washington, DC, USA. 157-166.
- Deng, X., Robby, and J. Hatclif. 2007. Kiasan KUnit: Automatic test case genera-
tion and analysis feedback for open object-oriented systems. Testing: Academic and
Industrial Conference Practice and Research Techniques (TAICPART) Proceedings.
Washington, DC, USA: IEEE Computer Society. 3-12.
- Tillmann, N., and W. Schulte. 2005. Parameterized unit tests with unit meister.
ESEC/SIGSOFT FSE. ACM. 241-244.
- Xie, T., D. Marinov, W. Schulte, and D. Notkin. 2005. Symstra: A framework for
generating object-oriented unit tests using symbolic execution. Tools and algorithms for
the construction and analysis of systems. Eds. N. Halbwachs and L.D. Zuck. Lecture
notes in computer science ser. Berlin-Heidelberg: Springer-Verlag. 3440:365-381.
- Robschink, T., and G. Snelting. 2002. Efficient path conditions in dependence graphs.
ICSE'02: 24th Conference (International) on Software Engineering Proceedings. New
York, NY, USA: ACM Press. 478-488.
- Henkel, J., and A. Diwan. 2003. Discovering algebraic specifications from Java
classes. ECOOP 2003: Object-oriented programming. Ed. L. Cardelli. Lecture notes
in computer science ser. Darmstadt, Germany. 2743:431-456.
[+] About this article
Title
SOURCE CODE AND PARTIAL SPECIFICATIONS ANALYSIS FOR AUTOMATED GENERATION OF UNIT TESTS
Journal
Systems and Means of Informatics
Volume 24, Issue 2, pp 99-113
Cover Date
2013-11-30
DOI
10.14357/08696527140207
Print ISSN
0869-6527
Publisher
Institute of Informatics Problems, Russian Academy of Sciences
Additional Links
Key words
automated software testing; unit test generating; contract-based
programming; code analysis; SMT-solver
Authors
A. Andrianova and V. Itsykson
Author Affiliations
St. Petersburg State Polytechnical University, 29 Polytechnicheskaya Str., St. Petersburg 195251, Russian Federation
|