Search code examples
jmeter

JMeter - Assert on a variable


I have a regular expression that returns the below value:

enter image description here

The texts "HRDEV-Scotty-Testing" and "rtc-test-eus-sbc.rtc.hrdev.io" need to be searched in this value.

If found, mark the sample as "Pass" else "Fail".

How do I implement this? Please help.

Thanks for your support.

Regards, Ajith


Solution

  • Response Assertion has possibility to check the variable:

    enter image description here

    See How to Use JMeter Assertions in Three Easy Steps for more information on how to apply custom pass/fail criteria to your performance tests using various JMeter Assertions