Running Selenium PHPUnit tests against Firefox in an Ubuntu virtual machine

As part of my Hudson CI server, I'm trying to run Selenium-based PHPUnit tests with each build. The build machine is an virtual machine (VirtualBox) running Ubuntu desktop.

Initially, my tests weren't running thru Hudson and the associated build.xml file. This wasn't surprising since I had forgotten to start the Selenium RC server.

Useful Drupal "Third-party integration" Modules

Using the Hudson Continuous Integration (CI) tool

I recently started writing some automated Selenium (Se) tests . I wrote a few tests, and Se seems to work well. But after writing a few tests, I found I needed an easy way to run, report, and track test results.

This lead me to Hudson, a Continuous Integration (CI) tool.

Hudson builds a given project and then does a number of useful things :

  • Automatically run unit tests and provide coverage reports
  • Show style, syntax, and complexity results

Setting up Custom Coding Standards with PHP CodeSniffer

PHP CodeSniffer provides you with some useful coding standards to get you going.

This is nice, but how do you customize what's provided or set up your own standards?

There is a tutorial on how to set up your own standards, but that was too much work for me at the moment.

However, that is NOT the way to set up your own standards, in my opinion.

Categories: 

Adding PHP CodeSniffer to your Hudson Phing Continuous Integration Process

In a previous post, I described how to setup Hudson with Phing and PHPUnit for a simple PHP build process.

Adding PHP CodeSniffer to Build Results

Now let's expand on this a bit by adding PHP CodeSniffer (PHPCS).

First, assuming you're still working on Ubuntu, install PHPCS :

$ sudo pear install  PHP_CodeSniffer

Add the Checkstyle to Hudson (Manage Hudson => Manage Plugins => Available).

Installing Hudson, Phing, PHPUnit and Git on Ubuntu

In this post, I'm just trying to get the simplest setup. I'll try to post details in a subsequent post.

Here are three posts, in descending order, on this that I found useful :

http://toptopic.wordpress.com/2009/02/26/php-and-hudson/

http://blog.jepamedia.org/2009/10/28/continuous-integration-for-php-with...

http://www.davegardner.me.uk/blog/2009/11/09/continuous-integration-for-...

First, I had to install java :

    $ sudo aptitude install sun-java6-jre  

Preventing SSH timeouts

Depending on the environment you're working in, you may be automatically logged out from a server by SSH timeouts. Here are a few things you can do to help prevent these timeouts :

Add or modify the following in your /etc/ssh/sshd_config file :

ClientAliveInterval 28800
ClientAliveCountMax 28800

In your ~/.bashrc file, set the TMOUT parameter to something longer. For example :

export TMOUT=28800

On your client (PuTTY) set the seconds between keepalives to something like 30.

Free or Open Source MS Project Clones

If you need a light-weight Microsoft Project clone, or simply a MS Project viewer, here are a couple solutions :

- OpenProj : http://openproj.org

- GanttProject : http://www.ganttproject.biz

Both can open MS Project .mpp files, so both can do a reasonable job if that's all you want to do. If you want to actually set up a project, OpenProj seems to be the more capable. GanttProject also seems to lack horizontal scroll bars, so I couldn't navigate the timeline well. It also doesn't seem to import predecessors and durations from .mpp files, so again the nod is to OpenProj.

Simple example of how to bind a class method to an action (button click) with JavaServer Faces

I'm learning a bit of JavaServer Faces. Its paradigm for event handling is quite different from what I've seen in "classical" MVC frameworks like Yii, CodeIgniter, Rails, or even simple PHP.

I was looking for a simple example along the lines of :

If I click a button on a JSF page, it will invoke a method in a "model" class.

This is straight forward in POP (plain ole PHP). Set up an HTML form and bind the form to a PHP script via an ACTION=myscript.php entry in the form.

Pages

Subscribe to luhman.org RSS