Hi, I was thinking about this problem the other way round

At the moment the binary distribution builds with the following structure
(taking binding-echo and simple-bigbank as two  examples)

docs/
lib/
modules/
samples/
 binding-echo
   src/
     main/
        extension sample code
     test/
        java/
          echo/
            EchoBindingClient.java
            EchoReferenceTestCase.java
            EchoServiceTestCase.java
 simple-bigbank/
   src/
     main/
         java/
           bigbank/
             client/
                BigBankClient.java
     test/
        java/
          bigbank/
            BigBankTestCase.java

So there are a number of issues we have been discussing

1/ Should there be JUnit tests in the samples.
2/ Should the mvn poms distributed with the binary distribution run the
sample client used by the Ant build instead of/as well as the JUnit test
3/ If you look at the binding-echo test (and the other extension example
tests) you see I put the clients used by ant in the test directory. This is
inconsistent with the rest of the samples but consistent with the desire to
demonstrate here how to build an extension, rather than how to build a
client.

My 2c on these
1/ I don't mind there being JUnit tests in the samples. I would bow to
consensus if it's generally thought that this complicates the first use
experience but as a java developer I know what a junit test is and it's
quite nice to have a test on which to base new tests that I may use with any
changes I make
2/ I think people running ant and mvn expect different things. I.e. having
mvn run the junit tests run is not unexpected to a maven user. We may choose
to have the poms here run the ant client as well for completeness, e.g we
could engage your wrappers to do this.
3/ This was the basis of my original question. The tests are not shipped in
the sample jars (I still need to find out why) to the effect is that the
client is missed from the sample jar and the three extension example tests
don't run out of the box. Due to the clients location I constructed the ant
scripts to build the test directory but had to filter out the unit tests
because JUnit does not ship. I would rather solve these problems by moving
the client code into main/ than removing the JUnit tests altogether.

I took a look at the code. Some comments:

- I like the idea of the wrappers but I would maybe use them as well as the
junit tests rather than instead of.
- The effect of removing the JUnit tests from the samples is that the
samples don't get tested anymore. Well not to the extent that the assertions
that are currently included in the JUnit tests are exercised
- The itests aren't shipped at the moment in the binary release AFAIK so the
maven based samples wouldn't be available.  We could fix this of course but
would need discussion at this stage.

Simon

Reply via email to