[SoapUI] 获取当前时间包括年月日时分秒来作为命名

import java.text.SimpleDateFormat

GregorianCalendar calendar = new GregorianCalendar()

def dateFormat = new SimpleDateFormat("yyyyMMddhhmmss")
def currentTime = dateFormat.format(calendar.getTime()).toString()

context.testCase.getTestStepByName("Properties").setPropertyValue("newGroupName", "AutoSanity_AR_"+currentTime)

  

posted on 2017-04-06 10:13  张缤分  阅读(659)  评论(0编辑  收藏  举报

导航