apache / jmeter

Apache JMeter open-source load testing tool for analyzing and measuring the performance of a variety of services
https://jmeter.apache.org/
Apache License 2.0
8.09k stars 2.05k forks source link

Add JSR223 Logic Controller #4560

Open asfimport opened 6 years ago

asfimport commented 6 years ago

orimarko (Bug 61711): JSR223 elements exists in most components but not as Logic Controller

If Controller have issues as performance issue and it isn't straight forward

In the code of JSR223 you can choose your condition, if it's once only or a loop (while controller).

There's a need for a implementation of module controller to execute same code from different flows

There's a need for a JSR223 Critical Section Controller , currently doesn't prevent dead locks.

Other Logic Controllers can be executed/used inside JSR223 Controller

Votes in Bugzilla: 2 OS: All

asfimport commented 6 years ago

@pmouawad (migrated from Bugzilla): How do you see this ? While, Sampler, Pre/Post Processor, Listener , Assertion have 1 method.

The difference with Controller is that there are many methods to implement, so I don't see how we could provide this as JSR223

asfimport commented 6 years ago

orimarko (migrated from Bugzilla): I see it as a overriding WhileController, the condition will be JSR223 script which will return true/false at the end,

Also we can add a flag as Execute Once so it can be executed as If (/Once Only) Controller that will execute only once the the condition.

Also if script only return true and execute once - it will act as Simple Controller

Note : Different scripts (pre defined maybe) can represent different controllers, but this is for future use.