1
2 3
install one-click installer Check environment steps:
Open command line and type 'java -version' to confirm JAVA_HOME path is correct.
Open command line and type 'jruby -v' to confirm jruby is installed successfully.
Open command line and type 'staf' to confirm staf is a recognise command.
Open command line and type 'wget' to make sure wget is available.
More details:
说明: 此安装包包括了jruby, STAF, wget。Workbot会安装到jruby里面。 注意: (1)需要更新one-click中的 workbot,更新方法见 Update workbot. (2)如果浏览器在本地打开,就不需要Selenium-RC。本地指与脚本执行的机器。 Update workbot (1) 执行 jgem uninstall workbot卸载onc click install 所安装的旧的workbot。期间输入Y 回车确认删除。 (2) 下载最新的workbot-3.3.0.dev.gem,然后到所下载的目录执行jgem install --local workbot-3.3.0.dev.gem升级。 最新workbot获取目录:
(3) 安装workbot时,会提示升级cucumber,直接运行jgem install cucumber即可从网上下 载并安装。注意下载回来名为gherkin-2.10.0-java.gem,java代表jgem程序。更新 cucumber时,同时更新了gherkin和cucumber。 备注:
通过 jgem –h可以看到用法。
Install TortoiseSVN
TortoiseSVN 获取位置:
可以check in and out Foglight
Svn地址:用户名:lewi.yue, tina.guan, wendy.qiu, handy.zhang
密码:默认密码都是123456
4 Install RubyMine
RubyMine:通过RubyMine打开svn上的project,进行编辑和修改。
Using RubyMine to run
可以使用rubymine运行script.
5
如上可以运行一个feature, 升级后的cucumber需要解决 附录1的
问题。 通过IDE运行时,不会操作features.yml文件。 参考目录: Runner options的配置:
--color
-r features -r core_infrastructure -r step_definitions -r config/example/env_setup.rb -r 'C:\Program Files\Quest Software\Automation Environment\jruby-1.6.5\lib\ruby\gems\1.8\gems\workbot-3.3.0.dev\lib\workbot.rb' Workbot根据自己的安装目录决定路径。 运行过程中,直接在svn下运行,目前操作目录 C:\svn\trunk (nightcrawler) 直接down下来运行,会出现附件2的错误。 Gherkin和Cucumber下载位置: and search 注:下载时,需要下载Jgem程序,而不是gem
程序。可以通过jgem install cucumber 命 令直接进行下载安装。 直接输入workbot –v会提示错误,属于workbot的bug。进去workbot目录后,运行正常。
其它命令:
Jgem list
学习方向: (1)innovate.prod.quest.corp/display/CAT/How+to+Write+Feature+with+Existed+Steps (2)innovate.prod.quest.corp/display/CAT/User+Guides 看最下面 的link
记得看下日期 有些是比较老的
那个automation的user guid 有教如何写feature
其实是包括feature和后台代码 后台代码是automation组管理
我们只需要写feature 而feature 其实也就是简单的英文描述
附件1: If you are going to upgrade the Cucumber from 1.0.1 to upper than 1.2.0, here you need a patch for Redmine. Open “C:\Program Files (x86)\JetBrains\RubyMine 3.2.4\rb\testing\patch\bdd\teamcity\cucumber\formatter_03103.rb”, and add a parameter as follow in line 108: # result of step invocation - calls v_exception, v_step_name def before_step_result(keyword, step_match, multiline_arg, status, exception, source_indent, background, file_colon_line) tc_before_step_result(exception, key
word, multiline_arg, source_indent, status, step_match, background) end
附件2: 错误信息:
"C:\Program Files\Quest Software\Automation Environment\jruby-1.6.5\bin\jruby.exe" -e
$stdout.s