ExamGecko
Question list
Search
Search

List of questions

Search

Related questions











Question 30 - AD0-E722 discussion

Report
Export

An Adobe Commerce Architect is reviewing API-functional test code. Some tests send errors to indicate that the customer address does not exist. The test codes show the following:

Which step should the Architect take to fix the test errors?

A.
Change the annotation to Use@magentoApiDataFixture Magento/Customer/_files/ instead Or dmagentoDataFixture Magento/Customer/_files/customer_one_address.php
Answers
A.
Change the annotation to Use@magentoApiDataFixture Magento/Customer/_files/ instead Or dmagentoDataFixture Magento/Customer/_files/customer_one_address.php
B.
Set the annotation to USe AmagentoPersistDataFixture Magento/Cu5tomer/_f iles/custcwer_one_address.php instead Of @magentoDataFixture Magento/Customer/_f iles/customer_one_address.php
Answers
B.
Set the annotation to USe AmagentoPersistDataFixture Magento/Cu5tomer/_f iles/custcwer_one_address.php instead Of @magentoDataFixture Magento/Customer/_f iles/customer_one_address.php
C.
Update the annotation to Specify addreSSjd niagentoDataFixture Magento/Customer/_files/customer_one_address.php with:{Maddress_id':'$address.id$'}
Answers
C.
Update the annotation to Specify addreSSjd niagentoDataFixture Magento/Customer/_files/customer_one_address.php with:{Maddress_id':'$address.id$'}
Suggested answer: B

Explanation:

The issue is being caused by the use of @magentoDataFixture annotation, which creates a temporary data fixture that is rolled back after each test execution1. This means that the customer address created by the fixture is not persisted in the database and cannot be retrieved by subsequent tests.To fix this, the Architect should use @magentoPersistDataFixture annotation, which creates a permanent data fixture that is not rolled back after each test execution2. This way, the customer address created by the fixture will be persisted in the database and can be accessed by subsequent tests.Changing the annotation to use @magentoApiDataFixture or specifying address_id in the annotation will not solve the issue, as they are not related to the persistence of the data fixture3.Reference:Data fixtures,Persistent data fixtures,API-functional tests

asked 02/10/2024
Tom Ogan
34 questions
User
Your answer:
0 comments
Sorted by

Leave a comment first