Pages

Wednesday 12 November 2008

Tuesday - Unit Testing in Visual Studio

DVP304 - Building fast and secure native applications with VSTS 2008 The good news from this session by Lin Xu: yes, you can run unit-tests against native C++ from VSTS! The catch is you have to write them in C++/CLI and compile the test project with the /clr option. VSTS 2008 also comes with the sort of features that tools like DevPartner offer: Profiling:
  • choose between sampling (takes snapshots at intervals) and instrumentation (records all function calls).
  • instrumentation generates a call tree view
  • performance reports show how much time was spent in each function.
Static analysis:
  • compile with the /analyse option to raise warnings highlighting potential coding mistakes. This tool is based on another one called Prefast.
Coverage:
  • display the portions of code that were executed by the unit-tests.
Lin Xu's powerpoint presentation: https://emea1.msteched.com/resources/presentations1/DVP304_Xu.pptx It turns out that the unit-testing feature alone is also available in the Pro version. Visual Studio Pro Academic on Amazon costs less than £120.

1 comment:

Anonymous said...

Well thx to Lin Xu I have solved one of my problems...I had absolutely no idea how to run unit-tests against native C++ from VSTS...and yes there always seems to be catch...and usually upon hearing what that catch is you say to yourself well I knew that...but frankly I had no idea..so a big thank you is in order...and also I had a look at the slideshow...and I am lovin' it...:)