MbUnit and Visual Studio
Once you’ve got the hang of writing tests with MbUnit, running them and debugging with them, there are several ways to speed up your test-driven development within Visual Studio.
- Once you’ve settled on your preferred way to set up your test-driven solutions be they in source control or not, you could create a reusable project template for your team. There's a good example of a simple template here.
- Likewise, if you find yourself writing the same code time and time again, you might like to create your own code snippets for use within Visual Studio. Microsoft has an official guide to creating these here. TechRepublic also has a good guide to their creation. We also include a selection of snippets with the MbUnit installation. Click here for a complete rundown of what they do and how to install them.
- One great hassle of using the MbUnit console and GUI runners is that you have to leave Visual Studio to use them. Why not have a look at TestDriven.NET, an add-in for Visual Studio that lets you execute your tests inside Visual Studio? Find out more here.
- If you already use Resharper, you may be interested to know that there is a freely available module for it which enables it to run MbUnit tests. Find out more here.
- You can create executable self-test assemblies with MbUnit.
If you have any more ideas and tips, please let us know and we’ll add them here.
