0

Update: This issue has been resolved. Resolution in comments below.

When running Calabash tests in both terminal or through Rubymine, the output does not display until the test is finished. With webdriver tests, we get output in real time. Is there a way to display console output in real time with Calabash?

Additional Details

>xcode-select --print-path
/Applications/XCode.app/Contents/Developer

>xcodebuild -version
Xcode 5.1.1
Build version 5B1008

>calabash-ios version
0.9.169

irb(main):002:0> server_version

(I removed the app name)

{
                    "outcome" => "SUCCESS",
                     "app_id" => "com.<redacted>",
           "simulator_device" => "iPhone",
                    "version" => "0.9.169",
                   "app_name" => "<redacted>",
"iphone_app_emulated_on_ipad" => false,
                      "4inch" => true,
                        "git" => {
    "remote_origin" => "git@github.com:calabash/calabash-ios-server.git",
           "branch" => "master",
         "revision" => "ca62f6e"
},
                "app_version" => "1.0",
                "iOS_version" => "7.1",
                     "system" => "x86_64",
                  "simulator" => "iPhone Simulator 463.9.41, iPhone OS 7.1 (iPhone Retina (4-inch)/11D167)"
}
tuggles
  • 21
  • 4
  • We need more details. Please see this calabash-ios topic - http://goo.gl/yQi0bE - and update your question. I have never seen this happen in the shell or in RubyMine. Does this always happen? Or does it happen only sometimes? – jmoody Jul 01 '14 at 01:25
  • Doh! I even read that post. Added the details, and yes, this happens every time in both the shell and in rubymine. – tuggles Jul 02 '14 at 14:04
  • Also, we are running calabash in Rake tasks. – tuggles Jul 02 '14 at 14:11
  • Can we see the exact command that is run? As in, can you post the rake task? In the meantime, can you try using the slowhandcuke formatter. `$ cucumber -f 'Slowhandcuke::Formatter'` to see if it makes a difference. As a sanity check, I work with clients who use rake tasks to run cucumber - they do not have this issue. – jmoody Jul 02 '14 at 15:13
  • The following is what Rubymine kicks off the tests with: `/Users//.rvm/rubies/ruby-1.9.3-p547/bin/ruby -e $stdout.sync=true;$stderr.sync=true;load($0=ARGV.shift) /Users//.rvm/gems/ruby-1.9.3-p547/bin/rake features:ios:default` I run in console by exporting all my environment variables and then merely running: `rake features:ios:default` – tuggles Jul 02 '14 at 18:59
  • I am afraid that we will need to see the _actual_ cucumber command that is executed with all the arguments. – jmoody Jul 02 '14 at 23:04
  • Here ya go: cucumber -r features --guess --color --verbose --exclude \.html --exclude \.htm --exclude \.yml --exclude \.jpg --exclude \.JPG --exclude \.tif --exclude \.bmp --exclude \.png --exclude \.doc --exclude \.docx --exclude \.xls --exclude \.xml --exclude \.pdf --exclude \.txt --exclude \.dot --exclude \.bat --exclude \.PNG --exclude \.mdb --exclude \.zip --exclude \.gem --exclude \.apk --exclude \.jar --exclude load_android.rb --format html --out output/development/ios-2014-07-07_15-23-37.html --tags @tuggles – tuggles Jul 07 '14 at 19:24
  • I just realized we are having this issue beyond calabash. I appreciate your help. I'll start looking elsewhere for answers. – tuggles Jul 08 '14 at 13:29
  • Ok, we fixed the issue. The problem was that we were using backticks to call cucumber. After replacing the backticks with: "system(bundle exec cucumber #{params})", the output comes through fine. – tuggles Jul 08 '14 at 17:35

1 Answers1

0

One scenario I have seen where Calabash stops displaying test output logs is , if user specifies any of the output format while running the tests. For e.g --format json -out cucumber.json --format html -out TestReport.html Also, if you can specify how are you running the Tests and what your project structure looks like, may be I can help you better.

Bharat Gatty
  • 31
  • 1
  • 5
  • I routinely use multiple formatters and have never seen this behavior. Any chance you are using slowhandcuke? @Bharat can you post how you are running cucumber? – jmoody Jul 01 '14 at 01:26
  • @jmoody - I don't see the logs if I run my tests in the following way DEVICE_ENDPOINT=http://deviceip:37265 BUNDLE_ID=com.test.app cucumber --format json -out cucumber.json --tags testtag(for eg .@login) – Bharat Gatty Jul 25 '14 at 07:17
  • I think it is because you have not specified a terminal-based formatter. Add this as a formatter: `-f 'Slowhandcuke::Formatter'`. If slowhandcuke is not to your liking use: `-f pretty`. – jmoody Jul 25 '14 at 13:34