Setting a delay between tests #77
-
Hi! I would like to ask, if it's possible to set a delay between tests? Like:
|
Beta Was this translation helpful? Give feedback.
Replies: 4 comments 4 replies
-
Do you have a use-case where this would be useful? |
Beta Was this translation helpful? Give feedback.
-
I could see this could be useful in certain systems (like AWS) which follow an eventual consistency model. There's a possible different way to solve this because a delay isn't a guarantee that the user is created. Perhaps there's a way to solve this by having a step which is a "validation/check" step which allows repeating (in this case, to try to GET the /user object every few seconds. Sorry if this is already possible, if it is it isn't obvious. Example... version: "1.1"
name: Status Check
env:
host: example.com
tests:
example:
steps:
- name: CREATE user
http:
url: https://${{env.host}}/
method: POST
contents: {username: 123, password: 123}
check:
status: /^20/
- check: Validate user exists
http:
url: https://${{env.host}}/123
method: GET
check:
status: /^20/
retry:
interval: 3s
timeout: 10s
max_retries: 10 |
Beta Was this translation helpful? Give feedback.
-
Hey Farley @AndrewFarley and @gregorojstersek |
Beta Was this translation helpful? Give feedback.
-
Hey @gregorojstersek we have just added a delay step type Example: version: "1.1"
name: Status Check
env:
host: example.com
tests:
example:
steps:
- name: GET request
http:
url: https://${{env.host}}
method: GET
check:
status: /^20/
- delay: 1s |
Beta Was this translation helpful? Give feedback.
Hey @gregorojstersek we have just added a delay step type
Example: