Learning Software Automation Testing Ruby from scratch using cucumber
- Install Homebrew
/usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
- Install RVM
curl -L get.rvm.io | bash -s stable
source ~/.bash_profile
Then run rvm requirements
and follow the instructions
- Install Ruby 2.5.1
rvm install 2.5.1
- Install Dependencies
- Configure display socket lock file (unfortunately this had to be run every time you restart your laptop, alternatives are listed below)
mkdir /tmp/.X11-unix
sudo chmod 1777 /tmp/.X11-unix
sudo chown root /tmp/.X11-unix/
- Install libav/avconv
brew install libav
- Install CMake
brew install cmake pkg-config && sudo ln -s /usr/local/bin/make /usr/local/bin/gmake
- Install mysql
brew install mysql
- Install Git
brew install git
- Configure Git
git config --global user.name "Your Name Here"
git config --global user.email "your-github-email@example.com"
- Generate Public Key
ssh-keygen # then, just press enter
- Add key to Github
cat ~/.ssh/id_rsa.pub # copy the content to github
- Clone the project
git clone git@github.com:github/{your project name}.git
cd {path}
- Copy .env file
cp env.sample .env
- Install bundler
gem install bundler
- Run bundle install
bundle install # or `bundle` for simpler command
- Installing Firefox ESR
- Download firefox esr here
run and add it into application
- Go back to the folder and run cucumber to make sure everything is installed
cucumber --tag @initiate
- JSON 1.8.5 error when running
bundle
, update your XCode or runxcode-select --install
For your convenient please put the file based on the folder structure.
├── features
│ ├── scenarios
│ │ └── Basic101
│ ├── step_definitions
│ │ └── 101basicconsepts
│ ├── support
| | └── env