I have a very basic check if my webservice is still up and running by sending a query to my-endpoint.com?heartbeat={{utc_datetime}}
. The service simply returns the value of heartbeat
.
However, if I set the Assertion
Text Body equals {{utc_datetime}}
this fails, as it is a few milliseconds different. How can I use the same variable that was send on http://runscope.com?
Create an Initial Variable (expand the Environment settings at the top of the test editor) with a name like date
and a value of {{utc_datetime}}
. That will create a static value you can reference throughout the test using {{date}}
.