搭建cucumber测试环境

一、到ruby官网下载ruby,并安装 git

二、下载DevKit,并解压ruby安装目录的任意目录下,eg.kit目录下分别运行 github

ruby dk.rb init
ruby dk.rb install


三、安装所须要的gem包 web

1)安装以前会遇到的问题 shell

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)

解决办法,参考网站 api

This assumes your have already installed the Rails Installer for Windows. ruby

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: session

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: fetch

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
相关文章
相关标签/搜索