./gradlew cleanAll loadDefault testIntegration

takes 5 minutes and 20 seconds in my Mac as well (which is similar to what
Scott is using I think) but I know that it can take much longer in other
boxes: I think the main reason is because our tests performs a lot of IO
and on systems using SSD the time is much shorter.
IO traffic is mostly generated by db calls and logging and I think we could
improve the performance by disabling most of the logging when we are
running the tests.
Taher, I agree that now that we have a good framework to run unit tests we
should review our integration tests and identify the ones that should
become unit tests, and convert them to the new style.

Jacopo


On Wed, Nov 16, 2016 at 5:20 PM, Taher Alkhateeb <[email protected]
> wrote:

> Hi Scott. Does that include loading data? Do you run ./gradlew cleanAll
> loadDefault testIntegration? Or are you referring only to the tests?
>
> Regardless of execution time, it is definitely _longer_ than it was in the
> past, which is the reason why I started this thread in the first place.
>
> On Wed, Nov 16, 2016 at 12:59 AM, Scott Gray <[email protected]
> >
> wrote:
>
> > FYI latest trunk takes almost exactly 5 minutes on my machine.
> >
> > Regards
> > Scott
> >
> > On 16 November 2016 at 06:34, Taher Alkhateeb <
> [email protected]>
> > wrote:
> >
> > > Hi Folks,
> > >
> > > As you may recall, we introduced unit-tests to OFBiz in addition to the
> > > existing integration tests to try and balance the long development
> cycle
> > > that we currently suffer from.
> > >
> > > The total number of tests on the latest version of Trunk on my machine
> is
> > > 1929, and the total time it takes to complete all tests using the
> command
> > > ./gradlew cleanAll loadDefault testIntegration is almost 20 minutes!
> > > Something is wrong, and in my opinion it is that we have way too many
> > > integration tests and very few unit tests. Integration tests are
> resource
> > > hungry and a strain on the system and heavily slow down the development
> > > cycle.
> > >
> > > So I urge everyone interested in writing tests to prefer unit tests
> over
> > > integration tests where possible, or even better, to try rewrite some
> of
> > > the integration tests as unit tests, or to increase the efficiency of
> the
> > > algorithms for testing. Our development cycle is becoming very slow
> > because
> > > of the mountain of integration tests that reside in the framework.
> > >
> > > If you are interested, Jacopo already wrote a few tests with mocking
> > using
> > > Mockito. You can use these tests as a reference to help you in writing
> > > efficient and fast unit tests.
> > >
> > > Cheers,
> > >
> > > Taher Alkhateeb
> > >
> >
>

Reply via email to