Backend for Rentevo App developed in Java Spring Boot and Postgres database

Testing scenarios

To create a comprehensive study 4 most important testing scenarios were created:

  • creating user account,
  • adding products to the cart,
  • paying for the order,
  • adding and updating product into the store.

Database Schema

image

Endpoints description

The POST /product/add endpoint is used to add a new product.

Request Body

  • The request body should be in JSON format and should include the following parameters:
    • productCode (string): The code of the product.
    • name (string): The name of the product.
    • description (string): The description of the product.
    • price (number): The price of the product.
    • category (string): The category of the product.
    • features (array): An array of objects containing parameter (string) and value (string) for the features of the product.
    • quantityInStock (number): The quantity of the product in stock.
    • SKU (string): The SKU (stock keeping unit) of the product.

Response

The response to this request has a status code of 200 and a content type of text/plain. The response body contains the message "Products were imported successfully".

JSON Schema for Response

{  "type": "object",
  "properties": {
    "status": {
      "type": "number",
      "description": "The status code of the response."
    },
    "message": {
      "type": "string",
      "description": "The message indicating the result of the request."
    }
  }
}

](http://localhost:9000/api/product/import)

Import Product

This endpoint allows the user to import a product using a POST request to the specified URL.

Request Body

  • form-data
    • file (file): The file containing the product data to be imported.

Response

The response of this request is a JSON schema representing the structure of the data returned upon importing the product.