News Feed
Jobs Feed
Sections




News Archive
feed this:

QaFoo.com:
Code Coverage with Behat
April 03, 2013 @ 12:37:30

On the QaFoo blog today there's a post for those using the Behat testing tool showing a way to collect code coverage metrics based on your tests using the PHP_CodeCoverage library and phpcov.

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.

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 phpcov tool can then be used to generate the HTML output of the coverage information for easy viewing.

0 comments voice your opinion now!
code coverage testing functional behat tutorial phpcov phpcodecoverage

Link: http://qafoo.com/blog/040_code_coverage_with_behat.html

DevHell Podcast:
Episode 3 Beatings Will Continue Until Test Coverage Improves
January 10, 2012 @ 13:58:03

The latest episode of the DevHell podcast has been posted - Episode 3, "Beatings Will Continue Until Test Coverage Improves".

Fresh off our holiday break, we're back with our longest show yet. We talk about Chris' new book The Grumpy Programmer's Guide To Building Testable PHP Applications, including his experiences self-publishing with Leanpub. Chris also explains how he fears no precipitation on his excursions to the Codemash conference in Ohio. Then Ed talks about the thought process that lead to his latest shit-stirring blog post "The MicroPHP Manifesto." Ed may or may not begin crying openly. Finally, we discuss when it might be necessary to trash your existing application and rewrite it.

You can listen to this latest episode either via the in-page player or by downloading the mp3 directly.

0 comments voice your opinion now!
podcast devhell unittest coverage chrishartjes edfinkler


Volker Dusch's Blog:
Textual code coverage information for PHPUnit
November 25, 2011 @ 16:11:41

In a new post to his blog Volker Dusch points out a new feature in a recent release of PHPUnit, the popular unit testing framework for PHP - textual code coverage details.

Three weeks ago PHPUnit 3.6 was released and it has a little new feature you might have missed until now. PHPUnit can now show you code coverage information on the command line.

Options for the report output include: colorizing, writing the output to a file, including a project summary, namespace separation and package (using the @package phpdoc tag) information. He includes a use case he's found for it - small projects where you can cover the whole codebase quickly (with a "watch" command example filtering based on a certain class).

0 comments voice your opinion now!
textual code coverage report phpunit tutorial feature summary


DevShed:
Using Conditional Statements with the Xdebug Extension
March 04, 2009 @ 12:08:43

DevShed continues their series looking at the XDebug extension for PHP with this fifth part looking a bit more at the code coverage functions it comes with.

In this fifth part of a series on using the Xdebug extension to help debug your PHP programs, we'll take a closer look at the xdebug_start_code_coverage() and xdebug_get_code_coverage() functions. Specifically, we'll see how we can extend their usage when working with conditional statements. As always, we'll complement theory with a number of hands-on examples.

They start with a review of the previous tutorial (that started the look at code coverage) and continue on to show how to extend a code coverage class to debug some conditionals and return the results in a simple echoed output.

0 comments voice your opinion now!
conditional statement xdebug tutorial coverage


PHP.net:
TestFest 2008 wrap-up
July 31, 2008 @ 09:32:45

PHP.net has posted a wrapup of this year's TestFest and the great progress that was made to bring the language development up to the next level.

Overall 158 tests have been submitted as part of TestFest 2008 since the launch of the TestFest submission site by 30 different people from people all over the world. Actually this is not counting the various submissions by existing core developers, who also took this opportunity to add some more tests. This has actually increased total test coverage by about 10%.

It also mentions Felix De Vliegher who, because of his large volume of tests (and quality of them), was granted commit rights into the PHP repository to add his in himself. The list of elePHPant winners is included as well. You can also still submit tests through the TestFest submission site (just not for any of the rewards).

0 comments voice your opinion now!
testfest2008 wrapup test coverage phpt elephpant


Community News:
php|tek 2008 Coverage
May 21, 2008 @ 13:45:41

Rather than having a lots of different blog posts scattered all over covering this year's php|tek conference in Chicago, I figured that pulling them all together here would work best. So, without further ado - the coverage from php|tek 2008:

Check out more live from the conference on the php|tek Live page on the php|architect website.

0 comments voice your opinion now!
phptek2008 coverage conference live photo twitter


Antony Dovgal's Blog:
PHP test coverage exceeded 55%
May 21, 2008 @ 08:47:44

As Antony Dovgal points out in a new blog post today, the latest reports on PHP's code coverage have jumped up over the 50% mark (to 56.3% at the time of this post).

It took us about 2 years to get the last 5% and I believe most of the kudos should go to IBM people, who continue to contribute lots of new tests. I hope that the Testfest will help us to speed up this process.

There are still a lot of items in the red that could use some tests, so if you're looking to help out write up some tests or check your area for a TestFest event to get some help.

0 comments voice your opinion now!
test coverage codecoverage over half


Stoyan Stefanov's Blog:
www vs no-www and cookies
May 14, 2008 @ 11:18:39

Stoyan Stefanov has come up against one of the frustrations of web development involving cookies - problems caused by the switch from a "www." in the host to none. He's come up with a test to show you how cookies are set and where you can access them from.

One of the implications of following the rule is related to the whole www vs no-www question. Basically you should always use www if you're planning to use any other sub-domains and you want them cookie-free. This is because you have no way to set a cookie only to the top-level domain.

His code sets cookies for the ".phpied.com", "phpied.com" and "www.phpied.com" domains. Since the domains without the "www" offer a bit broader range of possible matches, he recommends that if you're ever going to use any kind of subdomain, you'll want to use the more broad cookie to cover it.

0 comments voice your opinion now!
cookie hostname test board coverage


Debuggable Blog:
Code Coverage Analysis soon in CakePHP - Test How Well You Test
May 01, 2008 @ 11:19:54

In a new post to the Debuggable blog, Tim Koschutzki talks some about the work he's been doing on the code coverage analysis for the upcoming CakePHP release:

There are several different kinds of criteria to code coverage. The two most important ones are line coverage (or statement coverage as wikipedia puts it) and path coverage. [...] So how is it going to work? Pretty simple actually. Whenever you run a CakePHP test case Cake assembles information in the background about which lines of your subject-under-test are called.

He includes a few screenshots of the code coverage being run and the end result of the runner with the percent covered.

0 comments voice your opinion now!
coverage cakephp framework test unittest


Stuart Herbert's Blog:
What Does The Business Case For PHP Need To Cover?
February 09, 2007 @ 07:49:00

In a new post to his blog today, Stuart Herbert continues the theme he started in a previous post about a business case for PHP. In this new entry, he shares some things he's done to further the effort.

To turn this from an idea into reality, I've setup a Google group where anyone who is interested can join in, and help build this resource. Please come along with your ideas and concerns, and let's see what we can achieve together.

He also suggests some "first steps" to get the ball rolling, namely a list of topics the business case needs to cover.

0 comments voice your opinion now!
test case business coverage google group topics test case business coverage google group topics



Community Events











Don't see your event here?
Let us know!


example series tool release community podcast functional development opinion language interview testing framework code introduction zendframework2 unittest phpunit conference application

All content copyright, 2013 PHPDeveloper.org :: info@phpdeveloper.org - Powered by the Solar PHP Framework