OpenERP uses a python testing framework; based on unittest2. For more information: https://doc.openerp.com/trunk/server/05_test_framework/
My question is the following: How to start/invoke these tests?
I created a structure with a 'tests/' folder and a single `openerp.tests.common.TransactionCase`.
But what to do next if you're not running with the openerp-command project?
After studying some server code: it seems that tests are launched from `load_module_graph()`. Although this doesn't have to be the ONLY point of entry! In this case, it also shows that:
- you need to update (-u) the module that needs testing
- the module should also contain demo data.
- If a module is already installed without demo data, you should set the demo boolean to True in ir.module.module.
- that you should start the server with `--test-enable`
Rephrased question: Are there other ways to launch module tests besides launching a server with demo-data?
I'm also curious on how to display results in Eclipse's PyUnit. But thats another topic I'm afraid.
This is what the documentation
To run the tests .. the simplest way is to use the oe command (provided by the openerp-command project).
In the mean time, OpenERP seems to have included some documentation in their how-to's:
Please try to give a substantial answer. If you wanted to comment on the question or answer, just use the commenting tool. Please remember that you can always revise your answers - no need to answer the same question twice. Also, please don't forget to vote - it really helps to select the best questions and answers!
About This Community
|Asked: 5/20/14, 6:15 AM|
|Seen: 5034 times|
|Last updated: 6/8/16, 3:16 AM|