If you develop, test, or manage .NET software, you will find .NET Test Automation Recipes: A Problem-Solution Approach very useful. The book presents practical techniques for writing lightweight software test automation in a .NET environment and covers API testing thoroughly.
It also discusses lightweight, custom Windows application UI automation and teaches you low-level web application UI automation. Additional material covers SQL stored procedure testing techniques.
The examples in this book have been successfully used in seminars and teaching environments where they have proven highly effective for students who are learning intermediate-level .NET programming. You'll come away from the book knowing how to write production-quality combination and permutation methods.
Review By: Noreen Dertinger 12/07/2007
.NET Test Automation Recipes presents techniques for writing "lightweight" software test automation in a .NET environment. James McCaffrey defines lightweight automation as "small, dedicated test harness programs that are typically two pages of source code or less in length and take less than two hours to write." The author intends this technique to complement other software testing paradigms. The advantage of the lightweight approach is that automation can be quickly created for unique (one of a kind) problems or special situations. On the downside, McCaffrey acknowledges that because such tests can be quickly created, testing efforts could become overwhelmed through the volume of test harnesses and related data and test cases result files that could be created.
This book is intended for software testers, developers, and managers who work with .NET technology and assumes the reader has a basic familiarity with .NET programming. According to the author, the examples in the book have been used in seminars with audiences whose skill level ranged from beginning to advanced. Readers who are not too familiar with .NET programming may be well served by referring to a related book: A Tester’s Guide to .NET Programming by Randal Root and Mary Romero Sweeney. (Mary Romero Sweeney is the author of Visual Basic for Testers, which some readers may be familiar with.)
Dr. McCaffrey has divided .NET Test Automation Recipes into three parts: Part 1: Windows Application Testing; Part 2: Web Application Testing, and Part 3: Data Testing. He utilizes a simple template for the presentation of each of his code examples: a short definition of the problem that the example strives to solve, a brief explanation of what it does (design), the code example itself (solution) and comments on the overall example presented.
I found this book interesting from the perspective of an manual tester as well as a tester interested in creating test automation to address particular testing tasks. Aside from re-iterating the main benefits of test automation over manual testing (speed, accuracy, precision, and efficiency–as well as skill building) the author does not spend time making the case for why test automation can be beneficial. He focuses on presenting the key samples related to various categories (the previously mentioned Windows Application Testing, Web Application Testing, and Data Testing), that will allow readers to customize and develop their own test harnesses based on their specific requirements. The last section of each chapter presents a standalone, "lightweight" testing program to help readers understand how the different topics presented in each chapter can be combined to work together.
The author has assumed that the reader has a basic understanding of a programming language and can follow the C# based examples. The reader should have the ability to spot errors (intentional or otherwise) in the code samples. For such an audience, the comments, in conjunction with the solutions and code samples included therein, helped clearly explain how one might approach the automation of a particular task. The discussions of the problems and its solutions are approachable and accessible to the beginner, or a reader less familiar with technical terminology, while not making it too basic for the more advanced reader. The best way to understand specific code examples is to work with them and try them out. To this end, an electronic copy of the code samples from the end of each chapter is available on the publisher’s (Apress) Web site. The code examples in this volume are written in C#, but the author claims that these can be easily reworked into Visual Basic.
Overall, I would recommend those working in a .NET environment who are looking to create lightweight tests consider reading .NET Test Automation Recipes. Because of its focus on a specific environment (the .NET environment) which, in accordance with ongoing technological advances, will eventually be superseded by newer technologies, I rated this book as recommended rather than one of the higher categories. Also, not all test environments use .NET; within the .NET community, only a specific subgroup may be able to make beneficial use of the technique presented by the author.