Aller au contenu principal

Delete

What are we going to test and how?

Scope

Test cases for the User Management API.

API version: 1.0.0

Endpoints covered

MethodEndpointDescription
DELETE/users/{id}Delete a user
Test data details
users:
valid:
id: "123"
name: "Username"
email: "username@example.com"

invalid:
email: "username@"
empty_name: ""

non_existing:
id: "999999"

DELETE /users/{id} — Delete a user

TC-USER-016 — Delete an existing user

Objective

Verify that an existing user can be deleted.

Preconditions

  • User 123 exists.

Request

DELETE /users/123

Expected result

  • HTTP status code is 204.
  • Response has no response body.
  • User 123 is no longer available after deletion.

Technique

Positive testing


TC-USER-017 — Delete a non-existing user

Objective

Verify that the API returns 404 when deleting a user that does not exist.

Request

DELETE /users/999999

Expected result

  • HTTP status code is 404.
  • Response indicates that the user was not found.

Technique

Equivalence Partitioning


TC-USER-018 — Delete the same user twice

Objective

Verify the behavior when attempting to delete an already deleted user.

Preconditions

  • User 123 exists.

Steps

  1. Send DELETE /users/123.
  2. Verify that the response is 204.
  3. Send DELETE /users/123 again.

Expected result

  • First request returns 204.
  • Second request returns 404.

Technique

State Transition Testing