Adobe AD0-E718 Practice Test - Questions Answers, Page 4
List of questions
Question 31

An Architect wants to create an Integration Test that does the following:
• Adds a product using a data fixture
• Executes $this->someLogic->execute($product) on the product
• Checks if the result is true.
Sthis->someLogic has the correct object assigned in the setup () method-Product creation and the tested logic must be executed in the context of two different store views with IDs of 3 and 4, which have been created and are available for the test.
How should the Architect meet these requirements?
Explanation:
The best approach for the Architect to meet the requirements is Option B. Create two test Classes With one test method each. Use the @magentoExecuteInStoreContext 3 and @magentoExecuteInStoreContext 4 annotations on the class level. This will ensure that the fixture is executed in the context of Store View 3, and the tested logic is executed in the context of Store View 4. This approach allows for more granular control of the store views and reduces the complexity of the test.
Question 32

An Adobe Commerce Architect notices that the product price index takes too long to execute. The store is configured with multiple websites and dozens of customer groups.
Which two ways can the Architect shorten the full price index execution time? (Choose two.)
Explanation:
The two best ways the Architect can shorten the full price index execution time are Option A. Enable price index customer group merging for products without tier prices, and Option D. Set MaGEINDEXERTHREADS_COUNT environment variable to enable parallel mode. Enabling customer group merging will help reduce the number of customer groups that need to be processed, while setting the environment variable will allow the indexer to use multiple threads and run in parallel mode, thus reducing the overall execution time.
Question 33

A custom cron job has been added to an Adobe Commerce system to collect data for several reports.
Its crontab. xml configuration is as follows:
The job is data intensive and runs for between 20 and 30 minutes each night.
Within a few days of deployment, it is noticed that the site's sitemap. xml file has not been updated since the new job was added.
What should be done to fix this issue?
Explanation:
This will ensure that the reporting job runs in its own process, separate from other cron jobs, and will not interfere with the sitemapgenerate cron job. This will ensure that the sitemapgenerate cron job runs as soon as the reporting job is finished, ensuring that the sitemap.xml is always up to date.
Question 34

A merchant is utilizing an out-of-the-box Adobe Commerce application and asks to add a new reward card functionality for customers. During the code review, the Adobe Commerce Architect notices the reward_card_number attribute setup created for this functionality is causing the customer attribute to be unavailable in the My account/My rewards page template.
What should be added to set the customer attribute correctly?
Question 35

An Architect agrees to improve company coding standards and discourage using Helper classes in the code by introducing a new check with PHPCS.
The Architect creates the following:
• A new composer package under the AwesomeAgency\CodingStandard\ namespace
• The ruleset. xml file extending the Magento 2 Coding Standard
What should the Architect do to implement the new code rule?
A)
B)
C)
Question 36

A developer needs to uninstall two custom modules as well as the database data and schemas. The developer uses the following command: bin/magento module:uninstall Vendor_SampleMinimal Vendor_SampleModifyContent When the command is run from CLI, the developer fails to remove the database schema and data defined in the module Uninstall class.
Which three requirements should the Architect recommend be checked to troubleshoot this issue?
(Choose three.)
Explanation:
To troubleshoot the issue, the Architect should check that the remove-schema and --remove-data options are specified as arguments for the CLI command, that the Uninstall class defines the uninstallData() and uninstallSchema() methods, and that the invoked uninstall() method is implemented in the Uninstall class.
Question 37

The development of an Adobe Commerce website is complete. The website is ready to be rolled out on the production environment.
An Architect designed the system to run in a distributed architecture made up of multiple backend webservers that process requests behind a Load Balancer.
After deploying the system and accessing the website for the first time, users cannot access the Customer Dashboard after logging in. The website keeps redirecting users to the sign-in page even though the users have successfully logged in. The Architect determines that the session is not being saved properly.
In the napp/etc/env.php\ the session is configured as follows:
What should the Architect do to correct this issue?
Question 38

An Adobe Commerce Architect runs the PHP Mess Detector from the command-line interface using the coding standard provided with Adobe Commerce. The following output appears:
The Architect looks at the class and notices that the constructor has 15 parameters. Five of these parameters are scalars configuring the behavior of Kyservice.
How should the Architect fix the code so that it complies with the coding standard rule?
Question 39

An Architect needs to review a custom product feed export module that a developer created for a merchant. During final testing before the solution is deployed, the product feed output is verified as correct. All unit and integration tests for code pass.
However, once the solution is deployed to production, the product price values in the feed are incorrect for several products. The products with incorrect data are all currently part of a content staging campaign where their prices have been reduced.
What did the developer do incorrectly that caused the feed output to be incorrect for products in the content staging campaign?
Question 40

An Adobe Commerce Architect needs to ensure zero downtime during the deployment process of Adobe Commerce on-premises. Which two steps should the Architect follow? (Choose two.)
Question