ABSTRACT
A test class is an isolated piece of software that is responsible for verifying the expected behavior of a class, a component or an application. Because test classes can be developed without consideration of good design, sometimes individual test classes might include redundant code or become large and unwieldy. This paper presents two patterns that propose the introduction of a common superclass for test classes in order to reduce code bulk, reuse more test code and achieve a better test organization.
- Alexander, C., Ishikawa, S., Silverstein, M. (1977) "A Pattern language: towns, buildings, construction", Oxford, Oxford University Press.Google Scholar
- Azevedo, R. (2011) "Um Modelo para Ferramentas de Automação de Refatoração de Código de Teste", Monografia de Especialização em Engenharia de Software, Instituto Tecnológico de Aeronáutica.Google Scholar
- Esfinge Framework (2012) "Esfinge Framework", http://esfinge.sf.net, May.Google Scholar
- Functor (2012) "Apache Commons Functor", http://commons.apache.org/functor/, May.Google Scholar
- Gamma, E. et al. (1994) "Design patterns: elements of reusable object-oriented software", Addison-Wesley. Google ScholarDigital Library
- Guerra, E. (2011) "Práticas para Lidar com Arquitetura em Ambientes Ágeis", Revista MundoJ, Edição 50, Editora Mundo.Google Scholar
- Jenkins CI (2012) "Jenkins CI", http://www.jenkins-ci.org, May.Google Scholar
- Meszaros, G. (2007) "XUnit test patterns: refactoring test code", Person Education, Inc. Google ScholarDigital Library
- TestLink Java API (2012) "TestLink Java API", http://testlinkjavaapi.sourceforge.net/. May.Google Scholar
- Wadler, Phil (1998) "The Expression Problem", http://www.daimi.au.dk/~madst/tool/papers/expression.txt. July.Google Scholar
Index Terms
- Patterns for introducing a superclass for test classes
Recommendations
Evaluating test suite characteristics, cost, and effectiveness of FSM-based testing methods
Context: Testing from finite state machines has been investigated due to its well-founded and sound theory as well as its practical application. There has been a recurrent interest in developing methods capable of generating test suites that detect all ...
Regression test selection for testable classes
EDCC'05: Proceedings of the 5th European conference on Dependable ComputingA reusable class must be tested many times: each time modifications are applied to it or its base classes; when a subclass is created, in which case the inherited and redefined features must be retested in the new context. Therefore, a class should be ...
Model-driven test-case construction
ESEC-FSE '07: Proceedings of the the 6th joint meeting of the European software engineering conference and the ACM SIGSOFT symposium on The foundations of software engineeringAutomatic system tests are frequently coupled to implementation details of the system under test. Such a tight coupling is problematic for a number of reasons: It prevents reuse of existing tests for multiple versions or variants of a system or for a ...
Comments