qa_project

๐Ÿงช 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:


๐Ÿงฐ Features


โš™๏ธ Prerequisites

Before running the project, ensure the following are installed:

๐Ÿ”ง Software

๐Ÿงฉ Python Libraries

Install the required packages by running:

```bash 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