openerp-community team mailing list archive
-
openerp-community team
-
Mailing list archive
-
Message #00610
Re: most effective b-q-i test running
-
To:
openerp-community@xxxxxxxxxxxxxxxxxxx
-
From:
"P. Christeas" <xrg@xxxxxxxxx>
-
Date:
Sat, 22 Oct 2011 17:09:48 +0300
-
In-reply-to:
<CAGUoFRZZ45rF5HqBmF2UHcJmLN5UD0Fpi-JFq+H=6KgiPhap6A@mail.gmail.com>
-
User-agent:
KMail/1.13.7 (Linux/3.0.4; KDE/4.6.5; x86_64; ; )
On Thursday 20 October 2011, Viktor Nagy wrote:
> hi,
>
> I would like to run base_quality_interrogation locally and often
>
> from the buildbot addon I've found out more or less the code to be called,
> but even a single run takes ages. Is there a recommended way to run test
> files quickly and reliably with openerp?
>
> my shell script (to replace $1) is the following:
> base_quality_interrogation.py --root-path=server/bin/ --homedir=. -c
> ~/.openerp-bqirc --config server.cfg -d testdb -m $1 --console-nodebug --
> -drop-db -- create-db -- install-module -- +drop-db
>
> is there a way to improve this?
There is way too many different ways to run the "b-q-i".
The one you mention is a full run for a single ("-m ..." ) addon, I suppose
the one you are writting. If your module needs a few other dependencies[1], a
single bqi run could take several minutes for " -drop-db -- create-db --
install-module" . That's normal, it's the server's performance.
A typical test with all 169 modules here takes 12-15 mins[3]. At the Atom(tm)
processor of my buildbot, they take 32mins sometimes.
Said that, you may want to shortcut and not drop the database, not re-install
all modules each time. A typical scenario is when you develop a module, you
want to test a few functions again and again, until the bug is squashed.
Then, depending on the possible location of the bug, you can use b-q-i to just
run the openerp-server repeatedly and test a single part only. As you may have
noticed, b-q-i integrates with the "base_module_import" module (server-side)
to launch yaml tests on demand. Or reload any xml files on a live server, or do
scary things[2].
A major feature is the interactive console. Instead of just running the
openerp-server start-to-end, it lets you tweak things in the middle. And then,
stop the server, fix a few python lines, restart the server (up arrow in the
console you had b-q-i) and repeat the failed command (up arrow in the b-q-i
console). Such a cycle could take ~15sec of your development time.
[1] imagine, the l10n_hu could depend on account, analytic, decimal_precision
and also include a huge account template
[2] yeap, that's a good reason why "base_module_import" shouldn't escape our
development labs.
[3] add +5mins for the official branches
--
Say NO to spam and viruses. Stop using Microsoft Windows!
References