magento2-functional-testing-framework
magento2-functional-testing-framework copied to clipboard
Cannot retrieve API token with credentials.
Preconditions
- PHP 7.4.10
- Magento CE 2.4.1
- Magento Functional Testing Framework CLI 3.2.1
Steps to reproduce
- Build MFTF:
vendor/bin/mftf build:project
. - Set up dev/tests/acceptance/.env file.
- Copy dev/tests/acceptance/.htaccess.sample to dev/tests/acceptance/.htaccess.
- Generate & run tests: vendor/bin/mftf generate:tests (or vendor/bin/mftf doctor).
Expected result
- Tests run correctly.
Actual result
- 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
@MajorKuprich It's most likely a setup issue. You can follow the result of mftf doctor command and get each step to pass.
@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
Try adding --force flag
I am having the same problem:
I am having the same problem:
someone got a solution?
Remove plugins until you find the plugin that's causing the issue
Hi @asrindayananda This is a plugin-free installation with only magento 2.4.5
using docker https://github.com/markshust/docker-magento/
I haven't used the new magento version. Check mftf.log?
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