Freigeben über


VSTS Tester Edition 2008, Code Coverage for WebTest works : do this

Many of us try to get code coverage using webtests, we configure for code coverage etc but end of the day we get Empty code coverage data generated. the Answer is just to follow this process... 

One should be able to get code coverage from web tests if you have the website code. But we have to have the website and your test project in a same solution; so try adding the ASP.Net website, and the test project with web tests to the same solution.

Make sure the web.config of the website is editable (not readonly)

Make sure the aspnet or w3wp woker process account has access on the folder which has the code for the asp.net website.

 Then select your website for instrumentation from within the testrunconfig file.

Or You can select the required Dll explicitly in the testrunconfig Code Coverage tab.

Run the WebTest.

The after test run completed, check the Code coverage results window, you will see the results.

Comments