Vineet Kumar profile picture

Vineet Kumar

+1 437-428-2199 | +1 301-979-5562  |  contactkrvineet@gmail.com

Test Automation Playground

Welcome! This page is designed for practicing automation scenarios, API validation, and UI locator strategies. Use this as a playground for your automation scripts and experiments.

API Validation Practice

Use the following endpoints to practice API validation (POST,GET,PUT,DELETE):

POST Create User
POST https://api.vineetkr.com/api/users
{
  "name": "Vineet Kumar",
  "email": "contactkrvineet@gmail.com",
  "age": 25
}
Sample Success Response:
{
  "success": true,
  "message": "User created successfully",
  "data": {
    "name": "Vineet Kumar",
    "email": "contactkrvineeting@gmail.com",
    "age": 25,
    "_id": "69591c36d284de6384c77007",
    "createdAt": "2026-01-03T13:40:06.254Z",
    "updatedAt": "2026-01-03T13:40:06.254Z",
    "__v": 0
  }
}
Sample Error Response (User Exists):
{
  "success": false,
  "message": "User with this email already exists"
}
Sample Validation Error Response (Missing/Invalid Name or Email):
{
  "success": false,
  "message": "Validation error",
  "errors": [
    {
      "code": "too_small",
      "minimum": 2,
      "type": "string",
      "inclusive": true,
      "exact": false,
      "message": "Name must be at least 2 characters",
      "path": [
        "name"
      ]
    },
    {
      "validation": "email",
      "code": "invalid_string",
      "message": "Invalid email format",
      "path": [
        "email"
      ]
    }
  ]
}
GET All Users
GET https://api.vineetkr.com/api/users Sample Response:
{
    "success": true,
    "count": 2,
    "data": [
        {
            "_id": "69592c8410e9769f62ea55e3",
            "name": "Akshara",
            "email": "akshara.tiwari.2016@gmail.com",
            "age": 9,
            "createdAt": "2026-01-03T14:49:40.867Z",
            "updatedAt": "2026-01-03T14:49:40.867Z",
            "__v": 0
        },
        {
            "_id": "6954e1fad3ed40ae5daf44d6",
            "name": "Vineet Kumar",
            "email": "contactkrvineet@gmail.com",
            "age": 25,
            "createdAt": "2025-12-31T08:42:34.742Z",
            "updatedAt": "2025-12-31T08:42:34.742Z",
            "__v": 0
        }
    ]
}
PUT Update User
PUT https://api.vineetkr.com/api/users/69591c36d284de6384c77007 Request Body:
{
    "name": "vineetkumar",
    "email": "contactk@gmail.com",
    "age": 9
}
Sample Success Response:
{
    "success": true,
    "message": "User updated successfully",
    "data": {
        "_id": "69591c36d284de6384c77007",
        "name": "vineetkumar",
        "email": "contactk@gmail.com",
        "age": 9,
        "createdAt": "2026-01-03T13:40:06.254Z",
        "updatedAt": "2026-01-03T14:15:06.402Z",
        "__v": 0
    }
}
Sample Error Response (User Not Found):
{
  "success": false,
  "message": "User not found"
}
DELETE User
DELETE https://api.vineetkr.com/api/users/694dd2e25399f85ef6828e05 Sample Success Response:
{
    "success": true,
    "message": "User deleted successfully",
    "data": {
        "_id": "694dd2e25399f85ef6828e05",
        "name": "VineetTest",
        "email": "Vineet@vineetkr.com",
        "age": 25,
        "createdAt": "2025-12-26T00:12:18.054Z",
        "updatedAt": "2025-12-26T00:12:18.054Z"
    }
}
Sample Error Response (User Not Found):
{
  "success": false,
  "message": "User not found"
}

API Contract

This contract describes the request and response structure for the POST, GET, PUT and DELETE endpoints at https://api.vineetkr.com/api/users.

POST /api/users

Request Body (application/json):
{
  "name": "string (min 2 chars, required)",
  "email": "string (valid email, required)",
  "age": "integer (optional)"
}
Success Response (201):
{
  "success": true,
  "message": "User created successfully",
  "data": {
    "name": "Vineet Kumar",
    "email": "contactkrvineeting@gmail.com",
    "age": 25,
    "_id": "ObjectId",
    "createdAt": "ISODate",
    "updatedAt": "ISODate",
    "__v": 0
  }
}
Error Response (User Exists):
{
  "success": false,
  "message": "User with this email already exists"
}
Validation Error Response:
{
  "success": false,
  "message": "Validation error",
  "errors": [
    {
      "code": "too_small",
      "minimum": 2,
      "type": "string",
      "inclusive": true,
      "exact": false,
      "message": "Name must be at least 2 characters",
      "path": ["name"]
    },
    {
      "validation": "email",
      "code": "invalid_string",
      "message": "Invalid email format",
      "path": ["email"]
    }
  ]
}

GET /api/users

Success Response (200):
{
  "success": true,
  "count": "integer",
  "data": [
    {
      "_id": "ObjectId",
      "name": "string",
      "email": "string",
      "age": "integer",
      "createdAt": "ISODate",
      "updatedAt": "ISODate",
      "__v": 0
    },
    ...
  ]
}

PUT /api/users/{id}

Request Body (application/json):
{
    "name": "string",
    "email": "string",
    "age": integer
}
Sample Success Response:
{
    "success": true,
    "message": "User updated successfully",
    "data": {
        "_id": "ObjectId",
        "name": "string",
        "email": "string",
        "age": integer,
        "createdAt": "ISODate",
        "updatedAt": "ISODate",
        "__v": 0
    }
}

DELETE /api/users/{id}

Success Response (200):
{
    "success": true,
    "message": "User deleted successfully",
    "data": {
        "_id": "ObjectId",
        "name": "string",
        "email": "string",
        "age": integer,
        "createdAt": "ISODate",
        "updatedAt": "ISODate"
    }
}

Locator Practice

Locators are used in automation to identify and interact with elements on a web page. Common types include:

For end-to-end scenario practice, use the Crafty Girls application: