---
title: "Compare Assertion"
description: "Configure the JMeter Compare Assertion assertions: properties, defaults, and practical usage notes for building reliable load tests."
url: https://docs.jmeter.ai/components/compare-assertion/
lastUpdated: 2026-10-01
source: docs.jmeter.ai
---

# Compare Assertion

*Part of the **Assertions** category. Also documented in context in the [full Component Reference](/user-manual/component-reference/#compare-assertion).*

![Compare Assertion](/images/screenshots/assertion/compare.png)

> **Note**
> Compare Assertion **must not be used** during load test as it consumes a lot of resources (memory and CPU). Use it only for either functional testing or
> during Test Plan debugging and Validation.

The Compare Assertion can be used to compare sample results within its scope.
Either the contents or the elapsed time can be compared, and the contents can be filtered before comparison.
The assertion comparisons can be seen in the [Comparison Assertion Visualizer](/components/comparison-assertion-visualizer/).

| Name | Required | Description |
| --- | --- | --- |
| Name | No | Descriptive name for this element that is shown in the tree. |
| Compare Content | Yes | Whether or not to compare the content (response data) |
| Compare Time | Yes | If the value is ≥0, then check if the response time difference is no greater than the value.     I.e. if the value is `0`, then the response times must be exactly equal. |
| Comparison Filters | No | Filters can be used to remove strings from the content comparison.     For example, if the page has a time-stamp, it might be matched with: “`Time: \d\d:\d\d:\d\d`” and replaced with a dummy fixed time “`Time: HH:MM:SS`”. |

## Related

- [Assertions & SLA Validation](/topics/jmeter-assertions-guide/)
- [Full Component Reference](/user-manual/component-reference/)
- [Functions and Variables](/user-manual/functions/)
