我想要的是获取当前日期,并使用此时间戳转换器将它作为1562239260之类的内容放入测试用例中的变量:
https://www.timestampconvert.com/?go1=true&m=07&d=04&y=2019&hours=13&min=21&sec=000&Submit=++++++Convert+to+timestamp+++++&offset=-1
我试图将此代码作为属性值${=def now=new Date();now.format("yyyy-MM-dd")},但格式错误。
${=def now=new Date();now.format("yyyy-MM-dd")}
部分确定,我解决了问题${=def now=new Date();epoch_milis = now.getTime()}但我需要此时间戳提前1分钟
${=def now=new Date();epoch_milis = now.getTime()}
这里是纯Groovy格式:
这是正确的答案