Created
March 8, 2014 18:56
-
-
Save bustardcelly/9437051 to your computer and use it in GitHub Desktop.
Print iOS console error in After Scenario on failure using Cucumber + Calabash-ios
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
After do |scenario| | |
if(scenario.failed?) | |
$stdout.print "\n[Fail] #{scenario.exception.message}\n----------\n" | |
system("tail -r -100 \"#{ENV['HOME']}/Library/Logs/iOS Simulator/7.0.3/system.log\" | grep -A1000 Error -i -m1") | |
$stdout.print "----------\n" | |
end | |
unless @calabash_launcher.calabash_no_stop? | |
calabash_exit | |
if @calabash_launcher.active? | |
@calabash_launcher.stop | |
end | |
end | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment