<?xml version="1.0"?>
<rss version="2.0">
  <channel>
    <title>PHPDeveloper.org</title>
    <link>http://www.phpdeveloper.org</link>
    <description>Up-to-the Minute PHP News, views and community</description>
    <language>en-us</language>
    <pubDate>Wed, 19 Jun 2013 06:22:25 -0500</pubDate>
    <ttl>30</ttl>
    <item>
      <title><![CDATA[Codeception.com: Specification or Testing: The Comparison of Behat and Codeception]]></title>
      <guid>http://www.phpdeveloper.org/news/19560</guid>
      <link>http://www.phpdeveloper.org/news/19560</link>
      <description><![CDATA[<p>
On the Codeception site today there's a new post that <a href="http://codeception.com/05-06-2013/specification-testing-coparison.html">compares their tool, Behat and PHPUnit</a> for testing your applications.
</p>
<blockquote>
This is guest post by <a href="https://github.com/Ragazzo">Ragazzo</a>. He uses Behat as well as Codeception for making his project better. He was often asked to do a comparison between Codeception, Behat, and PhpUnit. In this post he explains the commons and different parts of this products.
</blockquote>
<p>
The author talks some about the difference between functional/acceptance tests and how they fit in with behavior driven development. He includes some examples of Behat test formats (Gherkin) and how it can be used for both the functional and acceptance side of things. He also talks some about why he prefers Codeception over Behat(+Mink) for his testing. A sample Codeception test is included, showing a login form check.
</p>
Link: http://codeception.com/05-06-2013/specification-testing-coparison.html]]></description>
      <pubDate>Wed, 08 May 2013 09:28:34 -0500</pubDate>
    </item>
    <item>
      <title><![CDATA[Inviqa techPortal: Functionally Testing You Application Using Mink]]></title>
      <guid>http://www.phpdeveloper.org/news/19538</guid>
      <link>http://www.phpdeveloper.org/news/19538</link>
      <description><![CDATA[<p>
On the Inviqa TechPortal today there'a a new post from <i>Konstantin Kudryashov</i> showing you how to <a href="http://techportal.inviqa.com/2013/05/02/functionally-testing-your-application-using-mink/">use Mink for functional testing</a> (an extension of <a href="http://behat.org">Behat</a>) of you web application.
</p>
<blockquote>
Automated testing is big news these days. There's hardly a PHP conference happening without a talk on testing automation or derivative methodologies. TDD (Test-Driven Development) and BDD (Behaviour Driven Development) are all around us. So why should you care about all this? [...] The more complex an application becomes, the harder it is to be sure that each new feature or bug fix won't break the system, and that decreases your overall confidence in your work as developer. That's exactly the reason why you need automated testing - to be confident that you're not breaking important parts of an application.
</blockquote>
<p>
For his examples he uses a simple <a href="http://silex.sensiolabs.org/">Silex</a>-based application (found <a href="https://github.com/everzet/silex-mink">here on github</a>) that just shows a main page and an "add article" page that returns a preview when submitted. He shows how to get Behat/Mink installed and how to bootstrap PHPUnit to allow you to execute your tests. Also included is a sample test that clicks the "Add Article" link, runs a few checks and fills in some data. The form is submitted and the "preview" page is checked for valid results.
</p>
Link: http://techportal.inviqa.com/2013/05/02/functionally-testing-your-application-using-mink]]></description>
      <pubDate>Thu, 02 May 2013 13:50:44 -0500</pubDate>
    </item>
    <item>
      <title><![CDATA[QaFoo.com: Webinar: Behavior Driven Development with Behat]]></title>
      <guid>http://www.phpdeveloper.org/news/19473</guid>
      <link>http://www.phpdeveloper.org/news/19473</link>
      <description><![CDATA[<p>
The QaFoo folks have <a href="http://qafoo.com/blog/042_webinar_bdd_behat.html">posted information about a webinar</a> they're putting on for those interested in using Behat for doing functional testing on their applications:
</p>
<blockquote>
I've already written two blog posts here about Behat: <a href="http://qafoo.com/blog/036_behavior_driven_development.html">Behavior Driven Development</a> and <a href="http://qafoo.com/blog/040_code_coverage_with_behat.html">Code Coverage with Behat</a>. If that made you curious or you wanted to learn about Behat anyway, I can highly recommend to join the free <a href="https://www.zend.com/en/company/news/event/1246_webinar-behavior-driven-development-with-behat">webinar on Behavior Driven Development with Behat</a> I'll be giving on May 8th 2013 on behalf of Qafoo in cooperation with Zend.
</blockquote>
<p>
As mentioned, the webinar is free to attend, but you'll need to <a href="http://www.zend.com/webinar/register/?eventNumber=575435768">sign up</a> to be able to attend.
</p>
Link: http://qafoo.com/blog/042_webinar_bdd_behat.html]]></description>
      <pubDate>Wed, 17 Apr 2013 10:44:21 -0500</pubDate>
    </item>
    <item>
      <title><![CDATA[Dzone.com: Diving into Behat]]></title>
      <guid>http://www.phpdeveloper.org/news/19432</guid>
      <link>http://www.phpdeveloper.org/news/19432</link>
      <description><![CDATA[<p>
<i>Giorgio Sironi</i> has a new post to DZone.com today about some of his <a href="http://css.dzone.com/articles/diving-behat">experiences with Behat</a>, a behavior-driven development testing tool written in PHP. It uses the <a href="https://github.com/cucumber/cucumber/wiki/Gherkin">Gherkin</a> language syntax to define its tests.
</p>
<blockquote>
I had the occasion to try out and adopt Behat for a particular need in our projects at Onebip. Here is my recount of the experience from a PHPUnit contributor and invested person.
</blockquote>
<p>
He starts off with a list of situations where he doesn't think that Behat is a good fit for testing including testing of a single object and acceptance tests where comparing the response from more than one test is needed. He suggests that it's more useful for verifying high level business rules than anything. He talks some about the shift they made to using Behat and some of the benefits they found in its use. He finishes up the post by looking at the technical side and includes a warning about letting the size of the FeatureContext file get too large.
</p>
Link: http://css.dzone.com/articles/diving-behat]]></description>
      <pubDate>Tue, 09 Apr 2013 09:50:34 -0500</pubDate>
    </item>
    <item>
      <title><![CDATA[QaFoo.com: Code Coverage with Behat]]></title>
      <guid>http://www.phpdeveloper.org/news/19406</guid>
      <link>http://www.phpdeveloper.org/news/19406</link>
      <description><![CDATA[<p>
On the QaFoo blog today there's a post for those using the <a href="http://behat.org/">Behat</a> testing tool showing a way to <a href="http://qafoo.com/blog/040_code_coverage_with_behat.html">collect code coverage metrics</a> based on your tests using the <a href="https://github.com/sebastianbergmann/php-code-coverage">PHP_CodeCoverage</a> library and <a href="https://github.com/sebastianbergmann/phpcov">phpcov</a>.
</p>
<blockquote>
There is generally no point in having code coverage for Behat test cases because of their nature: The purpose of an acceptance test is to assert a certain behavior of an application, not to technically test a piece of code. Therefore, there is no point in checking for uncovered code pieces in order to write a Behat test for it. That said, there is still a scenario where you want to peek at code coverage of Behat tests: When creating them as wide-coverage tests before starting to refactor legacy code. Behat in combination with Mink provides you with a great tool for such tests.
</blockquote>
<p>
They help you get the tools installed and show the code you'll need to add to the application itself to collect the coverage data as the tests execute. It keys off of a file existing/not existing to know if it should execute the coverage or not. The <a href="https://github.com/sebastianbergmann/phpcov">phpcov</a> tool can then be used to generate the HTML output of the coverage information for easy viewing.
</p>
Link: http://qafoo.com/blog/040_code_coverage_with_behat.html]]></description>
      <pubDate>Wed, 03 Apr 2013 12:37:30 -0500</pubDate>
    </item>
    <item>
      <title><![CDATA[QaFoo.com: Behavior Driven Development]]></title>
      <guid>http://www.phpdeveloper.org/news/19291</guid>
      <link>http://www.phpdeveloper.org/news/19291</link>
      <description><![CDATA[<p>
On the QaFoo blog today there's a new post looking at <a href="http://qafoo.com/blog/036_behavior_driven_development.html">behavior driven development</a> and a PHP-based tool that makes implementing it in your workflow simpler (<a href="http://behat.org/">Behat</a>).
</p>
<blockquote>
While unit, integration and system tests - especially combined with the methodology of Test Driven Development (TDD) - are great ways to push the technical correctness of an application forward, they miss out one important aspect: the customer. None of these methods verify that developers actually implement what the customer desires. <a href="https://en.wikipedia.org/wiki/Behavior-driven_development">Behavior Driven Development</a> (BDD) can help to bridge this gap.
</blockquote>
<p>
The introduce some of the basic concepts behind behavior driven development and include an example of a Gherkin-formatted test example checking a page to ensure if has the correct content. They briefly define the structure of the test then take it into a Behat context and show how it would be implemented.
</p>
<blockquote>
Of course, the examples shown above are only very rudimentary, missing e.g. variables and other advanced features. However, they should have explained what BDD is all about: Communication
</blockquote>]]></description>
      <pubDate>Fri, 08 Mar 2013 11:54:21 -0600</pubDate>
    </item>
    <item>
      <title><![CDATA[Gonzalo Ayuso: Managing Windows services with Symfony/Process and PHP]]></title>
      <guid>http://www.phpdeveloper.org/news/18681</guid>
      <link>http://www.phpdeveloper.org/news/18681</link>
      <description><![CDATA[<p>
In his <a href="http://gonzalo123.com/2012/10/29/managing-windows-services-with-symfonyprocess-and-php/">recent post</a> <i>Gonzalo Ayuso</i> shows how to use Symfony to work with Windows services on the server.
</p>
<blockquote>
Sometimes I need to stop/start remote Windows services with PHP. It's quite easy to do it with net commnand. This command is a tool for administration of Samba and remote CIFS servers. [...] Today we are going to create a PHP wrapper for [net rpc service].
</blockquote>
<p>
He uses <a href="http://behat.org/">Behat</a> to create a feature (test) file, the code behind the features and a service class that handles the actual work of interacting with the service (with methods to do things like stop, start and list running services). Examples of its use are also included.
</p>]]></description>
      <pubDate>Thu, 01 Nov 2012 10:49:09 -0500</pubDate>
    </item>
    <item>
      <title><![CDATA[Shashikant Jagtap: Automating Web Performance Data Collection with Behat and BrowserMob Proxy]]></title>
      <guid>http://www.phpdeveloper.org/news/18679</guid>
      <link>http://www.phpdeveloper.org/news/18679</link>
      <description><![CDATA[<p>
<i>Shashikant Jagtap</i> has <a href="https://lestbddphp.wordpress.com/2012/10/30/automating-web-performance-data-collection-with-behat-and-browsermob-proxy/>a new post</a> to his site about using the PHP-based <a href="http://behat.org">Behat</a> TDD testing tool and the <a href="http://opensource.webmetrics.com/browsermob-proxy/">BrowserMob-Proxy</a> to make an automated system that collects performance data on your applications (including load time, recording headers and simulations of network traffic and latency).
</p>
<blockquote>
BrowserMob Proxy is a utility which is used for capuring HTTP traffic and performance data from the browser. <a href="http://opensource.webmetrics.com/browsermob-proxy/">BrowserMob-Proxy</a> adds in essential missing capabilities such as checking HTTP status codes and injecting headers for HTTP Basic Auth. Web Perfomance data can be manually captured by other tools like Firebug or Developers Tools. Using BrowserMob Proxy we can capture perfonace data in <a href="http://www.softwareishard.com/blog/har-12-spec/">HAR</a> format while running automated tests.
</blockquote>
<p>
He includes the commands you'll need to set up the PHP interface for BrowserMob (<a href="https://github.com/Element-34/PHPBrowserMobProxy">PHPBrowserMob</a>) the <a href="http://opensource.webmetrics.com/browsermob-proxy/">proxy itself</a> and a sample test and context file that runs some checks against Facebook.
</p>]]></description>
      <pubDate>Wed, 31 Oct 2012 10:19:40 -0500</pubDate>
    </item>
    <item>
      <title><![CDATA[Wojciech Sznapka: Export colored Behat scenarios to PDF]]></title>
      <guid>http://www.phpdeveloper.org/news/18439</guid>
      <link>http://www.phpdeveloper.org/news/18439</link>
      <description><![CDATA[<p>
<i>Wojciech Sznapka</i> has shares his technique for creating <a href="http://blog.sznapka.pl/export-colored-behat-scenarios-to-pdf/">colorized exports of Behat tests</a> for use in PDF files:
</p>
<blockquote>
Behat scenarios are one of the best ways to describe system. UML Use Cases or tons of pages in SRS documents are fine, but hard to understand from the begining, and even harder to maintain in the future. Behat eases this process and also gives opportunity to automate requirements verification. To write Behat scenarios you need a text editor. I've picked my favourite - Vim, which highlights *.feature files syntax. But business people mostly don't use Vim, so I need to figure a way, to expose scenarios in easy and pleasant way.
</blockquote>
<p>
His solution involves setting up some printing options in vim to export the tests as a Postscript file, setting the "colorscheme" to the default setting so the colors will be retained. The result is exported (via the "hardcopy" command) and can be converted into a PDF (with a <a href="http://blog.sznapka.pl/wp-content/uploads/2012/09/system_requirements_example1.png">result like this</a>).
</p>]]></description>
      <pubDate>Tue, 04 Sep 2012 09:42:49 -0500</pubDate>
    </item>
    <item>
      <title><![CDATA[Shashikant Jagtap: Behat2.4 : Painless installation with Composer]]></title>
      <guid>http://www.phpdeveloper.org/news/18433</guid>
      <link>http://www.phpdeveloper.org/news/18433</link>
      <description><![CDATA[<p>
<i>Shashikant Jagtap</i> has a new post to his site today showing how to <a href="https://lestbddphp.wordpress.com/2012/08/31/behatcomposer/">painlessly install Behat (2.4)</a> with the help of the Composer package manager.
</p>
<blockquote>
Behat has becoming so popular in recent days. Behat has drastic changes in recent days in order to add some cool features into it. [...] In this tutorial, we will see how to upgrade Behat vesion with use of composer . Most of us have been installed Behat with 'pear' packages. behat version installed with pear has no longer supported.
</blockquote>
<p>
He includes the commands to remove the current PEAR install (if it's there) and what you'll need to add to your "composer.json" file to pull in the main Behat package as well as the Geherkin parser and Mink extension. There's also a command you can use to be sure everything's working correctly.
</p>]]></description>
      <pubDate>Mon, 03 Sep 2012 08:47:50 -0500</pubDate>
    </item>
  </channel>
</rss>
