Console output on jenkins is messed up and build failed is not being triggered.

1,039 views
Skip to first unread message

David

unread,
Sep 13, 2012, 4:47:58 PM9/13/12
to calabash...@googlegroups.com
I am running it the same way as on my local machine but the output on jenkins looks very different. 

It looks like this: 
 [32mWhen I press " [32m [1mLogin [0m [0m [32m" [90m   

Any ideas? It is also not triggering a build failed even though they are failed scenarios. 

Jonas Larsen

unread,
Sep 13, 2012, 4:51:00 PM9/13/12
to calabash...@googlegroups.com

Which platform are you and Jenkins running on? Which Calabash version are you using?

David

unread,
Sep 13, 2012, 5:36:59 PM9/13/12
to calabash...@googlegroups.com
It is running on Mac for me and jenkins. 
Frank on Jenkins has the correct normal output. 
But calabash-android 0.2.11 is outputting weirdly on calabash-android on my local machine is normal

David

unread,
Sep 13, 2012, 6:05:47 PM9/13/12
to calabash...@googlegroups.com
Oh.. these are color codes. 
Message has been deleted

David

unread,
Sep 13, 2012, 6:34:30 PM9/13/12
to calabash...@googlegroups.com
I have updated to calabash-android 2.20 and to the latest version of jenkins. Is there a way to disable these color codes from appearing? 

Nicholas Albion

unread,
Sep 13, 2012, 8:43:37 PM9/13/12
to calabash...@googlegroups.com
Try adding "--no-color" to the calabash command line


-c, --[no-]color                 Whether or not to use ANSI color in the output. Cucumber decides
                                 based on your platform and the output destination if not specified.
Message has been deleted

David

unread,
Sep 14, 2012, 2:11:33 PM9/14/12
to calabash...@googlegroups.com
I have it running as 

calabash-android run ..apk.. --no-color --format ..slowhandcuke.. --tags @...  

And it is still showing the color codes for me. 

David

unread,
Sep 14, 2012, 2:54:20 PM9/14/12
to calabash...@googlegroups.com
I installed the ANSIColor Plugin for Jenkins and it looks colorful now and does not have the ugly ANSI color codes

David

unread,
Sep 18, 2012, 5:25:11 PM9/18/12
to calabash...@googlegroups.com
Actually, build fail on Jenkins is not being triggered even when there are failed scenarios. Am i missing anything in my life cycle hooks? What I have is 

Before do |scenario|
  # John Gallagher provided the "scenario_is_outline" fix: https://groups.google.com/forum/?fromgroups#!topic/calabash-ios/ICA4f24eSsY
  # ...there may be a better way of doing this...
  @scenario_is_outline = (scenario.class == Cucumber::Ast::OutlineTable::ExampleRow)
  if @scenario_is_outline
    scenario = scenario.scenario_outline
    # Still need to call connect_to_test_server...
  elsif scenario.failed?
    return #No need to start the server is anything before this has failed.
  end

  return if scenario.failed? #No need to start the server is anything before this has failed.
  start_test_server_in_background
end

After do
    shutdown_test_server
end

Ian H

unread,
Sep 28, 2012, 12:23:23 PM9/28/12
to calabash...@googlegroups.com
has anyone found a solution to this?

It's quite frustrating, we found a way around this by executing bundle exec cucumber on previous versions of calabash where you had to specify the target= etc. but now with calabash android run it doesn't like it, for example:

cucumber -c PACKAGE_NAME=package TEST_PACKAGE_NAME=uk.co.package_test APP_PATH=/Users/build/.jenkins/jobs//Users/hamili05/Documents/workspace/example/target/example.apk  TEST_APP_PATH=features/support/Test.apk TEST_SERVER_PORT=34777 --t ~@wip --t ~@manual
exit $?

The above WORKED and fired the failed build emails, but cant figure out a way on the latest calabash-android build (not pre)

It seems like there is some conflict between cucumber and calabash-android:
rm: /Library/Ruby/Gems/1.8/gems/calabash-android-0.1.0/test-server/instrumentation-backend/src/sh/calaba/instrumentationbackend/actions_update: No such file or directory
/Users/hamili05/Documents/workspace/app-integration-test/vendor/calabash-android-0.2.22/lib/calabash-android/calabash_steps.rb:1: warning: already initialized constant WAIT_TIMEOUT
/Users/hamili05/Documents/workspace/app-integration-test/vendor/calabash-android-0.2.22/lib/calabash-android/calabash_steps.rb:2: warning: already initialized constant STEP_PAUSE
/Users/hamili05/Documents/workspace/app-integration-test/vendor/calabash-android-0.2.22/lib/calabash-android/steps/list_steps.rb:29: syntax error, unexpected tIDENTIFIER, expecting kEND
    response['children'] each do | view |
                             ^ (SyntaxError)
/Library/Ruby/Gems/1.8/gems/cucumber-1.1.4/bin/../lib/cucumber/rb_support/rb_language.rb:129:in `load'
/Library/Ruby/Gems/1.8/gems/cucumber-1.1.4/bin/../lib/cucumber/rb_support/rb_language.rb:129:in `load_code_file'
/Library/Ruby/Gems/1.8/gems/cucumber-1.1.4/bin/../lib/cucumber/runtime/support_code.rb:171:in `load_file'
/Library/Ruby/Gems/1.8/gems/cucumber-1.1.4/bin/../lib/cucumber/runtime/support_code.rb:83:in `load_files!'
/Library/Ruby/Gems/1.8/gems/cucumber-1.1.4/bin/../lib/cucumber/runtime/support_code.rb:82:in `each'
/Library/Ruby/Gems/1.8/gems/cucumber-1.1.4/bin/../lib/cucumber/runtime/support_code.rb:82:in `load_files!'
/Library/Ruby/Gems/1.8/gems/cucumber-1.1.4/bin/../lib/cucumber/runtime.rb:174:in `load_step_definitions'
/Library/Ruby/Gems/1.8/gems/cucumber-1.1.4/bin/../lib/cucumber/runtime.rb:40:in `run!'
/Library/Ruby/Gems/1.8/gems/cucumber-1.1.4/bin/../lib/cucumber/cli/main.rb:43:in `execute!'
/Library/Ruby/Gems/1.8/gems/cucumber-1.1.4/bin/../lib/cucumber/cli/main.rb:20:in `execute'
/Library/Ruby/Gems/1.8/gems/cucumber-1.1.4/bin/cucumber:14
/usr/bin/cucumber:19:in `load'


Cheers,
Ian

Karl Krukow

unread,
Sep 28, 2012, 1:41:03 PM9/28/12
to calabash...@googlegroups.com
I think this may be related to how calabash-android handles exit codes from Cucumber.

I'll discuss this with Jonas over the weekend, and if my suspicion is right I think we can have a solution by the end of weekend.

- Karl

Jonas Maturana Larsen

unread,
Sep 28, 2012, 3:01:52 PM9/28/12
to calabash...@googlegroups.com
Way ahead of you guys!
It was fixed 4 days ago and is part of the 0.3.0 pre-release.

Here is the commit I'm talking about:


- Jonas

Reply all
Reply to author
Forward
Message has been deleted
0 new messages