How do you test code that uses the TFS Object Model?

I know a number of people who have considered mocking the TFS OM. They've all given it up and put it in the “too hard” basket. The WIT is particularly tricky due to the amount of processing that goes on in the client.

They end up using a real TFS Server in a VPC (such as the VSTS 2008 Trial VPC) with snapshots/undo disks to rollback to a sane state.

Comments (3)
  1. Ianceicys says:

    I think that testing in the VPC is the standard way to ensure that your code works. I am amazed at how much memory is used by the Object Model. I routinely see C# applications that use the OM consumming upwards of 90 megs of memory.

    This high memory usage requires pretty beefy VMs.

  2. Grant Holliday on What product key do I use for TFS Proxy? and How do You test code that uses the TFS…

  3. Mocking the APIs is always a temptation and in Team Build this is particularly easier, but testing against a VM or a test server is usually the easiest process.

Comments are closed.

Skip to main content