Registry / testing / robotframework-stacktrace

robotframework-stacktrace

JSON →
library0.4.1pypypiunverified

Robotframework-stacktrace is a specialized listener for Robot Framework designed to enhance debugging by printing a full stack trace to the console when a test failure occurs. It addresses a common pain point where standard Robot Framework output might not provide sufficient detail to quickly pinpoint the exact line of code causing a failure. The library currently supports Robot Framework versions 4.0 and higher, with its latest release being 0.4.1. It is actively maintained as a utility to improve test debugging workflows.

pip install robotframework-stacktrace
INSTALL
IMPORT
SIG · ROBOTFRAMEWORK-STA
R
robotframework-stacktrace
testingpythonv0.4.1
Install
1.9s 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.4.1 · 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 1.9s · import 0.000s · 24MB
22MB installed
● package 22MB
Code
Verified usage

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

RobotStackTracer
robot --listener RobotStackTracer <your_test_file.robot>
This library is used as a Robot Framework listener via the command line, not imported directly in Python code.

To use robotframework-stacktrace, execute your Robot Framework tests via the `robot` command, specifying `RobotStackTracer` as a listener using the `--listener` option. This will enable the stack trace output for any test failures.

# Create a simple Robot Framework test file (e.g., my_test.robot) # my_test.robot *** Settings *** Library OperatingSystem *** Test Cases *** Example Failing Test Log This test will fail Fail Intentional Failure # Run Robot Framework with the listener # Make sure to install robotframework-stacktrace first: pip install robotframework-stacktrace # In your terminal, navigate to the directory containing my_test.robot and run: # robot --listener RobotStackTracer my_test.robot # You should see a detailed stack trace in the console output upon failure.
Debug
Known issues
gotchaAlthough `setup.py` declares a dependency on `robotframework >= 3.2`, the `robotframework-stacktrace` project's README and PyPI description explicitly state it is 'A listener for RF >= 4.0'. Using it with Robot Framework versions between 3.2 and 3.9 (inclusive) might lead to unexpected behavior or incompatibility, even if installation succeeds.
fix
Ensure your Robot Framework installation is version 4.0 or newer. Use `pip install --upgrade robotframework` to update if needed.
affects: < 4.0.0
breakingVersions prior to 0.4.1 had potential side-effects from library variable resolving, which could lead to unexpected behavior or incorrect test execution outcomes.
fix
Upgrade to version 0.4.1 or newer to avoid these side-effects. `pip install --upgrade robotframework-stacktrace`
affects: < 0.4.1
gotchaRobot Framework does not, by default, print a detailed stack trace on failures, making it difficult to locate the exact line of code that caused an issue, especially with reusable keywords. This library solves that specific problem.
fix
Use `robotframework-stacktrace` as a listener (e.g., `robot --listener RobotStackTracer ...`) to get detailed stack traces in your console output.
affects: All
Upgrade
Version history
0.4.1latest on PyPI · released Jul 12, 2021
Audit
Dependencies
robotframeworkrequiredThis library is a listener for Robot Framework and requires it to function. Although setup.py specifies '>=3.2', the project officially states compatibility and intended use for '>=4.0'.
Agent activity
8 hits · last 30 days
node
8
Resources
robotframework-stacktrace — pip install robotframework-stacktrace · libregistry