Commit b617ec73 b617ec7328cbd0a9c2badfbd57833010c95eb261 by Christian Gerdes

Readded debug features to Set Request Think Time

1 parent 43e747c9
......@@ -25,6 +25,8 @@ namespace LIL_VSTT_Plugins
[DisplayName("Set Request Think Time"), Description("Changes the thinktime on requests with a set thinktime over 0 to the value of the ThinkTime context parameter")]
public class SetRequestThinkTime : WebTestPlugin
{
[DisplayName("Debug"), DefaultValue(false), Description("Debug logging when thinktime is set on requests")]
public bool DebugMode { get; set; }
public override void PreRequest(object sender, PreRequestEventArgs e)
{
WebTestContext ctx = e.WebTest.Context;
......@@ -34,6 +36,7 @@ namespace LIL_VSTT_Plugins
int tt = Int32.Parse(ctx["ThinkTime"].ToString());
if (e.Request.ThinkTime > 0)
{
if (DebugMode) e.WebTest.AddCommentToResult("Setting Think Time to " + tt);
e.Request.ThinkTime = tt;
}
}
......