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.
Ran a test that had an error. Sometimes the editor status bar (the bit on the bottom of the editor that shows things like Line number: column INS etc) turns red and says the test failed, but I didn't get that with this output: Loaded suite C:/InstantRails/rails_apps/rfs/test/unit/rest_phone/phone_action/phone_action_subtypes_test Started .......E........................... Finished in 0.257 seconds. 1) Error: test_event_response(RestPhone::PhoneAction::JoinSoundCollectionsTest): NoMethodError: You have a nil object when you didn't expect it! You might have expected an instance of Array. The error occurred while evaluating nil.each C:/InstantRails/rails_apps/rfs/app/models/rest_phone/phone_action/phone_action_subtypes.rb:176:in `create_a_response' C:/InstantRails/rails_apps/rfs/app/models/rest_phone/phone_action.rb:125:in `event_response' C:/InstantRails/rails_apps/rfs/test/unit/rest_phone/phone_action/phone_action_subtypes_test.rb:20:in `assert_event_response' C:/InstantRails/rails_apps/rfs/test/unit/rest_phone/phone_action/phone_action_subtypes_test.rb:182:in `test_event_response' 35 tests, 81 assertions, 0 failures, 1 errors Product Version: NetBeans Ruby IDE 070829 Java: 1.6.0_01; Java HotSpot(TM) Client VM 1.6.0_01-b06 System: Windows Vista version 6.0 running on x86; Cp1252; en_US (nbrubyide) Userdir: C:\Users\James\AppData\Roaming\.nbrubyide\dev
I suspect what happened here is what I've seen in a couple of other cases: there is probably a trailing \r on the line (since you're on Windows) and that causes the regular expression match to fail. I've fixed that scenario now - reopen if it happens again (e.g. the cause is something else). IDE:------------------------------------------------- IDE: [8/30/07 8:47 AM] Committing started cvs server: scheduling file `TestNotifierTest.java' for addition cvs server: use 'cvs commit' to add this file permanently Checking in src/org/netbeans/modules/ruby/rubyproject/TestNotifier.java; /cvs/ruby/projects/src/org/netbeans/modules/ruby/rubyproject/TestNotifier.java,v <-- TestNotifier.java new revision: 1.2; previous revision: 1.1 done RCS file: /cvs/ruby/projects/test/unit/src/org/netbeans/modules/ruby/rubyproject/TestNotifierTest.java,v done Checking in test/unit/src/org/netbeans/modules/ruby/rubyproject/TestNotifierTest.java; /cvs/ruby/projects/test/unit/src/org/netbeans/modules/ruby/rubyproject/TestNotifierTest.java,v <-- TestNotifierTest.java initial revision: 1.1 done IDE: [8/30/07 8:47 AM] Committing finished
This output didn't give a notice: Product Version: NetBeans Ruby IDE 070901 Java: 1.6.0_01; Java HotSpot(TM) Client VM 1.6.0_01-b06 System: Windows Vista version 6.0 running on x86; Cp1252; en_US (nbrubyide) Userdir: C:\Users\James\AppData\Roaming\.nbrubyide\dev build 3584 (in C:/InstantRails/rails_apps/rfs) C:/InstantRails/ruby/bin/ruby -Ilib;test "C:/InstantRails/ruby/lib/ruby/gems/1.8/gems/rake-0.7.3/lib/rake/rake_test_loader.rb" "test/unit/accountant_test.rb" "test/unit/activity_alert_test.rb" "test/unit/activity_mailer_test.rb" "test/unit/asterisk_call_file_test.rb" "test/unit/call_session_test.rb" "test/unit/cepstral_test.rb" "test/unit/customer_phone_menu_test.rb" "test/unit/customer_test.rb" "test/unit/http_phone/asterisk_cmd_test.rb" "test/unit/http_phone/asterisk_response_test.rb" "test/unit/http_phone/asterisk_test.rb" "test/unit/http_phone_test.rb" "test/unit/named_arguments/class_settings_mixin_test.rb" "test/unit/named_arguments/hash_extended_tools_test.rb" "test/unit/named_arguments/method_extensions_test.rb" "test/unit/named_arguments_test.rb" "test/unit/phone_number_test.rb" "test/unit/piggy_bank_test.rb" "test/unit/piggy_bank_transaction_test.rb" "test/unit/rest_phone/array_of_ranges_test.rb" "test/unit/rest_phone/call_info/inbound_test.rb" "test/unit/rest_phone/call_info/outbound_test.rb" "test/unit/rest_phone/call_info_test.rb" "test/unit/rest_phone/dummy_asterisk_server_test.rb" "test/unit/rest_phone/dummy_line_server_test.rb" "test/unit/rest_phone/phone_action/phone_action_subtypes_test.rb" "test/unit/rest_phone/phone_action_test.rb" "test/unit/rest_phone/phone_audio_script_test.rb" "test/unit/rest_phone/phone_call_test.rb" "test/unit/rest_phone/phone_event_test.rb" "test/unit/rest_phone/phone_logger_test.rb" "test/unit/rest_phone/phone_menu_builder_test.rb" "test/unit/rest_phone/phone_menu_condition_test.rb" "test/unit/rest_phone/phone_menu_test.rb" "test/unit/rest_phone/phone_number/north_america_test.rb" "test/unit/rest_phone/phone_number_support_test.rb" "test/unit/rest_phone/phone_number_test.rb" "test/unit/rest_phone/phone_prompt_test.rb" "test/unit/rest_phone/phone_request_test.rb" "test/unit/rest_phone/remote_session_manager_test.rb" "test/unit/rest_phone/schedule_test.rb" "test/unit/rest_phone_utilities/array_of_ranges_test.rb" "test/unit/rest_phone_utilities/deep_xml_test.rb" "test/unit/rest_phone_utilities/factory_create_method_test.rb" "test/unit/rest_phone_utilities/utilities_test.rb" "test/unit/sound_collection_test.rb" "test/unit/sound_item/file_system_test.rb" "test/unit/sound_item/s3_test.rb" "test/unit/sound_item_test.rb" "test/unit/user_call_log_test.rb" "test/unit/user_call_request_test.rb" Loaded suite C:/InstantRails/ruby/lib/ruby/gems/1.8/gems/rake-0.7.3/lib/rake/rake_test_loader Started ...........................................................................................................................................................................................................................................................F................ Finished in 11.295 seconds. 1) Failure: test_navigate_last(SoundCollectionTest) [./test/unit/sound_collection_test.rb:21]: <#<SoundItem::FileSystem id: 5, sound_collection_id: 10, file_extension: "wav", type: "FileSystem", position: 1, lock_version: 0, created_at: "2007-09-01 11:02:28">> expected but was <#<SoundItem::FileSystem id: 6, sound_collection_id: 10, file_extension: "wav", type: "FileSystem", position: 2, lock_version: 0, created_at: "2007-09-01 11:02:29">>. 268 tests, 451 assertions, 1 failures, 0 errors chmod 100644 chmod 100644 C:/InstantRails/ruby/bin/ruby -Ilib;test "C:/InstantRails/ruby/lib/ruby/gems/1.8/gems/rake-0.7.3/lib/rake/rake_test_loader.rb" "test/functional/account_controller_test.rb" "test/functional/activity_alert_controller_test.rb" "test/functional/content_controller_test.rb" "test/functional/customers_controller_test.rb" "test/functional/customer_phone_menus_controller_test.rb" "test/functional/help_controller_test.rb" "test/functional/money_transactions_controller_test.rb" "test/functional/paypal_controller_test.rb" "test/functional/phone_call_session_controller_test.rb" "test/functional/phone_number_assignments_controller_test.rb" "test/functional/user_call_logs_controller_test.rb" "test/functional/user_call_requests_controller_test.rb" Loaded suite C:/InstantRails/ruby/lib/ruby/gems/1.8/gems/rake-0.7.3/lib/rake/rake_test_loader Started .................................................... Finished in 4.591 seconds. 52 tests, 103 assertions, 0 failures, 0 errors C:/InstantRails/ruby/bin/ruby -Ilib;test "C:/InstantRails/ruby/lib/ruby/gems/1.8/gems/rake-0.7.3/lib/rake/rake_test_loader.rb" "test/integration/daemons_test.rb" "test/integration/external_tools_test.rb" "test/integration/site_interaction_stories_test.rb" Loaded suite C:/InstantRails/ruby/lib/ruby/gems/1.8/gems/rake-0.7.3/lib/rake/rake_test_loader Started .................. Finished in 0.404 seconds. 18 tests, 7 assertions, 0 failures, 0 errors
The code currently only posts in the editor footer if there are failures (this is because when I first wrote it, this was used only from the autotest integration which is running continuously, and you wouldn't want to be interrupted all the time to see "no new failures"). However, for an -explicit- test run, perhaps it should be showing the summary no matter what? (The test summary was 18 tests, 7 assertions, 0 failures, 0 errors ) In your log I see an earlier summary with failures: 268 tests, 451 assertions, 1 failures, 0 errors Did this give you a notification? Is this from a previous run? Or does your test runner produce -multiple- "summaries" ?
A full rails test run always produces multiple summaries, afaik. When you run tests (rake test in RAILS_ROOT), the default is to run unit, functional, and integration tests in sequence, and you'll see summary lines for each of those. There's no rollup of the results; sounds like you're only reporting if integration tests have failures. What I submitted above was a single test run with a failing unit test. I'd agree that on an explicit test run, it should do something like show a a green bar with the results.
Fixed. It now keeps state and adds up all the error counts (rather than just relaying the message it saw) and produces a summary. This is shown even on success in the editor, using a plain font (I don't have the option of a green background; the editor can display status messages and "error" messages (which the editor chooses to display in red). (AutoTest configures the notifier differently such that it does not accumulate scores, and does not display messages on success, since this would yield strange when continuously running the same test over and over, with ever-increasing test counts.) IDE:------------------------------------------------- IDE: [9/1/07 4:31 PM] Committing started Checking in projects/src/org/netbeans/modules/ruby/rubyproject/RSpecSupport.java; /cvs/ruby/projects/src/org/netbeans/modules/ruby/rubyproject/RSpecSupport.java,v <-- RSpecSupport.java new revision: 1.5; previous revision: 1.4 done Checking in projects/src/org/netbeans/modules/ruby/rubyproject/TestNotifier.java; /cvs/ruby/projects/src/org/netbeans/modules/ruby/rubyproject/TestNotifier.java,v <-- TestNotifier.java new revision: 1.3; previous revision: 1.2 done Checking in projects/src/org/netbeans/modules/ruby/rubyproject/RakeSupport.java; /cvs/ruby/projects/src/org/netbeans/modules/ruby/rubyproject/RakeSupport.java,v <-- RakeSupport.java new revision: 1.8; previous revision: 1.7 done Checking in projects/src/org/netbeans/modules/ruby/rubyproject/AutoTestSupport.java; /cvs/ruby/projects/src/org/netbeans/modules/ruby/rubyproject/AutoTestSupport.java,v <-- AutoTestSupport.java new revision: 1.6; previous revision: 1.5 done Checking in projects/src/org/netbeans/modules/ruby/rubyproject/RubyActionProvider.java; /cvs/ruby/projects/src/org/netbeans/modules/ruby/rubyproject/RubyActionProvider.java,v <-- RubyActionProvider.java new revision: 1.10; previous revision: 1.9 done Checking in projects/src/org/netbeans/modules/ruby/rubyproject/Bundle.properties; /cvs/ruby/projects/src/org/netbeans/modules/ruby/rubyproject/Bundle.properties,v <-- Bundle.properties new revision: 1.10; previous revision: 1.9 done Checking in projects/src/org/netbeans/modules/ruby/rubyproject/execution/OutputRecognizer.java; /cvs/ruby/projects/src/org/netbeans/modules/ruby/rubyproject/execution/OutputRecognizer.java,v <-- OutputRecognizer.java new revision: 1.3; previous revision: 1.2 done Checking in projects/test/unit/src/org/netbeans/modules/ruby/rubyproject/TestNotifierTest.java; /cvs/ruby/projects/test/unit/src/org/netbeans/modules/ruby/rubyproject/TestNotifierTest.java,v <-- TestNotifierTest.java new revision: 1.2; previous revision: 1.1 done Checking in railsprojects/src/org/netbeans/modules/ruby/railsprojects/RailsActionProvider.java; /cvs/ruby/railsprojects/src/org/netbeans/modules/ruby/railsprojects/RailsActionProvider.java,v <-- RailsActionProvider.java new revision: 1.13; previous revision: 1.12 done IDE: [9/1/07 4:31 PM] Committing finished
FYI, on Windows at least the new test summaries show up with a green background (assuming everything passed)
Yep, I found a way to do it and integrated that yesterday :) It should work on all platforms.