An Oracle blog about NetBeans for PHP

Run Tests in Folder

Hi all, today we would like to show you another minor improvement we have
prepared for NetBeans 7.2. Today, let's talk a little bit about testing.

This minor improvement will be useful especially for users who have a lot of unit tests (it means all of us, right? ;) - just right click on any folder underneath Test Files node and you will notice:

Run tests in a folder

The result is as expected - all the tests from the given folder are run:

Unit test results

That's all for today, as always, please test it and report all the issues or enhancements you find in NetBeans BugZilla (component php, subcomponent PHPUnit).

Join the discussion

Comments ( 10 )
  • Martijn Thursday, April 5, 2012

    Perhaps I'm just tired and fail to see the difference, but what's the added value of this? It's already easy enough to do Run->Test Project (or Alt-F6) right?

  • Chris Jones Thursday, April 5, 2012

    I realize this is unrelated and possibly the wrong forum for this question - but is there an easy way to stay up-to-date with Netbeans nightlies? I'd like to be able to just install the new nightly in the same directory as the previous (ie: Program Files\Netbeans 7.2-dev) but the installer complains that the directory is not empty.

    So I have to uninstall the previous, then install the new nightly. This isn't so bad - except any modules/plugins that I had disabled in the previous nightly is not saved and I have to go through the plugins again and disable the ones I do not want.

  • guest Thursday, April 5, 2012

    That option is not available in todays build, guess I need to wait for the next one

  • Tomas Mysik Thursday, April 5, 2012

    @Martijn: Added value? Imagine someone having _plenty_ of tests running for about 30 minutes. Isn't a good option to run only unit tests for namespace/area I am interested in (which finish in let's say 1 minute)?

  • Tomas Mysik Thursday, April 5, 2012

    @Chris Jones: Simply use the ZIP files and not the installer. But please notice that if one uses daily builds, it can happen that one would need to clean your userdir (from time to time).

  • Tomas Mysik Thursday, April 5, 2012

    @guest: It is (I have Build 20120405).

  • pulzarraider Wednesday, April 18, 2012

    This is very usefull. Thanks!

  • Kevin Andrews Thursday, April 26, 2012

    Brilliant, I was looking for how to run just one folder of tests and came across this article! Very handy, before I can to keep changing the tests project setting to the target directory I wanted to run...

  • thuankin Tuesday, September 4, 2012

    Hi Tomas Mysik,

    I've gotten a problem when I built the first phpunit test in NetBean 7.2. That is "Fatal error: Class 'Calculator' not found in D:\work\sililab\si_proj\pro_testunit\TestFiles\src\CalculatorTest.php on line 18". Because I am a begginer of php & netbean, so I could not find any sollutions to this one.

    This is my project structure:

    Source Files



    Test Files



    Please help me out this difficuty.

    Thank you verry much;)

    Best regards,


  • Tomas Mysik Tuesday, September 4, 2012

    @Thuankin: Please, use our mailing list for PHP users for such questions. Thanks.

Please enter your name.Please provide a valid email address.Please enter a comment.CAPTCHA challenge response provided was incorrect. Please try again.