ruby-on-rails – 黄瓜错误被抑制(未完全显示)
发布时间:2020-12-17 04:23:15 所属栏目:百科 来源:网络整理
导读:我刚刚安装了黄瓜,我测试了它.我收到以下错误: teefcomp:cucumber-intro teef$cucumber features/manage_users.featureUsing the default profile...F----FFailing Scenarios:cucumber features/manage_users.feature:6 # Scenario: User List1 scenario (1
我刚刚安装了黄瓜,我测试了它.我收到以下错误:
teefcomp:cucumber-intro teef$cucumber features/manage_users.feature Using the default profile... F----F Failing Scenarios: cucumber features/manage_users.feature:6 # Scenario: User List 1 scenario (1 failed) 4 steps (4 skipped) 0m0.029s 它似乎是在抑制错误.我期待的是: Feature: Manage users In order to understand my user base better As an administrator I want to view a list of users Scenario: User List Given I have users named George,Mary uninitialized constant User (NameError) ./features/step_definitions/user_steps.rb:3 ./features/step_definitions/user_steps.rb:2:in '/^I have users named (.*)$/' features/manage_users.feature:7:in 'Given I have users named George,Mary' 任何人都知道如何让黄瓜完整显示错误? –backtrace,– verbose,-b和–trace不起作用;我仍然看到F —- F并列出了失败的场景,但我仍然希望在“NameError”行上有类似描述的内容.这是旧版黄瓜的特征吗? (我正在使用截屏视频开始使用黄瓜.) 解决方法
使用-b标志运行应该会给你一个完整的回溯
cucumber features/manage_users.feature -b 编辑: 此外,您可以使用–backtrace的完整符号.如果您通过rake运行,请使用–trace标志运行 要获得完整输出,可以使用–format标志.我通常使用–format pretty来逐行浏览. 来自–help输出. -f,--format FORMAT How to format features (Default: pretty). Available formats: debug : For developing formatters - prints the calls made to the listeners. html : Generates a nice looking HTML report. json : Prints the feature as JSON json_pretty : Prints the feature as pretty JSON junit : Generates a report similar to Ant+JUnit. pdf : Generates a PDF report. You need to have the prawn gem installed. Will pick up logo from features/support/logo.png or features/support/logo.jpg if present. pretty : Prints the feature as is - in colours. progress : Prints one character per scenario. rerun : Prints failing files with line numbers. stepdefs : Prints All step definitions with their locations. Same as the usage formatter,except that steps are not printed. tag_cloud : Prints a tag cloud of tag usage. usage : Prints where step definitions are used. The slowest step definitions (with duration) are listed first. If --dry-run is used the duration is not shown,and step definitions are sorted by filename instead. Use --format rerun --out features.txt to write out failing features. You can rerun them with cucumber @rerun.txt. FORMAT can also be the fully qualified class name of your own custom formatter. If the class isn't loaded,Cucumber will attempt to require a file with a relative file name that is the underscore name of the class name. Example: --format Foo::BarZap -> Cucumber will look for foo/bar_zap.rb. You can place the file with this relative path underneath your features/support directory or anywhere on Ruby's LOAD_PATH,for example in a Ruby gem. (编辑:李大同) 【声明】本站内容均来自网络,其相关言论仅代表作者个人观点,不代表本站立场。若无意侵犯到您的权利,请及时与联系站长删除相关内容! |
相关内容
- 手把手,快速搭建 Cocos2d-HTML5 开发调试环境 分享0
- oracle – SQL Developer太慢了 我还能用什么?
- ruby-on-rails – 模拟XHR GET请求
- 文本搜索必学命令-grep egrep fgrep用法以及正则表达式
- swift 函数
- PostgreSQL+PostGIS 的使用
- SQLite3包的使用(基础)-SQLite3增删改查,打开,关闭函数
- 闭包错误-Cannot invoke 'responseResult' with an
- Swift服务端编程:Perfect项目上手指南
- (MVC3)Ajax.BeginForm中的OnSuccess不执行的问题研究