Skip to content

Commit 28040d7

Browse files
authored
Merge pull request #202402 from ninallam/ninallam-criteria
Additional metrics and statistics
2 parents 0a4c1dd + 0657fbb commit 28040d7

File tree

5 files changed

+15
-7
lines changed

5 files changed

+15
-7
lines changed

articles/load-testing/how-to-define-test-criteria.md

Lines changed: 13 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -26,23 +26,29 @@ By defining test criteria, you can specify the performance expectations of your
2626

2727
## Load test pass/fail criteria
2828

29-
This section discusses the syntax you use to define Azure Load Testing pass/fail criteria.
29+
This section discusses the syntax of Azure Load Testing pass/fail criteria. When a criterion evaluates to `true`, the load test gets the *failed* status.
3030

31-
You use `Aggregate_function (client_metric) condition value` syntax. When a criterion evaluates to `true`, the load test gets the *failed* status.
31+
The structure of a pass/fail criterion is: `Request: Aggregate_function (client_metric) condition threshold`.
32+
33+
The following table describes the different components:
3234

3335
|Parameter |Description |
3436
|---------|---------|
37+
|`Request` | *Optional.* Name of the sampler in the JMeter script to which the criterion applies. If you don't specify a request name, the criterion applies to the aggregate of all the requests in the script. |
3538
|`Client metric` | *Required.* The client metric on which the criteria should be applied. |
3639
|`Aggregate function` | *Required.* The aggregate function to be applied on the client metric. |
3740
|`Condition` | *Required.* The comparison operator. |
38-
|`Threshold` | *Required.* The numeric value to compare with the client metric.<BR>The threshold evaluates against the aggregated value. |
41+
|`Threshold` | *Required.* The numeric value to compare with the client metric. |
3942

40-
Load Testing supports the following combination of parameters:
43+
Azure Load Testing supports the following metrics:
4144

4245
|Metric |Aggregate function |Threshold |Condition |
4346
|---------|---------|---------|---------|
44-
|`response_time_ms` | `avg` (average) | Integer value, representing number of milliseconds (ms) | `>` (greater than) |
45-
|`error` | `percentage` | Numerical values in the range 0-100, representing a percentage | `>` (greater than) |
47+
|`response_time_ms` | `avg` (average)<BR> `min` (minimum)<BR> `max` (maximum)<BR> `pxx` (percentile), xx can be 50, 90, 95, 99 | Integer value, representing number of milliseconds (ms). | `>` (greater than)<BR> `<` (less than) |
48+
|`latency_ms` | `avg` (average)<BR> `min` (minimum)<BR> `max` (maximum)<BR> `pxx` (percentile), xx can be 50, 90, 95, 99 | Integer value, representing number of milliseconds (ms). | `>` (greater than)<BR> `<` (less than) |
49+
|`error` | `percentage` | Numerical value in the range 0-100, representing a percentage. | `>` (greater than) <BR> `<` (less than) |
50+
|`requests_per_sec` | `avg` (average) | Numerical value with up to two decimal places. | `>` (greater than) <BR> `<` (less than) |
51+
|`requests` | `count` | Integer value. | `>` (greater than) <BR> `<` (less than) |
4652

4753
## Define test pass/fail criteria in the Azure portal
4854

@@ -82,6 +88,7 @@ In this section, you learn how to define load test pass/fail criteria for contin
8288
failureCriteria:
8389
    - avg(response_time_ms) > 300
8490
    - percentage(error) > 20
91+
- GetCustomerDetails: avg(latency_ms) >200
8592
```
8693
8794
1. Save the YAML configuration file.
1.01 KB
Loading
22.2 KB
Loading
-28 KB
Loading

articles/load-testing/reference-test-config-yaml.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ A test configuration uses the following keys:
3030
| `engineInstances` | integer | | *Required*. Number of parallel instances of the test engine to execute the provided test plan. You can update this property to increase the amount of load that the service can generate. |
3131
| `configurationFiles` | array | | List of relevant configuration files or other files that you reference in the Apache JMeter script. For example, a CSV data set file, images, or any other data file. These files will be uploaded to the Azure Load Testing resource alongside the test script. If the files are in a subfolder on your local machine, use file paths that are relative to the location of the test script. <BR><BR>Azure Load Testing currently doesn't support the use of file paths in the JMX file. When you reference an external file in the test script, make sure to only specify the file name. |
3232
| `description` | string | | Short description of the test run. |
33-
| `failureCriteria` | object | | Criteria that indicate failure of the test. Each criterion is in the form of:<BR>`[Aggregate_function] ([client_metric]) > [value]`<BR><BR>- `[Aggregate function] ([client_metric])` is either `avg(response_time_ms)` or `percentage(error).`<BR>- `value` is an integer number. |
33+
| `failureCriteria` | object | | Criteria that indicate when a test should fail. The structure of a pass/fail criterion is: `Request: Aggregate_function (client_metric) condition threshold`. For more information on the supported values, see [Load test pass/fail criteria](./how-to-define-test-criteria.md#load-test-passfail-criteria). |
3434
| `properties` | object | | List of properties to configure the load test. |
3535
| `properties.userPropertyFile` | string | | File to use as an Apache JMeter [user properties file](https://jmeter.apache.org/usermanual/test_plan.html#properties). The file will be uploaded to the Azure Load Testing resource alongside the JMeter test script and other configuration files. If the file is in a subfolder on your local machine, use a path relative to the location of the test script. |
3636
| `splitAllCSVs` | boolean | False | Split the input CSV files evenly across all test engine instances. For more information, see [Read a CSV file in load tests](./how-to-read-csv-data.md#split-csv-input-data-across-test-engines). |
@@ -57,6 +57,7 @@ configurationFiles:
5757
failureCriteria:
5858
- avg(response_time_ms) > 300
5959
- percentage(error) > 50
60+
- GetCustomerDetails: avg(latency_ms) >200
6061
splitAllCSVs: True
6162
env:
6263
- name: my-variable

0 commit comments

Comments
 (0)