openerp-expert-framework team mailing list archive
-
openerp-expert-framework team
-
Mailing list archive
-
Message #00226
Re: why Tiny cannot make an OERPScenario clone, so please just use it!
On 23/02/10 12:35, Fabien Pinckaers wrote:
> Of course we do it. Olivier is testing OERPScenario and will provide a
> feedback soon.
>
> The best way to evaluate is to compare a test case. Let me know if I am
> wrong, but as far as I understood, if I want to create this test:
>
> - create a partner "Demour SA" with two contacts "Luc" and "Marc"
> - check that the credit of the partner==0
> - change the name of the partner to "Demour sa"
> - test that the new name is "Demour sa"
>
> With OEScenario, you have to create these files:
> - http://piratepad.net/lPd4U1XdpS
> (todo by Olivier)
>
> With Yaml OpenERP, I create this file in a module:
> - http://piratepad.net/mATgKAXiac
As explained, I have made an attempt at writing the above scenario using
oerpscenario (see http://piratepad.net/lPd4U1XdpS)
Take this as a first try by a java/python dev that must learn some ruby
on-the-fly to write the scenario. You can certainly provide advice to
improve the scenario and ruby stuff.
I probably haven't quite understood the philosophy of oerpscenario and
the way it is supposed to be used, so please correct me if I'm wrong in
the following early feedback:
1. It was definitely non-trivial to write the steps definition and get
the syntax right to make the test work, even with the basic
documentation provided with ooor and oerpscenario. The barrier is not
that small for an openobject python developer, I'm afraid.
2. Debugging errors is a challenge. Even if that's already the case with
OpenErp, at least I am already familiar with them.
E.g. here I have no idea why an ActiveResource suddenly calls a random
"allowed!" method, and how I could solve that.
(See bottom for some of the errors I encountered)
It feels a bit sluggish on my machine, but that's probably irrelevant.
3. I am not sure how this could scale for a large scenario base if we
have to rely on a small number of oerpscenario developers writing the
steps definition for everyone else.
(Compare this with recording the actual scenario in OpenERP directly
with an improved base_module_record that would output yaml?)
4. Finally, I really like cucumber's output for the test results.
Note to team: arrange something similar for regular OpenERP tests!
BTW, do any of you know other oerpscenario users/contributors that could
provide first impression feedback as well?
-------------------
For the record and for the oerpscenario experts, here's a shortlist of
the main errors I encountered. I can write bug reports about these on LP
if these are actual bugs (you can reply off-list):
- Creating a res.partner.address object using ResPartnerAddress.create()
or save() does not seem to work, because it calls the strange 'allowed!'
methods on the res.partner.address object via XMLRPC. I could not find a
workaround for this.
- Modifying a ResPartner instance and then saving it does not seem to
work either (see my example on piratepad). This seems to trigger a write
on all fields of the object, including the relationship fields, which
does not work (a.o.: passes an array of arrays instead of tuples).
PS: Raphael, I'm not in the openerp-expert-framework, thanks for adding
me ;-)
And while at it, could you include ~openerp in all the expert teams so
that core team members can directly subscribe to the relevant
mailing-lists and follow the discussion there? (IIRC I already requested
this :p)
--
Olivier Dony
Follow ups
References