Assertions
in JMeter
Assertions in JMeter
is verification points in performance testing. Using assertions, we can verify
the response of any request as per our test designed. In other words, Assertions
are verification methods applied to output of test as checkpoints.
How to add Assertion:
-Reponses
Assertion:
The response
assertion used in test scripts to validate a pattern in the response body,
header, code, message etc.
Reponses Assertion Template
has below mentioned fields:
Contains - If the response text contains
the regular expression to be matched
Matches - If the whole response text
matches the regular expression
Equals - If the whole response text
matches the pattern(not regular expression but the pattern string)
Substring - If the response text contains
the pattern(not regular expression)
Not - To check that
the pattern is not present in the response text
- HTML Assertion
The HTML assertion is
used to check the HTML syntax of the response.
-Size Assertion
The size assertion is
used to validate the size of the response with a specified value in bytes.
-Compare Assertion
The Compare Assertion
is used to compare sampler results.
-BSF Assertion
The BSF Assertion is
used to validate the sampler result using BSF scripting.
-Duration Assertion
The duration
assertion is used to validate that the sampler request gets processed within a
specified amount of time.
-XML Assertion
The XML assertion is
used to validate that the response follows a valid XML syntax.
-XML Schema Assertion
The XML Schema
Assertion is used to validate the response against a specified XML schema.
-XPath Assertion
The XPath assertion
is used to validate the response using XPath expressions.
-MD5Hex Assertion
The MD5Hex Assertion
is used to validate the sampler result by checking its MD5Hex hashcode against
a hashcode value provided.
-SMIME Assertion
The SMIME Assertion
is used to validate the body of a MIME message.
-JSR223 Assertion
The JSR223 Assertion
is used to validate the sampler result using JSR223 scripting.
Please let me know
you guys want any specific assertion type to need to be explained.
Happy Testing!!!
Comments
Post a Comment