openerp-expert-framework team mailing list archive
-
openerp-expert-framework team
-
Mailing list archive
-
Message #01215
Re: Questions about tests in v8 (trunk)
I recent commits, the whole "openerpcommand" disappeared also. My first
concerns is also about tests.
I believe that tests command should be as slick and easy to run than it
could be and I'm not really keen of a runbot only solution (but this is
better than anything). The run_tests command was a way to try to gather
some tests in a single simple command that anyone could run in various
scenarios.
I'm wondering what is the general view of the openerp on tests policy.
Here some points that seems to suggest that "runbot" perspective is the
only one in town:
- the command to run unittest is the command to run the server.
- the server is run, HTTP server is setup (port is open), database
installed even to run unit test and bailout afterwards.
- late inclusion of the --stop-after-init: the server would simply not
stop even if you wanted to only run test.
- no easy way to run only the unittest without YAML test (and so,
without installing a database with demo data).
...
This way of thinking tests prevents any pre-commit tests scenario, or
short cycle test feedbacks for dev scenarios. It forces usage of a
relatively huge setup (the integration setup) to handle even minor
tests, and forces the test in post-push policy.
As a matter of fact, having an easy single point of entry to launch test
won't impede integration and can only encourage every developper to run
the tests more often. It can't be a bad thing.
I know that some types of tests requires heavy installation (a working
postgres instances with a database for instance), and these should be
separable from the quick tests that do not need anything but the openerp
code.
Ideally, I'd like to find in odoo a simple entrypoint that just run the
tests with a few arguments to select tests and types of tests. This
command should also be able to launch all available tests (Javascript
ones). And finally, the runbot would use this command.
On 30/04/14 11:58, Georges Racinet wrote:
Hi there, I'm starting to take a look at the future v8, and have a few
questions about testing practices.
First, openerpcommand's run_test option has been removed (actually in
saas-3) with this comment :
"remove run_tests command, use -d -u modname --test-enable or --test-file"
Was it considered a useless duplication, or is there a deeper reason to
that ?
For the record, at Anybox, we're using mostly nosetests to run openerp
modules tests, because of its superior flexibility (test selection,
replay, coverage, profiling), but our integration is a bit crude for the
time being.
I also noticed the addition of grunt tests. Is there a reference doc or
statement about these ?
Lastly, 'oe initialize' now has a mandatory port argument. My guess is
that it's for PhantomJS tests. If true, wouldn't it be better to skip
the phantomjs tests if no port is supplied ? Some people may want to run
them separately. Some other people may want to be able to init a db
without reserving a port.
Thanks all for the hard work !
Regards,
_______________________________________________
Mailing list: https://launchpad.net/~openerp-expert-framework
Post to : openerp-expert-framework@xxxxxxxxxxxxxxxxxxx
Unsubscribe : https://launchpad.net/~openerp-expert-framework
More help : https://help.launchpad.net/ListHelp
--
Valentin LAB
Ingénieur Développement
tel: +33 6 71 39 62 13
mail: valentin.lab@xxxxxxxxxxx
Follow ups
References