Design: E-commerce Transactional Testing System
Focus on testing transactional integrity in order processing, payment, and inventory management. Exclude UI/UX testing and marketing features.
Functional Requirements
Non-Functional Requirements
Jump into concepts and practice - no test required
User --> API Gateway --> Order Service --> Payment Service
| |
v v
Inventory Service Database
|
v
Notification ServicebeginTransaction()
if (checkInventory()) {
if (processPayment()) {
updateOrderStatus('confirmed')
commitTransaction()
} else {
rollbackTransaction()
}
} else {
rollbackTransaction()
}processPayment() fails?processPayment() returns false, the code calls rollbackTransaction().