CS FundamentalsModerateAccenture · Capgemini
A CI pipeline takes 40 minutes: end-to-end UI tests (30 min) run first, then unit tests (3 min), then linting (1 min). Most failures are lint or unit failures. What reordering follows the fail-fast principle and the test pyramid?
- A. Lint, then unit tests, then integration tests, then the slow end-to-end tests
- B. End-to-end tests first because they are most realistic
- C. Run only end-to-end tests and drop unit tests
- D. Run everything only nightly
Correct answer: A. Lint, then unit tests, then integration tests, then the slow end-to-end tests
Cheap, fast checks that fail most often should run first so developers get feedback in minutes. The pyramid also says to have many fast unit tests and few slow end-to-end tests.
Practise more Software Engineering, Git and Cloud Basics questionsSoftware Engineering, Git and Cloud Basics: notes and key points
More Software Engineering, Git and Cloud Basics questions
- A service's SLO is 99.9% of requests succeeding over a 30-day window. For a downtime-based view, what is the monthly error budget in…
- A service has a 99.9% success SLO over 30 days. An incident causes a steady 0.5% error rate. If it continues, how soon will the whole…
- A Kubernetes HorizontalPodAutoscaler targets 60% average CPU. There are 4 pods averaging 90% CPU. The HPA uses desired = ceil(current…
- A VM costs ₹10 an hour on demand. A one-year reserved commitment for the same VM costs ₹52,560, payable whatever the usage. Above what…
- A client calls a payment API with exponential backoff: wait 100 ms before the first retry and double the wait each time, for up to 4…
- A mobile client sends POST /payments, the server charges the card, but the response is lost on a flaky network, so the client retries. How…