Test Cases: Confirming Order Submission
Overview of the Testing Process
Order confirmation is a critical process for any business, ensuring that customer orders are received correctly and processed efficiently. This document outlines the testing procedures and results for User Story HU-C11, focusing on the confirmation of order submissions within the system. The tests were designed to validate the entire workflow, from order creation to confirmation and subsequent retrieval of order details. The testing process involved automated scripts, written in Bash, and used curl to interact with the backend API. These scripts were executed in a production-like environment, targeting the backend service at https://back-dp2.onrender.com. The execution date for these tests was November 14, 2025, and the primary tester was Kevin Antonio Navarro Carrera from the QA/SEG team. The methodology employed was automated, ensuring consistent and repeatable results. The environment mirrors the production setup to guarantee that the tests accurately reflect real-world scenarios. This comprehensive approach allowed for thorough validation of the order confirmation functionality, ensuring its reliability and efficiency. Each test case was designed to cover a specific aspect of the order confirmation process, from initial order creation to the final status checks.
General Information
- User Story: HU-C11
- Description: A customer ready to ship can confirm their order so that the business receives it without errors.
- Execution Date: November 14, 2025
- Tester: Kevin Antonio Navarro Carrera
- Methodology: Automated (Bash + curl)
- Environment: Backend production (https://back-dp2.onrender.com)
Executed Test Cases
TC-001: Creating a Complete Order
The primary goal of this test case was to verify the system's ability to create a new order with all necessary details. This involved sending a POST request to the /api/v1/pedidos/completo endpoint, including the necessary product information. The automated script first obtained an active session ID for the table. It then executed the POST request with the order details. The script validated that the HTTP response code was 201 (Created), which signifies a successful operation. The successful outcome included verifying that the response contained a valid order ID, confirming that the order was created correctly in the database. A successful outcome validated that the system correctly processes complete order data and returns the correct response.
- Objective: Validate that an order can be created with all necessary data.
- Method: Automated bash script.
- Steps:
- Get active table session.
- Execute POST /api/v1/orders/complete with products.
- Validate HTTP response 201.
- Verify that the order ID is returned.
- Expected Result: Order created with status 201.
- Obtained Result: Order created successfully.
- Status: pass
TC-002: Validating Automatic Total Calculation
Ensuring accurate calculation of the order total is critical for financial accuracy. This test case focused on validating the backend's ability to automatically calculate the total amount of an order based on the included products and quantities. After creating the order, the script extracts the total amount from the response and verifies that the total is greater than 0 and formatted correctly. The total is correctly calculated, reflecting the product prices and quantities within the order. This ensures financial accuracy and reliability of order processing. Accurate total calculations are essential for financial reporting, inventory management, and customer billing. This validation step is crucial to prevent discrepancies and ensure the integrity of the order data. The system automatically calculates the total amount, which is then compared against the expected value. The validation step confirms the accuracy of the total calculation and confirms that the format of the currency is correct.
- Objective: Confirm that the backend calculates the order total correctly.
- Method: Automated bash script.
- Steps:
- Extract the total field from the order response.
- Validate that the total is greater than 0.
- Verify the correct currency format.
- Expected Result: Total calculated automatically.
- Obtained Result: Total: S/20.00 (correct based on products).
- Status: pass
TC-003: Validating Required Order Data
This test ensures that the essential order fields are present and correctly formatted. The script validates the presence of the id field, the order_number field with the correct format, and the state field. A missing or incorrectly formatted field can lead to order processing errors and potential data integrity issues. This test confirms that the mandatory fields are populated correctly. Correctly formatted data is essential for the seamless operation of the order processing system. This validation step confirms that all required information is present and in the expected format. The system confirms the presence and proper formatting of all essential order fields, ensuring order processing. The test validates the structure and completeness of order data. This ensures that the essential order fields are available and correctly formatted, preventing potential issues during order processing. The successful completion of this test assures that the foundational elements of the order are valid.
- Objective: Verify that the order has all required fields.
- Method: Automated bash script.
- Steps:
- Validate the presence of the
idfield. - Validate the
order_numberfield with the correct format. - Validate the
statefield (must be "pending").
- Validate the presence of the
- Expected Result: All required fields present.
- Obtained Result: ID: OK, Number: 20251115-M1-004, State: pending.
- Status: pass
TC-004: Sending the Order to the Kitchen
The main focus of this test case is to validate the functionality of confirming the order submission. The script retrieves the ID of the created order and sends a POST request to the /api/v1/pedidos/enviar endpoint, including the order ID. The HTTP response code is validated to ensure that it returns 201 (Created), indicating a successful order confirmation. This verification confirms that the order has been successfully submitted and is ready for processing. The successful confirmation sends the order to the kitchen. The test ensures that the order is correctly submitted. The correct confirmation triggers the next steps in the order processing workflow.
- Objective: Validate that the order submission can be confirmed.
- Method: Automated bash script.
- Steps:
- Take the ID of the created order.
- Execute POST /api/v1/orders/send with the ID.
- Validate HTTP response 201.
- Expected Result: Order sent successfully.
- Obtained Result: Order confirmed with status 201.
- Status: pass
TC-005: Retrieving the Confirmed Order
After confirming the order, it's crucial to ensure that the order details can be accessed and retrieved. This test case executes a GET request to the /api/v1/pedidos/{id} endpoint, using the ID of the confirmed order. The script validates that the HTTP response code is 200 (OK), indicating that the order was successfully retrieved. The test verifies that the system can retrieve the order details. This ensures the accessibility of the order data for further processing and reporting purposes. The correct retrieval of the order data is essential for the order confirmation process.
- Objective: Verify that the order can be consulted after sending it.
- Method: Automated bash script.
- Steps:
- Execute GET /api/v1/orders/{id}.
- Validate HTTP response 200.
- Verify that it returns order data.
- Expected Result: Order returned correctly.
- Obtained Result: Order consulted successfully.
- Status: pass
TC-006: Validating the Confirmed Order Status
This test ensures that the order maintains the correct status after confirmation. The script extracts the state field from the response of the previous GET request and verifies that the state is "pending", which means waiting for preparation. This verification confirms that the order is correctly in the "pending" state after confirmation and is ready for the kitchen. This assures that the order confirmation process transitions to the appropriate state. The correct status is essential for the order processing workflow.
- Objective: Confirm that the order maintains the correct status after sending.
- Method: Automated bash script.
- Steps:
- Extract the
statefield from the response. - Validate that the state is "pending" (waiting for preparation).
- Extract the
- Expected Result: Order status is "pending".
- Obtained Result: Status confirmed as "pending".
- Status: pass
Results Summary
Executive Summary
Total: 6 tests Passed: 6 (100%) Failed: 0 (0%) Blocked: 0
Screenshot

Script execution showing all 6 tests passed successfully.
Test Script Details
Location: tests/qa/test_hu_c11_confirmar_pedido.sh
Execution:
cd tests/qa
./test_hu_c11_confirmar_pedido.sh
Tested Endpoints
POST /api/v1/orders/complete # Create order with all data
POST /api/v1/orders/send # Confirm order submission
GET /api/v1/orders/{id} # Check the status of the order
Failure Analysis
No failures were identified in the order confirmation functionality. All tests passed successfully.
Observations
The complete workflow of order creation and confirmation functions correctly:
- Order creation with automatic total calculation.
- Validation of required data.
- Order submission confirmation.
- Subsequent order inquiry.
Related Issues
- HU-C11 - Base User Story
Final Status
Approved - All order submission tests passed successfully.
The order submission workflow operates as expected. The backend correctly calculates the total and maintains the appropriate statuses during the process.
Tester: Kevin Antonio Navarro Carrera
Team: QA/SEG
Date: November 14, 2025
For more information, visit the OWASP website.