gauge
gauge copied to clipboard
Feature Request: Step Retry Mechanism with Conditional Logic
Background
It's common to encounter transient errors such as network issues or temporary server unavailability. Currently, there is no built-in mechanism in Gauge to retry a step based on specific conditions like network errors.
Request
I would like to request a new feature in Gauge that allows steps to be retried automatically based on user-defined conditions. This feature would enhance the robustness of tests by handling intermittent issues more gracefully.
Proposed Solution
Introduce a mechanism to define retry logic within steps or at the suite level with the following capabilities:
Retry Conditions: Allow users to specify conditions for retrying a step, such as:
- HTTP status codes (e.g., 429 Too Many Requests, 500 Internal Server Error)
- Specific exceptions (e.g.,
IOException
,TimeoutException
) - Custom logic (e.g., retry based on the response body or headers)
Making the retry --max-retries-count configurable would solve the problem as well, that way I wouldn't retry all the failed tests that I would like them to fail to avoid possible bugs.