Rake/Rails unit tests not reporting correctly

I've got a rails project and I'm trying to configure TeamCity to run the tests.  I've gotten everything going, using the rvmrc, rails 1.9.2, running on an OSX agent.

Unfortunately, during the rake build step, I don't get test results properly reporting.  Instead it just renders a generic build error, with this on top:

[Execute test:run] Execute test:units (20s)

[14:59:56][Execute test:units] RuntimeError: Command failed with status (1): [ruby -I"lib:test" -I"/Users/office/.rvm/gems/ruby-1.9.2-p290@global/gems/rake-10.0.3/lib" "/Users/office/.rvm/gems/ruby-1.9.2-p290@global/gems/rake-10.0.3/lib/rake/rake_test_loader.rb" "test/unit/**/*_test.rb" ]  Stacktrace: /Users/office/.rvm/gems/ruby-1.9.2-p290@global/gems/rake-10.0.3/lib/rake/testtask.rb:104:in `block (3 levels) in define' /Users/office/.rvm/gems/ruby-1.9.2-p290@global/gems/rake-10.0.3/lib/rake/file_utils.rb:45:in `call' /Users/office/.rvm/gems/ruby-1.9.2-p290@global/gems/rake-10.0.3/lib/rake/file_utils.rb:45:in `sh' /Users/office/.rvm/gems/ruby-1.9.2-p290@global/gems/rake-10.0.3/lib/rake/file_utils_ext.rb:40:in `sh' /Users/office/.rvm/gems/ruby-1.9.2-p290@global/gems/rake-10.0.3/lib/rake/file_utils.rb:82:in `ruby' /Users/office/.rvm/gems/ruby-1.9.2-p290@global/gems/rake-10.0.3/lib/rake/file_utils_ext.rb:40:in `ruby' /Users/office/.rvm/gems/ruby-1.9.2-p290@global/gems/rake-10.0.3/lib/rake/testtask.rb:100:in `block (2 levels) in define' /Users/office/.rvm/gems/ruby-1.9.2-p290@global/gems/rake-10.0.3/lib/rake/file_utils_ext.rb:61:in `verbose' /Users/office/.rvm/gems/ruby-1.9.2-p290@global/gems/rake-10.0.3/lib/rake/testtask.rb:98:in `block in define'


I've seen other threads suggesting this is related to the 'unit-test' gem, and I've tried pinning to a few different versionf of that gem, but can't seem to get it to work.

Any tips?

Thanks,
Carson
9 comments
Comment actions Permalink

Anything?  Halp?

This really looks to be 'unit-test' gem related.  Is there a known good version I can pin to?

Barring that, is there a good way to debug TeamCity?

0
Comment actions Permalink

Carson,

Some of your unit tests are failing. You can find details on these errors above in build log.

This exception in the end of the log is actually useless.

0
Comment actions Permalink

Ah, but I thought there was a UI for failing tests.  Or is that only for assertion errors, but not more general system errors?

Thanks for the reply,
Carson

0
Comment actions Permalink

I've created issue TW-26383.

Thanks

0
Comment actions Permalink

We do have UI for tests.
You should see test counters right in build list:
Capture.PNG
and detailed statistics for each test
Capture.PNG
Could you attach a full build log please.

0
Comment actions Permalink

Right, that was what I was expecting to see, but I was not.

I cleaned up all the errors, so there are now only assertion failures, and I still don't see that UI.

Here is what the results look like:

I can get to the logs, but I don't see any UI for the tests.  Perhaps I have it misconfigured?



Attachment(s):
teamcity_issue.png
0
Comment actions Permalink

And here is a build log...



Attachment(s):
LeadDyno_App_Tests_37.log.zip
0
Comment actions Permalink

Any thoughts based on the logs?

Maybe a misconfig on my part?

0
Comment actions Permalink

Found it, the problem is I wasn't using bundler.

Here's the thread that helped me:

  http://youtrack.jetbrains.com/issue/TW-20243

Thanks,
Carson

0

Please sign in to leave a comment.