Skip to content

Size Assertion

Configure the JMeter Size Assertion assertions: properties, defaults, and practical usage notes for building reliable load tests.

Difficulty
intermediate
Guide type
reference
Estimated read time
1 min read
Last verified version
Verified JMeter 5.6

Part of the Assertions category. Also documented in context in the full Component Reference.

Size Assertion

The Size Assertion tests that each response contains the right number of bytes in it. You can specify that the size be equal to, greater than, less than, or not equal to a given number of bytes.

NameRequiredDescription
NameNoDescriptive name for this element that is shown in the tree.
Apply to:YesThis is for use with samplers that can generate sub-samples, e.g. HTTP Sampler with embedded resources, Mail Reader or samples generated by the Transaction Controller. - Main sample only - assertion only applies to the main sample - Sub-samples only - assertion only applies to the sub-samples - Main sample and sub-samples - assertion applies to both. - JMeter Variable Name to use - assertion is to be applied to the contents of the named variable
Size in bytesYesThe number of bytes to use in testing the size of the response (or value of the JMeter variable).
Type of ComparisonYesWhether to test that the response is equal to, greater than, less than, or not equal to, the number of bytes specified.
On this page