Test FirstDespite the previous reference to "Test First" as an inhibitor, it is also an enabler. XP's prescription to create tests first substantiates the practice of involving testers as early as possible, provided that component interfaces and the tests for them are designed before code implementation. By design, we mean creating a reasonably representative set of component user stories from which to implement tests, in much the same way that the code is created to satisfy those same stories. Given the same set of user stories for a component whose interface is clearly defined, it is conceivable that testers could create tests for components before their development, or at least in parallel. Well-Factored CodeIf developers have followed good design principles, the interfaces to their components will be as simple as possible and easy to describe in terms of user stories. It follows that if the user stories are simple, the tests that reify them will be simple to implement. ToolsTools such as JUnit provide a framework for developers to create and execute unit tests [Beck+1999]. JUnit requires programming skills and thus is geared more for developers than testers, according to the definition of testers used here. To accommodate the tester skill set, we would require some mediating technology that makes it possible for testers to create unit tests, without the need to acquire deep programming skills, while still supporting the preference by developers to create tests in the language of the component under test. |