[qmtest] Proposal: modules reload

Vladimir Prus ghost at cs.msu.su
Tue Apr 22 11:46:08 UTC 2003


Mark Mitchell wrote:
> On Mon, 2003-04-21 at 03:05, Vladimir Prus wrote:
> > Hello,
> > from time to run I run into a snag with QMTest. I start a gui, run a test
> > and it fails. The test uses custom test class, and I decide there's
> > problem with the test class itself. So I edit the module, but running gui
> > does not notice that the module source has changed. I have to
> > shutdown/restart QMTest, which is not convenient.
> >
> > I propose that QMTest gui has a new command "reload modules", which
> > will use builtin "reload" function on all known extension modules or
> > allow to select modules to reload.
> >
> > If this idea is good from UI/functionality point of view, I can look at
> > how it can be implemented in code. Opinions?
>
> I've thought about this in the past and never came to a definite
> conclusion.  On the one hand, reloading the modules *should* work, but
> I'm never sure it will always leave things in a consistent state.  (What
> if there is global data in those modules, or data elsewhere that has
> class types where the classes are defined in those modules?)

Is that really possible? I though that tests/resources are short-lived 
entities: i.e. they are loaded, run and leave only annotations behind.
Are test/resources instances stored anywhere?

> Another related problem is that if there is a bug in QMTest, which you
> fix, you then have to restart everything to test your fix.

True.

> And yet another related problem is that it would be nice to be able to
> switch databases (or, some day, use multiple databases at once) from the
> GUI.  All of these require some kind of re-start capability.
>
> Maybe a good place to start would be a "Restart" command on the QMTest
> file menu that would just shut down QMTest, and restart it, on the same
> port?

That would be good for use cases you mention, but I have no idea how to 
imlement this. Do you mean that a QMTestServer instance is restarted,
or entire qmtest script, or...

- Volodya




More information about the qmtest mailing list