magento / magento2-functional-testing-framework

Magento2 Functional Testing Framework
Other
155 stars 133 forks source link

Load URL with Basic Http Authentication in MFTF #891

Closed jithinkmatthew closed 2 years ago

jithinkmatthew commented 2 years ago

Preconditions

Steps to reproduce

I am trying to load a server URL with Basic Http Authentication. Given environment details in .env and executed the test case.

MAGENTO_BASE_URL=https://admin:admin@magento2.test/
MAGENTO_BACKEND_NAME=admin
MAGENTO_ADMIN_USERNAME=test.qa
MAGENTO_ADMIN_PASSWORD=Magento@12345
SELENIUM_CLOSE_ALL_SESSIONS=true
BROWSER=chrome
MODULE_ALLOWLIST=Magento_Framework,ConfigurableProductWishlist,ConfigurableProductCatalogSearch
BROWSER_LOG_BLOCKLIST=other
ELASTICSEARCH_VERSION=7

Expected result

Basic Http Authentication pop up should not display when running the test and it should run without any error.

Actual result

Getting the following error in the console

qa@BGHPE:~/www/magento2/src$ vendor/bin/mftf run:test CreateNewAccountTest --remove --force

Generate Tests Command Run

Codeception PHP Testing Framework v4.1.31 https://helpukrainewin.org/
Powered by PHPUnit 9.5.20 #StandWithUkraine

Magento\FunctionalTestingFramework.functional Tests (1) ------------------------
Modules: \Magento\FunctionalTestingFramework\Module\MagentoWebDriver, \Magento\FunctionalTestingFramework\Module\MagentoSequence, \Magento\FunctionalTestingFramework\Module\MagentoAssert, \Magento\FunctionalTestingFramework\Module\MagentoActionProxies, Asserts, \Magento\FunctionalTestingFramework\Helper\HelperContainer
--------------------------------------------------------------------------------
CreateNewAccountTestCest: Create new account test
Signature: Magento\AcceptanceTest\_default\Backend\CreateNewAccountTestCest:CreateNewAccountTest
Test: tests/functional/Magento/_generated/default/CreateNewAccountTestCest.php:CreateNewAccountTest
Scenario --
create customer
[openCreateAccountPage] StorefrontOpenCustomerAccountCreatePageActionGroup
  [goToCustomerAccountCreatePage] am on page "/customer/account/create/"
 ERROR

--------------------------------------------------------------------------------

Time: 00:31.139, Memory: 22.00 MB

There was 1 error:

---------
1) CreateNewAccountTestCest: Create new account test
 Test  tests/functional/Magento/_generated/default/CreateNewAccountTestCest.php:CreateNewAccountTest

  [Facebook\WebDriver\Exception\WebDriverCurlException] Curl error thrown for http POST to /session/8230a614add747b296a2888bc443fedb/url with params: {"url":"https://admin:admin@magento2.test/"}

Operation timed out after 30001 milliseconds with 0 bytes received

Scenario Steps:

 3. $I->amOnPage("/customer/account/create/") at tests/functional/Magento/_generated/default/CreateNewAccountTestCest.php:53
 2. // Entering Action Group [openCreateAccountPage] StorefrontOpenCustomerAccountCreatePageActionGroup
 1. // create customer

#1  /home/qa/www/magento2/src/vendor/php-webdriver/webdriver/lib/Remote/HttpCommandExecutor.php:333
#2  /home/qa/www/magento2/src/vendor/php-webdriver/webdriver/lib/Remote/RemoteWebDriver.php:585
#3  /home/qa/www/magento2/src/vendor/php-webdriver/webdriver/lib/Remote/RemoteWebDriver.php:246
#4  /home/qa/www/magento2/src/vendor/magento/magento2-functional-testing-framework/src/Magento/FunctionalTestingFramework/Module/MagentoWebDriver.php:894
#5  Magento\FunctionalTestingFramework\Module\MagentoWebDriver->amOnPage
#6  /home/qa/www/magento2/src/vendor/magento/magento2-functional-testing-framework/src/Magento/FunctionalTestingFramework/_generated/AcceptanceTesterActions.php:552
#7  /home/qa/www/magento2/src/dev/tests/acceptance/tests/functional/Magento/_generated/default/CreateNewAccountTestCest.php:53
#8  Magento\AcceptanceTest\_default\Backend\CreateNewAccountTestCest->CreateNewAccountTest
#9  /home/qa/www/magento2/src/vendor/bin/codecept:112

ERRORS!
Tests: 1, Assertions: 0, Errors: 1.
m2-assistant[bot] commented 2 years ago

Hi @jithinkmatthew. 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


jithinkmatthew commented 2 years ago

Closing this issue as it is working as expected. Thanks