Forum Discussion
sinnes_1
15 years agoOccasional Contributor
Hey Jim,
SQL queries in Groovy are quite easy! There's a fair bit of documentation on it floating around. A brief tutorial can be found here: http://docs.codehaus.org/display/GROOVY/Tutorial+6+-+Groovy+SQL
I'm assuming you'd be checking the database for values based on what you use in your actual SOAP request, so to compare, you just need to pass your variables in to the groovy script, do your select statement and compare
I tend to do data driven tests by using CSV files at present, but that's only because it suits what I'm testing. I do know you can get data from an MS Excel workbook by using the JXL library (http://jexcelapi.sourceforge.net/). So get your various data from various sheets in your workbook, then pass them to your various requests and other groovy scripts.
Hope this is a good starting point. Feel free to ask specifics and I'll see if I can help
Hopefully that's enough to get you started.
SQL queries in Groovy are quite easy! There's a fair bit of documentation on it floating around. A brief tutorial can be found here: http://docs.codehaus.org/display/GROOVY/Tutorial+6+-+Groovy+SQL
I'm assuming you'd be checking the database for values based on what you use in your actual SOAP request, so to compare, you just need to pass your variables in to the groovy script, do your select statement and compare
I tend to do data driven tests by using CSV files at present, but that's only because it suits what I'm testing. I do know you can get data from an MS Excel workbook by using the JXL library (http://jexcelapi.sourceforge.net/). So get your various data from various sheets in your workbook, then pass them to your various requests and other groovy scripts.
Hope this is a good starting point. Feel free to ask specifics and I'll see if I can help
Hopefully that's enough to get you started.
Related Content
- 2 months agoStoplight
- 2 months agoStoplight
- 3 years agogeneticmaterial
- 12 years agolphilippe_macau
- 3 years agothaidy
Recent Discussions
- 10 hours agogroovyguy