-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 On 08/01/2010 02:25 PM, Erwan de FERRIERES wrote: > Le 01/08/2010 13:25, René Scheibe a écrit : >> -----BEGIN PGP SIGNED MESSAGE----- >> Hash: SHA1 >> >> I am not happy how I have to develop/test components in hot-deploy. It >> does not encourage test-driven development. That's also reflected in the >> quite low number of unit tests in the whole OFBiz system. :-( >> >> 1. What are the plans to migrate to JUnit4? >> - - I just have seen a post about renaming tests >> (http://comments.gmane.org/gmane.comp.java.ofbiz.devel/44766) but no >> follow-up >> - - if I want to migrate OFBiz to JUnit4 do you have any tips or is there >> anything special I have to take care of? > Hi Rene, > One of the things which still needs to be done is separating test source > code from application code. At the moment, everything is still present > under src/org/ofbiz, instead of src/main and src/test. We already managed this change for our components under hot-deploy.
Our (preferred) structure is: src/main src/test/unit (real unit tests without any environment interaction) src/test/component (tests using a running OFBiz framework) src/test/functional (Selenium tests) This doesn't follow the maven way in putting everything under src/main and src/test. But distinguishing between different test types is a must. We also already migrated our unit tests (real unit tests) to JUnit4. All code (business logic & tests) can additionally to Java be written in Groovy which is the preferred way in our team as it's more concise (it's time for IDEs to improve :-). BUT: I have seen discussions in the mailing lists some time ago that the current source code structure is based on the fact that business logic and test should be next to each other in your IDE and that other Apache projects are doing it the same way. So it's quite interesting that this is not settled - yes, I am also voting against that structure. ;-) The migration for the whole OFBiz would be quite hard. A lot of files had to be moved and the "test" package be removed. But the more difficult task would be to migrate all customer components under hot-deploy or to provide both ways to structure your source. Regards, Rene Scheibe - -- René Scheibe * [email protected] 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.10 (GNU/Linux) iEYEARECAAYFAkxVsvUACgkQUXs9EHvIuCpvQgCfX1dMwBqeYdwiOugIjhcAiiQ9 GiIAmQHEuM/2Es3gDIdSqjzRAlVe/iB/ =gINB -----END PGP SIGNATURE-----
