thunderclient / thunder-client-support

Thunder Client is a lightweight Rest API Client Extension for VS Code.
https://www.thunderclient.com
Other
3.64k stars 132 forks source link

Using Tests for retry function #1600

Closed db-pw-rocker closed 2 months ago

db-pw-rocker commented 2 months ago

Question: Hi, we are testing a lot of asyncron services.. and for that we are using the "Retry Request" from your documentation... https://docs.thunderclient.com/scripting/send-request

Is it possible to use the tests from "Tests section" within the Scripting area (with retry) as the indicator for an successful retry (loop condition)? Otherwise we would need to dublicate the tests in the "Scripting" area.. :/

An example would be nice.

Are you using the free version/paid version/trial: paid version

rangav commented 2 months ago

Thanks @db-pw-rocker for the feedback, Will review it.

rangav commented 2 months ago

We have implemented this feature in v2.25.5

Use - tc.response.passed which returns true or false

Docs - https://docs.thunderclient.com/scripting/api#response

Release Notes https://github.com/thunderclient/thunder-client-support/releases/tag/v2.25.5

Please test and let us know your feedback