Skip to content

Basic structure of an E2E UI Automation project with Pytest and some test examples

Notifications You must be signed in to change notification settings

areal060781/ui-taf-pytest

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

9 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Basic Testing Framework

Aa simple automation framework. Goals covered:

  1. Design of Features & Scenarios.
  2. Test Execution Report Structure.
  3. Automation Layers Organization.
  4. Handling of Test Data.
  5. Quality of In-Code Documentation.
  6. Code Reusability and Maintainability.

Requirements

  • Python 3.8
  • Pipenv
  • Allure command line
  • Selenium webdriver, Chrome, Firefox

Installation

pipenv install --dev

Run testcase

On the project path

python -m pytest tests/test_guest.py --alluredir=./results
allure serve ./results
python test/test_name.py
python -m unittest tests/test_name.py
pyhton -m unittest test/test_name.py


pytest file.py::Class::test_case

pytest tests/test_name.py -s -v

python -m unittest discover
python -m unittest discover -s tests
python -m unittest discover -s tests -t src

Structure

project/
│
├── my_app/
│   └── __init__.py
│
└── tests/
    |
    ├── unit/
    |   ├── __init__.py
    |   └── test_sum.py
    |
    └── integration/
        |
        ├── fixtures/
        |   ├── test_basic.json
        |   └── test_complex.json
        |
        ├── __init__.py
        └── test_integration.py

Or python -m unittest discover -s tests/integration

Further information

About

Basic structure of an E2E UI Automation project with Pytest and some test examples

Topics

Resources

Stars

Watchers

Forks

Languages