Skip to content

This project is a Quality Assurance (QA) Automation Framework developed using Selenium with Pytest. It automates the testing of a login page to verify valid and invalid login scenarios. The framework captures screenshots, generates HTML reports, and logs defects automatically when tests fail.

Notifications You must be signed in to change notification settings

ram-05-07/qa_project

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

6 Commits
Β 
Β 
Β 
Β 

Repository files navigation

πŸ§ͺ Automated Login Testing with Selenium

πŸ“Œ Project Overview

This project automates login functionality testing using Selenium with Python and Pytest.
It verifies both valid and invalid login scenarios on a sample web application and automatically:

  • βœ… Generates an HTML test report
  • ⚠️ Logs defects into a CSV file
  • πŸ“Έ Captures screenshots of failed test cases

🧰 Features

  • Automated functional testing of login page
  • Validation of both correct and incorrect credentials
  • Screenshot capture for failed tests
  • Defect logging (timestamp, expected vs actual result)
  • HTML report generation with test results summary

βš™οΈ Prerequisites

Before running the project, ensure the following are installed:

πŸ”§ Software

  • Python 3.8+
  • Google Chrome Browser
  • ChromeDriver (auto-managed via webdriver_manager)

🧩 Python Libraries

Install the required packages by running:

pip install -r requirements.txt


qa_project
β”œβ”€β”€ selenium_tests/
β”‚   β”œβ”€β”€ test_login_valid.py          # Valid login test
β”‚   β”œβ”€β”€ test_login_invalid.py        # Invalid login test
β”‚   β”œβ”€β”€ conftest.py                  # Pytest configuration and setup
β”‚   β”œβ”€β”€ defect_logger.py             # Logs failed test details
β”‚   β”œβ”€β”€ screenshots/                 # Stores screenshots of failed tests
β”‚   β”œβ”€β”€ report.html                  # Generated HTML report
β”‚   β”œβ”€β”€ defects_log.csv              # Logged defect details
β”‚
└── README.md                        # Project documentation


Step 1: Create & Activate Virtual Environment
cd selenium_tests
python -m venv venv


Activate the environment:
Windows: venv\Scripts\activate
macOS/Linux: source venv/bin/activate

Step 2: Install Dependencies
pip install selenium pytest pytest-html webdriver-manager

Execute Tests
Run all tests and generate the HTML report:
pytest conftest.py --html=report.html --self-contained-html

This command:
Runs all test cases
Generates a detailed HTML report
Saves it as report.html in the project directory
Captures screenshots automatically when any test fails

Step 4: View Results
After execution:
πŸ“„ Report: Open report.html in any browser
⚠️ Defects: Check defects_log.csv
πŸ“Έ Screenshots: Found in /screenshots folder

πŸ§‘β€πŸ’» Author
M.RAM KUMAR
B.Tech. Computer Science Engineering
Vel Tech, Chennai

πŸ“˜ Project: Automated Web Login Testing using Selenium and Pytest

About

This project is a Quality Assurance (QA) Automation Framework developed using Selenium with Pytest. It automates the testing of a login page to verify valid and invalid login scenarios. The framework captures screenshots, generates HTML reports, and logs defects automatically when tests fail.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published