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 158861 - nb-phpunit-log.xml does not exist and causes test results UI to fail
Summary: nb-phpunit-log.xml does not exist and causes test results UI to fail
Status: RESOLVED DUPLICATE of bug 158551
Alias: None
Product: php
Classification: Unclassified
Component: PHPUnit (show other bugs)
Version: 6.x
Hardware: PC Windows Vista
: P3 blocker (vote)
Assignee: Tomas Mysik
URL:
Keywords: RANDOM
Depends on:
Blocks:
 
Reported: 2009-02-19 20:29 UTC by blakenzoe
Modified: 2009-03-10 14:01 UTC (History)
0 users

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description blakenzoe 2009-02-19 20:29:14 UTC
When running a PHPUnit test, the Test Results pane opens and states that the test is "Running..."; however, it never
transitions to a completed state, nor does anything else display in the Test Results pane.  After looking in the IDE
Log, I discovered the following set of messages:

WARNING [org.netbeans.modules.php.project.ui.testrunner.UnitTestRunner]: In order to show test results UI, file
C:\Users\bbishop\AppData\Local\Temp\nb-phpunit-log.xml must exist.Report this issue please in
http://www.netbeans.org/issues/.
SEVERE [global]
java.lang.AssertionError: Fileobject not found for context: org.openide.util.Lookup$Empty@406199
        at org.netbeans.modules.php.project.ui.actions.support.ConfigActionTest.getFilePair(ConfigActionTest.java:197)
        at org.netbeans.modules.php.project.ui.actions.support.ConfigActionTest.getPair(ConfigActionTest.java:186)
        at org.netbeans.modules.php.project.ui.actions.support.ConfigActionTest.getValidPair(ConfigActionTest.java:174)
        at org.netbeans.modules.php.project.ui.actions.support.ConfigActionTest.run(ConfigActionTest.java:152)
        at org.netbeans.modules.php.project.ui.actions.support.ConfigActionTest.access$000(ConfigActionTest.java:77)
        at
org.netbeans.modules.php.project.ui.actions.support.ConfigActionTest$RerunUnitTestHandler.rerun(ConfigActionTest.java:357)
        at org.netbeans.modules.gsf.testrunner.api.StatisticsPanel$1.actionPerformed(StatisticsPanel.java:137)
        at javax.swing.AbstractButton.fireActionPerformed(AbstractButton.java:1995)
        at javax.swing.AbstractButton$Handler.actionPerformed(AbstractButton.java:2318)
        at javax.swing.DefaultButtonModel.fireActionPerformed(DefaultButtonModel.java:387)
        at javax.swing.DefaultButtonModel.setPressed(DefaultButtonModel.java:242)
        at javax.swing.plaf.basic.BasicButtonListener.mouseReleased(BasicButtonListener.java:236)
        at java.awt.AWTEventMulticaster.mouseReleased(AWTEventMulticaster.java:272)
        at java.awt.Component.processMouseEvent(Component.java:6134)
        at javax.swing.JComponent.processMouseEvent(JComponent.java:3265)
        at java.awt.Component.processEvent(Component.java:5899)
        at java.awt.Container.processEvent(Container.java:2023)
        at java.awt.Component.dispatchEventImpl(Component.java:4501)
        at java.awt.Container.dispatchEventImpl(Container.java:2081)
        at java.awt.Component.dispatchEvent(Component.java:4331)
        at java.awt.LightweightDispatcher.retargetMouseEvent(Container.java:4301)
        at java.awt.LightweightDispatcher.processMouseEvent(Container.java:3965)
        at java.awt.LightweightDispatcher.dispatchEvent(Container.java:3895)
        at java.awt.Container.dispatchEventImpl(Container.java:2067)
        at java.awt.Window.dispatchEventImpl(Window.java:2458)
        at java.awt.Component.dispatchEvent(Component.java:4331)
        at java.awt.EventQueue.dispatchEvent(EventQueue.java:599)
        at org.netbeans.core.TimableEventQueue.dispatchEvent(TimableEventQueue.java:104)
[catch] at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:269)
        at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:184)
        at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:174)
        at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:169)
        at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:161)
        at java.awt.EventDispatchThread.run(EventDispatchThread.java:122)
WARNING [org.netbeans.modules.php.project.ui.testrunner.UnitTestRunner]: In order to show test results UI, file
C:\Users\bbishop\AppData\Local\Temp\nb-phpunit-log.xml must exist.Report this issue please in
http://www.netbeans.org/issues/.
Comment 1 blakenzoe 2009-02-19 20:32:21 UTC
After manually creating an empty nb-phpunit-log.xml file, the Test Results window appears to work fine.
Comment 2 Tomas Mysik 2009-02-19 22:17:57 UTC
Seems to me to be a duplicate of issue #158551. That would be great since I'm not able to reproduce.

Could you please try to help me a bit? Run PHPUnit script from command line with parameter "--log-xml C:
the file "some-testing-file.xml" created in your Temp directory? This can be done from IDE but first please remove manually "nb-phpunit-
the output here? That would be helpful in case of any error.
(The XML file is generated by PHPUnit, IDE just parses it.)

> After manually creating an empty nb-phpunit-log.xml file, the Test Results window appears to work fine.

What have you done exactly? Just created that file and then it started to work without any error in the IDE log file? In other words - the file
wasn't created before "automatically"? That would be weird behaviour - not to be allowed to create a file but be allowed to rewrite the
existing one.

Thanks a lot for cooperation.
Comment 3 blakenzoe 2009-02-20 04:49:29 UTC
I tried the following:
a) I deleted the file C:\Users\bbishop\AppData\Local\Temp\nb-phpunit-log.xml and was able to reproduce the issue
b) I added the file back to my Temp and the issue cleared up
c) I renamed the file to nb-phpunit-log-OLD.xml and, when I ran the unit test, the IDE properly created nb-phpunit-log.xml
d) I renamed the file to OLD-nb-phpunit-log.xml and the IDE properly created a new nb-phpunit-log.xml file
e) I deleted all XML files from the directory and the IDE properly recreated the file
f) I deleted all XML files and restarted the IDE, then ran a unit test file and the IDE properly created the XML file
g) I tried running PHPUnit from the command line and it was able to properly create the XML output file in the temp
directory

I cannot seem to reproduce the issue anymore.
Comment 4 Tomas Mysik 2009-02-20 09:28:36 UTC
Thanks a lot for your cooperation. From what you wrote I have a suspicion that IDE tries to parse XML file _before_ it is created (of
course, this could cause random behaviour). I will try to play with it a bit on Windows.

Thanks a lot.
Comment 5 Tomas Mysik 2009-02-20 09:47:32 UTC
Maybe one more request - if you come into this issue again, could you please look at Output window (Window > Output > Output) and
copy & paste it here? It would be helpful in case of any error (if there's no error than my suspicion described in the previous comment
could be right). Thanks a lot.
Comment 6 Tomas Mysik 2009-03-10 14:01:03 UTC
I made several changes in this area recently and I hope it should be fixed now. Could you please verify that I am right? Just reopen this
issue if it happens to you again. Thanks a lot.
(Seems to me to be a duplicate of #158551.)


*** This issue has been marked as a duplicate of 158551 ***