Did the latest Eclipse/STS break Infinitest?

133 views
Skip to first unread message

David Harkness

unread,
Oct 8, 2012, 4:23:44 PM10/8/12
to infinit...@googlegroups.com
Hello,

This morning I updated STS (Spring Tool Suite, based on Eclipse) from 3.1.0.M1 from 3.1.0.RELEASE (build 201210061306) and now the Infinitest status bar always shows red. When I change a class or test Infinitest reports that the appropriate test case was run, but it shows red even when the test cases passes using JUnit directly from Eclipse. One thing I noticed is that Eclipse opens an empty console for Infinitest whereas it never did this before. I assume there is an error during testing and not a test failure, but nothing gets printed to the console.

Does anyone have a suggestion on how to diagnose this problem? I've used Eclipse a lot over the years, but I've never dug into the internals or had any trouble using the various plugins so I just don't know where to begin. To make sure it wasn't just my local modifications that are the problem I uninstalled my version and reinstalled 5.1.103 and the problem persists. Any ideas?

Thanks,
David

David Harkness

unread,
Oct 8, 2012, 4:39:30 PM10/8/12
to infinit...@googlegroups.com
Solved :)

It appears that a different test is broken. Fixing that test corrects the status bar color. However, it is strange that a) Infinitest runs an unrelated test and b) it doesn't show that it's running that unrelated test. Watching closely, it looks like it does multiple runs rather than running the tests together. I assume this is merely a matter of how it internally locates related tests.

What I mean is that I have two classes A and B which don't have any references to each other, nor do they reference any common classes in my project. Class A has a failing test. Changing BTest shows "1 test cases ran" in the status bar, and the hover shows BTest as you'd expect; however, the bar is red even though BTest passes. I see no way to tell that ATest is also being run. Of course, fixing A so its test passes shows "1 test cases ran" in the green status bar while the hover shows ATest as you'd expect.

It would be most helpful if Infinitest would capture and display all tests that are run during a single sweep. Is there a technical reason this cannot be done? If not, I may look into adding this ability to avoid this confusion in the future.

Peace,
David

Ben Rady

unread,
Oct 8, 2012, 4:52:04 PM10/8/12
to infinit...@googlegroups.com
I think this used to be shown in a tooltip on the status bar. Not sure if it's still like that.

Ben

Oliver Götz

unread,
Oct 8, 2012, 5:15:55 PM10/8/12
to infinit...@googlegroups.com, infinit...@googlegroups.com
David,
I think it's the intended behavior to show a red bar as long as there is at least one failing test in your workspace, no matter which project it's in. If you have a failing test in project A, but are working on something in project B the bar will not turn green just because tests in project B are successfully executed. 

All the failing tests should be displayed as error markers in Eclipse: at the place where the test failure occurs, and also in the problems view. If you don't see it there I suspect that the view settings are such that only errors in the current project are shown. Maybe you could check that... the actual test failure message is displayed as tooltip for the error (which is not ideal for the multi-line hamcrest matcher messages imho, because the tooltip seems to be limited to one line).

In my experience, if you don't want to see test failures for a different project in the workspace you need to close that project for the time being or create a filter file to ignore these tests (which is both somewhat cumbersome). The best option is of course to fix all the tests... ;-)

Cheers,
Oliver

David Harkness

unread,
Oct 8, 2012, 5:26:20 PM10/8/12
to infinit...@googlegroups.com
Hi Ben and Oliver,

On Monday, October 8, 2012 1:52:05 PM UTC-7, Ben Rady wrote:
I think this used to be shown in a tooltip on the status bar. Not sure if it's still like that.

Yes, the tooltip shows that BTest is run. However, the failing test is in ATest which I didn't realize and so kept trying to spot a failure in BTest which didn't exist.

But . . .

On Monday, October 8, 2012 2:15:58 PM UTC-7, TheGrate wrote:
I think it's the intended behavior to show a red bar as long as there is at least one failing test in your workspace, no matter which project it's in.

Ah, I thought it based the color only on the results of running the related tests (BTest in this case). ATest is in the same project, but it's good to know it can be in any project too. While I would like the ability to pick one way or the other, being aware of how it works will at least keep me from pulling out my hair trying to figure out why a test that seems to be passing is causing a red bar--it's not, it's some other test.

I was able to find the other test by looking for the problem markers. I had gotten so used to having Infinitest tell me immediately when I broke a test that I forgot I had left a broken test over the weekend. :)

Thanks for the quick feedback guys.

David

David Gageot

unread,
Oct 9, 2012, 12:14:28 AM10/9/12
to infinit...@googlegroups.com
Thank you guys to asking for help and solving both while I'm sleeping. Appreciate :-)

David

Reply all
Reply to author
Forward
0 new messages