我是BDD的新手.每当我尝试使用黄瓜时,我发现它很慢.我在两台不同的机器上尝试过使用Rails 3.0.9和3.1.其中一台机器是旧的IBM thinkpad笔记本电脑,配备2 GB内存; 另一个是带4 GB RAM的PC [如果需要,我可以得到确切的规格].两者都运行Fedora 14.
即使使用没有scnerios的新应用,Cucumber也需要几分钟.这是怎么回事:
$ cucumber
Using the default profile...
--- about 2 minutes delay---- and then it says:
0 scenarios
0 steps
0m0.000s
Run Code Online (Sandbox Code Playgroud)
相比之下,Rspec是即时的:
rspec
No examples found.
Finished in 0.00005 seconds
0 examples, 0 failures
Run Code Online (Sandbox Code Playgroud)
虽然黄瓜说它需要0m0.000s; 它实际上花了大约2分钟.并且,RSpec是即时的并且也正确显示时间:0.00005秒.
这是正常的吗?我是否需要一些额外的Gems或设置来加快处理速度.
更新:这里有更多数据:
先用黄瓜:
$time cucumber
Using the default profile...
0 scenarios
0 steps
0m0.000s
real 0m53.489s
user 0m37.051s
sys 0m1.973s
Run Code Online (Sandbox Code Playgroud)
然后用rspec
$ time rspec spec/
No examples found.
Finished in 0.00005 seconds
0 examples, 0 …Run Code Online (Sandbox Code Playgroud) 我在两个项目上使用Twitter Bootstrap,一个是静态HTML网站,另一个是Rails应用程序.当我在桌面浏览器上测试网站时,调整大小是有效的.但是当我在手机[诺基亚E72]上进行测试时,它只是不适合宽度.有趣的是,当我测试bootstrap主页(http://twitter.github.com/bootstrap/)时 - 它也有同样的问题..这只是我吗?我搜索了stackoverflow和谷歌,其他人似乎对他们的手机上的Bootstrap非常满意.
我还测试了替代框架:基础 - 它似乎工作得更好,至少没有水平滚动.
更新:这似乎是我的诺基亚E72上的一个问题.