CST 438 Week 5 Learning Journal
Larger Tests
This week, we were assigned to read Software Engineering at Google, chapter 14, titled "Larger Testing" or end-to-end system tests. Previously, we learned about the benefits of small-scale testing for unit tests; however, larger tests may be necessary to fully cover the software's overall functionality. Larger testing is the complement of small testing as it is slow, shares resources with other tests, and may interfere with other tests or user states. Creating a large test enables us to assess the software's functionality, whereas small tests allow us to verify that individual parts of the software are functioning properly.
To create a large test, several things need to be put into place. First, a large test needs a system under test, or SUT. There are many different types, so it is essential to select the one that best suits your needs. The test is evaluated based on two factors: Hermeticity and Fidelity. Hermeticity refers to the degree of isolation and reproducibility of the tests, and fidelity refers to how closely the tests resemble real-world conditions. Second, the test will need data, specifically seeded data and test traffic. Seeded data is preinitialized under the SUT, and test traffic data is data that is sent to the SUT during testing. Finally, the test will require verification that the system's behavior is accurate. This can take the form of assertions, comparisons, or manual verification.
By conducting larger tests, we can strike a balance between the fidelity and hermeticity of the system. It also allows programmers to find gaps in the unit test that may exist. Some gaps include the integrity of mocks, configuration issues, and unexpected behaviors or inputs. While larger tests can be beneficial, they also come with the challenges of ownership and standardization (or the lack thereof). Large tests require the work of multiple programmers and how they collaborate on each piece. It may be hard to determine who is responsible for fixing a section that is not functioning properly. Additionally, there is no standardized approach to running tests, which can lead to a lack of consistency and uniformity.
Comments
Post a Comment