On 27/09/2007, Rajith Attapattu <[EMAIL PROTECTED]> wrote: > On 9/27/07, Arnaud Simon <[EMAIL PROTECTED]> wrote: > > > > On Thu, 2007-09-27 at 10:20 +0100, Rupert Smith wrote: > > > Integration tests and client unit tests are quite dissimilar. > > > > > > The integration tests are aimed at interop. The client unit tests are > > > supposed to be pure unit tests for the client, but in fact they are > > > more like Java client + broker sys tests. > > > > This is the issue, the client unit tests are not pure unit tests for the > > client but more client+broker tests. Some of them are even more broker > > oriented. > > > Can we limit the tests in broker and client to be strictly unit tests only. > i.e they only tests functions/methods in isolation. > This will flag if we break any existing functionality and encourage people > to write proper unit tests as an when they write code. > If we run a code coverage tool, we can clearly see that most of the code is > not tested in this way.
Testing the client strictly with unit tests only will not guarantee the functionality. Sure you can say the method int addOne(int value) returns value+1 but a lot of the client tests depend on state changes in the broker. Which is why we use the InVM broker. You could write a dummy veneer to test the client against but that is way more effort that you would gain by simply using the InVM broker. Claims have been made in the past about code coverage being quite poor but IIRC they were always looking at the pure unit test coverage which is quite low for the above reason. The test coverage I've seen has been reasonably when including the full results of a maven run. > As Arnaud said, we can try to move the current tests into integration (or > the systests if thats more acceptable) and consolidate them in one place. > Then modify them to run against an in-vm broker or an external broker. > As part of the maven build we can run the in-vm broker. I would be strongly against moving anything at this late stage in a release process. Lets focus on getting M2 finally _done_ then move on to any restructuring efforts. > Regards, > > Rajith > -- Martin Ritchie