waldenner / robotframework

Automatically exported from code.google.com/p/robotframework
Apache License 2.0
0 stars 0 forks source link

New `BuiltIn` keyword `Fatal Error` to stop the whole test execution #546

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
We now have a possibility to stop the whole execution using `fatal`
exceptions (issue 366). We should also have a BuiltIn keyword that does the
same thing.

It's implementation could probably be something like this:

def fatal_error(message=None):
    error = AssertionError(message)
    error.ROBOT_EXIT_ON_FAILURE = True
    raise error

Original issue reported on code.google.com by pekka.klarck on 6 May 2010 at 6:23

GoogleCodeExporter commented 9 years ago
Done in r3209.

Original comment by pekka.klarck on 6 May 2010 at 9:04

GoogleCodeExporter commented 9 years ago

Original comment by pekka.klarck on 6 May 2010 at 9:04

GoogleCodeExporter commented 9 years ago
This issue is included in RF 2.5 alpha 1.

Original comment by jussi.ao...@gmail.com on 6 May 2010 at 1:35

GoogleCodeExporter commented 9 years ago

Original comment by pekka.klarck on 6 May 2010 at 4:17

GoogleCodeExporter commented 9 years ago
Is there a way to stop execution of current testcase only and then execution 
would continue to next test case on the testsuite?

Original comment by samuli.s...@gmail.com on 3 Feb 2011 at 8:28

GoogleCodeExporter commented 9 years ago
Samuli: Yes, just use the built in keyword "Fail". 
http://robotframework.googlecode.com/svn/trunk/doc/libraries/BuiltIn.html#Fail

Original comment by jussi.ao...@gmail.com on 3 Feb 2011 at 8:49