Groovy in SOAP UI

Archive for October 2008

Operations with sql instance

Posted by: devakara on: October 17, 2008

Groovy provides very robust methods with sql instance to retrieve and manipulate the ResultSet. 
There are methods for retrieving the first row,  the ResultSet of some sql query, directly executing insert/update/delete queries.
Prerequisite: Obtain sql instance using
import groovy.sql.Sql
def sql = Sql.newInstance(dbpath, dbusr, dbpwd, dbdriver)
 
Below are some comprehensive examples which use the above sql instance.
firstRow( sqlQuery ) : This method returns the [...]

Property Transfer in SOAP UI

Posted by: devakara on: October 8, 2008

Property transfers become crucial steps in scenarios where validations are done mostly using derived data.
Lets say after some Groovy script execution we end up setting a property value in Properties step while testing an application’s functionality. And most of the times we would be in need of the obtained result out of that groovy step. As we [...]

Using XPath Assertion in SOAP UI

Posted by: devakara on: October 3, 2008

Assertions are generally the simple and most sought validations that can be enforced in SOAP UI.
For SOAP response we have an assertion step called ‘XPath Match‘, which validates the value yielded by the specified xpath with the one provided staticly.
When we add ‘XPath Match’ assertion using the Add Assertion button, we see the below window.
There [...]