Showing posts with label scripting. Show all posts
Showing posts with label scripting. Show all posts

Saturday, 23 April 2011

SoapUI aide memoire and groovy scripting (on RTM)

A braindump (not a tutorial) on SoapUI including use of Groovy to script parameter generation!
To whet pre-jump appetites, the SoapUI primary structure:
  • Project - houses...
    • Methods - Create these including parameters that need populating later (I'm doing REST atm)
    • TestSuite - One can only script within a test suite/case so we'll need one
      • TestCases -  one for each separable chunks of work.
        Lots of choices but I've mostly used...
        • GroovyScript - code to generate values (like hashes)
        • PropertyTranfer - Used to copy values between scripts and calls' parameters (REST calls, etc)
        • Test Request (REST/SOAP/HTTP/JDBC/AMF!) to make actual calls
    • Setup Script and TearDown Script can be placed on TestSuite, TestCase, etc to also house the scripting.  (but I've generally found scripts more handy.)
    • Project-wide utility methods can only be defined with a SoapUI Pro license (IIUC).  Without this, I've ended-up with some copy-and-paste re-use :-(  Shame there's no sliding scale from Community to Pro!
Full details after the break and please note this post's a WIP -- perhaps forever!  ('90s webpage, anyone? ;-) )