Unit Tests Gone Nuts

I recently updated some code on a project that contains some unit tests. To verify that everything is working well, I executed the unit tests and they were failing but when I executed them in Debug mode - they all passed. The unit tests seem to fail only in Run mode and not in Debug mode.

I can't figure out what went wrong until I discovered this. Apparently, when Code Coverage is enabled, the assemblies don't seem to get updated after compilation. To solve the issue, disable Code Coverage and everything will work just fine.

Unit tests are some of the things that most fresh developers would complain about - labeling it being tedious and waste of time. This silly Visual Studio bug really didn't do much in helping the situation. Amazingly, it still exists in Visual Studio 2010 SP1.

No comments:

Post a Comment

Popular Post