Open finestructure opened 5 years ago
The workaround for this would be to use a service that returns the value:
Note: using stREST release 2.0 syntax
version: 1
requests:
setValue:
request:
url: https://postman-echo.com/post
method: POST
postData:
mimeType: application/json
text:
value: <$ Faker("random.number") $>
log: true
useValue:
request:
url: https://postman-echo.com/post
method: POST
postData:
mimeType: application/json
text:
reused: <$ setValue.content.data.value $>
log: true
Describe the bug I'm trying to set up a variable with a random number in order to test PUT updates:
While this passes the test, it doesn't work as intended, because the value actually saved is literally
and not something like
To Reproduce Steps to reproduce the behavior
Expected behavior
Var(note_update)
should resolve toUpdate \d+
Additional context
I have alternatively tried to rewrite my test as follows:
but this fails, because
update_contract
is a 204 -No content
and thereforeValue(update_contract.notes)
is not available.I can't see a way to provide a random input but also save it for later cross checking.