Jeremy Boynes wrote:
I can't but help sense a disconnect, specifically over what a "unit test" is.

Quoting the oracle, OK http://en.wikipedia.org/wiki/Unit_testing
"a unit test is a procedure used to verify that a particular module of
source code is working properly" They are of use to *developers* to
check a specific module (class) is functioning.

I tend to agree with Jim that unit tests should just rely on objects
that can be constructed in memory, with the use of mock objects to
support specific test cases. There should be no need for macro
configuration objects like sidefiles - if these are needed then the
test is too broad.

I would also say that JUnit is more than just a unit test framework;
you can use it to construct integration or other tests as well as its
original purpose for unit testing. The big benefit to us here is the
built-in integration of the JUnit framework with the default Maven
build process. We need to be clear when we are talking about "unit
testing" in general and junit in specific.

Finally, running Tomcat embedded is "no big thing" - it is not hard to
set up and not hard to use (although I would contend that Jetty may be
even simpler). We did this in Geronimo for testing container
integration (both Tomcat and Jetty) and it was not hard to get a
simple config like the one we need working. I think this is worth
investigating as the effort put in now will make it easier to add even
more tests in the future. I'm traveling this week with sporadic access
but would be willing to work with someone this weekend/next week to
help get it going.

--
Jeremy

Yes there is a disconnect here. Thanks for educating us on what a unit test is, but somebody is going to have to explain to me how we test Tuscany without using side files when the most of the SCA assembly spec is about configuring and wiring components using SCDL side files.

With respect to running Tomcat embedded or as you say even simpler Jetty, I know that is is not a big thing. The only thing I'm saying is that we need to focus and put priority on the main scenarios that we want to support. As far as I know the main scenario that we want to support at the moment is running Tuscany on top of an existing/regular Tomcat installation, so we should focus our efforts on that scenario. If we want to change direction in terms of architecture and instead focus on running Tomcat or Jetty inside Tuscany, then fine , at some point we can have an architecture discussion on this subject and determine why/if/when we ever want to do that.

In the meantime I feel that running Jetty embedded in Tuscany with made-up models constructed in memory from Java code is a little ... disconnected... from our main goal, which is to run with SCDL files, with Tuscany running on top of Tomcat.

--

Jean-Sebastien

Reply via email to