NetBeans Forums

 FAQFAQ   SearchSearch   MemberlistMemberlist   RegisterRegister   ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 
  

Autotest returns no results

 
Post new topic   Reply to topic    NetBeans Forums -> Ruby Users
View previous topic :: View next topic  
Author Message
sshaikh



Joined: 08 Sep 2009
Posts: 6

PostPosted: Tue Mar 16, 2010 12:35 pm    Post subject: Autotest returns no results Reply with quote

I have a test set up as in the attached screenshot. Item.sample is a simple method that returns false.

The tests run fine if I run them one at a time by right clicking -> test.

However Autotest doesn't seem to return any feedback, and seems to hang after the "Test-unit version: 2.0.7 loaded" line. Its progress bar is still scrolling however, and if I edit any file it seems to restart, but hang again.

Is there something I'm missing here? Where are autotest results usually outputted? I don't seem to have a status line at the bottom of my editor, but even ignoring that the Test Results window is stuck on "Running tests, please wait...".

I have zentest 4.2.1 and test-unit 2.0.7 installed via gems. I don't have any rspec gems or plugins.



autotest.png
 Description:
 Filesize:  127.89 KB
 Viewed:  12814 Time(s)

autotest.png


Back to top
Erno Mononen
Posted via mailing list.





PostPosted: Tue Mar 16, 2010 1:12 pm    Post subject: Autotest returns no results Reply with quote

Hi,

Can you please turn on detailed logging in Tools -> Options -> Ruby,
reproduce the issue and attach the log file here then (see
http://wiki.netbeans.org/FaqRubyNBLogging67)? Maybe the log could give
some hint on where exactly the execution is stuck. Also, does Autotest
work fine for the project if you run it from the command line?

Thanks,
Erno

sshaikh wrote:
Quote:
I have a test set up as in the attached screenshot.

The tests run fine if I run them one at a time by right clicking -> test.

However Autotest doesn't seem to return any feedback, and seems to hang after the "Test-unit version: 2.0.7 loaded" line. Its progress bar is still scrolling however, and if I edit any file it seems to restart, but hang again.

Is there something I'm missing here? Where are autotest results usually outputted? I don't seem to have a status line at the bottom of my editor, but even ignoring that the Test Results window is stuck on "Running tests, please wait...".

I have zentest 4.2.1 and test-unit 2.0.7 installed via gems. I don't have any rspec gems or plugins.




Attachments:
http://forums.netbeans.org//files/autotest_884.png


Back to top
sshaikh



Joined: 08 Sep 2009
Posts: 6

PostPosted: Tue Mar 16, 2010 3:49 pm    Post subject: Reply with quote

I've attached the log, although it's worth saying that nothing got generated while autotest was running.

Actually, running autotest from the cmd line gives the following:

Code:

K:\Projects\Scratch\RemoteRailsApp>autotest --rails
Warning:C:/Ruby19/lib/ruby/site_ruby/1.9.1/rubygems/config_file.rb:50: Win32API
is deprecated after Ruby 1.9.1; use dl directly instead
C:\Ruby19\bin\ruby -I.;lib;test -rubygems -e "%w[test/unit test/test_helper.rb].
each { |f| require f }" | unit_diff -u
Warning:C:/Ruby19/lib/ruby/site_ruby/1.9.1/rubygems/config_file.rb:50: Win32API
is deprecated after Ruby 1.9.1; use dl directly instead
C:/Ruby19/lib/ruby/gems/1.9.1/gems/ZenTest-4.2.1/lib/unit_diff.rb:100: warning:
shadowing outer local variable - line
C:/Ruby19/lib/ruby/gems/1.9.1/gems/ZenTest-4.2.1/lib/unit_diff.rb:104: warning:
shadowing outer local variable - line
Loaded suite -e
Started


Finished in 0.0 seconds.

0 tests, 0 assertions, 0 failures, 0 errors, 0 pendings, 0 omissions, 0 notifications
0% passed


So for some reason the tests are not being picked up. rake test runs as expected.
Back to top
sshaikh



Joined: 08 Sep 2009
Posts: 6

PostPosted: Tue Mar 16, 2010 3:50 pm    Post subject: Reply with quote

Here's the log.


messages.txt
 Description:

Download
 Filename:  messages.txt
 Filesize:  38.08 KB
 Downloaded:  562 Time(s)

Back to top
sshaikh



Joined: 08 Sep 2009
Posts: 6

PostPosted: Tue Mar 16, 2010 4:23 pm    Post subject: Reply with quote

It seems that I needed the autotest-rails gem installed too. Both netbeans and the command line now run autotest as expected!

I'm still not getting the flash of green at the bottom of the editor pane though. Any idea why not?
Back to top
swinter500



Joined: 03 Mar 2015
Posts: 2

PostPosted: Tue Mar 03, 2015 7:08 pm    Post subject: Tests return no results - getting color to work Reply with quote

I use Google Test. To get color results in the output pane I had to set some flags for google test to control the color attributes of the text it was sending to the output pane. Perhaps you need to do something similar.
I put the code to set the flags in the test main ( see below). I also found that I had to put the settings for outputting XML there also. Setting environmental variables for these items elsewhere did not seem to ever be seen by the shell running the tests.
Note also I am also getting the "Running tests, please wait.." message in the test results pane, even though the output pane shows the tests complete, PASSED all tests (all green). Maybe it is trying to get the xml file from the server. I am using remote build. The xml gets generated on the remote build host, but never seen on my PC where I am running netbeans.

int main(int argc, char **argv) {
// PUT THE OPTION FLAGS BEFORE InitGoogleTest()!!!
// generate the XML report in the gtestOutputE.xml file in the current directory - this works
// ::testing::GTEST_FLAG(output) = "xml:gtestOutputE.xml";

::testing::GTEST_FLAG(output) = "xml:/home/f55ka0g/netb/DBSimpleConnect/outResults1.xml";
::testing::GTEST_FLAG(color) = "yes";

::testing::InitGoogleTest(&argc, argv);

return RUN_ALL_TESTS();
}
[/img]
Back to top
Display posts from previous:   
Post new topic   Reply to topic    NetBeans Forums -> Ruby Users All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You can download files in this forum


Powered by phpBB
By use of this website, you agree to the NetBeans Policies and Terms of Use. © 2012, Oracle Corporation and/or its affiliates. Sponsored by Oracle logo