This feature introduces the ability to retry failed test scenarios in your test runs. It provides flexibility in managing the number of retry attempts for scenarios that fail during testing.
This feature addresses the issue of retrying failed test scenarios. It implements a mechanism to automatically rerun failed scenarios to improve the stability of test results.
The following changes have been made to implement the retry functionality:
- Added a
before_feature
hook in\features\environment.py
to handle retrying failed scenarios. - Passed the overriding variable
TEST_RETRY_ATTEMPTS_OVERRIDE
viamanage.py
to the Docker environment.
There are two ways to override the number of attempts for retrying failed scenarios:
Add the following variable to the [behave.userdata]
section of the behave.ini
file:
[behave.userdata]
test_retry_attempts = 2
Pass the TEST_RETRY_ATTEMPTS_OVERRIDE
variable as an environment variable while running tests or through deployment YAML files.
Example:
TEST_RETRY_ATTEMPTS_OVERRIDE=2 ./manage run -d acapy -b javascript -t @AcceptanceTest
Your feedback and contributions are welcome! If you encounter any issues or have suggestions for improvement, please feel free to open an issue or submit a pull request.