1

我正在我的 rails 4 项目中从 Cucumber 转移到 Spinach 以获取 BDD。根据https://github.com/grosser/parallel_tests上的并行测试文档, 它应该支持菠菜

rake parallel:features-spinach       # Spinach

但我得到了那个错误:

4 processes for 40 features, ~ 10 features per process
/home/pbrudny/.rvm/gems/ruby-2.1.1@validations/gems/racc-     1.4.11/lib/racc/parser.rb:532:in `on_error':  (Racc::ParseError)
parse error on value "\n" (NEWLINE)
from /home/pbrudny/.rvm/gems/ruby-2.1.1@validations/gems/racc-1.4.11/lib/racc/parser.rb:264:in `_racc_do_parse_c'
from /home/pbrudny/.rvm/gems/ruby-2.1.1@validations/gems/racc-1.4.11/lib/racc/parser.rb:264:in `do_parse'
from /home/pbrudny/.rvm/gems/ruby-2.1.1@validations/gems/gherkin-ruby-0.3.1/lib/gherkin_ruby/parser/lexer.rb:31:in `scan_str'
from gherkin.y:107:in `parse'
from /home/pbrudny/.rvm/gems/ruby-2.1.1@validations/gems/gherkin-ruby-0.3.1/lib/gherkin_ruby.rb:8:in `parse'
from /home/pbrudny/.rvm/gems/ruby-2.1.1@validations/gems/spinach-0.8.7/lib/spinach/parser.rb:39:in `parse'
from /home/pbrudny/.rvm/gems/ruby-2.1.1@validations/gems/spinach-0.8.7/lib/spinach/runner.rb:75:in `block in run'
from /home/pbrudny/.rvm/gems/ruby-2.1.1@validations/gems/spinach-0.8.7/lib/spinach/runner.rb:74:in `each'
from /home/pbrudny/.rvm/gems/ruby-2.1.1@validations/gems/spinach-0.8.7/lib/spinach/runner.rb:74:in `run'
from /home/pbrudny/.rvm/gems/ruby-2.1.1@validations/gems/spinach-0.8.7/lib/spinach/cli.rb:27:in `run'
from /home/pbrudny/.rvm/gems/ruby-2.1.1@validations/gems/spinach-0.8.7/bin/spinach:15:in `<top (required)>'
from /home/pbrudny/.rvm/gems/ruby-2.1.1@validations/bin/spinach:23:in `load'
from /home/pbrudny/.rvm/gems/ruby-2.1.1@validations/bin/spinach:23:in `<main>'
from /home/pbrudny/.rvm/gems/ruby-2.1.1@validations/bin/ruby_executable_hooks:15:in `eval'

只是想知道是否有人设法并行运行菠菜。

4

1 回答 1

1

最后我能够并行运行菠菜。问题是并行测试仅在菠菜功能位于默认目录中时才有效

/features 

无论spinach.yml设置如何。

我把它们放进去

/spinach_features

不幸的是,并行测试比常规测试花费更长的时间,并且输出显示没有颜色,所以基本上没有使用它们的好处(至少在我的情况下)。

于 2014-04-24T07:57:36.250 回答