2
votes

I have a Test Plan that contains the following:

Test Fragment 1

  • BSF Sampler 1
  • BSF Sampler 2

Test Fragment 2

  • BSF Post Processor

ThreadGroup 1

  • Module Controller 1 to call Test Fragment 1

ThreadGroup 2

  • Sampler 1
  • Sampler 2
  • ...
  • Sampler n
  • Module Controller 2 to call Test Fragment 2

The first Test Fragment is called and executed successfully. The issue is that Test Fragment 2 is either not called or not executed correctly. Being a BSF Post Processor, this should be called after each Sampler in the ThreadGroup, and write in a file some variables. This does not happen.

Could anyone shine some light on this and on why this would not work correctly?

The code from Test Fragment 2 works OK if I just put it in the ThreadGroup2, but this is not what I want.

1

1 Answers

1
votes

You are misunderstanding the POST PROCESSOR concept. It does not execute by itself, it only runs after a Sampler has run. So it is absolutely regular that it does not execute since it is the only member of the Test Fragment. So switch to BSF Sampler instead.

See:

Following your last comment, you will need to drop the Module Controller and Test Fragment.

Just put the Post Processor in the general scope , it will execute after each sampler, see: