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/guides/test-isolation.md
+15Lines changed: 15 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -11,6 +11,21 @@ An MFTF test is considered fully isolated if
11
11
1. It does not leave data behind.
12
12
2. It does not leave Magento configured in a different state than when the test started.
13
13
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.
0 commit comments