News Feed
Sections

News Archive


Community Events






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


feed this:

Developer Tutorials Blog:
Testing email routines in web applications
0 comments :: posted Thursday July 17, 2008 @ 08:49:16
voice your opinion now!

On the Developer Tutorials blog, there's a recent example of how to validate a common task of many signup forms - if the email sent is actually received.

For any web developer that's ever had to build a signup routine, email is the necessary evil that takes pride of place among hated activities. Sure, a simple call to the language's mail library will send a message through, but the moment the boss wants a HTML email, or users need attachments, everything starts to get tricky.

They try to solve the mail return issue (it tells if the message has gone to the queue, not been delivered) with a little testing and Fakemail. The software looks for emails based on the configuration given and pulls them out to a local directory. Your script can then look here and check the validity of the message before its sent.

This even allows for integration with things like Phing, SimpleTest and Selenium.

tagged with: test unittest selenium simpletest phing email fakemail


Developer Tutorials Blog:
SimpleTest Unit Testing for PHP
0 comments :: posted Tuesday July 15, 2008 @ 10:24:54
voice your opinion now!

Akash Mehta has posted a look at unit testing for PHP applications with the SimpleTest tool in a new post to the Developer Tutorials blog.

We recently looked at front-end testing of web applications with Selenium. Today, we'll take another approach to testing your PHP applications: backend unit testing for your actual PHP code. As part of our posts on test driven development, here's a quick intro to using SimpleTest to test your PHP applications.

He introduces the SimpleTest software and shows what a sample test might look like for a simple math question (testing to see if the result of the addition is correct). He also points out a good tutorial on the SimpleTest website to help you get started.

tagged with: simpletest unittest example introduction test quickstart tutorial

Debuggable Blog:
How To Execute Only Specific Test Methods in CakePHP Unit Tests
0 comments :: posted Thursday June 19, 2008 @ 12:52:45
voice your opinion now!

On the Debuggable blog today, Tim Koschutki shows how you can run just the tests you want on your CakePHP application without having to worry about sorting their results out manually.

Most of us familiar with unit testing with CakePHP and SimpleTest know that SimpleTest always executes all methods starting with the string "test". This can be problematic sometimes. At this point you have two options: create a new testcase, put an "x" before every other test name or use the following tip.

His tip puts another layer on top of the usual testing and uses the getTests method to define with of the tests need to be run. If it's defined, SimpleTest will only execute those.

tagged with: simpletest unittest cakephp framework gettests method

PHP in Action Blog:
Testing a Zend Framework action controller with View Helpers
0 comments :: posted Wednesday June 11, 2008 @ 07:56:11
voice your opinion now!

On the PHP in Action blog, there's a new post about a method for testing a controller as a part of a Zend Framework application with its own view helpers.

I came across a Zend Framework (ZF) example I wanted to refactor. You really have to have unit test coverage to refactor effectively, and since there were no tests, I started trying to find out how to test it. There didn't seem to be a wealth of information available on the web, so I've tried to figure it out by myself.

He walks through the testing process he followed - making some new default objects (for SimpleTest) and, using the flash messenger view helper, makes some mock classes to simulate sending the flash messages in an application.

tagged with: zendframwork simpletest unittest controller view helper

Tillate.com Blog:
Unit test practice at tilllate.com
0 comments :: posted Monday May 12, 2008 @ 15:46:25
voice your opinion now!

Silvan Muhlemann has posted about the unit testing that tillate.com does for their releases - the whole process from start to finish.

For now over three years we are working with unit tests. I'd like to share some of those experiences. As we have two frameworks in place for our website, I can compare two different strategies for unit tests.

He talks about their choice of SimpleTest, their test monitoring, CruiseControl and their "if it doesn't pass, you can't release it" mentality to keep their site as bug free as possible.

tagged with: unittest tillate phpunit cruisecontrol release simpletest

Debuggable Blog:
Unit Testing in CakePHP Part 1 - Introduction to Unit Testing
0 comments :: posted Wednesday May 07, 2008 @ 10:23:29
voice your opinion now!

On the Debuggable blog, Tim Koschutki has posted the first part of a series looking at unit testing the CakePHP framework. This first article introduces you to the idea of unit testing to help lay the foundation for what's to come.

So you want to read up on Unit Testing in CakePHP? That is great, testing can be such a help in finding bugs. [...] Surprisingly, many people do not know yet what unit testing is. In this first part of a whole series you can get a good grasp of what it is and is not.

He goes over the basic concepts behind the testing - setting up test cases, comparing results, automating them and how they related to code coverage. He gets into more detail with a list of the assert functions (like assertNotEqual or assertClone) and some examples using the simpletest unit testing software. He wraps it up by listing some of the benefits of unit testing, the limitations of it, TDD and what Mock objects are.

tagged with: cakephp framework unittest simpletest introduction

PHP in Action Blog:
Tips for web testing
0 comments :: posted Wednesday February 13, 2008 @ 08:09:46
voice your opinion now!

On the PHP in Action Blog, there's a this post that shares some tips for testing your web applications with some simple tests.

I just started listing the techniques I've learned when writing tests to exercise the web interface of a PHP application. This is from my experience and my personal preferences; it's not the final word or necessarily right for everyone.

He suggests:

  • Use SimpleTest's Web tester if you can
  • Test the web output using regular expressions
  • Use element IDs or names to test links, forms and fields
  • Log HTTP requests in the application
tagged with: web testing unittest simpletest regularexpression http request

Stubbles Blog:
Stubbles 0.5.0 released
0 comments :: posted Friday February 01, 2008 @ 13:37:00
voice your opinion now!

Frank Kleine has announced on the Stubbles blog that the latest version of the framework, Stubbles 0.5.0 has been released.

A last day of a month - time to release a new Stubbles version. The release does not feature that much new features, we focused mainly on infrastructure and code quality improvements. The most important change of course is the change of the package separator.

Instead of the dots they've gone with the more standard double-colon that PHP already uses. There were also code quality improvements and a move away from SimpleTest out to the popular PHPUnit unit testing package.

You can download this new package from the Stubbles project site.

tagged with: stubbles framework release simpletest phpunit package seperator

PHP in Action Blog:
Testing Smarty templates
0 comments :: posted Tuesday January 29, 2008 @ 08:47:00
voice your opinion now!

On the PHP in Action blog today, there's a quick new post that talks about not only using the Smarty templating system but also a method for testing it to check for any kind of possible failure.

As I mentioned in my blog post on Paparrazzi testing, Uncle Bob (Robert C. Martin) has discussed how to test web templates or server pages. Since I'm currently working with Smarty templates, I wanted a simple way to run tests on them without needing to deal with a web server and the page navigation in a full web application.

Thankfully, he's found a nice, simple method for running tests against the Smarty engine (and includes that in the post - an interface to Smarty and the example test case to run against it).

tagged with: smarty unittest simpletest template fail isolation interface


example mysql book code developer zendframework PEAR security PHP5 database ajax releases framework job application zend release cakephp conference package

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