Skip to content

Commit 588ca48

Browse files
authored
Merge pull request #288009 from ninallam/ninallam-scheduling
Scheduling tests
2 parents 2a6dcb4 + ce9986b commit 588ca48

File tree

2 files changed

+110
-1
lines changed

2 files changed

+110
-1
lines changed
Lines changed: 107 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,107 @@
1+
---
2+
title: Define schedules on load tests
3+
titleSuffix: Azure Load Testing
4+
description: 'Learn how to schedule load tests with Azure Load Testing. Scheduling tests allows you to run tests at a later time or run at a regular cadence.'
5+
services: load-testing
6+
ms.service: azure-load-testing
7+
ms.author: ninallam
8+
author: ninallam
9+
ms.date: 10/09/2024
10+
ms.topic: how-to
11+
---
12+
13+
# Define schedules on load tests
14+
15+
In this article, you learn how to schedule load tests with Azure Load Testing. Scheduling tests allows you to run tests at a later time or run at a regular cadence. Azure Load Testing supports adding one schedule to a test. You can add a schedule to a test after creating it.
16+
17+
## Prerequisites
18+
19+
- 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.
20+
- An Azure load testing resource and test. If you need to create an Azure Load Testing resource and test, see the quickstart [Create and run a load test](./quickstart-create-and-run-load-test.md).
21+
22+
## Add a schedule to a test
23+
24+
1. In the Azure portal, navigate to your load testing resource.
25+
26+
2. In the left pane, select **Tests**.
27+
28+
3. Select the test you want to schedule.
29+
30+
4. In the Schedule pane, select **Add schedule**.
31+
32+
5. In the Add schedule pane, configure the following settings:
33+
34+
| Field | Details |
35+
|-------|---------|
36+
| **Schedule Name** | Enter a name for the schedule. |
37+
| **Start date** | Select the date and time when the test should start. |
38+
| **Time zone** | Select the time zone for the start date time provided. |
39+
| **Recurrence** | Select the frequency at which the test should run. You can choose to run the test once, hourly, daily, weekly, or monthly. Choose cron to specify a custom recurrence pattern. Refer to more settings for each recurrence in the following tables. |
40+
| **End**| Select how you want the schedule to end. You can choose to end the schedule after some occurrences or on a specific date. Alternatively, you can choose not to end the schedule. |
41+
42+
For an hourly recurrence, configure the following settings:
43+
44+
| Field | Details |
45+
|-------|---------|
46+
| **Every** | Enter the number of hours between each test run. For example if you provide six, the schedule runs every six hours at the time specified in start time. |
47+
48+
For a daily recurrence, configure the following settings:
49+
50+
| Field | Details |
51+
|-------|---------|
52+
| **Every** | Enter the number of days between each test run. For example if you provide two, the schedule runs every two days at the time specified in start time. |
53+
54+
For a weekly recurrence, configure the following settings:
55+
56+
| Field | Details |
57+
|-------|---------|
58+
| **Every** | Enter the number of weeks between each test run. |
59+
| **Days** | Select the days of the week when the test should run. If you provided two weeks and selected Monday, the schedule starts on the Monday after the start date and runs every two weeks at the time specified in start time. |
60+
61+
For a monthly recurrence, configure the following settings:
62+
63+
| Field | Details |
64+
|-------|---------|
65+
| **Every** | Enter the number of months between each test run. |
66+
| **Pattern** | Select the pattern for the test to run. You can choose **Date** to run the test on a specific date of the month, for example, on every 10th of the month. You can choose **Day** to run the test on a specific day of the week, for example, on the first Friday of the month. |
67+
68+
For a cron recurrence, configure the following settings:
69+
70+
| Field | Details |
71+
|-------|---------|
72+
| **Cron expression** | Enter a cron expression to specify the recurrence pattern. For example, `0 0 12 1/1 * ? *` runs the test every day at 12:00 PM. |
73+
74+
6. Select **Add** to add the schedule to the test.
75+
76+
> [!NOTE]
77+
> If a scheduled test run is in progress when the next scheduled run is due, the next run is skipped. The next run will be scheduled for the next recurrence time.
78+
79+
## View schedules
80+
81+
You can view the schedule in the Schedule pane of the test. The schedule shows the next run time and the status of the schedule. You can have only one schedule in an active, paused, or disabled state. You can add another schedule after the current schedule is completed or deleted.
82+
83+
You can view the trigger for a test run in the **Test runs** grid of the test. The trigger shows as Scheduled for a scheduled test run. You can filter the test runs grid to view only the scheduled test runs.
84+
85+
86+
## Modify a schedule
87+
88+
You can modify the schedule of a test after adding it. You can also pause or resume a schedule.
89+
90+
> [!NOTE]
91+
> A schedule is disabled if three consecutive test runs of a schedule fail. You can resolve the issues with the test and enable the schedule again from the Schedule pane of the test.
92+
93+
## Next steps
94+
95+
Advance to the next article to learn how to identify performance regressions by defining test fail criteria and comparing test runs.
96+
97+
- [Tutorial: automate regression tests](./quickstart-add-load-test-cicd.md)
98+
- [Define test fail criteria](./how-to-define-test-criteria.md)
99+
- [View performance trends over time](./how-to-compare-multiple-test-runs.md)
100+
101+
102+
103+
104+
105+
106+
107+

articles/load-testing/toc.yml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,9 @@ items:
7070
displayName: secured, certificate, client certificate, password, oauth, security, secure endpoint
7171
href: how-to-test-secured-endpoints.md
7272
- name: Run tests in debug mode
73-
href: how-to-run-tests-in-debug-mode.md
73+
href: how-to-run-tests-in-debug-mode.md
74+
- name: Schedule load tests
75+
href: how-to-schedule-tests.md
7476
- name: Automation
7577
items:
7678
- name: Run load tests in CI/CD

0 commit comments

Comments
 (0)