Forum Discussion
I do not know if this is the best method as I don't have a lot of experience with JSON, but as no one has answered your questions this might help. If anyone knows a better way please step in!
You should be able to process your data between your DataSource and REST test step within a Groovy Script test step.
You can get your data from you DataSource test step into the Groovy test step with the Ready API point and click Get Data functionality.
Once you have your data within your Groovy Script, you could use the Groovy JSON functionality to produce and output your data (I've got to admit I haven't used this, you will have to follow the link and read up).
The once you have your new JSON text string, you can update you REST request something like:
import com.eviware.soapui.support.GroovyUtils def groovyUtils = new GroovyUtils(context) groovyUtils.setPropertyValue('REST Request Test Step Name', 'Request','Insert JSON Text String here')
Please Note: the above code is not tested, thus may need adjusting for your situation.
Hopefully this will get you started.
- Gangadhar8 years agoOccasional Contributor
Hi,
Thank you Radford for reply. I will try with your code.
Thanks & Regards,
Gangadhar Badagi
Related Content
- 7 months agomacheshmeh
- 3 years agoLucian