Odoo is the world's easiest all-in-one management software. It includes hundreds of business apps:
CRM | e-Commerce | Accounting | Inventory | PoS | Project management | MRP | etc.
I found it! At first, add to __init__ of your module something like
Next, create package tests in your module. Example of it's __init__:
from . import test_hr
fast_suite = [test_hr, ]
test_hr - module in package with test classes (inherited from openerp.tests.common.TransactionCase)
Next: set in your OE config in [options] section:
test_enable = True
Finally, run tests with the following command:
openerp-server -c /path/to/config.conf -d dbname -u yourmodule --log-level=test
Have fun! Really to much undocumented condition for simple tests! I think OE developers never user it :).
I have a demo database, I run openerp with --test-enable --log-level=test, I have a tests folder with an __init__.py file that import my tests files. I imported openerp.tests.common import TransactionCase and created proper tests (the name of the method begins with "test_"). However openerp do not run the tests when installing or updating.
In odoo 8 and newers versions I do the same and tests are run without any problem. What am I missing here?
About This Community
This platform is for beginners and experts willing to share their Odoo knowledge. It's not a forum to discuss ideas, but a knowledge base of questions and their answers.Register
Odoo Training Center
Access to our E-learning platform and experience all Odoo Apps through learning videos, exercises and Quizz.Test it now
|Asked: 10/1/13, 5:33 AM|
|Seen: 7581 times|
|Last updated: 1/25/17, 4:57 PM|