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