Download the PHP package knectar/behat-ci without Composer
On this page you can find all versions of the php package knectar/behat-ci. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download knectar/behat-ci
More information about knectar/behat-ci
Files in knectar/behat-ci
Package behat-ci
Short Description A console application that schedules, generates configurations, and runs behat tests on a server
License MIT
Homepage https://github.com/Knectar/behat-ci
Informations about the package behat-ci
behat-ci
Introduction
Behat continuous integration CLI is an efficient way to manage Behat configurations and have Behat testing run automatically when a project is updated. It will also generate a custom Behat.yml configuration file for you. All you have to do is specify the profiles.
System requirements
Installation
- Include behat-ci in your global composer.json with
composer global require knectar/behat-ci
- Run
composer global update
to install (No database configuration needed.) - Run
composer install
in the directory where the app was saved. (usually /home/user/.composer/vendor/knectar/behat-ci/app) - Update your system PATH to include the application's app directory (path/to/global/.composer/vendor/knectar/behat-ci/app)
- That is all, we can now run this application's commands!
Configuration
The smooth running of behat-ci relies on several files working in synchrony.
bhqueue.txt is a simple text file that keeps track of when tests are scheduled to be run, written to by the bh schedule
command.
profiles.yml is a list of device profiles as well as default Behat configuration. Feel free to add more and customize according to the current standards and what is available on sauce labs. See the sample files for use as a template.
projects.yml is a list of your projects that to run tests against. It will contain an entry per project, structured as follows:
Note: by default, projects.yml, profiles.yml, bhqueue, and bhqueuelog are located in the /etc/behat-ci/ directory. Trigger will look for profiles.yml and projects.yml to be set up in /etc/behat-ci or in the user's home directory. Otherwise the absolute paths to the files must be set in config.yml so the command knows where to look.
Usage
For details on the commands in the console, simply run
bh
The application relies on 2 key commands,
bh schedule
Is to be called when changes are pushed (or manually). This command will
- Update bhqueue.txt, which tells the application that tests need to be run.
-
Generate the .yml configuration file required to run customized Behat configurations. This file will be stored in /tmp and disposed of by the 'trigger' command. You may use behat-ci to just generate behat.yml files and execute behat testing manually by running
bh schedule $projname -b $branchname
followed bybehat -c /tmp/project_env.yml
bh trigger Is meant to be called periodically (every minute) by cron on the server. It checks bhqueue to see if a change has been made in the project and if testing needs to be done. It will run the Behat tests as needed with the specified flags/parameters.
To run tests manually in a single command, run
bh test
with the same input arguments as bh schedule, and the application will perform schedule and trigger consecutively.
All versions of behat-ci with dependencies
symfony/symfony Version 2.7.*
symfony/monolog-bundle Version ~2.4
incenteev/composer-parameter-handler Version ~2.0
symfony/console Version ^2.7
symfony/yaml Version ^2.7