News Feed
Sections




News Archive
Looking for more information on how to do PHP the right way? Check out PHP: The Right Way

NetTuts.com:
Test Code Coverage From Myth to Reality
March 31, 2014 @ 11:50:09

There's a good post over on the NetTuts.com site today talking about unit testing, the myths around code coverage and why it may not be as important as you think.

Most cubicle workplaces disappeared and programmers started loving their craft. With the advent of Agile techniques and the Software Craftsmanship movement, many new tools emerged to help the programmer and the process. TDD is slowly becoming the de facto way of writing code and the secrets of SCRUM or Kanban were revealed even to the programmers in the darkest corners of the cubicle world. Automated testing and test driven development (TDD) are some of the essential techniques Agile provided to us programmers. And a tool that comes with those methodologies is used to produce test code coverage, which is the topic of this article.

The article starts with a brief definition of code coverage and gets right into an example class, PHPUnit test and the results of a code coverage generation. They show both output options, the text-only output and the full HTML output with clickable links and visualization of the covered lines of code. There's also an example of generating the coverage inside an IDE (PHPStorm). The post finishes with a look at the myths of code coverage including: "100% covered is bug free" and that "gaming the system" is pretty easy.

0 comments voice your opinion now!
codecoverage unittest phpunit tutorial introduction

Link: http://code.tutsplus.com/articles/test-code-coverage-from-myth-to-reality--cms-20442

blog comments powered by Disqus

Similar Posts

Sudheer Satyanarayana's Blog: A Bit Of XML, RSS And CURL In 7 Lines Of PHP And A Useful Program

DotVoid.com: Problem with downloading files with Internet Explorer over HTTPS

DotKernel.com: Installing GeoIP extension in Zend Server 5.6 on Windows

PHPMac.com: Two New Tutorials (an Intro and MySQL/Forms)

Cats Who Code: Sending SMS with PHP and TextMagic: An A to Z guide


Community Events

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


library api opinion release laravel5 feature unittest voicesoftheelephpant interview podcast series threedevsandamaybe laravel framework language introduction extension development wordpress community

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