Don't unit test GUIs
106223
A different viewpoint Part I It can be dangerous to make sweeping "Don't" statements. In Patterns of Enterprise Application Architecture, agile guru Martin Fowler coined his now-infamous first law of distributed object design: Don't distribute your objects. This is good advice to an extent but is also an overly simplistic viewpoint. The reader is left to track down the exceptions to the rule.â¦
692991
From Carlo on the FCHouse.com blog, there's this new guide to debugging your PHP5 application with the Eclipse PDT functionality in an OS X environment.   In these months I have developed in PHP with Eclipse PDT (Php Development Tool). During the first days I tried to make the debugging works, but without great results, therefore I dropped and I took back the usual debugging technique of every good script developer: echo $variableName; or simply logging everything possible in some log files.   Knowing that this wasn't "the right way" to do things, Carlo searched for something better. He found a hint on another blog and ultimately figured out how to get his Eclipse/Apache/XDebug installation to work on his Mac. His post also includes the "glue" that you'll need to get them all working happily together.
532268
The reason it's called "beta testing" is to anticipate and isolate problems. But a big problem reported by some -- not all -- Vista SP1 testers is causing Microsoft to take a step back.
158037
In my last installment of this series I introduced a variety of GUI-based tools that can help you discover more about your system to help identify potentially troublesome components. This week we'll look at some of the command-line utilities that do similar work. In fact, some of these utilities are the engines underneath the more attractive GUI tools, and there may be good reasons to employ the engines directly instead of relying upon their graphic incarnations.
380092
Sebastian Bergmann asks a simple question in his latest post - "who uses PHPUnit?"   I am putting together a list of projects that use PHPUnit. The purpose of this list is not only to show who uses PHPUnit but also to provide a list of example test suites that are built using PHPUnit.   More specifically, he's looking for projects that use PHPUnit that isn't listed on this page. If you have a project or know of one that's using this popular unit testing suite, post a comment here to let him know.
277304
The results from the latest poll conducted by the International PHP Magazine have been released. This time, they asked developers what they thought was the best way to do QA for their PHP applications.   Among the options were things like "Do API documentation", "Use code analyzers that check CS violations, XSS or SQL injection attacks" and the number one choice - "Do unit tests using PHPUnit or phpt". Three other options followed behind (using debugging tools, code analyzers and having a commit mailing list) with the API documentation falling down in last place.   They already started up this week's poll too. This time, they ask developers to vote on which of the options make for good PHP code. There's four options - structured, consistent, portable and secure. Get your vote in today!
552800
A GTK/python frontend to the news leecher "hellanzb" providing most functionalities available from the "hellanzb daemon" and Drag and Drop file-enqueuing.Hellanzb can be obtained through your distro's package manager or at http://www.hellanzb.com   looks like hellagui only worked for me. There was a major bug : if no config file was present, hellagui would crash on start.  Now, if a developer, even of such a lowly glade hack as this one, says "this is working" and has even got screenshots to prove it, and the package doesn't work for you, it's very probable that there is some weird bug he (the developer, in this case me), missed.   It seriously doesn't hurt to just drop a small mail stating "sorry dude, but your application is just a pile of bugdung and it crashes". I'll even welcome "U 5vXX0r. it Cr4sh3d" messages ... If there is a shell output, even better. If not I'll survive and ask myself WHY it crashed and then fix it.  Anyway ... this version should work ... please DO tell me if it doesn't.
216224
Pairing up for fun and profit The common assumption about software testing is that "more is better", and testing all the possible states and variable combinations guarantees you will find all the bugs.â¦
616165
The Zend Developer Zone has another new tutorial from Padraic Brady talking about testing your applications (i.e. unit tests). In this new article, he expands on his previous one and dives a bit deeper into the behaviour-driven development process.   In this article, I introduce a TDD related practice called Behaviour-Driven Development which has been gathering attention for over a year and gaining converts (like me!).   He briefly covers what BDD is and how it can be used to solidify code against issues that might come up down the road (and how it compares to test-driven development). Some sample code/tests are included to give you a better idea of how it all fits together - a set of scenarios for any given "story". True to the title, Padraic writes his tests around the construction of a Klingon Bird of Prey ship.
524269
Greg Bever has a (very) quick post about his experiences with the Pixy XSS and SQLI Scanner running against PEAR files.   I tried out the Pixy XSS and SQLI Scanner (http://pixybox.seclab.tuwien.ac.at/pixy/index.php) on a few simple PEAR files.  On the first, I got a java exception, on the second it was unable to resolve the simplest of includes (no ability to resolve include_path). In short, the thing is useless for anything written using PEAR.  Fun!   The Pixy XSS and SQLI Scanner is made to find SQL and XSS injection issues in scripts. It runs as a Java application and scans PHP4 source code to try to find problems. For more information on the scanner or to try it out for yourself, check out the project's homepage for documentation and downloads.
744440
On his blog today, Chris Hartjes has a quick screencast he's created showing off an interactive testing console he's worked up for use with the CakePHP framework.   I had suggested in an email to the CakePHP mailing list that an interactive console for doing testing of Models would be good. While at php|tek I spent a lot of time with the CakePHP guys talking about this. Out of it came some more ideas (like the ability to test your routes) and they even implemented a console that spits out API information for you. Very cool stuff. So, I decided to do a little screencast demo of a very early alpha version of the interactive console.   The screencast shows Chris running a test on his own classes, including demonstrating the built-in help the app offers.
710008
Sebastian Bergmann points out a new feature that PHPUnit (the popular PHP unit testing tool) now has - parallel_test_execution allowing for each test to execute on a separate PHP process.   The advantages of this include full test isolation and the fact that a test can now cause a PHP fatal error or even a segmentation fault of the PHP interpreter without interrupting the test execution.   He does mention, however, that it can cause a bit more overhead for larger testing suites since it needs to create a new process (complete with memory usage) for each running test. There are also coding issues that could be thrown off by this option (he gives an example of an inheritance issue with eZ Components).     He also notes some of his thoughts on how to control/configure the process (like in a configuration file) and via an "@isolated" notation to make it easy to do it dynamically.
412006
From PHP Planet today, there's a note on Marcus White's weblog stating that: you cannot prove anything by testing. No matter how hard you try, there could always be something wrong, or some combination of conditions or some external event that you havenÃ¢ÂÂt thought of. You never know absolutely for sure that your project is working correctly and you never will.
417827
This organization uses standard hardware and software builds throughout the enterprise, so everything that works during testing should work fine for users -- shouldn't it?
664550
Sebastian Bergmann has posted an official call for help for a PHPUnit-related project that seems to be a more and more requested feature for the popular unit testing package - an Ajax-based test runner.   It would be great if the frontend for the browser-based test runner would make use of AJAX. Since I am clueless when it comes to both web design in general and AJAX in particular, I would appreciate if someone else could help me with implementing this test runner.   He's looking for the XHTML, CSS, and Javascript to put it all together as well as the Javascript that makes the magic happen. If you're interested in helping out, you can either contact him on the mailing list or in #phpunit on the Freenode IRC network.
277071
In a new post, Elizabeth Smith talks about "perverting Windows" to work with desktop PHP applications via an interesting library - Winbinder.   Writing desktop applications with PHP is considered to be idiotic by many people, but personally I think it's a lot of fun and can be useful. [...] There are more solutions for desktop apps with PHP than people probably realize. [...] So why isn't there a Win32 GUI wrapper for PHP? Well, there is...kind of.   She mentions a few issues she has with the Winbinder software - including lacking support for PHP5 and non-threadsafe code. She's falling back more and more on the "I can write an extension for that" mentality, though and has plans for the future:   Eventually I hope to have a WinUi, WinGdi, and WinSys (processes, threading, registry, et al) to put in pecl. There are some win32 only extensions in PECL, but win32std is the only one I've actually had use for, or even got working properly, and there's no agreement among them in naming convention, API design, or even functions vs. classes. So here I am, playing.
691601
Sebastian Bergmann demonstrates another feature of the popular PHPUnit unit testing software in  new post to his blog, specifically the TestNG-style of test.   Starting with version 3.2, PHPUnit has support for TestNG-style @grouping of tests.   He includes an example of the style, a test case that, through the command line testing tool, can be called in portions depending on the need.