Week 5 Learning Journal- CST438
This week, I focused on Chapter 14 of Software Engineering at Google, which discusses the importance of "larger tests" such as integration, system, and end-to-end tests. The core concept I learned is "fidelity," which describes how accurately a test environment represents the actual production system. The text explains that while unit tests are excellent for their speed and reliability, they inherently lack fidelity because they test components in isolation. Consequently, unit tests often fail to catch critical issues that arise from component interactions, data configuration discrepancies, or environmental differences. To bridge this gap, software engineers must employ larger tests, accepting the trade-offs of slower execution times and increased potential for nondeterminism, often called flakiness. The chapter also suggests strategies to mitigate these costs, such as using hermetic Systems Under Test (SUTs) to isolate tests from external network noise and data variability.
I experienced the reality of this fidelity gap firsthand while working on our distributed group project. Even though our individual components, specifically the React frontend and the Spring Boot backend services, seemed to function perfectly in isolation during unit checks, the system broke repeatedly when we attempted to run it as a cohesive distributed application. I spent hours debugging integration issues that my unit tests completely missed. These included Cross-Origin Resource Sharing (CORS) blocks preventing communication between ports, HTTP 405 "Method Not Allowed" errors due to missing controller endpoints, and logic failures caused by our database configuration, specifically the conflict between the 2025 and 2026 drop deadlines. These were classic integration problems that no amount of isolated unit testing could detect. Since we did not have a suite of automated end-to-end tests, I had to perform manual larger tests. This process involved logging in as an instructor to create an assignment and then logging in as a student to verify it appeared, which finally proved the system worked as a unified whole.
Comments
Post a Comment