Objective 2.1

PCD

Setting up your development environment

Objective 2.1 sits in Building and testing applications, which carries 23% of the Cloud Developer exam. The questions below are original, written from the official objective title above, and each explanation cites the Google Cloud page it rests on.

Objective title verbatim from the official objectives. Google Cloud exam page

A worked example

Shown solved, with the whole explanation open: this is what every question here carries.

2-1Building and testing applications

A team wants one piece of function code to run on a laptop and on the managed runtime with no edits. What does the framework do to allow that?

It wraps the function in a persistent HTTP appCorrect · your answerCorrect. The server is the portable part.
It uploads the source to a build serviceUploading is what local development is meant to avoid entirely.
It compiles the function into a static binaryNo compilation step of that kind is part of running it locally.
It emulates the managed runtime API surfaceNothing pretends to be the platform; a real server is started.

Correct.

Concept

A handler becomes portable once something else owns the job of listening for requests and calling it, since that wrapper can be run anywhere the language runs.

Why A

The framework libraries wrap a deployed function in a long-lived HTTP application, and the same libraries run on any platform supporting the language, including a workstation or an on-premises server.

Source

Cloud Run uses the open-source Functions Framework libraries to wrap your deployed functions in a persistent HTTP application. The Functions Framework can also run on any other platform that supports the language itself, including your local machine, on-premises servers, and Compute Engine .

Local functions development, checked August 2026
#gcp#functions-framework#local-development#portability

Now you: objective 2.1 questions

No account needed. The explanation opens when you answer.

Sample question 1 of 3

2-1Building and testing applications

An engineer starting a function locally needs it to answer on a port other than the usual one. Which two controls set the listening port?

Sample question 2 of 3

2-1Building and testing applications

A team asks whether an event-driven function written in one language can use the same local framework as an HTTP one. What holds across the runtimes?

Sample question 3 of 3

2-1Building and testing applications

A team has a Java function with a target named in the build file, another in an environment variable and a third on the command line. Which one wins?

Full Cloud Developer question bank coming

We’re writing the complete bank from the official objectives right now. Leave your email and we’ll tell you when it ships, nothing else, ever.

Read the sources

These are the official pages the questions above cite. Reading them is studying the objective from the primary source, which is what the explanations point you toward anyway.

More objectives in Building and testing applications