Forum Discussion
GiscardN
11 years agoFrequent Contributor
Hi,
You could use a Groovy TestStep after your request to retrieve that id value from your response.
If you isolate that URL as a string, then you can extract the id as follows:
Then you can store that value as a TestCase property. See this article:
http://www.soapui.org/Scripting-Properties/tips-a-tricks.html#1-1-get-and-set-properties
And you can access it in the subsequent steps of your TestCase.
Regards,
Giscard
SmartBear Support
You could use a Groovy TestStep after your request to retrieve that id value from your response.
If you isolate that URL as a string, then you can extract the id as follows:
def string = "http://servername:3333/objects/abcded"
def sub = string.substring(string.indexOf("objects/")+8, string.length())
log.info sub //the value "abcded" will be assigned to the variable 'sub'
Then you can store that value as a TestCase property. See this article:
http://www.soapui.org/Scripting-Properties/tips-a-tricks.html#1-1-get-and-set-properties
And you can access it in the subsequent steps of your TestCase.
Regards,
Giscard
SmartBear Support
Related Content
- 3 years ago
Recent Discussions
- 15 hours ago