I'm currently using robot framework for a project with Gherkin language strategy (Given When Then).
My feature file is as below:
*** Settings ***
Documentation
... In Order to eat a dessert safely,
... As a king
... I want to not take a lethal dessert
Library eat_or_pass.Eat_or_pass
*** Test cases ***
Lethal Dessert
[Template] The result of ${hungriness} should be ${dessert}
very hungry apple pie
hungry biscuit
not very hungry apple
*** Keywords ***
The result of ${hungriness} should be ${dessert}
Given the king is ${hungriness}
Then the related dessert is ${dessert}
I would like to link the keyword " Given the king is ${hungriness}" to its python definition contained in the python module Eat_or_pass.py which is currently implemented as below:
class Eat_or_pass(object):
def given_the_king_is_hungriness(self):
pass
When I run robot framework, I have this error : "Lethal Dessert | FAIL | No keyword with name 'Given the king is ${hungriness}' found." And I don't know how to solve it. Does anyone can help me on the subject?