Forum Discussion
Hi
Can u kindly help me how to access the Resource Path of Rest Test Request which is a Rest TestRequestProperty using Groovy scripting.. I am actually soapui 4.5 open source and our project doesnot Pro version for using Data Source step. Can u please provide that code snippet for accessing the Resource Test Request property using groovy, because i have to update that dynamically... Please let me know how to access and how to update that as well. Ur help is really appreciated. Thanks in advance..
Hi,
For this one, I think you might be asking just how to provide the ID as a variable for a REST Request TestStep as a path parameter e.g.
If you had:
http://localhost:7070/quote/{id}?parm={val}
In this case, it is important to define your parameters a certain way:
id - should be setup style='TEMPLATE'
parameters - should be setup style='QUERY'
Then you can provide their values using property expansions (the values of {id} and {param} can be provided for example using a Groovy TestStep, need more examples please ask) - see attched screen shot.
Does this make sense?
In terms of the previus answer reagrding using a datasource to provide these values, I am inclined to disagree that the pro version is necessary, whilst it is definately convenient with its build in Datasource TestStep. It is actually quite straightforward to provide many different types of data source/data driven tests in the open source version, assuming you aren't concerned about using a littel Groovy script. Happy to discuss examples further if you need details.
Hope this helps,
Cheers,
Rupert
- rupert_anderson10 years agoValued Contributor
Of course another option is to instead of a REST Test Request use an HTTP Request TestStep and set the whole URL using a property expansion as per my answer to your other question (http://community.smartbear.com/t5/SoapUI-Open-Source/Groovy-script-for-dynamically-getting-and-setting-Resource/m-p/99271#U99271)
Cheers,
Rup
Related Content
Recent Discussions
- 3 minutes ago
- 15 years ago