EMT Practice Test

1. Question Content...


Question List

Question1: A Digital Developer is asked to optimize controller performance by lazy loading scripts as needed instead of loading a scripts at the start of the code execution.
Which statement should the Developer use to lazy load scripts?

Question2: A Digital Developer has identified that the code segment below is causing performance problems.

What should the Developer do to improve the code?

Question3: Which two items are appropriate content of custom logs implemented at checkout?
Choose 2 answers:

Question4: Which technical reports datapoint measures the performance of a controller's script execution if network factors and Web Adaptor processing is ignored?

Question5: Assume the code below is executing:

Business Manager has the configuration:
* Active Log category is "root" with log level of "info."
Given this information, what is the beginning of the filename in which the log will be written?

Question6: A Digital Developer is working in a sandbox on a site named test-site using the domain test.demandware.net.
The Developer needs to compile a url to make an Open Commerce API (OCAPI) request that returns product information.
By default, which URL format is a proper Open Commerce API for Sandbox?

Question7: A developer needs to show only car accessories when shoppers use the search term car accessoriesand exclude technology accessoriesand household accessories.
Given the above requirement, what is the recommended approach using the Search Dictionaries Dashboard?

Question8: A Digital Developer is requesting product information for an external integration. The following Open Commerce API (OCAPI) request is NOT functioning correctly:

How should the Developer change the request?

Question9: A Digital Developer has created a new PaymentForm controller that requires communication with the server and must be made using the HTTPS protocol.
Which code sample should the Developer use to make sure that HTTPS is used?

Question10: A Digital Developer has been given a requirement to add fault tolerance to an existing web service integration that uses Service Framework. Administrators at Universal Containers need to be able to configure the timeout and rate limiting.
Which approach should the Developer use to implement the requirement?

Question11: A Storefront is designed so that multiple pages share a common header and footer layout.
Which ISML tag should a developer use on the templates for these pages to avoid code repetition in the most effective way?

Question12: A Digital Developer is requesting product information for an external integration. The following Open Commerce API (OCAPI) request is NOT functioning correctly:

How should the Developer change the request?

Question13: A developer set up a new site with Taxation: Net. However, the business requirements changed and the site now needs to be Taxation:Gross. The Business Manager interface does not give this option.
Which sequence of steps is necessary to change the site to gross taxation?

Question14: Business Manager has the configuration:
* Active Log category is "root"
* Log level of WARN
The code below is executing:
var log = Logger.getLogger("products");
Using this information, which two logs will be written? (Choose two.)

Question15: To ensure SFRA best practices and protect against request forgery, the developer introduced CSRF token generation in the customer address form:
<form ... action = "submit">
<input name ="${dw.web.CSRFProtection.getTokenName()}"
value = "${dw.web.CSRFProtection.generateToken()">
...
<the rest of the Form fields>
...
</form>
To implement CSRF protection when the form is submitted, the developer needs to introduce the CSRF validation using one or both of these methods as applicable:
* validateRequest
* validateAjaxRequest
Where in the code does the developer need to add this CSRF validation check?

Question16: A developer has a specification to integrate with a REST API for retrieving traffic conditions. The service expects parameters to be form encoded.
Which service type should the developer register?

Question17: Which three operations should be done in a controller?
Choose 3 answers

Question18: A Digital Developer wants to selectively retrieve products and process them from an iPhone.
Which action should the Developer take, given that JavaScript controllers CANNOT be used?

Question19: Universal Containers sells physical gift cards for the holidays.
What needs to occur to guarantee the cards will always be available?

Question20: A Digital Developer needs to add logging to the following code:

Which statement logs the HTTP status code to a debug-level custom log file?

Question21: The following code ensures that an address ID CANNOT be used if it is already in use by another address in the customer's address book. There is a problem with the code. The error message for an invalid address ID is never shown to the user on the form field.

How should the Digital Developer resolve this issue so that the error message is displayed on the address ID form field?

Question22: A business user wants to add a link to a content page from within the body of another content asset. The target content asset ID is: terms-and-conditions.
Which link function generates the correct link?

Question23: The following sample code is NOT providing the desired results. The Digital Developer needs to add an entry to the logs to debug the problem.

Which statement correctly adds a log entry?

Question24: Which code sample is required to use a custom tag provided in SiteGenesis in an ISML template?

Question25: A developer needs to update the package.json file so that it points to the hock file for a cartridge, using the hooks keyword. Which snippets work correctly when added to the file?:

Question26: Which line of code creates a content slot that can be included on homepage.ismlto display on the home page?

Question27: A merchant wants customers to be able to order gift vouchers via their site. Since they can issue an unlimited number of these digital vouchers, this item should be available to sell at all items.
How can a developer use Business Manager to ensure that the gift vouchers are always available?

Question28: A job executes a pipeline that makes calls to an external system.
Which two actions prevent performance issues in this situation? (Choose two.)

Question29: A client has custom object definition and requirement that occasional data changes in staging also need to exist in production, Which task should the developer perform to meet these requirements when setting up the custom object?

Question30: A Digital Developer noticed that cartridges in their workspace are NOT executing. The Developer confirms that the cartridges are uploaded to the B2C Commerce server connection's target version directory.
Which action potentially solves this problem?

Question31: A developer is writing a server side script that needs to maintain state across calls. The persistent information needed includes these items.
* The current customer
* Whether or not the customer is authenticated
* The privacy attributes (such as tracking consent or cookie policy)
Which technique should the developer use to maintain state in an efficient and scalable manner that follows best practice?

Question32: A Digital Developer needs to add a new form to the shopping cart page to allow customers to enter their rewards pass ID. There is already an existing Cart.jscontroller that handles processing of the other cart forms. In addition, a form field node is in the form XML and the necessary form input is present in the ISML template.
The code below is the submit button for the ISML markup.

What additional steps must occur before the Digital Developer can begin writing the processing code for this request?

Question33: Consider the following information:
* A merchant has this three-tier category structure setup in the Storefront catalog.
- New Arrivals > Women > Clothing
* The category named Clothing has all the clothing items for Women and is merchandised.
* A Search Refinement named Newness is correctly configured for the Clothing category.
When a merchandiser views the Clothing category, the Search Refinement appears and works as expected.
However, the merchandiser does not see the Search Refinement when searching for Clothing via the Storefront search.
What is the reason?

Question34: A developer configures the dw.json file and needs to fill in the necessary parameters to complete the task.
Which three parameters are required when using npm scripts? (Choose three.)

Question35: To ensure SFRA best practices and protect against request forgery, the developer introduced CSRF token generation in the customer address form.

To implement CSRF protection when the form is submitted, the developer needs to introduce the CSRF validation using one or both of these methods as applicable:
* validateRequest
* validateAjaxRequest
Where in the code does the developer need to add this CSRF validation check?

Question36: A Digital Developer has a new requirement to disable the "Discover" credit card type for all checkouts.
What does the Developer need to change in Business Manager to fulfill this requirement?

Question37: A developer working on a multi-country site is asked to store country-specific data that drives the creation of a country selector. Examples of the data stored are:
* Pricebook to be used
* Image URL for country flag
The data used in staging also applies in production, but only for this site.
Which approach should the developer take to implement these requirements?

Question38: A Digital Developer is working on a multi-site realm. A new site requires a different layout for the account landing page. The business logic and data model remain the same. The existing code is in AccountControl.js and accountlanding.isml in the app_storefront cartridge. The app_storefront cartridge contains code for all other business functions. The cartridge path for the new site is currently int_cybersource:int_paypal:app_storefront.
The Developer creates a new cartridge named app_newsite that contains only the accountlanding.isml template for the new site.
Which modification should be made to the new cartridge path?

Question39: In order to build the SFRA code to a developer sandbox for the first time, which build steps should the developer perform for the site to appear and function as designed?

Question40: Universal Containers recently completed updates to their storefront shopping cart page. A problem has been discovered since the update. Users are no longer able to submit coupon codes on this page. Additionally, authenticated users who try to add a coupon are logged out.
The following processing code is found in the Cart.js controller file:

What should the Developer verify to identify the issue?

Question41: A developer needs to show only car accessories when shoppers use the search term car accessories and exclude technology accessories and household accessories.
Given the above requirement, what is the recommended approach using the Search Dictionaries Dashboard?

Question42: Given the requirements:
* To integrate with an external web service using HTTP requests.
* To create a service for this purpose with the Service framework using the LocalServiceRegistry class.
* To test the service before the external service provider makes the API available.
Which solution allows the developer to satisfy the requirements?

Question43: A developer wants to create in Business Manager extension with the cartridge named plugin_vm_extension.
Which two steps should the developer take for the extension option to show up in Business Manager?Choose 2 answers:

Question44: A Digital Developer is working on a project to convert a pipeline to a JavaScript controller. UX Studio has a functioning pipeline debugger configured for the site. Assume the Developer will add a breakpoint to the controller when it is written.
What must be done in order to use the debugger with the new controller when it is written?

Question45: A Digital Developer is requesting product information for an external integration. The following Open Commerce API (OCAPI) request is NOT functioning correctly:

How should the Developer change the request?

Question46: Universal Containers has expanded its implementation to support German with a locale code of de. The current resource bundle is checkout.properties.
To which file should the developer add German string values?

Question47: A Digital Developer is implementing an Open Commerce API call to add products to a basket. Given the following resource configuration:

Which modification allows the requests to successfully execute?

Question48: Assume the code below is executing:

Business Manager has the configuration:
* Active Log category is "root" with log level of "info."
Given this information, what is the beginning of the filename in which the log will be written?

Question49: A merchant asks a developer to create a Cache Partition for the home page, so that when the home page is edited, only the home page is cleaned.
Given the above requirement, where should the developer create that partition in Business Manager?

Question50: Which three object types can a developer import using the Merchant Tools > Content > Import & Export module in Business Manager? (Choose three.)

Question51: A digital instance has one site, with one master product catalog separate from the site catalog. Some, but NOT all, products in the master catalog are assigned to categories of the site catalog.

Question52: A Digital Developer added a file named MyBusinessController. js in the cartridge named app_project. The project design calls for this new file to override MyBusinessControiier.3s in claient_project. The client_project cartridge contains other necessary functionality. Additional functionality is also included in the storefront_core and storefront_controliers cartridges.
Which cartridge path meets the project requirements?

Question53: A retailer notices that the Account Addresses page is showing the wrong shopper's address.
Which tool should the developer start with to identify the issue?

Question54: Universal Containers has expanded its implementation to support German with a locale code of de. The current resource bundle is checkout.properties.
To which file should the developer add German string values?

Question55: In Log Center, a developer notes a number of Cross Site Request Forgery (CSRF) log entries. The developer knows that this happens when a CSRF token is either not found or is invalid, and is working to remedy the situation as soon as possible.
Which two courses of action might solve the problem? (Choose two.)

Question56: A Digital Developer has Identified that the code segment below is causing performance problems.

What should the Developer do to improve the code?

Question57: Given the file structure below, which ISML method call renders the customLandingPage template?

Question58: Universal Containers sells physical gift cards for the holidays.
What needs to occur to guarantee the cards will always be available?

Question59: A business user wants to add a link to a content page from within the body of another content asset. The target content asset ID is: terms-and-conditions.
Which link function generates the correct link?

Question60: A Digital Developer needs to add a new form to the shopping cart page to allow customers to enter their rewards pass ID. There is already an existing Cart.js controller that handles processing of the other cart forms.
In addition, a form field node is in the form XML and the necessary form input is present in the ISML template.
The code below is the submit button for the ISML markup.

What additional steps must occur before the Digital Developer can begin writing the processing code for this request?

Question61: Universal Containers recently completed updates to their storefront shopping cart page. A problem has been discovered since the update. Users are no longer able to submit coupon codes on this page. Additionally, authenticated users who try to add a coupon are logged out.
The following processing code is found in the Cart.js controller file:

What should the Developer verify to identify the issue?

Question62: A developer is working on a new site for the U.S based on an existing Canadian site. One of the requirements is a change to the address form. The current Canadian form has an <options> list with the correct two-letter abbreviation for the provinces.
The U.S. requirements are to:
* Have an <options> list with the correct two-letter abbreviation for the states in place of the province field.
* Set the U.S site locale.
* Add the options list field definition to the XML file.
How should the developer set up the files before making the required edits?

Question63: Given the following conditions:
* Site export file with a copy of the Storefront data for a custom site
* Sandbox with the custom site code, but no Storefront data
* Requirement for a working copy of SFRA for development reference
A developer is assigned the following Business manager tasks:
* A. Import the custom Site using Site Import/Export
* B. Import the SFRA Demo Sites using Site Import/Export
* C. Rebuild the custom Site search indexes
In what sequence should the developer perform the tasks, so that the custom Site displays the products as intended?

Question64: A developer has a sandbox configured with a service and its profile and credential.. Now there is a requirement to allow changes to the service URL manually from the sandbox.
Which B2C feature should the developer use to achieve the request?

Question65: A developer wants to create in Business Manager extension with the cartridge named plugin_vm_extension.
Which two steps should the developer take for the extension option to show up in Business Manager?Choose 2 answers:

Question66: A Digital Developer has detected storefront pages being rendered with an error message. After inspecting the log files, the Developer discovered that an enforced quota is being exceeded.
What action should the Developer take to stop the quota violation?

Question67: When inspecting the weekly service status report for a critical internally hosted web service used in the application, a developer notices that there are too many instances of unavailability.
Which two solutions can reduce the unavailability of the service?
Choose 2 answers.

Question68: Given the following snippet:
* Server.append( 'Show' , function (req, res, next) )
According to SFRA, which two options shows a correct way to complete the code above in order to provide data to the response using a controller?
Choose 2 answers

Question69: A Digital Developer has identified that the code segment below is causing performance problems.

What should the Developer do to improve the code?

Question70: The developer created a new Storefront category in storefront-catalog-m-en, but when viewing the Storefront site, the category is not visible.
What are two possible reasons? (Choose two.)

Question71: A Digital Developer wants pass control to an ISML template from a JavaScript Controller and load product on the pipeline dictionary with the name myProduct.
Which code sample will achieve this?

Question72: Universal Containers calls the following combination of products "The Basics" and sells the combination as a unique product ID:
* One Model 103 container
* Five Model 611 container
* Tree Model 201 container
The Developer created these three products in the catalog.
What is the next step in Business Manager to create "The Basics" as a combination?

Question73: A Digital Developer is requesting product information for an external integration. The following Open Commerce API (OCAPI) request is NOT functioning correctly:

How should the Developer change the request?

Question74: A client uses tax tables in Business Manager to calculate tax. They recently started shipping to a new country, Italy, and the tax is not being calculated correctly on the Storefront.
What is the likely problem?

Question75: A Digital Developer is implementing an Open Commerce API call to add products to a basket. Given the following resource configuration:

Which modification allows the requests to successfully execute?

Question76: A Digital Developer needs to check for product inventory in a specific inventory list using the Open Commerce API.
An example request URL is:

Which resource_id value enables the appropriate resource?

Question77: A Digital Developer is working in a sandbox on a site named test-siteusing the domain test.demandware.net. The Developer needs to compile a url to make an Open Commerce API (OCAPI) request that returns product information.
By default, which URL format is a proper Open Commerce API for Sandbox?

Question78: An instance has custom logging enabled. The log reaches the file size limit.
What happens in this situation?

Question79: Universal Containers created a site export file from staging in the global export directory.
How should the Digital Developer update their sandbox using this staging site export file?

Question80: A developer is importing edits for two different sites into the same sandbox, and is provided with four different files.
Which two XML files should the developer import using the site-specific Merchant Tools import modules, instead of the Administration section import modules?
Choose 2 answers.

Question81: A retailer notices that the Account Addresses page is showing the wrong shopper's address.
Which tool should the developer start with to identify the issue?

Question82: What happens if the log file size limit is reached in custom logging?

Question83: A developer working on a simple web service integration is asked to add appropriate logging to allow future troubleshooting.
According to logging best practices, which code should the developer write to log when an operation succeeds, but has an unexpected outcome that may produce side effects?

Question84: Given the requirements:
* To show the washing instructions for a clothing product on a dedicated section the detail page
* Washing instructions come from the product information manager(PIM)
* To have this attribute available to localize in the Storefront.
Which action meets these requirements?

Question85: A Digital Developer is working on a multi-site realm. A new site requires a different layout for the account landing page. The business logic and data model remain the same. The existing code is in AccountCoatrol.-s and accountlanding.isul in the app_at storefront cartridge The app_3torefront cartridge contains code for all other business functions. The cartridge path for the new site is currently int_cybersource:
mc_];aypal:app_storefront.
The Developer creates a new cartridge named app_newsire that contains only the accountlanding.isml template for the new site.
Which modification should be made to the new cartridge path?

Question86: Given a customer environment configured with only the en_CA locale and the following new requirements:
* To add a new locale for fr_CA
* To localize the address form with the new locale
* To make the localization usable even for new possible French locales, such as fr_FR And given the portion of form XML definition contained in the form file cartridge/forms/default/ address.xml:

What is the right place to add the fr_CA translation for the country field label?

Question87: A Digital Developer is working on a project to convert a pipeline to a JavaScript controller. UX Studio has a functioning pipeline debugger configured for the site. Assume the Developer will add a breakpoint to the controller when it is written.
What must be done in order to use the debugger with the new controller when it is written?

Question88: A developer is asked to improve the maintainability of a page by reducing its code repetition.
What are two techniques the developer should implement to achieve this?
Choose 2 answers.

Question89: A Digital Developer is inspecting the weekly service status report for a critical internally-hosted web service used in the application and notices that there are too many instances of unavailability.
Which two solutions are possible options to reduce the unavailability of the service? (Choose two.)

Question90: A Digital Developer suspects a logical error in a script.
Which action will help locate the error?

Question91: Universal Containers calls the following combination of products "The Basics" and sells the combination as a unique product ID:
* One Model 103 container
* Five Model 611 container
* Tree Model 201 container
The Developer created these three products in the catalog.
What is the next step in Business Manager to create "The Basics" as a combination?

Question92: Why should a Digital Developer use ProductSearchModel.getProducts() instead of Category.getOnlineProducts() to access products?

Question93: A developer wants to add a link to the My Account Page.
What is the correct code to accomplish this?

Question94: The following sample code is NOT providing the desired results. The Digital Developer needs to add an entry to the logs to debug the problem.

Which statement correctly adds a log entry?

Question95: A Digital Developer added a file named MyBusinessController.jsin the cartridge named app_project.
The project design calls for this new file to override MyBusinessController.js in client_project. The client_projectcartridge contains other necessary functionality. Additional functionality is also included in the storefront_coreand storefront_controllerscartridges.
Which cartridge path meets the project requirements?

Question96: A Digital Developer has detected storefront pages being rendered with an error message. After inspecting the log files, the Developer discovered that an enforced quota is being exceeded.
What action should the Developer take to stop the quota violation?

Question97: Given the requirements:
* To integrate with an external web service using HTTP requests
* To create a service for this purpose with the Service framework using the LocalServiceRegistry class.
* To test the service before the external service provider makes the API available Which solution allows the developer to satisfy the requirements?