Seminar 13: End-to-End Testing
Goal: Thoroughly test your system to ensure its functionality and reliability.
Introduction
For Seminar 13 of Distributed Systems, your task is to thoroughly test your system to ensure its functionality and reliability. Begin by addressing any non-working components from previous sessions, ensuring that all services are operational and running, including connecting the frontend with the rest of your system. Once the system is stable, create a comprehensive suite of tests ranging from basic scenarios involving single orders, to more complex scenarios involving multiple orders of different types, including fraudulent and non-fraudulent transactions, occurring simultaneously.
The goal is to conduct end-to-end testing of your system to ensure its functionality and performance. This includes both manual testing, where you simulate real user interactions, and automatic testing using existing end-to-end or load testing tools. Consider leveraging tools such as Postman (https://www.postman.com/), Locust (https://locust.io/), Cypress (https://www.cypress.io/), JMeter (https://jmeter.apache.org/), or others of your choice to automate your testing process and ensure comprehensive coverage of your system's functionalities.
Task
- Ensure all components are up and running: Verify that all components of your distributed system, the backend services and frontend, are operational and running smoothly.
- Complete the order execution flow: Make sure to have the complete flow of a book order, starting from the frontend interaction to the backend services processing and final response to the user.
- Create automated test scenarios: Develop a suite of automated test scenarios to thoroughly evaluate the functionality and reliability of your system. Test the load of your system, for instance, by assessing how many orders it can handle simultaneously, or the average time it takes to fulfill a single order. Experiment with different loads and try to extract your own insights, given your environment constraints. You should cover the following cases:
- Single non-fraudulent order: Demonstrate a test scenario where a single non-fraudulent order is created from the frontend and verified for correctness. During the checkpoint, this should be demonstrated either manually, by interacting with the frontend, or automated, for instance, using Cypress. Leverage your logs to showcase the whole execution flow.
- Multiple non-fraudulent non-conflicting orders: Create automated tests to handle scenarios involving multiple simultaneous non-fraudulent orders that do not conflict with each other. Non-conflicting means, for instance, that the orders attempt to purchase different books. Eventually, you may add some delays in specific components, to simulate shorter or longer execution times for different orders.
- Multiple mixed orders: Automate test scenarios that involve a mixture of fraudulent and non-fraudulent orders, ensuring proper handling and validation.
- Conflicting orders: Define and automate test scenarios for orders that contain conflicting requests, such as attempting to purchase the same book simultaneously.