Developer Workflow on Google Cloud: SDKs, Cloud Code, Cloud Shell Editor, Emulators, Testing and Eventarc

Google Cloud Platform Architect 45 min min read Updated: Nov 17, 2026 Beginner
Developer Workflow on Google Cloud: SDKs, Cloud Code, Cloud Shell Editor, Emulators, Testing and Eventarc
Beginner Topic 3 of 3

Tools at a Glance

ToolUse
Google Cloud CLIgcloud, bq, gcloud storage for commands and scripts
Client librariesPython, Java, Node.js, Go, C#, PHP, Ruby: call services from code
Cloud Shell and Cloud Shell EditorBrowser terminal and VS Code style editor with tools ready
Cloud CodeIDE plugins for VS Code and JetBrains: run and debug on Cloud Run and Kubernetes
EmulatorsLocal Firestore, Pub/Sub, Spanner, Bigtable, Datastore for tests
TerraformInfrastructure as code
Gemini Code AssistAI coding help in the IDE

Application Default Credentials (ADC)

Client libraries find credentials automatically in this order: an environment variable pointing to a credential file, then **user credentials from gcloud auth application-default login (for local development), then the attached service account** when running on Google Cloud.

bash # Local development: log in once, code picks up your credentials gcloud auth application-default login # Better for sharing: impersonate a service account instead of using keys gcloud auth application-default login --impersonate-service-account=dev-sa@my-proj.iam.gserviceaccount.com
python from google.cloud import storage, pubsub_v1 client = storage.Client() # uses ADC, no key file in code for blob in client.list_blobs("acme-reports-482", max_results=5): print(blob.name) publisher = pubsub_v1.PublisherClient() publisher.publish(publisher.topic_path("my-proj", "orders"), b'{"orderId": 42}').result()

Local Emulators

bash gcloud emulators pubsub start --project=local-test --host-port=localhost:8085 & $(gcloud emulators pubsub env-init) gcloud emulators firestore start --host-port=localhost:8080 & export FIRESTORE_EMULATOR_HOST=localhost:8080
  • Test without cost and without touching real data
  • Use separate projects for dev, test and prod

Connecting Events and Tasks

ServiceUse
EventarcRoute events (Cloud Storage changes, audit log events, Pub/Sub, custom) to Cloud Run, functions or GKE
Cloud SchedulerCron jobs that call HTTP endpoints, Pub/Sub or Workflows
Cloud TasksQueue of tasks with rate control and retries for your own services
WorkflowsOrchestrate calls between services and APIs with branching and retries (serverless)
Pub/SubEvent bus and fan-out
yaml main: steps: - get_order: call: http.get args: {url: https://orders-abc-uc.a.run.app/orders/42, auth: {type: OIDC}} result: order - check: switch: - condition: ${order.body.amount > 1000} next: manual_review - ship: call: http.post args: {url: https://shipping-abc-uc.a.run.app/ship, auth: {type: OIDC}, body: ${order.body}} next: end - manual_review: return: "needs review"
bash gcloud workflows deploy order-flow --source=flow.yaml --location=asia-south1 gcloud scheduler jobs create http nightly --schedule="0 2 * * *" --uri="https://workflowexecutions.googleapis.com/v1/projects/my-proj/locations/asia-south1/workflows/order-flow/executions" \ --http-method=POST --oauth-service-account-email=sched@my-proj.iam.gserviceaccount.com

Testing Practices

  1. Unit tests with mocks and integration tests with emulators
  2. Contract tests for APIs
  3. Load tests (for example with Locust or k6) before launches
  4. Smoke tests after each deploy
  5. Keep test data separate and clean up after tests

Practice

  1. Run gcloud auth application-default login and list buckets from Python
  2. Start the Pub/Sub emulator and publish a message
  3. Write a Workflow that calls two Cloud Run services
  4. Schedule it with Cloud Scheduler

Conclusion

Use the gcloud CLI, client libraries with Application Default Credentials, Cloud Code and emulators for fast development, and Eventarc, Scheduler, Tasks and Workflows to connect events and jobs. Avoid key files and test in separate projects.

Quick Summary: tools; ADC; emulators; events and tasks; testing.

Get Newsletter

Subscibe to our newsletter and we will notify you about the newest updates on Edugators