Download the PHP package oprudkyi/codeception-events-scripting without Composer
On this page you can find all versions of the php package oprudkyi/codeception-events-scripting. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download oprudkyi/codeception-events-scripting
More information about oprudkyi/codeception-events-scripting
Files in oprudkyi/codeception-events-scripting
Package codeception-events-scripting
Short Description The Codeception extension for automatically running shell scripts on codeception events
License MIT
Informations about the package codeception-events-scripting
oprudkyi/codeception-events-scripting The Codeception extension for automatically running shell scripts on codeception events.
About
Run shell scripts on codeception's events - before/after tests/suites (like db seeding, stopping-running additional software etc.) Inspired by Phantoman extension for Codeception, though allow to run anything in more generic way.
Minimum Requirements
- Codeception 2.1.0
- PHP 5.5
Installation
This project can be installed via Composer. To get the latest version, simply add the following line to the require block of your composer.json file:
{
"require-dev": {
"oprudkyi/codeception-events-scripting": "*"
}
}
You'll then need to run composer install
or composer update
to download the
package and have the autoloader updated.
Or run the following command:
Configuration
Enable extension in the codeception.yml and write commands. Next events are supported:
- BeforeAll - run before tests on every "codecept run"
- AfterAll - run after all tests
- BeforeSuite - run before each suite (use 'suites' array to run only for selected suites)
- AfterSuite - run after each suite (use 'suites' array to run only for selected suites)
supported next attributes:
- command - command line to run (for one-liners you can write command directly)
- description - echoed before command
- params - additional params for command
- ignoreErrors - don't break testing if command fails (failed or retval != 0)
- suites - single name or array of suites to run command for (applied to base name, like 'acceptance' as well to long name 'acceptance (phantom, firefox)')
- environments - single name or array of environments
- platforms - single name or array of platforms (uses
PHP_OS
constant, i.e. the platform where PHP was built, check here for details)
Real example (start/stop mailcatcher and seed db):
Testing
Contribute
This package is (yet) under development and refactoring but is ready for production. Please, feel free to comment, contribute and help. I will be happy to get some help to deliver tests.
License
Codeception's events scripting is licensed under The MIT License (MIT).