Skip to content

Commit 4baf623

Browse files
Merge pull request #270320 from ninallam/ninallam-app-service
Create load test in App Service
2 parents 947e803 + b575879 commit 4baf623

8 files changed

+134
-14
lines changed

articles/load-testing/concept-load-test-app-service.md

Lines changed: 9 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -36,17 +36,13 @@ You can create a load test to simulate traffic to your application on Azure App
3636

3737
After you create and run a load test, you can [monitor the resource metrics](#monitor) for the web application and all dependent Azure components to identify performance and scalability issues.
3838

39-
### Create a URL-based quick test
39+
### Create a URL-based load test
4040

41-
You can use the quick test experience to create a load test for a specific endpoint URL, directly from within the Azure portal. For example, use the App Service web app *default domain* to perform a load test of the web application home page.
42-
43-
When you create a URL-based test, you specify the endpoint and basic load test configuration settings, such as the number of [virtual users](./concept-load-testing-concepts.md#virtual-users), test duration, and [ramp-up time](./concept-load-testing-concepts.md#ramp-up-time).
41+
You can create a URL-based load test directly from your Azure App Service web app in the Azure portal. When you create the load test, you can select a specific deployment slot and use the prepopulated endpoint URL.
4442

4543
The following screenshot shows how to create a URL-based load test in the Azure portal.
4644

47-
:::image type="content" source="./media/concept-load-test-app-service/create-quick-test-app-service.png" alt-text="Screenshot that shows the Create quick test in the Azure portal." lightbox="./media/concept-load-test-app-service/create-quick-test-app-service.png":::
48-
49-
Get started by [creating a URL-based load test](./quickstart-create-and-run-load-test.md).
45+
Get started by [creating a URL-based load test for Azure App Service](./how-to-create-load-test-app-service.md).
5046

5147
### Create a load test by uploading a JMeter script
5248

@@ -61,7 +57,7 @@ Azure Load Testing provides high-fidelity support of JMeter. You can create a ne
6157

6258
Get started [create a load test by uploading a JMeter script](./how-to-create-and-run-load-test-with-jmeter-script.md).
6359

64-
If you previously created a [URL-based test](#create-a-url-based-quick-test), Azure Load Testing generates a JMeter test script. You can download this generated test script, modify or extend it, and then reupload the script.
60+
If you previously created a [URL-based test](#create-a-url-based-load-test), Azure Load Testing generates a JMeter test script. You can download this generated test script, modify or extend it, and then reupload the script.
6561

6662
<a name="monitor"/>
6763
## Monitor your apps for bottlenecks and provisioning issues
@@ -74,13 +70,13 @@ During a load test, Azure Load Testing collects [metrics](./concept-load-testing
7470

7571
Use the Azure Load Testing dashboard to analyze the test run metrics and identify performance bottlenecks in your application, or find out if you over-provisioned some compute resources. For example, you could evaluate if the service plan instances are right-sized for your workload.
7672

77-
:::image type="content" source="media/concept-load-test-app-service/load-test-results-dashboard.png" alt-text="Screenshot that shows the load test results dashboard in the Azure portal." lightbox="media/concept-load-test-app-service/load-test-results-dashboard.png":::
73+
:::image type="content" source="./media/concept-load-test-app-service/load-test-results-dashboard.png" alt-text="Screenshot that shows the load test results dashboard in the Azure portal." lightbox="./media/concept-load-test-app-service/load-test-results-dashboard.png":::
7874

7975
Learn more about how to [monitor server-side metrics in Azure Load Testing](./how-to-monitor-server-side-metrics.md).
8076

8177
For applications that are hosted on Azure App Service, you can use [App Service diagnostics](/azure/app-service/overview-diagnostics) to get extra insights into the performance and health of the application. When you add an app service application component to your load test configuration, the load testing dashboard provides a direct link to the App Service diagnostics dashboard for your App service resource.
8278

83-
:::image type="content" source="media/concept-load-test-app-service/test-result-app-service-diagnostics.png" alt-text="Screenshot that shows the 'App Service' section on the load testing dashboard in the Azure portal." lightbox="media/concept-load-test-app-service/test-result-app-service-diagnostics.png":::
79+
:::image type="content" source="./media/concept-load-test-app-service/test-result-app-service-diagnostics.png" alt-text="Screenshot that shows the 'App Service' section on the load testing dashboard in the Azure portal." lightbox="./media/concept-load-test-app-service/test-result-app-service-diagnostics.png":::
8480

8581
## Customize your load test's failure criteria
8682

@@ -100,13 +96,12 @@ One example is using a parameter as an environment variable so you can avoid sto
10096

10197
Another use for parameters is when you want to reuse your test script across multiple [Azure App Service deployment slots](/azure/app-service/deploy-staging-slots). Deployment slots are live apps with their own host names and separate URLs. Use a parameter for the application endpoint and then you can set up staging environments for your application.
10298

103-
:::image type="content" source="media/concept-load-test-app-service/quick-test-parameters.png" alt-text="Screenshot that shows the Parameters page of a quick test in the Azure portal, highlighting the parameters for the target URL." lightbox="media/concept-load-test-app-service/quick-test-parameters.png":::
99+
:::image type="content" source="./media/concept-load-test-app-service/quick-test-parameters.png" alt-text="Screenshot that shows the Parameters page of a quick test in the Azure portal, highlighting the parameters for the target URL." lightbox="./media/concept-load-test-app-service/quick-test-parameters.png":::
104100

105101

106102
## Next steps
107103

108104
Learn how to:
109-
- [Start create a URL-based load test](./quickstart-create-and-run-load-test.md).
110-
- [Identify performance bottlenecks](./tutorial-identify-bottlenecks-azure-portal.md) for Azure applications.
111-
- [Configure your test for high-scale load](./how-to-high-scale-load.md).
105+
- [Create a URL-based load test for Azure App Service](./how-to-create-load-test-app-service.md).
112106
- [Configure automated performance testing](./quickstart-add-load-test-cicd.md).
107+
- [Identify performance bottlenecks](./tutorial-identify-bottlenecks-azure-portal.md) for Azure applications.
Lines changed: 121 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,121 @@
1+
---
2+
title: Create load tests in App Service
3+
titleSuffix: Azure Load Testing
4+
description: Learn how to create a load test for an Azure App Service web app with Azure Load Testing.
5+
services: load-testing
6+
ms.service: load-testing
7+
ms.author: ninallam
8+
author: ninallam
9+
ms.date: 02/17/2024
10+
ms.topic: how-to
11+
---
12+
13+
# Create a load test for Azure App Service web apps
14+
15+
In this article, you learn how to create a load test for an Azure App Service web app with Azure Load Testing. Directly create a URL-based load test from your app service in the Azure portal, and then use the load testing dashboard to analyze performance issues and identify bottlenecks.
16+
17+
With the integrated load testing experience in Azure App Service, you can:
18+
19+
- Create a [URL-based load test](./quickstart-create-and-run-load-test.md) for the app service endpoint or a deployment slot
20+
- View the test runs associated with the app service
21+
- Create a load testing resource
22+
23+
> [!IMPORTANT]
24+
> This feature is currently supported through Microsoft Developer Community. If you are facing any issues, please report it [here](https://developercommunity.microsoft.com/loadtesting/report).
25+
26+
## Prerequisites
27+
28+
- An Azure account with an active subscription. If you don't have an Azure subscription, create a [free account](https://azure.microsoft.com/free/?WT.mc_id=A261C142F) before you begin.
29+
- An Azure App Service web app. If you need to create a web app, see the [App Service Getting started documentation](/azure/app-service/getting-started).
30+
31+
## Create a load test for a web app
32+
33+
You can create a URL-based load test directly from your Azure App Service web app in the Azure portal.
34+
35+
To create a load test for a web app:
36+
37+
1. In the [Azure portal](https://portal.azure.com), go to your Azure App Service web app.
38+
39+
1. On the left pane, select **Load Testing (Preview)** under the **Performance** section.
40+
41+
On this page, you can see the list of tests and the load test runs for this web app.
42+
43+
:::image type="content" source="./media/how-to-create-load-test-app-service/app-service-load-testing.png" lightbox="./media/how-to-create-load-test-app-service/app-service-load-testing.png" alt-text="Screenshot that shows Load Testing page in App Service.":::
44+
45+
1. Optionally, select **Create load testing resource** if you don't have a load testing resource yet.
46+
47+
1. Select **Create test** to start creating a URL-based load test for the web app.
48+
49+
1. On the **Create test** page, first enter the test details:
50+
51+
|Field |Description |
52+
|-|-|
53+
| **Load Testing Resource** | Select your load testing resource. |
54+
| **Test name** | Enter a unique test name. |
55+
| **Test description** | (Optional) Enter a load test description. |
56+
| **Run test after creation** | When selected, the load test starts automatically after creating the test. |
57+
58+
1. If you have multiple deployment slots for the web app, select the **Slot** against which to run the load test.
59+
60+
:::image type="content" source="./media/how-to-create-load-test-app-service/app-service-create-test-resource-configuration.png" lightbox="./media/how-to-create-load-test-app-service/app-service-create-test-resource-configuration.png" alt-text="Screenshot that shows the resource configuration page for creating a test in App Service.":::
61+
62+
1. Select **Add request** to add HTTP requests to the load test:
63+
64+
On the **Add request** page, enter the details for the request:
65+
66+
|Field |Description |
67+
|-|-|
68+
| **Request name** | Unique name within the load test to identify the request. You can use this request name when [defining test criteria](./how-to-define-test-criteria.md). |
69+
| **URL** | Select the base URL for the web endpoint |
70+
| **Path** | (Optional) Enter a URL path name within the web endpoint. The path is appended to the URL to form the endpoint that is load tested. |
71+
| **HTTP method** | Select an HTTP method from the list. Azure Load Testing supports GET, POST, PUT, DELETE, PATCH, HEAD, and OPTIONS. |
72+
| **Query parameters** | (Optional) Enter query string parameters to append to the URL. |
73+
| **Headers** | (Optional) Enter HTTP headers to include in the HTTP request. |
74+
| **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. |
75+
76+
Learn more about [adding HTTP requests to a load test](./how-to-add-requests-to-url-based-test.md).
77+
78+
1. Select the **Load configuration** tab to configure the load parameters for the load test.
79+
80+
81+
|Field |Description |
82+
|-|-|
83+
| **Engine instances** | Enter the number of load test engine instances. The load test runs in parallel across all the engine instances. |
84+
| **Load pattern** | Select the load pattern (linear, step, spike) for ramping up to the target number of virtual users. |
85+
| **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. |
86+
| **Test duration (minutes)** | Enter the duration of the load test in minutes. |
87+
| **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. |
88+
89+
1. Optionally, configure the network settings if the web app is not publicly accessible.
90+
91+
Learn more about [load testing privately hosted endpoints](./how-to-test-private-endpoint.md).
92+
93+
:::image type="content" source="./media/how-to-create-load-test-app-service/app-service-create-test-load-configuration.png" lightbox="./media/how-to-create-load-test-app-service/app-service-create-test-load-configuration.png" alt-text="Screenshot that shows the load configuration page for creating a test in App Service.":::
94+
95+
96+
1. Select **Review + create** to review the test configuration, and then select **Create** to create the load test.
97+
98+
Azure Load Testing now creates the load test. If you selected **Run test after creation** previously, the load test starts automatically.
99+
100+
> [!NOTE]
101+
> If the test was converted from a URL test to a JMX test directly from the Load Testing resource, the test cannot be modified from the App Service.
102+
103+
## View test runs
104+
105+
You can view the list of test runs and a summary overview of the test results directly from within the web app configuration in the Azure portal.
106+
107+
1. In the [Azure portal](https://portal.azure.com), go to your Azure App Service web app.
108+
109+
1. On the left pane, select **Load testing**.
110+
111+
1. In the **Test runs** tab, you can view the list of test runs for your web app.
112+
113+
For each test run, you can view the test details and a summary of the test outcome, such as average response time, throughput, and error state.
114+
115+
1. Select a test run to go to the Azure Load Testing dashboard and analyze the test run details.
116+
117+
:::image type="content" source="./media/how-to-create-load-test-app-service/app-service-test-runs-list.png" lightbox="./media/how-to-create-load-test-app-service/app-service-test-runs-list.png" alt-text="Screenshot that shows the test runs list in App Service.":::
118+
119+
## Next steps
120+
121+
- Learn more about [load testing Azure App Service applications](./concept-load-test-app-service.md).

articles/load-testing/index.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -90,6 +90,8 @@ landingContent:
9090
url: quickstart-add-load-test-cicd.md
9191
- text: Manually add load tests to CI/CD
9292
url: how-to-configure-load-test-cicd.md
93+
- text: Test App Service web apps
94+
url: how-to-create-load-test-app-service.md
9395

9496
# Card
9597
- title: Analyze test results
44.9 KB
Loading
51.4 KB
Loading
107 KB
Loading
84.5 KB
Loading

articles/load-testing/toc.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -53,6 +53,8 @@ items:
5353
href: how-to-define-test-criteria.md
5454
- name: Parameterize load tests
5555
href: how-to-parameterize-load-tests.md
56+
- name: Test App Service web apps
57+
href: how-to-create-load-test-app-service.md
5658
- name: Test private endpoints
5759
displayName: virtual network, vnet, hybrid, on-premises, onprem, private link, subnet
5860
href: how-to-test-private-endpoint.md

0 commit comments

Comments
 (0)