Keyword: stop on failure

Is it possible to create a keyword ‘stop on failure’?

Hi @valentijnpeters

Is this (stopping-when-first-test-case-fails) what you are after?


Well yes and no. Because this is in the command and I want it from within the testcase.

-vanaf Samsung mobiel-

Fatal Error might work?

1 Like

What problem are you trying to solve?

What do you need to stop, at what moment, when what failed?

Okay let’s say I have 100 scripts.

I want to run them on a Docker but I know 50% will fail.
I would like to skip all the tests after the first fail.
(at that moment I’m in a sort of “repair modus” by means of Docker runs) that is the background/context.

by the way: We workedaround it an another manner by now (0% urgency)

If you want to completely stop a run after the first failure, the command line option --exitonfailure (or -X) is probably what you’re looking for.

Depending on the type of issue, --exitonerror could also be useful:
Robot Framework User Guide