Robot Framework Stack Trace Listener

0.4.1 · active · verified Wed Apr 15

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.

Warnings

Install

Imports

Quickstart

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.

view raw JSON →