示例以下代码创建一个自定义请求插件,该插件访问在 WebTestContext 和 WebTestResponse 中找到的信息。using System;using System.Collections.Generic;using System.Windows.Forms;using Microsoft.VisualStudio.TestTools.WebTesting;namespace PluginNamespace{public class MyWebPlugin : WebTestPlugin{public override void Post(object sender, PostEventArgs e){MessageBox.Show(e.WebTest.Context.AgentName);}public override void Pre(object sender, PreEventArgs e){MessageBox.Show(e..Url);}}}