Giter Club home page Giter Club logo

ui_python's Introduction

UI selenium test framework in Python.

End to end test of a purchase of a commercial product on a test website (http://automationpractice.com/index.php).

Instructions to run

  1. Prerequisites

    install pipenv, docker, docker-compose
    Requires Python >= 3.6.

  2. Docker images

    Pull down the hub and node images from docker-hub by running docker-compose,
    (Make sure docker (docker daemon) is running first):
    run docker-compose up
    This will activate nodes (isolated browser VMs) and register them with the hub.

  3. Run tests

    Go into virtualenv pipenv shell Make sure docker-compose is running.
    Run tests with python -m pytest -s -v
    This will run firefox tests in docker container.
    To run specific browser run:
    python -m pytest -s -v --browser firefox-remote for firefox in docker
    python -m pytest -s -v --browser chrome-remote for chrome in docker
    python -m pytest -s -v --browser firefox-local for local firefox
    python -m pytest -s -v --browser chrome-local for local chrome

    If --browser option is not specified test will default to firefox in docker.

    Tests in docker will run headlessly. For logs see docker-compose console.

Things to improve:

  • to set all browsers in docker to run with one command
  • to remove redundant @property getter methods (and call locators directly from each page object)
  • hide password in test credentials (env var?)
  • logs for chrome test don't show in docker-compose logs because of an error
  • currently remote hub and nodes are located on localhost (demo purposes). To move them to an IP away from local machine.
  • set exception conditions so test run stops when exceptions are raised
  • set functionality to easily toggle between running tests in docker (remotely) and locally

ui_python's People

Contributors

mat001 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.