robotframework / robotframework/robotframework

Run Keyword and Ignore Error doesn't handle logging w/ --exitonerror

Open
#3,881 2 comments 1 reaction 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Python
Stars
11.9k
Forks
2.6k
Avg merge
1d 18h
Merged PRs (30d)
10

Description

Looks like Run keyword and ignore error does not shield from the ERROR log messages, and tests still fail with --exitonerror flag on. Shouldn't it ignore the logs too?


Repro code:

# kw.py
import logging

def mykw(msg):
    logging.error(msg)
*** Settings ***
Library  kw.py

*** Test Case ***
Test
    Run Keyword and ignore error   mykw   error msg

Test2
    Log to Console   This should not fail

Run with: robot --exitonerror test.robot


Log:

image

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with the reproducer in kw.py and test.robot, then run robot --exitonerror test.robot to confirm the failure. Trace how Run Keyword and Ignore Error handles the ERROR log from mykw; done means the logged error is ignored and Test2 still runs without failing the suite.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
testing-qa
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.