|
Title: set a date from a testcase property Post by: Christoph Schwarz on June 11, 2008, 03:35:20 pm hi,
i have a testcase where i have a date field where i always want to have the actual date from today and not a fixed date from the datepicker. so i did a simple groovy script to generate todays date, store it as a testsuite property and would like to import that testsuite property into the date field. but whenever i close the request and reopen it i have the date in there and not the property value anymore. is there a way to keep the property value? thanks, Christoph Title: Re: set a date from a testcase property Post by: omatzura on June 11, 2008, 03:42:02 pm Hi Chris,
hmm.. what exactly are you entering into the field that gets replaced with the actual date? regards, /Ole eviware.com Title: Re: set a date from a testcase property Post by: Christoph Schwarz on June 11, 2008, 04:45:05 pm Hi Ole,
i want to do something like this request from a database: <soapenv:Body> <sec:GetList> <!--Optional:--> <sec:AuditLogEntryRequest> <!--Optional:--> <sec1:UserName>AnyUser</sec1:UserName> <!--Optional:--> <sec1:Module>Module</sec1:Module> <!--Optional:--> <sec1:EventContract>IContract</sec1:EventContract> <!--Optional:--> <sec1:EventOperation>Login</sec1:EventOperation> <!--Optional:--> <sec1:CreatedFrom>2008-06-10T00:00:00.000+02:00</sec1:CreatedFrom> <!--Optional:--> <sec1:CreatedUntil>2008-06-12T00:00:00.000+02:00</sec1:CreatedUntil> </sec:AuditLogEntryRequest> where i would like to replace the Date in <sec1:CreatedFrom>2008-06-10T00:00:00.000+02:00</sec1:CreatedFrom> with a date from a property: ${#TestSuite#TodaysDate} (currently set to Wed Jun 11 16:39:07 CEST 2008) so the createdFrom should look like this: <sec1:CreatedFrom>${#TestSuite#TodaysDate}</sec1:CreatedFrom> thanks, Chris Title: Re: set a date from a testcase property Post by: omatzura on June 11, 2008, 05:58:00 pm Hi,
ok.. and you're saying that when you enter this property-expansion in the form field, it gets expanded/removed when you open/close the request? Which version/build are you running? regards! /Ole eviware.com Title: Re: set a date from a testcase property Post by: Christoph Schwarz on June 12, 2008, 08:28:43 am Hi,
yes, i try to select it on the form and it is displayed, but when i switch to the xml then there the date is still shown and when i switch back to the form the date there is shown again. i originally created the request in the service with a date set, then copied it to a testcase and wanted to select the property extension. i tried to enter it manually in the xml and this works. i am using version 2.0.2 regards, Chris Title: Re: set a date from a testcase property Post by: Marcel Brökel on June 12, 2008, 03:08:37 pm i got the same problem. Maybe the date format fields are not accesable with properties ?
have you tried to paste the propertyextension directly into the xml ? Title: Re: set a date from a testcase property Post by: omatzura on June 13, 2008, 11:06:56 am Hi everyone!
this is fixed in next release, sorry for the inconvenience.. regards! /Ole eviware.com Title: Re: set a date from a testcase property Post by: Christoph Schwarz on June 13, 2008, 11:57:35 am Hi,
for me it works when i manually copy the property string in the XML like this: <sec1:CreatedFrom>${#TestSuite#TodaysDate}</sec1:CreatedFrom> regards Chris |