‹ All CI/CD & DevOps Practices questions

CI/CD & DevOps Practices Practice Question 8: Test Pyramid Feedback

CI/CD & DevOps Practices · Test 1 · question 8 of 10

Testing in Pipelineseasy

Most of a team's automated coverage comes from a browser-driven end-to-end suite that takes 45 minutes and fails at random about once a day. There are very few unit tests. Developers push and then wait close to an hour to find out whether a change broke anything, and they have started ignoring red builds.

What is the best long-term fix for the team's test strategy?

Select one answer
Show answer and explanation

Answer:

  • C. Move most checks into fast unit and service-level tests, and keep only a small set of end-to-end tests

The test pyramid says a suite should have many more low-level unit tests than broad-stack tests that run through a GUI. UI tests are brittle, expensive to write, slow to run, and more prone to non-determinism, which undermines trust in them. That is the symptom here: developers ignoring red builds. DORA's test automation guidance also recommends test feedback in under ten minutes. Moving checks down the pyramid, and so earlier in the pipeline, gives fast and reliable feedback (C).

Option A makes the pyramid even more upside-down. The suite gets slower and flakier, and feedback gets worse.

Option B hides the flakiness instead of removing it. It also makes a slow pipeline slower, and real intermittent bugs can be retried away.

Option D shortens the commit pipeline by removing almost all per-commit feedback. Regressions are then found a day later, which is the opposite of shift-left testing.

References: Test Pyramid (Martin Fowler); Test automation (dora.dev)

Practice Test 1 ›

Study guides for CI/CD & DevOps Practices