|
|||||||||||||||||||||||||||||||||||
|
15 Reviews
|
Average Customer Review
Share your thoughts with other customers
Create your own review
|
|
Most Helpful First | Newest First
|
|
54 of 58 people found the following review helpful:
2.0 out of 5 stars
Falls short of its goal,
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.
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,
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.
15 of 16 people found the following review helpful:
4.0 out of 5 stars
A practical guide to test-driven development,
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.
12 of 14 people found the following review helpful:
5.0 out of 5 stars
Demystifies Test-Driven Development (TDD),
By
This review is from: Test-Driven Development: A Practical Guide (Paperback)
This book has changed the way I write software. It clearly states why you should do test-driven development and what tools are available, then backs this up with 200+ pages of how to do it with real code and text that captures the experience of developing a complex Java project test first.I'm a pragmatic person, so seeing the actual code and screenshots made concepts that I thought were difficult to achieve like writing tests before writing the implementation or testing GUIs (a subject that most people avoid) look surprisingly easy. All of the code in the book can be downloaded, but I found that it was more instructive to actually type in the code into an IDE. Following along with the project shows you how to proceed with test-driven development and what to expect. For example, you'll see when you need to refactor your tests or why you should test-drive most, but not all of your GUI code. After reading this book and implementing what I have learned in it, I absolutely agree with something that Ron Jeffries (another XP guru) wrote in the preface to this book: "If you're like me, using the techniques in [this] book, you will find that your programs are more clear, that they come into being more easily, and that you'll have fewer defects than you used to."
9 of 10 people found the following review helpful:
5.0 out of 5 stars
Excellent Practical Resource,
By
This review is from: Test-Driven Development: A Practical Guide (Paperback)
I have read Kent Beck's book also. That book is good, but this book really provides more practical advice on doing TDD development with JUnit. If you are using JUnit, then this book will provide tips, tricks, and strategies to using JUnit and other supplemental open source and commercial programs. The book has more than paid for itself already and I'm not finished reading it yet. If you are new to JUnit or TDD don't waste your time trying to come up the learning curve alone - buy this book.
18 of 23 people found the following review helpful:
3.0 out of 5 stars
Wait for second edition,
By
This review is from: Test-Driven Development: A Practical Guide (Paperback)
This book contains a lot of valuable information. Unfortunately, it is VERY much a first edition.The bulk of the book is a TDD project of realistic scope. It includes approaches to GUI TDD, which I've not seen addressed in any other book. However, users beware! I found the "annotated walk through the development" to be so poorly written that I was ready to gave up in frustration about 20% of the way through. It was often difficult to determine the targets for the code snippets presented. Particularly since method names are often duplicated amongst the various classes. The style used in Kent Beck's TDD book (bolded class name above each snippet) was infinitely superior to that of this book. Another source of frustration was omissions and sequence problems. Often it would be stated that the code compiles, when in fact it would not compile without additional variables, stubs, exception handlers, etc. This was very annoying and disrupted the flow of the sessions. Of course these things will no doubt happen during real world development, but I found it distracting and counterproductive for a tutorial. Sometimes these compilation issues were cited in subsequent tests, long after my compiler voiced disapproval of the omissions. Beck's book had a few similar problems, but they were not terribly distracting. I found myself sailing through his examples with ease. With this book, however, I often had to walk away for a while to cool down. The source code for the completed project is provided on the author's web site. And that's a good thing, because there were many points at which it would have been difficult and time-consuming to resolve the omissions and target problems without it. However, even with this resource, it was often still difficult to resolve the problems due to all of the refactoring that took place over the course of the development. Beck did not provide the source code for his book, but his examples were small enough that typing the code was not time-consuming. The project in this book is of sufficient scope that having the source code is a valuable timesaving, especially with all the refactoring that occurs. Refactoring is fundamental to good code and TDD provides the security to facilitate the process. But just having the final product to document the track of the development leaves a lot to be desired on a project of this scope. It probably would have been better if the author had provided a code repository (e.g., CVS) to document the evolution of the code, checking the code in at the end of each test. This would be standard operating procedure for XP practices. That way a snapshot of the code would available as a starting point for each test in the tutorial. This is still a useful book covering a subject for which few books exist. It provides good introductions to TDD, refactoring, and programming by intention. It discusses the use of JUnit, extensions, related tools, and various xUnit family members. The coverage of mock objects is far deeper than that of Beck's book. And its coverage of GUI TDD is unique. There are also good presentations on XP and Agile Modeling. My motivation for purchasing this book in addition to Beck's book was the realistic scope of the example project. However, my enthusiasm to complete this example has deteriorated rapidly in the face of the shortcomings of its presentation. Perhaps a reformatted, corrected second edition will allow the true potential of this book to be evident.
6 of 7 people found the following review helpful:
4.0 out of 5 stars
Finally, not just another book about web applications!,
By
This review is from: Test-Driven Development: A Practical Guide (Paperback)
Dave's book does one thing that most other books in this field do not do: it avoids the web application. Hallelujah!This book provides a good foundation for understanding TDD: the programming cycle, refactoring, tools, mock objects... it is possible to begin applying TDD for yourself after reading the first 1/3 or so of this book. Writing effectively about programming sessions is not easy. Only a few authors can do it well, and Dave does an admirable job in this. My only beef with the case study (which makes up the bulk of the book) is that, after a while, it becomes somewhat repetitive. This isn't Dave's fault: it's the nature of programming. Sometimes we just need to add another button or another text field. We don't necessarily learn anything new doing it, but if we want a finished product, we have to do it. I understand Dave's desire to present a complete (if small) project, and so applaud his willingness to risk some duplication in the name of finishing what he started. The experience of learning from this book is similar to learning from real project experience: not every page contains something new and exciting, but if you follow along and ask questions (of yourself), then you will have learned a great deal by the end.
2 of 2 people found the following review helpful:
4.0 out of 5 stars
Very helpful but not perfect,
This review is from: Test-Driven Development: A Practical Guide (Paperback)
Context: I've read a fair amount about TDD (including being a technical reviewer for Kent Beck's "By Example" book), but went a long time without getting a chance to use TDD. David Astels' book gave me a chance to get a little down and dirty with the technique and some of its associated frameworks.
Maybe too dirty? As others have said, the source code in Part III of the book doesn't do what the book describes; you need to go to Mr. Astels' web site and get updated source code. I found the coverage of Java frameworks (in part II) to be very helpful; it expanded my understanding of what TDD techniques can be used.
5 of 7 people found the following review helpful:
5.0 out of 5 stars
Mock object frameworks explained,
By
This review is from: Test-Driven Development: A Practical Guide (Paperback)
For the first time I now understand the following mock object related frameworks,- Mock Objects Framework - Mock Maker - Easy Mock Alone, the chapter that explained these frameworks was well worth the purchase price of the book.
2 of 3 people found the following review helpful:
4.0 out of 5 stars
My First TTD book, and a great one,
By
Amazon Verified Purchase(What's this?)
This review is from: Test-Driven Development: A Practical Guide (Paperback)
This was my first book on TDD, and I thought it did a great job of explaining the concept and working through it step-by-step. Really practical if you take the time to walk through his sample application development process. I work through it in detail for the first few chapters then skimmed the rest.But the explanation of the method and its benefits is great. |
|
Most Helpful First | Newest First
|
|
Test-Driven Development: A Practical Guide by David Astels (Paperback - July 12, 2003)
$59.99 $43.50
In Stock | ||