Skip to content

๐Ÿ“” Page object design pattern implementation (python + pom + selenium + pytest + travisCI)

License

Notifications You must be signed in to change notification settings

ua1wcz/python-page-object

ย 
ย 

Repository files navigation

Screenshot

made-with-python Build Status Coverage Status Code style: black Checked with flake8 Checked with mypy License: GPL v3 CodeFactor Docs EO principles respected here

Python page object model (PyPOM)

Represent most popular OOD pattern for Web UI automation using python programming language (for learning reference only).

Automated tests are demonstrated on http://demo.guru99.com/test/newtours web application.

Tools

Production

Development

  • mypy static type checker tool
  • black code formatter tool
  • flake8 code style tool

In addition a source code is fully type annotated โญ

Usage

Usage

Quick start

From the root directory of your shell run following command:

./run-tests.sh help

Tool allows to simplify run of automated tests for POM sample project.

Available actions:
 - smoke                 run automated smoke tests
 - unittest              run automated unittest tests
 - all                   run all automated tests
 - help                  display help

Note:            help will be provided in case of no input parameters

Tests (html) report sample

Run a bunch of tests (e.g smoke) via following command:

./run-tests.sh smoke

Then please open test-report.html file to see detailed testing report e.g:

Screenshot

Generate allure report

Please follow next instruction to generate allure report (mac OS example):

  1. Update java via brew cask install adoptopenjdk
  2. Install allure via brew install allure
  3. Generate allure project via allure serve report

Screenshot

Development notes

Release History

Please check changelog file to get more details about actual versions and it's release notes.

Meta

Author โ€“ Volodymyr Yahello.

Distributed under the GPL v3 license. See license for more information.

You can reach out me at:

Contributing

I would highly appreciate any contribution and support. If you are interested to add your ideas into project please follow next simple steps:

  1. Clone the repository
  2. Configure git for the first time after cloning with your name and email
  3. pip install -r requirements.txt to install all project dependencies
  4. pip install -r requirements-dev.txt to install all development project dependencies
  5. Create your feature branch (git checkout -b feature/fooBar)
  6. Commit your changes (git commit -am 'Add some fooBar')
  7. Push to the branch (git push origin feature/fooBar)
  8. Create a new Pull Request

About

๐Ÿ“” Page object design pattern implementation (python + pom + selenium + pytest + travisCI)

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • Python 86.0%
  • Shell 14.0%