-
Notifications
You must be signed in to change notification settings - Fork 2.5k
Open
Description
We encountered follwoing scenario while using a custom library: (RF 6.0, Python 3.10.8)
When the initialization of the custom library fails, the test execution is continued until the first keyword provided by that library is used. The result is a rather misleading "No keyword with name 'XY' found.".
Here is a minimal example:
ExampleLib.py:
class ExampleLib:
ROBOT_LIBRARY_SCOPE = 'SUITE'
ROBOT_LISTENER_API_VERSION = 3
def __init__(self):
# do init stuff
raise Exception("something bad happened while doing init stuff")
def sayHello(self):
return "Hello World"
Example.robot:
*** Settings ***
Library ExampleLib.py
*** Test Cases ***
Test SayHello
${res} = Set Variable "This is a String"
${res} = sayHello
Log To Console ${res}
It would be great to have the possibility to stop the test execution from within the custom libraries constructor.