or
Sign in to turn on 1-Click ordering.
or
Amazon Prime Free Trial required. Sign up when you check out. Learn More
Sell Back Your Copy
For a $1.65 Gift Card
Trade in
More Buying Choices
Have one to sell? Sell yours here
Test-Driven Development: A Practical Guide
 
 
Tell the Publisher!
I'd like to read this book on Kindle

Don't have a Kindle? Get your Kindle here, or download a FREE Kindle Reading App.

Test-Driven Development: A Practical Guide [Paperback]

David Astels (Author)
4.2 out of 5 stars  See all reviews (15 customer reviews)

List Price: $59.99
Price: $43.50 & this item ships for FREE with Super Saver Shipping. Details
You Save: $16.49 (27%)
  Special Offers Available
o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o
In Stock.
Ships from and sold by Amazon.com. Gift-wrap available.
Only 15 left in stock--order soon (more on the way).
Want it delivered Monday, February 6? Choose One-Day Shipping at checkout. Details
Textbook Student FREE Two-Day Shipping for students on millions of items. Learn more


Book Description

0131016490 978-0131016491 July 12, 2003 1
Test-Driven Development: A Practical Guide presents TDD from the perspective of the working programmer: real projects, real challenges, real solutions, ...real code. Dave Astels explains TDD through a start-to-finish project written in Java and using JUnit. He introduces powerful TDD tools and techniques; shows how to utilize refactoring, mock objects, and "programming by intention"; even introduces TDD frameworks for C++, C#/.NET, Python, VB6, Ruby, and Smalltalk. Invaluable for anyone who wants to write better code... and have more fun doing it!

Special Offers and Product Promotions

  • Buy $50 in qualifying physical textbooks, get $5 in Amazon MP3 Credit. Here's how (restrictions apply)

Frequently Bought Together

Test-Driven Development: A Practical Guide + Test Driven Development: By Example + Refactoring: Improving the Design of Existing Code
Price For All Three: $119.21

Show availability and shipping details

Buy the selected items together
  • In Stock.
    Ships from and sold by Amazon.com.
    This item ships for FREE with Super Saver Shipping. Details

  • Test Driven Development: By Example $32.04

    In Stock.
    Ships from and sold by Amazon.com.
    This item ships for FREE with Super Saver Shipping. Details

  • Refactoring: Improving the Design of Existing Code $43.67

    In Stock.
    Ships from and sold by Amazon.com.
    This item ships for FREE with Super Saver Shipping. Details



Editorial Reviews

From the Back Cover

Test-Driven Development: A Practical Guide

David R. Astels

Foreword by Ron Jeffries

  • The relentlessly practical TDD guide: real problems, real solutions, real code
  • Includes a start-to-finish project written in Java and using JUnit
  • Introduces TDD frameworks for C++, C#/.NET, Python, VB6, and more
  • For every developer and project manager interested test-driven development

Make Test-Driven Development work for you!

Test-Driven Development: A Practical Guide enables developers to write software that's simpler, leaner, more reliable... just plain better.

Now, there's a TDD guide focused on real projects, real developers, real implementation challenges, and real code.

Renowned agile development expert Dave Astels shows TDD at work in a start-to-finish project written in Java and using the JUnit testing framework. You'll learn how "test first" works, why it works, what obstacles you'll encounter, and how to transform TDD's promise into reality.

  • o Relentlessly practical! Full of downloadable code examples, hands-on exercises, and a fully hyperlinked version of the "resources" appendix
  • o Introduces powerful TDD tools and techniques--including key JUnit extensions, presented by their creators (Scott Ambler, Tim Bacon, Mike Bowler, Mike Clark, Bryan Dollery, James Newkirk, Bob Payne, Kay Pentacost, and Jens Uwe Pipka)
  • o Covers refactoring, "programming by intention," mock objects, and much more
  • o Discusses TDD frameworks for C++, C#/.NET, Python, VB6, Ruby, and Smalltalk
  • o Introduces previously unpublished test-first techniques for GUI software
  • o Contains appendices introducing eXtreme Programming and Agile Modeling
  • o For all programmers and project managers

Read this book if you're ready to write code that's clearer, more robust, and easier to extend & maintain--in short, if you're ready to write better code!

About the Author

Dave Astels has close to twenty years' experience as a software developer in areas ranging from embedded environment control to intellectual property protection systems to electrical energy trading systems. For more than a decade, he has been working exclusively with object technology. He runs his own consulting company specializing in Extreme Programming and pervasive Java solutions. He is the co-author of A Practical Guide to extreme Programming (ISBN 0130674826).


Product Details

  • Paperback: 592 pages
  • Publisher: Prentice Hall; 1 edition (July 12, 2003)
  • Language: English
  • ISBN-10: 0131016490
  • ISBN-13: 978-0131016491
  • Product Dimensions: 9.2 x 7 x 1.2 inches
  • Shipping Weight: 1.9 pounds (View shipping rates and policies)
  • Average Customer Review: 4.2 out of 5 stars  See all reviews (15 customer reviews)
  • Amazon Best Sellers Rank: #271,078 in Books (See Top 100 in Books)

More About the Author

Discover books, learn about writers, read author blogs, and more.

 

Customer Reviews

15 Reviews
5 star:
 (7)
4 star:
 (5)
3 star:
 (2)
2 star:
 (1)
1 star:    (0)
 
 
 
 
 
Average Customer Review
4.2 out of 5 stars (15 customer reviews)
 
 
 
 
Share your thoughts with other customers:
Most Helpful Customer Reviews

54 of 58 people found the following review helpful:
2.0 out of 5 stars Falls short of its goal, April 17, 2004
By A Customer
This review is from: Test-Driven Development: A Practical Guide (Paperback)
This book is about Test-Driven Development (TDD). Its purpose is to help you write better code (by having more tests) and give you a head start with existing tools to achieve this.

The book falls short of these goals: The explanations about writing tests are short on advice and are sometimes misleading. The presentation of the tools is long, with little useful facts.

The book is organized into four parts: Background on TDD, refactoring and programming by intention; A look at JUnit and related tools used to write and run tests; A lengthy example of TDD; An overview of other tools in the xUnit family. The book is targeted at a Java audience but programmers using other languages should have little difficulties understanding the code.

I have a major problem with the background section. The author repeatedly claims that TDD provides exhaustive test coverage and ensures that you can refactor your code with confidence. Any error will be caught by the tests. This is foolish. First, tests rarely reach 100% code coverage. Even the sample that the author provides in the book ends up with less than 90% coverage. This leaves many gaps where tests will fail to detect errors. Even if tests cover 100% branches in the code tests are not exhaustive. Depending on the data used, the same branch may exhibit different behavior. (Not to speak about race conditions and other sources of hard to find bugs.) I fully agree with the author that writing unit tests will improve the quality of the code and help find bugs. But claiming that this is a silver bullet is not wise. I would recommend reading books about tests (e.g., Myers' The Art of Software Testing and McConnell's Code Complete chapter on unit testing) in addition to this book. The section on refactoring is a summary of Martin Fowler's Refactoring book which I recommend.

The second part presents JUnit. JUnit is a framework used to write and run tests. It is a good presentation. However I would have liked to get pieces of advices on what tests to write in addition to how to write them. The author briefly mentions boundary testing but does not have much to say about the tests themselves. Again a test book is invaluable for this. The author recommends using a test coverage tool as well as Jester to measure the tests coverage. This is a great idea.

The third section is an (overly) extended example: the author walks us through writing TDD code. This could have been a great part, giving meaning to the `practical' adjective in the book title. Unfortunately it is a long rambling, showing lots of code but short on insights. The actual `meat' of this part could be summarized in less than five pages.

The last section presents variations on the JUnit tool. Many languages (C++, C#, VB, Python, etc) are discussed. This part would have been better put on a website rather than printed in the book. Given the changes in some of these frameworks the information is obsolete.

The books ends with several appendices dealing with extreme programming and agile modeling.

Unit tests are a great tool to improve code quality. Whether or not you actively practice TDD, a good book on it can provide insights into improving your code. This book contains some interesting bits of wisdom. However much of it is buried by the rest of the material.

Help other customers find the most helpful reviews 
Was this review helpful to you? Yes No


16 of 17 people found the following review helpful:
5.0 out of 5 stars Great work covering TDD from the ground up to adv. topics, May 12, 2004
By 
dkroot (Washington, DC USA) - See all my reviews
This review is from: Test-Driven Development: A Practical Guide (Paperback)
(Disclaimer: I worked with the author on one large project).
Dave Astels' book is a comprehensive work covering TDD from the ground up to advanced topics. While most of the book examples use Java and JUnit, it does cover unit testing frameworks in several other languages as well. I've read two books on the topic (the other one is Kent Beck's "TDD By Example") and I liked Dave's book better. The basics of TDD can be explained in 10 minutes however when it is applied on practice it gets complicated in at least 3 areas: 1) testing UI 2) testing with database - data setup, isolation, etc. and 3) mocks. Kent's book is more about a philosophy of TDD but it only goes through a very simple "toy" example. Dave's book really helped me to understand mocks and it does cover UI testing in great length. Mocks are an advanced topic, so it does require a good knowledge of Java and OOP. The rest of the book seems to be on intermediate technical level.

The only thing this book is missing, I think, is a discussion about data setup and database-related testing, dbUnit, etc., other than an advice to avoid it altogether (p. 83). While you can indeed use mocks to avoid it, on the large real projects some kind of integration testing (including testing with the database) will be necessary. I hope the second edition will come out at some point!

Overall, it's a great book for both newcomers and developers with unit testing experience. BTW, it won SD West 2004 Jolt Award.

Help other customers find the most helpful reviews 
Was this review helpful to you? Yes No


15 of 16 people found the following review helpful:
4.0 out of 5 stars A practical guide to test-driven development, August 6, 2003
This review is from: Test-Driven Development: A Practical Guide (Paperback)
Test-driven development (TDD) is one of the hot topics in the recent "agile revolution". Unfortunately, there aren't too many texts currently available that take an in-depth look at the subject. David Astels jumps into the fray with his new book, "Test-Driven Development: A Practical Guide", in order to help fill that void. Giving a nod to Kent Beck's "Test Driven Development By Example", Astels views his work as a complement to Beck's, focusing on the practical techniques and tools necessary to best make use of TDD.

The book first touches on some topics fundamental to TDD, such as refactoring, programming by intention, and of course the basic theory behind TDD. Appendices further flesh out this material by addressing extreme programming and agile modeling.

Although other members of the xUnit family are looked at, this book is squarely focused on JUnit and Java. As such, the text goes into detail about using JUnit, including the API, and how to go about the task of writing tests. Along with the JUnit coverage, the reader is presented with information on several JUnit extensions and JUnit related tools designed to aid the TDD process. Where this book really shines is in its coverage of mock objects and techniques for testing GUIs within JUnit.

The meat of this book rests in a very detailed walkthrough of a project using TDD. Astels leads the reader through every test and every refactoring along the way, from inception to the finished product. This is probably the next best thing to sitting down for a pair-programming session with a TDD guru.

Unfortunately, there are a couple of complaints I feel the need to point out. The project presented is a Swing application that persists its data in a flat file. There is no coverage provided for testing web based enterprise applications. While mention is made of DatabaseChecker, a test utility suitable for simple database tests, Astels chose not to have the example project use a database for persistence. As a consequence of this decision, this common task is left unaddressed.

Despite these omissions, there is still much to be gained from this book. I feel a reader may obtain the most benefit by downloading the sample code and working through the example project step-by-step along with the text. If you are interested in a practical guide to TDD, this book is definitely worth a look.

Help other customers find the most helpful reviews 
Was this review helpful to you? Yes No

Share your thoughts with other customers: Create your own review
 
 
 
Most Recent Customer Reviews











Only search this product's reviews



Inside This Book (learn more)
First Sentence:
From programmers to users, everyone involved in software development agrees: testing is good. Read the first page
Key Phrases - Statistically Improbable Phrases (SIPs): (learn more)
duplicate movie, expectation list, prescription database, average rating answers, bad average rating, unrated movie, logical laver, public void rename, decorated test, public void action, database checker, agile modelers, mock view, protected void setup, public void select, movie list, int rating, agile models, public int size, selected movie, int roll, public void setup, def setup, file chooser, public void add
Key Phrases - Capitalized Phrases (CAPs): (learn more)
Star Wars, Star Trek, Action Event, Science Fiction, Lost In Space, The Princess Bride, The Shining, Saorsa Development Inc, Void Calla, The Fellowship of the Ring, Test-Driven Development, Extract Method, Easy Mock, Test Resource Factory, Save As-ed, The Hunt For Red October, List Data, Mike Gayle, Public Sub, Visual Basic, Add Update Figure, Private Sub, None Red, Entering Money, Unrated Exception
Browse Sample Pages:
Front Cover | Table of Contents | First Pages | Index | Back Cover | Surprise Me!
Search Inside This Book:


What Other Items Do Customers Buy After Viewing This Item?


Tags Customers Associate with This Product

 (What's this?)
Click on a tag to find related items, discussions, and people.
 
(7)
(1)
(1)

Your tags: Add your first tag
 

Sell a Digital Version of This Book in the Kindle Store

If you are a publisher or author and hold the digital rights to a book, you can sell a digital version of it in our Kindle Store. Learn more

Customer Discussions

This product's forum
Discussion Replies Latest Post
No discussions yet

Ask questions, Share opinions, Gain insight
Start a new discussion
Topic:
First post:
Prompts for sign-in
 


Active discussions in related forums
Search Customer Discussions
Search all Amazon discussions
   
Related forums





Look for Similar Items by Category


Look for Similar Items by Subject