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).

Comments:

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?

Posted by Martijn on April 05, 2012 at 12:45 PM CEST #

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.

Posted by Chris Jones on April 05, 2012 at 01:41 PM CEST #

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

Posted by guest on April 05, 2012 at 06:38 PM CEST #

@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)?

Posted by Tomas Mysik on April 06, 2012 at 12:39 AM CEST #

@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).

Posted by Tomas Mysik on April 06, 2012 at 12:40 AM CEST #

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

Posted by Tomas Mysik on April 06, 2012 at 12:41 AM CEST #

This is very usefull. Thanks!

Posted by pulzarraider on April 18, 2012 at 03:21 AM CEST #

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...

Posted by Kevin Andrews on April 26, 2012 at 01:33 PM CEST #

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
+src
-Caculator.php
Test Files
+src
-Caculator.php

Please help me out this difficuty.
Thank you verry much;)

Best regards,
Thuankin.

Posted by thuankin on September 04, 2012 at 06:04 AM CEST #

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

Posted by Tomas Mysik on September 04, 2012 at 09:57 AM CEST #

Post a Comment:
  • HTML Syntax: NOT allowed
About

This blogs is written by NetBeans developers who contribute to the PHP support mainly.

Search

Archives
« April 2014
SunMonTueWedThuFriSat
  
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
   
       
Today