Blog - marcoraddatz.com Der Blog des Softwareentwicklers Marco Raddatz aus Kiel. de http://www.marcoraddatz.com marcoraddatz.com Thu, 23 Feb 2012 07:14:04 +0100 Netbeans with PHPUnit and Selenium Mon, 13 Feb 2012 20:33:29 +0100 I tried to follow the installation instructions from PHPUnit but it simply didn't work. Via Google I found a nice tutorial which made PEAR work perfectly on my Mac. I used a MacBook Air and a Mac Mini with Mac OS X Tiger (10.7.3), NetBeans 7.1 and PHP 5.3.6. Make sure you have administrator rights for installation.

1. Install PEAR

Mac OS Tiger does already support PEAR, so it's very easy to install.
sudo php /usr/lib/php/install-pear-nozlib.phar

The next part is a bit tricky. We have to modify our PHP settings. If you don't have a php.ini yet, create a new one by renaming (ok... it's copying, i know) the default php.ini.default to php.ini.
sudo cp /etc/php.ini.default /etc/php.ini

Open your php.ini and search for the include_path. We have to change the path to the PEAR suggested one: include_path = ".:/php/includes:/usr/lib/php/pear".

Finally restart the Apache to reload our settings.
sudo /usr/sbin/apachectl restart

PEAR should be installed now.

2. Install PHPUnit

Now that we installed PEAR, we need the PHPUnit package to be installed too. Load the packages via
pear config-set auto_discover 1
sudo pear install pear.phpunit.de/PHPUnit

PHPUnit is now installed and we can configure Netbeans. Go to "Netbeans → Preferences → PHP → Unit Testing" and click on "Search...". Netbeans should now find PHPUnit by itself (/usr/bin/phpunit). Click "OK" to save changes.

Yeehaw. PHPUnit is now perfectly integrated into NetBeans. To run tests, right click on a project and choose "Test". At the first time you click on "Test" you will be asked for a directory with test files.

3. Setup Selenium for NetBeans

To use Selenium with NetBeans we need an additionally package: PHPUnit_Selenium. Install it via
sudo pear install phpunit/PHPUnit_Selenium

NetBeans has no native support for Selenium. But there are Plugins developed by Jindrich Sedek and Martin Fousek. Click on "Tools → Plugins → Available Plugins" and install "Selenium Server" and "Selenium Module for PHP". Restart your IDE and right click on a project. You should now see a "Run Selenium Tests" option.

]]>
Marco Raddatz http://www.marcoraddatz.com/blog/29/Netbeans+with+PHPUnit+and+Selenium http://www.marcoraddatz.com/blog/29/Netbeans+with+PHPUnit+and+Selenium http://www.marcoraddatz.com/blog/29/Netbeans+with+PHPUnit+and+Selenium
Kindness Boomerang Mon, 30 Jan 2012 13:47:30 +0100 http://vimeo.com/33906125

]]>
Marco Raddatz http://www.marcoraddatz.com/blog/27/Kindness+Boomerang http://www.marcoraddatz.com/blog/27/Kindness+Boomerang http://www.marcoraddatz.com/blog/27/Kindness+Boomerang
Batman Live Sun, 29 Jan 2012 14:50:16 +0100 http://vimeo.com/28006140

]]>
Marco Raddatz http://www.marcoraddatz.com/blog/26/Batman+Live http://www.marcoraddatz.com/blog/26/Batman+Live http://www.marcoraddatz.com/blog/26/Batman+Live
Smalltown Kiel Sun, 22 Jan 2012 11:27:00 +0100 http://vimeo.com/35270069

Leider fehlt jedoch die Uni im Film. Hier gibt es weitere Bilder und Videos.

]]>
Marco Raddatz http://www.marcoraddatz.com/blog/25/Smalltown+Kiel http://www.marcoraddatz.com/blog/25/Smalltown+Kiel http://www.marcoraddatz.com/blog/25/Smalltown+Kiel
Gerstner-Gedächtnis-Cup 2012 Sat, 21 Jan 2012 22:13:00 +0100
Klicke auf das Bild, um es auf 1024 x 768 Pixel zu vergrößern!

]]>
Marco Raddatz http://www.marcoraddatz.com/blog/24/Gerstner-Ged%C3%A4chtnis-Cup+2012 http://www.marcoraddatz.com/blog/24/Gerstner-Ged%C3%A4chtnis-Cup+2012 http://www.marcoraddatz.com/blog/24/Gerstner-Ged%C3%A4chtnis-Cup+2012
Ich liebe spontane Partys! Sat, 14 Jan 2012 04:16:43 +0100
/upload/blog/20120116_schuhe.jpg

...aber nicht den Morgen danach...

]]>
Marco Raddatz http://www.marcoraddatz.com/blog/23/Ich+liebe+spontane+Partys%21 http://www.marcoraddatz.com/blog/23/Ich+liebe+spontane+Partys%21 http://www.marcoraddatz.com/blog/23/Ich+liebe+spontane+Partys%21
Men in Black 3 Thu, 05 Jan 2012 22:31:48 +0100 http://www.youtube.com/watch?v=GV6BCUkPIWY

]]>
Marco Raddatz http://www.marcoraddatz.com/blog/22/Men+in+Black+3 http://www.marcoraddatz.com/blog/22/Men+in+Black+3 http://www.marcoraddatz.com/blog/22/Men+in+Black+3
Frohes neues Jahr! Sun, 01 Jan 2012 15:34:30 +0100
Klicke auf das Bild, um es auf 1280 x 853 Pixel zu vergrößern!

Silvester 2011 in Hamburg. 

]]>
Marco Raddatz http://www.marcoraddatz.com/blog/21/Frohes+neues+Jahr%21 http://www.marcoraddatz.com/blog/21/Frohes+neues+Jahr%21 http://www.marcoraddatz.com/blog/21/Frohes+neues+Jahr%21