1. How would you test a login page?
A strong answer covers:
- Positive cases with valid credentials
- Negative cases: wrong password, unknown user, empty fields
- Boundary and input validation, including special characters
- Security checks: lockout, password masking, no user enumeration, HTTPS
- Usability and accessibility: keyboard, labels, error messages
- Session behaviour: remember me, logout, forgot password
Show model answer
I would first check requirements: login with email or phone, password rules, lockout policy, and whether there is OTP or social login. Positive tests: valid credentials log in and land on the right page. Negative tests: wrong password, unregistered email, empty fields, spaces around the email, very long input, and special characters, including SQL injection and script strings to see they are handled safely. Security checks: the password is masked, the site uses HTTPS, the error message does not reveal whether the email exists, and the account locks or slows down after repeated failures. Session tests: remember me, logout clears the session, the back button after logout does not show private pages, and forgot password works end to end. I also test on mobile and different browsers, with keyboard only, and with a screen reader to check labels and error announcements.