Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Jmeter variable assertion

Tags:

jmeter

I want to load string into variables from a local .log file (which works) and then check for a particular string.

I tried Response Assertion but this is only for HTTP responses?

like image 200
ざわ ざわ ZAWA Avatar asked Mar 17 '23 07:03

ざわ ざわ ZAWA


2 Answers

The choices of JMeter Assertion scope are in:

  • Main sample and sub-samples
  • Main sample only
  • Sub-samples only
  • JMeter Variable

You can use Dummy Sampler as a parent for you assertion, assertion should be configured as per below image:

JMeter Variable Assertion

See How to Use JMeter Assertions in 3 Easy Steps guide for more information on using assertions.

like image 81
Dmitri T Avatar answered Apr 27 '23 01:04

Dmitri T


On the Response Assertion, one of the selections should enable you to assert on a variable.

Look for the check box "JMeter Variable" and enter the variable name in the text box next to the option. This will cause the response assertion to look at the value of the variable, not sampler data.

Hope that helps, if not please clarify the question!

like image 29
AA Ron Avatar answered Apr 27 '23 01:04

AA Ron