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.