Skip to content

Commit 7f0207a

Browse files
committed
Change a lot of code as we move MFTF docs to new repo.
1 parent 2a8c17a commit 7f0207a

29 files changed

+388
-579
lines changed

docs/best-practices.md

Lines changed: 5 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,6 @@
1-
---
2-
mftf-release: 2.3.0
3-
redirect_from: /guides/v2.3/magento-functional-testing-framework/2.3/best-practices.html
4-
---
5-
61
# Best practices
72

8-
_This topic was updated due to the {{ page.mftf-release }} MFTF release._
9-
{: style="text-align: right"}
3+
<span style="text-align: right">_This topic was updated due to the 2.3.13 MFTF release._</span>
104

115
Check out our best practices below to ensure you are getting the absolute most out of the Magento Functional Testing Framework.
126

@@ -111,15 +105,17 @@ Use a lower case first letter for:
111105
Use [parameterized selectors] for constructing a selector when test specific or runtime generated information is needed.
112106
Do not use them for static elements.
113107

114-
{:style="color:red"}
108+
<span class="color:red">
115109
BAD:
110+
</span>
116111

117112
``` xml
118113
<element name="relatedProductSectionText" type="text" selector=".fieldset-wrapper.admin__fieldset-section[data-index='{{productType}}']" parameterized="true"/>
119114
```
120115

121-
{:style="color:green"}
116+
<span class="color:green">
122117
GOOD:
118+
</span>
123119

124120
Define these three elements and reference them by name in the tests.
125121

docs/commands/codeception.md

Lines changed: 8 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,10 @@
1-
---
2-
mftf-release: 2.3.0
3-
redirect_from: /guides/v2.3/magento-functional-testing-framework/2.3/commands/codeception.html
4-
---
5-
61
# CLI commands: vendor/bin/codecept
72

8-
_This topic was updated due to the {{page.mftf-release}} MFTF release._
9-
{: style="text-align: right"}
3+
<span style="text-align: right">_This topic was updated due to the 2.3.13 MFTF release._</span>
104

11-
{:.bs-callout .bs-callout-warning}
5+
<span class="bs-callout bs-callout-warning">
126
We do not recommend using Codeception commands directly as they can break the MFTF basic workflow.
13-
All the Codeception commands you need are wrapped using the [`mftf` tool][].
7+
All the Codeception commands you need are wrapped using the [`mftf` tool][].</span>
148

159
To run the Codeception testing framework commands directly, change your directory to the `<Magento root>`.
1610

@@ -42,8 +36,9 @@ vendor/bin/codecept run functional --group example --skip-group skip
4236
vendor/bin/codecept run
4337
```
4438

45-
{: .bs-callout .bs-callout-info }
39+
<span class="bs-callout .bs-callout-info"
4640
The following documentation corresponds to Codeception 2.3.8.
41+
</span>
4742

4843
```bash
4944
Full reference:
@@ -70,7 +65,7 @@ Options:
7065
--coverage-xml Generate CodeCoverage XML report in file (default: "coverage.xml")
7166
--coverage-text Generate CodeCoverage text report in file (default: "coverage.txt")
7267
--coverage-phpunit Generate CodeCoverage PHPUnit report in file (default: "coverage-phpunit")
73-
--no-exit Don't finish with exit code
68+
--no-exit Do not finish with exit code
7469
--group (-g) Groups of tests to be executed (multiple values allowed)
7570
--skip (-s) Skip selected suites (multiple values allowed)
7671
--skip-group (-x) Skip selected groups (multiple values allowed)
@@ -87,5 +82,5 @@ Options:
8782

8883
<!-- Link definitions -->
8984

90-
[`mftf` tool]: mftf.html
91-
[annotation]: ../test/annotations.html
85+
[`mftf` tool]: mftf.md
86+
[annotation]: ../test/annotations.md

docs/commands/mftf.md

Lines changed: 5 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -1,20 +1,10 @@
1-
---
2-
mftf-release: 2.3.11
3-
redirect_from: /guides/v2.3/magento-functional-testing-framework/2.3/commands/mftf.html
4-
---
5-
61
# CLI commands: vendor/bin/mftf
72

8-
_This topic was updated due to the {{page.mftf-release}} MFTF release._
9-
{: style="text-align: right"}
3+
<span class="style="text-align: right"">_This topic was updated due to the 2.3.13 MFTF release._</span>
104

115
The Magento Functional Testing Framework (MFTF) introduces the command line interface (CLI) tool `vendor/bin/mftf` to facilitate your interaction with the framework.
126

13-
{%
14-
include note.html
15-
type='info'
16-
content='`mftf` commands replace the `robo` commands that were used in previous releases.'
17-
%}
7+
Note that `mftf` commands replace the `robo` commands that were used in previous releases.
188

199
## Command format
2010

@@ -179,10 +169,7 @@ The command that encodes this complex configuration:
179169
vendor/bin/mftf generate:tests --tests "{\r\n\"tests\":[\r\n\"general_test1\",\r\n\"general_test2\",\r\n\"general_test3\"\r\n],\r\n\"suites\":{\r\n\"sample\":[\r\n\"suite_test1\"\r\n],\r\n\"sample2\":null\r\n}\r\n}"
180170
```
181171

182-
{% include note.html
183-
type='info'
184-
content='The strings must be escaped and surrounded in quotes.'
185-
%}
172+
Note: The strings must be escaped and surrounded in quotes.
186173

187174
### `generate:suite`
188175

@@ -399,11 +386,11 @@ vendor/bin/mftf upgrade:tests /Users/user/magento2/app/code/Magento/Catalog/Test
399386

400387
<!-- LINK DEFINITIONS -->
401388

402-
[configuration]: ../configuration.html
389+
[configuration]: ../configuration.md
403390
[Reference]: #reference
404391
[build]: #buildproject
405392
[setup]: #setupenv
406-
[Reporting]: ../reporting.html
393+
[Reporting]: ../reporting.md
407394

408395
<!-- Abbreviations -->
409396

docs/configuration.md

Lines changed: 7 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,6 @@
1-
---
2-
mftf-release: 2.3.7
3-
redirect_from: /guides/v2.3/magento-functional-testing-framework/2.3/configuration.html
4-
---
5-
61
# Configuration
72

8-
_This topic was updated due to the {{page.mftf-release}} MFTF release._
9-
{: style="text-align: right"}
3+
<span style="text-align: right">_This topic was updated due to the 2.3.13 MFTF release._</span>
104

115
The `*.env` file provides additional configuration for the Magento Functional Testing Framework (MFTF).
126
To run the MFTF on your Magento testing instance, specify the basic configuration values.
@@ -26,8 +20,9 @@ Example:
2620
MAGENTO_BASE_URL=http://magento2.vagrant251
2721
```
2822

29-
{: .bs-callout .bs-callout-info }
23+
<span class=".bs-callout .bs-callout-info">
3024
If the `MAGENTO_BASE_URL` contains a subdirectory (like `http://magento.test/magento2ce`), specify [`MAGENTO_CLI_COMMAND_PATH`][].
25+
</span>
3126

3227
### MAGENTO_BACKEND_NAME
3328

@@ -93,9 +88,10 @@ SELENIUM_PROTOCOL=http
9388
SELENIUM_PATH=/wd/hub
9489
```
9590

96-
{:.bs-callout .bs-callout-warning}
91+
<span class=".bs-callout .bs-callout-warning">
9792
`SELENIUM_*` values are required if you are running Selenium on an external system.
9893
If you change the configuration of the external Selenium server, you must update these values.
94+
</span>
9995

10096
#### SELENIUM_HOST
10197

@@ -260,6 +256,6 @@ BROWSER=firefox
260256
<!-- Link definitions -->
261257

262258
[`MAGENTO_CLI_COMMAND_PATH`]: #magento_cli_command_path
263-
[generateDate]: test/actions.html#generatedate
264-
[mftf]: commands/mftf.html
259+
[generateDate]: test/actions.md#generatedate
260+
[mftf]: commands/mftf.md
265261
[timezones]: http://php.net/manual/en/timezones.php

docs/credentials.md

Lines changed: 6 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,3 @@
1-
---
2-
---
3-
41
# Credentials
52

63
When you test functionality that involves external services such as UPS, FedEx, PayPal, or SignifyD, use the MFTF credentials feature to hide sensitive [data][] like integration tokens and API keys.
@@ -69,7 +66,6 @@ carriers_usps_password=Lmgxvrq89uPwECeV
6966

7067
## Use credentials in a test
7168

72-
<!--{% raw %}-->
7369
Access the data defined in the `.credentials` file using the [`fillField`][] action with the `userInput` attribute.
7470
Define the value as a reference to the corresponding key in the credentials file such as `{{_CREDS.my_data_key}}`:
7571

@@ -89,13 +85,11 @@ The MFTF dynamically retrieves, encrypts, and decrypts the sensitive data during
8985
Decrypted credentials do not appear in the console, error logs, or [test reports][].
9086
The decrypted values are only available in the `.credentials` file.
9187

92-
{: .bs-callout .bs-callout-info }
93-
The MFTF tests delivered with Magento application do not use credentials and do not cover external services, because of sensitivity of the data.
94-
95-
<!--{% endraw %}-->
88+
<span class=".bs-callout .bs-callout-info">
89+
The MFTF tests delivered with Magento application do not use credentials and do not cover external services, because of sensitivity of the data.</span>
9690

9791
<!-- Link definitions -->
98-
[`fillField`]: test/actions.html#fillfield
99-
[data]: data.html
100-
[initial setup]: getting-started.html
101-
[test reports]: reporting.html
92+
[`fillField`]: test/actions.md#fillfield
93+
[data]: data.md
94+
[initial setup]: getting-started.md
95+
[test reports]: reporting.md

docs/data.md

Lines changed: 7 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -1,21 +1,14 @@
1-
---
2-
mftf-release: 2.3.0
3-
redirect_from: /guides/v2.3/magento-functional-testing-framework/2.3/data.html
4-
---
5-
61
# Input testing data
72

8-
_This topic was updated due to the {{page.mftf-release}} MFTF release._
9-
{: style="text-align: right"}
3+
<span style="text-align: right">_This topic was updated due to the 2.3.13 MFTF release._</span>
104

115
The MFTF enables you to specify and use `<data>` entities defined in XML. Default `<data>` entities are provided for use and as templates for entity creation and manipulation.
126
The following diagram shows the XML structure of an MFTF data object:
137

14-
{%include_relative img/data-dia.svg%}
8+
<img src="img/data-dia.svg" />
159

1610
## Supply data to test by reference to a data entity
1711

18-
{%raw%}
1912
Test steps requiring `<data>` input in an action, like filling a field with a string, may reference an attribute from a data entity:
2013

2114
```xml
@@ -64,28 +57,22 @@ Example of referencing `data` in a test:
6457
userInput="$createCustomer.email$"
6558
```
6659

67-
{%endraw%}
6860
In this example:
6961

7062
* `createCustomer` is a step key of the corresponding test step that creates an entity.
7163
* `email` is a data key of the entity.
7264
The corresponding value will be assigned to `userInput` as a result.
7365

74-
{%
75-
include note.html
76-
type="info"
77-
content='As of MFTF 2.3.6, you no longer need to differentiate between scopes (a test, a hook, or a suite) for persisted data when referencing it in tests.
66+
Note: As of MFTF 2.3.6, you no longer need to differentiate between scopes (a test, a hook, or a suite) for persisted data when referencing it in tests.
7867

7968
The MFTF now stores the persisted data and attempts to retrieve it using the combination of `stepKey` and the scope of where it has been called.
8069
The current scope is preferred, then widening to _test > hook > suite_ or _hook > test > suite_.
8170

82-
This emphasizes the practice for the `stepKey` of `createData` to be descriptive and unique, as a duplicated `stepKey` in both a `<test>` and `<before>` prefers the `<test>` data.'
83-
%}
71+
This emphasizes the practice for the `stepKey` of `createData` to be descriptive and unique, as a duplicated `stepKey` in both a `<test>` and `<before>` prefers the `<test>` data.
8472

8573
## Use data returned by test actions
8674

87-
{%raw%}
88-
A test can also reference data that was returned as a result of [test actions](./test/actions.html#actions-returning-a-variable), like the action `<grabValueFrom selector="someSelector" stepKey="grabStepKey>`.
75+
A test can also reference data that was returned as a result of [test actions](./test/actions.md#actions-returning-a-variable), like the action `<grabValueFrom selector="someSelector" stepKey="grabStepKey>`.
8976

9077
Further in the test, the data grabbed by the `someSelector` selector can be referenced using the `stepKey` value. In this case, it is `grabStepKey`.
9178

@@ -100,7 +87,7 @@ The following example shows the usage of `grabValueFrom` in testing, where the r
10087

10188
The data to operate against can be included as literals in a test. Hard-coded data input can be useful in assertions.
10289

103-
See also [Actions](./test/actions.html).
90+
See also [Actions](./test/actions.md).
10491

10592
```xml
10693
userInput="We'll email you an order confirmation with details and tracking info."
@@ -261,6 +248,4 @@ Attributes|Type|Use|Description
261248

262249
### item {#item-tag}
263250

264-
`<item>` is an individual piece of data to be passed in as part of the parent `<array>` type.
265-
266-
{%endraw%}
251+
`<item>` is an individual piece of data to be passed in as part of the parent `<array>` type.

docs/debugging.md

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,4 @@
1-
---
2-
title: Debugging MFTF Tests
3-
mftf-release: 2.3.13
4-
---
1+
# Debugging
52

63
Debugging within the Magento Functional Testing Framework is helpful in identifying test bugs by allowing you to pause execution so that you may:
74

docs/extending.md

Lines changed: 5 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,6 @@
1-
---
2-
mftf-release: 2.3.0
3-
redirect_from: /guides/v2.3/magento-functional-testing-framework/2.3/extending.html
4-
---
5-
61
# Extending
72

8-
_This topic was updated due to the {{page.mftf-release}} MFTF release._
9-
{: style="text-align: right"}
3+
<span style="text-align: right">_This topic was updated due to the 2.3.13 MFTF release._</span>
104

115
There are cases when you need to create many tests that are very similar to each other.
126
For example, only one or two parameters (for example, URL) might vary between tests.
@@ -366,7 +360,7 @@ __Use case__: Create an entity named `DivPanelGreen`, which is similar to the `D
366360
```
367361

368362
<!-- Link definitions -->
369-
[test]: ./test.html
370-
[data]: ./data.html
371-
[action group]: ./test/action-groups.html
372-
[actions]: ./test/actions.html
363+
[test]: ./test.md
364+
[data]: ./data.md
365+
[action group]: ./test/action-groups.md
366+
[actions]: ./test/actions.md

0 commit comments

Comments
 (0)