Giter Club home page Giter Club logo

robot-tests-activity's Introduction

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        |
+-----------------------+-----------+-------------------------+

robot-tests-activity's People

Contributors

andrewtpham avatar mihirmer avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.