If you’ve been writing unit tests for some time or seen a good presentation on how to write unit tests you probably heard the “One assert per test” rule. There are real benefits in having only one assert in each tests – you get a focused tests, it’s easier to understand what caused the test … Continue reading Multiple asserts – done right
Tag: MSTest
Unit testing custom StyleCop rules using Typemock Isolator
I’ve never was a big fan of “coding standard” – Although I always thought that the same style should be kept throughout a project or even the entire company’s code base - the idea of forcing developers to write the same code based on a document nobody ever read seemed just wrong. Fast forward a … Continue reading Unit testing custom StyleCop rules using Typemock Isolator
How to run your unit tests as part of TFS build
Writing unit tests is good, having a build server that run the unit test on each commit/check-in is great! In the past I’ve used TeamCity and FinalBuilder to administer my builds and run my tests, it was easy and painless and it worked. Unfortunately we cannot always decide our organization build strategy and if … Continue reading How to run your unit tests as part of TFS build
Why support more? The story of MSTest…
With the new Visual Studio comes another version of Microsoft’s unit testing framework. This is Microsoft’s take on how unit testing should be done and they got a few things right – as always it’s fully integrated with Visual Studio, and with the new version comes a two exciting new features: Run tests as 64 … Continue reading Why support more? The story of MSTest…
VS2010 Tip – How to run unit tests in 64bit process
One of the reason I used to prefer NUnit was that I could run my tests as x86 or x64 depending on what I needed. I was always strange that Microsoft unit testing framework didn’t have this ability. Luckily for use it seems that Microsoft heard our pain and decided to enable us to run … Continue reading VS2010 Tip – How to run unit tests in 64bit process
VS2010 tip: How to run unit tests in parallel
Running unit tests can take some time – at Typemock we have about 4,000 unit tests and running them takes 15 minuets. If you always wished it to take half the time (or a quarter of the time) – wait no more! Visual Studio 2010 has a hidden feature called parallel test execution – which … Continue reading VS2010 tip: How to run unit tests in parallel
#Nose – the unit test discovery tool
One of the benefits of programming in C#/VB.NET is amount of tools available - from Visual Studio to build servers to unit testing frameworks it seems that there is a tool for every job. I thought that my .NET tool belt has everything I need until recently, while learning Python (actually IronPython) I’ve discovered Python-Nose … Continue reading #Nose – the unit test discovery tool
Checking expected exception message when using MS Test
In Typemock we use both NUnit and MSTest to run our unit tests. This practice enables us to check that Isolator works fine on both unit testing framework. Most of NUnit attributes can be translated fully into MSTest attributes (and vise-versa) there is one attribute we tend to use that works differently in MSTest - … Continue reading Checking expected exception message when using MS Test
Fix – Visual Studio crash when running MSTest
Today during work I had a very annoying issue - whenever I've run the project unit test suite (using MSTest) Visual Studio disappeared. This is the first time I saw it crash like this without any error message or even an exception it just vanished. I've gone through the regular routine of restarting windows and … Continue reading Fix – Visual Studio crash when running MSTest
How to convert a .NET class library to MS-Test project
In the past I used NUnit for all my unit testing needs it was free and worked fine. Creating a test class all I needed to do was to create a class library (dll) and add the needed attributes and start writing my tests. Now I use Microsoft's testing framework that shipped with Team System … Continue reading How to convert a .NET class library to MS-Test project