Commit 375b6d2f 375b6d2f24267d08970c88385a2f52f670769bcd by Christian Gerdes

New WebTest Plugin to set Response Body Bytes Limit

1 parent 2171274d
......@@ -538,7 +538,8 @@ namespace LIL_VSTT_Plugins
{
rx = new Regex(DepRegex);
}
e.WebTest.ResponseBodyCaptureLimit = 10000000;
// We cant do this here, replaced by SetResponseBodyCaptureLimitWebTestPlugin
//e.WebTest.ResponseBodyCaptureLimit = 10000000;
if (e.Request.HasDependentRequests)
{
foreach (WebTestRequest r in e.Request.DependentRequests)
......@@ -563,6 +564,20 @@ namespace LIL_VSTT_Plugins
}
}
[DisplayName("Response Body Capture Limit"), Description("Sets the Response Body Byte Capture Limit for this WebTest. Warning, this can increase memory and cpu usage on the agents.")]
public class SetResponseBodyCaptureLimit : WebTestPlugin
{
[DisplayName("Limit Bytes"), Description("The number of bytes to set the limit to. Default value is 1.5 MB")]
[DefaultValue(1572864)]
public int Limit { get; set; }
public override void PreWebTest(object sender, PreWebTestEventArgs e)
{
e.WebTest.ResponseBodyCaptureLimit = Limit;
}
}
[DisplayName("Regular Expression Loop"), Description("Loop Condition that matches once on each regexp in previous response body")]
public class RegExpLoop : ConditionalRule
{
......