Contributions
log.info not shown in script log
I'm trying to debug a mock service dispatch script. Previously a was seeing log.info in the Script Log console when running a request. However I've added a few lines of code and tried to capture some more logging in order to debug.... when I run the request now I get a response with no errors but no data is captured in the script log, which is making it difficult to spot where I've gone wrong in my script amendments. I've run other requests to other resources and the logging seems fine, so I'm out of ideas what could have gone wrong, especially as the script is working (just not quite how I want it to!). Can anyone tell me what might be happening? Hopefully this all makes sense, I'm still pretty new to this so terminology might be a little bit lacking.714Views0likes0CommentsRe: Need to use response elements from one mock operation in another mock operation
Hi Rupert, thanks for your response, to clarify what I'm doing in operation 1 (MockUnderwritingService) I'm getting the name and surname and some other stuff and customising the response based on the data, this gives a dynamic response based on user input and means for front end testing there is less changing of test stubs which are currently static... so getting this sort of stuff; de Firstname = recrods.Contact@FirstName.text(); def Surname = records.Contact.@LastName.text(); def ApplicationID = records.@ApplicationNumber.text(); then based on surname only decide whether to decline or accept, then I'm doing this to be able to use it in the response; context.appID = ApplicationID (not actaully returning the Firstname and Surname in the response but want to use these later) then for operation 2 (VerificationMockService) dispatch script I want to do something like this; if(Firstname == "John"&& Surname=="Smith") { context.chan= channel return "Accept" } else if (Firstname == "Dave"&& Surname=="Smith") { context.chan= channel return "Refer" } so it's working out how to use those variablesFirstname &Surname in the second script that is the bit I'm having a problem with. I'll do some reading upHashMap, might be what I'm looking for....can only be good if it expands my knowledge a bit further. Thanks for your help2.1KViews0likes3CommentsNeed to use response elements from one mock operation in another mock operation
Hi, hopefully my terminology is not to incorrect, I'm fairly new to SoapUI and coding in general but I've been tasked with creating a mock service to aid in our testing. The problem I have is I have a dispatch script that takes elements from system generated request and puts them in a mock response, this is working. However I have a 2nd mock operation which is a second stage of the service (1st is underwriting, 2nd verfication). The request doesn't contain much info in the 2nd, so I need to grab data from the first mock operation request and use it to evaluate the response for the 2nd mock operation. Unfortunately I can't work out how to do this (despite googling for several hours). What I'm looking for is an easy to understand example to use for a REST mock service. So I need to get firstname, surname from Underwriting mock operation and use those in Verfication mock operation. Hopefully someone can point me in the right direction or post an example. Thanks!2.1KViews0likes6Comments