Junit in Action (英語) ペーパーバック – 2003/10
Kindle 端末は必要ありません。無料 Kindle アプリのいずれかをダウンロードすると、スマートフォン、タブレットPCで Kindle 本をお読みいただけます。
Massol, a specialist in agile offshore software development, illustrates practical testing techniques with real-life examples in this guide to unit-testing Java applications for software developers. He shows how to write automated tests, discusses the advantages of testing a code segment in isolation from the rest of the code, and tells how to decide when an integration test is needed. The book is intended for software architects, developers, members of testing teams, development managers, and extreme programmers. Distributed in the US by Independent Publishers Group. Annotation ©2004 Book News, Inc., Portland, OR (booknews.com)
The only downside to this book is that it is out of date. The JUNIT used in this book (3.8) is not the latest version available. I tested all of the code after downloading it from the web and I found that some of the samples did not work. In some cases, the software is dated. For example, in some chapters, the author uses Maven 1.0 instead of ANT as the build tool. However, for Maven to work, it needs to download several jar files from remote repository to the local repository on your machine. The very first time you run Maven, it is supposed to do this automatically for you before building your project; however, Maven 2.0 is out and the remote repository links with Maven 1.0 is broken which means that you need to download several jar files from google manually and put them in relevant folders - since there are several of them, I eventually gave up after doing a partial configuration. Note that the build files that use Maven 1.0 will not work with Maven 2.0 - you will need to do significant configuration changes in order to get this to work. I am new to Maven (although I am very experienced with ANT), so I did not bother with trying to get these code samples to work. The other thing I noticed is that some of the Cactus examples are not working in this book. In some cases, I had to do configuration changes and in others such as the chapter on unit testing the EJB, I was not yet able to figure out what went wrong. In any case, you can't simply expect to run the code and expect it to work especially in the later chapters!!! Be prepared to spend time to figure out what went wrong and how to fix it.
All in all, it is a nice book on introduction to unit testing and I will certainly recommend it to newcomers to this arena. Also, note that the level of detail and treatment provided in this book is not sufficient for real world projects. I am planning on getting a more advanced book (JUnit Recipies) to complete the picture.
If I wanted to read a novel I would buy one, but I bought a JUnit book and I want to know how. I can recognize a good java books and this is not one of them. It does not cut to the chase, it takes a linear narrative approach throughout in that it sort of assumes in later chapters that you have completed the previous chapters in detail. It assumes you have very little java knowledge and attempts to nurse you through with "gentle encouragement etc" It is also filled with pseudo poetic guff, such as "The exceptional test case is where unit tests really shine". 1) java doesn't shine but stars do as do polished cadillac fenders and 2) even a beginner can see that this should be bread-and-butter unit testing stuff and nothing particularly spectacular. Anyway, the book padded with this sort of guff.
What is it with computer programming authors, some are really expert, clear, and cut to the chase, others just want to express their inner whatever and caring and sharing in their texts, they should readDating Design Patterns and leave the computer market to those who can.