This is automated web testing for any web application. Its using page object model as a pattern structure and BDD (Behavior Driven Development) framework as a testing approach with single gherkin language and data-driven style. Its using 4 folders and 1 file in the root directory.
- pages folder
- This folder contain some files that initiate all of page elements, also their action as objects.
- steps folder
- This folder contain some files that initiate any reusable steps.
- Its steps should have direct relations to specific test files.
- tests folder
- This folder contain some files that test cases executed.
- Its can also contain some reusable steps for specific test cases that use data-driven or gherkin language on the same test files.
- resources.robot file
- This is file for global setup or any reusable logic or steps that used all of steps or tests file.
- result folder
- This folder for saving result file of report that generate after tests execute has finished.
- Install Homebrew in Terminal using the following command
$ /usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
- Follow the instructions until Homebrew installing success
- Install Chromedriver using brew in Terminal using the following command
$ brew install chromedriver --cask
- Follow the instructions until chromedriver installing success
- Install Python using brew in Terminal using the following command
$ brew install python
- Follow the instructions until python installating success
- Create and open your .bash_profile or .zshrc from Terminal
$ cd
$ touch .bash_profile
$ open -e .bash_profile
- Set the python PATH in .bash_profile file
PATH="/usr/local/opt/python/libexec/bin:${PATH}"
export PATH;
- Save and exit your bash_profile
- Install Pip using
easy_install
command
$ sudo easy_install pip
$ sudo pip install --upgrade pip
- Follow the instructions until pip installing success
- Install Robot Framework using pip in Terminal using the following command
$ pip install robotframework
- Follow the instructions until robot framework installing success
- Install Selenium Library in Robot Framework using pip in Terminal using the following command
$ pip install robotframework-seleniumlibrary
- Follow the instructions until selenium library in robot framework installing success
- From your Terminal, go to the project directory
- Run the test cases using the following command
$ robot -d result/ tests/
- Wait until tests executing has finished
- See the output of tests result in the result folder then open
log.html
orreport.html
using your browser - See the log of tests result
- See the report of tests result
See general guidelines for good or standarization test cases from robot framework