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.
The POST /product/add
endpoint is used to add a new product.
- 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 containingparameter
(string) andvalue
(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.
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".
{ "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)
This endpoint allows the user to import a product using a POST request to the specified URL.
- form-data
file
(file): The file containing the product data to be imported.
The response of this request is a JSON schema representing the structure of the data returned upon importing the product.