此类表示与测试执行相关的事件。
继承层次结构
System.Object
  Microsoft.VisualStudio.TestTools.UnitTesting.TestExecution
命名空间:  Microsoft.VisualStudio.TestTools.UnitTesting
程序集:  Microsoft.VisualStudio.QualityTools.UnitTestFramework(在 Microsoft.VisualStudio.QualityTools.UnitTestFramework.dll 中)
语法
声明
Public MustInherit Class TestExecution
public abstract class TestExecution
public ref class TestExecution abstract
[<AbstractClass>]
type TestExecution =  class end
public abstract class TestExecution
TestExecution 类型公开以下成员。
构造函数
| 名称 | 说明 | |
|---|---|---|
| .gif) | TestExecution | 初始化 TestExecution 类的新实例。 | 
页首
属性
| 名称 | 说明 | |
|---|---|---|
| .gif) | RunContext | 获取此测试运行的上下文。 | 
页首
方法
| 名称 | 说明 | |
|---|---|---|
| .gif) | Equals | 确定指定的 Object 是否等于当前的 Object。 (继承自 Object。) | 
| .gif) | Finalize | 允许对象在“垃圾回收”回收之前尝试释放资源并执行其他清理操作。 (继承自 Object。) | 
| .gif) | GetHashCode | 用作特定类型的哈希函数。 (继承自 Object。) | 
| .gif) | GetType | 获取当前实例的 Type。 (继承自 Object。) | 
| .gif) | MemberwiseClone | 创建当前 Object 的浅表副本。 (继承自 Object。) | 
| .gif) | ToString | 返回表示当前对象的字符串。 (继承自 Object。) | 
页首
事件
| 名称 | 说明 | |
|---|---|---|
| .gif) | AfterAssemblyCleanup | 在程序集完成清理后发生。 | 
| .gif) | AfterAssemblyInitialize | 在程序集初始化后发生。 | 
| .gif) | AfterClassCleanup | 在类完成清理后发生。 | 
| .gif) | AfterClassInitialize | 在类初始化后发生。 | 
| .gif) | AfterTestCleanup | 在测试完成清理后发生。 | 
| .gif) | AfterTestInitialize | 在测试初始化后发生。 | 
| .gif) | BeforeAssemblyCleanup | 在程序集开始清理前发生。 | 
| .gif) | BeforeAssemblyInitialize | 在程序集开始初始化前发生。 | 
| .gif) | BeforeClassCleanup | 在类开始清理前发生。 | 
| .gif) | BeforeClassInitialize | 在类开始初始化前发生。 | 
| .gif) | BeforeTestCleanup | 在测试开始清理前发生。 | 
| .gif) | BeforeTestInitialize | 在测试开始初始化前发生。 | 
| .gif) | OnTestStopping | 在测试完成前停止的情况下发生。 | 
页首
线程安全
此类型的任何公共 static(在 Visual Basic 中为 Shared) 成员都是线程安全的。但不保证所有实例成员都是线程安全的。