|
|||||||||||||||||||||||||||||||||||
|
14 Reviews
|
Average Customer Review
Share your thoughts with other customers
Create your own review
|
|
Most Helpful First | Newest First
|
|
21 of 22 people found the following review helpful:
5.0 out of 5 stars
Clear and concise,
By
This review is from: Pragmatic Unit Testing in C# with NUnit (Pragmatic Programmers) (Paperback)
The message of this book is: responsible developers unit test, and it's easy to do, so do it! If you're tired of reading 800 page books that should've been 200 pages, then you will find this book a refreshing change. It gets straight to the point, explaining in an easy-to-read style how to unit test .NET applications, including how to install & use the popular NUnit & NMock tools. It also explains how to design effective unit tests, and what to do in common problem situations (such as incomplete requirements). It is a great first book on unit testing for .NET, but since it is a pragmatic guide it does not cover the more esoteric, quirky issues you may run into. It also does not discuss or promote test-driven development techniques and theories. It is strictly a nuts & bolts discussion of .NET unit testing with NUnit & NMock, but if you need to be unit testing today (not next month), then this is the book to get.
39 of 46 people found the following review helpful:
1.0 out of 5 stars
Over-extended and over-rated.,
By Dave R (USA) - See all my reviews
This review is from: Pragmatic Unit Testing in C# with NUnit, 2nd Edition (Paperback)
I have to respectfully disagree with all the fawning reviews. It's a chatty, drawn out, tedious read, something of an accomplishment given the fact that it's only ~200 pages long. Frankly, anything more then something like the O'Reilly Pocket Reference is overkill on this subject. NUnit is a snap to use and the freely available documentation and tutorials are more than adequate and not nearly so time-consuming to digest.
The first passage that discusses actual test coding (~20 pages or so into the book) presents a simple case where a method should accept an integer array as a parameter and return the largest element. The book then explains how this function, if it behaves properly, should perform. A series of simple test cases are discussed before we get to the real toughie for all you computer scientists out there - a data set consisting of negative integers. A test vector consisting of the array [-9,-8,-7] is passed to the method and -7 is returned. The book explains 'It might look odd, but indeed -7 is larger than -9. We're glad we straightened that out now, rather than in the debugger or in production code where it might not be so obvious.' ARE YOU KIDDING ME?!? Just what audience was this thing written for? One would have thought that that little gem wouldn't have been necessary... but in fact that is the tone of the entire book. Expect to have your hand held in this manner throughout. If that's the sort of thing that appeals to you, you'll love this one. If, on the other hand, you're trying to learn to incorporate NUnit testing into C# development in an efficient, professional manner, save your money and time and read the NUnit docs.
9 of 9 people found the following review helpful:
3.0 out of 5 stars
Good, but missing critical elements,
By jeffery (Somewhere in Kansas, USA) - See all my reviews
Amazon Verified Purchase(What's this?)
This review is from: Pragmatic Unit Testing in C# with NUnit, 2nd Edition (Paperback)
This is a decent getting started book, but it doesn't give good coverage of things such as NUnit projects or using app.config files with NUnit.
Unfortunately, this book isn't good as a stand-alone. I'll admit that it did help me get started, but it lacks so much that I can't give it more stars. A second volume that covers more advanced topics is suggested, or the next edition can add the missing parts.
7 of 7 people found the following review helpful:
5.0 out of 5 stars
Great introduction to writing unit test in C#,
By
This review is from: Pragmatic Unit Testing in C# with NUnit, 2nd Edition (Paperback)
This is a great introduction to writing unit tests in C# with NUnit. The authors do a good job of explaining why unit tests should be created, how having unit tests are better than not having unit tests, and what exactly should be coded for in a unit test. The book is well-written, easy to follow, and includes helpful guidelines for things that might be confusing to developers.
The real strength of this book is not the author's approach to writing unit tests, but rather they clearly illustrate what exactly should be tested in a unit test. The authors show how adhering to the guidelines they set forth results in unit tests that are well-written and fail at appropriate times. The authors then generalize this to some extent and provide an excellent discussion on the properties of a good unit test. My favorite section of the book was actually one of the appendices. In the first appendix, the authors go through a list of gotchas--both in writing unit tests in general and specific to unit tests in C#. This is a very short discussion (only 6 pages), but they identify some issues I've seen with poorly written unit tests. This is a great book as an introduction to writing unit tests. The authors clearly explain why unit tests should be written, they show clearly what should be tested in a unit test, and they describe some of the problems that have been avoided by writing intelligent unit tests.
4 of 5 people found the following review helpful:
5.0 out of 5 stars
Good introduction to NUnit,
By SSC "SSC" (Maryland) - See all my reviews
This review is from: Pragmatic Unit Testing in C# with NUnit (Pragmatic Programmers) (Paperback)
I was using NUnit within an hour of reading this book. I found it very easy to read. It has helped me transition into a Test Driven Development frame of mind.
Just using NUnit to write test fixtures for existing code reveals instantly where code should be refactored due to high level of dependency. I recommend this to every .NET developer.
1 of 1 people found the following review helpful:
2.0 out of 5 stars
Very Superficial,
By
Amazon Verified Purchase(What's this?)
This review is from: Pragmatic Unit Testing in C# with NUnit, 2nd Edition (Paperback)
I really wanted to give this book 3 stars; the authors seem like very nice people, and the book is friendly and readable. Unfortunately, the content is very lacking.
Their UI testing chapter was limited to a discussion of various tools that allow you to test-run the actual GUI, but was bereft of patterns like MVP/MVC that exist for the purpose of UI testing. IoC was virtually if not literally unmentioned. The mocking chapter was very very light, and mentioned Rhino only in one of those side boxes, not as actual content in the book (!!) This is one of those books that will give beginners a false sense that unit testing is easy, who then wind up making a mess in a real-world project. And as noted by other reviewers, the book was written in insufferably chatty prose, which somehow only added up to 190 pages I'm just starting the Osherove, and it seems outstanding so far.
5.0 out of 5 stars
A concise introduction to .NET unit testing,
By
This review is from: Pragmatic Unit Testing in C# with NUnit (Pragmatic Programmers) (Paperback)
This book is a slim one, just over 200 pages, and provides an easy introduction to writing unit tests. It explains the concept of unit testing, why they are beneficial, and carries on with how to write and manage tests.
The reader is gently introduced to the code, and shown how a unit test can be written without a test framework. NUnit is then introduced and is used to automate most of the gritty details. There is a basic overview of mock objects, and a mention of the NMock tool. The book briefly mentions test-driven development, code coverage, UI tests, and refactoring, but does not go into them in any depth. Which is fine, since this is intended as a focused introduction to unit testing. For anyone new to unit testing in .NET, this book is worth a read. It does not go into much depth, but does the job as introductory material. If you are already comfortable with unit testing and NUnit, I can recommend The Art of Unit Testing: With Examples in .Net as a more advanced book.
1 of 2 people found the following review helpful:
3.0 out of 5 stars
Good information, but a bit superficial,
This review is from: Pragmatic Unit Testing in C# with NUnit, 2nd Edition (Paperback)
Overall, I found the book's advice to be generally correct and useful, albeit lacking in proper detail. The main strength is common-sense testing advice and attempting to answer the "what to test" question, which has been ignored in other books on the topic. It would have been better for the book to cover technique thoroughly.
I would recommend this book for beginners. After that, I would recommend that they read Feathers for a description of how to refactor code to make it testable, and Osherove for a discussion on proper programming in unit tests. If you have a strong stomach, Beck's "TDD by Example" has useful information, but the "witty" section titles make it difficult to locate what you need. This book outlines what to test, but doesn't cover it thoroughly. I'm not aware of any book that does, unfortunately. Most developers I've worked with test only the happy path, and spend their 20% coverage allowance on exception handlers and properties. I test exception handlers and shoot for 100% coverage, but I don't think anyone really tests boundary conditions or values that don't trigger conditional statements until he/she gets a bug report. (I was kind of hoping the "Right BICEP" and "CORRECT boundary conditions" chapters in the book under review would be dogmatic enough to bring me back to honesty.) Expanding those topics in a 3rd edition would give the author an opening in the market.
2 of 4 people found the following review helpful:
5.0 out of 5 stars
A Book Full of Practical Advice on Unit Testing,
By
This review is from: Pragmatic Unit Testing in C# with NUnit, 2nd Edition (Paperback)
The book is packed with practical advice on unit testing. Why should you do unit testing, what do you need to know to write good tests, how do you know if you're writing good tests, how can unit tests not only improve your code, but also your design, can unit tests doom a project (if not done right) --- you'll find answers to all of these questions and more. The authors also give numerous short code examples that help solidify the concepts. You'll also find extensive references and links to web-sites where appropriate. The authors' writing style is fluid. If you enjoy reading good technical books, you'll read this like a novel!
2 of 4 people found the following review helpful:
4.0 out of 5 stars
Good book,
By
Amazon Verified Purchase(What's this?)
This review is from: Pragmatic Unit Testing in C# with NUnit (Pragmatic Programmers) (Paperback)
If you are thinking about using NUnit, or (like me) are already using it but want to get some insight from those who have been using it a lot, this is a good book. I must admit that I knew I was going to like the book when the authors state at the beginning that "Separation of Concerns is probably the single most important concept in software design and implementation."
The book introduces the reader to NUnit and how to use it in code, but its strength is in helping you learn how to write good tests that in return help you design better code. |
|
Most Helpful First | Newest First
|
|
Pragmatic Unit Testing in C# with NUnit (Pragmatic Programmers) by Andrew Hunt (Paperback - May 2004)
Used & New from: $0.01
| ||