Skip to content

Commit 11a250d

Browse files
committed
MQE-1579: Outline test isolation best practices
- CR Fixes
1 parent bf7f5f3 commit 11a250d

File tree

1 file changed

+15
-0
lines changed

1 file changed

+15
-0
lines changed

docs/guides/test-isolation.md

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,21 @@ An MFTF test is considered fully isolated if
1111
1. It does not leave data behind.
1212
2. It does not leave Magento configured in a different state than when the test started.
1313
3. It does not affect a following test's outcome.
14+
4. It does not rely on an irregular configuration to start its preconditions.
15+
16+
### Deleting versus Restoring
17+
18+
In the above list, points 1 and 2 refer to leaving things behind during test execution. This means you will be either deleting or restoring entities in Magento after your test's execution.
19+
20+
Some examples of entities to be deleted include:
21+
1. Products
22+
2. Categories
23+
3. Rules (Price, Related Products)
24+
25+
The list of entities to restore is much simpler:
26+
1. Application Configuration
27+
28+
The distinction above is because MFTF tests expect the environment to be in a completely clean state, outside of a test or suite's preconditions. Data must be cleaned up and any application configuration must go back to the default.
1429

1530
## Why is isolation important?
1631

0 commit comments

Comments
 (0)