Results 1 to 3 of 3

Thread: Testing Services

  1. #1
    Join Date
    Sep 2004
    Location
    Winterthur, Switzerland
    Posts
    58

    Default Testing Services

    What is the recommended way to test Domain level Classes in a Servlet, which are used as main Entrypoints for Service Facades (Hessian, Axis)?
    Is it necessary to bother with for example Cactus?

  2. #2
    Join Date
    Aug 2004
    Location
    San Mateo, CA
    Posts
    1,265

    Default

    There are very few situations in which I would use Cactus.

    I would go for the following types of testing for your objects:

    1. True unit testing. Does not involve any container. Just JUnit, with mock objects or stubs.

    2. Integration testing in a Spring container but not in a web container. This is fast, and skips the deployment step. See the superclasses in the org.springframework.test package in the mock JAR shipped with Spring. You can even have the superclasses create and rollback transactions if you like. With appropriate design, you can use virtually the same Spring XML config as in the deployed app.

    3. Test your remote entry points remotely, against a deployed app, using a remote client.

    Rgds
    Rod
    Rod Johnson - GM, SpringSource Division, VMware
    http://www.springsource.com
    Spring From the Source

  3. #3
    Join Date
    Sep 2004
    Location
    Winterthur, Switzerland
    Posts
    58

    Default

    2. was the missing link for me.
    Just Tried it out. Really Cool.
    This makes "easy" to test the domain layer independently of any appserver and/or webcontainer.
    Thanx.
    Christoph

Similar Threads

  1. Securing Spring-based services with Acegi
    By Andrei Lissovski in forum Security
    Replies: 3
    Last Post: Sep 23rd, 2005, 06:56 PM
  2. Exposing Services in a JMS based application
    By rsheldon in forum Architecture
    Replies: 1
    Last Post: Sep 21st, 2005, 12:56 AM
  3. Replies: 1
    Last Post: Sep 21st, 2005, 12:56 AM
  4. planning major migration to spring
    By wexwarez in forum Architecture
    Replies: 21
    Last Post: May 23rd, 2005, 01:13 AM
  5. Please help! Unit testing code for JPetStore
    By lakershen in forum Container
    Replies: 4
    Last Post: Jan 13th, 2005, 05:00 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •