Re: Proposal to modify the testing framework for OFBiz

2016-07-19 Thread Ron Wheeler
I think that your point was well received. I am just happy that testing is getting attention. Ron On 19/07/2016 7:53 PM, Scott Gray wrote: I'm not looking for any sort of response really. I was just speaking in favor of integration tests because I think they provide better coverage at the

Re: Proposal to modify the testing framework for OFBiz

2016-07-19 Thread Scott Gray
I'm not looking for any sort of response really. I was just speaking in favor of integration tests because I think they provide better coverage at the cost of a little bit of speed (the framework has to be running to run them). Most of the responses coming in were of the form "unit tests are

Re: Proposal to modify the testing framework for OFBiz

2016-07-19 Thread Ron Wheeler
It is not clear what you are expecting as a specific response. As you move up the food chain, the definition of "units" changes and the tests get more complicated and the design of the tests gets more complex (mock objects, testing race conditions). It is hard to make specific comments about

Re: Proposal to modify the testing framework for OFBiz

2016-07-19 Thread Scott Gray
I think people are missing my point because they keep replying with generic statements that aren't specific to unit tests. On 19 July 2016 at 20:08, Montalbano Florian wrote: > Hi everyone, > > unit tests and integration tests are complementary and with test, the

Re: Proposal to modify the testing framework for OFBiz

2016-07-19 Thread Montalbano Florian
Hi everyone, unit tests and integration tests are complementary and with test, the more the better. Implementing unit tests will be a great load of work but it is the same with every kind of test. As Taher said, we will gain a lot from those unit tests for avoiding regression while

Re: Proposal to modify the testing framework for OFBiz

2016-07-19 Thread Pierre Smits
As with anything, the law of diminishing returns also applies to OFBiz and tests. This is not true for unit tests and system integration tests, but also for user acceptance and performance tests. Nevertheless, the work done up to now is a good start and - I feel confident - appreciated. And unit

Re: Proposal to modify the testing framework for OFBiz

2016-07-19 Thread Taher Alkhateeb
Hi Scott, Well spoken thank you. Okay may I suggest that for any such work we will discuss it here see its Merit and if it makes sense then we take it in. It is a little early to discuss it right now because we did not yet go to the higher-level components. Once we do I'll be sure to have a

Re: Proposal to modify the testing framework for OFBiz

2016-07-19 Thread Scott Gray
Yeah I'm sure unit tests probably worked well for the start component given it is the lowest level component in the system and closest to a basic java app. I just think the value proposition might decrease the further up the stack we move with them. I'm not against unit tests when they prove

Re: Proposal to modify the testing framework for OFBiz

2016-07-18 Thread Taher Alkhateeb
Hi Scott, Thank you for the feedback. To be focused exactly on integration vs unit, I already mentioned above that at least for me the main objective is to confidently and quickly run the tests in short bursts of red-green refactor. This allows me to refactor code without waiting in front of the

Re: Proposal to modify the testing framework for OFBiz

2016-07-18 Thread Scott Gray
Thanks Ron and Taher for your responses, I appreciate them but I don't hear much in the conversation that speaks to the value of unit tests over integration tests. Most of the thoughts shared speaks more to the value of tests rather than differences in the type of tests. Speed: At an application

Re: Proposal to modify the testing framework for OFBiz

2016-07-18 Thread Taher Alkhateeb
Hi Scott, Thank you for your input. Your ideas are thought provoking and enriching to the conversation. The way I look at it, the general rule is usually many unit tests, less integration tests, lesser functional tests. So we are not excluding any types of test, all of them are important in

Re: Proposal to modify the testing framework for OFBiz

2016-07-18 Thread Ron Wheeler
You are probably right that integration testing has a lot more value. However, unit tests are still useful in their own right and may encourage people to write smaller classes that can be tested easily. As you point out, integration testing can be done at several levels with mock

Re: Proposal to modify the testing framework for OFBiz

2016-07-18 Thread Scott Gray
I know I'm late to the party here, but I just want to say that I think integration tests have far greater value to OFBiz than unit tests. Mostly because we tend to have quite a low number of tests and integration tests give us much better coverage per line of test code and the tests are much

Re: Proposal to modify the testing framework for OFBiz

2016-07-18 Thread Hans Bakker
great initiative Taher, finally someone who values automated tests to enable TDD but also leading to continuous improvement and finally continuous deployment Regards, Hans Bakker CEO AntWebsystems.com On 18/07/16 12:06, Taher Alkhateeb wrote: Hello Everyone, In reference to this thread

Re: Proposal to modify the testing framework for OFBiz

2016-07-18 Thread Jacques Le Roux
It's very cool to see this old Jira revived :) Jacques Le 18/07/2016 à 08:22, Akash Jain a écrit : Thanks Taher for nice initiative! We are planning to written unit tests to all components under OFBIZ-1463 Thanks and Regards -- Akash Jain On Mon, Jul 18, 2016 at 10:36 AM, Taher Alkhateeb <

Re: Proposal to modify the testing framework for OFBiz

2016-07-18 Thread Taher Alkhateeb
Hello Akash, Fantastic, I have a few unit tests almost done to be included in the start component. I will create a new subtask under OFBIZ-1463 to commit the tests so you can use them as a reference if you like to. I also recommend that you follow the same directory structure between the test

Re: Proposal to modify the testing framework for OFBiz

2016-07-18 Thread Akash Jain
Thanks Taher for nice initiative! We are planning to written unit tests to all components under OFBIZ-1463 Thanks and Regards -- Akash Jain On Mon, Jul 18, 2016 at 10:36 AM, Taher Alkhateeb < slidingfilame...@gmail.com> wrote: > Hello Everyone, > > In reference to this thread and the Jira

Re: Proposal to modify the testing framework for OFBiz

2016-07-17 Thread Taher Alkhateeb
Hello Everyone, In reference to this thread and the Jira OFBIZ-7254, I'm very happy to announce that OFBiz is now ready for applying unit tests with only 8 new lines of code in the build script (r1753143) :) I recommend we do the following moving forward: 1- Introduce unit tests as much as we

Re: Proposal to modify the testing framework for OFBiz

2016-06-12 Thread Pranay Pandey
+1 Best regards, Pranay Pandey HotWax Systems http://www.hotwaxsystems.com/ On Fri, Jun 10, 2016 at 7:46 PM, Taher Alkhateeb wrote: > Hello Everyone, > > I was able to get a few tests running and this is very doable. But I faced > a big problem in designing the

Re: Proposal to modify the testing framework for OFBiz

2016-06-10 Thread Mridul Pathak
+1 -- Thanks & Regards, Mridul Pathak HotWax Systems http://www.hotwaxsystems.com > On Jun 10, 2016, at 7:46 PM, Taher Alkhateeb > wrote: > > Hello Everyone, > > I was able to get a few tests running and this is very doable. But I faced > a big problem in

Re: Proposal to modify the testing framework for OFBiz

2016-06-10 Thread Sharan Foga
+1, I agree with Jacques and Jacopo. Thanks Sharan On 10/06/16 16:43, Jacques Le Roux wrote: +1, we need to move ahead Jacques Le 10/06/2016 à 16:29, Jacopo Cappellato a écrit : It sounds a reasonable approach to me. Especially because it will let you proceed with the important work you

Re: Proposal to modify the testing framework for OFBiz

2016-06-10 Thread Jacques Le Roux
+1, we need to move ahead Jacques Le 10/06/2016 à 16:29, Jacopo Cappellato a écrit : It sounds a reasonable approach to me. Especially because it will let you proceed with the important work you are contributing without loosing the momentum to study old configuration code that would require

Re: Proposal to modify the testing framework for OFBiz

2016-06-10 Thread Jacopo Cappellato
It sounds a reasonable approach to me. Especially because it will let you proceed with the important work you are contributing without loosing the momentum to study old configuration code that would require some cleanups regardless. Thanks, Jacopo On Fri, Jun 10, 2016 at 4:16 PM, Taher

Re: Proposal to modify the testing framework for OFBiz

2016-06-10 Thread Taher Alkhateeb
Hello Everyone, I was able to get a few tests running and this is very doable. But I faced a big problem in designing the testing framework because of ANT. The problem The way the build scripts are designed in OFBiz are very complex. A master file calls other files which call

Re: Proposal to modify the testing framework for OFBiz

2016-06-08 Thread Taher Alkhateeb
Hi Everyone, Thank you all for your support, JIRA created in https://issues.apache.org/jira/browse/OFBIZ-7254 I will start working on it and try to implement ASAP to get my focus back on refactoring. Cheers! Taher Alkhateeb On Wed, Jun 8, 2016 at 4:58 PM, Deepak Dixit

Re: Proposal to modify the testing framework for OFBiz

2016-06-08 Thread Deepak Dixit
+1 Thanks & Regards -- Deepak Dixit www.hotwaxsystems.com On Wed, Jun 8, 2016 at 7:12 PM, Mridul Pathak < mridul.pat...@hotwaxsystems.com> wrote: > +1 > > Makes perfect sense. > > -- > Thanks & Regards, > Mridul Pathak > Senior Manager > HotWax Systems > http://www.hotwaxsystems.com > > > On

Re: Proposal to modify the testing framework for OFBiz

2016-06-08 Thread Mridul Pathak
+1 Makes perfect sense. -- Thanks & Regards, Mridul Pathak Senior Manager HotWax Systems http://www.hotwaxsystems.com > On Jun 8, 2016, at 2:41 PM, Taher Alkhateeb > wrote: > > Hello Everyone, > > After refactoring the start component and while starting on the

Re: Proposal to modify the testing framework for OFBiz

2016-06-08 Thread Jacopo Cappellato
Totally agree that what we have right now is a set of integration tests, not unit tests. Big +1 to the proposal to implement unit tests and mocking. Jacopo On Wed, Jun 8, 2016 at 11:11 AM, Taher Alkhateeb wrote: > Hello Everyone, > > After refactoring the start

Re: Proposal to modify the testing framework for OFBiz

2016-06-08 Thread Pierre Smits
+1 I suggest the first thing to start with is bring the proposed solution over to an improvement issue in JIRA and work from there. Best regards, Pierre Smits ORRTIZ.COM OFBiz based solutions & services OFBiz Extensions Marketplace http://oem.ofbizci.net/oci-2/ On

Re: Proposal to modify the testing framework for OFBiz

2016-06-08 Thread Nicolas Malin
I'm on the same case, +1 Le 08/06/2016 13:42, Pranay Pandey a écrit : thanks so much Taher for the explaining it further, makes perfect sense. Best regards, Pranay Pandey HotWax Systems http://www.hotwaxsystems.com/ On Wed, Jun 8, 2016 at 3:02 PM, Taher Alkhateeb

Re: Proposal to modify the testing framework for OFBiz

2016-06-08 Thread Pranay Pandey
thanks so much Taher for the explaining it further, makes perfect sense. Best regards, Pranay Pandey HotWax Systems http://www.hotwaxsystems.com/ On Wed, Jun 8, 2016 at 3:02 PM, Taher Alkhateeb wrote: > Hi Pranay, > > What you are talking about is integration

Re: Proposal to modify the testing framework for OFBiz

2016-06-08 Thread Taher Alkhateeb
Hi Divesh, Yes correct. To give you a metaphor, think of integration tests as taking your car and driving it to make sure it works, and think of unit tests like checking your car engine piece by piece in isolation by measuring and inspecting every piece by itself. You can read here for more

Re: Proposal to modify the testing framework for OFBiz

2016-06-08 Thread Divesh Dutta
Hi Taher, What I understand from your proposal is, we will like to test a small unit which can be a Java method as well. And framework does not allows that. And you want to introduce such support in framework . Is that what you mean ? And if this what you are thinking, then I think its nice

Re: Proposal to modify the testing framework for OFBiz

2016-06-08 Thread gil portenseigne
Same here : +1 Gil On 08/06/2016 11:24, Jacques Le Roux wrote: That sounds like a more than reasonable proposition to me + 1 Jacques Le 08/06/2016 à 11:11, Taher Alkhateeb a écrit : Hello Everyone, After refactoring the start component and while starting on the base component I realized

Re: Proposal to modify the testing framework for OFBiz

2016-06-08 Thread Taher Alkhateeb
Hi Pranay, What you are talking about is integration tests (ones that you can run per component) Unit tests do not need to be run per component. The entire unit test library for the entire framework should run in probably less than 5 seconds. So there is no need to make them run per component.

Re: Proposal to modify the testing framework for OFBiz

2016-06-08 Thread Jacques Le Roux
That sounds like a more than reasonable proposition to me + 1 Jacques Le 08/06/2016 à 11:11, Taher Alkhateeb a écrit : Hello Everyone, After refactoring the start component and while starting on the base component I realized that the testing framework for OFBiz is not good. You cannot do

Re: Proposal to modify the testing framework for OFBiz

2016-06-08 Thread Pranay Pandey
Hi Taher, There is one thing that I want to confirm based my understanding, as long as I know, we can run tests independently as well e.g. *Running tests for a component: * java -jar ofbiz.jar -test component=‘order’ *Running a specific test Suite from a component:* ant run-single-test-suite

Proposal to modify the testing framework for OFBiz

2016-06-08 Thread Taher Alkhateeb
Hello Everyone, After refactoring the start component and while starting on the base component I realized that the testing framework for OFBiz is not good. You cannot do real test driven development or red-green-refactor with the current setup, hence my proposal to change it. I explain below: