如何解决使用Cucumber的代码段创建以JS编写
当特征文件有未定义的步骤时,是否可以使用Cucumber的framework选项创建步骤定义摘要。
如果我没有为.feature
文件创建步骤定义时使用Ruby + Cucumber,则在自动化项目的根文件夹中键入cucumber
时的输出如下:
You can implement step deFinitions for undefined steps with these snippets:
Given('I login to application') do
pending # Write code here that turns the phrase above into concrete actions
end
Then('I see I'm logged') do
pending # Write code here that turns the phrase above into concrete actions
end
我想在Cypress + Cucumber上使用相同的功能。
但是,如果我在开始时使用cucumber --init
创建了Cypress项目(因此它创建了Cucumber的标准结构),则此功能与Ruby中的外观相同,我需要在JavaScript中使用。
You can implement step deFinitions for undefined steps with these snippets:
Given('I access application') do
pending # Write code here that turns the phrase above into concrete actions
end
When('I login with user jenn00 and pass password123') do
pending # Write code here that turns the phrase above into concrete actions
end
我尝试在.js
文件夹中创建一个step_deFinitions
文件,以检查代码片段是否用JS编写,但也没有用
版权声明:本文内容由互联网用户自发贡献,该文观点与技术仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 dio@foxmail.com 举报,一经查实,本站将立刻删除。