Hi,
Unfortunately Dan's solution doesn't work for me. When I change the app_life_cycle_hooks.rb as described above, I keep getting this error:
HTTPClient::KeepAliveDisconnected (HTTPClient::KeepAliveDisconnected)
features\myFeature.feature:5:in `Then I should see "App Navigation"'
Without the change it works fine but with the unwanted restarting. I also tried adding After ("@restart") do |scenario| but I only got the same error.
app_life_cycle_hooks.rb:
require 'calabash-android/management/adb'
require 'calabash-android/operations'
Before ("@restart") do |scenario|
start_test_server_in_background
end
After do |scenario|
#After ("@restart") do |scenario|
if scenario.failed?
screenshot_embed
end
#shutdown_test_server
end
myFeature.feature:
Feature: Home screen and basic navigation
Scenario: I can start my app
Given my app is running
Then I should see "App Navigation"
And I should see "Simple Up Navigation"
And I should see "Peer Activities"
And I should see "View from other task"
@restart
Scenario: Go to "Simple Up Navigation" and back
Given I am on the Home Screen
Then I should see "App Navigation"
...
...
...
ruby: 1.9.3.
calabash: 0.4.21
cucumber: 1.3.15
Help is much appreciated.
Thanks,
Mario