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.

Bug 242325 - Nette Tester sample - No tests executed (using Composer)
Summary: Nette Tester sample - No tests executed (using Composer)
Status: VERIFIED FIXED
Alias: None
Product: php
Classification: Unclassified
Component: Project (show other bugs)
Version: 8.0
Hardware: PC Windows 7
: P3 normal with 1 vote (vote)
Assignee: Tomas Mysik
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2014-02-25 14:51 UTC by mmolda
Modified: 2014-04-28 07:18 UTC (History)
3 users (show)

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments
When test failes, then netbeans display that no test were executed (22.54 KB, image/png)
2014-03-27 10:06 UTC, sojki
Details

Note You need to log in before you can comment on or make changes to this bug.
Description mmolda 2014-02-25 14:51:45 UTC
Windows specific bug. Also, this is only if using the tester file generated by composer (vendor/bin/tester).
1. Create a new Nette Tester Calculator Sample Application
2. Run Composer > Install (dev)
3. Run Tests (right click on project name and select Test)

No tests are executed.

Command in NetBeans output:
"C:\xampp\php\php.exe" "C:\Users\moldamil\Documents\NetBeansProjects\Calculator-Nette-Tester4\src\vendor\bin\tester" "--tap" "-s" "C:\Users\moldamil\Documents\NetBeansProjects\Calculator-Nette-Tester4\test"

Should be without "C:\xampp\php\php.exe" at the begining. In command line this is working:
"C:\Users\moldamil\Documents\NetBeansProjects\Calculator-Nette-Tester4\src\vendor\bin\tester" "--tap" "-s" "C:\Users\moldamil\Documents\NetBeansProjects\Calculator-Nette-Tester4\test"

Thanks.
Comment 1 mmolda 2014-02-25 15:00:11 UTC
There is workaround possible. In project Properties under Testing > Nette Tester, set Custom Tester File to "project_files\src\vendor\nette\tester\Tester\tester".

Default is \vendor\bin\tester

Product Version: NetBeans IDE 8.0 RC1 (Build 201402242200)
Java: 1.8.0; Java HotSpot(TM) 64-Bit Server VM 25.0-b67
Runtime: Java(TM) SE Runtime Environment 1.8.0-b126
System: Windows 7 version 6.1 running on amd64; Cp1250; en_US (nb)
Comment 2 Tomas Mysik 2014-02-28 09:32:11 UTC
Milane, on Linux, these file are exactly the same:

(1) src\vendor\bin\tester
(2) src\vendor\nette\tester\Tester\tester

(1) is a symlink of (2), its content is:

--------------------------------------
#!/usr/bin/env php
<?php

require __DIR__ . '/tester.php';
--------------------------------------

Please, attach those two files which you have on Windows.

Thanks.
Comment 3 mmolda 2014-03-04 14:23:37 UTC
on Windows, these files are not same:
(1) src\vendor\bin\tester

#!/usr/bin/env sh
SRC_DIR="`pwd`"
cd "`dirname "$0"`"
cd "../nette/tester/Tester"
BIN_TARGET="`pwd`/tester"
cd "$SRC_DIR"
"$BIN_TARGET" "$@"

(2) src\vendor\nette\tester\Tester\tester

#!/usr/bin/env php
<?php

require __DIR__ . '/tester.php';
Comment 4 Tomas Mysik 2014-03-04 16:32:04 UTC
(In reply to mmolda from comment #3)
> on Windows, these files are not same:
> (1) src\vendor\bin\tester
> 
> #!/usr/bin/env sh
> SRC_DIR="`pwd`"
> cd "`dirname "$0"`"
> cd "../nette/tester/Tester"
> BIN_TARGET="`pwd`/tester"
> cd "$SRC_DIR"
> "$BIN_TARGET" "$@"

Seems to me to be a bug in Nette Tester (perhaps)? On Windows, it should be a BAT file and not Shell file...

Thanks.
Comment 5 mmolda 2014-03-04 16:34:16 UTC
Well there is also tester.bat file:

@ECHO OFF
SET BIN_TARGET=%~dp0/../nette/tester/Tester/tester
php "%BIN_TARGET%" %*

But this is also not working. It just prints the content of file in output window.

"C:\xampp\php\php.exe" "C:\Users\moldamil\Documents\NetBeansProjects\Calculator-Nette-Tester3\src\vendor\bin\tester" "--tap" "-s" "C:\Users\moldamil\Documents\NetBeansProjects\Calculator-Nette-Tester3\test"
@ECHO OFF
SET BIN_TARGET=%~dp0/../nette/tester/Tester/tester
php "%BIN_TARGET%" %*
Done.
Comment 6 Tomas Mysik 2014-03-10 12:37:26 UTC
So, the solution here will be to select:

- BAT file for Windows, or
- directly src\vendor\nette\tester\Tester\tester.

Thanks.
Comment 7 Olicek 2014-03-20 17:52:07 UTC
It doesn't work correctly, i think. When i use composer and the .bat file it works until any test fails. If any test fails, Netbeans return: No tests executed. What is wrong is writen just in Output window. I suppose, it should be shown in Test results window, doesn't it?

I use Netbeans 8 and Windows 8.
Comment 8 Tomas Mysik 2014-03-24 05:55:27 UTC
(In reply to Olicek from comment #7)
> It doesn't work correctly, i think. When i use composer and the .bat file it
> works until any test fails. If any test fails, Netbeans return: No tests
> executed. What is wrong is writen just in Output window. I suppose, it
> should be shown in Test results window, doesn't it?
> 
> I use Netbeans 8 and Windows 8.

And if you select "src\vendor\nette\tester\Tester\tester", does it work then? To BAT file - yes, it should definitely work, I will look at it (it could be a bug in Nette Tester IMHO).

Thanks.
Comment 9 sojki 2014-03-27 10:06:34 UTC
Created attachment 146348 [details]
When test failes, then netbeans display that no test were executed
Comment 10 sojki 2014-03-27 10:10:28 UTC
When test failed (according to output), then netbeans "test results" show that no tests were executed. 

This behavior is identical, when php error occcured in any of tests.
Comment 11 Tomas Mysik 2014-03-27 11:26:11 UTC
(In reply to sojki from comment #9)
> Created attachment 146348 [details]
> When test failes, then netbeans display that no test were executed

Please, this comment is completely unrelated to this issue. Create a new report for your problem. Thanks.
Comment 12 Tomas Mysik 2014-03-28 10:57:38 UTC
Should be fixed now, please verify. Thanks.

http://hg.netbeans.org/web-main/rev/3a54f9309dbf
Comment 13 Quality Engineering 2014-03-29 07:21:22 UTC
Integrated into 'main-silver', will be available in build *201403290001* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress)

Changeset: http://hg.netbeans.org/main-silver/rev/3a54f9309dbf
User: Tomas Mysik <tmysik@netbeans.org>
Log: #242325 - Nette Tester sample - No tests executed (using Composer)
Comment 14 Vladimir Riha 2014-04-11 13:02:18 UTC
Issue from description is no longer reproducible => verified


Product Version: NetBeans IDE Dev (Build 201404100001)
Java: 1.8.0; Java HotSpot(TM) 64-Bit Server VM 25.0-b70
Runtime: Java(TM) SE Runtime Environment 1.8.0-b132
System: Windows 7 version 6.1 running on amd64; Cp1252; en_US (nb)
Comment 15 Tomas Mysik 2014-04-18 06:13:46 UTC
Transplanted to releases repo to the branch release80.

Thanks.

http://hg.netbeans.org/releases/rev/b9bccca1909d
http://hg.netbeans.org/releases/rev/7290c4b3fbcc
Comment 16 Quality Engineering 2014-04-24 02:11:34 UTC
Integrated into 'releases/release80', will be available in build *201404240045* or newer. Wait for official and publicly available build.

Changeset: http://hg.netbeans.org/releases/rev/b9bccca1909d
User: Tomas Mysik <tmysik@netbeans.org>
Log: #242325 - Nette Tester sample - No tests executed (using Composer)
(transplanted from 3a54f9309dbfd6ccc11e245a64e10b8911a8592e)
Comment 17 Vladimir Riha 2014-04-28 07:18:35 UTC
verified in patch1

Product Version: NetBeans IDE 8.0 (Build 201403101706)
Updates: NetBeans IDE is updated to version NetBeans 8.0 Patch 1
Java: 1.8.0; Java HotSpot(TM) 64-Bit Server VM 25.0-b70
Runtime: Java(TM) SE Runtime Environment 1.8.0-b132
System: Windows 7 version 6.1 running on amd64; Cp1252; en_US (nb)