Not Contains Assertion
The Not Contains assertion verifies that some specific value is missing from the message.
Availability
This assertion is available in multiple ReadyAPI applications. Depending on the application, it validates the following data:
In... | Checks... | To learn more... |
---|---|---|
The request or response contents. | ||
The response contents. | See Security Assertions. | |
The request contents. |
Create an assertion
Setting up properties
In the Content edit box, specify the value you expect to be absent.
Use one of the following:
An ordinary string.
A regular expression.
Note
Make sure to enable the Regular Expression option.
To separate lines within a regular expression, use the
(?m)
flag. Also, mark the beginnings of the lines with^
and the ends with$
.To learn more about the regular expression syntax, see the Oracle Documentation.
Enable additional options if you need:
Option
Description
Ignore Case
Ignore the content case during the search.
Regular Expression
Treat the value you have entered as a regular expression.
To learn more about the syntax of regular expressions, see the Oracle documentation.
Example
The following regular expression gets all strings where the Date
value belongs to September 2014.
(?s).*<Date>2014-09-\d{2}T.{8}</Date>.*
Other assertions for content
Add more assertions for response and request contents: