This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.
In a project with some tests file using atoum. Each file has more than one test. When i try to Run Test Project it only run first test of the first Test file. When i try to Run Test on one File, it only rune first test of this file. Here is output of atoum run one test file : "C:\dev\php\5.4.20\php.exe" "C:\dev\library\mageekguy.atoum.phar" "-bf" "Z:\public\bundle-entity-membre\src\M6\Bundle\MembreEntityBundle\Tests\bootstrap.php" "-utr" "-f" "Z:\public\bundle-entity-membre\src\M6\Bundle\MembreEntityBundle\Tests\Units\Entity\Decorator\MembreJvfr.php" 1..4 ok 1 # M6\Bundle\MembreEntityBundle\Tests\Units\Entity\Decorator\MembreJvfr::testConstruct() Done. Content of the test file : <?php namespace myNS\Tests\Units\Entity\Decorator; use myNS\Entity\Decorator\MembreJvfr as TestedClass; use mageekguy\atoum\test; /** * Test class for DecoratorMembreJvfr. */ class MembreJvfr extends test { /** * Test getter and setter for idSite * * test of the abstract class */ public function testConstruct() { $this->if($entity = new \M6\Bundle\MembreEntityBundle\Entity\Membre) ->then($decorator = new TestedClass($entity)) ->object($decorator->getDecorated()) ->isEqualTo($entity); } /** * Test getter and setter for idSite * * test of the abstract class */ public function testGetterAndSetter() { $this->if($entity = new \M6\Bundle\MembreEntityBundle\Entity\Membre) ->then($decorator = new TestedClass()) ->then($decorator->setDecorated($entity)) ->then($decorator->setAppDomain('myDomain')) ->object($decorator->getDecorated()) ->isEqualTo($entity) ->string($decorator->getAppDomain()) ->isEqualTo('myDomain'); } /** * Test getter and setter for idSite * * test of the abstract class */ public function testCall() { $this->if($entity = new \M6\Bundle\MembreEntityBundle\Entity\Membre) ->then($decorator = new TestedClass()) ->then($decorator->setDecorated($entity)) ->variable($decorator->getLogin()) ->isNull() ->exception(function () use ($decorator) { $decorator->getRienDeRien(); }) ->isInstanceOf('\M6\Bundle\MembreEntityBundle\Exception\DecoratorMembreException'); } /** * Return a Membre entity manager mock * * @return \mock\Doctrine\Common\Persistence\ObjectManager */ private function getMembreEntityMock() { $mock = new \mock\M6\Bundle\MembreEntityBundle\Entity\Membre; $mock->getMockController()->getLogin = function() { return 'monLogin'; }; $mock->getMockController()->getId = function() { return 99; }; return $mock; } /** * Test buildProfileUrl and buildAvatarUrl * */ public function testBuildUrl() { $this->if($entity = $this->getMembreEntityMock()) ->then($decorator = new TestedClass()) ->then($decorator->setDecorated($entity)) ->then($decorator->setAppDomain('jeuxvideo.fr')) ->string($decorator->buildProfileUrl()) ->isEqualTo('http://www.jeuxvideo.fr/forum/profil/monLogin-99/') ->string($decorator->buildAvatarUrl()) ->isEqualTo('http://img.jeuxvideo.fr/photo/forum/00000/99/avatar.jpg'); } } Here is output of atoum run profect test (there is 3 tests file) : "C:\dev\php\5.4.20\php.exe" "C:\dev\library\mageekguy.atoum.phar" "-bf" "Z:\public\bundle-entity-membre\src\M6\Bundle\MembreEntityBundle\Tests\bootstrap.php" "-utr" "-d" "Z:\public\bundle-entity-membre\src\M6\Bundle\MembreEntityBundle\Tests" 1..7 ok 1 # M6\Bundle\MembreEntityBundle\Tests\Units\Entity\Decorator\MembreClubic::testBuildUrl() Done.
More info : Here is the output of the specified command from netbeans directly wirtten in my cmd.exe : "C:\dev\php\5.4.20\php.exe" "C:\dev\library\mageekguy.atoum.phar" "-bf" "Z:\public\bundle-entity-membre\src\M6\Bundle\MembreEntityBundle\Tests\bootstrap.php" "-utr" "-d" "Z:\public\bundle-entity-membre\src\M6\Bundle\MembreEntityBundle\Tests" And this is what i should get in Netbeans: PS C:\dev> C:\dev\php\5.4.20\php.exe C:\dev\library\mageekguy.atoum.phar -bf Z:\public\bundle-entity-membre\src\M6\Bundle\MembreEntityBundle\Tests\bootstrap.php -utr -d Z:\public\bundle-entity-membre\src\M6\Bundle\MembreEntityBundle\Tests 1..7 ok 1 # M6\Bundle\MembreEntityBundle\Tests\Units\Entity\Decorator\MembreClubic::testBuildUrl() ok 2 # M6\Bundle\MembreEntityBundle\Tests\Units\Entity\Decorator\MembreJvfr::testConstruct() ok 3 # M6\Bundle\MembreEntityBundle\Tests\Units\Entity\Decorator\MembreJvfr::testGetterAndSetter() ok 4 # M6\Bundle\MembreEntityBundle\Tests\Units\Entity\Decorator\MembreJvfr::testCall() ok 5 # M6\Bundle\MembreEntityBundle\Tests\Units\Entity\Decorator\MembreJvfr::testBuildUrl() ok 6 # M6\Bundle\MembreEntityBundle\Tests\Units\Manager\MembreManager::testGetAndSetIdSite() ok 7 # M6\Bundle\MembreEntityBundle\Tests\Units\Manager\MembreManager::testGetUserByUsernameException()
Please, which NetBeans version do you have (see Help > About)? Also, would it be possible to attach a sample project I can use? In order to fix this issue, I need a reproducible use case. Thanks.
Product Version: NetBeans IDE 7.4 RC1 (Build 201309162201) I'm going to create a light project to show the problem.
Also, please attach your IDE log [1] once this problem occurs. Thanks. [1] http://wiki.netbeans.org/FaqLogMessagesFile
Created attachment 140462 [details] Full sample project to reproduce the bug Here is the command line i launch in cmd.exe and the result i have: C:\dev\php\5.4.20\php.exe C:\dev\library\mageekguy.atoum.phar -bf Z:\public\netbeansBug\src\MyBundle\Tests\bootstrap.php -utr -d Z:\public\netbeansBug\src\MyBundle\Tests 1..6 ok 1 # MyBundle\Tests\Units\Entity\Decorator\MembreSiteOne::testBuildUrl() ok 2 # MyBundle\Tests\Units\Entity\Decorator\MembreSiteTwo::testConstruct() ok 3 # MyBundle\Tests\Units\Entity\Decorator\MembreSiteTwo::testGetterAndSetter() ok 4 # MyBundle\Tests\Units\Entity\Decorator\MembreSiteTwo::testCall() ok 5 # MyBundle\Tests\Units\Entity\Decorator\MembreSiteTwo::testBuildUrl() ok 6 # MyBundle\Tests\Units\Entity\MembreSiteThird::testBuildUrl() In netbeans it fails "C:\dev\php\5.4.20\php.exe" "Z:\public\netbeansBug\vendor\atoum\atoum\bin\atoum" "-bf" "Z:\public\netbeansBug\src\MyBundle\Tests\bootstrap.php" "-utr" "-d" "Z:\public\netbeansBug\src\MyBundle\Tests" 1..6 ok 1 # MyBundle\Tests\Units\Entity\Decorator\MembreSiteOne::testBuildUrl() Done. ================================== In NetBeans here is the config of the project : source folder : Z:\public\netbeansBug test folder : Z:\public\netbeansBug\src\MyBundle\Tests PHP version : 5.4 Testing : atoum Atoum bootstrap : Z:\public\netbeansBug\src\MyBundle\Tests\bootstrap.php Here is the output of the Run Test Project : "C:\dev\php\5.4.20\php.exe" "Z:\public\netbeansBug\vendor\atoum\atoum\bin\atoum" "-bf" "Z:\public\netbeansBug\src\MyBundle\Tests\bootstrap.php" "-utr" "-d" "Z:\public\netbeansBug\src\MyBundle\Tests" 1..6 ok 1 # MyBundle\Tests\Units\Entity\Decorator\MembreSiteOne::testBuildUrl() Done.
Created attachment 140463 [details] NetBeans Log Just after running a Run Test Project
Unfortunately, I cannot reproduce your problem in the current dev build, it works for me as expected (everytime, all 6 tests are run). @mmolda: Milane, could you please try to reproduce on Windows? BTW the attached project is not a NetBeans project - see comment #5. @reporter: Next time, please attach a NetBeans project so we can just open it. It eliminates possible mistakes in the project setup. Thanks. Product Version: NetBeans IDE Dev (Build 20130920-d00e99cb51c3) Java: 1.7.0_40; Java HotSpot(TM) 64-Bit Server VM 24.0-b56 Runtime: Java(TM) SE Runtime Environment 1.7.0_40-b43 System: Linux version 3.8.0-27-generic running on amd64; UTF-8; cs_CZ (nb)
Created attachment 140496 [details] Full project with netbeans project files
I've just uploaded the same source file with the netbeans project files inside to avoid any config problem. Hope it will help you. I'm downloading the latest nighlyt build to check if the problem still happen.
I guess this could be OS dependent. Let's wait for Milan for verification on Windows. Thanks.
Created attachment 140498 [details] Screenshot of a Run Focused Test Method Here is a screenshot to display the same kind of error : i do a right-click on e test method and i choose Run Focused Test Method in the output window i get the atoum output in the "test results" window i get "No tests executed" so it doesn't identify how many tests has ran, how many has succed or failed.
Feel free to submit it as a new issue. Thanks.
I installed this version of Netbeans : NetBeans IDE Dev (Build 201309260002) It still fails. You can edit one test method and modify it to fail the test. Then run Test Project, and if it's not the first test to run, the output window won't detect the faileur because it stop after first test method found.
Hi, I think there may be some problem in NetBeans. I tried last dev build and I have same output as reporter. "C:\xampp\php\php.exe" "C:\xampp\php\mageekguy.atoum.phar" "-bf" "C:\xampp\htdocs\testBug\src\MyBundle\Tests\bootstrap.php" "-utr" "-d" "C:\xampp\htdocs\testBug\src\MyBundle\Tests" 1..6 ok 1 # MyBundle\Tests\Units\Entity\Decorator\MembreSiteOne::testBuildUrl() Done. When I try to run same command in cmd.exe I get the right result: C:\xampp\php>php C:\xampp\php\mageekguy.atoum.phar -bf C:\xampp\htdocs\testBug\src\MyBundle\Tests\bootstrap.php -utr -d C:\xampp\htdocs\testBug\src\MyBundle\Tests 1..6 ok 1 # MyBundle\Tests\Units\Entity\Decorator\MembreSiteOne::testBuildUrl() ok 2 # MyBundle\Tests\Units\Entity\Decorator\MembreSiteTwo::testConstruct() ok 3 # MyBundle\Tests\Units\Entity\Decorator\MembreSiteTwo::testGetterAndSetter() ok 4 # MyBundle\Tests\Units\Entity\Decorator\MembreSiteTwo::testCall() ok 5 # MyBundle\Tests\Units\Entity\Decorator\MembreSiteTwo::testBuildUrl() ok 6 # MyBundle\Tests\Units\Entity\MembreSiteThird::testBuildUrl() I have downloaded latest Atoum version but it does not help. Product Version: NetBeans IDE Dev (Build 201309270002) Java: 1.7.0_45; Java HotSpot(TM) 64-Bit Server VM 24.45-b08 Runtime: Java(TM) SE Runtime Environment 1.7.0_45-b14 System: Windows 7 version 6.1 running on amd64; Cp1250; en_US (nb)
(In reply to Tomas Mysik from comment #10) > I guess this could be OS dependent. Let's wait for Milan for verification on > Windows. So, it seems that I was right. I will try to investigate what could be done to fix it on Windows. Thanks.
*** Bug 236421 has been marked as a duplicate of this bug. ***
Adding Petr to CC, he is the author of the external execution API so he could have an idea what we could try. Petře, the problem appears only on Windows and the likely cause is that atoum executable creates child processes which run tests in parallel. Thanks.
Definitely a patch candidate for NB 7.4 Patch 1.
So, I hope that this issue should be fixed now. Could you please verify? Also Milan? Thanks a lot Petře for your help! http://hg.netbeans.org/web-main/rev/542329e4049a
Integrated into 'main-silver', will be available in build *201310090001* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress) Changeset: http://hg.netbeans.org/main-silver/rev/542329e4049a User: Tomas Mysik <tmysik@netbeans.org> Log: #236355 - Run Test File or Run Test Project only run first test found
Verified. All tests are executed. Thanks. Product Version: NetBeans IDE Dev (Build 201310090001) Java: 1.7.0_45; Java HotSpot(TM) 64-Bit Server VM 24.45-b08 Runtime: Java(TM) SE Runtime Environment 1.7.0_45-b14 System: Windows 7 version 6.1 running on amd64; Cp1250; en_US (nb)
I've just installed official Netbeans 4 Product Version: NetBeans IDE 7.4 (Build 201310111528) Java: 1.7.0_25; Java HotSpot(TM) Client VM 23.25-b01 Runtime: Java(TM) SE Runtime Environment 1.7.0_25-b17 System: Windows 7 version 6.1 running on x86; Cp1252; fr_FR (nb) And it fails again whereas on previous build it works well Product Version: NetBeans IDE Dev (Build 201310110001) Java: 1.7.0_25; Java HotSpot(TM) Client VM 23.25-b01 Runtime: Java(TM) SE Runtime Environment 1.7.0_25-b17 System: Windows 7 version 6.1 running on x86; Cp1252; fr_FR (nb)
Please do not reopen fixed issues. It is fixed and it is working in dev build. It is not in 7.4, but it will be in 7.4 patch 1. You can test it in latest dev build [1]. Thanks Product Version: NetBeans IDE Dev (Build 201310290001) Java: 1.7.0_45; Java HotSpot(TM) Client VM 24.45-b08 Runtime: Java(TM) SE Runtime Environment 1.7.0_45-b18 System: Windows 7 version 6.1 running on x86; Cp1250; en_US (nb) [1] http://bits.netbeans.org/dev/nightly/
@reporter: One can easily determine in which NetBeans version the fix will be available - see the Target Milestone field. Thanks.
Transplanted to the releases repository, branch release74. http://hg.netbeans.org/releases/rev/c95696372108
Verified. Product Version: NetBeans IDE 7.4 (Build 201311141216) Java: 1.8.0-ea; Java HotSpot(TM) 64-Bit Server VM 25.0-b50 Runtime: Java(TM) SE Runtime Environment 1.8.0-ea-b108 System: Windows 7 version 6.1 running on amd64; Cp1250; en_US (nb)