This is a multi-part, step-by-step guide, on how to automate software unit testing with TeamCity CI Server. This series is part of several other articles I have published about continuous integration.
TeamCity is one of the favourite CI platforms for professional developers. It is accessible to everyone, supports most of the latest technology stacks, it is user-friendly and relatively easy to configure.
In the last post about the subject, I shared a very detailed, step-by-step guide on how to automate your software builds with TeamCity on a remote server machine. Building your solutions on the server is just the first step. You need to setup a proper automated testing mechanism, and finally a robust automated deployment and distribution.
This post is a step-by-step guide on how to set up your automated testing step. We will be using TeamCity CI process as in the previous posts and ASP.NET MVC 4. For the unit testing framework, we will be using MSTest, Microsoft’s unit testing suit.
This is the breakdown of the guide:
- Part 1: Creating the Sample Project (including unit test project)
- Part 2: Creating the TeamCity Build (building the unit test project)
- Part 3: Configuring Automated Testing
The steps are more condensed, since I already covered a lot about TeamCity setups in previous articles. Hopefully, you are now familiar with the TeamCity interface, and are able to setup the configurations quicker.
Make sure to check out my posts on troubleshooting MSBuild and MSTest. The easiest thing to do to avoid issues, is to have Visual Studio installed on your server. However, must of us prefer to have vanilla server setups and certainly having a full Visual Studio installation on your server is overkill (although you might be required to do so because of licensing agreements).
I hope this series of articles help you and save you time. As usual, feel free to leave your comments and share your experience. Nothing better than a good tech conversation!