To Data Independence & Beyond! When coaching TDD (test driven development) a common pattern emerges. Once the idea of unit testing is understood the coachee starts to realise that there are certain lines of code that are seemingly impossible to test. For example calls to a legacy system. It is at this point the coach can safely introduce mock objects. Soon after the coachee starts to realise that more test cases should be thrown at the system under test… At this point lines between a unit test and functional test can begin to blur & the coach can introduce the concept of a data independent test. This tutorial demonstrates a number of refactorings that can be used to prepare a system for easier, and better, testing. The refactorings discussed also allow test assets to be more fully leveraged. The objectives of this tutorial are to disseminate knowledge, and generate discussion, about how developers can best test their own code. Additionally, this tutorial will provide clear guidelines on what testing responsibilities lie with the developers and what lies with a customer or tester. In the author’s experience most developers stop at the unit level; but on an agile project, with customer involvement, this is not enough. This tutorial will give the tools necessary for developers to, with the minimum effort, ‘upgrade’ their unit tests to more customer friendly Fit tests. Audience: Participants should understand Java, or another high level programming language. Typical audience members may include those interested in: automated testing; leveraging their current JUnit effort (by refactoring them to data independent tests); mock objects; coaching testing; Fit & Fitness; and how to create a real-world, preventative, quality assurance strategy. Benefits: Get an introduction to automated, declarative testing with Fit and FitNesse. Receive a blueprint to follow in order to create proper unit and functional tests. Receive an introduction to a number of very handy open source tools. Presentation Outline: An introduction into testing and data independent vs. data dependent tests will be given. Mock ob- jects will be discussed as well. This will be followed by a group discussion on the merits & demerits of test automation. A number of refactorings will be presented. This will involve stepping through a real code problem, we will transform a bog standard test into one that uses mocks appropriately and uses Fit to de- couple test data. This section will also include quick introductions to the technology used, Fitness, JUnit, and EasyMock. Finally, I will present how I successfully used this technique on large projects as part of a QA strategy for large clients here in the Netherlands. History: This tutorial has been used informally, in the form of coaching, on many of my developers during different projects. Formally, it has been tried out numerous times to Accenture developers and our customers.
Download de presentatie (95 Kb)
|
|
James Dobson Accenture Technology Solutions James Dobson works as a technical team lead, agile evangelist, and coach for Accenture Technology
Solutions (ATS) in Amsterdam, the Netherlands. As well as leading software projects James
contributes heavily to ATS’s technological vision.
James has taught and practiced Agile Software Development for more than 6 years. His own hybrid
methodology, Conservative Extreme Programming, has successfully been used to deliver code in
the most hostile environments. He has being programming in Java since 1996 and has had the
privilege to write, among things: web applications; desktop applications; integration applications;
compilers; web-servers; graphics libraries; Swing libraries; and, most recently, applications using the
Spring framework, Java’s Portlet Specification, and Web-Services.
James holds a BSc in Computer Science from Hull University and an MSc in High Performance
Computing from Edinburgh University.
|
|