|
1 | 1 | # Update the Magento Functional Testing Framework
|
2 | 2 |
|
3 | 3 | <div class="bs-callout bs-callout-info" markdown="1">
|
4 |
| -[Find your version][] of the MFTF. |
5 | 4 |
|
6 |
| -The latest Magento 2.3 release supports MFTF 2.3.13. |
7 |
| -The latest Magento 2.2 release supports MFTF 2.3.8. |
8 |
| -</div> |
9 |
| - |
10 |
| -Magento tests and the framework are stored in different repositories. |
11 |
| - |
12 |
| -Magento tests are stored in the same repository as the Magento code base. |
13 |
| -When you pull changes in the Magento code, you're potentially pulling corresponding tests as well. |
14 |
| - |
15 |
| -The MFTF is installed separately as a dependency using Composer. |
16 |
| -When pulling the latest Magento code, update the corresponding Composer dependencies in the `magento2` root directory. |
17 |
| -This ensures that the MFTF is up to date. |
| 5 | +Both Magento `2.2` and `2.3` supports MFTF `2.5.3` ([Find your version][] of the MFTF). |
18 | 6 |
|
19 |
| -## Update the MFTF from 2.3.x |
20 |
| - |
21 |
| -To update the MFTF to the latest patch: |
22 |
| - |
23 |
| -1. Verify that the Magento [WYSIWYG settings][] and [Security settings][] are set appropriately. |
24 |
| -1. Check details about backward incompatible changes in the [Changelog][] and update your new or customized tests. |
25 |
| -1. Get the latest framework version using Composer: |
26 |
| - |
27 |
| - ```bash |
28 |
| - composer update |
29 |
| - ``` |
30 |
| - |
31 |
| -1. Generate the updated tests: |
32 |
| - |
33 |
| - ```bash |
34 |
| - vendor/bin/mftf generate:tests |
35 |
| - ``` |
36 |
| - |
37 |
| -## Update the MFTF from 2.2 |
| 7 | +</div> |
38 | 8 |
|
39 |
| -To update the MFTF from the previous minor version: |
40 | 9 |
|
41 |
| -1. When you update Magento, verify that the Magento [WYSIWYG settings][] and [Security settings][] are set appropriately. |
42 |
| -1. Starting at the `magento2/` root directory remove the `vendor/` directory: |
| 10 | +**Tests and the Framework itself are stored in different repositories.** |
43 | 11 |
|
44 |
| - ```bash |
45 |
| - rm -rf vendor/ |
46 |
| - ``` |
| 12 | +* Tests are stored in Module's directory. |
| 13 | +* The MFTF is installed separately (usually as a Composer dependency) |
47 | 14 |
|
48 |
| -1. Get the latest framework version from the Composer dependencies: |
| 15 | +While pulling the latest Magento codebase, you are going to get Tests and it's dependencies (eg. Action Groups). |
49 | 16 |
|
50 |
| - ```bash |
51 |
| - composer install |
52 |
| - ``` |
| 17 | +To understand types of update - please follow the [Versioning][] page. |
53 | 18 |
|
54 |
| -1. Run the `upgrade:tests` using the new command line tool: |
| 19 | +## Patch version update |
55 | 20 |
|
56 |
| - ```bash |
57 |
| - vendor/bin/mftf upgrade:tests app |
58 |
| - ``` |
| 21 | +Takes place when **third** digit of version number changes. |
59 | 22 |
|
60 |
| -1. If you are using Phpstorm, update the urn catalog: |
| 23 | +1. Make sure that [Security settings][] are set appropriately. |
| 24 | +1. Get latest Framework version with `composer update magento/magento2-functional-testing-framework --with-dependencies` |
| 25 | +1. Generate updated tests with `vendor/bin/mftf generate:tests` |
61 | 26 |
|
62 |
| - ```bash |
63 |
| - vendor/bin/mftf generate:urn-catalog .idea/ |
64 |
| - ``` |
| 27 | +## Minor version update |
65 | 28 |
|
66 |
| -1. Update your own tests, including data, metadata, and so on, if they contain tags that are unsupported in the newer version. |
| 29 | +Takes place when **second** digit of version number changes. |
67 | 30 |
|
68 |
| - Check details about backward incompatible changes and review new MFTF release documentation in the [Changelog][]. |
| 31 | +1. Check details about backward incompatible changes in the [Changelog][] and update your new or customized tests. |
| 32 | +1. Perform all the actions provided for [Patch Version Update][] |
| 33 | +1. When updating from versions below `2.5.0`, verify [WYSIWYG settings][] |
| 34 | +1. You may need to run the `upgrade:tests` using `vendor/bin/mftf upgrade:tests app` |
69 | 35 |
|
70 |
| -1. Generate newly pulled tests: |
| 36 | +## Always after update |
71 | 37 |
|
72 |
| - ```bash |
73 |
| - vendor/bin/mftf generate:tests |
74 |
| - ``` |
| 38 | +1. It's good to regenerate your IDE Schema Definition catalog with `vendor/bin/mftf generate:urn-catalog .idea/` |
| 39 | +1. Update your own tests, including data, metadata and other resoruces. Validate if they contain tags that are unsupported in the newer version. |
| 40 | +1. As soon as possible - remove the references to resources (ActionGroups, Sections, Tests) marked as deprecated. |
75 | 41 |
|
76 | 42 | <!-- Link Definitions -->
|
77 | 43 | [Changelog]: https://github.com/magento/magento2-functional-testing-framework/blob/master/CHANGELOG.md
|
78 | 44 | [WYSIWYG settings]: getting-started.md#wysiwyg-settings
|
79 | 45 | [Security settings]: getting-started.md#security-settings
|
| 46 | +[Find your version]: introduction.md#find-your-mftf-version |
| 47 | +[Versioning]: versioning.md#versioning-policy |
| 48 | +[Patch Version Update]: #patch-version-update |
0 commit comments