Saturday, October 25, 2008

All Hallow's Eve

Halloween is approaching!
Tomorrow I'll be carving pumpkins and decorating my house for the ghoulish night. Unfortunately, nobody else I know is excited for it T_T....nobody comes to my house because I live so far out, but I still like to decorate anyway - Halloween is a great night, but so short.

One great thing about Halloween is in-game events - they really capture the spirit of halloween. Everquest's in-game events have always captured my attention: rampaging skeletons that are nearly unbeatable, fabled creatures much more powerful than their original counterpart, "trick or treat" (Scavenger hunt) for an in-game illusion item - definitely a fun time for everyone.

Guild Wars is another online game that gears up for the Halloween season. Unfortunately, every year I missed their Halloween events - but not this year. They started yesterday (October 24th) and last until November 2nd - though the main event is only scheduled for All Hallow's Eve!

Wednesday, October 15, 2008

New Macbooks

I've known about the possibility of new Apple notebooks coming out for months now, and finally the day has arrived. Apple sent out the media invitations last week, and today at 10:00am PT, the new notebooks were revealed.

Key points:
  • Only one colour available (black screen, silverish body....Still looks nice...but I was hoping for a choice of colour)
  • Glossy screen only (No matte...which means outdoors will be a pain)
  • New video cards: Nvidia 9400M GT and 9600M GT 256/512(up to 5 times faster than previous used, intel integrated GPUs)
  • Mini display port (crap...I was hoping for a standardized display port. I hope Apple doesn't turn into Microsoft with this proprietary crap, hoping everyone will follow them).
  • Aluminum casing - "Brick" manufacturing. By taking a solid brick of aluminum, they can make a stronger notebook by removing the excess with lasers and then recycling anything left over
  • Enlarged Multi-touch Glass trackpad (removed the button so the trackpad is now the button - I could get used to this pretty easily)
  • Backlit LED display
  • Backlit keyboard
That about sums it up. I've already ordered my Macbook Pro - this will be my first Mac ever:
  • 4 GBs of RAM
  • 2.8 GHz Intel Core 2 Duo
  • 9600M GT 512MB
  • 320GB 7200RPM HD
  • 15'' display (my favourite size)
Needless to say, I'm going to be broke for awhile...

Monday, October 6, 2008

A New Blog to Come

Lately, I haven't been doing much coding since I've been doing a lot of testing. I had a free weekend a couple weeks ago, so I decided to start a little project.
To help keep my CakePHP fresh and moist, I've decided to create (and design) my own blog. It will be simple but useful (for me anyway). Not only that, but I've wanted to design my own site for awhile - and this is a great way to start.

Wednesday, August 27, 2008

Installing PHPUnit, Testing_Selenium, and Selenium RC in Windows Vista

What is PHPUnit?

  • PHPUnit is a testing framework to create and run automated unit tests for your web application.
  • PHPUnit helps test the back-end of your web application by running through certain parts (units) and test them, comparing them with the expected output
What is Selenium?

  • Selenium is a suite of test tools to help test the front-end of your web application. The front -end being the visual aspect, and browser compatibility.
  • Using Selenium you can create automated tests to ensure your product is less prone to errors
While trying to install Selenium, I never found a resource that had a simple install guide with everything I needed. That being said, I hope this can help someone who needs to install everything - and if it doesn't, well at least it will help me if I need to install them on another computer ;)

How to install PEAR, PHPUnit, Testing_Selenium PEAR package, and Selenium RC in Windows Vista:

This post assumes PHP is installed (I used 5.2.5) in C:\php\ (change the directory where applicable).

The first thing you'll need to do is to install PEAR. To do this, Open up your command prompt. You can do this by:
clicking the start button
typing "cmd" (without quotations) in the search field
Click the "cmd.exe" application or Hit ENTER if that's the only one there

In the command prompt, go to your PHP root directory. Mine was located at C:\php\
cd C:\php\

Run the go-pear.bat file with the command prompt. This batch file will install PEAR in C:\php\PEAR\

Next, you'll want to install PHPUnit. To do this, type the following in the command prompt:
pear channel-discover pear.phpunit.de
pear install phpunit/PHPUnit

The first command registers the pear.phpunit.de channel with the local PEAR environment - basically it lets PEAR know where to get PHPUnit from. The second command downloads and installs PHPUnit.

After it installs, you'll be able to find it in C:\php\PEAR\PHPUnit\

Next, you'll want to download the Selenium package using pear. As of this writing, the newest version is 0.4.3. In the command prompt, type:
pear install Testing_Selenium-beta

At this time, if you don't have Java installed, you should install it now: http://www.java.com/en/download/manual.jsp#win
To check if you have java installed, in the Command prompt type "java -version" (you need JRE 1.5 or higher).

After that, you can install Selenium RC. I downloaded the most recent at this time; Version 1.0 beta 1: http://selenium-rc.openqa.org/download.html
Create a new folder called "selenium" somewhere easily accessible by the command prompt.
Inside the folder you downloaded there's a Selenium-server folder (Mine was called "selenium-server-1.0-beta-1"). Move all the files in the Selenium-server folder into the "selenium" folder you created, mentioned above.

In the Command prompt, go to the directory that contains the Selenium server.

To start the server in interactive mode (allows you to control the browser manually), type the following in the command prompt:
java -jar ./selenium/selenium-server.jar -interactive

And finally everything is set up to create and run tests!

To create tests, you can use the Firefox plugin IDE to record actions. Alternatively, you can code them yourself.

If you use the IDE: After you create a new test, export it as PHP to an easy-to access location.
In the command prompt change your directory to the location of your new test.
use the following to run the test using PHPUnit:
phpunit testname.php

Assuming you've done everything correctly, PHPUnit will read the test file and tell your running Selenium RC server to open a browser. From there, it will go through your test and give you a report!