I am looking to do a scripted step to see the current environment (Active / Running) and then depending on which environment it would go through a different set of test steps.
Step 1: Determine what is my active running config
If active config equals 1 then go to Step 3
Else go to Step 2
Step 2: Get Security token
Step 3: Web Service Execution step
I'd create a config property named "SECURITY_TOKEN_NEEDED".
On Step 1, use an assertion that checks to see if the value is "false". If so, go to step 3, else, Step 2 follows Step 1.
Say, you have two environments, one being NON_PROD & the other being PROD and you have two config files with some information in them about the respective environments.
In your NON_PROD file declare a variable named flag and give it a value of 1, same way, in your PROD file declare the variable named flag and give it a value of 2.
In your test case, you can have a do nothing step with multiple assertions checking the value of the variable flag and from there you can route based on the value of flag.
If flag = 1, go to Get Security token
If flag = 2, go to Web Service Execution step
You can use this assertion : Ensure property matches expression
Hope this helps.
Yes your suggestion and @Mike Gavaghan suggestions worked fine I was looking to see if there was a property where I would not have to set a flag in the config files and I could determine from testexec or lisa. for which config was active and then do the assertion on a do nothing step.@