Skip to content

Commit 87f246a

Browse files
committed
MQE-2223: Part 7 Docs Review "MFTF Ease Of Use" PR #483
1 parent 66ff24d commit 87f246a

File tree

1 file changed

+19
-13
lines changed

1 file changed

+19
-13
lines changed

docs/guides/cicd.md

+19-13
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# How to use MFTF in CICD
22

3-
To integrate MFTF tests into your CICD pipeline, then it is best to start with the conceptual flow of the pipeline code.
3+
To integrate MFTF tests into your CICD pipeline, it is best to start with the conceptual flow of the pipeline code.
44

55
## Concept
66

@@ -40,6 +40,8 @@ bin/magento config:set cms/wysiwyg/enabled disabled
4040

4141
These help set the `default` state of the Magento instance. If you wish to change the default state of the application (and have updated your tests sufficiently to account for it), this is the step in which you would do it.
4242

43+
If your magento instance has Two-Factor Authentication enabled, see [Configure 2FA][] to configure MFTF tests.
44+
4345
## Install allure
4446

4547
This will be required to generate the report after your test runs. See [Allure][] for details.
@@ -54,7 +56,7 @@ Generate tests based on what you want to run:
5456
vendor/bin/mftf generate:tests
5557
```
5658

57-
This will generate all tests and a single manifest file under `dev/tests/acceptance/tests/functional/Magento/FunctionalTest/_generated/testManifest.txt`
59+
This will generate all tests and a single manifest file under `dev/tests/acceptance/tests/functional/Magento/_generated/testManifest.txt`
5860

5961
### Parallel execution
6062

@@ -64,7 +66,7 @@ To generate all tests for use in parallel nodes:
6466
vendor/bin/mftf generate:tests --config parallel
6567
```
6668

67-
This will generate a folder under `dev/tests/acceptance/tests/functional/Magento/FunctionalTest/_generated/groups`. This folder contains several `group#.txt` files that can be used later with the `mftf run:manifest` command.
69+
This will generate a folder under `dev/tests/acceptance/tests/functional/Magento/_generated/groups`. This folder contains several `group#.txt` files that can be used later with the `mftf run:manifest` command.
6870

6971
## Delegate and run tests
7072

@@ -73,21 +75,24 @@ This will generate a folder under `dev/tests/acceptance/tests/functional/Magento
7375
If you are running on a single node, call:
7476

7577
```bash
76-
vendor/bin/mftf run:manifest dev/tests/acceptance/tests/functional/Magento/FunctionalTest/_generated/testManifest.txt
78+
vendor/bin/mftf run:manifest dev/tests/acceptance/tests/functional/Magento/_generated/testManifest.txt
7779
```
7880

7981
### Parallel execution
8082

81-
To run MFTF tests in parallel, clone the contents of the current node and duplicate them depending on how many nodes you have.
83+
You can optimize your pipeline by running tests in parallel across multiple nodes.
84+
85+
Tests can be split up into roughly equal running groups using `--config parallel`.
86+
87+
You don't want perform installation on each node again and build it. So, to save time, stash pre-made artifacts from earlier steps and un-stash on the nodes.
8288

83-
- Clone contents of current node as a baseline.
84-
- For each `groups/group#.txt` file:
89+
The groups can be then distributed on each of the nodes and run separately in an isolated environment.
8590

86-
- Set a node's contents to the baseline.
87-
- Run `vendor/bin/mftf run:manifest <current_group.txt>`.
88-
- Gather artifacts from `dev/tests/acceptance/tests/_output` from current node to master.
91+
- Stash artifacts from main node and un-stash on current node.
92+
- Run `vendor/bin/mftf run:manifest <current_group.txt>` on current node.
93+
- Gather artifacts from `dev/tests/acceptance/tests/_output` from current node to main node.
8994

90-
#### Rerun options
95+
### Rerun options
9196

9297
In either single or parallel execution, to re-run failed tests simply add the `run:failed` command after executing a manifest:
9398

@@ -97,12 +102,13 @@ vendor/bin/mftf run:failed
97102

98103
### Generate Allure report
99104

100-
In the master node, simply generate using your `<path_to_results>` into a desired output path
105+
In the main node, simply generate using your `<path_to_results>` into a desired output path
101106

102107
```bash
103108
allure generate <path_to_results> -c -o <path_to_output>
104109
```
105110

106111
<!-- Link definitions -->
107-
[Install Magento using Composer]: https://devdocs.magento.com/guides/v2.3/install-gde/composer.html
112+
[Install Magento using Composer]: https://devdocs.magento.com/guides/v2.4/install-gde/composer.html
113+
[Configure 2FA]: ../configure-2fa.md
108114
[Allure]: https://docs.qameta.io/allure/

0 commit comments

Comments
 (0)