Contributions
Re: Strange error
Well after I've tried the method described above byRadfordI've figured it out from the soapUI that I'm not working with jsons in this scenario Edit: the result in the http window is the id of the new view6 years agoPlace ReadyAPI QuestionsReadyAPI Questions2.8KViews0likes0CommentsRe: Strange error
As I said it was a silly mistake, The API sent me the resopnse in the http format instead of json. import groovy.json.JsonSlurper import com.eviware.soapui.support.types.StringToStringMap import groovy.json.JsonOutput responseContent = testRunner.testCase.getTestStepByName("CreateGroup").getPropertyValue("response") def confId = responseContent log.info confId testRunner.testCase.getTestStepByName("DeleteGroup").testRequest.setPropertyValue("groupId", confId) This code works for me now, I'm sorry if i've wasted your time, but I'm new with this environment and the message wasn't super helpfull, but I've learned my lesson.6 years agoPlace ReadyAPI QuestionsReadyAPI Questions2.8KViews1like2CommentsStrange error
Hello! I want to extract a resopnse from a previous test and to use it in the next test. This is the code: import groovy.json.JsonSlurper import com.eviware.soapui.support.types.StringToStringMap import groovy.json.JsonOutput responseContent = testRunner.testCase.getTestStepByName("CreateGroup").getPropertyValue("response") slurperresponse = new JsonSlurper().parseText(responseContent) //this is the line where the erroe occurs def confId = slurperresponse.response.toString() log.info confId testRunner.testCase.getTestStepByName("DeleteGroup").testRequest.setPropertyValue("groupId", confId) However when I try to run it an pop-up error appears "groobj.json.internal.Exception$JsonInternalException: unexpected character d" (there's no d charachter at that line and this makes me very confused) I've saved the code and I've even restarted the aplication. I don't have much experience with this application but I'm sure this is not normal6 years agoPlace ReadyAPI QuestionsReadyAPI Questions2.8KViews2likes6Comments