Skip to content

Custom Thread Groups - Add support for IteratingController implement#714

Merged
undera merged 2 commits intoundera:masterfrom
abstracta:CTG_3.1_ITERATING_CONTROLLER
Apr 23, 2025
Merged

Custom Thread Groups - Add support for IteratingController implement#714
undera merged 2 commits intoundera:masterfrom
abstracta:CTG_3.1_ITERATING_CONTROLLER

Conversation

@3dgiordano
Copy link
Copy Markdown
Contributor

@3dgiordano 3dgiordano commented Apr 23, 2025

Hi @undera

It was detected that the plugin is not using the IteratingController interface and is therefore not calling the updateIterationIndex method (in VirtualUserController).

The call to this method is responsible for creating the variable in the execution context with the value of the current iteration number of the running Thread Group.
Scripts that use this variable when migrating from Thread Group to some Thread Group in this plugin fail because the current implementation does not create that variable.

It is proposed to incorporate the use of the IteratingController interface in VirtualUserController to call updateIterationIndex to create that variable, just as the native Thread Group currently does with LoopController.

For the methods to be implemented with support for this interface, ideas were taken from JMeter's LoopController implementation (in an attempt to be aligned).

On JMeter 5.2-rc4 was added IteratingController and the updateIterationIndex method (apache/jmeter@b230954)
The change is aligned with the minimum requirement which is version 5.2.1
And the proposal implementation was also tested in JMeter 5.2.1+.

I look forward to your review, as well as any suggestions or changes you think are appropriate.

Regards
David

@undera
Copy link
Copy Markdown
Owner

undera commented Apr 23, 2025

@3dgiordano One question: does IteratingController exist in JMeter 5.2.1? Just making sure we get no compatibility issues with old installations

@3dgiordano
Copy link
Copy Markdown
Contributor Author

Hi @undera

Apologies for not providing this information in the original PR documentation.
JMeter 5.2-rc4 added IteratingController and the updateIterationIndex method in the following commit

apache/jmeter@b230954

I also forgot to mention that it was tested in JMeter 5.2.1 and later.

@undera
Copy link
Copy Markdown
Owner

undera commented Apr 23, 2025

Thank you for clarifications!

@undera undera merged commit f205220 into undera:master Apr 23, 2025
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants