docker-magento icon indicating copy to clipboard operation
docker-magento copied to clipboard

Can't run MFTF tests: Cannot retrieve API token with credentials.

Open draper87 opened this issue 2 years ago • 1 comments

Description I'm trying to run MFTF tests, but when I run bin/mftf run:test AdminLoginSuccessfulTest I got this error: Screenshot from 2022-04-18 18-52-11

Steps To Reproduce

  1. Bin/download 2.4.4
  2. Bin/setup magento.test
  3. Enabled selenium on docker-compose.yml
  4. Run bin/mftf build:project
  5. Edit src/dev/tests/acceptance/.env with my config values Screenshot from 2022-04-18 18-55-22
  6. Add SELENIUM_HOST=selenium to src/dev/tests/acceptance/.env
  7. Run bin/mftf run:test AdminLoginSuccessfulTest

Expected Result I expected that the test return OK.

Actual Result The error above mentioned.

draper87 avatar Apr 18 '22 16:04 draper87

Try to configure extra_hosts:

extra_hosts: &appextrahosts
  - "magento.test:172.17.0.1"

Also uncomment all extra_hosts: *appextrahosts

Do make restart

And finally, please use HTTPS MAGENTO_BASE_URL=https://magento.test

jcuerdo avatar Jul 22 '22 15:07 jcuerdo