QuestionQ28

VerifiedUtilize Commerce test frameworks throughout the whole workflow

An Adobe Commerce Architect is reviewing API-functional test code. Some tests return errors indicating that the customer address does not exist.

The test code shows the following:

Question Image

Which action should the Architect take to resolve the test errors?

Explanation

API-functional tests must use @magentoApiDataFixture for data that the Web API request needs to access. A standard @magentoDataFixture is applied within the integration-test transaction, whereas the API request runs through the application separately and can fail to find the transaction-scoped customer address. Adobe Commerce API-functional test examples annotate required fixture files with @magentoApiDataFixture.

Learn more

Community Discussion

No comments yet. Be the first to start the discussion!