Code and test separation for Apache OFBiz

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
8 messages Options
Reply | Threaded
Open this post in threaded view
|

Code and test separation for Apache OFBiz

Ganath Rathnayake
Hi devs,
According to my project I suggested some changes to be done to separate the
test classes from the code itself. Please let me know your ideas about the
suggested structure.
Also I came up with the structure for module securityext. Can I separate the
code as follows? Please let me know your ideas.

current structure
.
|-- src
|   `-- org
|       `-- ofbiz
|           `-- securityext
|               |-- test
|               |   |-- AuthorizationTests.java
|                   `-- DaTest2.groovy


after test/code separation
.
|-- src
|    |--main
|    |    `--java
|    |         `-- //rest of the code
|    |--test
|      `--java
|              `-- org
|                    `-- ofbiz
|                           `-- securityext
|                                 |-- AuthorizationTests.java
|                                 `-- DaTest2.groovy



--
thanks
Ganath
Reply | Threaded
Open this post in threaded view
|

Re: Code and test separation for Apache OFBiz

David E. Jones-2

To avoid disrupting the current directory structure, it would be better to avoid:

move: component/src -> component/src/main/java
result: component/src/main/java, component/src/text/java

and instead not move component/src at all and have:

component/src
component/test-src

... or something along those lines.

-David


On May 17, 2011, at 10:12 PM, Ganath Rathnayaka wrote:

> Hi devs,
> According to my project I suggested some changes to be done to separate the
> test classes from the code itself. Please let me know your ideas about the
> suggested structure.
> Also I came up with the structure for module securityext. Can I separate the
> code as follows? Please let me know your ideas.
>
> current structure
> .
> |-- src
> |   `-- org
> |       `-- ofbiz
> |           `-- securityext
> |               |-- test
> |               |   |-- AuthorizationTests.java
> |                   `-- DaTest2.groovy
>
>
> after test/code separation
> .
> |-- src
> |    |--main
> |    |    `--java
> |    |         `-- //rest of the code
> |    |--test
> |      `--java
> |              `-- org
> |                    `-- ofbiz
> |                           `-- securityext
> |                                 |-- AuthorizationTests.java
> |                                 `-- DaTest2.groovy
>
>
>
> --
> thanks
> Ganath

Reply | Threaded
Open this post in threaded view
|

Re: Code and test separation for Apache OFBiz

Adrian Crum-3
I prefer the original proposal. I don't like having two different source
code folders.

Keep in mind that we informally agreed that there will be disruptions
post 11.x branch. I believe this one will be one of many worthwhile changes.

-Adrian

On 5/17/2011 10:25 PM, David E Jones wrote:

> To avoid disrupting the current directory structure, it would be better to avoid:
>
> move: component/src ->  component/src/main/java
> result: component/src/main/java, component/src/text/java
>
> and instead not move component/src at all and have:
>
> component/src
> component/test-src
>
> ... or something along those lines.
>
> -David
>
>
> On May 17, 2011, at 10:12 PM, Ganath Rathnayaka wrote:
>
>> Hi devs,
>> According to my project I suggested some changes to be done to separate the
>> test classes from the code itself. Please let me know your ideas about the
>> suggested structure.
>> Also I came up with the structure for module securityext. Can I separate the
>> code as follows? Please let me know your ideas.
>>
>> current structure
>> .
>> |-- src
>> |   `-- org
>> |       `-- ofbiz
>> |           `-- securityext
>> |               |-- test
>> |               |   |-- AuthorizationTests.java
>> |                   `-- DaTest2.groovy
>>
>>
>> after test/code separation
>> .
>> |-- src
>> |    |--main
>> |    |    `--java
>> |    |         `-- //rest of the code
>> |    |--test
>> |      `--java
>> |              `-- org
>> |                    `-- ofbiz
>> |                           `-- securityext
>> |                                 |-- AuthorizationTests.java
>> |                                 `-- DaTest2.groovy
>>
>>
>>
>> --
>> thanks
>> Ganath
Reply | Threaded
Open this post in threaded view
|

Re: Code and test separation for Apache OFBiz

rajsaini
Having director structure like:

|-- src
|    |--main
|    |    `--java
|    |         `-- //rest of the code
|    |--test
|      `--java
|              `-- org
|                    `-- ofbiz
|                           `-- securityext
|                                 |-- AuthorizationTests.java
|                                 `-- DaTest2.groovy

Will also confirm to Maven directory structure and it will make Maven
build system integration easier if needed some time in future.

Thanks,

Raj


On Wednesday 18 May 2011 11:03 AM, Adrian Crum wrote:

> I prefer the original proposal. I don't like having two different
> source code folders.
>
> Keep in mind that we informally agreed that there will be disruptions
> post 11.x branch. I believe this one will be one of many worthwhile
> changes.
>
> -Adrian
>
> On 5/17/2011 10:25 PM, David E Jones wrote:
>> To avoid disrupting the current directory structure, it would be
>> better to avoid:
>>
>> move: component/src ->  component/src/main/java
>> result: component/src/main/java, component/src/text/java
>>
>> and instead not move component/src at all and have:
>>
>> component/src
>> component/test-src
>>
>> ... or something along those lines.
>>
>> -David
>>
>>
>> On May 17, 2011, at 10:12 PM, Ganath Rathnayaka wrote:
>>
>>> Hi devs,
>>> According to my project I suggested some changes to be done to
>>> separate the
>>> test classes from the code itself. Please let me know your ideas
>>> about the
>>> suggested structure.
>>> Also I came up with the structure for module securityext. Can I
>>> separate the
>>> code as follows? Please let me know your ideas.
>>>
>>> current structure
>>> .
>>> |-- src
>>> |   `-- org
>>> |       `-- ofbiz
>>> |           `-- securityext
>>> |               |-- test
>>> |               |   |-- AuthorizationTests.java
>>> |                   `-- DaTest2.groovy
>>>
>>>
>>> after test/code separation
>>> .
>>> |-- src
>>> |    |--main
>>> |    |    `--java
>>> |    |         `-- //rest of the code
>>> |    |--test
>>> |      `--java
>>> |              `-- org
>>> |                    `-- ofbiz
>>> |                           `-- securityext
>>> |                                 |-- AuthorizationTests.java
>>> |                                 `-- DaTest2.groovy
>>>
>>>
>>>
>>> --
>>> thanks
>>> Ganath
>

Reply | Threaded
Open this post in threaded view
|

Re: Code and test separation for Apache OFBiz

Rene Scheibe
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

A bit off topic: Are there also any plans to use Gradle?

At the moment I just use it as a wrapper around the existing Ant
infrastructure. This speeds up traversing all the folders/sub projects
to shorten the code-test-cycle during development. In future releases of
Gradle it could be used to build the components in parallel.

Regards,
René Scheibe

On 05/18/2011 08:24 AM, Raj Saini wrote:

> Having director structure like:
>
> |-- src
> |    |--main
> |    |    `--java
> |    |         `-- //rest of the code
> |    |--test
> |      `--java
> |              `-- org
> |                    `-- ofbiz
> |                           `-- securityext
> |                                 |-- AuthorizationTests.java
> |                                 `-- DaTest2.groovy
>
> Will also confirm to Maven directory structure and it will make Maven
> build system integration easier if needed some time in future.
>
> Thanks,
>
> Raj
>
>
> On Wednesday 18 May 2011 11:03 AM, Adrian Crum wrote:
>> I prefer the original proposal. I don't like having two different
>> source code folders.
>>
>> Keep in mind that we informally agreed that there will be disruptions
>> post 11.x branch. I believe this one will be one of many worthwhile
>> changes.
>>
>> -Adrian
>>
>> On 5/17/2011 10:25 PM, David E Jones wrote:
>>> To avoid disrupting the current directory structure, it would be
>>> better to avoid:
>>>
>>> move: component/src ->  component/src/main/java
>>> result: component/src/main/java, component/src/text/java
>>>
>>> and instead not move component/src at all and have:
>>>
>>> component/src
>>> component/test-src
>>>
>>> ... or something along those lines.
>>>
>>> -David
>>>
>>>
>>> On May 17, 2011, at 10:12 PM, Ganath Rathnayaka wrote:
>>>
>>>> Hi devs,
>>>> According to my project I suggested some changes to be done to
>>>> separate the
>>>> test classes from the code itself. Please let me know your ideas
>>>> about the
>>>> suggested structure.
>>>> Also I came up with the structure for module securityext. Can I
>>>> separate the
>>>> code as follows? Please let me know your ideas.
>>>>
>>>> current structure
>>>> .
>>>> |-- src
>>>> |   `-- org
>>>> |       `-- ofbiz
>>>> |           `-- securityext
>>>> |               |-- test
>>>> |               |   |-- AuthorizationTests.java
>>>> |                   `-- DaTest2.groovy
>>>>
>>>>
>>>> after test/code separation
>>>> .
>>>> |-- src
>>>> |    |--main
>>>> |    |    `--java
>>>> |    |         `-- //rest of the code
>>>> |    |--test
>>>> |      `--java
>>>> |              `-- org
>>>> |                    `-- ofbiz
>>>> |                           `-- securityext
>>>> |                                 |-- AuthorizationTests.java
>>>> |                                 `-- DaTest2.groovy
>>>>
>>>>
>>>>
>>>> --
>>>> thanks
>>>> Ganath
>>
>


- --
René Scheibe * [hidden email] * +49-176-62192936
TNG Technology Consulting GmbH, Betastr. 13a, 85774 Unterföhring
Geschäftsführer: Henrik Klagges, Gerhard Müller, Christoph Stock
Sitz: Unterföhring * Amtsgericht München * HRB 135082
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.11 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/

iEYEARECAAYFAk3TfCUACgkQUXs9EHvIuCrz/QCcDcjrR9IePi4eCQYwSTQ8cuyb
HMsAnAwWnJQr0jgHUBg3aA2ltMbF9xYo
=p/P8
-----END PGP SIGNATURE-----
Reply | Threaded
Open this post in threaded view
|

Re: Code and test separation for Apache OFBiz

BJ Freeman
In reply to this post by Ganath Rathnayake
since it is the jars that define separation for runtime the changes
should be in the build.xml in building the targets have
test-ofbiz-*.jars that the build test targets use.

Ganath Rathnayaka sent the following on 5/17/2011 10:12 PM:

> Hi devs,
> According to my project I suggested some changes to be done to separate the
> test classes from the code itself. Please let me know your ideas about the
> suggested structure.
> Also I came up with the structure for module securityext. Can I separate the
> code as follows? Please let me know your ideas.
>
> current structure
> .
> |-- src
> |   `-- org
> |       `-- ofbiz
> |           `-- securityext
> |               |-- test
> |               |   |-- AuthorizationTests.java
> |                   `-- DaTest2.groovy
>
>
> after test/code separation
> .
> |-- src
> |    |--main
> |    |    `--java
> |    |         `-- //rest of the code
> |    |--test
> |      `--java
> |              `-- org
> |                    `-- ofbiz
> |                           `-- securityext
> |                                 |-- AuthorizationTests.java
> |                                 `-- DaTest2.groovy
>
>
>
Reply | Threaded
Open this post in threaded view
|

Re: Code and test separation for Apache OFBiz

Erwan de FERRIERES
In reply to this post by Rene Scheibe
Le 18/05/2011 09:58, René Scheibe a écrit :

> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
>
> A bit off topic: Are there also any plans to use Gradle?
>
> At the moment I just use it as a wrapper around the existing Ant
> infrastructure. This speeds up traversing all the folders/sub projects
> to shorten the code-test-cycle during development. In future releases of
> Gradle it could be used to build the components in parallel.
>

Hi René,

there is no plan today to integrate gradle in OFBiz. I think you are the
first to speak about this !!

Maybe this is a way to look at, but at the moment, for this task, we'll
be sticking with ant.

Cheers,

--
Erwan de FERRIERES
www.nereide.biz
Reply | Threaded
Open this post in threaded view
|

Re: Code and test separation for Apache OFBiz

Ganath Rathnayake
Thanks for all your precious comments and I will be starting my works with
the original proposal structure as many of you prefer it.

Ganath