[BUG][FIX] TestRunner UI interaction

Colin Putney cputney at wiresong.ca
Wed Mar 3 18:10:12 UTC 2004


On Mar 3, 2004, at 12:36 PM, Andreas Raab wrote:

> Hi Colin,
>
>> And it's an important feature. I work on several packages with
>> extensive test suites, and I really like the fact that the enhanced
>> test runner doesn't tie up the UI while the tests are running,
>> something which can take several minutes, and which I do very
>> frequently. This change would slow my development pace to a crawl.
>
> Have you tried the changes? I would guess that if you did you would 
> find the
> behavior almost indistinguishable.

I have now. ;-)

Admittedly it's better than the old TestRunner, which completely tied 
up the UI. But it still makes the UI unresponsive. While my tests are 
running, it takes 2-4 seconds to see the results of a click, for 
example.

>> It's also an overstatement to say that running the tests in the
>> background is "problematic if any of the tests involve anything 
>> Morphic
>> related." I run Morphic-related tests in the background all the time
>> with no problems.
>
> Well, okay, I should have said that the tests that are problematic 
> involve
> interactions with the currently running world. The current test runner
> screws up regularly and it's almost impossible to figure out if the 
> test
> failed or if this is one of these weird UI interaction problems. 
> That's why
> I removed that "feature" - the tests are worthless if they don't give 
> you
> convidence in your code and having an error show up is most definitely
> nothing to convince me of the quality of my code.

Agreed.

In my own code, I always make it possible for the tests to intercept 
interactions with the World (and really, interactions with the user), 
and respond to them appropriately. Clearly this won't work for tests of 
Morphic its self, but it might be a generally applicable strategy for 
"Morphic-related" stuff.

>> That's not to say that there *is* no problem, only that we should 
>> track
>> it down and fix it, rather than remove an important feature. Would it
>> be feasible to alter either the problematic tests or Morphic its self
>> to work properly in the background? Would it be useful to set up a
>> sandbox - some sort of  invisible world with it's own  UI thread - for
>> Morphic-related tests?
>
> Sure, the only question is: How much time are willing to invest?! For
> example, the Right Way (tm) to deal with this is to give TestRunner 
> its "own
> world" in which it could run these tests. Simple as that. It would 
> mean that
> any Morphic related tests would just see their own "World" (possibly 
> even
> embedded into TestRunner) so if you run these in the background you 
> wouldn't
> be affected by any suddenly popping up windows or similar. Alas, I just
> don't have time for it...

Well, how much time are we talking about? I'd be willing to invest some 
effort in keeping tests in the background, and I'd certainly like to 
see UI tests for applications and tests of Morphic its self become 
commmon.

I don't know enough about Morphic to pull it off by myself, but if you 
point me in the right direction, I'll take a stab at it. After I get my 
current project released, that is.

Colin




More information about the Squeak-dev mailing list