![]() |
|
sfBehatPlugin - 1.1.1Behavior Driven Development in symfony |
|
![]() |
5
users
Sign-in
to change your status |
sfBehatPlugin is a plugin for symfony applications. It help to write Cucumber-like Behat features to test symfony applications. |
sfBehatPlugin is a plugin for symfony applications. It help to write Cucumber-like Behat features to test symfony applications.
| Name | Status | |
|---|---|---|
|
|
lead | moc.liamg <<ta>> tez.reve |
Copyright (c) 2010 Konstantin Kudryashov <ever.zet@gmail.com>
Permission is hereby granted, free of charge, to any person
obtaining a copy of this software and associated documentation
files (the "Software"), to deal in the Software without
restriction, including without limitation the rights to use,
copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the
Software is furnished to do so, subject to the following
conditions:
The above copyright notice and this permission notice shall be
included in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
OTHER DEALINGS IN THE SOFTWARE.
| Version | License | API | Released |
|---|---|---|---|
| 1.1.3stable | MIT license | 1.1.0stable | 10/11/2010 |
| 1.1.2stable | MIT license | 1.1.0stable | 22/10/2010 |
| 1.1.1stable | MIT license | 1.1.0stable | 20/10/2010 |
| 1.1.0stable | MIT license | 1.1.0stable | 19/10/2010 |
| 1.0.2stable | MIT license | 1.0.1stable | 09/10/2010 |
| 1.0.1stable | MIT license | 1.0.1stable | 16/09/2010 |
| 1.0.0stable | MIT license | 1.0.0stable | 15/09/2010 |
| Version | License | API | Released |
|---|---|---|---|
| 1.1.3stable | MIT license | 1.1.0stable | 10/11/2010 |
| 1.1.2stable | MIT license | 1.1.0stable | 22/10/2010 |
| 1.1.1stable | MIT license | 1.1.0stable | 20/10/2010 |
| 1.1.0stable | MIT license | 1.1.0stable | 19/10/2010 |
| 1.0.2stable | MIT license | 1.0.1stable | 09/10/2010 |
| 1.0.1stable | MIT license | 1.0.1stable | 16/09/2010 |
| 1.0.0stable | MIT license | 1.0.0stable | 15/09/2010 |
| Version | License | API | Released |
|---|---|---|---|
| 1.1.3stable | MIT license | 1.1.0stable | 10/11/2010 |
| 1.1.2stable | MIT license | 1.1.0stable | 22/10/2010 |
| 1.1.1stable | MIT license | 1.1.0stable | 20/10/2010 |
| 1.1.0stable | MIT license | 1.1.0stable | 19/10/2010 |
| 1.0.2stable | MIT license | 1.0.1stable | 09/10/2010 |
| 1.0.1stable | MIT license | 1.0.1stable | 16/09/2010 |
| 1.0.0stable | MIT license | 1.0.0stable | 15/09/2010 |
Then Print debug, Then Print form debug, Then Print
mailer debugThen Print debug, Then Print form debug, Then Print
mailer debugbehat.yml now in config/ pathCucumber-style BDD in symfony.
sfBehatPlugin is a plugin for symfony applications. It help to write Cucumber-like Behat features to test symfony applications.
Use this to install as a plugin in a symfony app:
$ symfony plugin:install sfBehatPlugin
Use this to install as a plugin in a symfony app:
$ cd plugins && git clone git://github.com/everzet/sfBehatPlugin.git
Use this if you prefer to use git submodules for plugins:
$ git submodule add git://github.com/everzet/sfBehatPlugin.git plugins/sfBehatPlugin
and enable plugin in your ProjectConfigurations class.
After installation, you need to create features folders for your applications inside symfony's test folder. To do this, simply run:
symfony behat:setup frontend
where frontend is your application name.
To begin with Behat, you need to create your first feature file. Run:
symfony behat:generate-feature frontend main
where frontend & main is your application & module names to test
You can either run all app tests with:
behat test/features/frontend
or specific feature with:
behat test/features/frontend/main.feature
or all frontend features with simply:
behat
sfBehatPlugin installs behat.yml into your project root. This is a Behat configuration file for sf environment. So, if
you want to run your symfony features from different directory - specify configuration path manually with
(-c|--configuration option) like that:
behat -c ../behat.yml
You can create new steps simply by placing definitions in any *.php file under steps/ folder in your app features.
sfBehatPlugin has base steps to run over your application. One of them is /^I am on(?: the)? (.*)$/. This step tries to load specified page as is, but you can specify path manually in support/paths.php:
<?php
$this->pathTo = function($page) use($world) {
switch ($page) {
case 'homepage': return '/';
case 'articles list': return '/articles';
default: $page;
}
};
Behat is maintained by ever.zet http://github.com/everzet
