Community: Framework mailing list archives

expert-framework@mail.odoo.com

Re: Speed of the tests in v8

by
n.schmitt
- 01/21/2016 12:37:57
Leonardo, I have been looking at anybox.recipe.odoo.
Still tinkering with it to make it work though.

I have just realized that the repo anybox.buildbot.odoo exists also.
Do you happen to know the difference between the two?

I found your presentation "Odoo testing on steroids", I hope it may help
me to make nosetest work.

Isn't there a way to make this testing work with my current Odoo
installation (without using buildout actually?).
It seems like a much easier solution.
-- 
Nicolas Schmitt
Coordinador del Departamento de Tecnología e Información
PROTELCOTELSA SA
On 21/01/16, Leonardo Pistone wrote:
> Hi!
> a few things already exist:
> - the anybox recipe can generate wrappers to run scripts that will be
> able to import openerp with all the modules loaded correctly. In the
> doc of the recipe you should find an example for nose. That way you
> have all the options of nose (including running only one test, or the
> one that failed). Moreover, there is no module update. Test output is
> printed directly and it is not messed up by the odoo logging system,
> which is also great. This works with existing unittests.
> If you don't use the anybox recipe, in v8/v9 you should be able to run
> something similar to the "odoo shell" (i.e. load the modules and
> create en environment and a registry) and then run your tests with
> nose or something like that.
> - Xavier Morel worked on this unmerged PR:
> https://github.com/odoo/odoo/pull/7759
> On Thu, Jan 21, 2016 at 5:22 PM, Nicolas Schmitt
> <n.schmitt@protelcotelsa.com> wrote:
> > Hi all,
> >
> > Abstract
> > ========
> > I am using Odoo v8, and I am looking for a way to speed up the python
> > unit testing.
> > When I work on a test case on a module with many dependent modules,
> > testing takes too much time (around 17 seconds).
> >
> > What I would like
> > ============================
> > The possibility to test only one file, even though it may require
> > updating the module.
> >
> > What I would really like
> > =========================
> > The possibility to use --test-file= without having to
> > update anything.
> >
> > What I have discovered so far
> > ==============================
> > 1) My tests are working all right using:
> > ./openerp-server -c -d --test-enable
> >   -u
> > 2) I have many errors using:
> > ./openerp-server -c -d --test-file=
> > 3) I have the same errors using:
> > ./openerp-server -c -d --test-file=
> >   -u
> >
> > References
> > ==========
> > The only thing I could find so far is this post by Alexandre Fayolle
> > from 2013, without any answer:
> > https://www.odoo.com/fr_FR/forum/help-1/question/why-does-the-test-file-argument-run-tests-in-no-update-mode-18669
> > It is really similar to my problem, only that it seems to apply only to
> > yaml files, and that the Odoo version seems not to be the 8th.
> >
> > The ultimate goal
> > =================
> > With the possibility to run only one test file, I would like to
> > implement a way to trigger automatically the testing on model/views/test
> > files
> > modifications (maybe using watchdog?).
> >
> > Conclusion
> > ==========
> > If you know the answer to this particular problem, or if you have any
> > kind of tips about facilitating testing, I would be grateful for your
> > input.
> > Also if you know things specific to Odoo 9, still good to know.
> > I will then sum up all solutions/tips in an Odoo Forums post, so that it
> > may serve to others.
> _______________________________________________
> Mailing-List: https://www.odoo.com/groups/community-framework-62 [1]
> Post to: mailto:expert-framework@mail.odoo.com
> Unsubscribe: https://www.odoo.com/groups?unsubscribe [2]
> 
> 
> 
> [1] https://www.odoo.com/groups/community-framework-62
> [2] https://www.odoo.com/groups?unsubscribe