posts - 4237, comments - 3946, trackbacks - 370

Disclaimer

This was my personal weblog originally hosted by UgiDotNet, written mostly in Italian.

This blog is now part of my new site:
These postings are provided 'AS IS' with no warranties, and confer no rights. The views expressed on this weblog are mine alone and do not necessarily reflect the views of my employers.

Licenza Creative Commons

Tag Cloud

Archives

Post Categories

Code Coverage di Web Services

Io preferisco sempre inserire la logica dei Web Services in una DLL separata, in modo che sia banale da testare con gli Unit Test, avere le informazioni di Code Coverage, etc...

Ma se proprio dovete avere il Code Coverage direttamente dei Web Services (ad esempio dovete verificare della logica contenuta esclusivamente negli ASMX o simili) allora potete seguire questa strada:

The following is the updated process for doing code coverage on web services.
1. Read our team blog on code coverage here, especially scenario 3. Please note the path to vsinstr and vsperfcmd is %vsinstalldir%\Team Tools\Performance tools
2. Build your product and test binaries.
3. Instrument your product binaries using vsinstr as detailed in the blog
4. Reset iis.
5. Start the code coverage collection using vsperfcmd /start… as detailed in the blog
6. Open a VS commandline and go to your binary drop location, eg. dd\tcm_1\binaries\x86dbg\bin\i386, run tests using mstest:
mstest /testcontainer:ActivitiesTests.dll and mstest /testcontainer:ActivityRuntimeTests.dll
7. Reset iis.
8. Stop the code coverage collection using vsperfcmd /shutdown
9. Open the .coverage file that you get in IDE, check the numbers.

Fonte: MSDN Forums

Technorati Tags: , ,

Print | posted on sabato 1 settembre 2007 13:36 |

Comments have been closed on this topic.