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.
Hi, the "new" trunk builds of NetBeans 7.2 introduces feature that Test Result ouput window is not opened when all test pass. This is personally not very usable because this way you have no information about started/runnig tests, no progress information. And the same for console output where may be some relevant information. Even if all tests pass, I still want to see the results, to be sure about it. What about make this current behavior optional so users would have to choose not to see it and the default would be the behavior of NB <7.2?
I can confirm that this feature (is it really a feature?) is definitely bad and not usable at all. Thanks.
This behavior is documented in http://wiki.netbeans.org/NewAndNoteworthyNB72#Testing_Tools and was implemented this way in accordance to proposals by Jan Rojcek in bug 118772. Now, the Test Results Window is only opened when there is at least one error or failure. If all test cases pass then appropriate messages are displayed in the status bar notifying the user that the tests have finished successfully. The same behavior is observed when for example you build your project. The output window only opens if there is a failure. In any case if you prefer the TRW to be always open you can open it from Window->Output->Test Results Petr any comments on this?
(In reply to comment #2) > If all test cases pass then appropriate messages are displayed in the > status bar notifying the user that the tests have finished successfully. The only message I can see when running test file is "Finished building [application] (test)". I'm not sure if this is self explaining because it says nothing about actual test results and the same message is displayed when some test failed. Maybe I'm missing something? (running PHPUnit tests gives no msg at all) (In reply to comment #2) > In any case if you prefer the TRW to be always open you can open it from > Window->Output->Test Results True but it is doesn't get focus (if all tests pass) so I have to switch into it.
@vriha: Please, submit an issue against PHP since now, there is no feedback for our users at all. Thanks. @theofanis: Would it be possible at least to introduce a system property to avoid this behavior, please? Thanks.
(In reply to comment #4) > @vriha: Please, submit an issue against PHP since now, there is no feedback for > our users at all. Thanks. Thinking about it - who should inform the user about the result of the test run? Isn't it responsibility of the test runner itself rather than all other modules using it (e.g. PHP)? Thanks.
I would prefer the old way it worked as well, in the current situation I do not get the progress information. But I would be happy with a compromise like; only give the Test Results Window focus when it is open. Thanks
This issue seems to have two opposing groups of users, one preferring the Test Results window to pop-up always, the other only in case of test failure (this is advocated in issue #118772). The cleaner solution from UEX point of view is not to pop-up always, as it is reasonable to expect that running the tests is a lengthy operation that often makes sense to run in background, leaving the workspace completely available for other work inbetween. However, such approach should not make life more difficult to anyone. Therefore I extend Jan Rojcek points (see #118772 comment 5) - if the user runs tests, the global progress indication shows that tests are running (no window open yet). - if tests finish successfully, the progress disappears (no window open). - if a test fails, the window is open. - the reason some users prefer the window to pop-up is they want to track progress. When no window is open, the progress bar alone does not give sufficient information about this; therefore I suggest that - if possible - the task label in statusbar should be kept updated to give more valuable info, like Projectname tests passed: X, remain: Y.. Maybe listing the name of the currently performed test would make sense as well, but the label should remain not excessively long.. - another deficiency of not opening the window is the lack of notification about successful finish of all tests. It would be good to pass this information to user in an unobtrusive way even of the window does not pop-up (now it can be recognized only by observing when this particular progressbar disappears from status bar, what is not convenient). However, there might be more options to achieve this and I move the discussion about this point to issue #210149. - Ralph's idea - to bring forward Test Results window if it is already open - can be considered only if this does not steel focus from the main editor window. Although I do not think this improves things much, it can be done as a compromise. See comments in #210149 for related suggestions.
Fixed: http://hg.netbeans.org/core-main/rev/ed03ae450082 1) if there is at least one error/failure TRW opens even if closed 2) if there are no error/failure AND TRW is already open, it gets promoted without stealing focus from the editor 3) if there are no error/failure AND TRW is closed, a notification bubble is presented notifying the user that all tests for a specific project have passed
(In reply to comment #8) > 3) if there are no error/failure AND TRW is closed, a notification bubble is > presented notifying the user that all tests for a specific project have passed http://hg.netbeans.org/core-main/rev/a86e7dfd1426 added option to open Test Results Window from notification bubble.
Integrated into 'main-golden', will be available in build *201204050400* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress) Changeset: http://hg.netbeans.org/main-golden/rev/ed03ae450082 User: Theofanis Oikonomou <theofanis@netbeans.org> Log: Issue #210554 - Not opening test results window when all test passed
verified, thanks a lot NetBeans IDE Dev (Build 201204050400)
The implementation of case #3 is no good. Now the notification bubbles just pile up every time you run tests successfully! You need to capture the Notification return value, and clear it if either 1. More tests are started. (I guess it does not matter if they are in another project, since there will just be a bunch of tabs in the one window.) 2. Or some time has elapsed without the user clicking on the hyperlink, meaning they know the tests passed and have no intention of opening the window. (15s?)
Created attachment 117909 [details] Screenshot showing accumulated notifications
Yes you are correct. I was thinking about it as well but I wanted to see if the new approach with the notification bubble would be acceptable first. I followed your suggestions. Thank you Fixed: http://hg.netbeans.org/core-main/rev/0350c66c4c4c
I am sorry, my mistake. This is the correct fix: http://hg.netbeans.org/core-main/rev/16a5162a2281
Integrated into 'main-golden', will be available in build *201204070400* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress) Changeset: http://hg.netbeans.org/main-golden/rev/0350c66c4c4c User: Theofanis Oikonomou <theofanis@netbeans.org> Log: Issue #210554 - Not opening test results window when all test passed
(In reply to comment #15) > This is the correct fix: http://hg.netbeans.org/core-main/rev/16a5162a2281 I don't know the NotificationDisplayer API (really one needs to use his own thread?) but IMHO RequestProcessor should be used (instead of Thread).
Fixed: http://hg.netbeans.org/core-main/rev/3cd39ef1b697 Thanks for the comments
Call to bubbleTask.cancel() before bubbleTask.schedule(0) might not be necessary or even right, but I am not sure I understand the logic there. Call to cancel from inside the action listener is also probably unnecessary, since a notification is cleared automatically by clicking its hyperlink. Just make sure to test all the scenarios if you have not done so already.
(In reply to comment #19) > Call to bubbleTask.cancel() before bubbleTask.schedule(0) might not be > necessary or even right, but I am not sure I understand the logic there. bubbleTask.cancel() returns true if the task was running and has been removed from the queue and false if the task has already been processed. In the former case I am calling bubbleTask.schedule(0) to clear the notification immediately. In the latter case nothing needs to be done as the bubble was cleared when bubbleTask was run > Call > to cancel from inside the action listener is also probably unnecessary, since a > notification is cleared automatically by clicking its hyperlink. the notification is cleared when clicking on the hyperlink but bubbleTask will still run and after ~15sec will clear the notification again, probably clearing something useful. > Just make sure > to test all the scenarios if you have not done so already.
I am not sure what the current behavior is supposed to be, but Test Results is opening for me every time I run a test, even when it passes; there is no notification bubble. Normally I keep it minimized (sliding mode) at the bottom of the screen.
(In reply to comment #21) > Test Results is opening for me every time I run a test Filed separately as bug #211104.