How to assert data from the response
Hi,
when i send a request, i want to assert some data in the response using "contains assertion"
my response is:
"data": { "ci_status_id": "023f8f0e-fc53-42ec-8348-24a5470b7d7b", "ci_name": "John", "updated_by": null, "created_at": "2016-02-15T13:53:20Z", "id": "6b54b04d-7d59-44bc-8f54-f439eebf5d1c" }, "success": true }
I want to assert :
ci_status_id = this value is static
ci_status_name = this value is static
update_by = this value is static
created_at = this value is current datetime
id = this value is dynamic and change for each request
What is did:
i added a datacource "values" and a datasource loop
in datasource i added a colum named "data"
in data, i added the content od data retrieved from the response
In my request, i added "contains assertion" and added this line ${values#data}
Problem:
the request is successfull but the assertion is not good because "created_at" is false,
this value is dynamic.
So how can resole this problem
or i can ignore the value of created_at
Thank you