<?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>Sat, 25 May 2013 11:12:09 -0500</pubDate>
    <ttl>30</ttl>
    <item>
      <title><![CDATA[Michelangelo van Dam: UA Testing with Selenium and PHPUnit]]></title>
      <guid>http://www.phpdeveloper.org/news/19629</guid>
      <link>http://www.phpdeveloper.org/news/19629</link>
      <description><![CDATA[<p>
In <a href="http://www.dragonbe.com/2013/05/ua-testing-with-selenium-and-phpunit.html">this new post</a> to his site <i>Michaelangelo van Dam</i> looks at user acceptance testing with <a href="http://phpunit.de">PHPUnit</a> and <a href="http://docs.seleniumhq.org/">Selenium</a>.
</p>
<blockquote>
Last week I spoke at <a href="http://tek.phparch.com/">php[tek] 2013</a> where I explained to people how to get started with <a href="http://www.seleniumhq.org/">Selenium IDE</a> to record user interaction with the web interface, convert them to PHPUnit testcases and automatically execute them on multiple browsers on multiple platforms. The <a href="https://joind.in/8157>feedback</a> I got was awesome, you're all a great crowd! But on <a href="https://twitter.com/dragonbe>twitter</a> I also received a bunch of questions regarding how to set up multiple platforms and why I used Windows in my presentation to deploy to. So today I deceided it was time to write a full article on this subject.
</blockquote>
<p>
He introduces Selenium and what kinds of things it can be used to test. He also defines "user acceptance testing" and talks about why they're an important part of the testing ecosystem. He then walks you through the process of getting the testing environment set up, creating a few tests and how to convert them over to PHPUnit tests (using a built-in tool). Screencasts show you each step of the way. He includes a little tweaking you'll need to do to to the test code to get it working with your own Selenium server 
</p>
Link: http://www.dragonbe.com/2013/05/ua-testing-with-selenium-and-phpunit.html]]></description>
      <pubDate>Fri, 24 May 2013 10:18:40 -0500</pubDate>
    </item>
    <item>
      <title><![CDATA[Anna Filina: Full Test Coverage is Impractical]]></title>
      <guid>http://www.phpdeveloper.org/news/19625</guid>
      <link>http://www.phpdeveloper.org/news/19625</link>
      <description><![CDATA[<p>
In her <a href="http://annafilina.com/blog/full-test-impractical/">latest post</a> <i>Anna Filina</i> proposes that full test coverage is an impractical way to measure the quality of your software. It can provide a false sense of security, even if the tests are poorly written.
</p>
<blockquote>
Many developers claim that to achieve high quality software, developers must create automated tests that ensure that all possible execution routes have been covered. This is also known as full path coverage. I will argue that different types of software require different testing approaches and that full path coverage is impractical in almost every case. Too many tests simply create clutter.
</blockquote>
<p>
She looks at how it's impractical to expect that all tests will be written efficiently or even correctly. Even simple tests are enough to show up on code coverage reports but may only be painting part of the picture. She also notes that not all software can be tested the same way - things like APIs require different testing skills/methods than something like consumer software. 
</p>
<blockquote>
In the end, there are no exact rules on how much to test. The most important thing to keep in mind is that writing tests for the sake writing tests is futile and costly.  [...] Focus on building great software. Tests are a tool to make it better. Just don't overdo it.
</blockquote>
Link: http://annafilina.com/blog/full-test-impractical]]></description>
      <pubDate>Thu, 23 May 2013 12:06:34 -0500</pubDate>
    </item>
    <item>
      <title><![CDATA[Engine Yard: A Conversation About Testing in PHP]]></title>
      <guid>http://www.phpdeveloper.org/news/19622</guid>
      <link>http://www.phpdeveloper.org/news/19622</link>
      <description><![CDATA[<p>
On the Engine Yard blog today they've <a href="https://blog.engineyard.com/2013/a-conversation-about-testing-in-php">posted a conversation about testing</a> between <I>Ed Finkler</i> and <i>Chris Hartjes</i> (also the hosts of the <a href="http://devhell.info/">DevHell podcast</a>).
</p>
<blockquote>
Our friends <a href="https://twitter.com/funkatron">Ed Finkler</a> and <a href="https://twitter.com/grmpyprogrammer">Chris Hartjes</a> recently had a chat about testing in PHP.  Read on to get the low down on different testing tools and their relative merits-check it out as Ed and Chris weep for the future, come to some interesting conclusions and get their hands dirty so you don't have to.
</blockquote>
<p>
They talk some about the current tools for unit testing in PHP applications and show what a sample test looks like. <i>Ed</i> talks about how the current testing tools can make it intimidating for people to get started testing and mentions the built-in testing library in Python that is a bit easier. There's also some mention of acceptance/functional testing and the Behat + Mink combo.
</p>
Link: https://blog.engineyard.com/2013/a-conversation-about-testing-in-php]]></description>
      <pubDate>Thu, 23 May 2013 09:42:29 -0500</pubDate>
    </item>
    <item>
      <title><![CDATA[Andrew Podner: Functional Testing to Improve Quality Assurance (part 1)]]></title>
      <guid>http://www.phpdeveloper.org/news/19605</guid>
      <link>http://www.phpdeveloper.org/news/19605</link>
      <description><![CDATA[<p>
<i>Andrew Podner</i> has posted the first part of a new series to his site today. He'll be looking at <a href="http://unassumingphp.com/functional-testing-to-improve-quality-assurance-part-1/">using functional testing to improve quality</a> of the resulting code and full application.
</p>
<blockquote>
 For this week, I wanted to focus on some different types of automated testing other than unit testing that can help developers build more robust applications and improve both the speed and effectiveness of quality assurance.  Specifically, this post is going to focus on functional testing. Functional testing is composed of the tests that you write which are from the user's point of view.  A functional test is used to perform quality assurance on all or part of an application utilizing the user interface as a pathway to the application. 
</blockquote>
<p>
He gives some examples of functional tests like clicking on buttons, trying a login, checking that the contents of the page are correct. He talks some about the purpose of functional testing and how it differs from unit testing. He suggests the metaphor of a race car - the pit crew would be the "unit testers" and the driver would be the "functional tester", saying whether or not all of the parts of the car are working together as they should for the race. In the next part of the series, he'll talk some about the actual software to automate this process.
</p>
Link: http://unassumingphp.com/functional-testing-to-improve-quality-assurance-part-1]]></description>
      <pubDate>Mon, 20 May 2013 09:19:17 -0500</pubDate>
    </item>
    <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[Anthony Ferrara: Our Failure As An Industry]]></title>
      <guid>http://www.phpdeveloper.org/news/19554</guid>
      <link>http://www.phpdeveloper.org/news/19554</link>
      <description><![CDATA[<p>
<i>Anthony Ferrara</i> has a new post to his site today describing what he sees as a <a href="http://blog.ircmaxell.com/2013/05/our-failure-as-industry.html">failure in our industry</a> - letting security become an after-thought to the development process.
</p>
<blockquote>
In the April issue of the <a href="http://www.phparch.com/">PHPArch magazine</a> (also published on her blog), Elizabeth Tucker Long wrote a really interesting editorial piece coining a concept she called Security-Driven-Development. She (quite correctly) identified a problem in the current development community where security has become an after-thought (if it's thought of at all). This isn't a new concept, in fact it's a concept that I and many others have been preaching for quite a while now. However I've been coming to realize that I've had it wrong the whole time. And I think the entire industry is getting it wrong today.
</blockquote>
<p>
He talks some about the current state of web application development and how, even with more powerful technologies than ever, we still fall short in security testing. He suggests that the current way of doing things - treating security testing as a "throw it over the wall" or "someone else's job" problem - needs to stop. Security needs to be integrated with development and he suggests that managers and developers of open source projects should take the lead.
</p>
Link: http://www.lornajane.net/posts/2013/setting-multiple-headers-in-a-php-stream-context]]></description>
      <pubDate>Tue, 07 May 2013 09:19:34 -0500</pubDate>
    </item>
    <item>
      <title><![CDATA[Phil Sturgeon: Testing and Contributing with Composer Packages]]></title>
      <guid>http://www.phpdeveloper.org/news/19543</guid>
      <link>http://www.phpdeveloper.org/news/19543</link>
      <description><![CDATA[<p>
<i>Phil Sturgeon</i> has posted a guide to his site about <a href="http://philsturgeon.co.uk/blog/2013/05/testing-contributing-composer-packages">running tests and contributing back</a> to packages that live in Composer.
</p>
<blockquote>
While Composer has been around for a while now, many packages are still in their infancy (< 1.0) or sometimes are just not as feature filled as they could be. To be fair there is always more to be done. It can always do more, or do the same thing more efficiently. Whatever the case, pull requests are going to be a common thing for the PHP community to be doing to these packages and this needs to be done safely, with unit-testing. So, how do you run their test suite and add your own tests?
</blockquote>
<p>
He includes a step-by-step guide to getting the environment set up to run the package's tests and how to add some of your own. He includes the commands to send the pull request back up to Github (on your own fork, of course) and how to use that same fork as your package resource until the main project is updated.
</p>
Link: http://philsturgeon.co.uk/blog/2013/05/testing-contributing-composer-packages]]></description>
      <pubDate>Fri, 03 May 2013 11:47:16 -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[Software Gunslinger: PHP is meant to die, continued]]></title>
      <guid>http://www.phpdeveloper.org/news/19511</guid>
      <link>http://www.phpdeveloper.org/news/19511</link>
      <description><![CDATA[<p>
In his <a href="http://phpdeveloper.org/news/19417">previous post</a> ("PHP was meant to die") the point was made that PHP isn't really designed as a language to handle long running processes very well. It's made to handle a few operations and then die at the end of the request. In <a href="http://software-gunslinger.tumblr.com/post/48215406921/php-is-meant-to-die-continued">this follow up post</a> he talks more about using PHP for long running processes and a library that could help.
</p>
<blockquote>
Yes, I already acknowledged that PHP has a garbage collection implementation starting 5.3.0 and up (opt-in or opt-out, that's not the problem). I also acknowledge that garbage collection works, and is able to take care of most circular references just fine. [...] Anyway, as previously stated too, garbage collection is a great thing, but not enough for PHP. It's a borrowed feature that does not play well with old fundamental decisions inherited from the original design. Garbage collection is not a magical solution for every problem, like many tried to argue about. Let's illustrate with another example.
</blockquote>
<p>
His example uses the <a href="http://reactphp.org/">React</a> PHP library (a non-blocking I/O platform) to handle a lot of incoming data to a port and report back some memory usage and limit settings. He explains a bit about what's happening and shares the results of the test, including the end result - a fatal error when the memory limit was hit. He still comes to the same conclusion, ultimately...PHP is just not the language to use for long-running processes that do any large amount of work. 
</p>
Link: http://software-gunslinger.tumblr.com/post/48215406921/php-is-meant-to-die-continued]]></description>
      <pubDate>Fri, 26 Apr 2013 09:15:56 -0500</pubDate>
    </item>
    <item>
      <title><![CDATA[Luis Atencio: Notes on Continuous Delivery - Implementing a Testing Strategy]]></title>
      <guid>http://www.phpdeveloper.org/news/19508</guid>
      <link>http://www.phpdeveloper.org/news/19508</link>
      <description><![CDATA[<p>
<i>Luis Atencio</i> has posted the latest article in his "Continuous Delivery" series today, this time with a focus on <a href="http://www.luisatencio.net/2013/04/notes-on-continuous-delivery.html">implementing a testing strategy</a>. This is the fourth post in the series (<a href="http://phpdeveloper.org/news/19144">part 1</a>, <a href="http://phpdeveloper.org/news/19240">part 2</a> and <a href="http://phpdeveloper.org/news/19367">part 3</a>).
</p>
<blockquote>
There are three things in life that are always held to be true: we will die someday; we will pay taxes; and software will have bugs.... LOL [...] A testing strategy is often overlooked in software projects. This should not be too surprising, we want to build applications quickly and release them quickly. However, leaving quality out of the picture or towards the end are terrible mistakes.
</blockquote>
<p>
He talks some about the different types of testing that revolve around software development - "business facing" and "technology facing." These are each split down even further into things like acceptance, integration and unit testing.
</p>
Link: http://www.luisatencio.net/2013/04/notes-on-continuous-delivery.html]]></description>
      <pubDate>Thu, 25 Apr 2013 11:55:24 -0500</pubDate>
    </item>
  </channel>
</rss>
