Skip to content

Commit d236e2d

Browse files
committed
Merge branch 'pr625' into lbajsarowicz-doc-rollup
2 parents 84d2074 + c161ab1 commit d236e2d

File tree

1 file changed

+65
-72
lines changed

1 file changed

+65
-72
lines changed

docs/introduction.md

Lines changed: 65 additions & 72 deletions
Original file line numberDiff line numberDiff line change
@@ -1,73 +1,101 @@
11
# Introduction to the Magento Functional Testing Framework
22

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.
44

5-
The Magento Functional Testing Framework (MFTF) aims to replace the [Functional Testing Framework] in future releases.
6-
MFTF improves:
5+
## Goals
76

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.
1310

14-
Because MFTF tests are written in XML, you no longer need to learn PHP to write tests.
11+
**MFTF also focuses on**
1512

16-
<div class="bs-callout bs-callout-info" markdown="1">
17-
We are actively developing functional tests.
18-
Refer to `<magento_root>/app/code/<vendor_name>/<module_name>/Test/Mftf/` for examples.
19-
Check out the [MFTF Test Migration][] repo.
20-
</div>
13+
- **Traceability** for clear logging and reporting capabilities.
14+
- **Modularity** to run tests based on installed modules and extensions.
15+
- **Customizability** for existing tests.
16+
- **Readability** using clear and declarative XML test steps.
17+
- **Maintainability** based on simple test creation and overall structure.
2118

2219
## Audience
2320

24-
This MFTF guide is intended for Magento developers and software engineers, such as QA specialists, PHP developers, and system integrators.
21+
- **Contributors**: Tests build their confidence about the results of changes introduced to the platform.
22+
- **Extension Developers**: Can adjust expected behaviour according to their customizations.
23+
- **System Integrators**: MFTF coverage provided out-of-the-box with Magento is solid base for Acceptance / Regression Tests.
2524

26-
## Goals
25+
## MFTF tests
26+
27+
The MFTF supports two different locations for storing the tests and test artifacts:
28+
29+
- `<magento_root>/app/code/<vendor_name>/<module_name>/Test/Mftf/` is the location of local, customized tests.
30+
- `<magento_root>/vendor/<vendor_name>/<module_name>/Test/Mftf/` is location of tests provided by Magento and vendors.
31+
32+
If you installed Magento with Composer, please refer to `vendor/magento/<module_dir>/Test/Mftf/` for examples.
33+
34+
### Directory Structure
2735

28-
The purpose of MFTF is to:
36+
The file structure under both of the both path cases is the same:
2937

30-
- Facilitate functional testing and minimize the effort it takes to perform regression testing.
31-
- Make it easier to support the extension and customization of tests via XML merging.
38+
```tree
39+
Test
40+
└── Mftf
41+
├── ActionGroup
42+
│   └── ...
43+
├── Data
44+
│   └── ...
45+
├── Metadata
46+
│   └── ...
47+
├── Page
48+
│   └── ...
49+
├── Section
50+
│   └── ...
51+
└── Test
52+
└── ...
53+
```
3254

33-
## Scope
3455

35-
MFTF will enable you to:
56+
<div class="bs-callout bs-callout-info" markdown="1">
3657

37-
- 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>
4161

4262
## Use cases
4363

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.
4566

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.
69+
70+
* **Integration Agency** maintains Client's e-commerce.
71+
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
4781

4882
## Find your MFTF version
4983

5084
There are two options to find out your MFTF version:
5185

52-
- using the MFTF CLI
53-
- using the Composer CLI
86+
- using the MFTF CLI
87+
- using the Composer CLI
5488

55-
### MFTF CLI
89+
All the Command Line commands needs to be executed from `<magento_root>`
5690

57-
```bash
58-
cd <magento_root>/
59-
```
91+
### MFTF CLI
6092

6193
```bash
6294
vendor/bin/mftf --version
6395
```
6496

6597
### Composer CLI
6698

67-
```bash
68-
cd <magento_root>/
69-
```
70-
7199
```bash
72100
composer show magento/magento2-functional-testing-framework
73101
```
@@ -89,41 +117,6 @@ utils // The test-running utilities.
89117
codeception.dist.yml // Codeception configuration (generated while running 'bin/mftf build:project')
90118
```
91119

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-
127120
## MFTF on Github
128121

129122
Follow the [MFTF project] and [contribute on Github].

0 commit comments

Comments
 (0)