Forum Discussion

r_chb's avatar
14 years ago

Import custom xquery functions

I'm looking to import and xquery function a la :
http://www.xquery.com/tutorials/guided-tour/library-modules.html

So that I can use it in an xquery assertion

Can this be done - is it supported by SOAPUI?

If not, I'll expand on the need for it:

I currently have some mega complicated procedure for parsing the entire response and validating it against our ICD (interface control document)

Lovely - works like a dream.

Until someone suggests something to improve it, or we change the interface etc.

Then I have to change all the test cases by copying and pasting the XQuery assertion code across all tests.... not great

So I'm thinking, roll my own function rb:validateThis(./)

And call it from every assertion - this requires me just to import the definition of rb:validateThis() into each assertion - this wont change. And then hey presto any change is carried across all assertions when I change the (single) definition of rb:validateThis().


tl;dr - Easy way to maintain a single version of an XQuery across multiple assertions?

1 Reply

  • Ever get an answer to this?

    Anyone know steps to make a custom library of functions that can be used across many test cases so that can make changes centrally?