ContributionsMost RecentMost LikesSolutionsRe: How to access 'context' object from mockRunListener eventsOle, Thank you so much. It does work now. Somehow, I just did not catch the typo and script language is not strong at type/syntax chechking. thanks again. sheenaRe: How to access 'context' object from mockRunListener eventsCan some one from customer support to help on what is wrong with my scripts ? Help needed.Re: How to access 'context' object from mockRunListener eventsHi, Dain, I copied the my script here, not sure what is wrong but I could not get the mock request logged into my file. I could not even find file in the expected directory. thanks sheena ===MockRunListener.moMockRunnerStart=========== def logfile = "D:/XML-Testing/WebNBI/SoapUIPro/TestResultR7.3/MyMockLogFile.log"; log.info(logfile); def File myMockFile = new File(logfile); myMockFile.append("this is a test"); log.info(myMockFile); if ( myMockFile.exists()) { myMockFile.delete() myMockFile = new File(logfile); } runner.mockContext.setProperty("MyMockLogFile", myMockFile); ===MockRunListener.onMockResult if ( result ) { def mockReq = result.getMockRequest() def context = result.mockRequest.context; if ( context.MyMockLogFile) { def filehandle = context.myMockLogFile; filehandle.append ( mockReq.getRequestContent()) log.info("Has Mock Log file"); } log.info(mockReq.getRequestContent()); }Re: How to access 'context' object from mockRunListener eventsDain, thanks for your response but I am not sure I have complete solution as you suggested. How do I get this property from onMockResult() Do I have access to runner object ? In onMockResult, I have result object but not sure how to get runner object sheenaRe: How to access 'context' object from mockRunListener eventsI am still wait from support to help me on this. How to access 'context' object from mockRunListener eventsI try to access context object inside the mock events : such as onMockRunnerStart, onMockResult but got error. What is the proper way to access context object inside mock events callback script ? thanks sheena For example for onMockRunnerStart event, I want to perform: ..... context.setProperty("myLogFile", filehandler) for onMockResult event, I want to perform: context.myLogFile thanks sheenahow to get soap body onMockRequest eventHi, Support, Could you let me know hot to get soap body in mockRunLisenter.onMockRequest script plug in code ? thanks sheenaRe: Which event handler to get Soap Respnse content?Thanks. It works. sheenaRe: Which event handler to get Soap Respnse content?I tried to use TestRunListener.afterStep to get Soap response. seems work but I need only trigger this script when testStep is 'request'. I don't know how to filter other type testStep as I have trouble to access testStep object inside the callback from this event. Still need help. thanks sheena ==== problem script for sfterStep event==== import com.eviware.soapui.support.xml.XmlUtils //log.info(testStep.config.type) can't access testStep here. if( testStepResult.response == null ) return def rsp_str = testStepResult.response.responseContentWhich event handler to get Soap Respnse content?Per Prop Support, I used afterRequest event to log soap request. Which event should I use for logging soap response ? thanks a lot sheena