Testing Authenticated Pages

Some WordPress pages require authentication (login) before they can be accessed. If your test flow needs to interact with pages behind a login wall, CheckView provides several approaches to handle this.

Using a Login Step in Custom Test Flows

The most common approach is to add login steps at the beginning of a Custom test flow:

  1. Create a Custom test flow for the page you want to test.
  2. Add a Go To step pointing to your login page (e.g., /wp-login.php or a custom login URL).
  3. Add Assign steps to fill in the username and password fields.
  4. Add a Click step to submit the login form.
  5. Add a Go To step to navigate to the authenticated page you want to test.
  6. Add your assertion or interaction steps for the protected content.

Using Custom Cookies

If your site uses cookie-based authentication or session tokens, you can configure custom cookies in the test flow advanced settings. This allows CheckView to include specific cookies with every request, bypassing the login flow entirely.

Using Variables for Credentials

To avoid hardcoding credentials in your test steps, use CheckView variables. Set up organization-level variables for your login credentials, then reference them in your assign steps using the variable syntax.

Common Errors

If your test encounters authentication issues, you may see errors like:

  • “Login required” or “Authentication required”: The page redirected to a login page instead of loading the expected content.
  • “Not logged in”: The session expired or cookies were not properly set.

If you encounter these errors, verify that your login steps are correct, your credentials are valid, and the session persists across page navigations.

Storing Login Credentials Securely

If your authenticated page tests use login credentials, consider using CheckView’s Secure Credentials feature to encrypt and store them per test flow — rather than hardcoding them in assign steps.