다음을 통해 공유


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
Public method LoadTest Initializes a new instance of the LoadTest class.

Top

Properties

  Name Description
Public property Context Gets the LoadTestContext for the current load test run.
Public property Name Gets the name of the load test.
Public property RunSettings Gets the run settings used for the current load test run.
Public property Scenarios Gets a collection of scenarios within the load test.

Top

Methods

  Name Description
Public method Abort() Stops the load test on all agents.
Public method Abort(Exception) Stops the load test on all agents and specifies the exception that caused the abort.
Public method Equals Determines whether the specified object is equal to the current object. (Inherited from Object.)
Protected method Finalize Allows an object to try to free resources and perform other cleanup operations before it is reclaimed by garbage collection. (Inherited from Object.)
Public method GetHashCode Serves as the default hash function. (Inherited from Object.)
Public method GetType Gets the Type of the current instance. (Inherited from Object.)
Protected method MemberwiseClone Creates a shallow copy of the current Object. (Inherited from Object.)
Public method ToString Returns a string that represents the current object. (Inherited from Object.)

Top

Events

  Name Description
Public event Heartbeat Occurs once every second.
Public event LoadTestAborted Occurs when the load test is aborted.
Public event LoadTestFinished Occurs when the load test has stopped running on the agent.
Public event LoadTestStarting Occurs just before the load test begins to run on the agent.
Public event LoadTestWarmupComplete Occurs when the warm-up period has completed.
Public event TestFinished Occurs when an iteration of one of the tests contained within the load test finishes.
Public event TestSelected Occurs every time an iteration of one of the tests contained within the LoadTest is selected.
Public event TestStarting Occurs when an iteration of one of the tests contained within the load test is started.
Public event 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

Working with Load Tests Overview

Creating a Load Test

How To: Create a Load Test

Editing a Load Test

[retired] Running Load Tests

Monitoring and Analyzing a Load Test Run

Performing Advanced Load Test Tasks