Skip to content

Testing instructions for critical flows

Sumit Bagthariya edited this page Sep 19, 2024 · 19 revisions

Can activate the plugin without any error

Test steps:

  1. Download the plugin
  2. Go to Plugins > Installed Plugins
  3. Click on the activate link under the Safe Redirect Manager
  4. Check that the relevant plugin information appears, i.e. Descriptions ,Version and Support links.

Expected Result:

The plugin should activate without any error


Navigate to safe redirect manager

Verify the user can access the Redirect Manager from the tools.

Test steps:

  1. Login with admin
  2. Go to Tools
  3. Click on Safe Redirect Manager

Expected Result:

Users can access the Redirect Manager module from Tools.

Screenshot

image


Create a Redirect rule

Test Steps

  1. Login with admin
  2. Go to Tools
  3. Click on Safe Redirect Manager
  4. Click on the Create Redirect Rule Button.
  5. Enter a valid URL in the Redirect From and Redirect To fields.
  6. Select HTTP Status Code.
  7. Enter message
  8. Redirect Protocol
  9. Enter Notes
  10. Click on Publish.

Expected Result:

The rule should be created successfully with the "Redirect rule published" message.

Screenshot

image image


Validate the redirection rule with different HTTP Status Code

Test Steps

Select the different HTTP Status Code and check the behavior of the redirection.

  1. Login with admin
  2. Go to Tools
  3. Click on Safe Redirect Manager
  4. Click on the Create/Edit Redirect Rule Button.
  5. Enter a valid URL in the Redirect From and Redirect To fields.
  6. Select HTTP Status Code
  7. Click on Update

Expected Result:

The HTTP Status Code configured by the admin, users should be redirected to the correct page.


Default max number of redirections

Verify that by default the plugin only allows at most 1000 redirects.

Test Steps

  1. Login with admin
  2. Go to Tools
  3. Click on Safe Redirect Manager
  4. Click on create Redirect Rule Button.
  5. Enter a valid URL in the Redirect From and Redirect To fields.
  6. Select HTTP Status Code.
  7. Click on publish.
  8. Repeat the same steps and Imports redirects from a CSV file. Example here

Expected Result:

Repeat the same steps for creating more than 1000 redirect url or Import redirect rules CSV file using WP-CLI command. You can find information on CLI commands here

image


Edit redirection rules

Verify the edit redirection rules and update the fields

Test Steps

  1. Login with admin
  2. Go to Tools
  3. Click on the redirect rule
  4. Update the fields and click on Update

Expected Result:

Data should be updated with "Redirect rule updated." success message.

Screenshot

image


Delete redirection rules

Test Steps

  1. Login with admin
  2. Go to Tools
  3. Hover over the redirect rule
  4. Click on Trash

Expected Result:

Redirect rule should be deleted with "Redirect rule deleted." success message.

image