Prepare and test your skills
Prepare and test your skills
Free sample question, answered and explained below. The Professional Cloud Architect practice bank has 2,335 more like it. Try 10 free: instant score, no account.
A development team is designing an automated CI/CD pipeline in Cloud Build for an event-driven application that ingests messages from Cloud Pub/Sub and persists records to Cloud Firestore.
To ensure software quality before deployment, the team must execute automated integration tests on every commit to validate component interoperability and end-to-end service interactions. The testing workflow must run within an isolated build environment without provisioning live cloud resources or incurring Google Cloud service billing costs.
How should the team configure their Cloud Build workflow to meet these requirements?
Google Cloud provides local service emulators (such as the Cloud Pub/Sub Emulator, Firestore Emulator, and Spanner Emulator) that replicate the API surfaces, protocol behaviors, and responses of live Google Cloud services within local or containerized execution environments.
gcloud emulators commands) directly within the build workflow, providing hermetic and reproducible integration test environments.PUBSUB_EMULATOR_HOST and FIRESTORE_EMULATOR_HOST) are defined in the build steps.Utilizing Google Cloud emulators within Cloud Build strikes the perfect balance between high-fidelity component testing and pipeline efficiency, satisfying testing requirements without unnecessary cloud overhead or billing costs.
This approach automatically deploys candidate containers to a live staging environment on Cloud Run and wires them to live Eventarc triggers and Pub/Sub topics to execute live system testing.
The team needed to perform end-to-end smoke tests and canary validation on deployed staging services after the CI integration testing and build verification phases had already completed successfully.
This approach relies solely on software mock objects, stubs, or fake implementations within unit testing frameworks (such as Mockito, unittest.mock, or Jest) to simulate API responses without running any supporting service process.
The scenario specifically called for fast unit testing of pure business logic functions without testing external SDK integrations or component communication.
This approach uses Infrastructure as Code (Terraform) inside the build pipeline to dynamically create live Google Cloud projects and real cloud resources (such as Pub/Sub topics, subscriptions, and Firestore databases) for each test run, executing tests against live endpoints before tearing the resources down.
The requirement was to perform full cross-region end-to-end disaster recovery testing or validate strict cloud organization policy enforcements on live infrastructure rather than rapid, zero-cost integration testing.
Answer them yourself and get your score the moment you finish. No account needed.
Full access includes
Keep the momentum going with these hand-picked practice scenarios
Last updated Validated