everzet's blog

  • About me
  • Card
  • GitHub
  • Behat
  • Mink
  • Capifony
  • Archive
  • RSS

Behat 2.3-dev + Gherkin 1.2-dev

I’ve just finished i18n refactoring for both Behat and Gherkin. Now they both use simple i18n.php files containing simple translation arrays. This switch gave both Behat and it’s Gherkin parser noticeable performance boost during startup.

Behat’s i18n.php

Behat always had its own translation dictionary, used by its formatters. Every message, that Behat prints to you, like failed steps or 12 scenarios failed could be translated with --lang option and translations for this lived inside i18n/ directory. It was *.xliff files. This means, that every time you start Behat, it parsed those files with DomXml, which took some time. Even more than that, xliff is not natural for lot of people and i think it’s the main reason of low level of contributions here.

Now every single Behat translation live inside one simple PHP file. It’s easier than ever now to contribute - just send a PR with this simple file change and in next release Behat will talk with you in your language.

I’ve transited every translation from old scheme to new one, so everything here should work as expected. Yeah, should…

Gherkin’s i18n.php

Gherkin have more important change. As with Behat, now every translation lives under the i18n.php file, but in opposition to Behat’s i18n.php Gherkin’s catalogue is loaded/autogenerated from the cucumber/gherkin translation dictionary. It means, that from now on, every *.feature file written for Behat in any of supported 40 languages would be valid across all languages and Gherkin implementations. Want to migrate your project from PHP to Ruby? No need to rewrite *.feature files - you only need to redefine steps and Cucumber will parse your features succesfully.

Behat\Gherkin’s i18n.php now will be always in sync with cucumber/gherkin, means, that to fix/update some translation, you need to send Pull Request here.

It is a great switch for the Behat future, but it also have huge drawback. Behat\Gherkin’s i18n library have been diverged with Cucumber’s one. It means, that if you’ve used some different languages for your *.feature files, the chances are, that you need to fix keywords in them now OR send a PR to cucumber/gherkin

Test your suites

All changes are in develop branch of Behat. To test if your suite is works with it, simply install dev version of Behat:

$> git clone git://github.com/Behat/Behat.git
$> cd Behat
$> git checkout -b develop origin/develop
$> wget -nc http://getcomposer.org/composer.phar
$> php composer.phar install

After that, you will be able to run Behat with:

$> /path/to/Behat/bin/behat

If you like/don’t like something about those changes, comment in this post. This is the chance for you to change/fix something before Behat 2.3 and Gherkin 1.2 releases.

    • #Behat
    • #BDD
    • #Gherkin
  • 1 month ago
  • 8
  • Comments
  • Permalink
  • Share
    Tweet

The lost art of making clients happy

First in the series article about BDD for our brand new technical Knp blog

Source: knplabs.com

    • #BDD
    • #Behat
  • 4 months ago
  • 5
  • Comments
  • Permalink
  • Share
    Tweet

Behat: Bye-bye ninja-style Ruby, hello oop-style PHP?

Now, as Behat is mature product, it’s time to listen userbase. Most often feedback is: http://twitter.com/alexandresalome/status/78109547872522240 Which means something like: “Why PHP tool can’t be more PHP and less Ruby style?”. It CAN!

Read More

    • #Behat
    • #BDD
    • #PHP
    • #OOP
  • 8 months ago
  • 8
  • Comments
  • Permalink
  • Share
    Tweet

Behat v0.3

Today i’m releasing new major version of Behat. It’s 0.3 & generally focused on hooks & formatters. I’ve totally refactored filters, hooks loaders/container/dispatcher & added 2 new great formatters.

Read More

Source: everzet.com

    • #Behat
    • #BDD
    • #php
  • 1 year ago
  • Comments
  • Permalink
  • Share
    Tweet

hello/console behat:test:bundle …

Another great day in PHP BDD history ;-)

Today is the day of EverzetBehatBundle release.

Read More

Source: symfony2bundles.org

    • #Behat
    • #php
    • #BDD
    • #Symfony2
    • #Bundle
  • 1 year ago
  • 5
  • Comments
  • Permalink
  • Share
    Tweet

Behat v0.2.4 (formatters bugfix)

I’ve introduced very serious bug in v0.2.3, that causes Behat to fails on UNIX (not MacOS) systems, because for UNIX 'prettyFormatter.php' != 'PrettyFormatter.php', but for MacOS fs 'prettyFormatter.php' == 'PrettyFormatter.php'. And i’m on MacOS =/ Sorry for that, i’ve fixed bug and uploaded new Behat version to pear.everzet.com & to GitHub.

Also, v0.2.4 introduces console colors support autodetection. So, on systems, that not supporting colors (hey, Windows!) there’s no need to specify --no-color option anymore.

Update now!

Source: everzet.com

    • #php
    • #Behat
    • #BDD
    • #bugfix
  • 1 year ago
  • Comments
  • Permalink
  • Share
    Tweet

Behat v0.2.3

I’ve updated Behat to 0.2.3 version. It includes bunch of bug-fixes and code improvements:

http://github.com/everzet/Behat/compare/v0.2.2…v0.2.3

I’ve moved Loading routines for Features, StepDefinitions, Hooks inside their own Containers with ability to specify custom loaders (annotated classes for example).

Also, i’ve updated sfBehatPlugin to 1.1.0:

http://github.com/everzet/sfBehatPlugin/compare/v1.0.2…v1.1.0

upgrade it with:

./symfony plugins:upgrade sfBehatPlugin

And update configuration with:

./symfony behat:setup

Now behat.yml moved from project root into config/behat.yml. So all your configs now live in one place!

Also, i’m very happy to say that Symfony2 BehatBundle is on finish line & i will release it tomorrow!

Source: everzet.com

    • #Behat
    • #php
    • #BDD
  • 1 year ago
  • Comments
  • Permalink
  • Share
    Tweet

Behat v0.2.0 aka BigUpdate

Behat 0.2 released. It’s major update with bunch of new features & fixes. And now, Behat is in beta stage. So, if you haven’t use it yet… Hell, it’s about time!

Read More

Source: everzet.com

    • #Behat
    • #PHP
    • #BDD
  • 1 year ago
  • 31
  • Comments
  • Permalink
  • Share
    Tweet

BDD in PHP or “Just Be Hat”

Today is a great day. Why? Because from today we can write Cucumber-like behavior tests in php.

I’ve finished first alpha of Behat. Behat – is behavior driven development framework for php, based on Cucumber’s Gherkin syntax. It means, that it works with same feature files, Cucumber does & generate almost the same output, Cucumber does. But inside… Inside it’ modern, beautifull php 5.3 project build on top of:

  • Symfony Dependency Injection Container component
  • Symfony Event Dispatcher component
  • Symfony Console component

It means, Behat very fast, flexible and even beautifull to use right now. Go to official site. Or check the code.

    • #bdd
    • #php
    • #cucumber
  • 1 year ago
  • 2
  • Comments
  • Permalink
  • Share
    Tweet

About

Avatar Senior from-birth web developer, Symfony2 & BDD evangelist.
  • @everzet on Twitter
  • Facebook Profile
  • everzet on Youtube
  • everzet on Last.fm
  • everzet on Foursquare
  • My Skype Info
  • Linkedin Profile
  • everzet on github

Twitter

loading tweets…

Following

I Dig These Posts

  • Link via thechangelog
    ctrlp - Fuzzy file, buffer, mru and tag finder for Vim

    One of the biggest pain points for folks like me that switched to Vim from TextMate has been a...

    Link via thechangelog
  • Video via preppeller
    Video

    Just a quick video to show how easy it will be to import and export extensions in the next release of Alfred’s Powerpack :)

    The weather service I...

    Video via preppeller
  • Post via avalanche123
    Symfony2 DIC Component Overview

    As some of you might know, the Symfony2 framework consists of two main ingredients:

    • Components
    • Bundles

    The...

    Post via avalanche123
  • Link via thechangelog
    Git Extras: Helpful tools for Git

    If you’ve ever been working heavily on a project that uses git, you’d know, that sometimes it’s good to have a few...

    Link via thechangelog
See more →
  • RSS
  • Random
  • Archive
  • Mobile

Effector Theme by Carlo Franco.

Powered by Tumblr