如何运行Odoo测试unittest2? [英] How to run Odoo tests unittest2?

查看:47
本文介绍了如何运行Odoo测试unittest2?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我尝试使用--test-enable运行odoo测试,但无法正常工作.我有几个问题.

I tried running odoo tests using --test-enable, but it won't work. I have a couple of questions.

根据文档,测试只能在模块安装过程中运行,当我们添加功能然后想要运行测试时会发生什么?

According to the documentation Tests can only be run during module installation, what happens when we add functionality and then want to run tests?

是否可以从IDE(如Pycharm)运行测试?

Is it possible to run tests from IDE like Pycharm ?

推荐答案

@aftab您需要添加log-level,请参见下文.

@aftab You need add log-level please see below.

./odoo.py -d <dbname> --test-enable --log-level=test

并针对您的问题,如果要更改已安装的模块并需要重新测试所有测试用例,则需要使用上述命令使用-u <module_name>-u all(对于所有模块)简单地重新启动服务器.

and regarding you question, If you are making changes to installed modules and need to re test all test cases then you need to simple restart you server with -u <module_name> or -u all(for all modules) with the above command.

这篇关于如何运行Odoo测试unittest2?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆