Before diving into the next installment of my series on new features in soapUI 3.0, let's back up a bit and have a look at the basics of Data-Driven testing in soapUI Pro; the DataSource and DataSource Loop teststeps and how they are meant to be used (see this post as a prequel to DataDriven LoadTesting, which takes things to another level).
Digging further into the list of improvements in soapUI Pro 3.0 reveals support for Event Handlers and improved handling of JDBC Connections. Let's have a look at both of these and how they can be used both on their own and together to provide some very handy functionality.
The new soapUI 3.0 beta has been out on our servers and at sourceforge for a couple of weeks now, the list of new features is as always extensive, and as always we owe most of it to our customers and users; all fantastic feedback, input, support and patience (a lot of that..) has propelled soapUI further towards SOA-testing Nirvana.
The New and Noteworthy document gives an overview of all new features in both soapUI and soapUI Pro, and instead of repeating its content, I'll write a number of entries over the coming weeks to show off some of the more prominent improvements. So lets dive right in and have a look at the extremely cool WADL generation and Schema Inference functionality!
20 Apr
Posted by olensmar as On the web, Tips & Tricks
Ever wanted to save the time taken for a TestStep to a soapUI Pro DataSink? Who hasen't? Here goes:
1) Create a property in your DataSink for holding the time taken, for example "ResponseTime"
2) Create a groovy script step directly after the request/TestStep you want to log and enter the following
// get result of previous teststep def result = testRunner.results[testRunner.results.size()-1] // get target datasink, here named DataSink def dataSink = testRunner.testCase.testSteps['DataSink'] // get the time taken as a string def tt = String.valueOf( result.timeTaken ) // write it to the datasink dataSink.setPropertyValue( 'ResponseTime',tt )
That's it!
Dedicated to Huw, thank you!
/Ole
Want to optimize your SQL-connection handling during the execution of your tests containing groovy scripts that access a database? I thought you would! Checkout this brilliant post from Sachin on his blog; http://onebyteatatime.wordpress.com/2009/02/17/reusable-sql-connection-in-soapui/
Thank you Sachin!
/Ole
Here's a nice tip from alessandro on our forums; he shows how you can easily change the log-files soapUI writes to at runtime.
Check it out!
Sachin has written a cool post on how to use XQuery in your Property Transfers to "mix in" existing data or properties into the transferred content, very cool! Check it out at http://onebyteatatime.wordpress.com/2009/02/13/how-to-insert-a-node-in-soapui-property-transfer/
Thanks Sachin!
/Ole
A nice blog-post on how property-expansion can be used with LoadTests to generate unique values for each request, check it out; http://techwheel.blogspot.com/2009/02/soapui-property-expansion.html.
Thank you Aravind!
/Ole
Just a quick announcement; soapUI 2.5.1 is out with updated plugins for IDEA, Netbeans and Eclipse and a large number of bug-fixes and minor improvements. As always huge thanks to our fantastic customers and community for all your feedback and encouragement!
Check it out at http://www.soapui.org!
and of course soapUI Pro 2.5.1 is available for download from http://www.eviware.com/download
/Ole