java - Rally Rest Test Case creation Current Date/Time -
i using rally test case result creation code created nickm (located @ https://raw.githubusercontent.com/nmusaelian-rally/rally-java-rest-apps/master/addtcrtotc.java). question concerning date.
newtestcaseresult.addproperty("date", "2014-04-09t18:00:00.000z");
is there way update java code have automatically select current date/time (that script run) rather having fixed value there? in advance.
there different ways in java. need current date/time , iso format. 1 way:
you may import:
import java.util.date; import java.text.dateformat; import java.text.simpledateformat;
and then:
date d = new date(); dateformat iso = new simpledateformat("yyyy-mm-dd't'hh:mmz"); newtestcaseresult.addproperty("date", iso.format(d));
Comments
Post a Comment