Contributions
Re: Unable to transfer integer value from response to test case level property using setPropertyValue
Hi Lucian, Thanks a lot. Actually i'm running the script from script assertion where testRunner will not work. So, had to use messageExchange variable. it worked for me after i have mentioned "String.valueOf( SubProducts_0_Price_11_BasePrice )" in my script as below. messageExchange.modelItem.testStep.testCase.setPropertyValue( "FRBasePrice", String.valueOf( SubProducts_0_Price_11_BasePrice ) ) Thank you for your help!!!7 years agoPlace ReadyAPI QuestionsReadyAPI Questions1.9KViews0likes1CommentUnable to transfer integer value from response to test case level property using setPropertyValue
Hi Guys, I'm trying totransfer integer value from response to test case level property using setPropertyValue calling from script assertion. There is a json code in the reponse with value BasePrice= 99. So, i added a script assertion and wrote a script to get the value from response using JsonSlurper and stored the value into a variable =SubProducts_0_Price_11_BasePrice. Now i'm trying to transfer the variable (SubProducts_0_Price_11_BasePrice)value to testCase level using below script: messageExchange.modelItem.testStep.testCase.setPropertyValue("FRBasePrice",SubProducts_0_Price_11_BasePrice) but i'm getting error as shown in the attached screenshot. Please help me with this. ThankYouSolved7 years agoPlace ReadyAPI QuestionsReadyAPI Questions2KViews0likes3Comments