Community: Framework mailing list archives

expert-framework@mail.odoo.com

Re: Test suite runner

by
manuel
- 05/14/2015 09:14:54
Hi Ben,

If your module is inside an OpenERP addon, you can simply import the
"normal" tests in the __init__.py of the "tests" package inside the addon.

Notice:

- Odoo requires tests to be a package.

- It only run tests in modules imported with tests package itself.


Many of my tests are plain unittest2.TestCase.

Best regards,
Manuel.


Le 13/05/2015 21:21, Ben Finney a écrit :
> On 14/05/15 02:23, Moises Lopez wrote:
> 
>> The community use travis.
>> We are using next ci tools:
>> runbot.vauxoo.com , travis and shippable, last
>> one with custom docker.
> 
> What test suite runner can I use as a developer of OpenERP modules?
> 
> That is:
> 
> * I write some custom Python code in a module, ‘modules/foo.py’.
> 
> * I write some Python ‘unittest’ test cases for the above code, in a 
> separate Python unit test module, ‘tests/test_foo.py’.
> 
> * What test runner will, in a single step, run all the unit tests 
> ‘tests/test_*.py’ in the context of a test instance of OpenERP?
> 
> * To integrate properly with a continuous Integration tool, the test 
> runner needs to exit with success when the test suite passes, and exit 
> with failure (and a full log of what failed) when the test suite does 
> not succeed.
> 
> -- 
> Ben Finney
> Willow IT · willowit.com.au · ph: +61 3 8506 0393
> 
> _______________________________________________
> Mailing-List: https://www.odoo.com/groups/community-framework-62
> Post to: mailto:expert-framework@mail.odoo.com
> Unsubscribe: https://www.odoo.com/groups?unsubscribe
>