Odoo Help


Getting started with odoo unit testing

on 6/16/15, 1:19 AM 959 views

According to the documentation, I created tests package and added some demo tests. But I cant see their execution. Simply this is what I have done.






Code in test_my_test.py

from openerp.tests import common

class TestStringMethods(common.TransactionCase):

        def setup(self):

                   print ("executing setup . . .")

                   super(TestStringMethods, self).setUp()

        def test_upper(self):

                   print ("executing test upper. . . ")

                   self.assertEqual('foo'.upper(), 'FOO')

In the __init__.py I imported test_my_test and imported tests in main __init__.py

Also added --test-enable parameter in run script.

When updating module, I can't see the execution of these test methods on console

On 11/7/15, 5:15 PM

-i module_being_tested -d being_used_to_test --test-enable

Your Answer

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

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.


Odoo Training Center

Access to our E-learning platform and experience all Odoo Apps through learning videos, exercises and Quizz.

Test it now

Question tools

2 follower(s)


Asked: 6/16/15, 1:19 AM
Seen: 959 times
Last updated: 11/7/15, 5:15 PM