Contributions
Re: Post: How to replace the variables in attachment
HiTanya Gorbunova, You are right, the file content would contain the variables and i want to replace it. If this is not supported, i think the only way is to use something else like "groovy" to generate the request and send it, right? Thanks! Terry8 years agoPlace ReadyAPI QuestionsReadyAPI Questions870Views0likes0CommentsPost: How to replace the variables in attachment
I defined following in groovy script ============= vars["sg"] = "sg1" context.vars = vars ============= If the POSTrequest is "application/xml", i can use "${=vars.sg}" to access the real value. While if the POSTrequest is an attachment file with "mustipart/form-data", the value did not get replaced!! =========================== <SessionGroup>${=vars.sg}</SessionGroup> =========================== How can i replace the value in the attachment file8 years agoPlace ReadyAPI QuestionsReadyAPI Questions916Views0likes3CommentsHow to get value from a Map returned by Groovy Script in Request
In the groovy script step, i returned a Map type value as: =========================== def serverSessionIdVal = "${java.util.UUID.randomUUID()}"; def clientSessionIdVal = "${java.util.UUID.randomUUID()}"; vars = [:] vars["sid"] = serverSessionIdVal vars["cid"] = clientSessionIdVal return vars =========================== In the REST Request body, we can use place holder "${DefineVars#result}" to access the whole map, while how can i access one of the value likevars["cid"]Solved2.7KViews0likes3Comments