 | News Feed |
Sections
|
| feed this: |  |
Symfony Project: Book preview read the Unit Tests chapter
by Chris Cornutt January 19, 2007 @ 11:44:00
With unit testing becoming more and more prevalent in development of online applications (especially PHP), it's good to see some of the frameworks giving their users as much information as possible. The symfony project has done just that as a part of a larger book on the framework.
You're probably curious to see if what we wrote in this book is really helpful and practical. So we decided to offer you a sample of the book, in PDF format, and that's precisely Chapter 15 about units and functional tests.
To check out this sample chapter from thei upcoming book (the chapter on unit testing), download it here or just grab 0 comments voice your opinion now!
symfony book sample chapter unit test apress framework symfony book sample chapter unit test apress framework
DevShed: Graphical Interfaces and Unit Testing
by Chris Cornutt November 02, 2006 @ 11:57:00
In the final part of their series looking at unit testing in PHP, DevShed has this new tutorial that looks at using graphical interfaces with the unit tests you've already generated. It's another excerpt from the George Schlossnage book "Advanced PHP Programming".
Because PHP is a Web-oriented language, you might want an HTML-based user interface for running your unit tests. PHPUnit comes bundled with this ability, using PHPUnit_WebUI_TestRunner::run(). This is in fact a nearly identical framework to TextUI; it simply uses its own listener to handle generate HTML-beautified output.
He looks at test driven design, a simple "Flesch Score Calculator" class, testing a "Word" class (with PHPUnit), and creating the Bug Report of the output of it all. Finally, he builds up a simple web interface to make running the tests and getting the reports nice and easy.
voice your opinion now!
tutorial unit test graphical interface phpunit web tutorial unit test graphical interface phpunit web
DevShed: Unit Testing in Detail
by Chris Cornutt October 26, 2006 @ 09:58:00
Continuing in their effort to help PHP developers keep their code bug-free, DevShed has posted part two of the series looking at unit testing your applications. Previously they had looked at the basics - of they work and what they're for. This time, they dig a little deeper, showing some of the additional features and conditions that PHPUnit has to offer.
This week, you will learn about running multiple tests simultaneously, creating more informative error messages, and more.
They get back into something they mentioned briefly before - packaging tests in a separate archive to keep it out of the main body of code (the same way separating content and display functionality is good). They also talk about how to run more than one test at the same time, a handy feature that lets you make regression tests.
They also show how to create more informative error messages and how to manually add more testing conditions for you to check custom bits of code that don't quite fit with the assertNull, assertEquals, and assertFalse crowd.
This article is an excerpt from the Sams Publishing book "Advanced PHP Programming" by George Schlossnagle.
voice your opinion now!
tutorial unit testing additional features test conditions add tutorial unit testing additional features test conditions add
DevShed: Unit Testing
by Chris Cornutt October 19, 2006 @ 10:12:00
More and more talk is being given to testing applications these days. For some, that just means going through the functionality and ensuring that things seem to be working okay. That's one way to find problems in an application, but not the best way. A better way it through unit testing, a system of writing up various tests for the functions making up your application to ensure they're 100% working. Not familiar with it? That's what this new tutorial from DevShed is for - another excerpt from the Sams Publishing book "Advanced PHP Programming".
All code is tested at some point-perhaps during its implementation, during a dedicated testing phase, or when it goes live. Any developer who has launched broken code live knows that it is easier to test and debug code during development than after it goes into production.
Unit testing helps with finding these problems before they get into the hands of live users. The tutorial gives you a basic overview of how to work with this handy tool, specifically with the PHPUnit package. They help you write a simple test, expand on this base with more elaborate tests, and how to package your tests right in with your libraries to make installation/packaging simpler.
voice your opinion now!
unit test package introduction tutorial multiple inline unit test package introduction tutorial multiple inline
|
Community Events
Don't see your event here? Let us know!
|