locked
Code coverage for plug-ins and workflow in Microsoft Dynamics CRM RRS feed

  • Question

  • Hello,

    I am using Visual Studio 2008 Team edition to write some unit tests for plug-ins/workflows in CRM. I also configure the code coverage for my tests.
    Unfortunately, I could not have the code coverage data for the plug-ins/workflows (nearly 0% lines coverage)! 

    I did try to manually perform coverage instruments, then re-sign my assemblies and auto deploy to the CRM folder: C:\Program Files\Microsoft Dynamics CRM\Server\bin\assembly....

    But VS could not cover my plug-ins/workflows. Maybe the problem is due to IIS...

    Anyone who has experiences on this topic, please help me.

    Thank you so much
    Friday, April 17, 2009 4:39 PM

Answers

  • Hi,

    If your IIS CrmAppPool is configured to use domain user, you may need to change it to network service account.
    Don't forget to restart the IIS after you have switched the AppPool identity account.

    Cheers!
    • Marked as answer by MKNguyen Tuesday, April 21, 2009 9:19 AM
    Monday, April 20, 2009 2:45 PM

All replies

  • Hi,

    If your IIS CrmAppPool is configured to use domain user, you may need to change it to network service account.
    Don't forget to restart the IIS after you have switched the AppPool identity account.

    Cheers!
    • Marked as answer by MKNguyen Tuesday, April 21, 2009 9:19 AM
    Monday, April 20, 2009 2:45 PM
  • Hi Ye Wint,

    Thank you very much.

    Previously, I configured the user: /user:"NETWORK SERVICE"

    After looking in the CrmAppPool, I changed to "NETWORKSERVICE" (without space) and it's OK :))

    "C:\Program Files\Microsoft Visual Studio 9.0\Team Tools\Performance Tools\VSPerfCmd.exe" /start:coverage /output:D:\CoverageData.coverage /cs /user:"NETWORKSERVICE"

    Cheers!
    Tuesday, April 21, 2009 9:22 AM