Warning: file_get_contents(/data/phpspider/zhask/data//catemap/9/csharp-4.0/2.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Magento 2.3 执行MFTF自定义测试时,XML错误中未定义测试_Magento 2.3 - Fatal编程技术网

Magento 2.3 执行MFTF自定义测试时,XML错误中未定义测试

Magento 2.3 执行MFTF自定义测试时,XML错误中未定义测试,magento-2.3,Magento 2.3,我试图在MFTF2.3.14和Magento 2.3.1中创建一个自定义测试用例。我正在使用StorefrontPersistedCustomerLoginTest.xml作为模板,通过发送电子邮件和密码字段的空字符串并验证错误消息,尝试自定义测试StorefrontLoginRequiredFieldTest.xml。当我试着运行测试时,我得到了以下错误 In TestObjectHandler.php line 81: Test StorefrontLoginRequiredField

我试图在MFTF2.3.14和Magento 2.3.1中创建一个自定义测试用例。我正在使用
StorefrontPersistedCustomerLoginTest.xml
作为模板,通过发送电子邮件和密码字段的空字符串并验证错误消息,尝试自定义测试
StorefrontLoginRequiredFieldTest.xml
。当我试着运行测试时,我得到了以下错误

In TestObjectHandler.php line 81:

  Test StorefrontLoginRequiredFieldTest not defined in xml.
我已经在下面创建了自定义测试

/var/www/html//var/www/html/magtiretest/app/code/ISNEZTire/login- 
  module/Test/Mftf.
  • 我尝试了现有的工作测试用例
    StorefrontPersistedCustomerLoginTest.xml
    ,只是更改了 测试(除测试名称外的内容与现有测试相同)并运行。 使用新名称,即使现有的测试用例也无法工作

  • 而不是将自定义测试保留在新文件夹中
    /var/www/html//var/www/html/magtiretest/app/code/ISNEZTire/login-
    module/Test/Mftf
    ,我将其保存在现有工作测试所在的文件夹中

  • 仍然得到:

    In TestObjectHandler.php line 81:
    
       Test StorefrontLoginRequiredFieldTest not defined in xml.
    
    .env文件

    MAGENTO_BASE_URL=http://99.33.111.248/magtiretest/
    MAGENTO_BACKEND_NAME=admin
    MAGENTO_ADMIN_USERNAME=admin
    MAGENTO_ADMIN_PASSWORD=admin@123
    BROWSER=chrome
    //TESTS_BP=~/magtiretest/dev/tests/acceptance/tests/functional
    //FW_BP=~/magtiretest/vendor/magento/magento2-functional-testing- 
    framework
    //FW_BP=~/magento/magento2-functional-testing-framework
    //MODULE_WHITELIST=Magento_Framework,Magento_ConfigurableProductWishlist,
      Magento_ConfigurableProductCatalogSearch,Magento_login-module
      MODULE_WHITELIST=Magento_login-module,Magento_Framework
      CUSTOM_MODULE_PATHS=/var/www/html/magtiretest/app/code/ISNEZTire/login- 
      module
      SELENIUM_HOST=SELENIUM_HOST=127.0.0.1
      SELENIUM_PORT=4444
      SELENIUM_PROTOCOL=http
      SELENIUM_PATH=/wd/hub
    
    我也尝试了所有被注释的配置

    尝试使用:

    vendor/bin/mftf run:test StorefrontLoginRequiredFieldTest --remove --force
    
    尝试使用:

    vendor/bin/mftf run:test StorefrontLoginRequiredFieldTest --remove --force