alexandresalome / behat-launcher
Launch Behat tests from your browser
Requires
- php: >=5.4
- doctrine/dbal: ~2.4
- sensiolabs/ansi-to-html: ~1.0
- silex/silex: ~1.1
- silex/web-profiler: ~1.0
- symfony/console: ~2.4
- symfony/form: ~2.4
- symfony/locale: ~2.4
- symfony/process: ~2.4
- symfony/serializer: ~2.4
- symfony/translation: ~2.4
- symfony/twig-bridge: ~2.4
- symfony/validator: ~2.4
- twig/twig: ~1.15
Requires (Dev)
- alexandresalome/php-webdriver: ~0.6
- alom/journal-extension: ~0.2
- behat/behat: ~2.4
- phpunit/phpunit: ~3.7
This package is auto-updated.
Last update: 2022-10-27 16:11:29 UTC
README
An application to launch your Behat tests from your browser:
Installation
To install Behat-Launcher, you will need:
- PHP 5.4
- Apache2 or Nginx or anything that can run a PHP application
- A MySQL database
- NodeJS and npm to install Bower and Grunt
1. Get the code
Go to folder where you want to install Behat-Launcher and clone the sourcecode through git command:
cd /var/www git clone git@github.com:alexandresalome/behat-launcher.git cd behat-launcher
2. Install dependencies
Behat-Launcher works with composer, a tool to manage dependencies.
Download it in behat-launcher folder:
cd /var/www/behat-launcher curl http://getcomposer.org/installer | php php composer.phar install
This command will download dependencies in vendor/ folder to make them available to the application.
Next you will need to install the assets using Bower and Grunt.
You can install these tools using npm, the NodeJS package manager:
npm install -g bower npm install -g grunt-cli
You can now install the assets:
bower install npm install grunt
3. Configuration
In this folder, create a file config.php where you will configure your database and your projects.
You can use the config.php.dist file to get an exhaustive list of configuration features.
cd /var/www/behat-launcher cp config.php.dist config.php vi config.php # (or notepad, or whatever you use to edit this file)
4. Database
When you're done, initialize your database:
php behat-launcher init-db
5. WebServer
Now, configure your web server to make the application accessible through your webserver. Make it serve the web folder:
DocumentRoot /var/www/behat-launcher/web
Make sure web server has write access to data/ folder.
6. Background job
To run tests, Behat-Launcher needs to run jobs in background. Start it using:
cd /var/www/behat-launcher
php behat-launcher run
If you are using Linux, take a look at this gist to daemonize it.
This command will execute until you stop it. If you want command to stop after all units are ran, pass the --stop-on-finish option:
cd /var/www/behat-launcher
php behat-launcher run --stop-on-finish
You're done! Access your application through web server. Given you use Apache and only have this application set up, access http://localhost
Changelog
v0.1
- Restart one test, all tests or failed only
- Run multiple tests concurrently
- Relaunch whole run or just failed, or stop execution
- Override behat.yml configuration values
- Record additional formats (html, failed, progress, ...)
- View output while process is running