Skip to content

Commit 11955b0

Browse files
committed
Editorial pass
1 parent 03bbdb2 commit 11955b0

File tree

4 files changed

+58
-67
lines changed

4 files changed

+58
-67
lines changed

docs/best-practices.md

Lines changed: 23 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -7,36 +7,36 @@ Check out our best practices below to ensure you are getting the absolute most o
77
### Use existing Tests and resources
88

99
Magento offers more than **3000** acceptance tests, **2500** [Action group]s, **750** Page declarations with more than **1500** Section definitions.
10-
It is very probable that behaviour you want to test already exists as other Test or Action Group.
11-
Instead of writing everything by yourself - try to use `extends` attribute to refer to existing element and customize it.
10+
It is very probable that behaviour you want to test already exists as a Test or Action Group.
11+
Instead of writing everything by yourself - use `extends` attribute to refer to existing element and customize it.
1212

13-
**Resources you can reuse**
13+
**Reusable Resources**
1414

15-
* Tests (reusable with `<test extends="...">` argument)
16-
* Action Group (reusable with including `<actionGroup ref="...">`, or extending `<actionGroup extends="...">`)
17-
* Pages (reusable with reference `{{PageDefinition.url}}`)
18-
* Sections (reusable with reference `{{SectionDefinition.elementDefinition}}`)
19-
* Data Entities (reusable with reference `<createData entity="...">"` or extending `<entity extends="...">`)
15+
* Tests (reusable with `<test extends="...">` argument)
16+
* Action Group (reusable with including `<actionGroup ref="...">`, or extending `<actionGroup extends="...">`)
17+
* Pages (reusable with reference `{{PageDefinition.url}}`)
18+
* Sections (reusable with reference `{{SectionDefinition.elementDefinition}}`)
19+
* Data Entities (reusable with reference `<createData entity="...">"` or extending `<entity extends="...">`)
2020

2121
<div class="bs-callout bs-callout-warning" markdown="1">
2222

23-
Avoid using resources that are marked as **Deprecated**. Usually there's a replacement provided for deprecated resource.
23+
Avoid using resources that are marked as **Deprecated**. Usually there is a replacement provided for a deprecated resource.
2424

2525
</div>
2626

2727
### Extract repetitive Actions
2828

29-
Instead of writing a few of Tests that perform mostly the same actions, you should thing about [Action group] that is a container for repetitive Actions.
29+
Instead of writing a few of Tests that perform mostly the same actions, you should thing about [Action group] that is a container for repetitive Actions.
3030
If each run needs different data, use `<arguments>` to inject necessary information.
3131

3232
We recommend to keep Action Groups having single responsibility, for example `AdminLoginActionGroup`, which expected outcome is being logged in as Administrator when [Action group] is executed.
3333

3434
## Contribute
3535

36-
Althought Magento Core team and Contributors join their forces to cover most of the features with tests, it's impossible to have this done that quick.
36+
Althought the Magento Core team and Contributors join forces to cover most of the features with tests, it is impossible to have this done quickly.
3737
If you've covered Magento Core feature with Functional Tests - you are more than welcome to contribute.
3838

39-
You can also help with [MFTF Test Migration] to get the experience and valuable feedback from other community members and maintainers.
39+
You can also help with MFTF Test Migration to get the experience and valuable feedback from other community members and maintainers.
4040

4141
## Action group
4242

@@ -129,20 +129,20 @@ Use the _Foo.camelCase_ naming convention, which is similar to _Classes_ and _cl
129129

130130
Use an upper case first letter for:
131131

132-
- File names. Example: _StorefrontCreateCustomerTest.xml_
133-
- Test name attributes. Example: `<test name="TestAllTheThingsTest">`
134-
- Data entity names. Example: `<entity name="OutOfStockProduct">`
135-
- Page name. Example: `<page name="AdminLoginPage">`
136-
- Section name. Example: `<section name="AdminCategorySidebarActionSection">`
137-
- Action group name. Example: `<actionGroup name="LoginToAdminActionGroup">`
132+
* File names. Example: _StorefrontCreateCustomerTest.xml_
133+
* Test name attributes. Example: `<test name="TestAllTheThingsTest">`
134+
* Data entity names. Example: `<entity name="OutOfStockProduct">`
135+
* Page name. Example: `<page name="AdminLoginPage">`
136+
* Section name. Example: `<section name="AdminCategorySidebarActionSection">`
137+
* Action group name. Example: `<actionGroup name="LoginToAdminActionGroup">`
138138

139139
#### Lower case
140140

141141
Use a lower case first letter for:
142142

143-
- Data keys. Example: `<data key="firstName">`
144-
- Element names. Examples: `<element name="confirmDeleteButton"/>`
145-
- Step keys. For example: `<click selector="..." stepKey="clickLogin"/>`
143+
* Data keys. Example: `<data key="firstName">`
144+
* Element names. Examples: `<element name="confirmDeleteButton"/>`
145+
* Step keys. For example: `<click selector="..." stepKey="clickLogin"/>`
146146

147147
## Page object
148148

@@ -180,9 +180,9 @@ Define these three elements and reference them by name in the tests.
180180
1. Keep your tests short and granular for target testing, easier reviews, and easier merge conflict resolution.
181181
It also helps you to identify the cause of test failure.
182182
1. Use comments to keep tests readable and maintainable:
183-
- Keep the inline `<!-- XML comments -->` and [`<comment>`] tags up to date.
183+
* Keep the inline `<!-- XML comments -->` and [`<comment>`] tags up to date.
184184
It helps to inform the reader of what you are testing and to yield a more descriptive Allure report.
185-
- Explain in comments unclear or tricky test steps.
185+
* Explain in comments unclear or tricky test steps.
186186
1. Refer to [sections] instead of writing selectors.
187187

188188
## Test step merging order

docs/configuration.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ MAGENTO_BACKEND_NAME=admin_12346
3434

3535
### MAGENTO_BACKEND_BASE_URL
3636

37-
(Optional) If you are running Admin Panel on separate domain, you may need to specify this value:
37+
(Optional) If you are running the Admin Panel on separate a domain, specify this value:
3838

3939
Example:
4040

docs/introduction.md

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

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.
3+
The Magento Functional Tesitng Framework (MFTF) is a framework used to perform automated end-to-end functional testing.
44

55
## Goals
66

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.
7+
- To 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+
- Ensuring a common standard of quality between Magento, Extension Developers and System Intergrators.
1010

11-
**MFTF also focuses on**
11+
MFTF also focuses on
1212

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

1919
## Audience
2020

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.
21+
- **Contributors**: Tests build 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.
2424

2525
## MFTF tests
2626

@@ -52,7 +52,6 @@ Test
5252
└── ...
5353
```
5454

55-
5655
<div class="bs-callout bs-callout-info" markdown="1">
5756

5857
We are actively developing functional tests. Check out the [MFTF Test Migration][] repository.
@@ -61,30 +60,27 @@ We are actively developing functional tests. Check out the [MFTF Test Migration]
6160

6261
## Use cases
6362

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.
66-
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-
63+
- Contributor: changes the core behaviour, fixing the annoing bug.
64+
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.
65+
- Extension Developer: offers extension that changes core behaviour.
66+
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.
67+
- Integration Agency: maintains Client's e-commerce.
68+
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.
7369

7470
## MFTF output
7571

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
72+
- Generated PHP Codeception tests
73+
- Codeception results and console logs
74+
- Screenshots and HTML failure report
75+
- Allure formatted XML results
76+
- Allure report dashboard of results
8177

8278
## Find your MFTF version
8379

8480
There are two options to find out your MFTF version:
8581

86-
- using the MFTF CLI
87-
- using the Composer CLI
82+
- using the MFTF CLI
83+
- using the Composer CLI
8884

8985
All the Command Line commands needs to be executed from `<magento_root>`
9086

docs/update.md

Lines changed: 8 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,20 +1,15 @@
11
# Update the Magento Functional Testing Framework
22

33
<div class="bs-callout bs-callout-info" markdown="1">
4-
54
Both Magento `2.2` and `2.3` supports MFTF `2.5.3` ([Find your version][] of the MFTF).
6-
75
</div>
86

7+
Tests and the Framework itself are stored in different repositories.
98

10-
**Tests and the Framework itself are stored in different repositories.**
11-
12-
* Tests are stored in Module's directory.
13-
* The MFTF is installed separately (usually as a Composer dependency)
14-
15-
While pulling the latest Magento codebase, you are going to get Tests and it's dependencies (eg. Action Groups).
9+
* Tests are stored in Module's directory.
10+
* MFTF is installed separately (usually as a Composer dependency)
1611

17-
To understand types of update - please follow the [Versioning][] page.
12+
To understand different types of update - please follow the [Versioning][] page.
1813

1914
## Patch version update
2015

@@ -33,11 +28,11 @@ Takes place when **second** digit of version number changes.
3328
1. When updating from versions below `2.5.0`, verify [WYSIWYG settings][]
3429
1. You may need to run the `upgrade:tests` using `vendor/bin/mftf upgrade:tests app`
3530

36-
## Always after update
31+
## After updating
3732

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.
33+
1. It is a good idea to regenerate your IDE Schema Definition catalog with `vendor/bin/mftf generate:urn-catalog .idea/`
34+
1. Update your tests, including data, metadata and other resoruces. Check if they contain tags that are unsupported in the newer version.
35+
1. Remove the references to resources (ActionGroups, Sections, Tests) marked as deprecated.
4136

4237
<!-- Link Definitions -->
4338
[Changelog]: https://github.com/magento/magento2-functional-testing-framework/blob/master/CHANGELOG.md

0 commit comments

Comments
 (0)