Hi,
Can some body suggest me how to get the "StartTime" and "TimeTaken" of a test step in soap ui pro using groovy script
FYI I am using the below code to print the rest of details
def filePath = context.expand('${#Project#FilePath}');
def requestId = context.expand('${#TestCase#RequestId}');
def serviceName = context.getTestCase().name;
def statusCode = context.expand('${#Response#//*:envelope[1]/*:body[1]/*:Status/*:StatusCode}');
def statusDesc = context.expand('${#Response#//*:envelope[1]/*:body[1]/*:Status/*:StatusDesc}');
def status = context.expand('${#TestCase#Flag}');
def startTime = context.expand('${#TestStep#StartTime}')
import java.text.SimpleDateFormat;
def DATE_FORMAT_NOW = "yyyy-MM-dd HH:mm:ss:sss";
def cal = Calendar.getInstance();
def sdf = new SimpleDateFormat(DATE_FORMAT_NOW);
def StartTime = sdf.format(cal.getTime());
File foutput = new File(filePath);
if (!foutput.exists()){
String line = "RequestId\t" + "ServiceName\t" + "StatusCode\t" + "StatusDesc\t" + "Status\t" + "StartTime\t";
foutput.write(line+"\n");
}
String line = "$requestId\t" + "$serviceName\t" + "$statusCode\t" + "$statusDesc\t" + "$status\t" +"$StartTime\t";
foutput.append(line+"\n");
Thanks,
RR