magento / magento2-functional-testing-framework

Magento2 Functional Testing Framework
Other
155 stars 132 forks source link

Entity with a CreateDataKey of createSimpleProduct could not be found #892

Open Manjula-kalyan opened 2 years ago

Manjula-kalyan commented 2 years ago

Preconditions

  1. Used below code in the script
    <after>
        <deleteData createDataKey="createCategory" stepKey="deleteCategory"/>
        <deleteData createDataKey="createSimpleProduct" stepKey="deleteProduct"/>
        <deleteData createDataKey="createCustomer" stepKey="deleteCreatedCustomer"/>
    </after>

Steps to reproduce

  1. craeted sample catgory and product with the following code
    <after>
        <deleteData createDataKey="createCategory" stepKey="deleteCategory"/>
        <deleteData createDataKey="createSimpleProduct" stepKey="deleteProduct"/>
        <deleteData createDataKey="createCustomer" stepKey="deleteCreatedCustomer"/>
    </after>

    2.generated test

  2. runned the mftf script

Expected result

  1. execute without any error

Actual result

Test tests/functional/Magento/_generated/NestleSmokeTestSuite/ReviewLoggedInUserTestCest.php:ReviewLoggedInUserTest

[Magento\FunctionalTestingFramework\Exceptions\TestReferenceException] Entity with a CreateDataKey of createSimpleProduct could not be found

Scenario Steps:

  1. $I->deleteEntity("createSimpleProduct","hook") at tests/functional/Magento/_generated/NestleSmokeTestSuite/ReviewLoggedInUserTestCest.php:42
  2. $I->deleteEntity("createCategory","hook") at tests/functional/Magento/_generated/NestleSmokeTestSuite/ReviewLoggedInUserTestCest.php:41
  3. $I->saveScreenshot() at tests/functional/Magento/_generated/NestleSmokeTestSuite/ReviewLoggedInUserTestCest.php:52
  4. $I->createEntity("createSimp...","hook","SimpleProduct",["createCat...],[]) at tests/functional/Magento/_generated/NestleSmokeTestSuite/ReviewLoggedInUserTestCest.php:31
  5. $I->createEntity("createCategory","hook","_defaultCategory",[],[]) at tests/functional/Magento/_generated/NestleSmokeTestSuite/ReviewLoggedInUserTestCest.php:30

1 /home/manjulakalyan/www/magento2/src/vendor/magento/magento2-functional-testing-framework/src/Magento/FunctionalTestingFramework/DataGenerator/Handlers/PersistedObjectHandler.php:228

2 /home/manjulakalyan/www/magento2/src/vendor/magento/magento2-functional-testing-framework/src/Magento/FunctionalTestingFramework/DataGenerator/Handlers/PersistedObjectHandler.php:145

3 /home/manjulakalyan/www/magento2/src/vendor/magento/magento2-functional-testing-framework/src/Magento/FunctionalTestingFramework/Module/MagentoActionProxies.php:103

4 Magento\FunctionalTestingFramework\Module\MagentoActionProxies->deleteEntity

5 /home/manjulakalyan/www/magento2/src/vendor/magento/magento2-functional-testing-framework/src/Magento/FunctionalTestingFramework/_generated/AcceptanceTesterActions.php:3578

6 /home/manjulakalyan/www/magento2/src/dev/tests/acceptance/tests/functional/Magento/_generated/NestleSmokeTestSuite/ReviewLoggedInUserTestCest.php:42

7 Magento\AcceptanceTest_NestleSmokeTestSuite\Backend\ReviewLoggedInUserTestCest->_after

m2-assistant[bot] commented 2 years ago

Hi @Manjula-kalyan. Thank you for your report. To speed up processing of this issue, make sure that you provided sufficient information.

Add a comment to assign the issue: @magento I am working on this