LoadTest Class
Represents the load test being run.
Inheritance Hierarchy
Object
Microsoft.VisualStudio.TestTools.LoadTesting.LoadTest
Namespace: Microsoft.VisualStudio.TestTools.LoadTesting
Assembly: Microsoft.VisualStudio.QualityTools.LoadTestFramework (in Microsoft.VisualStudio.QualityTools.LoadTestFramework.dll)
Syntax
'Declaration
Public Class LoadTest
public class LoadTest
public ref class LoadTest
type LoadTest = class end
public class LoadTest
The LoadTest type exposes the following members.
Constructors
Name | Description | |
---|---|---|
LoadTest | Initializes a new instance of the LoadTest class. |
Top
Properties
Name | Description | |
---|---|---|
Context | Gets the LoadTestContext for the current load test run. | |
Name | Gets the name of the load test. | |
RunSettings | Gets the run settings used for the current load test run. | |
Scenarios | Gets a collection of scenarios within the load test. |
Top
Methods
Name | Description | |
---|---|---|
Abort() | Stops the load test on all agents. | |
Abort(Exception) | Stops the load test on all agents and specifies the exception that caused the abort. | |
Equals | Determines whether the specified object is equal to the current object. (Inherited from Object.) | |
Finalize | Allows an object to try to free resources and perform other cleanup operations before it is reclaimed by garbage collection. (Inherited from Object.) | |
GetHashCode | Serves as a hash function for a particular type. (Inherited from Object.) | |
GetType | Gets the Type of the current instance. (Inherited from Object.) | |
MemberwiseClone | Creates a shallow copy of the current Object. (Inherited from Object.) | |
ToString | Returns a string that represents the current object. (Inherited from Object.) |
Top
Events
Name | Description | |
---|---|---|
Heartbeat | Occurs once every second. | |
LoadTestAborted | Occurs when the load test is aborted. | |
LoadTestFinished | Occurs when the load test has stopped running on the agent. | |
LoadTestStarting | Occurs just before the load test begins to run on the agent. | |
LoadTestWarmupComplete | Occurs when the warm-up period has completed. | |
TestFinished | Occurs when an iteration of one of the tests contained within the load test finishes. | |
TestSelected | Occurs every time an iteration of one of the tests contained within the LoadTest is selected. | |
TestStarting | Occurs when an iteration of one of the tests contained within the load test is started. | |
ThresholdExceeded | Occurs when a threshold rule is exceeded. |
Top
Remarks
Load testing is useful for predicting the impact on the performance of an application during high user workloads. This simulates realistic user volumes to define real world conditions that can be used for changing requirements and application design to meet expected quality standards for the software product. Load tests can include both Web and unit tests.
Load test settings can be accessed through the UI or with a load test plug-in. For more information, see How to: Create a Load Test Plug-In.
Note
It is a good practice to run a smoke test before running any intensive load test. For more information, see Guidelines for Smoke Testing. This helps validate configurations and expected behavior of the test.
Thread Safety
Any public static (Shared in Visual Basic) members of this type are thread safe. Any instance members are not guaranteed to be thread safe.
See Also
Reference
Microsoft.VisualStudio.TestTools.LoadTesting Namespace
Other Resources
Working with Load Tests Overview