I'm new at using SOAPUI and I can't find how to properly test the REST URI on my server.
I want to test POST, PUT and DELETE on a given URI.
The POST method should create a new entry in my database and the server returns the generated key to access this element.
The PUT method is used to update an entry and required a JSON containing the key of the entry to be updated.
The DELETE method takes the key of the entry to be deleted.
So, I want to create a testCase for each URI with 3 testSteps
The key is generated by the server, so I have to retrieve it and pass it to the other steps.
So my question is in two parts:
If you need more informations to answer my question, feel free to ask :)
I hope someone could give me some clues in order to do so.
Well, I am not sure if this answers your question, but this is what I did to grab JSON from the response string
import groovy.json.JsonSlurper
def slurper = new JsonSlurper()
def prevStepResponse = '${Create Customer - All fields#Response}'
def prevRespString = context.expand(prevStepResponse)
def prev = slurper.parseText(prevRespString)
assert prev.customerId > 0