Skip to content

MQE-2216: Annual Docs Review Part 3 #761

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 4 commits into from
Jul 21, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
72 changes: 40 additions & 32 deletions docs/commands/codeception.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# CLI commands: vendor/bin/codecept

<div class="bs-callout bs-callout-warning" markdown="1">
We do not recommend using Codeception commands directly as they can break the MFTF basic workflow.
We do not recommend using Codeception commands directly as they can break MFTF basic workflow.
All the Codeception commands you need are wrapped using the [mftf tool][].

To run the Codeception testing framework commands directly, change your directory to the `<Magento root>`.
Expand Down Expand Up @@ -36,7 +36,7 @@ vendor/bin/codecept run
```

<div class="bs-callout bs-callout-info">
The following documentation corresponds to Codeception 2.3.8.
The following documentation corresponds to Codeception 4.1.4.
</div>

```bash
Expand All @@ -47,36 +47,44 @@ Arguments:
test test to be run

Options:
-o, --override=OVERRIDE Override config values (multiple values allowed)
--config (-c) Use custom path for config
--report Show output in compact style
--html Generate html with results (default: "report.html")
--xml Generate JUnit XML Log (default: "report.xml")
--tap Generate Tap Log (default: "report.tap.log")
--json Generate Json Log (default: "report.json")
--colors Use colors in output
--no-colors Force no colors in output (useful to override config file)
--silent Only outputs suite names and final results
--steps Show steps in output
--debug (-d) Show debug and scenario output
--coverage Run with code coverage (default: "coverage.serialized")
--coverage-html Generate CodeCoverage HTML report in path (default: "coverage")
--coverage-xml Generate CodeCoverage XML report in file (default: "coverage.xml")
--coverage-text Generate CodeCoverage text report in file (default: "coverage.txt")
--coverage-phpunit Generate CodeCoverage PHPUnit report in file (default: "coverage-phpunit")
--no-exit Do not finish with exit code
--group (-g) Groups of tests to be executed (multiple values allowed)
--skip (-s) Skip selected suites (multiple values allowed)
--skip-group (-x) Skip selected groups (multiple values allowed)
--env Run tests in selected environments. (multiple values allowed, environments can be merged with ',')
--fail-fast (-f) Stop after first failure
--help (-h) Display this help message.
--quiet (-q) Do not output any message.
--verbose (-v|vv|vvv) Increase the verbosity of messages: 1 for normal output, 2 for more verbose output and 3 for debug
--version (-V) Display this application version.
--ansi Force ANSI output.
--no-ansi Disable ANSI output.
--no-interaction (-n) Do not ask any interactive question.
-o, --override=OVERRIDE Override config values (multiple values allowed)
-e, --ext=EXT Run with extension enabled (multiple values allowed)
--report Show output in compact style
--html[=HTML] Generate html with results [default: "report.html"]
--xml[=XML] Generate JUnit XML Log [default: "report.xml"]
--phpunit-xml[=PHPUNIT-XML] Generate PhpUnit XML Log [default: "phpunit-report.xml"]
--tap[=TAP] Generate Tap Log [default: "report.tap.log"]
--json[=JSON] Generate Json Log [default: "report.json"]
--colors Use colors in output
--no-colors Force no colors in output (useful to override config file)
--silent Only outputs suite names and final results
--steps Show steps in output
-d, --debug Show debug and scenario output
--bootstrap[=BOOTSTRAP] Execute custom PHP script before running tests. Path can be absolute or relative to current working directory [default: false]
--no-redirect Do not redirect to Composer-installed version in vendor/codeception
--coverage[=COVERAGE] Run with code coverage
--coverage-html[=COVERAGE-HTML] Generate CodeCoverage HTML report in path
--coverage-xml[=COVERAGE-XML] Generate CodeCoverage XML report in file
--coverage-text[=COVERAGE-TEXT] Generate CodeCoverage text report in file
--coverage-crap4j[=COVERAGE-CRAP4J] Generate CodeCoverage report in Crap4J XML format
--coverage-phpunit[=COVERAGE-PHPUNIT] Generate CodeCoverage PHPUnit report in path
--no-exit Don't finish with exit code
-g, --group=GROUP Groups of tests to be executed (multiple values allowed)
-s, --skip=SKIP Skip selected suites (multiple values allowed)
-x, --skip-group=SKIP-GROUP Skip selected groups (multiple values allowed)
--env=ENV Run tests in selected environments. (multiple values allowed)
-f, --fail-fast Stop after first failure
--no-rebuild Do not rebuild actor classes on start
--seed=SEED Define random seed for shuffle setting
--no-artifacts Don't report about artifacts
-h, --help Display this help message
-q, --quiet Do not output any message
-V, --version Display this application version
--ansi Force ANSI output
--no-ansi Disable ANSI output
-n, --no-interaction Do not ask any interactive question
-c, --config[=CONFIG] Use custom path for config
-v|vv|vvv, --verbose Increase the verbosity of messages: 1 for normal output, 2 for more verbose output and 3 for debug
```

<!-- Link definitions -->
Expand Down
14 changes: 7 additions & 7 deletions docs/commands/mftf.md
Original file line number Diff line number Diff line change
Expand Up @@ -39,13 +39,13 @@ vendor/bin/mftf generate:tests
### Generate tests by test name

```bash
vendor/bin/mftf generate:tests AdminLoginTest StorefrontPersistedCustomerLoginTest
vendor/bin/mftf generate:tests AdminLoginSuccessfulTest StorefrontPersistedCustomerLoginTest
```

### Generate test by test and suite name

```bash
vendor/bin/mftf generate:tests LoginSuite:AdminLoginTest
vendor/bin/mftf generate:tests WYSIWYGDisabledSuite:AdminCMSPageCreatePageTest
```

### Generate and run the tests for a specified group
Expand All @@ -59,18 +59,18 @@ This command cleans up the previously generated tests; generates and runs tests
### Generate and run particular tests

```bash
vendor/bin/mftf run:test AdminLoginTest StorefrontPersistedCustomerLoginTest -r
vendor/bin/mftf run:test AdminLoginSuccessfulTest StorefrontPersistedCustomerLoginTest -r
```

This command cleans up the previously generated tests; generates and runs the `LoginAsAdminTest` and `LoginAsCustomerTest` tests.
This command cleans up the previously generated tests; generates and runs the `AdminLoginSuccessfulTest` and `StorefrontPersistedCustomerLoginTest` tests.

### Generate and run particular test in a specific suite's context

```bash
vendor/bin/mftf run:test LoginSuite:AdminLoginTest -r
vendor/bin/mftf run:test WYSIWYGDisabledSuite:AdminCMSPageCreatePageTest -r
```

This command cleans up previously generated tests; generates and run `AdminLoginTest` within the context of the `LoginSuite`.
This command cleans up previously generated tests; generates and run `AdminCMSPageCreatePageTest` within the context of the `WYSIWYGDisabledSuite`.

### Generate and run a testManifest.txt file

Expand Down Expand Up @@ -362,7 +362,7 @@ vendor/bin/mftf run:manifest path/to/your/testManifest.txt
Each line should contain either: one test path or one group (-g) reference.

```
tests/functional/tests/MFTF/_generated/default/AdminLoginTestCest.php
tests/functional/tests/MFTF/_generated/default/AdminLoginSuccessfulTestCest.php
-g PaypalTestSuite
tests/functional/tests/MFTF/_generated/default/SomeOtherTestCest.php
tests/functional/tests/MFTF/_generated/default/ThirdTestCest.php
Expand Down
Loading