TestContext.BeginTimer Method
When overridden in a derived class, begins a timer with the specified name.
Namespace: Microsoft.VisualStudio.TestTools.UnitTesting
Assembly: Microsoft.VisualStudio.QualityTools.UnitTestFramework (in Microsoft.VisualStudio.QualityTools.UnitTestFramework.dll)
Syntax
'Declaration
Public MustOverride Sub BeginTimer ( _
timerName As String _
)
public abstract void BeginTimer(
string timerName
)
public:
virtual void BeginTimer(
String^ timerName
) abstract
abstract BeginTimer :
timerName:string -> unit
public abstract function BeginTimer(
timerName : String
)
Parameters
timerName
Type: StringThe name of the timer to begin.
Remarks
A timer can be useful when a unit test is run in the context of a load test. In this case, the time between the calls to BeginTimer and EndTimer for a given timerName are reported as transaction times in the load test results.
.NET Framework Security
- Full trust for the immediate caller. This member cannot be used by partially trusted code. For more information, see Using Libraries from Partially Trusted Code.
See Also
Reference
Microsoft.VisualStudio.TestTools.UnitTesting Namespace