CampusLearn
← CSC 311 Software Engineering

Architectural Design, Testing, and Quality Assurance

Notes

Architectural Design Patterns Software architecture serves as the high-level blueprint of a software system, organizing components, their relationships, and communication protocols. Selecting an appropriate architectural pattern directly impacts scalability, reliability, and fault tolerance. In a Monolithic architecture, all business logic, data access, and user interface services are bundled into a single deployable artifact. While simple to deploy initially, monoliths become difficult to scale and maintain as codebases expand. Conversely, Microservices architecture decomposes an application into autonomous, loosely coupled services organized around business domains. Communication occurs via lightweight protocols like RESTful APIs or message brokers such as RabbitMQ. Although microservices offer independent deployment and technology diversity, they introduce distributed system complexity, data consistency challenges, and network latency. Verification, Validation, and the Testing Pyramid Software Quality Assurance (SQA) ensures that the developed software meets stated customer expectations and architectural standards. Verification assesses whether the product is built according to specification (building the product right), while Validation ensures the product satisfies real user needs (building the right product). The software testing pyramid illustrates the ideal distribution of automated tests. Unit tests form the wide base, validating individual functions or classes in isolation. Integration tests form the middle tier, verifying communication between interacting components like databases and external APIs. End-to-End and System tests sit at the apex, exercising complete user workflows through the user interface. Practical example Consider an agribusiness software platform deployed for the Kenya Tea Development Agency (KTDA) to handle tea weighment records from smallholder farmers across Muranga and Nyeri counties. The engineers adopt an event-driven microservices architecture. Field clerks record tea leaf weights using handheld Android POS terminals operating in remote collection centers with intermittent mobile connectivity. The system contains three discrete services: Weighment Ingestion Service, Payment Ledger Service, and Safaricom B2C Disbursement Service. When a farmer delivers tea, the handheld terminal records the weight and queues an event. Once connection is established, the Weighment Ingestion Service processes the payload. To ensure quality, engineers implement the testing pyramid. First, unit tests verify that kilogram-to-shilling pricing logic handles boundary conditions, such as deductions for leaf moisture content. Next, integration tests mock the M-Pesa B2C endpoint to verify that failed payouts trigger transactional rollbacks in the local PostgreSQL ledger. Finally, load tests simulate five thousand collection centers simultaneously transmitting data at five in the evening, ensuring the message broker does not drop transactions during rural network flushes.

Quiz

1. In the context of the KTDA weighment system, which test layer would verify that weighing data successfully commits to the database and dispatches a message queue event?

2. In software testing terminology, which question directly relates to verification rather than validation?

3. What is a major engineering tradeoff when migrating from a monolithic architecture to a microservices architecture?

Sign in to submit and securely grade your quiz.