English 中文(简体)
让水豚和黄瓜记录更多信息
原标题:Getting capybara and cucumber to log more information

我的黄瓜/水豚设置,并想知道。。。

我如何才能从黄瓜和水豚中获得更多信息,看看发生了什么?

我试过跑步

bundle exec cucumber features/myfeature.feature -v -b -x

但这只是显示了加载了哪些rb文件以及正在加载哪些功能。我想知道它到底在运行什么。它向我展示的只是:

F_______________F

这完全没有帮助。

问题回答

你希望看到什么样的信息?

您可以尝试添加--format=prett选项-这将在处理每个步骤时打印出与之匹配的步骤定义的文件位置,这样您就可以查看每个步骤的状态(通过、失败、跳过、挂起等)

为了调试步骤,我错过了Cucumber中一些真正的日志记录支持,但目前从步骤记录的方式似乎是“宣布”消息。公告是使用@announce-tag打开的。试着用@announce标记你的功能/场景,这是我迄今为止发现的最好的选择。





相关问题
Why Cucumber hook methods aren t lowercase?

Cucumber has a few different hook methods like Before, After or AfterStep. I was wondering - why doesn t these method names follow Ruby s naming conventions to write method names all lowercase? ...

Cucumber Table Diff and colspan

I love cucumber, and its table diff feature. But I, often use a td colspan to display the title of the table. And I can t seem to get the table diff to work when I use colspan. (Table diff expects a ...

cucumber features --guess

I m setting up my Authlogic user session features. And I m in some kind of confusion. When I run: cucumber features I get some red errors Scenario: User signs in successfully ...

Rails | Cucumber | acl9 | AccessDenied

I am ramping up Cucumber, and I am having a issue getting one of my first tests to pass. The exception I am getting is: And I visit the new contract screen Acl9::AccessDenied (Acl9::AccessDenied) ...

Silencing Factory Girl logging

Just to clear the air, I am not some cruel factory master trying to silence working ladies. I am having a very annoying problem where when using Thoughtbot s factory girl in my specs, every time ...

How to resolve Rails model namespace collision

The story so far: I have a rails app with a model named "Term". All is well until trying to install Cucumber. Upon running rake cucumber I get Term is not a class (TypeError) This happens because ...

rspec testing views with internationalization?

I want to make sure I have the right meta desc/keyword and title text in my view so I want to create rspec views tests for that. Now the real challange here is how to make it work across multiple ...

热门标签