UnitTestOutcome 列挙体

UnitTestOutcome は、実行済みまたは現在実行中のテストの結果をプログラムで確認するために使用します。

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

構文

'宣言
Public Enumeration UnitTestOutcome
public enum UnitTestOutcome
public enum class UnitTestOutcome
type UnitTestOutcome
public enum UnitTestOutcome

メンバー

メンバー名 説明
Failed テストが失敗しました。
Inconclusive Assert。Inconclusive が発生しました。
Passed テストが成功しました。
InProgress テストは現在実行されています。
Error
Timeout
Aborted
Unknown テストの結果が不明です。

解説

このクラスのメンバーには、予測されるすべてのテスト結果のサブセットが含まれます。 詳細については、「主なテスト結果」を参照してください。

このクラスは、テスト メソッドや、単体テストの後に実行されるテスト クリーンアップ メソッドなどから参照できます。

UnitTestOutcome は、TestContext で渡されます。

TestContext.Outcome を UnitTestOutcome.Failed と比較して、特定のテストの結果を確認し、ハード ディスクから一部のファイルを削除するなどの適切なアクションを実行できます。

参照

参照

Microsoft.VisualStudio.TestTools.UnitTesting 名前空間