calabash / calabash-android

Automated Functional testing for Android using cucumber
Other
1.68k stars 617 forks source link

Undefined method `feature' for #<Cucumber #928

Open Hugofv opened 3 years ago

Hugofv commented 3 years ago

I have this erro on running apk.

OS System: macos.

undefined methodfeature' for #<Cucumber::Core::Test::Case: features/my_first.feature:3> (NoMethodError) ./features/support/app_installation_hooks.rb:10:in Before'

My test:

image

Julioevm commented 3 years ago

What are you using to run this test ? Can you share the specific command?

acass91 commented 3 years ago

I saw this as well after running bundle exec calabash-android gen followed by bundle exec calabash-android run my_apk.apk

      Could not execute command to start test server (RuntimeError)
      ./features/support/app_life_cycle_hooks.rb:5:in `Before'
      undefined method `feature' for #<Cucumber::Core::Test::Case: features/my_first.feature:3> (NoMethodError)
      ./features/support/app_installation_hooks.rb:10:in `Before'

From gem list --local, I see the following versions for Calabash and Cucumber.

calabash-android (0.9.22)
concurrent-ruby (1.1.8)
cucumber (4.1.0)
cucumber-core (7.1.0)
cucumber-create-meta (1.0.0)
cucumber-cucumber-expressions (10.3.0)
cucumber-gherkin (14.2.0)
cucumber-html-formatter (7.2.0)
cucumber-messages (12.4.0)
cucumber-tag-expressions (2.0.4)
cucumber-wire (3.1.0)

I was able to get around this issue by downgrading Cucumber to 3.1.0 in the Gemfile and running bundle update cucumber.