Re: GSoC Project update: Code and Test separation of Ofbiz and Implementing pure webdriver

Posted by Adam Heath-2 on
URL: http://ofbiz.116.s1.nabble.com/GSoC-Project-update-Code-and-Test-separation-of-Ofbiz-and-Implementing-pure-webdriver-tp3660318p3665944.html

On 07/13/2011 02:49 PM, Erwan de FERRIERES wrote:

> Le 13/07/2011 20:59, Adam Heath a écrit :
>> On 07/11/2011 12:59 PM, Ganath Rathnayaka wrote:
>>> Hi all,
>>> I need all of you to know what I did up to now in my Google summer of
>>> code
>>> project, separating test/code of Ofbiz [1] and implementing a pure
>>> webdriver[2].
>>> I the first iteration of the summer I worked on separating test/code of
>>> Ofbiz. In this we were separate the three main modules,
>>>
>>> 1. applications
>>> 2. specialpurpose
>>> 3. framework
>>>
>>>
>>> In those modules there were submodules and some modules does not include
>>> java files which does not needed to do the separation. Here are the
>>> submodules I separated the test and code.
>>>
>>> application sub-modules
>>>
>>> accounting manufacturing party workeffort
>>> content marketing product commonext
>>> humanres order securityext
>>>
>>> specialpurpose sub-modules
>>>
>>> assetmaint crowd googlebase myportal projectmgr
>>> ebay googlecheckout oagis shark
>>> cmssite ebaystore hhfacility ofbizwebsite
>>> webpos ecommerce ldap pos workflow
>>>
>>> framework sub-modules
>>>
>>> appserver catalina entity guiapp security webapp
>>> base common entityext images service webslinger
>>> bi example jetty sql webtools
>>> birt datafile exampleext minilang start widget
>>> documents geronimo resources testtools
>>>
>>> After separate tests and code I had to put them as separate modules,
>>>
>>> - src/main/java
>>> - src/test/java
>>
>> Er, no, do not do this. Bad. Stop.
>>
>> Leave it as src/. I already have stuff in ofbiz that creates
>> build/lib/ofbiz-base.jar and build/lib/ofbiz-base-test.jar. There is no
>> reason to split the test java files out.
>>
> Adam,
> thanks for your comment. But why didn't you told this before ? Ganath
> has been working on this theme for more than a month now...

Because I wasn't aware of it?  We are all busy.

And as a GSoC person, he should have investigated what the system
already did before changing a bunch of stuff.

I added the "test-jar" macro to common.xml last April.  It's been
there for quite a while.

As for splitting any entitymodel/servicemodel/seed-data stuff, there
is no reason to move any files around.  All the loaders need to be
modified to support "test" type loading(some already support this).
Then, downstream distributors that don't want to include example or
test stuff can just parse the same set of files(or we can include a
tool to do it for them).