<?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>Tue, 21 May 2013 17:11:04 -0500</pubDate>
    <ttl>30</ttl>
    <item>
      <title><![CDATA[Codeception: Codeception released with CodeCoverage support]]></title>
      <guid>http://www.phpdeveloper.org/news/19014</guid>
      <link>http://www.phpdeveloper.org/news/19014</link>
      <description><![CDATA[<p>
The Codeception testing tool has <a href="http://codeception.com/01-08-2013/codeception-codecoverage.html">released a new major update</a> with some interesting new features - the expected feature for generating code coverage reports (similar to <a href="http://phpunit.de">other</a> tools) but there's also the idea of "remote code coverage" introduced.
</p>
<blockquote>
There is no magic in local codecoverage. XDebug and PHP_CodeCoverage libraries do their job. The tricky thing is remote codecoverage. We attach small script into application's front controller. When a special header is sent this script starts to collect coverage information. And in the end of tests, this data is merged, serialized and sent back to Codeception. So you can test and collect coverage report even on staging servers in real environment.
</blockquote>
<p>
They also mention a few other updates in the release - new Redis and MongoDb modules, UX improvements and the normal bugfixes. You can find out more about the code coverage feature in <a href=""http://codeception.com/docs/11-CodeCoverage">their manual</a> or just about the project in general from <a href="http://codeception.com">the main site</a>.
</p>]]></description>
      <pubDate>Wed, 09 Jan 2013 11:14:19 -0600</pubDate>
    </item>
    <item>
      <title><![CDATA[Derick Rethans' Blog: Xdebug's Code Coverage speedup]]></title>
      <guid>http://www.phpdeveloper.org/news/16898</guid>
      <link>http://www.phpdeveloper.org/news/16898</link>
      <description><![CDATA[<p>
<i>Derick Rethans</i> has a new post to his blog today talking about some work that's been done to <a href="http://derickrethans.nl/xdebug-codecoverage-speedup.html">speed up XDebug's code coverage generation</a>. Changes in the coming 2.2 release have some improvements that make things perform better and put less stress on PHP in the process.
</p>
<blockquote>
Code coverage tells you how much of your code base is actually being tested by your unit tests. It's a very useful feature, but sadly, it slows down PHP's execution quite a lot. One part of this slowdown is the overhead to record the information internally, but another part is because I have to overload lots of opcodes. (Opcodes are PHP's internal execution units, similar to <a href="http://en.wikipedia.org/wiki/Assembler_%28computer_programming%29#Assembly_language">assembler</a> instructions) They are always overloaded even if code coverage is not used, because it's only safe to overload them for the whole request.
</blockquote>
<p>
These changes were from a combination of <a href="https://github.com/taavi/xdebug/commits/coverage_line_array">contributions from Taavi Burns</a> and a new ini setting that will allow you to enable or disable the code coverage in XDebug. Benchmarking shows a good amount of time reduction in coverage runs - dropping anywhere from a few seconds to over a minute. He also mentions the idea of "modes", shortcuts to predefined settings for different types of reporting (like "profiling" or "tracing").
</p>]]></description>
      <pubDate>Fri, 23 Sep 2011 09:56:33 -0500</pubDate>
    </item>
    <item>
      <title><![CDATA[Sebastian Bergmann's Blog: Towards Better Code Coverage Metrics in the PHP World]]></title>
      <guid>http://www.phpdeveloper.org/news/16489</guid>
      <link>http://www.phpdeveloper.org/news/16489</link>
      <description><![CDATA[<p>
<i>Sebastian Bergmann</i> has a new post to his blog talking about some of the future plans for <a href="http://sebastian-bergmann.de/archives/913-Towards-Better-Code-Coverage-Metrics-in-the-PHP-World.html">better code coverage metrics</a> for PHP applications (not just the statistics that we have now as generated from <a href="http://phpunit.de">PHPUnit</a> runs combined with Code_Coverage PEAR package and Xdebug).
</p>
<blockquote>
Xdebug currently only supports what is usually referred to as Line Coverage. This software metric measures whether each executable line was executed. Based on the line coverage information provided by Xdebug, PHP_CodeCoverage also calculates the Function / Method Coverage software metric that measures whether each function or method has been invoked. 
</blockquote>
<p>
The various kinds of coverage they're planning the in future include statement coverage, branch coverage (boolean evaluation), call coverage, path coverage with an alternative of linear code sequence and jump coverage (LCSAJ). 
</p>]]></description>
      <pubDate>Mon, 20 Jun 2011 08:10:57 -0500</pubDate>
    </item>
    <item>
      <title><![CDATA[Volker Dusch's Blog: Dealing with segfaults while PHPUnit code coverage generation for CI]]></title>
      <guid>http://www.phpdeveloper.org/news/16197</guid>
      <link>http://www.phpdeveloper.org/news/16197</link>
      <description><![CDATA[<p>
<i>Volker Dusch</i> has a new post to his blog looking at <a href="http://edorian.posterous.com/dealing-with-segfaults-while-phpunit-code-cov">handling segfaults during code coverage generation</a> that might come up during your continuous integration process (with <a href="http://phpunit.de">PHPUnit</a> flavor unit tests).
</p>
<blockquote>
About half the "Build failed" mails I've gotten from Jenkins in the last two weeks where not due to me breaking the tests but just PHPUnit segfaulting. "Wait! I know PHPUnit can't segfault!", only PHP itself can. And it does, quite often. For some reason that probably has to do with using PHP 5.2.OLD it doesn't survive generate the clover.xml file or the HTML report about 20% of the times it's being run.
</blockquote>
<p>
He finds a solution to keep this from happening - not correcting the segfault as much as running the testing again to get it to pass. He wraps the call to PHPUnit inside of a simple shell script that tries to execute the PHPUnit testing suite as long as a segfault isn't thrown. If something was seriously broken, this could cause all sorts of problems, but in theory it's a simple hack that gets the job done.
</p>]]></description>
      <pubDate>Thu, 14 Apr 2011 11:55:13 -0500</pubDate>
    </item>
    <item>
      <title><![CDATA[Volker Dusch's Blog: Running your Unittests everytime you save a file]]></title>
      <guid>http://www.phpdeveloper.org/news/15626</guid>
      <link>http://www.phpdeveloper.org/news/15626</link>
      <description><![CDATA[<p>
<i>Volker Dusch</i> has a suggestion for all of those developers out there really concerned about the quality of your code - consider running your unit tests every time you save a file with the help of a tool called <a href="http://heisel.org/blog/code/pywatch/">PyWatch</a>.
</p>
<blockquote>
At the moment he placed the Idea in my head that i want my testsuite to run every time a file changes anyway, let someone else figure out how that is triggered. Well, <a href="http://heisel.org/blog/code/pywatch/">someone did figure that out, thank you</a>. It's called "PyWatch" and is a simple python script that monitors files for changes and executes a script if one has changed.
</blockquote>
<p>
Obviously you wouldn't want to keep this going for larger code bases (the potential for overlap is horrible) but it could be quite useful when doing test-driven development to save yourself some hassle at the outset. He includes the commands you'll need to get things running and a simple PHP script that points the PyWatch instance to the correct files.
</p>]]></description>
      <pubDate>Thu, 23 Dec 2010 11:55:23 -0600</pubDate>
    </item>
    <item>
      <title><![CDATA[PHP.net: TestFest 2010]]></title>
      <guid>http://www.phpdeveloper.org/news/14694</guid>
      <link>http://www.phpdeveloper.org/news/14694</link>
      <description><![CDATA[<p>
A new announcement on the PHP.net site today talks about <a href="http://www.php.net/index.php#id2010-06-05-2">this year's TestFest</a>, an even to help increase the code coverage of the tests on the PHP language itself.
</p>
<blockquote>
During TestFest, PHP User Groups and individuals around the world organize local events where new tests are written and new contributors are introduced to PHP's testing suite. Last year was very successful with 887 tests submitted and a code coverage increase of 2.5%. This year we hope to do better. 
</blockquote>
<p>
The SVN repository and reporting tools are back again this year (a great improvement over years past) with the new additions of an automated test build environment and screencasts showing the tools in action. You can find out more about this year's event on <a href="http://wiki.php.net/qa/testfest-2010">the TestFest page</a> of the PHP.net wiki (including finding an even near you to participate in).
</p>]]></description>
      <pubDate>Thu, 24 Jun 2010 08:57:56 -0500</pubDate>
    </item>
    <item>
      <title><![CDATA[Sebastian Bergmann's Blog: Code Coverage Dashboard]]></title>
      <guid>http://www.phpdeveloper.org/news/14295</guid>
      <link>http://www.phpdeveloper.org/news/14295</link>
      <description><![CDATA[<p>
In a new post to his blog <i>Sebastian Bergmann</i> talks about a new "dashboard view" that's been added to work with the <a href="http://www.phpunit.de/">PHPUnit</a> testing suite - <a href="http://github.com/sebastianbergmann/php-code-coverage">PHP_CodeCoverage</a>. He <a href="http://sebastian-bergmann.de/archives/886-Code-Coverage-Dashboard.html">talks more</a> about what it has to offer:
</p>
<blockquote>
PHP_CodeCoverage is a library that provides collection, processing, and rendering functionality for PHP code coverage information. Its architecture has support for multiple backends for collecting code coverage information (currently only support for Xdebug is implemented) and for reporting code coverage information (for instance using Clover XML or as an HTML report).
</blockquote>
<p>
The dashboard shows the code's class coverage distribution, class complexity, top project risks and the least tested methods to help you narrow down potential issues in your application. <a href="http://www.flickr.com/photos/sebastian_bergmann/4486651271/">Here's an example</a> of the output.
</p>]]></description>
      <pubDate>Mon, 05 Apr 2010 09:28:00 -0500</pubDate>
    </item>
    <item>
      <title><![CDATA[Sebastian Bergmann's Blog: CRAP in PHPUnit 3.5]]></title>
      <guid>http://www.phpdeveloper.org/news/13824</guid>
      <link>http://www.phpdeveloper.org/news/13824</link>
      <description><![CDATA[<p>
As <i>Sebastian Bergmann</i> mentions in his <a href="http://sebastian-bergmann.de/archives/877-CRAP-in-PHPUnit-3.5.html">latest post</a>, he's changed up how the code coverage functionality is handled in <a href="http://phpunit.de">PHPUnit</a> so that he can add something new - CRAP.
</p>
<blockquote>
PHP_CodeCoverage is a component that provides collection, processing, and rendering functionality for PHP code coverage information. [...] Having all code that deals with code coverage in a separate component allows for easier development and better testing. The first result of these improved development conditions is a small new feature that I recently implemented, the support for the CRAP metric.
</blockquote>
<p>
Your code's <a href="http://www.crap4j.org/">CRAP</a> (Change Risk Analysis and Predictions) scoring combines the idea of <a href="http://en.wikipedia.org/wiki/Cyclomatic_complexity">cyclomatic complexity</a> and code coverage statistics to try to guess at how difficult any given piece of code would be to maintain. You can <a href="http://sebastian-bergmann.de/uploads/crap.png">see an example here</a> - the lower the number the better.
</p>]]></description>
      <pubDate>Tue, 12 Jan 2010 11:14:03 -0600</pubDate>
    </item>
    <item>
      <title><![CDATA[Zoe Slattery's Blog: PHP TestFest - one more month to go!]]></title>
      <guid>http://www.phpdeveloper.org/news/12603</guid>
      <link>http://www.phpdeveloper.org/news/12603</link>
      <description><![CDATA[<p>
<i>Zoe Slattery</i> has <a href="http://zoomsplatter.blogspot.com/2009/05/php-testfest-one-more-month-to-go.html">posted an update</a> about the TestFest events happening around the world and the contributions they've been making to the overall cause of getting PHP code coverage as complete as possible.
</p>
<blockquote>
Groups from all over the world have contributed 554 new tests for PHP since April 1st 2009. Of these, 327 have already been moved into PHP's CVS (thanks Felipe!). The results of running tests on a Linux 32 bit platform can be seen <a href="http://results.testfest.php.net/">here</a> (sorry about the colour scheme), the user groups who have contributed are also listed. We also run the tests on a 64 bit Linux platform <a href="http://testfest.php.net/displayresults.php">here</a>, but this only runs PHP5.3 and PHP5.2.
</blockquote>
<p>
She's also run some complete code coverage tests (after fighting a bit with ccache and lcov) and came up with a two percent increase overall (including a huge jump in the ext/ldap extension's coverage from about nine percent up to almost ninety percent!) 
</p>]]></description>
      <pubDate>Mon, 01 Jun 2009 12:05:12 -0500</pubDate>
    </item>
    <item>
      <title><![CDATA[Greg Beaver's Blog: Code Coverage Reporting using PEAR, PEAR2, phar, and sqlite3]]></title>
      <guid>http://www.phpdeveloper.org/news/12338</guid>
      <link>http://www.phpdeveloper.org/news/12338</link>
      <description><![CDATA[<p>
<i>Greg Beaver</i> <a href="http://greg.chiaraquartet.net/archives/200-code-coverage-reporting-using-PEAR,-PEAR2,-phar,-and-sqlite3.html">has a new post reporting on his latest efforts</a> to improve the Pyrus PEAR installer and to make it a more strong, stable and robust end result.
</p>
<blockquote>
One of the problems I found when designing the new code for PEAR 1.4.0 (back in the day) was that it was very difficult to determine whether changes would break things.  The main problem revolves around the colossal size of the test suite. [...] This is a real problem when trying to develop with any kind of flow.  If, after every change, one needs to sit through 35 minutes of tests, one will never develop anything of substance.
</blockquote>
<p>
What he wanted was an application that could detect only the files modified and tests those with the results put into the code coverage report. To fill the need, he created <a href="http://cvs.php.net/viewvc.cgi/pear-core/test-modified.php?view=co&revision=1.4&content-type=text%2Fplain">test-modified.php</a> to run just the <a href="http://greg.chiaraquartet.net/exit.php?url_id=692&entry_id=200">phpt</a> tests needed.
</p>]]></description>
      <pubDate>Tue, 14 Apr 2009 12:08:08 -0500</pubDate>
    </item>
  </channel>
</rss>
