Help needed to understand error message
Hi - I am starting to really get the hang for Groovy to extend the capabilities for soapUI and make it easier to use.
In several of our test cases we have literally dozens of XPath assertions to validate the number of certain tokens in the message.
I now wanted to consolidate these into a single assertion using a groovy script:
So, instead of having e.g. three XPath scripts assertions like
XPath Expression Declare:
count(//Airport)
and expected result:
20
I want to have a single script assertion that reads:
tests.TokenCounter.count_tokens(log, context, messageExchange, [['//Airport','20'], ['//Position','20'], ['//CityCode','45'], ])
The input argument would be an array of name and value pairs, each with an xpath expression and a result.
This would be easier to edit and more compact. I guess you get the idea...
So, I wrote me a corresponding Groovy class, packed it up as a .jar and put it into the ...\bin\ext folder.
But for some reason that I don't quite understand, yet, I am getting the following error when the above script assertion executes:
--> Bug! exception in phase 'semantic analysis' in source unit 'Script2.groovy' The lookup for tests.TokenCounter caused a failed compilation There should not have been any compilation from this call.
I simply don't understand what soapUI is trying to convey to me here. Could you please elaborate a bit?
Michael