Skip to content

Activitiy UAT Automated Test Cases based on Robot Framework and the Seleinum Library

Notifications You must be signed in to change notification settings

hikaya-io/robot-tests-activity

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

18 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Setup

If you already have Python with pip installed, you can simply run below command to Install virtualenv

$ pip install virtualenv

Create virtualenv

$ virtualenv --no-site-packages venv
  • use no site packages to prevent virtualenv from seeing your global packages
  • . venv/bin/activate allows us to just use pip from command line by adding to the path rather than full path

Activate virtualenv

$ source venv/bin/activate

Install requirements

$ pip install -r requirements.txt

Browser drivers

In order to run the test, you will need a driver to interface with your browser of choice. Here's a list of drivers that Selenium supports. Download your selected driver and save to a location.

Locate your driver

For Mac:

You'll need to locate where you saved your driver. One option to do this is you can open up terminal and run:

$ sudo nano /etc/paths

Navigate to the bottom of the file and enter the path to your driver:

Example: /Users/name/Documents/WebDriver

Quit and save and to check if the path was added correctly, enter:

$ echo $PATH

Test execution

  1. cd into the root directory of the ATCs; Activity-ATC.
  2. Execution step: robot -T -d Results Tests
  3. When it's done, you'll see the report (timestamped) in the Results directory; double-click the report-YYYYMMDD-HHMMSS.html (where YYYYMMDD is the year, month, date and HHMMSS is the hour, minute, and seconds - e.g., report-20191214-124528.html).

How to execute tests

Here are the execution options we use:

  • -T - Short for --timestampoutputs. Creates reports, logs, etc. with the current timestamp so we don't overwrite existing ones upon execution.
  • -d - Short for --outputdir. Tells the framework where to create the report files.

Note to maintainers and developers: read the code documenation sections and also document new/updated code

Locator variables naming convention

For readerbilty and smooth collaboration the following naming convention should be follwed when defining locators variables:

    `[UI/CONTROLER TYPE ABBR]_[UI ELEMENT FUNCTINALITY]`

Control Types abbreviations and their corresponding CamelCased control names
+-----------------------+-----------+-------------------------+
|   UI/CONTROLER TYPE   |   ABBR    |       Example           |
+-----------------------+-----------+-------------------------+
|   Button              |   btn     |   btn_login             |
|   CheckBox            |   cb      |                         |
|   CheckBoxList        |   cbl     |                         |
|   DropDownList        |   dd      |   dd_template_tags      |
|   Hyperlink           |   hl      |   hl_edit_profile       |
|   Image               |   img     |   img_login_logo        |
|   ImageButton         |   ib      |                         |
|   Label               |   lbl     |   lbl_login_title       |
|   LinkButton          |   lbtn    |                         |
|   ListBox             |   lb      |                         |
|   ListBoxItem         |   lbi     |                         |
|   Modal               |   mdl     |   mdl_invite            |
|   Panel               |   pnl     |   pnl_sidebar           |
|   RadioButton         |   rb      |                         |
|   RadioButtonList     |   rbl     |                         |
|   Text                |   txt     |   txt_login_title       |
|   Textbox             |   tb      |   tb_login_email        |
+-----------------------+-----------+-------------------------+

About

Activitiy UAT Automated Test Cases based on Robot Framework and the Seleinum Library

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published