Skip to content

Lumunix/Pytest-BDD-UI-Automation

Repository files navigation

Pytest-BDD-UI-Automation

This project provides an example for testing a UI with Selenium WebDriver, written in Python, using the Page Object Model design pattern and driven via BDD feature files through Pytest BDD.

Getting Started

  1. Install Poetry python dependency manager
  2. Install Docker
  3. Clone this repository
  4. Open the terminal in pycharm, install the dependencies for the project using the following command
    poetry install
    

Setting up Selenium Grid

# Arm Machines (M1 Apple Compatible)
docker compose -f docker-compose-arm.yml up seleniarm-hub node-chrome

# x86 Machines
docker compose -f docker-compose.yml up selenium-hub node-chrome
# Accessing Selenium Grid UI
http://127.0.0.1:4444/ui

Setting up Allure Docker Service/ UI

# Arm Machines (M1 Apple Compatible)
docker compose -f docker-compose-arm.yml up allure allure-ui

# x86 Machines
docker compose -f docker-compose.yml up allure allure-ui
# Accessing Allure UI
http://localhost:5252/allure-docker-service-ui/

Running Tests

# All Tests
pytest
# Run Specific Test Stepfile
pytest pytest_bdd_ui_automation/steps/test_home_page_steps.py

About

Pytest BDD Project template for BDD UI Testing using Selenium

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published