magento / magento2-functional-testing-framework

Magento2 Functional Testing Framework
Other
155 stars 133 forks source link

Cannot retrieve API token with credentials. #823

Open MajorKuprich opened 3 years ago

MajorKuprich commented 3 years ago

Preconditions

  1. PHP 7.4.10
  2. Magento CE 2.4.1
  3. Magento Functional Testing Framework CLI 3.2.1

Steps to reproduce

  1. Build MFTF: vendor/bin/mftf build:project.
  2. Set up dev/tests/acceptance/.env file.
  3. Copy dev/tests/acceptance/.htaccess.sample to dev/tests/acceptance/.htaccess.
  4. Generate & run tests: vendor/bin/mftf generate:tests (or vendor/bin/mftf doctor).

Expected result

  1. Tests run correctly.

Actual result

  1. Invalid credentials + /rest/V1/integration/admin/token not found on server = 404 status code.

Via postman I can retrieve admin token.

Sources:

https://devdocs.magento.com/mftf/docs/guides/cicd.html#generate-tests https://devdocs.magento.com/mftf/docs/getting-started.html#run-tests

jilu1 commented 3 years ago

@MajorKuprich It's most likely a setup issue. You can follow the result of mftf doctor command and get each step to pass.

asrindayananda commented 3 years ago

@MajorKuprich try removing all your extra plugins and run too see if its them. I had one of my plugins conflicting. Also look in mftf.log. Logs are better there

xsanz commented 2 years ago

Try adding --force flag

hopeseekr commented 2 years ago

I am having the same problem:

image

ericflemes commented 1 year ago

I am having the same problem: image someone got a solution?

asrindayananda commented 1 year ago

Remove plugins until you find the plugin that's causing the issue

ericflemes commented 1 year ago

Hi @asrindayananda This is a plugin-free installation with only magento 2.4.5

using docker https://github.com/markshust/docker-magento/

asrindayananda commented 1 year ago

I haven't used the new magento version. Check mftf.log?

ericflemes commented 1 year ago

my log [2022-09-26T14:55:37.542757+00:00] Magento\FunctionalTestingFramework\DataTransport\Protocol\CurlTransport.ERROR: Error HTTP response code: 404

Which version have you already worked? I believe there is a problem with this version 2.4.5