Functional Test Cases for login.
php
Test Case ID Test Scenario Test Steps Expected Result
TC_01 Valid Login Enter correct username & password, clickRedirects
'Login' to home.php
TC_02 Invalid Login Enter wrong username or password, click Shows
'Login' error message
TC_03 Empty Fields Leave both fields empty, click 'Login' Shows validation error
TC_04 Only Username Enter username, leave password empty, click
Shows'Login'
password required
TC_05 Only Password Leave username empty, enter password, click
Shows 'Login'
username required
TC_06 Case Sensitivity Enter 'Admin' instead of 'admin', click 'Login'
Fails if case-sensitive
TC_07 SQL Injection Enter SQL injection string in username field
Should not bypass login
TC_08 Session Creation Enter valid credentials, click 'Login' Session should be set
TC_09 Admin Login Redirect Click 'Login as Admin' button Redirects to admin_login.php
TC_10 Restricted Page Access Try opening home.php without login Redirects to login.php
TC_11 Logout Log in, then log out Destroys session, redirects to login