I'm new to JMeter, I want to validate a JMeter test input variables defined as part of "User Defined Parameters". Let's say I have a variable "sessions" and my tester should pass input values in between 0 to 30 for sessions, if tester passes other than this range the test should not go further and should throw an error with appropriate message.
Is it possible with any kind of JMeter controllers/assertions/... without writing code for validation?
You cannot achieve such validation in GUI without amending JMeter source code but you can check the variable range using scripting.
For example, add a JSR223 Sampler as a child of the first request and put the following code into "Script" area:
Demo:
Make sure you are using Groovy as a language (the option should be default as per JMeter 3.1, if you are using earlier JMeter version for some reason - you will have to choose
groovy
from the "Language" dropdown)