Skip to content

Experimental project to ease installation of test automation tools and dependencies for Windows and Mac.

License

Notifications You must be signed in to change notification settings

yingying96/hats-ci

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

hats-ci

The hats-ci installer installs packages needed to run browsers automated functional test on Windows. Simplifies the steps to setup test environment in Windows.

It consists of a series of PowerShell scripts which downloads and installs relevant dependencies and packages. A virtual environment will be set up and configured in your local machine as well which will be ready for Robot Framework testing.

Motivation

We believe that agile quality practices accelerate the delivery of quality applications. To deal with a growing test backlog, test automation is a more scalable and cost-effective approach.

As a group of passionate quality engineers, we want to lower the barrier of entry to web app test automation so that everyone can contribute to software quality.

Supported Platforms

hats has been tested on the following platforms:

Operating Systems
Browsers
  • Microsoft Internet Explorer 11
  • Microsoft Edge 44
  • Google Chrome 54 (or newer)
  • Mozilla Firefox 54 (or newer)
  • Apple Safari 10 and later

Recommended: User Setup (Offline Installer)

Steps recommended for quickly getting started on automated testing.

  1. Download the latest release
  2. Run hats_for_Windows_xx.exe.
  3. Refer to Release Notes for detailed information.

Development Setup (Online Installer)

Steps recommended for experienced developers or those who want to contribute to hats-ci.

For Windows

  1. Clone this repository.
  2. Navigate to virtualenv directory
  3. Run 00_Install_and_Run_Robot.bat to download and install the packages - a demo Robot test will run at the end as well to verify that the installation has been successful
  4. Navigate to virtualenv/shell directory
  5. Run hats_shell.cmd and you are ready to run any pybot commands and start testing with your Robot scripts!
  6. You can also run hats_shell from Command Prompt or Powershell.
  7. For uninstallation, from Command Prompt or Powershell, run hats_shell uninstall .

For Mac

  1. Install Xcode and Xcode Developer tools with your own Apple Credentials in the App Store. (Skip this step if Xcode was already installed)
  2. Open Xcode for the first time and Click Agree. (Skip this step if Xcode was previously used)
  3. Make sure Google Chrome and Firefox have been installed prior (and at least opened once to overcome Apple's security popup)
  4. In Terminal, run:
bash <(curl -s https://raw.githubusercontent.com/younglim/hats-ci/master/assets/mac-installer.sh)
  1. To Allow safaridriver to run successfully, enable: 1) Enable Develop menu on Safari > Preferences.. > Advanced 2) Go to the newly added Develop menu, Click "Allow Remote Automation"
  2. Restart Terminal for hats_shell to be started in Terminal automatically.

** Note, Amazon Corretto 8 Java 1.8 is used.

Automated Tests

A quick way to create a test script is to use Robotcorder and edit the script from Robotcorder.

Get started with Robotcorder

  1. Open a command prompt. Run hats_shell.
  2. Run robotcorder for instructions setting up the Chrome extension.

Writing/Editing a test

You can either use

  1. Eclipse IDE with RED plugin. Type red in hats_shell to begin.
  2. Pycharm IDE with IntelliBot plugin
  3. Notepad++

Running a test

Folder Structure

hats
├── robot_automation        
│   ├── browserlogs         # Logs for web browsers (E.g. Chrome, Firefox)
│   ├── drivers             # Chrome Drivers for Windows, Mac and Linux
|   ├── hatslib.robot       # Main Robot Script
|   ├── logs                # Logs for mobile devices (E.g. Android)
|   ├── src                 # Python Source files
│   └── testscripts         # Robot Test Scripts
└── ...

Windows

  1. Open a command prompt. Run hats_shell.

  2. Navigate to robot automation folder

    cd "C:\Program Files\hats\robot_automation"
    
  3. Run the main robot script

    robot hatslib.robot
    

Mac

  1. Open a terminal.

  2. Ensure (hats) virtuelenv has loaded.

  3. Navigate to robot automation folder located within the hats folder.

  4. Run the main robot script

    robot hatslib.robot
    

Testing with Android

  1. Make sure all $ANDROID environment variables are set.
  2. To programatically boot the Android Virtual Device(AVD), the commmand emulator -avd testAVD must be run from the tools folder in the android-sdk directory.

Contributions

We welcome your involvement, be it fixing bugs or implementing new features that you find relevant to this project.

To contribute, you may follow the steps below:

  1. Fork the repo
  2. Create a new branch from development to work on your contribution
  3. Create a pull request back here!

About

Experimental project to ease installation of test automation tools and dependencies for Windows and Mac.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • PowerShell 46.8%
  • HTML 20.3%
  • Shell 14.9%
  • Batchfile 8.6%
  • RobotFramework 8.1%
  • Inno Setup 1.3%