ASP.NET Core load/stress testing
Load testing and stress testing are important to ensure a web app is performant and scalable. Their goals are different even though they often share similar tests.
Load tests – Test whether the app can handle a specified load of users for a certain scenario while still satisfying the response goal. The app is run under normal conditions.
Stress tests – Test app stability when running under extreme conditions, often for a long period of time. The tests place high user load, either spikes or gradually increasing load, on the app, or they limit the app's computing resources.
Stress tests determine if an app under stress can recover from failure and gracefully return to expected behavior. Under stress, the app isn't run under normal conditions.
Visual Studio 2019 is the last version of Visual Studio with load test features. For customers requiring load testing tools in the future, we recommend alternate tools, such as Apache JMeter, Akamai CloudTest, and BlazeMeter. For more information, see the Visual Studio 2019 Release Notes.
The load testing service in Azure DevOps is ending in 2020. For more information, see Cloud-based load testing service end of life.
Visual Studio tools
Visual Studio allows users to create, develop, and debug web performance and load tests. An option is available to create tests by recording actions in a web browser.
For information on how to create, configure, and run a load test projects using Visual Studio 2017, see Quickstart: Create a load test project.
Load tests can be configured to run on-premise or run in the cloud using Azure DevOps.
Load test runs can be started using the Azure DevOps Test Plans service.
The service supports the following test formats:
- Visual Studio – Web test created in Visual Studio.
- HTTP Archive – Captured HTTP traffic inside archive is replayed during testing.
- URL-based – Allows specifying URLs to load test, request types, headers, and query strings. Run setting parameters such as duration, load pattern, and number of users can be configured.
- Apache JMeter.
Azure portal allows setting up and running load testing of web apps directly from the Performance tab of the App Service in Azure portal.
The test can be a manual test with a specified URL or a Visual Studio Web Test file, which can test multiple URLs.
At end of the test, generated reports show the performance characteristics of the app. Example statistics include:
- Average response time
- Max throughput: requests per second
- Failure percentage
The following list contains third-party web performance tools with various feature sets: