Free sample · answers included

Free Salesforce MuleSoft Developer
Practice Questions

18 free MuleSoft Developer practice questions from our bank of 300 reviewed questions, picked across all 12 official exam sections in proportion to their weight. Each one shows the correct answer, why it is right and why the others are wrong, and the official documentation it was checked against.

Last updated

What is the MuleSoft Developer exam like?

60 + up to 5

Scored + unscored questions

120 min

Time limit

70%

Passing score

$200

Registration (retake $100)

None

Prerequisite

Confirm current details in the official MuleSoft Developer exam guide.

Questions by exam section

Heavier sections get more questions, the same way the real exam and our 60-question practice exams are weighted.

Creating Application Networks

7% of the exam
  1. Question 1 · Medium · Choose 3

    Ursa Major Solar is adopting API-led connectivity for its installation business. Which three statements correctly match an API layer with its responsibility? Choose 3 answers.
    • A.A System API exposes installation records from the ERP so that other applications can use them without touching the ERP directly
    • B.A System API reshapes installation data into the compact format that the field technicians' mobile app displays
    • C.An Experience API orchestrates calls to the ERP and the CRM System APIs and applies the business rules that merge them
    • D.A Process API combines the ERP installation records with CRM customer data to produce a unified installation status
    • E.An Experience API delivers that installation status in the format the customer portal needs for its dashboard
    Show the answer and explanation
    Correct answers: A. A System API exposes installation records from the ERP so that other applications can use them without touching the ERP directly; D. A Process API combines the ERP installation records with CRM customer data to produce a unified installation status; E. An Experience API delivers that installation status in the format the customer portal needs for its dashboard
    System APIs connect directly to core systems such as ERPs and CRMs and unlock their data while shielding the systems of record. Process APIs orchestrate and combine data from multiple System APIs into reusable business logic. Experience APIs adapt that output into formats optimized for a specific interface such as a portal or mobile app. Formatting data for a mobile display is the Experience layer's job, not the System layer's. Orchestrating System APIs and applying merge rules belongs in a Process API, not an Experience API.

Designing APIs

8% of the exam
  1. Question 2 · Harder

    Cumulus Financial's APIkit project in Anypoint Studio was scaffolded from this RAML:
    #%RAML 1.0
    title: Product API
    /products:
        /{productId}:
            get:
                description: Get one product
    /reviews:
        get:
            description: List reviews
    A client calls GET /api/products/42/reviews and receives the scaffolded 404 response. What is the cause?
    • A.The productId URI parameter is not declared under uriParameters, so APIkit cannot match any path that contains it
    • B.APIkit routes nested paths only when the parent /products resource also declares a get method of its own
    • C.The request needs a productId query parameter, because APIkit cannot read values placed inside resource paths
    • D./reviews is declared at the root instead of nested under /{productId}, so the requested path is not in the specification
    Show the answer and explanation
    Correct answer: D. /reviews is declared at the root instead of nested under /{productId}, so the requested path is not in the specification
    Nested resources extend their parent's path, and here /reviews is a root resource, so the specification declares /reviews and /products/{productId} but not /products/{productId}/reviews; APIkit raises APIKIT:NOT_FOUND, mapped to 404. A URI parameter used in a path does not have to be listed under uriParameters (API Designer only warns about declared parameters that are unused). A parent resource such as /products can contain only nested resources and no methods. APIkit does validate and route URI parameters in the path, so no query parameter is needed.
  2. Question 3 · Medium

    Refer to the RAML 1.0 specification below, which has no root mediaType node:
    #%RAML 1.0
    title: Rates API
    /rates:
        get:
            responses:
                200:
                    body:
                        type: string
    API Designer reports "Payload media type is mandatory". Which change resolves the error?
    • A.Replace type: string with schema: string under the body: node of the 200 response
    • B.Move the body: node so that it sits directly under get: instead of under 200:
    • C.Add required: true to the body: node so the parser knows that a payload exists
    • D.Nest type: string under an application/json: key inside the body: node
    Show the answer and explanation
    Correct answer: D. Nest type: string under an application/json: key inside the body: node
    When a payload does not declare a media type, API Designer reports "Payload media type is mandatory"; declaring it locally with an application/json: key under body: fixes it (setting a root mediaType: application/json is the other documented fix). schema is deprecated in RAML 1.0 in favour of type and does not supply a media type. Moving the body under get: would describe a request body instead of the 200 response and still lacks a media type. A required facet does not declare a media type for the payload.

Accessing and Modifying Mule Events

10% of the exam
  1. Question 4 · Harder

    Cumulus Financial runs two Mule applications. In intake-app, a flow sets vars.traceTag and then calls scoring-app with an HTTP Request operation. A Logger at the start of the scoring-app flow writes null for #[vars.traceTag]. What should the Mule developer do so scoring-app can read the value?
    • A.Declare traceTag in a global properties file, because global values are shared across applications
    • B.Add target="traceTag" to the HTTP Request so the variable is copied into the receiving application
    • C.Send the value as an HTTP header on the request and read it in scoring-app through attributes.headers
    • D.Replace the HTTP Request with a Flow Reference to the scoring-app flow so the variables travel with it
    Show the answer and explanation
    Correct answer: C. Send the value as an HTTP header on the request and read it in scoring-app through attributes.headers
    Mule variables live on the event and are visible only in the flow that created them and in flows joined through a Flow Reference, so an HTTP call to another application starts a new event without them. Sending the value as a header puts it in the request, and the receiving listener exposes it in attributes.headers. A Flow Reference routes the event to a flow within the same Mule application, so it cannot call another app. A target stores the HTTP response in the caller and sends nothing extra. Properties files hold static configuration values, not per-event data.
  2. Question 5 · Harder

    Refer to the flow below from a Get Cloudy Consulting Mule developer:
    <flow name="ingestFlow">
        <http:listener config-ref="HTTP_Listener_config" path="/readings"/>
        <ee:transform>
            <ee:message>
                <ee:set-attributes><![CDATA[%dw 2.0
    output application/java
    ---
    {channel: "solar"}]]></ee:set-attributes>
            </ee:message>
        </ee:transform>
        <logger level="INFO" message="#[attributes.channel ++ ' ' ++ (attributes.queryParams.site default 'none')]"/>
    </flow>
    A client calls GET /readings?site=S4. What does the Logger write?
    • A.solar S4, because the transform adds the new key to the listener's existing attributes
    • B.null S4, because message attributes are read-only and a transform cannot change them
    • C.An error, because the Transform Message component can set only the payload and variables
    • D.solar none, because the script output replaces the listener's attributes
    Show the answer and explanation
    Correct answer: D. solar none, because the script output replaces the listener's attributes
    A Transform Message component can set every part of the event: ee:message can contain ee:set-payload and ee:set-attributes, and ee:variables holds ee:set-variable. Because the message is immutable, the transform returns a new message whose attributes are exactly the script output {channel: "solar"}, so queryParams is now null and the default gives none. The script output replaces the attributes rather than merging into the listener's attributes, so S4 is gone. Attributes are never edited in place, but a transform can return new ones, so the result is neither null S4 nor an error.

Structuring Mule Applications

10% of the exam
  1. Question 6 · Harder

    An AW Computing Mule developer removes <global-property name="env" value="dev"/> from the project, keeping only <configuration-properties file="${env}.yaml"/>, because every runtime now receives env as a system property at startup. Now Anypoint Studio reports errors while creating the application model for message processors that depend on these properties. What is the cause?
    • A.The placeholder must be written as #[p('env')], because ${} syntax cannot read system properties.
    • B.System properties are not supported in Anypoint Studio, so ${env} can only be resolved after the app is deployed to CloudHub.
    • C.Studio needs a default value for env to resolve metadata, and the removed global property was supplying that default.
    • D.Configuration properties files must be named <env>-properties.yaml, so the shorter name ${env}.yaml is rejected.
    Show the answer and explanation
    Correct answer: C. Studio needs a default value for env to resolve metadata, and the removed global property was supplying that default.
    The documentation states that defining a default value with a global property is required for metadata resolution in Anypoint Studio; without defaults for properties passed through the command line, Studio reports errors while creating the application model. System properties are supported in Studio through the VM arguments of a run configuration. System properties are referenced with the same ${} syntax, for example ${propertyFromJVMArg}, so the placeholder form is not the problem. The file name pattern is up to the developer, and ${env}.yaml is used in the official environment-properties example.
  2. Question 7 · Medium · Choose 2

    An AW Computing Mule app runs as a single instance on an on-premises Mule runtime. It hands orders between flows through a VM queue, and queued orders must survive a runtime crash. Which two actions should the Mule developer take? Choose 2 answers.
    • A.Make sure the published content is serializable, keeping values simple or having objects implement Serializable.
    • B.Set Max outstanding messages to 0 on the queue so the runtime writes every queued order to disk.
    • C.Replace the VM Publish with a Flow Reference that has a target variable, which saves the event to disk.
    • D.Raise the VM Listener's Number of consumers so that orders leave the queue before a crash can occur.
    • E.Set the queue's Queue type to PERSISTENT in the VM Config, because the default type is TRANSIENT.
    Show the answer and explanation
    Correct answers: A. Make sure the published content is serializable, keeping values simple or having objects implement Serializable.; E. Set the queue's Queue type to PERSISTENT in the VM Config, because the default type is TRANSIENT.
    Transient queues are faster but not reliable if the system crashes, and TRANSIENT is the default Queue type; persistent queues are reliable and, in single-instance mode, serialize the contents to disk. With persistent queues, the data must be serializable, so values should stay simple and Java objects should implement Serializable. More consumers speed up delivery but do not protect queued messages. A Flow Reference is an in-memory synchronous call and a target variable does not persist anything. Max outstanding messages controls when publishing starts to block, not whether messages survive a crash.

Building API Implementation Interfaces

7% of the exam
  1. Question 8 · Harder · Choose 2

    Ursa Major Solar implements POST /panels by hand with an HTTP Listener, without APIkit. The RAML requires status 201 on success and 503 when the database is unreachable (DB:CONNECTIVITY). Which two configurations together meet the requirement? Choose 2 answers.
    • A.Add an On Error Continue for DB:CONNECTIVITY that sets errorCode to 503, read by an error-response status expression
    • B.On the listener, set <http:error-response statusCode="#[vars.errorCode default 500]">, and add an On Error Propagate for DB:CONNECTIVITY that sets errorCode to 503
    • C.On the listener, set <http:response statusCode="201" reasonPhrase="Created">
    • D.End the flow with <set-variable variableName="httpStatus" value="201"/>, leaving the listener response settings empty
    • E.Use Set Payload to return {"status": 201} on success so the listener sends that status
    Show the answer and explanation
    Correct answers: B. On the listener, set <http:error-response statusCode="#[vars.errorCode default 500]">, and add an On Error Propagate for DB:CONNECTIVITY that sets errorCode to 503; C. On the listener, set <http:response statusCode="201" reasonPhrase="Created">
    A manually built flow controls status codes through the listener's Response and Error Response settings: a fixed 201 for success, and an error-response status expression fed by a variable that an On Error Propagate sets. On Error Continue completes the flow successfully, so the listener sends its success response (201) instead of the error response. httpStatus is only meaningful when the listener's response expression reads it, as in APIkit scaffolding, so with empty response settings the default 200 is sent. A status field in the payload only changes the body.

Using Connectors

10% of the exam
  1. Question 9 · Harder

    Refer to the DataWeave script below, which a Get Cloudy Consulting developer runs after loading customers into vars.customers with a target variable. The payload is [{"id": 1, "custId": "A"}, {"id": 2, "custId": "C"}] and vars.customers is [{"custId": "A", "name": "Ana"}, {"custId": "B", "name": "Ben"}].
    %dw 2.0
    output application/json
    ---
    payload map (o) -> {
        id: o.id,
        (vars.customers filter ($.custId == o.custId) map (c) -> {
            name: c.name
        })
    }
    What is the output?
    • A.[{"id": 1, "name": ["Ana"]}, {"id": 2, "name": []}]
    • B.[{"id": 1, "name": "Ana"}, {"id": 2}]
    • C.[{"id": 1, "name": "Ana"}]
    • D.[{"id": 1, "name": "Ana"}, {"id": 2, "name": null}]
    Show the answer and explanation
    Correct answer: B. [{"id": 1, "name": "Ana"}, {"id": 2}]
    The parentheses around the filtered map create a dynamic element: each object in the resulting array is spread into the enclosing object, so order 1 gains name: "Ana" and order 2, whose filter result is empty, gains nothing. No key is written with a null value, because an empty array adds no fields. The names are not nested as arrays, since the dynamic element contributes key-value pairs rather than an array value. The outer map still returns one object per order, so order 2 is not dropped.
  2. Question 10 · Medium

    A Get Cloudy Consulting Mule developer adds <file:read path="reports/q3.csv"/> to a flow without a config-ref, so the operation uses the connector's default configuration. Against which directory is the relative path resolved?
    • A.The working directory of the Mule runtime process that started the application
    • B.The root of the file system, because a relative path without a configuration is anchored there
    • C.The directory set by the user.home system property; if it is unset, the connector fails
    • D.The Mule application's ${app.home} directory, where src/main/resources is copied
    Show the answer and explanation
    Correct answer: C. The directory set by the user.home system property; if it is unset, the connector fails
    Relative paths are resolved against the Working Directory of the referenced configuration, and when no configuration is referenced the working directory defaults to the user.home system property; if that property is not set, the connector fails to initialize. ${app.home} is where resources are copied on deployment, but it is used only when a configuration sets it as the working directory. The runtime process's current directory and the file-system root are not documented defaults for the connector.

Processing Records

10% of the exam
  1. Question 11 · Medium

    Ursa Major Solar has a flow that wraps an HTTP Request in a For Each scope to send five invoice records, one per iteration, to a billing API. The flow has an On Error Propagate handler and no Try scope. During a test, the third invoice returns HTTP 500. What happens?
    • A.Processing stops at the third invoice and the flow's error handler runs, so the fourth and fifth invoices are not sent
    • B.All five invoices are sent because For Each collects the failures and raises one MULE:COMPOSITE_ROUTING at the end
    • C.The third invoice is skipped, the fourth and fifth are sent, and the error handler runs after the scope has finished
    • D.The third invoice is retried until the billing API accepts it, and then the fourth and fifth invoices are sent
    Show the answer and explanation
    Correct answer: A. Processing stops at the third invoice and the flow's error handler runs, so the fourth and fifth invoices are not sent
    If an element throws an error, For Each stops processing the collection and invokes the error handler, so the remaining invoices are never sent. Skipping the failed element and continuing would require a Try scope with On Error Continue inside the For Each. Completing every element and then raising MULE:COMPOSITE_ROUTING describes Parallel For Each. For Each has no built-in retry; retries need something like an Until Successful scope.
  2. Question 12 · Medium · Choose 2

    Cumulus Financial runs a Mule 4 app on CloudHub that keeps synchronization watermarks in an object store, and the team plans to switch the app to Object Store v2. Which two statements are true? Choose 2 answers.
    • A.On-premises Mule apps reach Object Store v2 through the connector's default object store.
    • B.Object Store v2 provides ACID transactions, so several workers can safely update one key in parallel.
    • C.Object Store v2 is enabled for the app in Runtime Manager by selecting the Use Object Store v2 option.
    • D.Each Object Store v2 store is limited to 100 entries, so large key sets must move to a database.
    • E.Watermarks already stored in Object Store v1 are not carried over when the app switches to v2.
    Show the answer and explanation
    Correct answers: C. Object Store v2 is enabled for the app in Runtime Manager by selecting the Use Object Store v2 option.; E. Watermarks already stored in Object Store v1 are not carried over when the app switches to v2.
    Object Store v2 is selected for a CloudHub app in Runtime Manager, and data, including watermarks, does not carry over from Object Store v1 to v2, so it should be backed up first. Object stores do not support transactional access, and Object Store v2 with multi-worker apps can show key clashes without a lock. On-premises apps can reach Object Store v2 only through the Object Store REST API. Object Store v2 allows an unlimited number of entries.

Transforming Data

10% of the exam
  1. Question 13 · Medium

    A Mule developer at Cloud Kicks adds this configuration in Anypoint Studio:
    <sub-flow name="enrichPrices">
        <set-payload value="#[payload ++ {currency: 'USD'}]"/>
    </sub-flow>
    <flow name="ordersFlow">
        <http:listener config-ref="HTTP_Config" path="/orders"/>
        <ee:transform>
            <ee:message>
                <ee:set-payload><![CDATA[%dw 2.0
    output application/json
    ---
    lookup("enrichPrices", payload)]]></ee:set-payload>
            </ee:message>
        </ee:transform>
    </flow>
    What happens when a request reaches the transform?
    • A.The transform returns the whole Mule event from the sub-flow, with its attributes and variables.
    • B.The transform returns null, because a sub-flow does not return a payload to a DataWeave caller.
    • C.The transform fails, because lookup can only call a flow and does not support calling a sub-flow.
    • D.The transform returns the sub-flow's payload with the currency field added, as a Flow Reference would.
    Show the answer and explanation
    Correct answer: C. The transform fails, because lookup can only call a flow and does not support calling a sub-flow.
    The lookup function executes a flow by name, and its reference states that it does not support calling subflows, so targeting enrichPrices fails and the developer must either make it a <flow> or use a Flow Reference. A Flow Reference can call sub-flows, which is why assuming lookup behaves the same is a trap. There is no rule that a sub-flow quietly returns null. Even when lookup succeeds, it returns only the called flow's payload, never its attributes or variables.
  2. Question 14 · Medium

    Universal Containers receives semicolon-delimited CSV files. An integration developer configures the File connector's On New File listener with outputMimeType='application/csv; separator=";"'. A later Transform Message component has the directive output application/json. What does the separator setting on the listener control?
    • A.It converts each file to JSON when the listener picks it up, so the transform only passes the payload through.
    • B.It switches the reader to streaming mode so the transform can only read the rows once and in sequence.
    • C.It sets the separator that every later CSV writer in the flow uses, including any File Write operation that writes CSV.
    • D.It tells the CSV reader how to split fields when the transform reads the payload; the JSON output comes from the directive.
    Show the answer and explanation
    Correct answer: D. It tells the CSV reader how to split fields when the transform reads the payload; the JSON output comes from the directive.
    Reader properties appended to a source's MIME type only help the format-specific reader interpret the input; MuleSoft notes that reader settings are not used to transform one format into another and do not configure the writer. The JSON output is produced by the transform's output application/json directive. The listener does not convert the file to JSON, and a CSV writer's separator is set in the writer's own output directive, not on an upstream reader. Streaming is a separate streaming=true reader property, which this configuration does not set.

Routing Events

8% of the exam
  1. Question 15 · Medium

    A Cumulus Financial Mule developer routes account updates from a legacy system that sends JSON such as {"paperless": "true"}, with the flag as a string. The router's first route uses <when expression="#[payload.paperless == true]">, but paperless updates always reach the Default route. Which expression should replace it so that the string "true" selects the route?
    • A.#[payload.paperless equals true]
    • B.#[payload.paperless === true]
    • C.#[payload.paperless = true]
    • D.#[payload.paperless ~= true]
    Show the answer and explanation
    Correct answer: D. #[payload.paperless ~= true]
    The DataWeave == operator does not coerce types, so the String "true" is not equal to the Boolean true and the expression is false. The ~= operator tries to coerce one value to the type of the other when the types differ, and the DataWeave operators reference shows ("true" ~= true) returning true. === and equals are not DataWeave operators, and a single = is not a comparison, so none of those produce a valid when condition.

Handling Errors

8% of the exam
  1. Question 16 · Easier · Choose 2

    Ursa Major Solar has a global <error-handler name="solarErrors"> in global.xml. The Mule developer needs the flows meterReadFlow and invoiceFlow to handle their errors through solarErrors. Which two configurations achieve this? Choose 2 answers.
    • A.Add a <flow-ref name="solarErrors"/> as the final processor of each of the two flows in the application.
    • B.Add a global Configuration element with defaultErrorHandler-ref="solarErrors", given that neither flow has its own handler.
    • C.Keep solarErrors in global.xml only, because every handler defined in a global configuration file applies automatically.
    • D.Add <error-handler ref="solarErrors"/> as the last element inside each of the two flows.
    • E.Copy solarErrors into a subflow and call the subflow from each flow, since subflows provide their own error handler.
    Show the answer and explanation
    Correct answers: B. Add a global Configuration element with defaultErrorHandler-ref="solarErrors", given that neither flow has its own handler.; D. Add <error-handler ref="solarErrors"/> as the last element inside each of the two flows.
    A flow can reference a global handler with <error-handler ref="solarErrors"/>, and a global Configuration element with defaultErrorHandler-ref makes the handler the default for flows that lack their own. A Flow Reference runs a flow or subflow as a normal processor, so it neither targets an error handler nor runs when an earlier processor fails. Subflows lack a built-in error handling mechanism, so they cannot host one. Defining a handler in a global file does nothing until something references it.

Debugging and Troubleshooting Mule Applications

5% of the exam
  1. Question 17 · Harder

    A Get Cloudy Consulting Mule developer adds a Mule Kernel runtime (the open-source distribution) to Anypoint Studio so that local runs match a community deployment, and selects it for a project. Run As > Mule Application works, but with Debug As > Mule Application the Mule Debugger view never shows the event and no breakpoint is hit. What is the root cause?
    • A.Mule Kernel ignores breakpoints set on the canvas, so the breakpoints must be added in the XML configuration view instead
    • B.Mule Kernel reserves the default debugger port 6666 for its own agent, so the port must be changed in the debug configuration
    • C.Mule Kernel starts the debugger only when -M-Dmule.debug.suspend=true is passed, and Studio does not pass it by default
    • D.The Studio debugger works with Enterprise Edition runtimes and does not connect to Mule Kernel runtimes at all
    Show the answer and explanation
    Correct answer: D. The Studio debugger works with Enterprise Edition runtimes and does not connect to Mule Kernel runtimes at all
    The Studio debugger works with Enterprise Edition runtimes and doesn't connect to Mule Kernel runtimes, so switching the project to Kernel removes debugger support entirely. Port 6666 is simply the debugger's default listening port; nothing documents Kernel reserving it. The mule.debug.suspend argument is an optional setting for remote debugging of a standalone server that makes Mule wait for a debugger connection; it is not a Kernel switch. Breakpoints are a Studio debugger feature, and adding them from another view would not let the debugger attach to a Kernel runtime.

Deploying and Managing APIs and Integrations

7% of the exam
  1. Question 18 · Easier

    A Cloud Kicks API instance uses the Rate Limiting: SLA-Based policy, and its Gold SLA tier requires manual approval. A partner developer requested Gold access for a new client application from Exchange, and the partner's calls are rejected. Where should the API owner act so the partner can call the API?
    • A.In Runtime Manager, add the partner's client ID and client secret to the Properties tab of the API implementation application.
    • B.In API Manager, open the API instance's Contracts page and approve the pending access request for the client application.
    • C.In Access Management, add the partner's client ID to the Connected Apps list of the environment that hosts the API instance.
    • D.In Exchange, publish a new minor version of the API asset so the pending request is re-evaluated against the updated asset.
    Show the answer and explanation
    Correct answer: B. In API Manager, open the API instance's Contracts page and approve the pending access request for the client application.
    Access requests made from Exchange for a tier that requires manual approval stay pending until someone with the right permission approves them on the API instance's Contracts page in API Manager; the SLA-based policy then accepts the client application's credentials within its tier limits. Connected Apps in Access Management grant applications access to Anypoint Platform APIs, not contracts with your API. Adding consumer credentials to the implementation's properties does not create a contract. Publishing a new asset version does not approve pending requests.

Where to go after these 18 questions

Get MuleSoft Developer exam updates by email

Occasional emails when Salesforce changes this exam, plus practice questions with full explanations.

Occasional emails about Salesforce exam changes, plus practice questions with full explanations. We'll email you to confirm. Unsubscribe anytime. See our privacy policy.

Ready for a full MuleSoft Developer practice exam?

Take a timed 60-question exam drawn from all 300 reviewed questions in the real exam's section mix, then drill the sections you miss.