ELTE logo ELTE Eötvös Loránd University
ANNALES Universitatis Scientiarum Budapestinensis de Rolando Eötvös Nominatae
Sectio Computatorica

Volumes » Volume 36 (2012)

https://doi.org/10.71352/ac.36.005

Towards axiom-based test generation in .NET applications

Mihály Biczó and Zoltán Porkoláb

Abstract. Unit testing is an important aspect of developing highly reliable and dependable applications. Although theoretically it offers the capability of testing a piece of code (typically a method) in isolation, the challenge of constructing a test set that appropriately tests the whole functionality remains open and is usually a task that programmers need to solve on an ad-hoc basis or using extreme approaches like test-driven development. This paper proposes a way how algebraic software specification can be applied to programs running on the .NET platform, how it can serve as the basis of automatic test generation and how it can replace ad-hoc testing throughout the software development process, especially during refactoring. The authors introduce the definition of a concept and an axiom, and also overview axiom-based testing in general. A mapping between the abstract definitions and the language constructs of the C# 4 programming language will be specified. Services provided by the .NET platform like attributes, reflection and call interception will be introduced and employed during implementation. It will be described how axioms differ from the contracts of the Eiffel programming language and why they are more suitable for generating test cases. The authors give the detailed description of the main components of the axiom-based test generation framework, which was implemented using .NET 4 /C# 4 and show a case study in order to demonstrate the feasibility of the solution.

Full text PDF
Journal cover