ContributionsMost RecentMost LikesSolutionsRe: can not get test step response in groovy Get my answer from the post. http://community.smartbear.com/t5/SoapUI-NG/Resolved-Pass-a-variable-into-context-expand-code/td-p/43025 Now variable works well to when I try to get the reponse, while I still don't know the reason why I need to set different variables to get response/ request Re: can not get test step response in groovy Can anyone kindly help me? can not get test step response in groovy Hello, My groovy code is as below. I can get request, while fail to get response. The error is org.apacge.xmlbeans.XmlException: error: unexpected end of file after null error at line: xx The test step thatcurrentStep points to has been executed and has request/reponse. if I change variable def response=context.expand('${${currentStep.name}#response}') to the realtest step name def response=context.expand('${Additional#response}') // additional is the test step name The groovy script runs well. My questions 1. Why can I not get the response? 2.If the test step name has space, like "Additional code", how to make it work in thecontext.expand. I have tried " " and ' ', they don't work. -------------------- import com.eviware.soapui.support.XmlHolder import com.eviware.soapui.impl.wsdl.testcase.WsdlTestRunContext import groovy.sql.Sql import oracle.jdbc.driver.OracleTypes import com.eviware.soapui.impl.wsdl.teststeps.WsdlTestRequestStep def currentStep = testRunner.testCase.getTestStepAt(6) log.info "currentStep.name: " + currentStep.name // get the hold of request def request=context.expand('${${currentStep.name}#request}') log.info " request: " + request def xmlreq=new XmlHolder(request) // get the hold of response def response=context.expand('${${currentStep.name}#response}') log.info " response: " + response def xmlres=new XmlHolder(response) // error occurs here Thanks for your kind help in advance. SolvedRe: how to count pure SOAP request test steps Hello Rao, Thanks so much for the code. You are a super hero. how to count pure SOAP request test steps Hello! Under my test case, I have data sources, SOAP requests,groovy scripts. With testCase.testStepCount, I count all the steps. I am wondering how to get the pure SOAP request number without counting other test steps, like data source or groovy scripts. Thanks for your kind support in advance! SolvedRe: No log output for groovy script Thanks for your rapid reply. It is because I tried to upgrade groovy. I removed the new added groovy jar underC:\Program Files\SmartBear\ReadyAPI-1.6.0-m-SNAPSHOT\lib. Now the console output shows in Log Output window. No log output for groovy script Hello! My log Output windows under groovy script test step used to work well. I can the the console output from log.info. While, today, I can not see anything under log output window or script log window. I am not sure what has been changed. Please kindly help me. Thanks for your support in advance! SolvedRe: how to get proerties value from layered response in Groovy script Thanks a lot for your rapid reply! I got the answer to the question. how to get proerties value from layered response in Groovy script Hello! I am doing data-driven testing and now working on data tranferring from soapui request/response to oracle table. With the following groovy, I can get the value of the response, then I can update the responding test data in orable table. ---- import com.eviware.soapui.support.XmlHolder import com.eviware.soapui.impl.wsdl.testcase.WsdlTestRunContext import groovy.sql.Sql import oracle.jdbc.driver.OracleTypes def response=context.expand('${Additional#response}') log.info response // get the desired node value from response def xml=new XmlHolder(response) def r_Amount=xml.getNodeValue("//Amount") def r_Base=xml.getNodeValue("//Base") def r_yRate=xml.getNodeValue("//Rate") log.info r_Amount +" "+r_Base +" "+r_Rate ----- When the response has two layers, like below, I can only the get first <amountItem>, how can I get the values under the second <amountItem>? <amountItems> <amountItem> <Amount>900.00</Amount> <Base>10000.000</Base> <Rate>9.000</Rate> </amountItem> <amountItem> <Amount>900.00</Amount> <Base>10000.000</Base> <Rate>9.000</Rate> </amountItem> </amountItems> I tried the code and get null. def r_amountItem=xml.getNodeValue("//amountItem") log.info r_amountItem SolvedRe: can not update oracle table in soapui groovy Thanks so much! It should becon.executeUpdate("UPDATE DDT SET I_COMMODITY_CODE='8888' where TEST_STEP_ID='3.3.3'")