When built-in elements aren't enough, use JSR223 elements with Groovy (compiled and cached — much faster than BeanShell). Variable in scripts Meaning vars thread variables: vars.get("token"), vars.put("k", "v") props global JMeter properties (shared across threads) prev previous SampleResult (response code, body, time) sampler current sampler (modify before it runs) ctx thread context log write to jmeter.log AssertionResult in JSR223 Assertions: set failure + message Performance rules Tick "Cache compiled script if available" and reference variables via vars.get(), not ${var} inside the script text (that defeats caching). Prefer built-in elements; scripts run per sample on every thread.