Search code examples
jmetertest-plan

Use Beanshell Assertion inside a Critical Section Controller


I'm trying to use Beanshell Assertion inside a Critical Section Controller, but it seems to be ignored. Does someone know why is this behaviour? have I missed something?


Solution

  • JMeter Assertions are executed only in context of the Sampler, if there is no sampler which generates a SampleResult in the Assertion's scope - it will not be executed.

    Also be aware that since JMeter 3.1 you should be using JSR223 Test Elements and Groovy language for scripting so consider migrating to JSR223 Assertion on next available opportunity