|Summary:||The Once Only controller behaves correctly under a Thread Group or Loop Controller, but otherwise its behaviour is not consistent (or clearly specified)|
|Product:||JMeter||Reporter:||Nikolay Stanoev <stanoev.nikolay>|
|Component:||Main||Assignee:||JMeter issues mailing list <issues>|
|Attachments:||In the example.zip you can find two files which can be used to reproduce the problem|
Description Nikolay Stanoev 2015-04-02 13:20:16 UTC
Only once controller should be executed only once (per thread) if it is under Thread Group element. This works fine if you do not use include controller in the JMX file. But if you use include controller and some of the iterations fail then the only once controller will be executed one more time in the next iteration. You can see a simple example below. Test Plan -> Thread Group ( 1 thread / 10 iterations) -> Only Once Controller -> HTTP request -> Module Controller ( Refer the test fragment below with include controller) -> HTTP request ( make it fail) -> Test Fragment -> Include Controller ( refer a JMX file with one test fragment and a single HTTP request) If you run a test like the one above Only Once Controller will be executed 10 times because there are 10 iterations and due to last step every iteration will fail. Case N2: Test Plan -> Thread Group ( 1 thread / 10 iterations) -> Only Once Controller -> HTTP request -> Module Controller -> HTTP request ( make it fail) -> Test Fragment -> Copy / paste the request from Include Controller. (DO NOT USE INCLUDE CONTROLLER IN THIS STEP) In this case Only Once controller will execute only once. As you can see the only difference in both Test Plans is that in the first one I use Include Controller and in the second one that controller is not used.
Comment 1 Nikolay Stanoev 2015-04-02 13:41:17 UTC
Created attachment 32629 [details] In the example.zip you can find two files which can be used to reproduce the problem Hello, I have created an example which can be used in order to reproduce the problem. While I was creating it I saw that there are some changes in the initial example which I gave and the behavior is consistent ( it does not matter whether the Include Controller is used or not). So it seems that Only Once Controller is executed every time when it is under IF Controller and some of the actions in that controller fails. You can see the attached files in order to reproduce the problem. Is this expected behavior?
Comment 2 Philippe Mouawad 2015-04-16 20:36:57 UTC
Hi, In fact this is a known bug, as per changes (http://jmeter.apache.org/changes.html): The Once Only controller behaves correctly under a Thread Group or Loop Controller, but otherwise its behaviour is not consistent (or clearly specified). So I don't know if it should be fixed.