Which of the following statements about the test pyramid is true?
正解:B
The test pyramid is a concept that illustrates the different levels of testing and their relative quantities. The pyramid suggests that there should be more low-level unit tests than high-level end-to-end tests. As you move up the pyramid, the scope of each test increases, meaning each higher level test typically covers more of the production code. * Unit Tests: Form the base of the pyramid and cover individual units of code. They are numerous because they are quick to write and execute. * Service/Integration Tests: Sit in the middle of the pyramid and cover interactions between integrated units or services. * UI/End-to-End Tests: At the top of the pyramid, these tests cover entire workflows and user interactions, making them fewer in number due to their complexity and execution time. Option B accurately describes that the higher the layer of the test pyramid, the more production code a single automated test tends to cover because these higher-level tests involve broader functionalities and interactions compared to unit tests.