Hi,
I have used the below code as suggested but still getting error:
Code:
import java.text.SimpleDateFormat
import com.eviware.soapui.model.testsuite.Assertable.AssertionStatus
import com.eviware.soapui.impl.wsdl.teststeps.RestTestRequestStep
import com.eviware.soapui.support.XmlHolder
import jxl.*
import jxl.write.*
def count=0,i=1,j=1
def inputFileName,outputFileName
def testStep = testRunner.testCase.testSteps["Properties"]
if (testStep.getPropertyCount() > 0){
for (prop in testStep.getPropertyList()){
if(prop.getName()=="outputFileName"){
outputFileName=prop.getValue()
}
}
}
Workbook old_WB=Workbook.getWorkbook(new File(outputFileName))
DateFormat df = new SimpleDateFormat("yyyy-MM-dd:hh:mm:ss");
String filename = old_wb + df.format(new Date()) + ".";
error:
org.codehaus.groovy.runtime.typehandling.GroovyCastException: Cannot cast object 'java.text.SimpleDateFormat@f7573bba' with class 'java.text.SimpleDateFormat' to class 'jxl.write.DateFormat' error at line: 18