Contributions
xml namespace in response not getting updated in Soap UI 5.0
Hi, I am presently using SoapUI Pro 5.0.0 where i have imported my existing projects from SoapUI Pro 4.6.4 version. Now i am encountering an issue where xml namespace in response is not getting updated correctly. Same soapUI project works fine with 4.6.4 but gets failed in 5.0.0 version due to XPath assertion getting failed. Please refer attached screenshot for reference and let me know in case you require any other information. Thanks, Saurabh10 years agoPlace ReadyAPI QuestionsReadyAPI Questions1.1KViews0likes1CommentRe: [Res]Run DataSink from Script Assertion
Hello, I did some digging around and finally got it resolved. The catch was to add prepare at the start of the loop and finish at the end. testStep.prepare( testRunner, context ) testStep.finish( testRunner, context ) Thanks a lot for the help. You can mark this as resolved. Regards, Saurabh10 years agoPlace ReadyAPI QuestionsReadyAPI Questions1.5KViews0likes0CommentsRe: [Res]Run DataSink from Script Assertion
Hello, I was able to run DataSink Step from script assertion through the groovy script provided by you but now I am getting NullPointerException exception. Please refer below Error logs:- Tue May 20 10:44:24 IST 2014:ERROR:java.lang.NullPointerException java.lang.NullPointerException at com.eviware.soapui.impl.wsdl.teststeps.datasink.PropertyDataSink.save(SourceFile:208) at com.eviware.soapui.impl.wsdl.teststeps.WsdlDataSinkTestStep.write(SourceFile:313) at com.eviware.soapui.impl.wsdl.teststeps.WsdlDataSinkTestStep.run(SourceFile:131) at com.eviware.soapui.model.testsuite.TestStep$run.call(Unknown Source) at org.codehaus.groovy.runtime.callsite.CallSiteArray.defaultCall(CallSiteArray.java:45) at org.codehaus.groovy.runtime.callsite.AbstractCallSite.call(AbstractCallSite.java:108) at org.codehaus.groovy.runtime.callsite.AbstractCallSite.call(AbstractCallSite.java:120) at Script1.run(Script1.groovy:27) at com.eviware.soapui.support.scripting.groovy.SoapUIGroovyScriptEngine.run(SoapUIGroovyScriptEngine.java:96) at com.eviware.soapui.support.scripting.groovy.SoapUIProGroovyScriptEngineFactory$SoapUIProGroovyScriptEngine.run(SourceFile:89) at com.eviware.soapui.impl.wsdl.teststeps.assertions.basic.GroovyScriptAssertion.assertScript(GroovyScriptAssertion.java:120) at com.eviware.soapui.impl.wsdl.teststeps.assertions.basic.GroovyScriptAssertion.internalAssertResponse(GroovyScriptAssertion.java:137) at com.eviware.soapui.impl.wsdl.teststeps.WsdlMessageAssertion.assertResponse(WsdlMessageAssertion.java:161) at com.eviware.soapui.impl.wsdl.teststeps.RestTestRequest.assertResponse(RestTestRequest.java:154) at com.eviware.soapui.impl.wsdl.teststeps.RestTestRequest.setResponse(RestTestRequest.java:139) at com.eviware.soapui.impl.support.panels.AbstractHttpRequestDesktopPanel.afterSubmit(AbstractHttpRequestDesktopPanel.java:628) at com.eviware.soapui.impl.wsdl.panels.teststeps.RestTestRequestDesktopPanel.afterSubmit(RestTestRequestDesktopPanel.java:282) at com.eviware.soapui.impl.wsdl.WsdlSubmit.run(WsdlSubmit.java:157) at java.util.concurrent.Executors$RunnableAdapter.call(Unknown Source) at java.util.concurrent.FutureTask.run(Unknown Source) at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source) at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source) at java.lang.Thread.run(Unknown Source) The DataSink Step has become Red and no properties are getting saved. However if I run the datasink manually then the properties are getting saved. Thanks, Saurabh10 years agoPlace ReadyAPI QuestionsReadyAPI Questions1.5KViews0likes0CommentsRe: [Res]Run DataSink from Script Assertion
hello Jeshtha, after running below groovy snippet in script assertion I am getting Error as "No such property: testRunner for class: script6":- def dataSink = context.testCase.testSteps["DataSink"] dataSink.run( testRunner, context ) Am I doing something wrong? Thanks, Saurabh10 years agoPlace ReadyAPI QuestionsReadyAPI Questions1.5KViews0likes0CommentsRe: Update Content-Type in Attachment before submission
hello, I have set resource root as ${projectDir} and i am not attaching files manually and using groovy script instead. And i've tried manually also by putting complete file path along with extension as suggested but no success. Are you planning to fix this defect anytime soon? Thanks, Saurabh10 years agoPlace ReadyAPI QuestionsReadyAPI Questions6.2KViews0likes0Comments[Res]Run DataSink from Script Assertion
Hello, I have test steps in sequence as below:- Groovy Script POST request Property DataSink Groovy script reads multiple files one by one,attach it to the POST request and run POST Request. I need to save response parameters to DataSink after each POST request and so i want to run Datasink from Script assertion step. I was able to reach to the DataSink through below statement but couldn't run it:- def dataSink = context.testCase.testSteps["DataSink"] Could you please provide me the details how can i run the datasink step as testRunner is not available inside script assertion and i don't know how to run datasink from script assertion through context ? Thanks, Saurabh10 years agoPlace ReadyAPI QuestionsReadyAPI Questions2.2KViews0likes6CommentsUpdate Content-Type in Attachment before submission
Hello, After I attach a file to REST request and send it successfully, I am seeing name also along with Content Type in Raw request tab and due to which i am not getting few expected parameter values in response.(As explained by the developer ) Ex:- Actual value:- Content-Type: image/png; name=2014-05-12_1220.png Expected value:- Content-Type: image/png; As i have not put name in Request attachment Content-Type ,I think it is getting appended automatically. Is there any way to remove "name=2014-05-12_1220.png" from the Content-Type? I am guessing this has to be done before request is submitted (through some groovy code in event handlers but not sure.) Request is POST request with Media Type= multipart/form-data and Content-Disposition: form-data; in payload. I've also added Attachment and Raw Request screenshot. please help me in getting this resolved? Regards, SaurabhSolved10 years agoPlace ReadyAPI QuestionsReadyAPI Questions6.8KViews0likes8Comments[R]How to read files in directory present under project root
Hello, I have multiple files inside a folder "attachments" which is present under project directory. I have to read each file one by one, attach it to the REST service and send as attachment. I've selected "Resource root" as ${projectDir} and trying to create url to read files in a Groovy test Step. Through groovy in eclipse i am able to read files successfully however in soap ui i am not able to do so as Soap UI is searching the folder inside it's Installation directory instead of project directory Below is groovy code snippet which i am using in eclipse:- def url="E:\\Document_Service\\attachments" new File(url).eachFile{file -> if(file.exists()){ println(file.name) } } I've tried to create url and substitute it in the code above but i think i am doing something wrong. def projectroot = context.expand('${projectDir}') def url ="${projectroot}\\attachments" I've added screenshot for my directory structure also. Could you please point me to the correct direction? Thanks, Saurabh10 years agoPlace ReadyAPI QuestionsReadyAPI Questions2.9KViews0likes3Comments