Forum Discussion
Hi James,
If I'm understanding you right, are you asking whether open-source SoapUI can perform Assertions as part of TestSteps or wether this is limted to the commercial version? If you are, then its probably fair to say that the open source version can do most of the same Assertions as the commercial version, and can can use Script Assertions to cover any gaps. Sorry if you knew this already.
Is it more that you were wondering what the best way to do XML content Assertions on a REST Request Test Step is?
If so, depending on exactly what you want to assert, I would say XPath Assertions and Script Assertions (I tend to prefer these as I like Groovy scripts!) are what I tend to go for - do you have a particular XML response that you need help asserting stuff for?
Cheers,
Rupert
- jamescollett9 years agoContributor
Rupert,
Thanks for your response. You have referred to a bunch of features I know nothing about, so I have more to learn....
However, my question came from watching one of the How-To videos on the SoapUI website. The video advised to do some actions but the features were not available in the free version of SoapUI that I am running, so I was stuck. I noticed a caveat which essentially said the instructons related to the Pro version.
I wanted to test that I was getting certain errors back from my RESTful web service in response to certain calls.
In response to others, I wanted to validate the XML content.
I could achieve neither of these tests.
Thanks,
-James.
- rupert_anderson9 years agoValued Contributor
Hi James,
No, problem, I'll try to help you where I can, so is it that you just need a basic guide on how to test (in particular assert content/status codes) for RESTful webservices with SoapUI?
If so, there are plenty of other options in addition to that video in the SoapUI doumentation?
I found these (haven't whatched the videos, but the blog looked like it might help):
http://www.joecolantonio.com/2012/09/05/soapui-how-to-test-a-rest-service/
https://www.youtube.com/watch?v=XV7WW0bDy9c
https://www.youtube.com/watch?v=uvrpjqPJDUU
https://www.youtube.com/watch?v=7YpJS--BqiIOf course there are books too and other great blogs!
I haven't looked at the official SoapUI documentation for a little while, did have a quick look at http://www.soapui.org/getting-started/rest-testing.html (was that the one you mean't?). Without commenting too much, I did notice a fair few references to the pro / NG version, which is understandable given Smartbear look after the open source versions... but, fear not, there is no obstacle to do what you need with the open source version, millions do!
In your case, can't give you much more detail unless you provide a sample response, but to check for error messages for Rest Request TestSteps I would suggest:
Valid / Invalid Status Code Assertions (under Compliance, Status & Standards assertions)
XPath Match (under Property Content assertions)
Also, if you're confortable with Groovy script:
Script Assertions - you can do pretty much most things with these!
See also http://www.soapui.org/functional-testing/validating-messages/getting-started-with-assertions.html
Cheers,
Rupert
- jamescollett9 years agoContributor
Thanks, but most of this is over my head, I am afraid.
I have tried followingthe various suggestions. There seem to be good guidelines and principles but nothing concrete that I can follow. As soon as an example gets to the "Click this icon and choose Assertion" type of step, the icon or button or context menu option described inconveniently is not available in my edition of SoapUI.
I wish a SmartBear person could just provide some concrete instructions or simply put me out of my misery and confusion by confirming tat this feature is not available in the free product.