uiowaSEP2024 / 001_DisAv

Distraction Avoider
Apache License 2.0
0 stars 0 forks source link

Test: server whitelist website #202

Closed saanbe16 closed 1 month ago

saanbe16 commented 1 month ago

Test Plan: Testing Whitelist API Endpoints

Test Scenarios

  1. Adding a Whitelisted Website

    • Description: Verify that the API endpoint successfully adds a website to the whitelist.
    • Steps:
      1. Send a POST request to the API endpoint with a valid website URL to be added to the whitelist.
      2. Retrieve the list of whitelisted websites from the server.
      3. Check if the added website is included in the list of whitelisted websites.
    • Expected Result: The added website is successfully added to the whitelist.
  2. Removing a Whitelisted Website

    • Description: Test the API endpoint for removing a website from the whitelist.
    • Steps:
      1. Send a DELETE request to the API endpoint with a valid website URL to be removed from the whitelist.
      2. Retrieve the list of whitelisted websites from the server.
      3. Verify that the removed website is no longer included in the list of whitelisted websites.
    • Expected Result: The specified website is successfully removed from the whitelist.
  3. Retrieving Whitelisted Websites

    • Description: Ensure that the API endpoint retrieves the list of whitelisted websites accurately.
    • Steps:
      1. Send a GET request to the API endpoint to retrieve the list of whitelisted websites.
      2. Verify that the response contains the expected list of whitelisted websites.
    • Expected Result: The API endpoint returns the list of whitelisted websites as expected.
  4. Authentication and Security

    • Description: Test the API endpoint's authentication and security measures.
    • Steps:
      1. Attempt to access the API endpoint without proper authentication credentials.
      2. Verify that unauthorized access is denied, and an appropriate error response is returned.
    • Expected Result: Access to the API endpoint requires proper authentication credentials.

Notes

saanbe16 commented 1 month ago

doing this