Skip to content

Test not defined in XML error - TestObjectHandler.php line 81 #347

Closed
@JayaDhantu

Description

@JayaDhantu

I am using StorefrontPersistedCustomerLoginTest.xml as a template and trying the custom test StorefrontLoginRequiredFieldTest.xml by just sending empty string for email and password field and validating the error messages. When I try running the test, I am getting below error.

In TestObjectHandler.php line 81:

Test StorefrontLoginRequiredFieldTest not defined in xml.

I have attached the steps with screen shots to reproduce the issue. I want use the tests under various modules from {magento_root}/vendor/magento folder and use mftf command. Please guide me the correct way of setting .env file and create custom test.

Preconditions

  1. Selenium - 3.141, Chrome version is 73x and chromedriver is ChromeDriver 73.0.3683.86
  2. Magento 2.3.1 and MFTF 2.3.14
    Steps to reproduce issue.docx

Steps to reproduce

  1. In the test (StorefrontPersistedCustomerLoginTest), passing empty string for email and password and validating the error message. The new test name is StorefrontLoginRequiredFieldTest.xml .
    I am creating the custom test cases under the folder /var/www/html//var/www/html/magtiretest/app/code/ISNEZTire/login-module/Test/Mftf
  2. Created StorefrontCustomerSignInFormSection.xml in Section folder
  3. Ran new test using the Command - vendor/bin/mftf run:test StorefrontLoginRequiredFieldTest --remove

Expected result

  1. Test should pass

Actual result

  1. [Logs, Errors]
    In TestObjectHandler.php line 81:

Test StorefrontLoginRequiredFieldTest not defined in xml.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions