Forum Discussion
JimL
15 years agoContributor
Hi,
I've done more reading on my part, and it looks like datagen step is only available in the pro version?
Anyway, I found this thread:
viewtopic.php?f=5&t=4388&p=14721&hilit=datagen+pro#p14721
So, it seems like I can set the property in the test case by using Groovy in a setup script, even in the non-pro SOAPUI. Is that correct?
If so, it's not clear to me how the Groovy script sets the property within the testcase?
I'll admit that I'm not at all familiar with Groovy, but this:
http://www.soapui.org/Functional-Testin ... rties.html
has a datagen/Groovy example to return a formatted date string:
I can modify that to get the format I need, i.e., something like:
but it's not clear how to take the formatted string into the test case property?
Thanks,
Jim
I've done more reading on my part, and it looks like datagen step is only available in the pro version?
Anyway, I found this thread:
viewtopic.php?f=5&t=4388&p=14721&hilit=datagen+pro#p14721
So, it seems like I can set the property in the test case by using Groovy in a setup script, even in the non-pro SOAPUI. Is that correct?
If so, it's not clear to me how the Groovy script sets the property within the testcase?
I'll admit that I'm not at all familiar with Groovy, but this:
http://www.soapui.org/Functional-Testin ... rties.html
has a datagen/Groovy example to return a formatted date string:
def sdf = new java.text.SimpleDateFormat("yyyy-MM-dd")
return sdf.format( new Date())I can modify that to get the format I need, i.e., something like:
def sdf = new java.text.SimpleDateFormat("yyyy-MM-ddThh:mm:ssZ")
return sdf.format( new Date())but it's not clear how to take the formatted string into the test case property?
Thanks,
Jim