0

I am creating a sample android application to run automated test case using Appium + Cucumber. My source code is in GitHub. It compiles and runs in command prompt, which confirms me that the all environmental settings and installations are fine.

I am running below command to execute test case

cucumber features/login.feature
or 
cucumber

It failed, while I am trying to configure the same thing on bamboo. But below is the error from bamboo

10-Jul-2014 10:03:58    Starting task 'run cucu' of type 'com.atlassian.bamboo.plugins.scripttask:task.builder.script'
10-Jul-2014 10:03:58    
Beginning to execute external process for build 'AutomatedUI - Appium_Android - Build and Instal #92 (AUT-AP-JOB1-92)'
 ... running command line: 
/bin/sh /Applications/Bamboo/temp/AUT-AP-JOB1-92-ScriptBuildTask-8977016011738507175.sh
 ... in: /Users/Admin/bamboo-home/xml-data/build-dir/AUT-AP-JOB1
10-Jul-2014 10:04:01    /Users/Admin/bamboo-home/xml-data/build-dir/AUT-AP-JOB1/features/support/env.rb:18: syntax error, unexpected ':', expecting $end
10-Jul-2014 10:04:01    ...= Appium.load_appium_txt file: File.expand_path('./', __FILE...
10-Jul-2014 10:04:01                                  ^ (SyntaxError)
10-Jul-2014 10:04:01    /Library/Ruby/Gems/1.8/gems/cucumber-1.3.15/bin/../lib/cucumber/rb_support/rb_language.rb:95:in `load'
10-Jul-2014 10:04:01    /Library/Ruby/Gems/1.8/gems/cucumber-1.3.15/bin/../lib/cucumber/rb_support/rb_language.rb:95:in `load_code_file'
10-Jul-2014 10:04:01    /Library/Ruby/Gems/1.8/gems/cucumber-1.3.15/bin/../lib/cucumber/runtime/support_code.rb:180:in `load_file'
10-Jul-2014 10:04:01    /Library/Ruby/Gems/1.8/gems/cucumber-1.3.15/bin/../lib/cucumber/runtime/support_code.rb:83:in `load_files!'
10-Jul-2014 10:04:01    /Library/Ruby/Gems/1.8/gems/cucumber-1.3.15/bin/../lib/cucumber/runtime/support_code.rb:82:in `each'
10-Jul-2014 10:04:01    /Library/Ruby/Gems/1.8/gems/cucumber-1.3.15/bin/../lib/cucumber/runtime/support_code.rb:82:in `load_files!'
10-Jul-2014 10:04:01    /Library/Ruby/Gems/1.8/gems/cucumber-1.3.15/bin/../lib/cucumber/runtime.rb:184:in `load_step_definitions'
10-Jul-2014 10:04:01    /Library/Ruby/Gems/1.8/gems/cucumber-1.3.15/bin/../lib/cucumber/runtime.rb:42:in `run!'
10-Jul-2014 10:04:01    /Library/Ruby/Gems/1.8/gems/cucumber-1.3.15/bin/../lib/cucumber/cli/main.rb:47:in `execute!'
10-Jul-2014 10:04:01    /Library/Ruby/Gems/1.8/gems/cucumber-1.3.15/bin/cucumber:13
10-Jul-2014 10:04:01    /usr/bin/cucumber:19:in `load'
10-Jul-2014 10:04:01    /usr/bin/cucumber:19
10-Jul-2014 10:04:01    Failing task since return code of [/bin/sh /Applications/Bamboo/temp/AUT-AP-JOB1-92-ScriptBuildTask-8977016011738507175.sh] was 1 while expected 0
10-Jul-2014 10:04:01    Finished task 'run cucu'
10-Jul-2014 10:04:01    Running post build plugin 'Clover Results Collector'
10-Jul-2014 10:04:01    Running post build plugin 'Artifact Copier'
10-Jul-2014 10:04:01    Running post build plugin 'NCover Results Collector'
10-Jul-2014 10:04:01    Finalising the build...

Need your inputs to fix.

Nilanchala
  • 5,891
  • 8
  • 42
  • 72

1 Answers1

0

I have figured it out to fix this issue.

The "cucumber" command is not working directly. I have created a "rake" file and executed the rake file. For executing the rake, directly from bamboo, you need to download the ruby add on.

Download Link

Adon Documentation

For code sample, you may visit my Github repo.

Nilanchala
  • 5,891
  • 8
  • 42
  • 72