JDBC Child of While Controller Only Included In First Thread Loop?
I've been using JMeter for 3 weeks now and I'm struggling! I have a test to emulate 8000 XML submissions into a system (systemA), the application.status column (in DB) is populated with a numeric '1', systemA does some processing on the record and then once completed, the application.status column is updated to numeric '6'. Essentially - I need to check the time it takes for the status column to get set to 6 - i.e. I need to verify the time the record takes to get to be completed takes less than 60 seconds.
My environment is as follows: Jmeter v2.11, Oracle 12, JDK 7
My current Thread Plan is as follows:
Thread Group: No. of Users 1, Loop Count 3
-CSV Config Data: (supplying csv values for populating an XML instance)
-Beanshell Sampler: (to create an XML message)
-Beanshell Sampler (to submit XML to a web service)
--JDBC Request-->select status from application where applicationID = (select max(application_id) from application); Variable Name = status
Now - if the Loop Count is 1 - the above works fine - i.e. it runs through the thread and the JDBC request executes UNTIL the application.status column is set to 6.
HOWEVER - if the Loop Count >1, the JDBC request is NOT executed for thread loops excepting the first loop.
To reiterate - the JDBC request is ONLY executed the for the first loop, subsequent loops don't execute, so that for subsequent loops, the View Results Listener indicates the Beanshell Sampler to submit to the web service is executed and the next step is the Beanshell Sampler to create the XML message runs.
I have searched, and searched for over a week on this. I've asked the question on other forums but no one has been able to answer the question.
Are While Controllers NOT included in subsequent loops?
If anyone has any helpful hints/tips I would be very grateful!
Thanks in advance!
This is how your test goes:
- First loop: "status_1" variable is blank, While Controller IS being executed
- Second loop: "status_1" variable value is 6, While Controller IS NOT executed as condition is false.
Add a Debug Sampler before your While Controller to see it yourself
The solution is as simple as just adding the next line to one of your Beanshell Samplers:
This line will clear status_1 variable value of 6 and your While Controller will be executed on next iteration.
Originally Posted by firstname.lastname@example.org
Cheers for the reply - once you'd pointed this out, it seems so straight forward - but never would of got there on my own - so again - cheers!