Contributions
Re: How to call/run an assertion in a Groovy Script?
That was not actually what I meant.I'd like to call some SoapUI-Assertions that were already implemented on a test case, for instance Xpath, XQuery, Contains etc, so that I would not need to re-write these assertions in a groovy script. I'd like calling the assertion "objects" instead. I actually did whatdavysuggested but I still wonder how I could get it done :)1.9KViews0likes0CommentsSoapUI OpenSoure - NullPointerException at com.eviware.soapui.impl.wsdl.WsdlProject.reload
I am trying to implement an automatic reload after updating the WSDL in my project but I keep getting a null pointer although the path is correct and the project exists. I've seen some old posts on the internet but it seems to me the provided solutions are only for the SoapUI Pro. Is that right? How could I get my code working on the SoapUi Open Source 5.3.0? Partial code: void reloadWsdlProject(Object log) { try { log.info ("Checking project absolute path [" + wsdlProject.getPath() + "]"); wsdlProject.reload( wsdlProject.getPath() ); } catch( SoapUIException ex ) { log.error( ex ); } } Error: 2017-03-06 14:52:33,514 ERROR [errorlog] java.lang.NullPointerException java.lang.NullPointerException at com.eviware.soapui.impl.wsdl.WsdlProject.reload(WsdlProject.java:1353) at com.eviware.soapui.impl.wsdl.WsdlProject$reload.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:116) at UpdateWsdls.reloadWsdlProject(Script11.groovy:355) at UpdateWsdls$reloadWsdlProject.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:116) at Script11.run(Script11.groovy:372) at com.eviware.soapui.support.scripting.groovy.SoapUIGroovyScriptEngine.run(SoapUIGroovyScriptEngine.java:90) at com.eviware.soapui.impl.wsdl.teststeps.WsdlGroovyScriptTestStep.run(WsdlGroovyScriptTestStep.java:141) at com.eviware.soapui.impl.wsdl.panels.teststeps.GroovyScriptStepDesktopPanel$RunAction$1.run(GroovyScriptStepDesktopPanel.java:250) at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source) at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source) at java.lang.Thread.run(Unknown Source)838Views0likes0CommentsRe: How to call/run an assertion in a Groovy Script?
I though about this possibility in first place but as the test case has already some XQuery assertions I decided giving it a try and asking if it would be possible creating a control script only. Thanks anyway, Rao. BR, Cinne2KViews0likes1CommentHow to call/run an assertion in a Groovy Script?
For maintenance purposes I'm trying to centralize test steps in one single test case as much as possible. Usually this test case has an XQuery Match Assertion which checks some nodes for a given id. I'd like though implementing a conditional assertion script which would allow me calling specific assertions according to a given control property, so that I do not need 2 different test cases due toassertion points. For instance that's more or less the structure I'd like to implement: -------------------- - MainTestCase: JDBC Connection executing a simple Select -------------------- - NotContainsAssertion (disabled) check if the sql does not return a given ID - XQueryAssertion (disabled) check the sql results fora given ID - Script Assertion: if control=0, calls NotContainsAssertion if control=1, calls XQueryAssertion -------------------- - PositiveTestCase: -------------------- -control=1 - Run_MainTestCase it will run theXQueryAssertion -------------------- - NegativeTestCase: -------------------- -control=0 - Run_MainTestCase it will run the NotContainsAssertion Is it somehow possible calling/running an assertion from a script? Any suggestions?2KViews0likes5CommentsRe: How to update wsdl definition in soapui pro?
I guess I have the same problem with the Open Source version: I see new methods in my newWSDL and SoapUi is not able to create new requests for them at all. Have already tried setting all possible options - although I am sure only the first one would be enough- and I've also tried updatingit usingthe groovy script I have, but nothing seems to work. I am sure there's no problem with the WSDL because if I build a whole new project pointing to it I get all methods and it runs with no problem. So I guess it should be a problem withSoapUI. Nice to hear though that's not only a problem withthe OpenSource version (5.2.0 and 5.2.1)...9 years agoPlace ReadyAPI QuestionsReadyAPI Questions7.6KViews0likes1Comment