Not Contains assertion is the counterpart for the Contains assertion; this one checks that a specified spring does not exist in the asserted message. It also supports a regular expression.
Similar to “Assertion – Contains”, after clicking on Add Assertion button, the following selection should be made to add a Non-Contains Assertion.
Step 1 − Select Assertion Category – Property Content.
Step 2 − Select Assertion Type – Not Contains.
Step 3 − Click Add.
Step 4 − Validate whether the attribute text ConversionRateResult text is present or not in the response. Enter the text/expected string in the Content textbox that should not present in the response message to get a valid assertion result.
Step 5 − Click OK. If the response message is available, the assertion executes immediately and displays whether the assertion is valid or invalid.
Since ConversionRateResponse is present in the response, Not Contains – Failed is displayed in the assertion list as shown in the above screenshot.