Full description not available
B**H
explainable English for what it means to write good unit tests in C#
This book finally cuts through all the thoerorectical talk and is written in plain, explainable English for what it means to write good unit tests in C#. Many books try to make unit testing into some kind of high level academic topic that reads more like a thesis than just plainly explaining what needs done and why. I like the chapter where the author gives examples of testing with properties, constructors and using the factory pattern. I was immediately able to fit these into my coding using C#. And the author's examples deal with real world issues that we developers face everday, like file dependencies and how to create units tests around these dependencies to test your code with "stubs" effectiviely. So, I give 5 stars because after I read a chapter, I could apply that learning right away. That's how I judge any technical books.
A**N
Awesome book but beware of buying used
The author writes in a way that is extremely easy to follow, the overall learning has been a great experience.As the title states, beware of buying used. I was sent the 1st edition from the book store which is pretty disappointing on their end.
M**R
Great, practical ideas for a task that makes all programming jobs easier.
This book, to me, is a good approach to Unit Testing. Some companies may grumble over Mr. Osherove's approach, but it's clear and concise. His naming approach for the tests makes sense, too, with regard to method names of the tests.This book is a great reference for those who have to do unit testing in C#, but don't have any real formal training in doing so. I do stop short of calling this a "training manual" -- because it isn't. Mr. Osherove's approach makes sense. You start off with the most simple of tests, and go from there, making your tests more robust as you go. He also goes into the "3 A's" of unit testing (Arrange, Act, Assert), and briefly illustrates how to recognize bad and/or brittle tests, as well as how to use effectively use NUnit for the testing.Unit testing makes everyone's job easier. This book is a great way to get started and/or increase your knowledge and skills of Unit Testing. I think it should be on every C# programmer's bookshelf.
Y**V
A great read
This book is good for those who just start to discover test-driven development for themselves. It has plenty of good basic examples of how to start writing tests, what tools to use, what conventions to use and so on. It is also good for those who have been doing TDD for a while as it is sums up author's experience as a consultant. It was an easy yet enlightening read.
B**0
Great for beginning unit testers
I have many years of unit testing and TDD and I have to say while a lot the info in this book wasn’t new to me it’s presented well and would be a great book for someone getting into the practice of unit testing.
K**D
Great book on unit testing
I have just finished chapter 2 and have already learned a lot and an applying it to a project I am working on. The author does an excellent job of explaining what to do, explains all the options pertaining to NUnit and why to use and not use some of them. I feel after completing this book, my code will be more accurate, maintainable and correct.
M**K
Better Books Needed
There are some positive reviews of this book, and I honestly wonder what book these people were reading. I have carefully read the first four chapters, with a particularly strong effort to understand Chapter 3, and I don't care to go any further with this confusing, sloppy book.The author (whom I imagine to be a highly competent developer) seems to be still in the process of making up his mind about what unit testing is really about. He has changed his mind signficantly since the first edition of the book, and says, on page 76: "It's possible that in the next edition of this book I'll have turned 180 degrees on this subject". There is some context to that quote, but I felt like it probably applied to the entire book. Some people have an intuitive grasp of what needs to be done in particular situations, but cannot articulate their ideas effectively and cannot generalize to guiding principles for an entire field of professionals.The subject matter of the book, published in 2013, does not feel at all dated. The author uses C# and NUnit to demonstrate what he's talking about. However, he is constantly telling you what the book is not about. It is not a design book, not a TDD book, not a patterns book. The author constantly refers the reader to other books. Eventually, it has the effect of making the reader feel that they are reading the wrong book.Other criticisms:* The code examples, which could have significantly redeemed the book, are a disaster. They are full of mistakes that the reader must mentally correct. If you make the mistake of downloading the source code from the author's GitHub page, you will find that Chapter 3 is entirely omitted. There is a lot of picky stuff I could say about the source code you get from the text or the Manning site. For instance, what is the point of inheritance when you have only a single child class? Does the author understand what the internal keyword means?* The writing style is overly juvenile. The word "sucks" is employed more than once.* I don't think that the author's use of the vocabulary of unit testing aligns with the currently accepted meanings of terms like stub and mock. For him, the term fake is a collective term for both stubs and mocks. He says on page 77: "A mock object is a fake object in the system that decides whether the unit test has passed or failed. It does so by verifying whether the object under test called the fake object as expected." My first question is, What is this fake that the mock is calling? And my second is, How does that distinguish a mock from a stub? I suppose it could be argued that the answers are implicit in the text, but they are not conspicuous to me. (He says in Chapter 3 that you assert against mocks, but not against stubs. But it seems to me that the examples in Chapter 3 assert against stubs. I don't know!) To be fair, the book is six years old at this point. However, I don't think the author achieves an internal consistency within the book of the terms he is using.Maybe the book is a masterpiece after Chapter 4. Like I said, I am not going further.We need better unit testing books for C#. Manning, generally an excellent tech publisher, has a new one coming out in 2020, and I hope it's a better book. One star is harsh, but I feel that it is necessary to counter the many 5-star reviews. This book deserves to be forgotten and replaced by more lucid texts.
L**R
More than just how to Unit Test
This isn't a huge tome, but it is enough to get you up and writing "Good" unit tests quickly.The book is called "The ART of Unit Testing" for a reason. Roy Osherove is just as concerned (if not more concerned) with explaining how to write quality tests as he is with how to write a functioning test and for good reason - there's no point in writing tests that no one will want to run or understand later!Don't look to this book for a comprehensive API on testing or mocking frameworks, but this book WILL give you the tools you need to understand what a unit test is, what an integration test is, what mocks and stubs are and the differences between them and it will give you enough high level information about many of the most popular testing and mocking frameworks for you to be up and writing tests very quickly.
Trustpilot
2 days ago
1 month ago