HomeSUPPORT QUESTIONS

Need help with StresStimulus? Start here.

Scriptable variable to control execution Messages in this topic - RSS

Unregistered User
Unregistered User
Posts: 509


4/28/2020
Unregistered User
Unregistered User
Posts: 509
I would like to create a scriptable variable that can be used in conditional statements. How to use iteration number in a scriptable variable. I need to execute a transaction on all iterations except the 10th iteration.
0 link
George @StresStimulus
George @StresStimulus
Administrator
Posts: 554


4/28/2020
George @StresStimulus
George @StresStimulus
Administrator
Posts: 554
Scriptable variables are described http://support.stresstimulus.com/display/doc52/Scriptable+Variables
First you need to create a scriptable variable, call it “ExternalCondition”. Implement the GetValue method that returns “false” on the 10th iteration and “true” on other iterations.
string IExternalVariable.GetValue(SessionContext context) { Return (context.IterationNumber == 10) ? "false" : "true"; }

Then create an If…Then condition around your transaction and set the following properties:


0 link






Copyright © 2024 Stimulus Technology