max1965
13 years agoContributor
time difference
I write a groovy script to save the date when the test case was executed:
def date = new Date()
def formattedDate = date.format('yyyy-MM-dd HH:mm:ss')
log.info formattedDate
def props = testRunner.testCase.getTestStepByName( "Properties" )
props.setPropertyValue("xxxxxx", formattedDate);
Result: Tue Feb 26 15:41:18 CET 2013:INFO:2013-02-26 15:41:18
When I executed the test case, the test steps must be executed only if are passed 10 days from the previous execution.
How I can check the time difference between the two execution ?
def date = new Date()
def formattedDate = date.format('yyyy-MM-dd HH:mm:ss')
log.info formattedDate
def props = testRunner.testCase.getTestStepByName( "Properties" )
props.setPropertyValue("xxxxxx", formattedDate);
Result: Tue Feb 26 15:41:18 CET 2013:INFO:2013-02-26 15:41:18
When I executed the test case, the test steps must be executed only if are passed 10 days from the previous execution.
How I can check the time difference between the two execution ?