jga*_*abt 3 ruby testing android calabash
我从葫芦开始,我无法进行测试.测试很简单,只需按一个TextView:
Feature: Login feature
Scenario: Given I am on the Login page
touch("TextView id:'com.tae.store:id/option_bag'")
Run Code Online (Sandbox Code Playgroud)
但我总是有同样的错误:
功能:登录功能
Scenario: Given I am on the Login page # features/my_first.feature:3
touch("TextView id:'com.tae.store:id/option_bag'")
`Cucumber::Ast` no longer exists. These classes have moved into the `Cucumber::Core::Ast` namespace, but may not have the same API. (RuntimeError)
./features/support/app_installation_hooks.rb:8:in `Before'
Failing Scenarios:
cucumber features/my_first.feature:3 # Scenario: Given I am on the Login page
1 scenario (1 failed)
0 steps
0m6.173s
Run Code Online (Sandbox Code Playgroud)
我正在使用Ruby 1.9.3(我也尝试过使用Ruby 2.0.0).
谢谢
小智 7
我在尝试设置Calabash和Cucumber时遇到过这个问题几次.我发现问题与我正在使用的Cucumber gem的版本有关.几个不同的消息来源提到,较新的Calabash宝石不适用于Beta Cucumber版本(参考:https://github.com/calabash/calabash-android/issues/479)
为了解决这个问题,我安装了一个较旧的黄瓜宝石并移除了新的黄瓜宝石
gem install cucumber -v 1.3.17
gem uninstall cucumber -v 2.0.0.beta.3
Run Code Online (Sandbox Code Playgroud)
在这样做之后,我能够运行我的测试而不会出现错误.希望这对其他人也有帮助.