Forum Discussion
Hi
I am using Ready API 1.9 version. I raised the case. 00215573
can you please resolve it ASAP. Actually I am blocked on this. Please help
Regards
Vishal Pachpute
Thanks for submitting the case. I'm sure our Customer Care Team will do their best to assist you.
- vpachpute19 years agoFrequent Contributor
Hi
I am still struggling with this issue.
Can anyone help on this.
Regards
Vishal
- TanyaYatskovska9 years ago
Alumni
Hi Vishal,
I see that Yuri from our Customer Care Team sent you a reply in January. Here it is:
Property expansions are only applied to request contents sent directly. Files sent as a part of requests are not affected by them (they're sent unchanged). If you need to have a dynamic value in a file attached to a request, you need to modify this file from a script before that. If you're unsure how to do this, there's a post providing example groovy code here: http://mrhaki.blogspot.ru/2009/08/groovy-goodness-working-with-files.html
Also, you can find information on the class you need to use to work with text files here:
http://docs.groovy-lang.org/latest/html/documentation/working-with-io.html
Have you received it? If you still have a question, I suggest that you reply to that message to Yuri to clarify the details.
Thanks.
- vpachpute19 years agoFrequent Contributor
Hi Tanya
From your post: Have you received it? If you still have a question, I suggest that you reply to that message to Yuri to clarify the details.
Actually to be honest, I didn't received any response from Yuri.
Can you please ask to Yuri to clarify on same. Actually I am struggling on this issue.
Actually I am very new to Ready API. I want Groovy script to write custom properties value into xml file.
Here is my simple API request. Which is put into external xml file. Becasue my project requirement is that if xml request changes in future, we need to change in one external request file instead of changing into each test case. So I need to write this ${#TestSuite#usergroup} custom property value nto xml. And call this .xml file request .
<test">
<addug>
<charging-id type="msisdn">${#Project#MSISDN_GB}</charging-id>
<ug>
<usergroup>${#TestSuite#usergroup}</usergroup>
</ug>
</addug>
</test>Can you please help on same
Regards
Vishal