How to: Add Support for Load Tests

You can enable your new, custom test type so that you can use it in a load test.

注意

Make sure that your test execution code is thread safe. When it is called under load, a thread is created for each “virtual user” that is being simulated, and the LoadRun method is called on the test adapter.

To add support for load tests

  1. In your TestElement, override the IsLoadTestCandidate property to return true.

  2. In your TestAdapter, implement the ILoadTestAdapter interface, which contains the single LoadRun method.

See Also

Concepts

Implementing Custom Test Types

Other Resources

Working with Load Tests