In the Test Runner area, appoint the configuration YML file to use for launching and executing scenarios.īy default, Codeception looks for a codeception.yml or configuration file in the project root folder. PhpStorm detects the version of Codeception and displays it below the field. Click next to the Path to Codeception directory or phar file field. For example, if you installed Codeception through Composer, the executable file is stored in vendor/bin/codecept. In the Codeception Library area, specify the location of the Codeception executable file or codeception.phar archive in the target environment. To use Codeception with a remote PHP interpreter, choose one of the configurations in the dialog that opens: For more information, refer to Default project CLI interpreters. In local configurations, the default project PHP interpreter is used. On the Test Frameworks page that opens, click in the central pane and choose the configuration type from the list: In the Settings dialog ( Control+Alt+S), go to PHP | Test Frameworks. If the codeception.yml or configuration file is detected under the project (or subproject) root automatically or specified explicitly during manual configuration, PhpStorm also creates a respective Codeception run/debug configuration. ![]() You can manually configure the used local or remote PHP interpreter separately for each of the Composer-managed test framework configurations. PhpStorm detects the installed Codeception executable (or executables, if the project has Composer-managed subprojects with a specified Codeception dependency) and creates a test framework configuration per each installed Codeception executable on the Test Frameworks page. ![]() Store the codeception.yml or configuration file under the project root. If you installed Codeception globally through Composer, type codecept bootstrap for all platforms. ![]() If you installed codeception.phar in your project, type php codecept.phar bootstrap for Windows and macOS or codecept bootstrap for Linux. Open the built-in PhpStorm Terminal Alt+F12 and at the command prompt type one of the following commands depending on the installation mode and your current operating system: Having installed Codeception, you need to initialize it in your project by generating a codeception.yml configuration file. Generate a codeception.yml configuration file In the case of remote PHP interpreters, manual Codeception configuration is required. If you use a local PHP interpreter, PhpStorm performs initial Codeception configuration automatically. Integrate Codeception with PhpStorm in a project Learn more about installing Codeception from Codeception Official website.Ĭlick next to the package record in the composer.json editor gutter to jump to the corresponding Settings page and configure Codeception manually. Press Alt+Enter and select whether you want to install a specific dependency or all dependencies at once. ![]() If the Non-installed Composer packages inspection is enabled, PhpStorm will highlight the declared dependencies that are not currently installed. Press Control+Space to get code completion for the package name and version.Ĭlick the Install shortcut link on top of the editor panel. Inside composer.json, add the codeception/codeception dependency record to the require or require-dev key. In either case, PhpStorm will include codeception.phar in indexing, so it will successfully resolve references to the Codeception classes and thus provide you with full coding assistance.ĭownload and install Codeception with Composer You can also save codeception.phar in a different location and configure it as an include path. Download and install Codeception manuallyĭownload codeception.phar at the Codeception Installation page and save it under the root of the project where Codeception will be later used. Download and install Codeceptionīefore you start, make sure Composer is installed on your machine and initialized in the current project as described in Composer dependency manager. Make sure the PHP interpreter is configured in PhpStorm on the PHP page, as described in Configure local PHP interpreters and Configure remote PHP interpreters. PhpStorm provides support for running unit, functional, and acceptance tests with the Codeception test framework, versions 2.2.0 and later.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |