0

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?

Ori Marko
  • 56,308
  • 23
  • 131
  • 233
Yair Cohen
  • 417
  • 4
  • 16

2 Answers2

1

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

Dmitri T
  • 159,985
  • 5
  • 83
  • 133
1

assertions apply to all samplers which are in their scope

Assertion, for instance, is hierarchical in the test tree. If its parent is a request, then it is applied to that request. If its parent is a Controller, then it affects all requests that are descendants of that Controller.

Ori Marko
  • 56,308
  • 23
  • 131
  • 233