Skip to content

yazidisme/robotframework-bdd-example

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

20 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Web Test Automation using Robot Framework


What's this?

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.

What's you need?

Homebrew

  1. Install Homebrew in Terminal using the following command
$ /usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
  1. Follow the instructions until Homebrew installing success

Chromedriver

  1. Install Chromedriver using brew in Terminal using the following command
$ brew install chromedriver --cask
  1. Follow the instructions until chromedriver installing success

Python

  1. Install Python using brew in Terminal using the following command
$ brew install python
  1. Follow the instructions until python installating success

Setup Python Path

  1. Create and open your .bash_profile or .zshrc from Terminal
$ cd
$ touch .bash_profile
$ open -e .bash_profile
  1. Set the python PATH in .bash_profile file
PATH="/usr/local/opt/python/libexec/bin:${PATH}"
export PATH;
  1. Save and exit your bash_profile

Pip

  1. Install Pip using easy_install command
$ sudo easy_install pip
$ sudo pip install --upgrade pip
  1. Follow the instructions until pip installing success

Robot Framework

  1. Install Robot Framework using pip in Terminal using the following command
$ pip install robotframework
  1. Follow the instructions until robot framework installing success

Selenium Library

  1. Install Selenium Library in Robot Framework using pip in Terminal using the following command
$ pip install robotframework-seleniumlibrary
  1. Follow the instructions until selenium library in robot framework installing success

Go... run, run, run, burn, fire!

  1. From your Terminal, go to the project directory
  2. Run the test cases using the following command
$ robot -d result/ tests/
  1. Wait until tests executing has finished
  2. See the output of tests result in the result folder then open log.html or report.html using your browser
  3. See the log of tests result
  4. See the report of tests result

What's next?

See general guidelines for good or standarization test cases from robot framework

Releases

No releases published

Packages

No packages published