Contributions
XPath assertions supports wildcards within elements in 4.5
In soapUI 4.5 release notes there are features Improved the XPath Assertion to support wildcards within elements , and the same for XQueries. I was unable to find any changes. Could anybody explain what was added? It would be perfect to see some example.818Views0likes0CommentsselectFromCurrent() method causes soapUI crash
When executed in script assertion the following method makes soapUI 4.0.1 unstable or it just hangs (probability 50/50) com.eviware.soapui.impl.wsdl.teststeps.assertions.basic.XPathContainsAssertion.selectFromCurrent() Steps to reproduce: 1)Create "Test Request" test step 2)create XPath assertion (e.g. with name 'ResponseAssertion') and fill "XPath expression" field, leave "Expected Results" empty 3)create Script assertion and put it BEFORE XPath assertion (or AFTER) 4) put the following script into script assertion context.getCurrentStep().getAssertionByName('ResponseAssertion').selectFromCurrent() log.info "Assigned current result as expected" 5) try to run the test step The results are unpredictable: - Stack overflow popup. In this case "scripts log" displays hundreds of lines INFO:Assigned current result as expected - soapUI just hangs, and I need to use Task Manager to close it - Null popup - in any case soapUI becomes unstable - Sometimes the Expected Result in 'ResponseAssertion' is set, sometimes it remains unchanged13 years agoPlace ReadyAPI QuestionsReadyAPI Questions1.4KViews0likes1CommentRe: Change the XML Request tags using the Groovy Scripts.
JPMorganChase wrote: I see that there is no reply to this inquiry. I am having a similar question. How do i represent nil = true using groovy script. +1 also need to update a node value to be nil e.g. <ns1:Title xsi:nil="true"/>13 years agoPlace ReadyAPI QuestionsReadyAPI Questions1.1KViews0likes0CommentsRe: selectFromCurrent() method doesn't work in "TearDown Script"
Sorry to tell you, but it didn't work either. It's weird, but all other setters work correctly and change the assertion e.g. setAllowWildcards(boolean allowWildcards), setExpectedContent(java.lang.String expectedContent) worked correctly and updated the XPathContainsAssertion assertion. I was also trying the following 1) get current response XML 2) process it using XPath (use getPath() to get it) 3) set the result from 2) as expected by means of method setExpectedContent(java.lang.String expectedContent) The problem was - unable to 2) process received response using XPath the same way as soapUI does.1KViews0likes0CommentsRe: selectFromCurrent() method doesn't work in "TearDown Script"
deepesh.jain wrote: testRunner.testCase.getTestStepByName("test").getAssertionByName('Response').selectFromCurrent() However I am not sure if the WSDLTestStep here has any method that you are using above : getAssertionByName Thanks for a suggestion, but it doesn't work. BTW, getAssertionByName(xxx) returns assertion (not TestStep). In my case it returns XPath assertion i.e. XPathContainsAssertion (not WSDLTestStep )1KViews0likes0CommentsselectFromCurrent() method doesn't work in "TearDown Script"
Method com.eviware.soapui.impl.wsdl.teststeps.assertions.basic.XPathContainsAssertion.selectFromCurrent() doesn't do anything when executed in TearDown Script. Though it works correctly when executed in Script assertion. Not working code from TearDown script: testCase.getTestStepByName("test").getAssertionByName('Response').selectFromCurrent() Working code from script assertion (in a test step) context.getCurrentStep().getAssertionByName('Response').selectFromCurrent() Does anybody know how to 1) make the method selectFromCurrent() work in TearDown script or 2) in TearDown script get the current result produced by XPath expression (so I can set it as expected myself)1.7KViews0likes5Comments