magento / magento/magento2-functional-testing-framework

run:test with --remove not creating testManifest.txt file

Open
#906 3 comments 1 reaction 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
PHP
Stars
154
Forks
134
PR merge metrics
No merged PRs in 30d

Description

### Preconditions

1. Magento 2.4.6
2. Magento Functional Testing Framework CLI 4.3.4
3. PHP 8.1

### Steps to reproduce

1. sudo vendor/bin/mftf run:test AdminQuickCheckoutSalesOrderCreateTest --remove

### Expected result

1. Test should get executed successfully

### Actual result

1. Fatal error
```
PHP Warning: fopen(/var/www/html/salestax/2.4.6/enterprise/dev/tests/acceptance/tests/functional/Magento/_generated/testManifest.txt): Failed to open stream: No such file or directory in /var/www/html/salestax/2.4.6/enterprise/vendor/magento/magento2-functional-testing-framework/src/Magento/FunctionalTestingFramework/Util/Manifest/DefaultTestManifest.php on line 68
PHP Fatal error: Uncaught TypeError: fwrite(): Argument #1 ($stream) must be of type resource, bool given in /var/www/html/salestax/2.4.6/enterprise/vendor/magento/magento2-functional-testing-framework/src/Magento/FunctionalTestingFramework/Util/Manifest/DefaultTestManifest.php:93
Stack trace:
#0 /var/www/html/salestax/2.4.6/enterprise/vendor/magento/magento2-functional-testing-framework/src/Magento/FunctionalTestingFramework/Util/Manifest/DefaultTestManifest.php(93): fwrite()
#1 /var/www/html/salestax/2.4.6/enterprise/vendor/magento/magento2-functional-testing-framework/src/Magento/FunctionalTestingFramework/Util/Manifest/DefaultTestManifest.php(75): Magento\FunctionalTestingFramework\Util\Manifest\DefaultTestManifest->generateSuiteEntries()
#2 /var/www/html/salestax/2.4.6/enterprise/vendor/magento/magento2-functional-testing-framework/src/Magento/FunctionalTestingFramework/Console/GenerateTestsCommand.php(235): Magento\FunctionalTestingFramework\Util\Manifest\DefaultTestManifest->generate()
#3 /var/www/html/salestax/2.4.6/enterprise/vendor/symfony/console/Command/Command.php(298): Magento\FunctionalTestingFramework\Console\GenerateTestsCommand->execute()
#4 /var/www/html/salestax/2.4.6/enterprise/vendor/magento/magento2-functional-testing-framework/src/Magento/FunctionalTestingFramework/Console/RunTestCommand.php(133): Symfony\Component\Console\Command\Command->run()
#5 /var/www/html/salestax/2.4.6/enterprise/vendor/symfony/console/Command/Command.php(298): Magento\FunctionalTestingFramework\Console\RunTestCommand->execute()
#6 /var/www/html/salestax/2.4.6/enterprise/vendor/symfony/console/Application.php(1040): Symfony\Component\Console\Command\Command->run()
#7 /var/www/html/salestax/2.4.6/enterprise/vendor/symfony/console/Application.php(301): Symfony\Component\Console\Application->doRunCommand()
#8 /var/www/html/salestax/2.4.6/enterprise/vendor/symfony/console/Application.php(171): Symfony\Component\Console\Application->doRun()
#9 /var/www/html/salestax/2.4.6/enterprise/vendor/magento/magento2-functional-testing-framework/bin/mftf(40): Symfony\Component\Console\Application->run()
#10 /var/www/html/salestax/2.4.6/enterprise/vendor/bin/mftf(119): include('...')
#11 {main}
thrown in /var/www/html/salestax/2.4.6/enterprise/vendor/magento/magento2-functional-testing-framework/src/Magento/FunctionalTestingFramework/Util/Manifest/DefaultTestManifest.php on line 93
```

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with src/Magento/FunctionalTestingFramework/Util/Manifest/DefaultTestManifest.php around lines 68 and 93, as shown in the stack trace. Reproduce the issue with vendor/bin/mftf run:test AdminQuickCheckoutSalesOrderCreateTest --remove and inspect the manifest-generation path. Done means the command creates testManifest.txt and executes without the reported fatal error.

Written by the indexing model from the issue text.

Assessment

Tech stack
php
Domain
cli, testing
Issue type
Bug
Difficulty
2/5
Estimated time
1-3 hours
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.