I can't find any solution for my issue. Many I've tried doesn't work. Could someone help me?
I have a JSON like this:
{
"device": {
"sdk_revision": "dev",
"sdk_type": "android",
"app_id": "0518101906",
"app_version": "0.0.0"
},
"request": {}
}
in my request step in soapUI (RestProject).
I'd like to change the app_id value in this JSON, so in my groovy script I do:
import groovy.json.JsonSlurper
def today = new Date()
appId = today.format("MMddHHmmss")
def extractSelectionJson(String from) {
def slurper = new JsonSlurper()
def holderData = slurper.parseText(context.expand('${'+ from +'#Request}'))
appIdKey = holderData["device"]["app_id"]
appIdKey = appId
}
extractSelectionJson("SessionCreate")`
appId changed only locally, at my json request I have still "app_id": "0518101906" although I've tried setPropertyValue(), updateProperty() (maybe not right way).