Skip to content

Commit a0c53d5

Browse files
authored
Merge branch 'develop' into web-server-rewrites
2 parents a07bf6b + 254551d commit a0c53d5

File tree

1 file changed

+15
-19
lines changed

1 file changed

+15
-19
lines changed

docs/test.md

Lines changed: 15 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
# Test
22

33
Test cases in the Magento Functional Testing Framework (MFTF) are defined in XML as [`<tests>`].
4-
`<tests>` is a [Codeception test container][Codeception] that contains multiple individual tests with test metadata and before and after actions.
4+
`<tests>` is a [Codeception test container][Codeception] that contains individual test [`<test>`] with its metadata ([`<annotations>`]), before ([`<before>`]) and after ([`<after>`]) section.
55

6-
MFTF `<tests>` is considered a sequence of actions with associated parameters.
6+
MFTF `<test>` is considered a sequence of actions with associated parameters.
77
Any failed [assertion] within a test constitutes a failed test.
88

99
<div class="bs-callout bs-callout-info" markdown="1">
@@ -18,7 +18,7 @@ The following diagram shows the structure of an MFTF test case:
1818

1919
## Format
2020

21-
The format of `<tests>` is:
21+
The format of a test XML file is:
2222

2323
```xml
2424
<?xml version="1.0" encoding="UTF-8"?>
@@ -44,26 +44,23 @@ The format of `<tests>` is:
4444

4545
The following conventions apply to MFTF tests:
4646

47-
* All names within the framework are in the CamelCase format.
48-
* `<test>` name must be alphanumeric.
49-
* Each action and action group has its own identifier `<stepKey>` for reference purposes.
50-
* A test may have any number of [assertions][assertion] at any point within the `<test>`.
51-
* If `<test>` is included in `<suite>`, it **cannot be generated in isolation** to the rest of the contents of the suite (see [suites] for details).
5247
* One `<test>` tag is allowed per test XML file.
48+
* All names within the framework are in the **PascalCase** format and must be alphanumeric.
49+
* Each action and action group call should have its own identifier `<stepKey>`.
50+
* A test may have any number of [assertions][assertion] at any point within the `<test>`.
51+
* If `<test>` is included in [`<suite>`][suites], it **cannot be generated in isolation** from `<before>` and `<after>` section of the suite (see [suites] for details).
5352

5453
## Elements reference
5554

56-
There are several XML elements that are used in `<tests>` in the MFTF.
55+
There are several XML elements that are used within `<test>` in the MFTF.
5756

5857
### tests {#tests-tag}
5958

60-
`<tests>` is a container for multiple tests. It is a group of test methods that define test flows within a test case.
61-
62-
`<tests>` must contain at least one [`<test>`].
59+
`<tests>` is a container for test and must contain exactly one [`<test>`].
6360

6461
### test {#test-tag}
6562

66-
`<test>` is a set of steps, including [actions] and [assertions][assertion]. It is a sequence of test steps that define test flow within a test method.
63+
`<test>` is a set of steps, including [actions], [assertions][assertion] and Action Group calls. It is a sequence of test steps that define test flow within a test method.
6764

6865
Attribute|Type|Use|Description
6966
---|---|---|---
@@ -85,21 +82,20 @@ Allure annotations provide metadata for reporting.
8582

8683
### before {#before-tag}
8784

88-
`<before>` wraps the steps to perform before the [`<test>`].
85+
`<before>` wraps the steps that are preconditions for the [`<test>`]. For example: Change configuration, create Customer Account, Create Category and Product.
8986

9087
`<before>` may contain these child elements:
9188

92-
* Any [`<action>`][actions]
93-
* [`<actionGroup>`]
89+
* Any [Action][actions]
90+
* [`<actionGroup>`]s
9491

9592
### after {#after-tag}
9693

97-
`<after>` wraps the steps to perform after the [`<test>`].
98-
The steps are run in both successful **and** failed test runs.
94+
`<after>` wraps the steps to perform after the [`<test>`]. The steps are run in both successful **and** failed test runs. The goal of this section is to perform cleanup (revert the environment to the pre-test state).
9995

10096
`<after>` may contain:
10197

102-
* Any [`<action>`][actions]
98+
* Any [Action][actions]
10399
* [`<actionGroup>`]
104100

105101
### actionGroup {#actiongroup-tag}

0 commit comments

Comments
 (0)