配置竹在Android中使用appium黄瓜运行自动化测试 [英] Configuring bamboo to run automated test using appium cucumber in Android
问题描述
我创建一个样本Android应用程序使用Appium +黄瓜运行自动化测试案例。我的源$ C $ c在 GitHub上 。它编译并在命令提示符下,这证实了我的所有环境的设置和设施都很好。
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.
推荐答案
我已经想通了,以解决此问题。
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
有关code样品,您可以访问我的 Github上回购。
For code sample, you may visit my Github repo.
这篇关于配置竹在Android中使用appium黄瓜运行自动化测试的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!