Search code examples
pythonodooodoo-8python-unittest

How to run Odoo tests unittest2?


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?

Is it possible to run tests from IDE like Pycharm ?


Solution

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

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

    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.