+1 on what Sebastien described. In fact, the refactored code already works this way.

Thanks,
Raymond

----- Original Message ----- From: "Jean-Sebastien Delfino" <[EMAIL PROTECTED]>
To: <tuscany-dev@ws.apache.org>
Sent: Monday, February 11, 2008 6:46 PM
Subject: Re: Tuscany web-apps and jUnit dependencies


Simon Nash wrote:
ant elder wrote:
On Feb 8, 2008 8:55 PM, Luciano Resende <[EMAIL PROTECTED]> wrote:

<snip>

As for the other items, If we have TuscanyServletFilter and
TuscanyTestServletFilter, it would only work for the iTests, as they
have generated web.xml. If we want to have simmilar aproach on our
sample applications, that have real web.xml, how would we do it ?


I already said earlier on the other thread but just to reiterate I don't
think we should use this approach with the samples. They need to be as
simple and clear as possible so they're easy for new users to understand.

   ...ant

+1 for keeping the samples as simple as possible.

Is it possible to automate the running of sample tests in a way that
doesn't change the contents of the sample war files?  I'm thinking of
a test framework that starts Tomcat or Jetty, deploys a sample war,
then runs some JUnit tests.  I don't see why this would need any change
to the web.xml in the sample war.

  Simon


My 2c, with my application developer hat on:

My webapp should not have to depend on junit unless I'm packaging test cases that need junit.

I don't want any fancy web.xml generator as it'll wipe out the application servlets and welcome pages that I'll declare in web.xml.

My application's web.xml should just contain the following:
<filter>
  <filter-name>tuscany</filter-name>
  <filter-class>
  org.apache.tuscany.sca.host.webapp.TuscanyServletFilter
  </filter-class>
</filter>

and in that case the TuscanyServletFilter should not open execution of test cases under the /junit path.

To enable junit test execution, I should just have to add the following to my web.xml:
<filter>
  <filter-name>tuscany-junit</filter-name>
  <filter-class>
  org.apache.tuscany.sca.whatever.TuscanyJUnitServletFilter
  </filter-class>
</filter>

Finally, samples should show me how to do what I just described.

--
Jean-Sebastien

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to