TestStartingEventArgs.TestContextProperties 属性

获取一个 IDictionary,该对象包含负载测试中单个测试可用的数据。

命名空间:  Microsoft.VisualStudio.TestTools.LoadTesting
程序集:  Microsoft.VisualStudio.QualityTools.LoadTestFramework(在 Microsoft.VisualStudio.QualityTools.LoadTestFramework.dll 中)

语法

声明
Public ReadOnly Property TestContextProperties As IDictionary(Of String, Object)
public IDictionary<string, Object> TestContextProperties { get; }
public:
property IDictionary<String^, Object^>^ TestContextProperties {
    IDictionary<String^, Object^>^ get ();
}
member TestContextProperties : IDictionary<string, Object> with get
function get TestContextProperties () : IDictionary<String, Object>

属性值

类型:IDictionary<String, Object>
一个 IDictionary

备注

TestContextProperties 由负载测试插件实现使用,以将数据传递给负载测试中包含的单个测试。 这些属性可从单元测试中的 TestContext 对象以及 Web 测试中的 WebTestContext 中获得。

发生 TestStarting 事件时,TestContextProperties 为空。 当您在 TestStarting 事件的事件处理程序中将数据添加到 TestContextProperties 提供的 IDictionary 对象中之后,负载测试引擎将 TestContextProperties 的内容添加到测试上下文。

.NET Framework 安全性

请参阅

参考

TestStartingEventArgs 类

Microsoft.VisualStudio.TestTools.LoadTesting 命名空间

其他资源

如何:创建负载测试插件

About Data Binding