Contributions
- 1.7KViews0likes0Comments
Re: simple scripting in a Mock Service - no longer works
It works correctly for me. Check that the string that you're returning correspond to the response names... you use "Login_Response_OKAY_1" as name instead of "Response 1"... In my example I use this names but check that you're using the correct ones for your case. ... myRespList = ["Login_Response_OKAY_1","Login_Response_OKAY_2"] ... If you return a string that not exist as a name it executes the default option.4.9KViews0likes4CommentsRe: simple scripting in a Mock Service - no longer works
A possible workaround could be: // get the list from the context def myRespList = context.myRespList // if list is null or empty reinitalize it if(!myRespList || !myRespList?.size){ // list in the desired output order myRespList = ["Response 2","Response 3","Response 4","Response 7"] } // take the first element from the list def resp = myRespList.take(1) // update the context with the list without this element context.myRespList = myRespList.drop(1) // return the response log.info "-->"+resp return resp Check the details in the post here:http://stackoverflow.com/questions/32975240/soapui-mock-service-custom-sequence-of-responses/32980121#329801214.9KViews0likes6Comments