Registry / testing / robotframework-retryfailed

robotframework-retryfailed

JSON →
library0.2.0pypypiunverified

robotframework-retryfailed is a Robot Framework listener that enables automatic retrying of failed tests or tasks based on specific tags. It integrates directly with Robot Framework's execution, providing in-place retries for individual failing tests without requiring a separate re-execution command. The current version is 0.2.0, released in October 2022, and its release cadence appears infrequent.

pip install robotframework-retryfailed
INSTALL
IMPORT
SIG · ROBOTFRAMEWORK-RET
R
robotframework-retryfailed
testingpythonv0.2.0
Install
2.1s avg
Import
Disk
22MB
Pass rate
10/ 10
Env Coverage10 / 10
glibc
3.93.13
musl
3.93.13
Install & Compatibility
Where this runs
tested against v0.2.0 · pip install
no network on importno background threads
Install × environment matrix
Each cell = how many times install + import succeeded across repeated harness runs. Partial = flaky.
glibc = Debian/Ubuntu slim · musl = Alpine Linux
musl
py 3.103.920 runs
installs and imports cleanly · install 0.0s · import 0.000s · 23.9MB
glibc
py 3.103.920 runs
installs and imports cleanly · install 2.1s · import 0.000s · 24MB
22MB installed
● package 22MB
Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

RetryFailed
robot --listener RetryFailed <your_suite.robot>
from robotframework_retryfailed import RetryFailed
The library is used as a listener directly via the Robot Framework command line, not typically imported into Python code for direct instantiation.
RetryFailed with arguments
robot --listener RetryFailed:1 <your_suite.robot>
The listener accepts arguments directly after a colon, e.g., to set a global retry count or configuration options.

This quickstart demonstrates how to use the `robotframework-retryfailed` listener. It creates a simple Robot Framework file with a test case tagged for retries. The test is configured to fail, triggering the listener to retry it. Execute the generated `robot` command to see the retries in action.

import os # Create a dummy Robot Framework test file robot_file_content = ''' *** Settings *** Library OperatingSystem *** Test Cases *** Example Failing Test [Tags] test:retry(2) Fail If True This test is designed to fail and retry '''.strip() with open('my_tests.robot', 'w') as f: f.write(robot_file_content) # Run Robot Framework with the RetryFailed listener # For demonstration, we'll just print the command # In a real scenario, you'd run this via subprocess or directly in your shell robot_command = f"robot --listener RetryFailed:2 my_tests.robot" print(f"To run the example, execute:\n{robot_command}") # Expected outcome: The test 'Example Failing Test' will fail, be retried twice, and ultimately still fail if 'Fail If True' is never satisfied. # The final report will show retries occurred.
Debug
Known issues
gotchaThe listener is triggered via command-line arguments to `robot`, not by importing a class in a Python file. Ensure the listener name `RetryFailed` is correctly spelled and followed by a colon for arguments (e.g., `RetryFailed:2`).
fix
Always use `robot --listener RetryFailed` or `robot --listener RetryFailed:<args>`.
affects: All versions
gotchaUsers often confuse this listener with Robot Framework's built-in `Wait Until Keyword Succeeds` keyword (for individual keywords) or the `--rerunfailed` command-line option (for re-executing failed tests from a previous run). `robotframework-retryfailed` offers in-place retries for entire tests or tasks during a single execution run.
fix
Understand the scope: `robotframework-retryfailed` for in-place test/task retries, `Wait Until Keyword Succeeds` for keyword retries, `--rerunfailed` for re-running a subset of tests from a previous `output.xml`.
affects: All versions
gotchaThere are open issues regarding potential conflicts with Robot Framework's `exitonfailure` option, which might cause unexpected behavior when combined with `robotframework-retryfailed`.
fix
Review GitHub issues for updates and consider testing thoroughly if `exitonfailure` is used alongside `robotframework-retryfailed`.
affects: 0.2.0 (and potentially earlier)
gotchaAn open issue on GitHub reports that the listener might not retry 'Setup' sections (Suite Setup or Test Setup), only the test body itself. Also, issues exist where the first test case in a file might run twice, even if it passes.
fix
Be aware that setup failures might not trigger retries. Test any 'Setup' retry expectations. Monitor GitHub issues for fixes or workarounds regarding unintended double execution.
affects: 0.2.0 (and potentially earlier)
breakingThe project's GitHub repository currently shows no explicit 'Releases' section, despite the package being available on PyPI. This can make tracking structured release notes or breaking changes between versions difficult.
fix
Refer to the GitHub `CHANGELOG.md` (if available) or the issue tracker for significant changes, and test new versions thoroughly.
affects: All versions (0.2.0 onwards)
Upgrade
Version history
0.2.0latest on PyPI · released Oct 9, 2022
Audit
Dependencies
robotframeworkrequiredThis library is a listener for Robot Framework and requires it to function.
Agent activity
19 hits · last 30 days
node
18
Resources