Cucumber:自动创建步骤文件? [英] Cucumber: Automatic step file creation?

查看:18
本文介绍了Cucumber:自动创建步骤文件?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

When i run cucumber it displays the possible steps that i should define, an example from the RSpec book:

1 scenario (1 undefined)
4 steps (4 undefined)
0m0.001s
You can implement step definitions for undefined steps with these snippets:
Given /^I am not yet playing$/ do
  pending
end
When /^I start a new game$/ do
  pending
end
Then /^the game should say "Welcome to CodeBreaker"$/ do
  pending
end
Then /^the game should say "Enter guess:"$/ do
  pending
end

Is there a way that it will automaticly create the step definitions file, so i don't have to rewrite or copy paste by hand but i can just to customize them to be more generic?

解决方案

Cucumber doesn't offer this feature. Probably because you would have to tell it where to put the step definitions file, and what to name it.

这篇关于Cucumber:自动创建步骤文件?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆