When playing back a recorded web test with Microsoft Visual Studio Team System 2008 Test Edition SP1 the web test fails due the size of the Response


Scenario:  You have a recorded a web test using Microsoft Visual Studio Team System 2008 Test Edition SP1. When you play back the web test it fails. The actual error message might vary.


Reason:  By default Microsoft Visual Studio Team System 2008 Test Edition SP1   captures the first 1.5 MB of the response; as a result the response is truncated.


Solution 1:


Solution 2: 


      using System;

       using System.Collections.Generic;

         using System.Linq;

       using System.Text;

        using Microsoft.VisualStudio.TestTools.WebTesting;



       namespace PluginSample


            public class Class1 : WebTestPlugin


                public override void PreWebTest(object sender, PreWebTestEventArgs e)


                   e.WebTest.ResponseBodyCaptureLimit = 2000000;





  • To add the Web test plug-in, click Set Web Test Plug-in on the toolbar. This displays your test plug-in in the Set Web Test Plug-in dialog box. Select your class and then click OK.



Comments (4)

  1. Emma says:

    This is very useful. It solved my problem.  I am supprised to see the point not clearly documented out in web performance test. Anyway, big thanks.

  2. I am glad to hear that the blog helped you solve your problem.

  3. youyou says:

    very useful solve my problem too

  4. brfenske says:

    I can report that Visual Studio 2013 still has this issue and your fix solved it.  I've had the problem for years where randomly it appears that ExtractHiddenFields is failing.  Turns out all along it was simply a problem of the response being truncated.  Why, why, why, Microsoft, did you not make this obvious!

Skip to main content