Skip to content

Commit d00b73e

Browse files
author
davert
committed
reference updated
1 parent 5949fa6 commit d00b73e

File tree

1 file changed

+26
-19
lines changed

1 file changed

+26
-19
lines changed

docs/reference/commands.markdown

Lines changed: 26 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -8,34 +8,41 @@ title: Codeception Commands
88
Depending on version run Codeception console uitility in following way:
99

1010
* `php codecept.phar run` - for downloaded phar executable.
11-
* `codecept run` - for PEAR installation
1211
* `vendor/bin/codecept` - for composer installation.
12+
* `./codecept` - for cloned from GitHub.
1313

14-
The commands listed below use PEAR installation as an example.
14+
The commands listed below use PHAR installation as an example.
1515

1616
### Run
1717

1818
Executes Tests.
1919

2020
#### Usage
2121

22-
* `codecept run` - executes all tests in all suites
23-
* `codecept run tests/suitename/testnameCept.php` - executes test by it's path.
24-
* `codecept run suitename` - executes all test from this suite
25-
* `codecept run suitename testnameTest.php` - executes one test of this suite (provide local path for suite directory).
22+
* `php codecept.phar run` - executes all tests in all suites
23+
* `php codecept.phar run tests/suitename/testnameCept.php` - executes test by it's path.
24+
* `php codecept.phar run tests/suitename/foldername` - executes tests from folder.
25+
* `php codecept.phar run suitename` - executes all test from this suite
26+
* `php codecept.phar run suitename testnameTest.php` - executes one test of this suite (provide local path for
27+
suite directory).
28+
* `php codecept.phar run -g admin` - executes tests by group.
2629

2730
#### Options
2831

29-
* `--debug` - additional debug output will be printed.
32+
* `--debug` or `-d` - additional debug output will be printed.
3033
* `--steps` - all performed actions will be printed to console.
34+
* `--config` or `-c` - specify different path to config or project folder.
3135
* `--colors` - turn on colors (if disabled)
3236
* `--silent` - don't show the progress output.
3337
* `--report` - format results in report mode.
38+
* `--group` or `-g` - execute tests of a group (several options can be passed).
3439
* `--no-exit` - don't provide exit codes on finish. This option may be useful for using Codeception with some CI servers like Bamboo.
40+
* `--defer-flush` - don't flush output during ru
3541
* `--html` - generate html file with results. It will be stored as 'report.html' in tests/_log.
3642
* `--xml` - generate report in JUnit format for CI services. It will be stored as 'report.xml' in tests/_log.
3743
* `--tap` - generate report in TAP format. It will be stored as 'report.tap.log' in tests/_log.
3844
* `--json` - generate report in Json format. It will be stored as 'report.json' in tests/_log.
45+
* `--coverage` - generate code coverage report (requires proper configuration).
3946

4047
### Boostrap
4148

@@ -44,15 +51,15 @@ Use this command to start building a test suite.
4451

4552
#### Usage
4653

47-
* `codecept bootstrap`
54+
* `php codecept.phar bootstrap`
4855

4956
### Generate Suite
5057

5158
Generates a new empty suite. You may generate new suite for integration tests, for testing different part of appications, etc.
5259

5360
#### Usage
5461

55-
* `codecept generate:suite suitename guyname` - provide name of suite and name a Guy who will be used in tests.
62+
* `php codecept.phar generate:suite suitename guyname` - provide name of suite and name a Guy who will be used in tests.
5663

5764
Don't create two guys with the same name!
5865

@@ -62,35 +69,35 @@ Generates new empty test file for acceptance and functional tests. Scenario-base
6269

6370
#### Usage
6471

65-
* `codecept generate:cept suitename testname` - generates testnameCept.php inside the suite.
66-
* `codecept generate:cept suitename subdir/subdir/testnameCept.php` - generates file in subdir/subdir of suite dir.
72+
* `php codecept.phar generate:cept suitename testname` - generates testnameCept.php inside the suite.
73+
* `php codecept.phar generate:cept suitename subdir/subdir/testnameCept.php` - generates file in subdir/subdir of suite dir.
6774

6875
### Generate Cest
6976

7077
Generates new empty test file for scenario-based unit tests. This file format is called Cest = Cept + Test.
7178

7279
#### Usage
7380

74-
* `codecept generate:cest suitename testname` - generates testnameCest.php inside the suite.
75-
* `codecept generate:cest suitename "\Namespace\Subnamespace\testnameCest.php"` - generates file in `Namespace/Subnamepace` of suite dir (according to PSR-0). Generated file will have a namespace defined.
81+
* `php codecept.phar generate:cest suitename testname` - generates testnameCest.php inside the suite.
82+
* `php codecept.phar generate:cest suitename "\Namespace\Subnamespace\testnameCest.php"` - generates file in `Namespace/Subnamepace` of suite dir (according to PSR-0). Generated file will have a namespace defined.
7683

7784
### Generate Test
7885

7986
Generates new empty test file for Codeception powered unit test.
8087

8188
#### Usage
8289

83-
* `codecept generate:test suitename testname` - generates testnameTest.php inside the suite.
84-
* `codecept generate:test suitename "\Namespace\Subnamespace\testnameTest.php"` - generates file in `Namespace/Subnamepace` of suite dir (according to PSR-0). Generated file will have a namespace defined.
90+
* `php codecept.phar generate:test suitename testname` - generates testnameTest.php inside the suite.
91+
* `php codecept.phar generate:test suitename "\Namespace\Subnamespace\testnameTest.php"` - generates file in `Namespace/Subnamepace` of suite dir (according to PSR-0). Generated file will have a namespace defined.
8592

8693
### Generate Classical PHPUnit Test
8794

8895
Generates new empty test file for Codeception powered unit test.
8996

9097
#### Usage
9198

92-
* `codecept generate:phpunit suitename testname` - generates testnameTest.php inside the suite.
93-
* `codecept generate:phpunit suitename "\Namespace\Subnamespace\testnameTest.php"` - generates file in `Namespace/Subnamepace` of suite dir (according to PSR-0). Generated file will have a namespace defined.
99+
* `php codecept.phar generate:phpunit suitename testname` - generates testnameTest.php inside the suite.
100+
* `php codecept.phar generate:phpunit suitename "\Namespace\Subnamespace\testnameTest.php"` - generates file in `Namespace/Subnamepace` of suite dir (according to PSR-0). Generated file will have a namespace defined.
94101

95102

96103
### Generate Scenarios
@@ -99,13 +106,13 @@ Generates text representation for all tests in suite. They are called scenarios
99106

100107
#### Usage
101108

102-
* `codecept generate:scenarios suitename` - generates for this suite.
109+
* `php codecept.phar generate:scenarios suitename` - generates for this suite.
103110

104111
### Analyze
105112

106113
Searches for all actions used in tests but not defined yet in modules. Asks to generate stub methods in helpers for corresponding steps.
107114

108115
#### Usage
109116

110-
* `codecept analyze suitename` - analyzes actions for suite.
117+
* `php codecept.phar analyze suitename` - analyzes actions for suite.
111118

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy