TestifyStack | Email, SMS, OTP and Webhooks Testing Stack for QA & Dev

Do you enjoy this platform? ❤️ Buy us a coffee

Test Login page for Automation Testing Practice

This Test Login page is designed for automation testing practice. Test various positive and negative login scenarios in a testing environment.

You can use this login page for practicing with Selenium or other tools like Playwright, Cypress, etc.

Register here or Log in to the secure area with these credentials:

  • Username: practice
  • Password: SuperSecretPassword!

How to test the login page?

If the credentials are correct, you should see a welcome message; otherwise, you will see an error message.

The login feature is essential for secure websites and is commonly used. Automating the testing of various login scenarios, including different edge cases, is crucial to ensure reliability and security.


How Does Form-Based Authentication Work?

Take a look at this diagram and review the different steps:

How Does Form-Based Authentication Work

  • Step 1: A client requests access to a protected resource
  • Step 2: If the client is unauthenticated, the server redirects the client to a login page
  • Step 3: The client submits the login form to the server
  • Step 4: If the login succeeds, the server redirects the client to the resource. If the login fails, the client is redirected to an error page

Login Automation Test Cases

Below are the test cases for the login page. These test cases cover both positive and negative scenarios to ensure comprehensive testing of the login functionality.

To perform these tests, please navigate to this page

Login Automation Test Cases

Test Case 1: Successful Login

  1. Launch the browser.
  2. Navigate to the login page URL.
  3. Verify that the login page is displayed successfully.
  4. Enter Username: practice.
  5. Enter Password: SuperSecretPassword!.
  6. Click the Login button.
  7. Verify that the user is redirected to the /secure page.
  8. Confirm the success message "You logged into a secure area!" is visible.
  9. Verify that a Logout button is displayed.

Test Case 2: Invalid Username

  1. Launch the browser.
  2. Navigate to the login page URL.
  3. Verify that the login page is displayed successfully.
  4. Enter an incorrect Username (e.g., wrongUser).
  5. Enter Password: SuperSecretPassword!.
  6. Click the Login button.
  7. Verify that an error message "Invalid username." is displayed.
  8. Ensure the user remains on the login page.

Test Case 3: Invalid Password

  1. Launch the browser.
  2. Navigate to the login page URL.
  3. Verify that the login page is displayed successfully.
  4. Enter Username: practice.
  5. Enter an incorrect Password (e.g., WrongPassword).
  6. Click the Login button.
  7. Verify that an error message "Invalid password." is displayed.
  8. Ensure the user remains on the login page.