Cloud Engineer Quality Control & Assurance 2 — Questions and Answers
Question 1: Which testing strategy validates that individual microservices interact correctly with each other in a cloud environment?
- Unit testing
- Integration testing (Correct answer)
- Load testing
- Smoke testing
Correct answer: Integration testing
Integration testing verifies that separate microservices or components communicate and function correctly when combined.
Question 2: What is the primary purpose of a canary deployment in a cloud QA pipeline?
- To roll back failed deployments automatically
- To release changes to a small subset of users before full rollout (Correct answer)
- To run automated security scans on new builds
- To test infrastructure changes in isolation
Correct answer: To release changes to a small subset of users before full rollout
Canary deployments route a small percentage of production traffic to the new version to detect issues before a full release.
Question 3: A cloud team wants to enforce code quality gates before merging pull requests. Which tool is best suited for static code analysis in a CI pipeline?
- Terraform
- SonarQube (Correct answer)
- Grafana
- Ansible
Correct answer: SonarQube
SonarQube performs static code analysis to detect bugs, vulnerabilities, and code smells automatically in CI pipelines.
Question 4: What does 'shift-left testing' mean in a cloud DevOps context?
- Moving production workloads to left-side data centers
- Running tests earlier in the development lifecycle (Correct answer)
- Prioritizing UI testing over backend testing
- Shifting responsibility for testing from QA to operations
Correct answer: Running tests earlier in the development lifecycle
Shift-left testing integrates quality checks earlier in the SDLC to catch defects when they are cheapest to fix.
Question 5: Which metric measures the percentage of code paths exercised by automated tests?
- Mean Time to Recovery (MTTR)
- Code coverage (Correct answer)
- Change failure rate
- Error budget
Correct answer: Code coverage
Code coverage indicates what proportion of source code is executed during automated test runs.
Question 6: A cloud engineer notices that a service passes all unit tests but fails in production due to environment differences. What practice best addresses this?
- Increasing unit test count
- Using containerized test environments that mirror production (Correct answer)
- Disabling linting rules
- Running tests only on the main branch
Correct answer: Using containerized test environments that mirror production
Containerizing test environments with Docker ensures parity between test and production configurations.
Question 7: What is the role of a 'test harness' in cloud quality assurance?
- A security tool that monitors API traffic
- A framework that automates test execution and validates outputs (Correct answer)
- A dashboard for tracking deployment frequency
- A configuration file for infrastructure provisioning
Correct answer: A framework that automates test execution and validates outputs
A test harness provides the infrastructure to run automated tests, feed inputs, and verify expected outputs consistently.
Which testing strategy validates that individual microservices interact correctly with each other in a cloud environment?