The context provides information about the environment in which a test is executing. A new context is created each time a test or test step begins execution.

Namespace:  Gallio.Model.Contexts
Assembly:  Gallio (in Gallio.dll) Version: 3.3.0.0 (3.3.459.0)

Syntax

C#
public interface ITestContext : IDisposable
Visual Basic (Declaration)
Public Interface ITestContext _
	Implements IDisposable

Remarks

Contexts are arranged in a hierarchy that corresponds to the order in which the contexts were entered. Thus the context for a test likely has as its parent the context for its containing test fixture.

Arbitrary user data can be associated with a context. Furthermore, client code may attach Finishing event handlers to perform resource reclamation or other updates when the test step is finished.

When the context is disposed, its associated test step is automatically marked as being finished unless FinishStep(TestOutcome, Nullable<(Of <(TimeSpan>)>)) was previously called. When this occurs the test step is finished with an outcome of Error.

See Also