Learn how to create a load test for an app in Azure Functions with Azure Load Testing. In this article, you'll learn how to create a URL-based load test for your function app in the Azure portal, and then use the load testing dashboard to analyze performance issues and identify bottlenecks.
With the integrated load testing experience in Azure Functions, you can:
On the left pane, select Load Testing (Preview) under the Performance section.
On this page, you can see the list of tests and the load test runs for this function app.
Optionally, select Create load testing resource if you don't have a load testing resource yet.
Select Create test to start creating a URL-based load test for the function app.
On the Create test page, first enter the test details:
Field
Description
Load Testing Resource
Select your load testing resource.
Test name
Enter a unique test name.
Test description
(Optional) Enter a load test description.
Run test after creation
When selected, the load test starts automatically after creating the test.
Select Add request to add HTTP requests to the load test:
On the Add request page, enter the details for the request:
Field
Description
Request name
Unique name within the load test to identify the request. You can use this request name when defining test criteria.
Function name
Select the function that you want to test
Key
Select the key required for accessing the function
HTTP method
Select an HTTP method from the list. Azure Load Testing supports GET, POST, PUT, DELETE, PATCH, HEAD, and OPTIONS.
Query parameters
(Optional) Enter query string parameters to append to the URL.
Headers
(Optional) Enter HTTP headers to include in the HTTP request.
Body
(Optional) Depending on the HTTP method, you can specify the HTTP body content. Azure Load Testing supports the following formats: raw data, JSON view, JavaScript, HTML, and XML.
Select the Load configuration tab to configure the load parameters for the load test.
Field
Description
Engine instances
Enter the number of load test engine instances. The load test runs in parallel across all the engine instances.
Load pattern
Select the load pattern (linear, step, spike) for ramping up to the target number of virtual users.
Concurrent users per engine
Enter the number of virtual users to simulate on each of the test engines. The total number of virtual users for the load test is: #test engines * #users per engine.
Test duration (minutes)
Enter the duration of the load test in minutes.
Ramp-up time (minutes)
Enter the ramp-up time of the load test in minutes. The ramp-up time is the time it takes to reach the target number of virtual users.
Optionally, configure the network settings if the function app isn't publicly accessible.
Learn how to optimize application performance by simulating real-world loads with Azure Load Testing service. Learn how to automate load testing with GitHub Actions to ensure consistent application performance and scalability.
Build end-to-end solutions in Microsoft Azure to create Azure Functions, implement and manage web apps, develop solutions utilizing Azure storage, and more.