1
1
# Suites
2
2
3
- Suites are essentially groups of tests that run in the specific conditions (preconditions and postconditions).
4
- They enable you including, excluding, and grouping tests for a customized test run when you need it .
3
+ Suites are essentially groups of tests that run in specific conditions (preconditions and postconditions).
4
+ They enable including, excluding, and grouping tests for a customized test run.
5
5
You can form suites using separate tests, groups, and modules.
6
6
7
7
Each suite must be defined in the ` <magento 2 root>/dev/tests/acceptance/tests/_suite/suite.xml ` file.
@@ -18,7 +18,6 @@ The format of a suite:
18
18
19
19
``` xml
20
20
<?xml version =" 1.0" encoding =" UTF-8" ?>
21
-
22
21
<suites xmlns : xsi =" http://www.w3.org/2001/XMLSchema-instance" xsi : noNamespaceSchemaLocation =" ../../dev/tests/acceptance/vendor/magento/magento2-functional-testing-framework/src/Magento/FunctionalTestingFramework/Suite/etc/suiteSchema.xsd" >
23
22
<suite name =" " >
24
23
<before >
@@ -42,12 +41,14 @@ The format of a suite:
42
41
## Principles
43
42
44
43
- A suite name:
45
- - must not match any existing group value.
44
+
45
+ - must not match any existing group value.
46
46
For example, the suite ` <suite name="ExampleTest"> ` will fail during test run if any test contains in annotations ` <group value="ExampleTest"> ` .
47
- - must not be ` default ` or ` skip ` . Tests that are not in any suite are generated under the ` default ` suite.
48
- The suite name ` skip ` is synonymous to including a test in the ` <group value="skip"/> ` , which will be deprecated in MFTF 3.0.0.
49
- - can contain letters, numbers, and underscores.
50
- - should be upper camel case.
47
+ - must not be ` default ` or ` skip ` . Tests that are not in any suite are generated under the ` default ` suite.
48
+ The suite name ` skip ` is synonymous to including a test in the ` <group value="skip"/> ` , which will be deprecated in MFTF 3.0.0.
49
+ - can contain letters, numbers, and underscores.
50
+ - should be upper camel case.
51
+
51
52
- A suite must contain at least one ` <include> ` , or one ` <exclude> ` , or both.
52
53
- Using ` <before> ` in a suite, you must add the corresponding ` <after> ` to restore the initial state of your testing instance.
53
54
@@ -134,7 +135,7 @@ It performs the following steps:
134
135
* After* the testing, the suite returns the Magento instance to the initial state disabling WYSIWYG:
135
136
136
137
1 . Log back in.
137
- 2 . Disable ** WYSIWYG** so that
138
+ 2 . Disable ** WYSIWYG** in the Magento instance.
138
139
139
140
This suite includes all tests that contain the ` <group value="WYSIWYG"/> ` annotation.
140
141
@@ -243,11 +244,11 @@ The element can contain [`<test>`], [`<group>`], and [`<module>`].
243
244
244
245
A set of filters that you can use to specify which tests to exclude in the test suite.
245
246
246
- There two types of behavior:
247
+ There are two types of behavior:
247
248
248
249
1 . Applying filters to the included tests when the suite contains [ ` <include> ` ] filters.
249
250
The MFTF will exclude tests from the previously included set and generate the remaining tests in the suite.
250
- 2 . Applying filter to all tests when the suite does not contain [ ` <include> ` ] filters.
251
+ 2 . Applying filters to all tests when the suite does not contain [ ` <include> ` ] filters.
251
252
The MFTF will generate all existing tests except the excluded.
252
253
In this case, the custom suite will contain all generated tests except excluded, and the _ default_ suite will contain the excluded tests only.
253
254
0 commit comments