Forum Discussion
hutabarat2014
11 years agoContributor
Hi All,
I am trying to find out about the endpoint using the User Interface at Test Suite level as follows:
The issue now is what to insert in the conditional option.
What I would like to happen, ideally, is that all the test steps that require certain properties based on different environment will be changed accordingly and automatically.
For example, if the default is ABC environment, then we got:
Test Step 1
In Request XML we got:
<IP>#IP_Address_ABC</IP>
Test Step 2
In Request XML we got:
<IP>#IP_Address_ABC</IP>
Test Step 3
In Request XML we got:
<IP>#IP_Address_ABC</IP>
When we use the UI above and enter '2' which is Staging environment, we should get the followings:
Test Step 1
In Request XML we got:
<IP>#IP_Address_DEF</IP>
Test Step 2
In Request XML we got:
<IP>#IP_Address_DEF</IP>
Test Step 3
In Request XML we got:
<IP>#IP_Address_DEF</IP>
without me having to lift any more finger than necessary.
If that is the case, what would be in the conditional statements above that I need to write?
Many thanks,
Leo
I am trying to find out about the endpoint using the User Interface at Test Suite level as follows:
def UI = com.eviware.soapui.support.UISupport;
def OPTION = UI.prompt("1: Testing, 2: Staging");
if ( OPTION == '1' )
{
//what in here?
}
else ( OPTION == '2' )
{
//what in here?
}
The issue now is what to insert in the conditional option.
What I would like to happen, ideally, is that all the test steps that require certain properties based on different environment will be changed accordingly and automatically.
For example, if the default is ABC environment, then we got:
Test Step 1
In Request XML we got:
<IP>#IP_Address_ABC</IP>
Test Step 2
In Request XML we got:
<IP>#IP_Address_ABC</IP>
Test Step 3
In Request XML we got:
<IP>#IP_Address_ABC</IP>
When we use the UI above and enter '2' which is Staging environment, we should get the followings:
Test Step 1
In Request XML we got:
<IP>#IP_Address_DEF</IP>
Test Step 2
In Request XML we got:
<IP>#IP_Address_DEF</IP>
Test Step 3
In Request XML we got:
<IP>#IP_Address_DEF</IP>
without me having to lift any more finger than necessary.
If that is the case, what would be in the conditional statements above that I need to write?
Many thanks,
Leo