Forum Discussion
Hi,
Not sure if this will help you with creating a your date within a given range using a script, but just incase I solved a problem like this previously in the following post:
http://community.smartbear.com/t5/SoapUI-Open-Source/Random-Date-Project-Property/td-p/99993
In order to test that your response contains a date within a given range using a regex, I would try a Script Assertion:
1) Get the date from the response and hold it in a variable using a property expansion e.g. something like
def dateToTest = context.expand('${#Project#date}')
2) Next test the dateToTest variable against your regex using something like:
If (dateToTest=~searchStringRegex) { code if matched... }
For more on Groovy regex, go to http://groovy.codehaus.org/Regular+Expressions.
Is this on the right track to what you're after?
Cheers,
Rupert
It didn't directly answer my question but gave me some indications, where to search on. So it helped. Thanks!
- rupert_anderson9 years agoValued Contributor
Ok, no problem :-)
Cheers,
Rupert
Related Content
Recent Discussions
- 6 days agoemoya