Groovy Scipting for SoapUI

(Mark) #1

Hi All,

I have just started learning SoapUI Automation using Groovy. I wondered if anybody knew of a good resource for Groovy scripting which is applicable to SoapUI / testing. A lot of the Cookbooks and tutorials are aimed at Developers.

1 Like
(Magda) #2

Hi Mark,

whether as tester or developer, knowing the basics of a programming language is helpful. You can still learn a lot about syntax, conventions, basic data structures and libraries/modules from general purpose tutorials. Depending on what sort of APIs you work with, for starters you can look into working with JSON ( and XML ( and into reading files from the system ( You won’t need the compiler etc. topics as SoapUI provides the environment for you.

Once you have an idea how the language works, look explicitly for SoapUI example projects/scripts on the net and play around with the samples. You may need to look deeper as a lot of features that required scripting earlier are covered by the newer pro versions of the tool (which may also reduce the initial learning load for you unless you’re past that stage already).
One example I find both eternally useful and relatively easy to play with is - just going through a script and looking up things as you go, then trying to adapt it for your own project is a good learning experience. SmartBear seems to have published some sample projects as well at but I haven’t looked into them so can’t say how helpful they are. Even a small stepping stone can help you get ahead though.

Good luck on your Groovy adventures!

(Anders) #3

Personally, I find Groovy in SoapUI sucks a bit. API docs are lacking and debugging is really a pain (we’re back to console printing). Other than that it’s okay, and it can certainly do string operations, setting custom id’s, assigning and reading properties, writing files and that kind of stuff.

I agree with Magda that playing around with the language is probably a good idea to begin with.

Are you looking for aything specic? SoapUI is dated, but ubiqtous. Some of us like it for both reasons :slight_smile:

1 Like
(Mark) #4

Hi Anders,

Thanks a lot for your reply.

To be honest, I chose Soap as it covers but Rest and Soap and Postman only covers Rest.

What do you normally use for your Service testing?