← Back to team overview

openerp-expert-framework team mailing list archive

Re: why Tiny cannot make an OERPScenario clone, so please just use it!

 

Joël,

I hope you don't take this as a personal attack. We like and merge C2C
proposals and we do really appreciate your work and it's clear that
OpenERP scenario is great value add to OpenERP.

I will explain the reason why we are evaluating a second option (which
do not intend to replace OpenERP scenario but provide an alternative;
people will be able to chose). I also think that both options can
complement each other.

Here are the reasons:
1. Like documentations, we think that the tests must be integrated in
the OpenERP modules and not as separate scripts. It's important that
every database installation or migration launches the whole test suite.

2. We don't want people to have to learn new languages and/or new
libraries to be able to to test cases. We also need to keep clean
dependencies against libraries used by OpenERP. (to keep things simple)

3. We think that test scenaris may be written/recorded by non
developers. (without having to do some development) I know some may
argue that this is the case with OEScenario but it is not. I tries some
tests, and nearly all scenario I wanted to do required me to develop
simple things in ruby.

4. For a Python software, we can difficultly rely on tests writen in
ruby. It's a too big entry barrier for OpenERP new comers.

I am not telling that we want to replace OEScenario. We like it, and it
already helped a lot. But we think we also need an other alternative for
the reason above. So, please, you should accept that we evaluate several
options before choosing the right one.


> I agree with you, I prefer OpenERP SA to spend more time improving the
> framework and refactoring the code rather than coding a 
> concurrent to a ready-to-use community project. 

That's exactly what we want to do and that's probably the most important
point ! And the reason why we wanted to write a yaml version.

We are reviewing lots of parts of the framework. The XML files is
clearly something that made us loss lots of time when developing new
modules.

XML files are quite heavy and the code that parses XML file have to be
rewritten from scratch (check tools/convert.py). So, yes, if we chosed
to analyse this option, that's because we think the OpenERP framework
need to support yaml, and the XML parser have to be rewritten.

So, we spend more time by improving the framework.

Let just me remind you that OpenERP already has a scenario/test system
integrated in the XML files (with assert, ...). So we are not
developping a new engine, but just improving the way you can load data
files for modules.

Adding a yaml parser is only 50 lines of code more to the XML parser.
So, we are clearly not reinventing the wheel, we are cleaning our code
and add 50 lines of python to support yaml and XML formats.

It's a great addition to OpenERP and I am sure everyone will be happy to
write data files in yaml instead of XML. (with 50 lines more, our module
recorder creates yaml files instead of XML ones, so we also have to
automated creation of test cases). And, if these demo data can sustain
the scenario system, it's very good too. Especially because we don't
have to develop new things.

OpenERP developers will not have to learn new things, because the yaml
tool we propose is exactly the same than the .XML files in modules. No
new things to learn.

So, we are not creating a completly new test system, we just improve the
existing one by support yaml. If you put that in perspective:

1. We developed a test engine in OpenERP
  (clearly not easy to use due to XML)
2. C2C decided to not use it and write a completly other one
  (for good reasons)
3. We think that, by cleaning the framework, we can do a as good one
and that it will be better integrated in easier in OpenERP.
  (for good reasons too)

Having two options is better than nothing:
  - C2C's solution is good to test from external scripts
  - OpenERP is good to test within modules and package in OpenERP
It does not seems to be a problem for myself: we will continue to
advertise both and each one will be able to use the one it prefers.
Open source is all about freedom: you can not argue against this, I think.

> Unfortunately, this is not the first time... I hope this time, they will
> admit and recognize our work. In a ideal world, I would even
> dream about OpenERP SA supporting our project as the official Testing
> system....

Joël, we recognize your work ! We like it and communicate on it. But you
should understand that we need:
1. A yaml parser for data files, instead of the current XML one
2. Something integrated in OpenERP modules, so that everyone can launch
the tests and every installation/migration. Tests should be based on
demo data. -> no need to write both.
3. OpenERP (which is in Python) can not rely on ruby and his libs
4. Tests must be writeable by non developers.


>> So, I desperately call you to give OERPScenario (Cucumber) a shot
>> because no matter the efforts you are willing to waste, you will not
>> come close, as explained in this presentation. So, I rather suggest
>> you picks up that incredible tool CampToCamp made and use it and
>> rather use your remaining time refactoring the core of OpenERP for
>> less bugs, rather than trying to make a clone that will fail to be as
>> powerful. Note that in OERPScenario, you will only use Cucumber,
>> meaning that even if you would consider valid the critics against
>> Ruby, they just wouldn't apply as you don't have to write Ruby
>> code yourself past using the Cucumber/OERPScenario.

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


Note that OpenERP Yaml is only for the trunk, for the V5.0 version of
OpenERP, I suggest to use OERPScenario (or the normal test system in XML
modules)

Thanks,


-- 
Fabien Pinckaers
CEO Tiny - OpenERP Editor
Chaussée de Namur 40
B-1367 Grand-Rosière
Belgium
Phone: +32.81.81.37.00
Fax: +32.81.73.35.01
Web: http://openerp.com

Great Achievements Start With Tiny Investments
  -- Marty, 2005



Follow ups

References