vBulletin FAQ
The website where you learn about vBulletin Forums
Home   Download vBulletin   vBulletin FAQ Forums vBulletin Related Sites Contact Us
Welcome to vBulletin FAQ

vBulletin FAQ Navigation

Getting Started

Customizing your vBulletin

Search Engines & SEO

Making Money with a Forum

Promoting your Community

Get your own vBulletin Today


Webmaster Help


xUnit Test Patterns: Refactoring Test Code (Addison-Wesley Signature Series)





vBulletin Book Store > vBulletin books beginning with X

More details of book titled: xUnit Test Patterns: Refactoring Test Code (Addison-Wesley Signature Series)

xUnit Test Patterns: Refactoring Test Code (Addison-Wesley Signature Series)

Author: Gerard Meszaros
Published: 2007-05-31
List price: $54.99
Our price: $43.99
Usually ships in 24 hours
As of: December 02nd, 2008 09:32:46 PM
Customer comments on this selection.

vBulletin Inspired to Test
I've been familiar with agile concepts of automated unit testing (AUT) and test-driven development (TDD) for awhile now. In the past few years I've made several attempts at incorporating AUT and TDD into my own personal workflow, but each attempt soon resulted in my abandoning the whole idea. The testing effort quickly outweighed the benefits. I've believed in the ideal of TDD, but I didn't see quite how to pull it off. br / br /Then I bought XUnit Test Patterns by Gerard Meszaros. Wow! Finally the issues I've struggled with are being addressed. Okay, I must admit I'm not very plugged in to the online software development community, and I'm sure these issues have been discussed before. But this book looks special. I sense it's giving voice to these issues in a big way that's introducing many developers to these ideas for the first time. After all, it had to take time for this kind of book to be written. Time for the patterns to be developed through hard and frustrating work. br / br /Rarely have I bought a thick book on software development and eagerly read every single word from cover to cover. But I have with this book. And I know I'll soon do it again. I'm even tempted to also purchase the PDF version of the book, just so I can reference it wherever I happen to be. br / br /It's not the final word on AUT, but it has me embracing the ideal of TDD once more. The company I work for develops a huge OO-based enterprise software system with no automated tests. As Meszaros explains, this kind of legacy system is the most difficult for incorporating AUT (and daunting for those new to AUT). But at least now I feel like we have a good chance.

vBulletin All the important unit testing patterns and principles, but over-long
Let me start by stating the obvious: this is a patterns book about the organisation of tests and the workings of the xUnit family of unit testing frameworks. It is _not_ a book about Test Driven Development, although there is material that is pertinent to that. Given that the use of JUnit and TDD is pretty intertwined in the minds of many Java developers, it's worth making this distinction, so you know what sort of book you're getting. Speaking of JUnit, most of the code examples uses Java, although there are some examples in C#, VB and Ruby. br / br /Like Martin Fowler's Patterns of Enterprise Application Architecture, the book is split into two main sections, a narrative that weaves together a lot of the patterns and strategies, and then a catalogue of individual patterns. Between the two, there is a catalogue of 'test smells', similar to the 'code smells' discussed by Fowler in Refactoring, which I would suggest can be read profitably with the narrative section, rather than used as reference material. br / br /There are a lot of patterns here on the mechanics of xUnit, such as 'Test Runner', 'Garbage-Collected Teardown' and 'Named Test Suite'. I was a bit confused about who this material is aimed at -- maybe someone looking at porting xUnit to a new programming language would find it useful, but a lot of it is fairly obvious to anyone who's used an xUnit in a non-trivial fashion (and certainly, if you haven't done so, this book is not a format that makes for a good introduction), or requires playing against xUnit's strengths (e.g. not putting setup and teardown code in their eponymous methods), although there is good reason for doing so in some of the examples provided, such as databases. br / br /Beyond this, there is some good stuff on design-for-testability patterns (e.g. dependency injection versus dependency lookup), value patterns to replace magic constants, custom assertions and custom creation and other utility methods to make the intent of tests more clear. This material, along with the test smells chapter, is where the real value of the book lies. It encourages the application of the same software engineering principles you would apply to your applications (encapsulation, intent-revealing names, Don't Repeat Yourself) as you would to your testing code, something that's surprisingly easy to overlook, at least in my experience. br / br /Also, the material on 'Test Doubles' (mocks, stubs, dummies and their ilk) is extremely useful. It touches on designing with mocks only superficially, but it does provide a helpful taxonomy of what different classes of doubles do. Now, if only everyone would standardise on this nomenclature, it would make life a lot easier. I suggest we brandish this enormous book threateningly at anyone who refuses to toe the line, and that should do the trick. br / br /Because, boy, this book is big (about 900 pages). To be honest, it's too big. I rarely complain about getting too much book for my money, but the likes of GoF, PoEAA and PoSA 1 manage to come in between 400-500ish pages, so there's no reason XTP couldn't. The advantage is that the patterns in the catalogue, which take up most of the space, stand alone, without requiring too much flicking backwards and forwards between patterns. br / br /The disadvantage is that there is a lot of repetition, so unlike the three design patterns books I mentioned above, which I suspect most people read cover to cover (or maybe that was just me and I'm a complete freak), I would suggest only dipping into the catalogue as necessary. For instance, how much difference is there between the 'Testcase Class per Class', 'Testcase Class per Feature' and the 'Testcase Class per Fixture' patterns? Not a lot, as you might expect. br / br /I definitely liked this book. I would have liked it even more if it came in at about half its size and I would have preferred more emphasis on test and assertion organisation than the mechanics of the xUnit framework, but maybe that would have been a different type of book to the one Gerard Meszaros intended. This is nonetheless a must buy for anyone who cares about unit testing.

vBulletin Thorough and wide
Fine ideas in the area of managing the test code part of test driven development br /Aimed at developers, testers may find some ideas that fit in their ballpark too.

vBulletin A must-have for xUnit practitioners...
By now, the concept of "patterns" in program design is pretty well accepted. And the concept of test-driven development has a solid foundation also. But are there certain "patterns" to building and running those tests? The answer is yes, and the book that covers it is xUnit Test Patterns: Refactoring Test Code by Gerard Meszaros. If you use any of the xUnit software in your development efforts, you need to have this book... br / br /Contents: br /Part 1 - The Narratives: A Brief Tour; Test Smells; Goals of Test Automation; Philosophy of Test Automation; Principles of Test Automation; Test Automation Strategy; xUnit Basics; Transient Fixture Management; Persistent Fixture Management; Result Verification; Using Test Doubles; Organizing Our Tests; Testing with Databases; A Roadmap to Effective Test Automation br /Part 2 - The Test Smells: Code Smells; Behavior Smells; Project Smells br /Part 3 - The Patterns: Test Strategy Patterns; xUnit Basics Patterns; Fixture Setup Patterns; Result Verification Patterns; Fixture Teardown Patterns; Test Double Patterns; Test Organization Patterns; Database Patterns; Design-for-Testability Patterns; Value Patterns br /Part 4 - Appendixes: Test Refactorings; xUnit Terminology; xUnit Family Members; Tools; Goals and Principles; Smells, Aliases, and Causes; Patterns, Aliases, and Variations br /Glossary; References; Index br / br /Most of the books that cover xUnit software do so from the perspective of a technical manual. Everything is geared to writing the actual code for the test. Meszaros takes a different tack. He covers more of the "why" behind test writing in xUnit, as well as the basic patterns and principles you should be aware of when you're putting together your tests. People new to xUnit will throw together tests without much thought as to the structure and robustness of that script. Meszaros maintains that much of the same care that goes into writing and designing programs should also go into the test scripts. Patterns such as In-line Setup, Chained Tests, State Verification, and many others can adjust your whole mindset towards what makes a solid and maintainable test script that will serve you well both now and down the road when you have to make changes to the program (and add more scripts to your test suite). The book is set up such that you can scan for basic ideas, and then go back to specific patterns for more information as the situations and needs arise. With the use of both actual code and UML diagrams, it's very easy to catch the gist of each pattern, as well as seeing how it would actually be implemented. Very good stuff here... br / br /If you practice test-driven development (and you should), you have no doubt worked with your particular xUnit variant. This book is the next step in your learning, and it will make you a much better developer and tester... br /

vBulletin Seminal Work in Test-Driven Development
We went over 2,000 unit tests this past week during Iteration 72 on our Agile project. Of course, over the course of the last 18-24 months we have removed some tests, and in many cases, refactored the existing tests many times. We also have been learning a whole lot about TDD and the actual domain that we are building and testing. As we were doing this, we were implicitly discovering Test Smells, and discovering test automation patterns. The value in establishing patterns, and more precisely a pattern language in a particular domain are substantial. It's not so much that the "collector" of patterns is defining something new (some often mistakenly criticize pattern books in that regard) that you didn't know, but defining a shared terminology of our practices that we keep doing over and over. To that end, the patterns themselves not only define a shared vocabulary but serve other functions, not the least of which is learning from others. An obvious example of this is Martin's PEAA collection of patterns that enables us to say things like PageController or Lazy Load or TableDataGateway and we all know what it means. In fact, when I am talking about Interaction versus State/Behavior type of testing on CB, and others here use much of this terminology, I am in fact, talking about patterns like TestDoubles and MockObjects, among others. br / br /When I became aware that Gerard Meszaros ' xUnit Test Patterns book was going to ship Friday, I ordered it for overnight delivery on Saturday. I read well over 200 pages yesterday pretty much at one sitting, contented with a book that will change the face of the software industry, just as JUnit and all the other xUnit family have fundamentally altered software development for the better. Its definitely a big book at 944 pages, but it's not a book of excess, unnecessary pages. Rather it shows how hard it is to write defect-free software and the depth of the work that people are putting into this endeavor. The book uses Java as the language which obviously is no hardship to the C# programmer. Like most of the sound practices that have been evolving in the last ten years, this work has been evolving out of the terrific Java community. br / br /Just like their are Code Smells, there are Test Smells, and writing good test code is just as hard and as worthy as writing good production code. Meszaros categorizes Test Smells into ProjectSmells, BehaviorSmells, and CodeSmells. Particularly interesting is his discussion in this regard to the commercial "record and playback" test automation products that have given test automation a bad name in many circles with their tendency to create FragileTests particularly with regard to Interface Sensitivity. Like many others, we were drawn in, and spent and wasted thousands of dollars with a vendor and exhibiting extreme Interface Sensitivity with the user interface. Their interface was not only unable to "pick up" most of the controls we use but even minor changes to the interface can cause tests to fail, even in circumstances in which a human user would say the test should pass. This only goes to support the notion many of us have talked about here about factoring a UI into MVP or MVC and not having logic in the "presentation." br / br /Meszaros goes onto to provide very valuable discussions of Goals of Test Automation, Philosophies of Test Automation, and a Roadmap to Test Automation. We talk about things like Tests as Specification, also known as Executable Specification: "If we are doing test-driven development or test-first development, the tests give us a way to capture what the SUT should be doing before we start implementing it. They give us a way to specify the behavior in various scenarios captured in a form that we can then execute (essentially an "executable specification".) To ensure we are "building the right software", we must ensure that our tests reflect how the SUT will actually be used." We also talk about Tests as Documentation. br / br /The main part of the book, of course, is the catalog of the patterns. Meszaros has provided a tremendous service to our community by not only cataloging and naming much of what we do, but also providing excellent discussions of why and how we do those things. I think, over time, this will be regarded as a seminal work in Software Development.

Our vBulletin book picks:


Find more vBulletin related products of interest.

Search:
Keywords:
Amazon Logo

Purchase vBulletin - Site Map - vBulletin Forum
Copyright © 2006 vBulletin-FAQ.com. All rights reserved.
This website is not affilliated with Jelsoft or vBulletin.
Forums - Archive