Need a sample java like while loop in build forge step
I need to have a while loop which will execute the step 4 times.During each iteration I need to increase a counter which can be a env variable.need details example.while condition check will be done on this environment variable.
|
One answer
Hello,
The way it works is like this.
You create and or set a Build Forge variable to, in your case 4. So say COUNTER=4. Whether you .bset this in the product or set it as a variable within the environment it wont matter.
Condition:
true(${BF_ITERAT$ION}<={COUNTER}) <--- What that does is say iterate until COUNTER is = to 4. So 4 times.
What are we iteration?
Command
echo "Whatever I want" <--- Means this command runs 4 times, or until the value of counter is reached.
Does this help clear it up for you?
Please also be aware you can use Thread to thread steps and or thread conditional steps to run all 4 at the same time to increase performance etc.
Please let me know if this helps and if so, please like the answer. If not, let me know and I can try further. Thanks!
|
Your answer
Dashboards and work items are no longer publicly available, so some links may be invalid. We now provide similar information through other means. Learn more here.