Readded debug features to Set Request Think Time
Showing
3 changed files
with
3 additions
and
0 deletions
... | @@ -25,6 +25,8 @@ namespace LIL_VSTT_Plugins | ... | @@ -25,6 +25,8 @@ namespace LIL_VSTT_Plugins |
25 | [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")] | 25 | [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")] |
26 | public class SetRequestThinkTime : WebTestPlugin | 26 | public class SetRequestThinkTime : WebTestPlugin |
27 | { | 27 | { |
28 | [DisplayName("Debug"), DefaultValue(false), Description("Debug logging when thinktime is set on requests")] | ||
29 | public bool DebugMode { get; set; } | ||
28 | public override void PreRequest(object sender, PreRequestEventArgs e) | 30 | public override void PreRequest(object sender, PreRequestEventArgs e) |
29 | { | 31 | { |
30 | WebTestContext ctx = e.WebTest.Context; | 32 | WebTestContext ctx = e.WebTest.Context; |
... | @@ -34,6 +36,7 @@ namespace LIL_VSTT_Plugins | ... | @@ -34,6 +36,7 @@ namespace LIL_VSTT_Plugins |
34 | int tt = Int32.Parse(ctx["ThinkTime"].ToString()); | 36 | int tt = Int32.Parse(ctx["ThinkTime"].ToString()); |
35 | if (e.Request.ThinkTime > 0) | 37 | if (e.Request.ThinkTime > 0) |
36 | { | 38 | { |
39 | if (DebugMode) e.WebTest.AddCommentToResult("Setting Think Time to " + tt); | ||
37 | e.Request.ThinkTime = tt; | 40 | e.Request.ThinkTime = tt; |
38 | } | 41 | } |
39 | } | 42 | } | ... | ... |
No preview for this file type
No preview for this file type
-
Please register or sign in to post a comment