magento2 icon indicating copy to clipboard operation
magento2 copied to clipboard

gitignore for files and folders generated by Magento Functional Testing Framework (MFTF)

Open lfluvisotto opened this issue 5 years ago • 32 comments

Description (*)

When we execute the commands related on https://devdocs.magento.com/mftf/docs/commands/mftf.html

Folders and files will be created during execution of MFTF commands.

In my opinion the changes on those folders and files should not be staged for commit.

image

Related Pull Requests

N/A

Fixed Issues (if relevant)

N/A

Manual testing scenarios (*)

  1. vendor/bin/mftf build:project
  2. vendor/bin/mftf generate:tests

Questions or comments

N/A

Contribution checklist (*)

  • [ ] Pull request has a meaningful description of its purpose
  • [ ] All commits are accompanied by meaningful commit messages
  • [ ] All new or changed code is covered with unit/integration tests (if applicable)
  • [ ] All automated tests passed successfully (all builds are green)

Resolved issues:

  1. [x] resolves magento/magento2#30135: gitignore for files and folders generated by Magento Functional Testing Framework (MFTF)

lfluvisotto avatar Sep 18 '20 14:09 lfluvisotto

Hi @lfluvisotto. Thank you for your contribution Here is some useful tips how you can test your changes using Magento test environment. Add the comment under your pull request to deploy test or vanilla Magento instance:

  • @magento give me test instance - deploy test instance based on PR changes
  • @magento give me 2.4-develop instance - deploy vanilla Magento instance

:exclamation: Automated tests can be triggered manually with an appropriate comment:

  • @magento run all tests - run or re-run all required tests against the PR changes
  • @magento run <test-build(s)> - run or re-run specific test build(s) For example: @magento run Unit Tests

<test-build(s)> is a comma-separated list of build names. Allowed build names are:

  1. Database Compare
  2. Functional Tests CE
  3. Functional Tests EE,
  4. Functional Tests B2B
  5. Integration Tests
  6. Magento Health Index
  7. Sample Data Tests CE
  8. Sample Data Tests EE
  9. Sample Data Tests B2B
  10. Static Tests
  11. Unit Tests
  12. WebAPI Tests

You can find more information about the builds here

:information_source: Please run only needed test builds instead of all when developing. Please run all test builds before sending your PR for review.

For more details, please, review the Magento Contributor Guide documentation.

:warning: According to the Magento Contribution requirements, all Pull Requests must go through the Community Contributions Triage process. Community Contributions Triage is a public meeting.

:clock10: You can find the schedule on the Magento Community Calendar page.

:telephone_receiver: The triage of Pull Requests happens in the queue order. If you want to speed up the delivery of your contribution, please join the Community Contributions Triage session to discuss the appropriate ticket.

:movie_camera: You can find the recording of the previous Community Contributions Triage on the Magento Youtube Channel

:pencil2: Feel free to post questions/proposals/feedback related to the Community Contributions Triage process to the corresponding Slack Channel

m2-assistant[bot] avatar Sep 18 '20 14:09 m2-assistant[bot]

@ihor-sviziev if you could have a look at PR, I'd appreciate that, let me know if you have any comments or suggestions, thanks.

lfluvisotto avatar Sep 18 '20 14:09 lfluvisotto

Hi @ihor-sviziev, thank you for the review. ENGCOM-8233 has been created to process this Pull Request

magento-engcom-team avatar Sep 18 '20 17:09 magento-engcom-team

@magento create issue

sidolov avatar Sep 21 '20 15:09 sidolov

I think the last two lines should be put in https://github.com/magento/magento2/blob/2.4-develop/dev/tests/acceptance/.gitignore instead of the .gitignore file of the entire project.

There are a whole bunch of .gitignore files in the dev subdirectory for that purpose:

dev/tests/unit/.gitignore
dev/tests/unit/tmp/.gitignore
dev/tests/integration/.gitignore
dev/tests/integration/tmp/.gitignore
dev/tests/acceptance/.gitignore
dev/tests/static/testsuite/Magento/Test/_files/.gitignore
dev/tests/static/.gitignore
dev/tests/static/tmp/.gitignore
dev/tests/api-functional/.gitignore
dev/tests/setup-integration/.gitignore
...

Thoughts?

Also: ignoring the entire dev/tests/acceptance/tests/ directory feels very incorrect, since there are many files already in git from that directory, @lfluvisotto what specific files are being marked in git exactly?

hostep avatar Sep 22 '20 19:09 hostep

@hostep oh, you’re right!

ihor-sviziev avatar Sep 22 '20 19:09 ihor-sviziev

@ihor-sviziev , @hostep , PR updated

lfluvisotto avatar Sep 23 '20 15:09 lfluvisotto

Looks good

@ihor-sviziev: is it expected that running the MFTF tests creates a _generated directory in the root of the Magento project? This feels incorrect to me, but I might be wrong ...

hostep avatar Sep 23 '20 16:09 hostep

@hostep i do agree with you

@okolesnyk @lbajsarowicz could you provide us some feedback, why the _generated folder is creating in the file reject root? Seems like that’s wrong behavior

ihor-sviziev avatar Sep 23 '20 18:09 ihor-sviziev

@ihor-sviziev You should be still happy, as some of the files are generated in vendor/... directory 🤣 Change vendor/ directory to Read Only, execute MFTF tests and watch them fail.

lbajsarowicz avatar Sep 23 '20 20:09 lbajsarowicz

@lbajsarowicz wow 🤦‍♂️ . Do we have a bug on it in the MFTF?

ihor-sviziev avatar Sep 24 '20 09:09 ihor-sviziev

@ihor-sviziev https://github.com/magento/magento2-functional-testing-framework/issues/699

lbajsarowicz avatar Sep 24 '20 10:09 lbajsarowicz

@magento run all tests

ihor-sviziev avatar Sep 24 '20 10:09 ihor-sviziev

Hi @ihor-sviziev, thank you for the review. ENGCOM-8233 has been created to process this Pull Request

magento-engcom-team avatar Sep 24 '20 10:09 magento-engcom-team

@hostep I just reported listed above issue https://github.com/magento/magento2-functional-testing-framework/issues/801

ihor-sviziev avatar Sep 24 '20 10:09 ihor-sviziev

Thanks @ihor-sviziev!

Can we not approve this PR yet, and remove the exclusion from the general .gitignore file? Since this is a workaround and not fixing the core issue (which is https://github.com/magento/magento2-functional-testing-framework/issues/801)

hostep avatar Sep 24 '20 11:09 hostep

@hostep , @ihor-sviziev , /_generated/ from the .gitignore file in the root folder

lfluvisotto avatar Sep 25 '20 16:09 lfluvisotto

Hi @ihor-sviziev, thank you for the review. ENGCOM-8233 has been created to process this Pull Request

magento-engcom-team avatar Sep 25 '20 18:09 magento-engcom-team

@magento run all tests

ihor-sviziev avatar Sep 28 '20 13:09 ihor-sviziev

Hi @orlangur, thank you for the review. ENGCOM-8233 has been created to process this Pull Request

magento-engcom-team avatar Oct 08 '20 12:10 magento-engcom-team

@magento run Functional Tests B2B, WebAPI Tests

ihor-sviziev avatar Oct 15 '20 06:10 ihor-sviziev

@magento run Functional Tests B2B

ihor-sviziev avatar Oct 19 '20 08:10 ihor-sviziev

@magento run Functional Tests B2B

ihor-sviziev avatar Nov 04 '20 07:11 ihor-sviziev

Hi @ihor-sviziev, this PR is open and approved since September 2020, isn't it gonna be merged?

lfluvisotto avatar Sep 03 '22 00:09 lfluvisotto

@magento run Database Compare, Functional Tests B2B, Functional Tests CE, Functional Tests EE, Integration Tests, Magento Health Index, Sample Data Tests B2B, Sample Data Tests CE, Sample Data Tests EE, Semantic Version Checker, Static Tests, Unit Tests , WebAPI Tests

lfluvisotto avatar Sep 03 '22 00:09 lfluvisotto

The requested builds are added to the queue. You should be able to see them here within a few minutes. Please re-request them if they don't show in a reasonable amount of time.

@lfluvisotto so far, the only high priority (P0, P1 and P2) pull requests are currently getting processed 🙁

ihor-sviziev avatar Sep 03 '22 05:09 ihor-sviziev

@magento run all tests

lfluvisotto avatar Aug 19 '24 01:08 lfluvisotto

@magento run all tests

lfluvisotto avatar Aug 19 '24 20:08 lfluvisotto

@engcom-Delta

lfluvisotto avatar Aug 20 '24 12:08 lfluvisotto