Bird
0
0

You want to design an automated testing strategy for a microservices system that must ensure fast feedback and reliable deployment. Which combination of tests and practices is best?

hard📝 Trade-off Q15 of 15
Microservices - CI/CD for Microservices
You want to design an automated testing strategy for a microservices system that must ensure fast feedback and reliable deployment. Which combination of tests and practices is best?
ARun all tests manually before deployment to avoid CI overhead
BRun unit tests on every commit, integration tests nightly, and use test containers for isolation
COnly run integration tests on the main branch to save resources
DSkip unit tests and rely on end-to-end tests for full coverage
Step-by-Step Solution
Solution:
  1. Step 1: Identify fast feedback requirements

    Unit tests are fast and should run on every commit for quick feedback.
  2. Step 2: Ensure reliable deployment with integration tests and isolation

    Integration tests run less frequently but validate service interactions; test containers isolate environments to avoid conflicts.
  3. Step 3: Evaluate other options

    Manual tests slow feedback; skipping unit tests risks missing bugs; running all tests only on main delays feedback.
  4. Final Answer:

    Run unit tests on every commit, integration tests nightly, and use test containers for isolation -> Option B
  5. Quick Check:

    Fast feedback + isolation = unit + integration + containers [OK]
Quick Trick: Combine fast unit tests with isolated integration tests [OK]
Common Mistakes:
  • Relying only on manual testing
  • Skipping unit tests for speed
  • Running all tests only on main branch

Want More Practice?

15+ quiz questions · All difficulty levels · Free

Free Signup - Practice All Questions
More Microservices Quizzes