public override void PostRequest(object sender, PostRequestEventArgs e)
        {
            base.PostRequest(sender, e);
            ITestContext context = e.WebTest.Context[TestContextConst.ContextKey] as ITestContext;

            context.SetEventArgs(e);
            //TestContext.Context.SetEventArgs(e);
        }
        public override void PreRequestDataBinding(object sender, PreRequestDataBindingEventArgs e)
        {
            base.PreRequestDataBinding(sender, e);
            ITestContext context = e.WebTest.Context[TestContextConst.ContextKey] as ITestContext;

            context.SetEventArgs(e);
            //TestContext.Context.SetEventArgs(e);
            e.Request.Headers.Add(HtmlHeaderConst.Authorization, AuthenticationInfo.Authorization.Auth);
            e.Request.Url = TemplateHelper.CompileTemplate(e.Request.Url, context);

            //only handle this for http post with body
            if (!(e.Request.Body is StringHttpBody))
            {
                return;
            }
            StringHttpBody request = e.Request.Body as StringHttpBody;
            string         json    = request.BodyString;

            json = TemplateHelper.CompileTemplate(json, context);
            request.BodyString = json;
        }