From 6f9dc12d3a6436d815371551f88c2cd36d7dbd63 Mon Sep 17 00:00:00 2001 From: Soumya Unnikrishnan Date: Thu, 17 Oct 2019 10:41:28 -0500 Subject: [PATCH 1/7] MQE-1796: Magento Git vs Composer and MFTF --- docs/guides/git-vs-composer-install.md | 72 ++++++++++++++++++++++++++ 1 file changed, 72 insertions(+) create mode 100644 docs/guides/git-vs-composer-install.md diff --git a/docs/guides/git-vs-composer-install.md b/docs/guides/git-vs-composer-install.md new file mode 100644 index 000000000..a96085fd8 --- /dev/null +++ b/docs/guides/git-vs-composer-install.md @@ -0,0 +1,72 @@ +#Git vs Composer Installation of Magento with MFTF + + +###How to download Magento + MFTF from GitHub? + +If you are planning on contributing a PR to the Magento 2 codebase, you can download Magento 2 from GitHub. Contribution to the codebase is done using the 'fork and pull' model where contributors maintain their own fork of the repo. This repo is then used to submit a pull request to the base repo. + +Install guide: [GitHub Installation](https://devdocs.magento.com/mftf/docs/getting-started.html) + +###How to download Magento + MFTF via Composer? + +Composer install downloads released packages of Magento 2 from the composer repo [https://repo.magento.com](https://repo.magento.com). + +All Magento modules and their MFTF tests are put under `` directory for convenience of 3rd party developers. With this setup, you can keep your custom modules separate from the core. You can also develop modules in a separate VCS repository and add them to your `composer.json` which will allow them to be installed into the `vendor` directory. + +Install guide: [Composer based Installation](https://devdocs.magento.com/guides/v2.3/install-gde/composer.html) + + +###Managing MFTF test artifacts - Composer vs GitHub + +####Via GitHub: + +Cloning Magento 2 git repository is a way of installing when you don't have to worry frequently about matching the codebase with production. Your version control system generally holds and manages your `app/code` folder and you can do manual ad-hoc development here. + +####Via composer: + +Magento 2 advocates the use of composer for managing modules. When you install a module through composer, it is added to `vendor//` + +If you are developing your own module or adding MFTF tests to the module, you should not edit `vendor` because a composer update could clobber your changes. Instead, you can override a module under `vendor`, by adding files or cloning your module specific git repo to `app/code//`. + +If you want to distribute the module and its tests, you can initialize a git repo and create a [composer package](https://devdocs.magento.com/guides/v2.3/extension-dev-guide/package/package_module.html). In this way others will be able to download and install your module and access your tests as a composer package, in their `` folder. + + +###MFTF test artifacts location + +- For GitHub installation, MFTF test artifacts are located at `/app/code///Test/Mftf/`. This is the directory to create new tests or maintain existing ones. + +- For Composer based installation, MFTF test artifacts are located at `/vendor///Test/Mftf/`. This is the directory to run tests fetched by Composer. + +The file structure under both paths is the same as below: + +```tree + +├── ActionGroup +│   └── ... +├── Data +│   └── ... +├── Metadata +│   └── ... +├── Page +│   └── ... +├── Section +│   └── ... +└── Test + └── ... +``` + +###How ModuleResolver reads modules + +In either of the installations, all tests and test data are read and merged by MFTF's ModuleResolver in the order indicated the below: + +1. `/app/code///Test/Mftf/` +2. `/vendor///Test/Mftf/` + +###Conclusion + +There are no differences from MFTF's perspective between having the test artifacts in `app/code` or in `/vendor` as it reads artifacts from both paths. It works the same. Composer based install may benefit teams when there's a need to match file systems in dev and production. + +If you are a contributing developer with an understanding of Git and Composer commands, you can choose the GitHub installation method instead. + + + From e345f05f9ea9aef5031017ea0bfeeaf570d47d72 Mon Sep 17 00:00:00 2001 From: Soumya Unnikrishnan Date: Fri, 18 Oct 2019 11:28:24 -0500 Subject: [PATCH 2/7] MQE-1796: Magento Git vs Composer and MFTF Addressed review comments --- docs/guides/git-vs-composer-install.md | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/docs/guides/git-vs-composer-install.md b/docs/guides/git-vs-composer-install.md index a96085fd8..93153c31d 100644 --- a/docs/guides/git-vs-composer-install.md +++ b/docs/guides/git-vs-composer-install.md @@ -1,13 +1,13 @@ #Git vs Composer Installation of Magento with MFTF -###How to download Magento + MFTF from GitHub? +###GitHub Installation If you are planning on contributing a PR to the Magento 2 codebase, you can download Magento 2 from GitHub. Contribution to the codebase is done using the 'fork and pull' model where contributors maintain their own fork of the repo. This repo is then used to submit a pull request to the base repo. Install guide: [GitHub Installation](https://devdocs.magento.com/mftf/docs/getting-started.html) -###How to download Magento + MFTF via Composer? +###Composer based Installation Composer install downloads released packages of Magento 2 from the composer repo [https://repo.magento.com](https://repo.magento.com). @@ -16,7 +16,7 @@ All Magento modules and their MFTF tests are put under `` directory for Install guide: [Composer based Installation](https://devdocs.magento.com/guides/v2.3/install-gde/composer.html) -###Managing MFTF test artifacts - Composer vs GitHub +###Managing modules - Composer vs GitHub ####Via GitHub: @@ -57,7 +57,7 @@ The file structure under both paths is the same as below: ###How ModuleResolver reads modules -In either of the installations, all tests and test data are read and merged by MFTF's ModuleResolver in the order indicated the below: +In either of the installations, all tests and test data are read and merged by MFTF's ModuleResolver in the order indicated below: 1. `/app/code///Test/Mftf/` 2. `/vendor///Test/Mftf/` From 57f2eaadefe803e052ed9fd0a5ee056ca6dd5e67 Mon Sep 17 00:00:00 2001 From: Soumya Unnikrishnan Date: Fri, 18 Oct 2019 12:33:48 -0500 Subject: [PATCH 3/7] MQE-1796: Magento Git vs Composer and MFTF Addressed review comments --- docs/guides/git-vs-composer-install.md | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/docs/guides/git-vs-composer-install.md b/docs/guides/git-vs-composer-install.md index 93153c31d..8a98d9921 100644 --- a/docs/guides/git-vs-composer-install.md +++ b/docs/guides/git-vs-composer-install.md @@ -5,7 +5,8 @@ If you are planning on contributing a PR to the Magento 2 codebase, you can download Magento 2 from GitHub. Contribution to the codebase is done using the 'fork and pull' model where contributors maintain their own fork of the repo. This repo is then used to submit a pull request to the base repo. -Install guide: [GitHub Installation](https://devdocs.magento.com/mftf/docs/getting-started.html) +Install guide: [GitHub Installation](https://devdocs.magento.com/guides/v2.3/install-gde/prereq/dev_install.html) + ###Composer based Installation @@ -16,6 +17,13 @@ All Magento modules and their MFTF tests are put under `` directory for Install guide: [Composer based Installation](https://devdocs.magento.com/guides/v2.3/install-gde/composer.html) +### MFTF Installation + +After installing your Magento project in either of the above ways, the composer dependency `magento/magento2-functional-testing-framework` allows you to download and install MFTF. MFTF will be embedded in your Magento 2 installation and will cover your project with functional tests. + +If you want to contribute a PR into MFTF codebase, you will need to install MFTF in the [Standalone] mode. + + ###Managing modules - Composer vs GitHub ####Via GitHub: @@ -55,6 +63,7 @@ The file structure under both paths is the same as below: └── ... ``` + ###How ModuleResolver reads modules In either of the installations, all tests and test data are read and merged by MFTF's ModuleResolver in the order indicated below: @@ -62,6 +71,7 @@ In either of the installations, all tests and test data are read and merged by M 1. `/app/code///Test/Mftf/` 2. `/vendor///Test/Mftf/` + ###Conclusion There are no differences from MFTF's perspective between having the test artifacts in `app/code` or in `/vendor` as it reads artifacts from both paths. It works the same. Composer based install may benefit teams when there's a need to match file systems in dev and production. @@ -69,4 +79,6 @@ There are no differences from MFTF's perspective between having the test artifac If you are a contributing developer with an understanding of Git and Composer commands, you can choose the GitHub installation method instead. + +[Standalone]: ../getting-started.html#set-up-a-standalone-mftf From 49d318e7f52962b8425c448871cde4b7ede9582e Mon Sep 17 00:00:00 2001 From: Soumya Unnikrishnan Date: Tue, 22 Oct 2019 10:01:05 -0500 Subject: [PATCH 4/7] MQE-1796: Magento Git vs Composer and MFTF Addressed review comments --- docs/guides/git-vs-composer-install.md | 24 ++++++++++++------------ 1 file changed, 12 insertions(+), 12 deletions(-) diff --git a/docs/guides/git-vs-composer-install.md b/docs/guides/git-vs-composer-install.md index 8a98d9921..baec08471 100644 --- a/docs/guides/git-vs-composer-install.md +++ b/docs/guides/git-vs-composer-install.md @@ -1,14 +1,14 @@ -#Git vs Composer Installation of Magento with MFTF +# Git vs Composer Installation of Magento with MFTF -###GitHub Installation +### GitHub Installation If you are planning on contributing a PR to the Magento 2 codebase, you can download Magento 2 from GitHub. Contribution to the codebase is done using the 'fork and pull' model where contributors maintain their own fork of the repo. This repo is then used to submit a pull request to the base repo. Install guide: [GitHub Installation](https://devdocs.magento.com/guides/v2.3/install-gde/prereq/dev_install.html) -###Composer based Installation +### Composer based Installation Composer install downloads released packages of Magento 2 from the composer repo [https://repo.magento.com](https://repo.magento.com). @@ -24,13 +24,13 @@ After installing your Magento project in either of the above ways, the composer If you want to contribute a PR into MFTF codebase, you will need to install MFTF in the [Standalone] mode. -###Managing modules - Composer vs GitHub +### Managing modules - Composer vs GitHub -####Via GitHub: +#### Via GitHub: Cloning Magento 2 git repository is a way of installing when you don't have to worry frequently about matching the codebase with production. Your version control system generally holds and manages your `app/code` folder and you can do manual ad-hoc development here. -####Via composer: +#### Via composer: Magento 2 advocates the use of composer for managing modules. When you install a module through composer, it is added to `vendor//` @@ -39,11 +39,11 @@ If you are developing your own module or adding MFTF tests to the module, you sh If you want to distribute the module and its tests, you can initialize a git repo and create a [composer package](https://devdocs.magento.com/guides/v2.3/extension-dev-guide/package/package_module.html). In this way others will be able to download and install your module and access your tests as a composer package, in their `` folder. -###MFTF test artifacts location +### MFTF test artifacts location -- For GitHub installation, MFTF test artifacts are located at `/app/code///Test/Mftf/`. This is the directory to create new tests or maintain existing ones. +- For GitHub installation, MFTF test materials are located at `/app/code///Test/Mftf/`. This is the directory to create new tests or maintain existing ones. -- For Composer based installation, MFTF test artifacts are located at `/vendor///Test/Mftf/`. This is the directory to run tests fetched by Composer. +- For Composer based installation, MFTF test materials are located at `/vendor///Test/Mftf/`. This is the directory to run tests fetched by Composer. The file structure under both paths is the same as below: @@ -64,7 +64,7 @@ The file structure under both paths is the same as below: ``` -###How ModuleResolver reads modules +### How ModuleResolver reads modules In either of the installations, all tests and test data are read and merged by MFTF's ModuleResolver in the order indicated below: @@ -72,9 +72,9 @@ In either of the installations, all tests and test data are read and merged by M 2. `/vendor///Test/Mftf/` -###Conclusion +### Conclusion -There are no differences from MFTF's perspective between having the test artifacts in `app/code` or in `/vendor` as it reads artifacts from both paths. It works the same. Composer based install may benefit teams when there's a need to match file systems in dev and production. +There are no differences from MFTF's perspective between having the test materials in `app/code` or in `/vendor` as it reads artifacts from both paths. It works the same. Composer based install may benefit teams when there's a need to match file systems in dev and production. If you are a contributing developer with an understanding of Git and Composer commands, you can choose the GitHub installation method instead. From 2744889bde4600cb41d8a6c3c38edcbe9c86622f Mon Sep 17 00:00:00 2001 From: Soumya Unnikrishnan Date: Tue, 22 Oct 2019 10:37:04 -0500 Subject: [PATCH 5/7] MQE-1796: Magento Git vs Composer and MFTF Fixed review comments. --- docs/guides/git-vs-composer-install.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/docs/guides/git-vs-composer-install.md b/docs/guides/git-vs-composer-install.md index baec08471..32b7a0a22 100644 --- a/docs/guides/git-vs-composer-install.md +++ b/docs/guides/git-vs-composer-install.md @@ -39,7 +39,7 @@ If you are developing your own module or adding MFTF tests to the module, you sh If you want to distribute the module and its tests, you can initialize a git repo and create a [composer package](https://devdocs.magento.com/guides/v2.3/extension-dev-guide/package/package_module.html). In this way others will be able to download and install your module and access your tests as a composer package, in their `` folder. -### MFTF test artifacts location +### MFTF test materials location - For GitHub installation, MFTF test materials are located at `/app/code///Test/Mftf/`. This is the directory to create new tests or maintain existing ones. @@ -74,7 +74,7 @@ In either of the installations, all tests and test data are read and merged by M ### Conclusion -There are no differences from MFTF's perspective between having the test materials in `app/code` or in `/vendor` as it reads artifacts from both paths. It works the same. Composer based install may benefit teams when there's a need to match file systems in dev and production. +There are no differences from MFTF's perspective between having the test materials in `app/code` or in `/vendor`. It works the same. Composer based install may benefit teams when there's a need to match file systems in dev and production. If you are a contributing developer with an understanding of Git and Composer commands, you can choose the GitHub installation method instead. From 8dce78ff93b79e9b50ffd49e5126979bede12c24 Mon Sep 17 00:00:00 2001 From: Donald Booth Date: Thu, 24 Oct 2019 09:27:10 -0500 Subject: [PATCH 6/7] Grammar and formatting --- docs/guides/git-vs-composer-install.md | 66 ++++++++++++-------------- 1 file changed, 31 insertions(+), 35 deletions(-) diff --git a/docs/guides/git-vs-composer-install.md b/docs/guides/git-vs-composer-install.md index 32b7a0a22..076e5491d 100644 --- a/docs/guides/git-vs-composer-install.md +++ b/docs/guides/git-vs-composer-install.md @@ -1,51 +1,47 @@ -# Git vs Composer Installation of Magento with MFTF +# Git vs Composer installation of Magento with MFTF +Depending on how you plan to use Magnto code, there are different options for installing Magento. -### GitHub Installation +## GitHub Installation -If you are planning on contributing a PR to the Magento 2 codebase, you can download Magento 2 from GitHub. Contribution to the codebase is done using the 'fork and pull' model where contributors maintain their own fork of the repo. This repo is then used to submit a pull request to the base repo. +If you are contributing a pull request to the Magento 2 codebase, download Magento 2 from our GitHub repository. Contribution to the codebase is done using the 'fork and pull' model where contributors maintain their own fork of the repo. This repo is then used to submit a pull request to the base repo. -Install guide: [GitHub Installation](https://devdocs.magento.com/guides/v2.3/install-gde/prereq/dev_install.html) +Install guide: [GitHub Installation][] +## Composer based Installation -### Composer based Installation +A Composer install downloads released packages of Magento 2 from the composer repo [https://repo.magento.com](https://repo.magento.com). -Composer install downloads released packages of Magento 2 from the composer repo [https://repo.magento.com](https://repo.magento.com). +All Magento modules and their MFTF tests are put under `` directory, for convenience of 3rd party developers. With this setup, you can keep your custom modules separate from core modules. You can also develop modules in a separate VCS repository and add them to your `composer.json` which installs them into the `vendor` directory. -All Magento modules and their MFTF tests are put under `` directory for convenience of 3rd party developers. With this setup, you can keep your custom modules separate from the core. You can also develop modules in a separate VCS repository and add them to your `composer.json` which will allow them to be installed into the `vendor` directory. +Install guide: [Composer based Installation][] -Install guide: [Composer based Installation](https://devdocs.magento.com/guides/v2.3/install-gde/composer.html) +## MFTF Installation +After installing your Magento project in either of the above ways, the composer dependency `magento/magento2-functional-testing-framework` downloads and installs MFTF. MFTF is embedded in your Magento 2 installation and will cover your project with functional tests. -### MFTF Installation +If you want to contribute a pull request into MFTF codebase, you will need to install MFTF in the [Standalone][] mode. -After installing your Magento project in either of the above ways, the composer dependency `magento/magento2-functional-testing-framework` allows you to download and install MFTF. MFTF will be embedded in your Magento 2 installation and will cover your project with functional tests. +## Managing modules - Composer vs GitHub -If you want to contribute a PR into MFTF codebase, you will need to install MFTF in the [Standalone] mode. +### Via GitHub +Cloning the Magento 2 git repository is a way of installing where you do not have to worry about matching your codebase with production. Your version control system generally holds and manages your `app/code` folder and you can do manual, ad-hoc development here. -### Managing modules - Composer vs GitHub +### Via Composer -#### Via GitHub: +Magento advocates the use of composer for managing modules. When you install a module through composer, it is added to `vendor//`. -Cloning Magento 2 git repository is a way of installing when you don't have to worry frequently about matching the codebase with production. Your version control system generally holds and manages your `app/code` folder and you can do manual ad-hoc development here. +When developing your own module or adding MFTF tests to a module, you should not edit in `vendor` because a composer update could overwrite your changes. Instead, overwrite a module under `vendor` by adding files or cloning your module-specific Git repo to `app/code//`. -#### Via composer: +To distribute the module and its tests, you can initialize a git repo and create a [composer package][]. In this way others will be able to download and install your module and access your tests as a composer package, in their `` folder. -Magento 2 advocates the use of composer for managing modules. When you install a module through composer, it is added to `vendor//` +## MFTF test materials location -If you are developing your own module or adding MFTF tests to the module, you should not edit `vendor` because a composer update could clobber your changes. Instead, you can override a module under `vendor`, by adding files or cloning your module specific git repo to `app/code//`. +- For GitHub installations, MFTF test materials are located in `/app/code///Test/Mftf/`. This is the directory for new tests or to maintain existing ones. +- For Composer-based installations, MFTF test materials are located at `/vendor///Test/Mftf/`. This is the directory to run tests fetched by Composer. -If you want to distribute the module and its tests, you can initialize a git repo and create a [composer package](https://devdocs.magento.com/guides/v2.3/extension-dev-guide/package/package_module.html). In this way others will be able to download and install your module and access your tests as a composer package, in their `` folder. - - -### MFTF test materials location - -- For GitHub installation, MFTF test materials are located at `/app/code///Test/Mftf/`. This is the directory to create new tests or maintain existing ones. - -- For Composer based installation, MFTF test materials are located at `/vendor///Test/Mftf/`. This is the directory to run tests fetched by Composer. - -The file structure under both paths is the same as below: +The file structure under both paths is the same: ```tree @@ -63,22 +59,22 @@ The file structure under both paths is the same as below: └── ... ``` +## How ModuleResolver reads modules -### How ModuleResolver reads modules - -In either of the installations, all tests and test data are read and merged by MFTF's ModuleResolver in the order indicated below: +With either type of installation, all tests and test data are read and merged by MFTF's ModuleResolver in this order: 1. `/app/code///Test/Mftf/` -2. `/vendor///Test/Mftf/` +1. `/vendor///Test/Mftf/` +## Conclusion -### Conclusion - -There are no differences from MFTF's perspective between having the test materials in `app/code` or in `/vendor`. It works the same. Composer based install may benefit teams when there's a need to match file systems in dev and production. +There is no difference between having the test materials in `app/code` or in `/vendor`: it works the same. Composer-based installs may benefit teams when there is a need to match file systems in `development` and `production`. If you are a contributing developer with an understanding of Git and Composer commands, you can choose the GitHub installation method instead. - +[Composer based Installation]: https://devdocs.magento.com/guides/v2.3/install-gde/composer.html +[GitHub Installation]: https://devdocs.magento.com/guides/v2.3/install-gde/prereq/dev_install.html [Standalone]: ../getting-started.html#set-up-a-standalone-mftf +[composer package]: https://devdocs.magento.com/guides/v2.3/extension-dev-guide/package/package_module.html From 2789a154d9f57cd914a90745a3fe408e7a7317e4 Mon Sep 17 00:00:00 2001 From: Donald Booth Date: Thu, 24 Oct 2019 09:28:46 -0500 Subject: [PATCH 7/7] Trailing space. --- docs/guides/git-vs-composer-install.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/guides/git-vs-composer-install.md b/docs/guides/git-vs-composer-install.md index 076e5491d..3a45e3a68 100644 --- a/docs/guides/git-vs-composer-install.md +++ b/docs/guides/git-vs-composer-install.md @@ -18,7 +18,7 @@ Install guide: [Composer based Installation][] ## MFTF Installation -After installing your Magento project in either of the above ways, the composer dependency `magento/magento2-functional-testing-framework` downloads and installs MFTF. MFTF is embedded in your Magento 2 installation and will cover your project with functional tests. +After installing your Magento project in either of the above ways, the composer dependency `magento/magento2-functional-testing-framework` downloads and installs MFTF. MFTF is embedded in your Magento 2 installation and will cover your project with functional tests. If you want to contribute a pull request into MFTF codebase, you will need to install MFTF in the [Standalone][] mode.