You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@geronimo.apache.org by Jacek Laskowski <jl...@apache.org> on 2005/01/03 00:16:51 UTC

Need help with TestCase for WebModuleBuilder

Hi,

I'm writing a WebModuleBuilder so that a webapp plan will intruct which 
builder to pick up - JettyModuleBuilder or TomcatModuleBuilder. Perhaps, 
  it will be done using a tag in a geronimo-web.xml (or 
geronimo-jetty.xml as it seems to me that the former isn't used at all). 
There're loads of places where both do the same and I'm going to avoid 
doing the copy-and-paste. There would be some methods to override to 
implement the implementation specific tasks, but most would be in the 
WebModuleBuilder. That's the plan, but...

I'm trying to create a TestCase for it and I don't know where to start. 
I was looking at many places in order to find a TestCase for invoking 
the Deployer so that I could test the WebModuleBuilder and I could find 
nothing. I'm looking at JettyModuleBuilderTest and EARConfigBuilderTest, 
but before getting into their details I would like to know whether 
there're better/simpler test cases available.

Jacek


Re: Need help with TestCase for WebModuleBuilder

Posted by Dain Sundstrom <ds...@gluecode.com>.
On Jan 2, 2005, at 3:16 PM, Jacek Laskowski wrote:

> Hi,
>
> I'm writing a WebModuleBuilder so that a webapp plan will intruct 
> which builder to pick up - JettyModuleBuilder or TomcatModuleBuilder. 
> Perhaps,  it will be done using a tag in a geronimo-web.xml (or 
> geronimo-jetty.xml as it seems to me that the former isn't used at 
> all). There're loads of places where both do the same and I'm going to 
> avoid doing the copy-and-paste. There would be some methods to 
> override to implement the implementation specific tasks, but most 
> would be in the WebModuleBuilder. That's the plan, but...

How is this going to work?  Will this require that both Jetty and 
Tomcat be deployed in the server?  IMO we simply need a common 
interface and which ever web module build is what you get.  I remain 
very skeptical of  having two web servers deployed in one geronimo 
server.

> I'm trying to create a TestCase for it and I don't know where to 
> start. I was looking at many places in order to find a TestCase for 
> invoking the Deployer so that I could test the WebModuleBuilder and I 
> could find nothing. I'm looking at JettyModuleBuilderTest and 
> EARConfigBuilderTest, but before getting into their details I would 
> like to know whether there're better/simpler test cases available.

There is a deployment test case in Openejb.  It builds a few sample 
jars, deploys them and then tries to invoke the ejb.

-dain


Re: Need help with TestCase for WebModuleBuilder

Posted by anita kulshreshtha <a_...@yahoo.com>.
Jacek, 
    I have a TomcatModuleBuilderTest which is attached
here. It is based on JettyModuleBuilderTest. I hope it
is useful.

Regards
Anita
--- Jacek Laskowski <jl...@apache.org> wrote:

> Hi,
> 
> I'm writing a WebModuleBuilder so that a webapp plan
> will intruct which 
> builder to pick up - JettyModuleBuilder or
> TomcatModuleBuilder. Perhaps, 
>   it will be done using a tag in a geronimo-web.xml
> (or 
> geronimo-jetty.xml as it seems to me that the former
> isn't used at all). 
> There're loads of places where both do the same and
> I'm going to avoid 
> doing the copy-and-paste. There would be some
> methods to override to 
> implement the implementation specific tasks, but
> most would be in the 
> WebModuleBuilder. That's the plan, but...
> 
> I'm trying to create a TestCase for it and I don't
> know where to start. 
> I was looking at many places in order to find a
> TestCase for invoking 
> the Deployer so that I could test the
> WebModuleBuilder and I could find 
> nothing. I'm looking at JettyModuleBuilderTest and
> EARConfigBuilderTest, 
> but before getting into their details I would like
> to know whether 
> there're better/simpler test cases available.
> 
> Jacek
> 
> 


		
__________________________________ 
Do you Yahoo!? 
Send a seasonal email greeting and help others. Do good. 
http://celebrity.mail.yahoo.com