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:
Before running the project, ensure the following are installed:
webdriver_manager)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