Screencast: 8 minutes with Visual Studio 2008. Easy unit tests and code coverage.

This week I spent my blogging allowance on creating a screencast. This video shows you how easy it is to create unit tests and measure code coverage in VSTS 2008.

 

Video: Creating unit tests and measuring code coverage in VSTS2008

Comments

  • Anonymous
    February 22, 2008
    Charles Sterling on Fixing the Red Boxes of death in Team Explorer connecting to the Team Foundation...

  • Anonymous
    April 01, 2008
    Random numbers should not be used unless: (A) You are running a test a large number of times.  Simply putting in a random number and saying 'go' to test the API once doesn't really buy you anything and probably hurts you by making you believe you can avoid the effort of looking for key number ranges to test. (B) You should always have the ability to repeat a test.  This means the seed should be printed or logged and you should be able to repeat the test with a particular seed.  This is especially important in automated BVT or Stress testing.

  • Anonymous
    April 01, 2008
    John, Very good points about using random numbers in tests. You also shouldn't use random anything for your BVTs. You should also log any random data you come up with clearly in order to provide repros.