A-Stack Functional and Automation Test Environment

A. Robot Framework installation instruction:


  1. Install Python and Pip
    1. Navigate to org and click Downloads
    2. Decide which Python version to use and download it
      1. Version 2.7.x: guaranteed to work with all RF libraries
      2. Version 3.6.x: some RF libraries might not work yet
  • Python 2 support will stop in 2020… so Python 3 is recommended
  1. Run the Python installation as administrator
    1. Select the PATH & Pip options
    2. Verify python directories exist
  • Verify python directories are in PATH
  1. Open command line and type python -V
  2. Also type pip -V
  3. Type pip list and follow pip upgrade directions
  1. Install Robot Framework & Selenium Library
    1. Open cmd
    2. Type pip install robotframework
    3. Hit enter
    4. Type pip install robotframework-seleniumlibrary
    5. Hit enter
  2. Install Desire browsers
    1. Which browsers & version to test?
      1. Google “browser usasage statistics”
      2. Examine company’s internal statistics
    2. Windows: Chrome, IE, Firefox
    3. Safary should be in proper context (Mac)
    4. Install from each respective browser site
    5. Check out browser/ OS cloud:
      1. SauceLabs.com (see Platforms)
      2. BrowserStack.com
    6. Install Selenium WebDrivers
      1. Robot Framework S2L sits on top of Selenium
      2. Selenium is a library package as .exe binary
      3. Each installed browser need its own Webdriver
      4. Edge, IE, Chrome, and Firefox installation process
        1. Create c:\bin
        2. Add c:\bin to PATH
  1. Then find “IE Driver” & “Third party drivers” sections
  2. Download & extract each driver into c:\bin
  3. Note: Get the 32bit Webdriver for IE
  1. Install Pycharm IDE & Plugin
    1. Go to jetbrains.com
    2. Click Tools > Pycharm
    3. Download & install community edition (free)
    4. Install Pycharm
    5. Launch Pycharm
    6. Open File > Settings dialog
    7. Click on Plugins
    8. Search for & install Intellibot (patched for SeleniumLibrary)
    9. Restart Pycharm
  2. Create Base Scripts Directory and Project
    1. Create Base Directory (Eg: c:\development\robot-scripts}
    2. Each Robot Framework project will have its own directory
      1. C:\development\robot-scripts\project1
      2. C:\development\robot-scripts\project2
    3. Open Pycharm and create new Project in base directory
  3. Organize Your Project Files
    1. /ProjectBase
      1. /Tests
        1. Product1
          1. robot
          2. robot
        2. /Resources
          1. robot (Suite Setup, Open Browser, etc)
          2. /product-1
            1. robot
            2. robot
            3. Page-objects
              1. Po1.robot
              2. Po2.robot
  • /Libraries
  1. /Results
    1. Product-1


B. Implementation test case: 

In case example, we will test HelloTQL application:

  1. Create folder and file with structure: 
  2. Open HelloTQL.robot, and write test cases. Reffer all instruction document at https://robotframework.org/#documentation . Or we can reffer a simple successfull test case in https://bitbucket.org/MQTeam/assetintelligence/src/web/WEB/test_api/
  3. In Tests folder, open terminal and run: robot HelloTQL.robot
  4. After testing finished, open report.html in web browser to review the result.