You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/introduction.md
+65-72Lines changed: 65 additions & 72 deletions
Original file line number
Diff line number
Diff line change
@@ -1,73 +1,101 @@
1
1
# Introduction to the Magento Functional Testing Framework
2
2
3
-
[Find your MFTF version][]of the MFTF.
3
+
The **Magento Functional Tesitng Framework** (MFTF) is framework to perform end-to-end acceptance testing. Tests are performed in real web browser (eg. Google Chrome) just like the real user of the Magento store.
4
4
5
-
The Magento Functional Testing Framework (MFTF) aims to replace the [Functional Testing Framework] in future releases.
6
-
MFTF improves:
5
+
## Goals
7
6
8
-
-**Traceability** for clear logging and reporting capabilities.
9
-
-**Modularity** to run tests based on installed modules and extensions.
10
-
-**Customizability** for existing tests.
11
-
-**Readability** using clear and declarative XML test steps.
12
-
-**Maintainability** based on simple test creation and overall structure.
7
+
- Facilitate functional testing and minimize the effort it takes to perform regression testing.
8
+
- Enable extension developers to provide the Functional Tests to offered extensions.
9
+
- Having common standard of Quality Assurrance between Magento, Extension Developers and System Intergrators.
13
10
14
-
Because MFTF tests are written in XML, you no longer need to learn PHP to write tests.
- Test user interactions with web applications in testing.
38
-
- Write functional tests located in `<magento_root>/app/code/<vendor_name>/<module_name>/Test/Mftf/`.
39
-
- Cover basic functionality using out-of-the-box tests. You can test extended functionality using custom tests.
40
-
- Automate regression testing.
58
+
We are actively developing functional tests. Check out the [MFTF Test Migration][] repository.
59
+
60
+
</div>
41
61
42
62
## Use cases
43
63
44
-
As a Magento developer, test changes, such as extended search functionality, a new form attribute, or new product tags.
64
+
***Contributor** changes the core behaviour, fixing the annoing bug.
65
+
He wants to have automated "supervisor" which is going to verify his work continuously across the stages of bug fixing. Finally, when fix is done - Functional Test is also proof of work done.
45
66
46
-
As a software engineer, perform regression testing before release to ensure that Magento works as expected with new functionality.
67
+
***Extension Developer** offers extension that changes core behaviour.
68
+
He can easily write new tests to make sure that after enabling the feature, Magento behaves properly. Everything with just extending existing tests. As a result he don't need to write coverage from scratch.
They are able to customize tests delivered with Magento core to follow customizations implemented to Magento. After each upgrade they can just run the MFTF tests to know that no regression was introduced.
72
+
73
+
74
+
## MFTF output
75
+
76
+
- Generated PHP Codeception tests
77
+
- Codeception results and console logs
78
+
- Screenshots and HTML failure report
79
+
- Allure formatted XML results
80
+
- Allure report dashboard of results
47
81
48
82
## Find your MFTF version
49
83
50
84
There are two options to find out your MFTF version:
51
85
52
-
-using the MFTF CLI
53
-
-using the Composer CLI
86
+
- using the MFTF CLI
87
+
- using the Composer CLI
54
88
55
-
### MFTF CLI
89
+
All the Command Line commands needs to be executed from `<magento_root>`
56
90
57
-
```bash
58
-
cd<magento_root>/
59
-
```
91
+
### MFTF CLI
60
92
61
93
```bash
62
94
vendor/bin/mftf --version
63
95
```
64
96
65
97
### Composer CLI
66
98
67
-
```bash
68
-
cd<magento_root>/
69
-
```
70
-
71
99
```bash
72
100
composer show magento/magento2-functional-testing-framework
73
101
```
@@ -89,41 +117,6 @@ utils // The test-running utilities.
89
117
codeception.dist.yml // Codeception configuration (generated while running 'bin/mftf build:project')
90
118
```
91
119
92
-
## MFTF output
93
-
94
-
- Generated PHP Codeception tests
95
-
- Codeception results and console logs
96
-
- Screenshots and HTML failure report
97
-
- Allure formatted XML results
98
-
- Allure report dashboard of results
99
-
100
-
## MFTF tests
101
-
102
-
The MFTF supports two different locations for storing the tests and test artifacts:
103
-
104
-
-`<magento_root>/app/code/<vendor_name>/<module_name>/Test/Mftf/` is the directory to create new tests.
105
-
-`<magento_root>/vendor/<vendor_name>/<module_name>/Test/Mftf/` is the directory with the out of the box tests (fetched by the Composer).
106
-
107
-
All tests and test data from these locations are merged in the order indicated in the above list.
108
-
109
-
The file structure under the both path cases is the same:
110
-
111
-
```tree
112
-
<Path>
113
-
├── ActionGroup
114
-
│ └── ...
115
-
├── Data
116
-
│ └── ...
117
-
├── Metadata
118
-
│ └── ...
119
-
├── Page
120
-
│ └── ...
121
-
├── Section
122
-
│ └── ...
123
-
└── Test
124
-
└── ...
125
-
```
126
-
127
120
## MFTF on Github
128
121
129
122
Follow the [MFTF project] and [contribute on Github].
0 commit comments