Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

TAP comments changed? #256

Closed
tmysik opened this issue Sep 17, 2015 · 2 comments
Closed

TAP comments changed? #256

tmysik opened this issue Sep 17, 2015 · 2 comments
Labels
bug

Comments

@tmysik
Copy link

@tmysik tmysik commented Sep 17, 2015

Formerly, the TAP report looked like:

TAP version 13
ok nette-tester/tests/MyTests.phpt
ok nette-tester/tests/SkippedTests.phpt #skip
not ok nette-tester/tests/Greeting.test.phpt
# Failed: 'Hello JohnX' should be 10
#
# in Tester/Framework/Assert.php(365)
# in Tester/Framework/Assert.php(57) Tester\Assert::fail()
# in nette-tester/tests/Greeting.test.phpt(16) Tester\Assert::same()
not ok nette-tester/tests/Greeting2.test.phpt
# Failed: 'Hello JohnX' should be
#     ... 'Hello John'
#
# diff "%DIFF_BASE_DIR%Greeting.test.expected" "%DIFF_BASE_DIR%Greeting.test.actual"
#
# in Tester/Framework/Assert.php(365)
# in Tester/Framework/Assert.php(57) Tester\Assert::fail()
# in nette-tester/tests/Greeting2.test.phpt(15) Tester\Assert::same()
not ok nette-tester/tests/Greeting3.test.phpt
# Failed: InvalidArgumentException was expected, but none was thrown
#
# in Tester/Framework/Assert.php(365)
# in Tester/Framework/Assert.php(244) Tester\Assert::fail()
# in nette-tester/tests/Greeting3.test.phpt(15) Tester\Assert::exception()
not ok nette-tester/tests/Greeting4.test.phpt
# Failed: E_NOTICE with a message matching 'Undefined property: Greeting::$abc'
#                 ... was expected but got 'Undefined property: Greeting::$say'
#
# in Tester/Framework/Assert.php(365)
# in Tester/Framework/Assert.php(300) Tester\Assert::fail()
# in nette-tester/tests/Greeting4.test.phpt(14) Tester\Assert::Tester\{closure}()
# in [internal function] {closure}()
# in Tester/Framework/Assert.php(304) call_user_func()
# in nette-tester/tests/Greeting4.test.phpt(15) Tester\Assert::error()
ok nette-tester/tests/VerboseSkippedTests.phpt #skip My skip message
1..7

Today, I realized that it is quite different:

TAP version 13
not ok test/src/Calculator.divide.test.phpt
# Exited with error code 255 (expected 0)
# <br />
# <font size='1'><table class='xdebug-error xe-warning' dir='ltr' border='1' cellspacing='0' cellpadding='1'>
# <tr><th align='left' bgcolor='#f57900' colspan="5"><span style='background-color: #cc0000; color: #fce94f; font-size: x-large;'>( ! )</span> Warning: require(/home/gapon/NetBeansProjects/Calculator-Nette-Tester5/test/src/../vendor/autoload.php): failed to open stream: No such file or directory in /home/gapon/NetBeansProjects/Calculator-Nette-Tester5/test/src/Calculator.divide.test.phpt on line <i>44</i></th></tr>
# <tr><th align='left' bgcolor='#e9b96e' colspan='5'>Call Stack</th></tr>
# <tr><th align='center' bgcolor='#eeeeec'>#</th><th align='left' bgcolor='#eeeeec'>Time</th><th align='left' bgcolor='#eeeeec'>Memory</th><th align='left' bgcolor='#eeeeec'>Function</th><th align='left' bgcolor='#eeeeec'>Location</th></tr>
# <tr><td bgcolor='#eeeeec' align='center'>1</td><td bgcolor='#eeeeec' align='center'>0.0002</td><td bgcolor='#eeeeec' align='right'>257184</td><td bgcolor='#eeeeec'>{main}(  )</td><td title='/home/gapon/NetBeansProjects/Calculator-Nette-Tester5/test/src/Calculator.divide.test.phpt' bgcolor='#eeeeec'>.../Calculator.divide.test.phpt<b>:</b>0</td></tr>
# </table></font>
# <br />
# <font size='1'><table class='xdebug-error xe-fatal-error' dir='ltr' border='1' cellspacing='0' cellpadding='1'>
# <tr><th align='left' bgcolor='#f57900' colspan="5"><span style='background-color: #cc0000; color: #fce94f; font-size: x-large;'>( ! )</span> Fatal error: require(): Failed opening required '/home/gapon/NetBeansProjects/Calculator-Nette-Tester5/test/src/../vendor/autoload.php' (include_path='.:/usr/share/php:/usr/share/pear') in /home/gapon/NetBeansProjects/Calculator-Nette-Tester5/test/src/Calculator.divide.test.phpt on line <i>44</i></th></tr>
# <tr><th align='left' bgcolor='#e9b96e' colspan='5'>Call Stack</th></tr>
# <tr><th align='center' bgcolor='#eeeeec'>#</th><th align='left' bgcolor='#eeeeec'>Time</th><th align='left' bgcolor='#eeeeec'>Memory</th><th align='left' bgcolor='#eeeeec'>Function</th><th align='left' bgcolor='#eeeeec'>Location</th></tr>
# <tr><td bgcolor='#eeeeec' align='center'>1</td><td bgcolor='#eeeeec' align='center'>0.0002</td><td bgcolor='#eeeeec' align='right'>257184</td><td bgcolor='#eeeeec'>{main}(  )</td><td title='/home/gapon/NetBeansProjects/Calculator-Nette-Tester5/test/src/Calculator.divide.test.phpt' bgcolor='#eeeeec'>.../Calculator.divide.test.phpt<b>:</b>0</td></tr>
# </table></font>
not ok test/src/Calculator.minus.test.phpt
# Exited with error code 255 (expected 0)
# <br />
# <font size='1'><table class='xdebug-error xe-warning' dir='ltr' border='1' cellspacing='0' cellpadding='1'>
# <tr><th align='left' bgcolor='#f57900' colspan="5"><span style='background-color: #cc0000; color: #fce94f; font-size: x-large;'>( ! )</span> Warning: require(/home/gapon/NetBeansProjects/Calculator-Nette-Tester5/test/src/../vendor/autoload.php): failed to open stream: No such file or directory in /home/gapon/NetBeansProjects/Calculator-Nette-Tester5/test/src/Calculator.minus.test.phpt on line <i>44</i></th></tr>
# <tr><th align='left' bgcolor='#e9b96e' colspan='5'>Call Stack</th></tr>
# <tr><th align='center' bgcolor='#eeeeec'>#</th><th align='left' bgcolor='#eeeeec'>Time</th><th align='left' bgcolor='#eeeeec'>Memory</th><th align='left' bgcolor='#eeeeec'>Function</th><th align='left' bgcolor='#eeeeec'>Location</th></tr>
# <tr><td bgcolor='#eeeeec' align='center'>1</td><td bgcolor='#eeeeec' align='center'>0.0002</td><td bgcolor='#eeeeec' align='right'>254832</td><td bgcolor='#eeeeec'>{main}(  )</td><td title='/home/gapon/NetBeansProjects/Calculator-Nette-Tester5/test/src/Calculator.minus.test.phpt' bgcolor='#eeeeec'>.../Calculator.minus.test.phpt<b>:</b>0</td></tr>
# </table></font>
# <br />
# <font size='1'><table class='xdebug-error xe-fatal-error' dir='ltr' border='1' cellspacing='0' cellpadding='1'>
# <tr><th align='left' bgcolor='#f57900' colspan="5"><span style='background-color: #cc0000; color: #fce94f; font-size: x-large;'>( ! )</span> Fatal error: require(): Failed opening required '/home/gapon/NetBeansProjects/Calculator-Nette-Tester5/test/src/../vendor/autoload.php' (include_path='.:/usr/share/php:/usr/share/pear') in /home/gapon/NetBeansProjects/Calculator-Nette-Tester5/test/src/Calculator.minus.test.phpt on line <i>44</i></th></tr>
# <tr><th align='left' bgcolor='#e9b96e' colspan='5'>Call Stack</th></tr>
# <tr><th align='center' bgcolor='#eeeeec'>#</th><th align='left' bgcolor='#eeeeec'>Time</th><th align='left' bgcolor='#eeeeec'>Memory</th><th align='left' bgcolor='#eeeeec'>Function</th><th align='left' bgcolor='#eeeeec'>Location</th></tr>
# <tr><td bgcolor='#eeeeec' align='center'>1</td><td bgcolor='#eeeeec' align='center'>0.0002</td><td bgcolor='#eeeeec' align='right'>254832</td><td bgcolor='#eeeeec'>{main}(  )</td><td title='/home/gapon/NetBeansProjects/Calculator-Nette-Tester5/test/src/Calculator.minus.test.phpt' bgcolor='#eeeeec'>.../Calculator.minus.test.phpt<b>:</b>0</td></tr>
# </table></font>
not ok test/src/Calculator.multiply.test.phpt
# Exited with error code 255 (expected 0)
# <br />
# <font size='1'><table class='xdebug-error xe-warning' dir='ltr' border='1' cellspacing='0' cellpadding='1'>
# <tr><th align='left' bgcolor='#f57900' colspan="5"><span style='background-color: #cc0000; color: #fce94f; font-size: x-large;'>( ! )</span> Warning: require(/home/gapon/NetBeansProjects/Calculator-Nette-Tester5/test/src/../vendor/autoload.php): failed to open stream: No such file or directory in /home/gapon/NetBeansProjects/Calculator-Nette-Tester5/test/src/Calculator.multiply.test.phpt on line <i>44</i></th></tr>
# <tr><th align='left' bgcolor='#e9b96e' colspan='5'>Call Stack</th></tr>
# <tr><th align='center' bgcolor='#eeeeec'>#</th><th align='left' bgcolor='#eeeeec'>Time</th><th align='left' bgcolor='#eeeeec'>Memory</th><th align='left' bgcolor='#eeeeec'>Function</th><th align='left' bgcolor='#eeeeec'>Location</th></tr>
# <tr><td bgcolor='#eeeeec' align='center'>1</td><td bgcolor='#eeeeec' align='center'>0.0002</td><td bgcolor='#eeeeec' align='right'>255880</td><td bgcolor='#eeeeec'>{main}(  )</td><td title='/home/gapon/NetBeansProjects/Calculator-Nette-Tester5/test/src/Calculator.multiply.test.phpt' bgcolor='#eeeeec'>.../Calculator.multiply.test.phpt<b>:</b>0</td></tr>
# </table></font>
# <br />
# <font size='1'><table class='xdebug-error xe-fatal-error' dir='ltr' border='1' cellspacing='0' cellpadding='1'>
# <tr><th align='left' bgcolor='#f57900' colspan="5"><span style='background-color: #cc0000; color: #fce94f; font-size: x-large;'>( ! )</span> Fatal error: require(): Failed opening required '/home/gapon/NetBeansProjects/Calculator-Nette-Tester5/test/src/../vendor/autoload.php' (include_path='.:/usr/share/php:/usr/share/pear') in /home/gapon/NetBeansProjects/Calculator-Nette-Tester5/test/src/Calculator.multiply.test.phpt on line <i>44</i></th></tr>
# <tr><th align='left' bgcolor='#e9b96e' colspan='5'>Call Stack</th></tr>
# <tr><th align='center' bgcolor='#eeeeec'>#</th><th align='left' bgcolor='#eeeeec'>Time</th><th align='left' bgcolor='#eeeeec'>Memory</th><th align='left' bgcolor='#eeeeec'>Function</th><th align='left' bgcolor='#eeeeec'>Location</th></tr>
# <tr><td bgcolor='#eeeeec' align='center'>1</td><td bgcolor='#eeeeec' align='center'>0.0002</td><td bgcolor='#eeeeec' align='right'>255880</td><td bgcolor='#eeeeec'>{main}(  )</td><td title='/home/gapon/NetBeansProjects/Calculator-Nette-Tester5/test/src/Calculator.multiply.test.phpt' bgcolor='#eeeeec'>.../Calculator.multiply.test.phpt<b>:</b>0</td></tr>
# </table></font>
not ok test/src/Calculator.plus.test.phpt
# Exited with error code 255 (expected 0)
# <br />
# <font size='1'><table class='xdebug-error xe-warning' dir='ltr' border='1' cellspacing='0' cellpadding='1'>
# <tr><th align='left' bgcolor='#f57900' colspan="5"><span style='background-color: #cc0000; color: #fce94f; font-size: x-large;'>( ! )</span> Warning: require(/home/gapon/NetBeansProjects/Calculator-Nette-Tester5/test/src/../vendor/autoload.php): failed to open stream: No such file or directory in /home/gapon/NetBeansProjects/Calculator-Nette-Tester5/test/src/Calculator.plus.test.phpt on line <i>44</i></th></tr>
# <tr><th align='left' bgcolor='#e9b96e' colspan='5'>Call Stack</th></tr>
# <tr><th align='center' bgcolor='#eeeeec'>#</th><th align='left' bgcolor='#eeeeec'>Time</th><th align='left' bgcolor='#eeeeec'>Memory</th><th align='left' bgcolor='#eeeeec'>Function</th><th align='left' bgcolor='#eeeeec'>Location</th></tr>
# <tr><td bgcolor='#eeeeec' align='center'>1</td><td bgcolor='#eeeeec' align='center'>0.0002</td><td bgcolor='#eeeeec' align='right'>254832</td><td bgcolor='#eeeeec'>{main}(  )</td><td title='/home/gapon/NetBeansProjects/Calculator-Nette-Tester5/test/src/Calculator.plus.test.phpt' bgcolor='#eeeeec'>.../Calculator.plus.test.phpt<b>:</b>0</td></tr>
# </table></font>
# <br />
# <font size='1'><table class='xdebug-error xe-fatal-error' dir='ltr' border='1' cellspacing='0' cellpadding='1'>
# <tr><th align='left' bgcolor='#f57900' colspan="5"><span style='background-color: #cc0000; color: #fce94f; font-size: x-large;'>( ! )</span> Fatal error: require(): Failed opening required '/home/gapon/NetBeansProjects/Calculator-Nette-Tester5/test/src/../vendor/autoload.php' (include_path='.:/usr/share/php:/usr/share/pear') in /home/gapon/NetBeansProjects/Calculator-Nette-Tester5/test/src/Calculator.plus.test.phpt on line <i>44</i></th></tr>
# <tr><th align='left' bgcolor='#e9b96e' colspan='5'>Call Stack</th></tr>
# <tr><th align='center' bgcolor='#eeeeec'>#</th><th align='left' bgcolor='#eeeeec'>Time</th><th align='left' bgcolor='#eeeeec'>Memory</th><th align='left' bgcolor='#eeeeec'>Function</th><th align='left' bgcolor='#eeeeec'>Location</th></tr>
# <tr><td bgcolor='#eeeeec' align='center'>1</td><td bgcolor='#eeeeec' align='center'>0.0002</td><td bgcolor='#eeeeec' align='right'>254832</td><td bgcolor='#eeeeec'>{main}(  )</td><td title='/home/gapon/NetBeansProjects/Calculator-Nette-Tester5/test/src/Calculator.plus.test.phpt' bgcolor='#eeeeec'>.../Calculator.plus.test.phpt<b>:</b>0</td></tr>
# </table></font>
1..4
Error: Content of file '/tmp/nb-tester-coverage.xml' is invalid.
Done.

Is it intentional? I need to know whether it is expected so Nette Tester support in NetBeans needs to be fixed/improved.

Thanks.

@milo

This comment has been minimized.

Copy link
Member

@milo milo commented Sep 17, 2015

This is an HTML stack trace printed by enabled Xdebug extension. Imho, Tester should print it always in a plain format, at least for TAP output.

@milo milo added the bug label Sep 17, 2015
@tmysik

This comment has been minimized.

Copy link
Author

@tmysik tmysik commented Sep 17, 2015

Thanks a lot.

milo added a commit to milo/tester that referenced this issue Oct 17, 2015
The html_errors is disabled by Tester\Environment::setup(), but its call is optional for now.
milo added a commit to milo/tester that referenced this issue Oct 17, 2015
…ette#256]

The html_errors is disabled by Tester\Environment::setup(), but its call is optional for now.
@milo milo closed this in 3d3060f Oct 19, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
2 participants
You can’t perform that action at this time.