Community mailing list archives

community@mail.odoo.com

Re: Running tests on Odoo 8

by
Camptocamp France SAS, Alexandre Fayolle - Camptocamp
- 09/17/2014 06:03:37
On 16/09/2014 21:43, Torvald Baade Bringsvor wrote:
> Hi
>
> I'm a bit curious: Am I the only one who has not been able to run YAML
> tests on Odoo 8? There are some options to the odoo.py command for
> running tests, but they seem to do nothing and when I asked in the
> forum all I got was a "me too".
>
> 
> I'm a bit concerned about this, it would seem good prioritization of
> Odoo SA time to make tests work and DOCUMENT THEM so that people in
> the community can write tests and run them, maybe even fix bugs faster
> too.
> 
>
> So, anybody been successfull in running YAML tests on 8? Or unit tests
> for that matter?
>
> -Torvald
>
>
> -- 
> Torvald Baade Bringsvor
> Bringsvor Consulting AS - Odoo (formerly OpenERP) implementation partner
>
> _______________________________________________
> Mailing-List: https://www.odoo.com/groups/community-59
> Post to: mailto:community@mail.odoo.com
> Unsubscribe: https://www.odoo.com/groups?unsubscribe
>

The --test-enable command line flag still works in v8. What has changed
is that the yaml tests now produce output at log level debug, and not
test (which seems to have disappeared), so if you were used to pass
--test-enable --log-level=test you won't "see" anything. But you can
easily make a yaml test fail by changing an assertion and convince
yourself that they are run. Using --log-level=debug will show some
output, lost in a lot of log lines (and btw --log-level is deprecated, I
think since 7.0, in favor of the tricky --log-handler argument).

It could be that the --test-report-directory was broken in v8 (maybe it
not used by the qweb reports?), I admit never having used that option
(although I see why I should...)

-- 
Alexandre Fayolle
Chef de Projet
Tel : + 33 (0)4 79 26 57 94

Camptocamp France SAS
Savoie Technolac, BP 352
73377 Le Bourget du Lac Cedex
http://www.camptocamp.com