Share via


TestContext.Properties プロパティ

派生クラスでオーバーライドされた場合に、テスト プロパティを取得します。

名前空間:  Microsoft.VisualStudio.TestTools.UnitTesting
アセンブリ:  Microsoft.VisualStudio.QualityTools.UnitTestFramework (Microsoft.VisualStudio.QualityTools.UnitTestFramework.dll 内)

構文

'宣言
Public MustOverride ReadOnly Property Properties As IDictionary
    Get
public abstract IDictionary Properties { get; }
public:
virtual property IDictionary^ Properties {
    IDictionary^ get () abstract;
}
abstract Properties : IDictionary
abstract function get Properties () : IDictionary

プロパティ値

型: System.Collections.IDictionary
テスト プロパティを表すキーと値のペアを格納する IDictionary オブジェクト。

解説

このメンバーは、テストおよび実行コンテキストを含みます。 このコレクションの各エントリは、キー文字列とオブジェクト値を含むジェネリック KeyValuePair<TKey, TValue> です。 有効な TestContext プロパティ キーを次に示します。

  • TotalAgents

  • ControllerName

  • AgentWeighting

  • AgentName

  • TestDeploymentDir

  • AgentId

  • TestLogsDir

  • TestDir

  • TestName

.NET Framework セキュリティ

  • 直前の呼び出し元に対する完全な信頼。 このメンバーは、部分的に信頼されているコードから使用することはできません。 詳細については、「部分信頼コードからのライブラリの使用」を参照してください。

参照

参照

TestContext クラス

Microsoft.VisualStudio.TestTools.UnitTesting 名前空間

その他の技術情報

Using the TestContext Class