BookSee.org
Booksee.org
Главная

xUnit Test Patterns: Refactoring Test Code

Обложка книги xUnit Test Patterns: Refactoring Test Code

xUnit Test Patterns: Refactoring Test Code

I think the title is a bit misleading, because this book is about a lot more than just writing good test code.

I had to port xUnit to an obscure language, and this book was a constant and invaluable source of inspiration for features taken from various testing frameworks that I would otherwise not have known about.



It's a very authoritative book. It contains a lot of examples, but the format is more on the academic side. This means that, in line with any respectable pattern book, you get a theoretical description of what a certain pattern is about before you can actually see any code, or any examples, which may be pages later. This might put some readers off, and admittedly it could have been made less painful. However, to the author's merit, patterns start with a diagram that illustrates the concept at a glance, which I thought was very helpful.



The book is fairly verbose and there are some mildly irritating repetitions - you will be told about 100 times about nUnit's idiosyncratic definition (and implementation) of the concept of fixture and how the author once managed to make a test suite 50 (fifty! cinquenta! L!) times quicker by using an in-memory database.

To be fair, however, repetitions are probably inevitable in a reference book, especially considering that there is a chunky introductory first part (250 pages) that wraps the main patterns together in a more conversational style.



Presumably due to the author's background, the book is clearly biased towards Java, and so that's how the vast majority of example code is written in, plus you sometimes get rather local terminology or concepts. There is very good coverage of the various Java and .NET frameworks (not just xUnit, also Fit and others), with some Smalltalk and Ruby references as appropriate. C++ is hardly ever mentioned. If you want better C++ coverage, you may want to have a look at Michael Feather's book "Working Effectively with Legacy Code", which I see as complementary to this.



But I probably focus on the negatives. All in all, this book is choke-full of excellent expert advice that I simply wouldn't know where to get from otherwise, and therefore it deserves five stars.
Ссылка удалена правообладателем
----
The book removed at the request of the copyright holder.
Популярные книги за неделю:
Только что пользователи скачали эти книги: