/log

life.log()

Archive for the ‘test’ tag

TDD using PHPUnit, NetBeans

with 5 comments

السلام عليكم و رحمة الله وبركاته

This post is more than month on my drafts ..

It’s about using NetBeans 6.7.1 PHP IDE with PHPUnit I wanted to show how easy is it to make a test and run it ..

so I’ll share the experiment ..
As shown in the following slideshow:

1-I created a PHP Class file:

2-I created empty file with a class and couple of methods

3-I generated a test for the class and it prompted me to choose the folder where I’ll put the tests

4-Finally(My favorite part) I right click the test file to run it and I get the result in green and red … obviously
green is test passed or pending and red if it’s failed ..

Note: I used to use simple test , still can’t find equivalent test method to test the HTML interface … and it always required me to view the test results in the browser ..
PHPUnit is more fun now and it’s integrated to NetBeans, the IDE I recently love at most specially on Mac

Written by me

February 4th, 2010 at 11:37 am

Get Adobe Flash playerPlugin by wpburn.com wordpress themes