|
|||||||||||||||||||||||||||||||||||
|
11 Reviews
|
Average Customer Review
Share your thoughts with other customers
Create your own review
|
|
Most Helpful First | Newest First
|
|
15 of 15 people found the following review helpful:
4.0 out of 5 stars
Great intro and overview if that's what you're looking for,
By
This review is from: Unit Test Frameworks (Paperback)
I had used JUnit for several years before picking up this book and I like to think that I know the tool pretty well. So why did I decide to read this book? I read this book because I thought that might help me venture a bit outside my familiar JUnit turf and into doing test-first programming with languages other than Java. The short version? A very nice introduction to all the included xUnit ports. The long version? Read on.
The first four chapters are general introduction to the topic of unit testing (and to some degree, test-driven development). I was prepared to do a quick scan through them all but ended up reading chapters 3 (xUnit architecture) and 4 (writing unit tests) almost word to word-the topic was mostly familiar but the authors solid writing kind of kept me going. The first two chapters didn't pique my interest that much, perhaps because I had already seen people develop a unit test framework from scratch as an introduction to the domain. The real meat of the book that I was looking forward to was in chapters 7 through 9, the introductions to CppUnit, NUnit, PyUnit-which were mostly new to me although I had done very little fooling around with them before. I wasn't disappointed. The author managed to put together a pretty good set of tutorials for these frameworks. Obviously the same information is available online but I still prefer reading a treekiller rather than a printout of a web page. The not so bright spots in the book, in my opinion, were the chapters on unit testing a Swing GUI and on XMLUnit. Not that they were in anyway badly written. I just felt like they didn't belong. I would've personally swapped in a couple of additional xUnit ports instead (Ruby and PHP, for example). This is definitely not a book you'll carry with you from project to project. There's approximately 100 pages of substance split among half a dozen topics so none of them gets covered in detail. The rest, almost 100 pages of the book is what I'd classify as "nice to have"-I don't mind having that material in the book but I also wouldn't have minded if they'd left them out. To summarize, if you'd like to get an idea of how the unit testing frameworks on different platforms/languages differ and what they have in common, this is as good an introduction to them as any and well written in all dimensions. However, you might be disappointed if you're looking for a more long-lasting companion.
12 of 12 people found the following review helpful:
3.0 out of 5 stars
Good, but needs to cover more implementations...,
By
This review is from: Unit Test Frameworks (Paperback)
JUnit caused a major shift in the way people thougth about development. While the basic framwork was originally developed with Smalltalk, JUnit is what started the Unit Test Framework "revolution". This book explores the various xUnit options available for other languages.
Up to this point, I have only used the xUnit Test Framework with JUnit and Java. The book does a nice job explaining how to apply the Unit Test Framework to any development project. It goes into more depth on JUnit, CppUnit, NUnit (.NET), PyUnit (Python), and XMLUnit. I like the fact I now have a single book to get me started Unit Testing in pretty much any other language. In my opinion, the book should have included more depth on the various other xUnit implementations. It also comes with a CD which contains and entire 14Mb of code and examples, which seemed a little silly. The examples could have easily been downloaded from somewhere and saved some money on the price of the book. A nice start and does a good job covering a few of the xUnit Frameworks, but I wish it had taken the extra time to cover more implementations.
3 of 3 people found the following review helpful:
5.0 out of 5 stars
Excellent book, explains the core of testing frameworks,
By
This review is from: Unit Test Frameworks (Paperback)
I have been using JUnit for unit testing on Java for quite a while and I have also been exposed to other testing frameworks, but had never looked under the hood is such detail as Paul does in this book.
He starts with a good overview of what a unit test framework and then takes us to a very nice tutorial on building your own unit test framework from scratch. This exercise is very well documented and you learn the basic principles behind a unit test framework while building a simple application and the unit tests required to test it. After laying out the foundation, he goes on to explain in more detail how to write unit tests, how to use assertions, how to deal and test exceptions and expected errors, how to test protected behavior, how to organize your project for testing and using more advanced techniques like mock objects and performance testing. He also includes a chapter that deals with testing GUIs (Graphical User Interfaces) which is a challenging task, but he offers good ideas for doing test driven development for a GUI to the application that we have been building during the previous chapters. After all the basic concepts have been covered, the next chapters are dedicated to the most important (or more popular) unit test frameworks which are JUnit for Java, CppUnit for C++, NUnit for C# on .NET, PyUnit for Python and XMLUnit for XML documents. It is interesting to note that throughout the book the author uses the same application for the example code, so that we can compare the actual implementation of the tests using the different frameworks. In the appendices, there is a C++ version of the simple Java framework that was built on chapter 2 and there are also summaries of the class reference documentation for JUnit and CppUnit. Overall I think it is a very solid book with good examples and very concise content. Even though it doesn't cover all the unit test frameworks that exist today, I think it covers the most important ones, but the real gem is on the in-depth analysis of what makes a unit test framework. If you are already familiar with one or more unit test frameworks, this book will give you a deeper understanding of them, and if you are still programming without writing unit tests... shame on you ;-)... buy this book and learn how simple it is to have a very good unit testing framework, no matter what language you use.
3 of 3 people found the following review helpful:
3.0 out of 5 stars
Disappointing...,
By
This review is from: Unit Test Frameworks (Paperback)
Although this book covers the use of unit tests in general and the xUnit frameworks in particular, Pete Hamill frequently doesn't go beyond basics available on the internet. He covers a number of languages (which may or may not be useful) and includes the class reference for JUnit and CppUnit. JUnit may be the de facto standard in Java, but there are a number of frameworks available for C++ with greater or lesser degrees of usefulness -- which might have provoked an interesting commentary comparing some of them. Not counting the sizeable class references, the text runs to a little over a hundred pages. The CD included contains about 30MB of data.
3 of 3 people found the following review helpful:
4.0 out of 5 stars
expounds well in several languages,
By
This review is from: Unit Test Frameworks (Paperback)
Hamill directs this book towards programmers of any level of experience. He points out that in all likelihood, you have hand crafted simple unit tests to validate your code. Even if you did not call them unit tests, you had the basic concept down. He takes this as a mutual starting point, to ease you into a more formal testing approach. Why you should do it and how. For the how, he instantiates with the popular open source JUnit. So at the very least, the book is a full-fledged user's manual for JUnit
But he also covers other test frameworks, like CppUnit, XMLUnit, PyUnit and NUnit. For example, NUnit is used in the .NET environment, to test C# code. He gives several C# examples and how to combine these with NUnit. Likewise, PyUnit tests Python code and we see how from some examples. The book certainly lives up to its promise of being a language independent coverage of the concept of unit testing.
1 of 1 people found the following review helpful:
4.0 out of 5 stars
A useful survey of testing tools,
By
This review is from: Unit Test Frameworks (Paperback)
[reviewed by XPSD member Paul Hamill]
Unit testing and test-driven development (TDD) is a skill that has been desperately lacking on many of the projects I have been involved with over the last few years. I have tried reading books by Kent Beck and others on this subject, but I have always had trouble getting to the next level of applying the skills to "real" problems. This book does not take the approach of claiming to teach you how to be a great test-driven developer, instead it is a survey of the unit test tools available for many environments today and along the way explains the fundamentals of unit testing and TDD. If you have read other books on TDD, you may find much of this book a review, however there are many explanations of how some of these tools would be used in actual projects which I found valuable. The discussion of mock objects is a good one which explained some details about how to use mock objects in practice that I didn't understand in reading other sources on the subject. In addition, several tools I was unaware of were discussed that I am interested in looking into for making TDD easier to do. For example, XMLUnit and NUnitForms are 2 tools that would seem to make testing a data-driven GUI application much more manageable. I would recommend this book for anyone who has an interest in unit testing or test driven development and wants to know what tools are available to do this. Also, this book would be invaluable if you intend to write your own xUnit framework for a language.
1 of 1 people found the following review helpful:
3.0 out of 5 stars
njbulitka,
By njbulitka (Ottawa, ON CANADA) - See all my reviews
This review is from: Unit Test Frameworks (Paperback)
I found this book to be a little on the thin side in terms of detail. I was hoping for a more detailed treatment of unit testing in general, and the various Frameworks available. For an introduction/detailed treatment of unit testing, you want to get another text. For an overview of various types of unit test frameworks, this book is OK.
1 of 1 people found the following review helpful:
5.0 out of 5 stars
A must for test-first programmers,
By
This review is from: Unit Test Frameworks (Paperback)
One of the major pushes in any agile methodology is that of test-first programming. Test first programming requires the developer to write a programmatic unit test to test the functionality being created. Unit Test frameworks have appeared to aid developers in this regard. Basically, unit test frameworks allow programmers to create tests-written in their language of choice-for the piece of functionality created. While test first programming might sound a bit backwards or like an added expense in an already busy project plan, it is in fact a priceless tool in quickly developing quality code. This book outlines the major unit test frameworks available as well as how to go about using one of them.
Creating a unit test requires developers to think about their programming in a slightly different light. This book does an excellent job in explaining what a unit test is, how to write it, and how to test what you really want to test. The book then goes in depth to discuss the specific various frameworks, including JUnit, CppUnit, and NUnit (to name only a few). While giving some excellent instruction, this book also manages to include some good architecture lessons. In one such example, the author discusses the disadvantage of tying UI to code and how that makes unit tests much more complicated to write and maintain. I was quite pleased with this book, and I would highly recommend it to any programmer. Writing unit tests for your code during development will radically change how you program-for the better.
1 of 1 people found the following review helpful:
4.0 out of 5 stars
Solid book with a predominant Java slant...,
By Thomas Duff "Duffbert" (Portland, OR United States) - See all my reviews (VINE VOICE) (TOP 500 REVIEWER) (HALL OF FAME REVIEWER) (REAL NAME)
This review is from: Unit Test Frameworks (Paperback)
An important part of programming that's become popular in recent years is the move towards test-driven programming. The O'Reilly book Unit Test Frameworks from Paul Hamill can help you understand how it works and why it's important.
Chapter List: Unit Test Frameworks: An Overview; Getting Started: Tutorial; The xUnit Family of Unit Test Frameworks; Writing Unit Tests; Unit Testing GUI Applications; JUnit; CppUnit; NUnit; PyUnit; XMLUnit; Resources; Simple C++ Unit Test Framework; JUnit Class Reference; CppUnit Class Reference; Glossary; Index I've done a little work with JUnit in a prior project, and I must say the concept of test-driven programming was extremely powerful. By building up a collection of unit tests, you can make changes to a program with complete confidence that your modifications did not break existing functionality. This particular book can help you take the necessary steps towards understanding how to write the unit tests, and how to use the xUnit types of frameworks to assist your development regardless of language. I'll find it useful as I start to get back into more complex Java development, plus I want to explore the use of the xUnit packages that test web applications from a user interface perspective. The book is supposed to be a language-independent overview of xUnit, and it basically is. Still, a majority of the book deals with how xUnit works in Java, so that's most likely where you'll see the most value. The other variants like NUnit and PyUnit get only a few pages, and it's a pretty high-level overview. The book probably could have been larger (it's only 198 pages) in order to cover the other xUnit packages in more detail. Still, it's a very useful book, and one that you'll derive value from as you implement test-driven programming into your development plans.
2 of 3 people found the following review helpful:
5.0 out of 5 stars
A keeper,
By lakeisleofinnisfree (Colorado) - See all my reviews
This review is from: Unit Test Frameworks (Paperback)
This is a very solid, no-nonsense introduction to unit test framework.
For a 200 page book, this one is packed with carefully chosen information, detailed enough for new comers to start unit testing, useful enough for a frequently-visited reference, and at the same time concise enough for anyone to get an overview of the unit test landscape. |
|
Most Helpful First | Newest First
|
|
Unit Test Frameworks by Paul Hamill (Paperback - Oct. 2004)
Used & New from: $44.95
| ||