Truncate value once it's been extracted as a property before passing to subsequent request?
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Truncate value once it's been extracted as a property before passing to subsequent request?
Hey!
Sorry - I'm posting a lot today.
I have a GET request that I need to test and the query parameters on the GET equate to the table attributes and values that will be queried via various different applications.
One of the attributes entitled 'EffectiveFrom' is an SQLServer datetime2(3) type - meaning if I do a GET on the table, each record has an EffectiveFrom value in the format '2017-01-01T00:00:00.0000000'
My testcase object hierarchy is as follows:
REST1 step (GET) http://whatevs.azurewebsites.net/api/database/table PropertyTransfer1 (grabs the EffectiveFrom attribute value from one of the records in the resultset passing it to the Properties1 step) Properties1 step (propertyname = 'EffectiveFrom', propertyvalue = '2017-01-01T00:00:00.0000000' REST2 step (GET) http://whatevs.azurewebsites.net/api/database/table?EffectiveFrom= ${Properties1#EffectiveFrom}
I get ZERO rows returned
HOWEVER - if I submit http://whatevs.azurewebsites.net/api/database/table?EffectiveFrom=2017-01-01 the query works and rows are retrieved
Does anyone know how I can effectively do a property transfer and truncate the value (stripping the time details) from the value so the following GET request works correctly?
I hope I've been clear, I know I struggle with this sometimes!
many thanks to all!
richie
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Did you manage to solve it so far?
If not, is the date always in the same format as in yyyy-mm-dd?
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hey @Lucian
thanks for responding - I discovered the developer of the API had actually coded a defect - hindering the return of the datetime value - so its all good
thanks man,
richie
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi Richie,
Do you mind posting the full solution so that other community members can find it easier?
We will mark it accordingly. Thanks!
Tanya Yatskovskaya
SmartBear Community and Education Manager
