Skip to content

serg2708/test_login

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 

Repository files navigation

OrangeHRM Login Tests 1.0

Table of Contents

Overview

This project contains automated tests for the login functionality of the OrangeHRM demo application.
Tests verify correct and incorrect login scenarios using pytest and Selenium WebDriver.

Target application: https://opensource-demo.orangehrmlive.com/web/index.php/auth/login

Prerequisites

List the software and tools needed to run this project.
Examples:

  • Python >= 3.11.0
  • pytest >= 8.0.0
  • selenium >= 4.0.0
  • Google Chrome browser (latest)
  • ChromeDriver (matching Chrome version)

Installation

  1. Clone the repository:

    git clone https://github.com/YOUR_USERNAME/codebrainers-testy-automatyczne.git
    cd codebrainers-testy-automatyczne
  2. Setup venv

    python -m venv .venv
    source .venv/bin/activate

    On Windows:

    .venv\Scripts\activate
  3. Install requirements

    pip install pytest selenium

Project Configuration

  1. Make sure Google Chrome is installed on your system.

  2. ChromeDriver is managed automatically by Selenium 4+ — no manual download needed.

  3. Verify Python version:

    python --version
  4. Verify pytest is installed:

    pytest --version

Application Usage

  1. Run all tests:

    pytest test_login.py -v
  2. Run a single test by name:

    pytest test_login.py::test_login_valid -v
  3. Expected output example:

    collected 3 items
    
    test_login.py::test_login_valid   PASSED
    test_login.py::test_login_invalid PASSED
    test_login.py::test_login_empty   PASSED
    
    3 passed in 12.34s
    

Test Cases

ID Test name Description Expected result
TC-LOGIN-001 test_login_valid Login with correct credentials (Admin / admin123) Redirect to Dashboard
TC-LOGIN-002 test_login_invalid Login with wrong password Error message: "Invalid credentials"
TC-LOGIN-003 test_login_empty Login with empty password field Validation message displayed

Tests

  1. Running tests

    pytest test_login.py -v
  2. Test file structure

    codebrainers-testy-automatyczne/
    ├── test_login.py   # Main test file
    └── README.md       # Project documentation
    
  3. Tests status

  • Passing: TC-LOGIN-001, TC-LOGIN-002, TC-LOGIN-003

About

No description, website, or topics provided.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages