Reusing and Composing Tests with Traits

Single inheritance often forces developers to duplicate code and logic. This widely recognized situation affects both business code and tests. In a large and complex application whose classes implement many groups of methods (protocols), duplication may also follow the application’s idiosyncrasies, making it difficult to specify, maintain, and reuse tests. The research questions we faced are (i) how can we reuse test specifications across and within complex inheritance hierarchies, especially in presence of orthogonal protocols; (ii) how can we test interface behavior in a modular way; (iii) how far can we reuse and parametrize composable tests.

[1]  Rokia Missaoui,et al.  Design of Class Hierarchies Based on Concept (Galois) Lattices , 1998, Theory Pract. Object Syst..

[2]  Gerard Meszaros,et al.  xUnit Test Patterns: Refactoring Test Code , 2007 .

[3]  John Maloney,et al.  Back to the Future The Story of Squeak, A Practical Smalltalk Written in Itself , 1997 .

[4]  Dave Thomas ECOOP 2006 - Object-Oriented Programming, 20th European Conference, Nantes, France, July 3-7, 2006, Proceedings , 2006, ECOOP.

[5]  Kent Beck,et al.  Kent Beck's Guide to Better Smalltalk: SIMPLE SMALLTALK TESTING , 1997 .

[6]  Matthias Felleisen,et al.  Scheme with Classes, Mixins, and Traits , 2006, APLAS.

[7]  A. Black,et al.  Applying Traits to the Smalltalk Collection Hierarchy Submitted to ECOOP 2003 ? , 2002 .

[8]  Nathanael Schärli,et al.  Applying traits to the smalltalk collection classes , 2002, OOPSLA '03.

[9]  Stéphane Ducasse,et al.  Object-oriented legacy system trace-based logic testing , 2006, Conference on Software Maintenance and Reengineering (CSMR'06).

[10]  Stéphane Ducasse,et al.  Traits at work: The design of a new trait-based stream library , 2009, Comput. Lang. Syst. Struct..

[11]  Wilf R. LaLonde,et al.  Smalltalk: subclassing subtyping is-a , 1991 .

[12]  William R. Cook,et al.  Interfaces and specifications for the Smalltalk-80 collection classes , 1992, OOPSLA.

[13]  Nathanael Schärli,et al.  Traits: tools and methodology , 2004, Proceedings. 26th International Conference on Software Engineering.

[14]  Theo D'Hondt,et al.  Ambient-Oriented Programming in AmbientTalk , 2006, ECOOP.

[15]  C. H. Flood,et al.  The Fortress Language Specification , 2007 .