我目前正在将机器人框架用于具有 Gherkin 语言策略(Given When Then)的项目。我的特征文件如下:*** 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}我想将关键字“ Given the king is ${hungriness}” 链接到 Python 模块 Eat_or_pass.py 中包含的 Python 定义,该模块当前实现如下:class Eat_or_pass(object):def given_the_king_is_hungriness(self): pass当我运行机器人框架时,出现以下错误:“致命甜点 | 失败 | 未找到名为 'Given the king is ${hungriness}' 的关键字。” 我不知道如何解决它。有没有人可以帮助我解决这个问题?
2 回答
幕布斯7119047
TA贡献1794条经验 获得超8个赞
*** Keywords ***
The result of ${hungriness} should be ${dessert}
Given The king Is Hungriness
它应该被赋予国王是饥饿的 而不是被 赋予的国王是 ${饥饿}
class Eat_or_pass(object):
def given_the_king_is_hungriness(self):
pass
添加回答
举报
0/150
提交
取消