Appendix B. Extra tools and frameworks
This book would not be complete without an overview of some tools and basic techniques you can use while writing code. From database testing to UI testing and web testing, this appendix lists tools you should consider. Some of them are used for integration testing, and some allow unit testing. I’ll also mention some that I think are good for beginners.
The tools and techniques listed below are arranged in the following categories:
- Isolation frameworks
- Test frameworks
- Dependency injection and IoC containers
- Database testing
- Web testing
- UI testing
- Thread-related testing
- Acceptance testing
Tip
An updated version of the following list can be found on the book’s wiki site: ArtOfUnitTesting.com.
Let’s begin.
Mock or isolation frameworks are the bread and butter of advanced unittesting scenarios. There are many to choose from, and that’s a great thing:
Here is a short description of each framework.
Moq is an open source newcomer to the world of mocking and has adopted an API that tries to be both simple to learn and easy to use. The API also follows the arrange-act-assert style (as opposed to the record-and-replay model) and relies heavily on .NET 3.5 features, such as lambdas and extension methods. If you’re planning on working with .NET 3.5 exclusively, this is a relatively pain-free learning curve, but you need to feel comfortable with using lambdas.