首页 > 代码库 > 搭建cucumber测试环境
搭建cucumber测试环境
1、到ruby官网下载ruby,并安装
2、下载DevKit,并解压ruby安装目录的任意目录下,eg.kit目录下分别运行
ruby dk.rb init ruby dk.rb install
3、安装所需要的gem包
1)安装之前会遇到的问题
ERROR: While executing gem ... (Gem::RemoteFetcher::FetchError) SSL_connect returned=1 errno=0 state=SSLv3 read server certificate B: certificate verify failed (https://api.rubygem s.org/specs.4.8.gz)
解决办法,参考网站
This assumes your have already installed the Rails Installer for Windows.
Download the ruby script to your Desktop folder fromhttps://gist.github.com/raw/867550/win_fetch_cacerts.rb. Then in your command prompt, execute the ruby script:
ruby "%USERPROFILE%\Desktop\win_fetch_cacerts.rb"
Now make ruby aware of your certificate authority bundle by setting SSL_CERT_FILE. To set this in your current command prompt session, type:
set SSL_CERT_FILE=C:\RailsInstaller\cacert.pem
gem update --system gem install rspec --no-ri --no-rdoc gem install win32console --no-ri --no-rdoc gem install watir-webdriver --no-ri --no-rdoc gem install cucumber --no-ri --no-rdoc
4
.这样就安装成功了,可以用下面命令查看Cucumber的版本
cucumber --version
搭建cucumber测试环境
声明:以上内容来自用户投稿及互联网公开渠道收集整理发布,本网站不拥有所有权,未作人工编辑处理,也不承担相关法律责任,若内容有误或涉及侵权可进行投诉: 投诉/举报 工作人员会在5个工作日内联系你,一经查实,本站将立刻删除涉嫌侵权内容。