Newbie Question

2002-10-31 Thread Woo, Chen Ching
I need to run a test to verify that certain database records shown up in the response 
text after they have added to the database. I don't know the newly added record's 
unique ID until runtime. Here's the scenario:

public void testXXX() {
 
   // the addTestRecordToDatabase() method relies on in-container code such as 
EJB,JDBC, etc. So I didn't put it in the
   // beginXXX() method.   
   String[] newIDs = addTestRecordToDatabase();
}

public void endXXX() {
  // ideally, I should be able to verify that the newIDs in the response text.
}

My question is, how do I pass the value of the variable "newIDs" from the testXXX() to 
the endXXX() method.

I have a feeling I'm doing something fundamentally wrong here.

Any help would be greatly appreciated.

Thanks.

chen.

--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




RE: config Vaj+WTE 4.0 with cactus 1.4.1

2002-10-31 Thread Vincent Massol
Hi Manoj,

What's the question? Have you read all the tutorials on:

http://jakarta.apache.org/cactus/howto_ide.html
http://www7b.boulder.ibm.com/wsdd/techjournal/0206_wosnick/wosnick.html

-Vincent

> -Original Message-
> From: Manoj, Mathew [mailto:Manoj.Mathew@;principal.com]
> Sent: 31 October 2002 19:44
> To: Cactus Users List
> Subject: config Vaj+WTE 4.0 with cactus 1.4.1
> 
> Hi
> I am trying to integrate cactus1.4.1 with Vaj+WTE4.0.Can anybody help
me
> out?
> Thanks
> Manoj
> 
> --
> To unsubscribe, e-mail:    [EMAIL PROTECTED]>
> For additional commands, e-mail:  [EMAIL PROTECTED]>



--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




RE: Apparent Race Condition, revisited

2002-10-31 Thread Vincent Massol
Hi Brian,

> -Original Message-
> From: Brian Murray [mailto:brian.c.murray@;vanderbilt.edu]
> Sent: 29 October 2002 15:19
> To: [EMAIL PROTECTED]
> Subject: Apparent Race Condition, revisited
> 
> We've experienced a condition that seems to mirror the race condition
> that Frank Baxter reported last week.  What we are seeing is the
setUp()
> method of test B starting before the tearDown() method of test A has
> completed.  Attempts to narrow down the cause have been unsuccessful,
> apparently because, as Frank pointed out, logging and other debug
> methods slow things down to the point where the race condition doesn't
> occur.
> 
> One thing that sets this particular suite of tests apart from others
is
> that the tearDown() method executes for a relatively long time.  There
> is quite a bit of database cleanup going on and it can take 30 seconds
> or more. Vincent posted that "internally Cactus reads the whole
servlet
> response *before* calling again the server side to get the test
Result".
> Is it possible that tearDown() is taking so long that the servlet
> response is complete, but tearDown() is still running?
> 
> For clarity, we're using Cactus 1.4.1 and running the tests through
> jUnit's Swing test runner.
> 
> We can work around the problem by moving the database work into
> beginXXX() and endXXX methods, but would rather not have to since
a)this
> isn't the way we write non-cactus tests; and b)there are concerns
> (unproven and probably unfounded) about performance.

I think you may be right. It seems the problem is that the client side
read everything on the response socket but in some cases that may not
mean processing is finished on the server side (and thus the test result
is not set as it is the last step of the processing - it happens after
teardown()).

I dunno why but I thought I had implemented something that was
guaranteed to work whatever the duration it takes on the server side ...
Actually in the past I was setting a semaphore on the server side. For
some reason I have removed that some time ago (1.2 or 1.3 version)
because I thought I had a better implementation not needing a lock... 

The problem is that I can't reproduce the bug and thus I am not sure it
is the problem. What container are you using and in what version?

Here's the test I have:

public void testLongProcess() throws Exception
{
ServletOutputStream os = response.getOutputStream();

os.print("");
os.flush();

// do some processing that takes a while ...
Thread.sleep(6);
}

And still it works fine (I'm testing on Tomcat 4.1.10).

Could you try this test on your setup?

If we cannot figure out the reason, I'll reimplement the semaphore stuff
so that the second request waits until the lock is removed before
returning the test results. I'll put it in CVS and ask you to give it a
try.

Thanks
-Vincent

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



--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




RE: FormAuthentication

2002-10-31 Thread Vincent Massol
Hi Jason,

> -Original Message-
> From: Robertson, Jason [mailto:Jason.Robertson@;acs-inc.com]
> Sent: 28 October 2002 20:35
> To: 'Cactus Users List'
> Subject: RE: FormAuthentication
> 
> I think this is a good solution. Separate WAR files is the only way I
know
> of to use different authentication techniques.
> 
> Plus, the side effect of making a clearer separation between the
example
> and
> the unit tests I agree is a good thing.
> 
> Do you want my test app? It's just a very simple web app with pages to
do
> the form authentication as well, so you have a 2nd avenue to test
> configuration if you're having troubles with cactus. Its the one I
used to
> test Tomcat and WLS. I'm sure it can be easily adapted to any other
J2EE
> server. Let me know and I'll try to bundle it up.

I'd love if you could contribute to this servlet-unit subproject!
However, I don't have much time ATM and it would be nice if it were in a
similar format as the existing sample-servlet project... Anyway,
anything you can submit will be of help! 

Thanks for your continuing help!
-Vincent

> 
> Jason
> 
> -Original Message-
> From: Vincent Massol [mailto:vmassol@;octo.com]
> Sent: Saturday, October 26, 2002 2:12 PM
> To: 'Cactus Users List'
> Cc: [EMAIL PROTECTED]; [EMAIL PROTECTED]
> Subject: RE: FormAuthentication
> 
> 
> Hi Jason/Pranab,
> 
> Thank you both for the good analysis! There are indeed 2 bugs you have
> found:
> - one with the FormAuthentication using only the default redirector
> - one with the HttpClient fetching the test result using only the
> default redirector
> 
> I have now fixed (hopefully) both bugs in CVS. You can check the CVS
> commit emails if you wish to see what I have modified. I would be
happy
> to know if you agree with my changes... :-)
> 
> However, there is still something missing which I was not able to
code:
> it is a test for the FormAuthentication class. The problem is that
> apparently you can only have one method of authentication in a given
> webapp and ATM the sample webapp is using Basic authentication... Thus
> we cannot easily add one more test for testing Jason's
> FormaAuthentication code ... I was pondering about what route to take
> for that. Any idea?
> 
> One solution would be to have several webapp of course and more
> specifically to have the following directory structure in CVS:
> 
> jakarta-cactus
>   |_ [...]
>   |_ servlet-sample
>   |_ servlet-unit
> 
> servlet-sample: contains only the org.apache.cactus.sample.* packages.
> It is the sample application.
> 
> servlet-unit: contains only the org.apache.cactus.unit.* packages. The
> goal of this application is to offer a full regression test suite for
> Cactus. It is not a sample application per see. The idea would then be
> to have a build file that produces 3 wars: one test.war (no
> authentication tests), one test-basic.war (basic authentication tests)
> and one test-form.war (form-based authentication tests).
> 
> Note: Some persons have told me it was difficult to understand the
> differences between the unit/ and sample/ directories in the
> servlet-sample project. That would solve the problem.
> 
> What do you think?
> 
> Thanks
> -Vincent
> 
> > -Original Message-
> > From: Robertson, Jason [mailto:Jason.Robertson@;acs-inc.com]
> > Sent: 26 October 2002 15:40
> > To: 'Cactus Users List'
> > Subject: RE: FormAuthentication
> >
> > Time for Vincent to chime in!
> >
> > Vincent, Pranab's comments below show that there's a problem in the
> > reconfiguring of the Redirector in that you can configure it in two
> > places:
> > in WebRequest and in cactus.properties, but only the latter is
> persistent
> > between callRunTest and callGetResult. In callGetResult, a new
> WebRequest
> > is
> > created and gets initialized with the cactus.properties value.
> >
> > Should calling setRedirectorName in the WebRequest propagate that
> setting
> > to
> > the configuration? Or should that method be removed from WebRequest
> and
> > added to the WebConfiguration interface and then you'd say:
> >
> > aWebRequestObject.getConfiguration().setRedirectorName(...);
> >
> > Or should the same WebRequest object be shared between callRunTest
and
> > callGetResult? I would think this would make the most sense, I don't
> know
> > if
> > I like accessing static properties through a transient object.
> >
> > If we take the reuse-the-WebRequest approach, the signature for
> > callGetResult would change to remove the AbstractAuthen. Thetication
> and add
> > the
> > WebRequest (the authentication object would already be configured in
> the
> > WebRequest) and you'd have to add something like a "setParameter"
that
> > would
> > overwrite any existing parameter and allow you to reconfigure the
> service
> > name parameter.
> >
> > None of these changes are that difficult, but does any one look
better
> or
> > worse in the "big picture"?
> >
> > Jason
> 
> [snip]
> 
> 
> 
> --
> To unsubscribe, e-mail:
> 

config Vaj+WTE 4.0 with cactus 1.4.1

2002-10-31 Thread Manoj, Mathew
Hi
I am trying to integrate cactus1.4.1 with Vaj+WTE4.0.Can anybody help me out?
Thanks
Manoj

--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




Re: Method endXXX doesn't work in CactusStrutsTestCase

2002-10-31 Thread Erik Hatcher
I believe this is normal.  StrutsTestCase simply executes your action, 
it does not also follow the forwards to the JSP page and generate the 
result.

What are you trying to test that you need the JSP results also?

	Erik

John Cleber Jaraceski wrote:
Hi,

I'm using Struts for build my Servlets and Jsp Pages. And I'm making tests
with CactusStrutsTestCase and Cactus.

But when I run my TestCase, the methods endXXX doesn't have value in
WebResponse (the method WebResponse.getText() always returns null).

And this doesn't hapeen when I use JspTestCase or ServletTestCase.

This is a normal? What do i have to correct this?

Thanks for help...

Bye.


John Cleber Jaraceski
Sun Certified Java 2 Programmer
[EMAIL PROTECTED]


--
To unsubscribe, e-mail:   
For additional commands, e-mail: 






--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




RE: config of struts with cactus

2002-10-31 Thread Trieu, Danny
I will start a different thread and see how everyone think

Danny

Ps. Sorry, I though I was response to the Struts user group
-Original Message-
From: Vincent Massol [mailto:vmassol@;octo.com] 
Sent: Thursday, October 31, 2002 9:38 AM
To: 'Cactus Users List'
Subject: RE: config of struts with cactus




> -Original Message-
> From: Trieu, Danny [mailto:DTrieu@;downeysavings.com]
> Sent: 31 October 2002 17:12
> To: 'Cactus Users List'
> Subject: RE: config of struts with cactus
> 
> Sorry Vincent, I guess I am asking everyone that using Struts.  I 
> think It would be nice to have some sort testing framework that bundle 
> with Struts distribution.

Yes, it would be nice if Struts could bundle both Cactus and StrutsTestCase
and make readily available as part of its distribution for Struts users.

I think this is a very good suggestion that you should try to sell on the
struts mailing list!

Thanks
-Vincent

> 
> danny
> 
> -Original Message-
> From: Vincent Massol [mailto:vmassol@;octo.com]
> Sent: Thursday, October 31, 2002 8:53 AM
> To: 'Cactus Users List'
> Subject: RE: config of struts with cactus
> 
> 
> Hi Danny,
> 
> Are you asking me this question? Or to Manoj?
> 
> Cheers,
> -Vincent
> 
> > -Original Message-
> > From: Trieu, Danny [mailto:DTrieu@;downeysavings.com]
> > Sent: 31 October 2002 16:40
> > To: 'Cactus Users List'
> > Subject: RE: config of struts with cactus
> >
> > Have you try StrustTestCase?  It extended from Cactus, and it seem
to
> be
> > very good.
> >
> > Craig,
> >
> > Have you consider to have some sort of test framework like
> StrutsTestCase
> > to
> > be
> > Part of the Struts distribution?
> >
> > danny
> >
> > -Original Message-
> > From: Vincent Massol [mailto:vmassol@;octo.com]
> > Sent: Thursday, October 31, 2002 8:28 AM
> > To: 'Cactus Users List'
> > Subject: RE: config of struts with cactus
> >
> >
> >
> >
> > > -Original Message-
> > > From: Manoj, Mathew [mailto:Manoj.Mathew@;principal.com]
> > > Sent: 28 October 2002 20:02
> > > To: Cactus Users List
> > > Subject: config of struts with cactus
> > >
> > >
> > > Hi
> > >  Is the Cactus latest ver is compatible with Jakarta struts 1.0  ?
> >
> > yes and with any version of Struts as it is completely independent
of
> > struts.
> >
> > >
> > > Mat
> > > -Original Message-
> > > From: Taylor,Timothy L. [mailto:ttaylor@;mitre.org]
> > > Sent: Monday, October 28, 2002 1:57 PM
> > > To: Cactus Users List
> > > Subject: Re: Junit Vs Jtest
> > >
> > >
> > > One thing to point out is that JTest can run JUnit tests, so you
> loose
> > > nothing by starting with JUnit (which is free), and then if you
want
> > to
> > > eventually move to JTest, the time invested in writing JUnit tests
> > won't
> > > have been wasted.
> > > - Tim
> > >
> > > Larry Tambascio wrote:
> > >
> > > > You should check out the archive for the JUnit mail list!! Back
in
> > > > early September there was a great many messages about this very 
> > > > topic.  I won't even attempt to summarize.
> > > >
> > > > Later,
> > > > -Larry
> > > >
> > > > On Tue, 15 Oct 2002 22:01:08 -0700 (PDT)
> > > >  Prabodh Goel <[EMAIL PROTECTED]> wrote:
> > > >
> > > >>
> > > >> Hi Guys,
> > > >>
> > > >> Does anyone know which is better for unit testing Jtest or 
> > > >> Junit ? and Why ?
> > > >>
> > > >> regards,
> > > >> Prabodh
> > > >>
> > > >>
> > > >> __
> > > >> Do you Yahoo!?
> > > >> Faith Hill - Exclusive Performances, Videos & More 
> > > >> http://faith.yahoo.com
> > > >>
> > > >> --
> > > >> To unsubscribe, e-mail: 
> > > >> 
> > > >> For additional commands, e-mail: 
> > > >> 
> > > >>
> > > >
> > > >
> > > > --
> > > > To unsubscribe, e-mail: 
> > > > 
> > > > For additional commands, e-mail: 
> > > > 
> > > >
> > >
> > >
> > >
> > > --
> > > 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]>
> >
> >
> >
> > --
> > To unsubscribe, e-mail: 
> > 
> > For additional commands, e-mail: 
> > 
> >
> > --
> > To unsubscribe, e-mail:    > [EMAIL PROTECTED]>
> > For additional commands, e-mail:  > [EMAIL PROTECTED]>
> 
> 
> 
> --
> To unsubscribe, e-mail: 
> 
> For additional commands, e-mail: 
> 
> 
> --
> To unsubscribe, e-mail:   

RE: config of struts with cactus

2002-10-31 Thread Vincent Massol


> -Original Message-
> From: Trieu, Danny [mailto:DTrieu@;downeysavings.com]
> Sent: 31 October 2002 17:12
> To: 'Cactus Users List'
> Subject: RE: config of struts with cactus
> 
> Sorry Vincent, I guess I am asking everyone that using Struts.  I
> think
> It would be nice to have some sort testing framework that bundle with
> Struts distribution.

Yes, it would be nice if Struts could bundle both Cactus and
StrutsTestCase and make readily available as part of its distribution
for Struts users.

I think this is a very good suggestion that you should try to sell on
the struts mailing list!

Thanks
-Vincent

> 
> danny
> 
> -Original Message-
> From: Vincent Massol [mailto:vmassol@;octo.com]
> Sent: Thursday, October 31, 2002 8:53 AM
> To: 'Cactus Users List'
> Subject: RE: config of struts with cactus
> 
> 
> Hi Danny,
> 
> Are you asking me this question? Or to Manoj?
> 
> Cheers,
> -Vincent
> 
> > -Original Message-
> > From: Trieu, Danny [mailto:DTrieu@;downeysavings.com]
> > Sent: 31 October 2002 16:40
> > To: 'Cactus Users List'
> > Subject: RE: config of struts with cactus
> >
> > Have you try StrustTestCase?  It extended from Cactus, and it seem
to
> be
> > very good.
> >
> > Craig,
> >
> > Have you consider to have some sort of test framework like
> StrutsTestCase
> > to
> > be
> > Part of the Struts distribution?
> >
> > danny
> >
> > -Original Message-
> > From: Vincent Massol [mailto:vmassol@;octo.com]
> > Sent: Thursday, October 31, 2002 8:28 AM
> > To: 'Cactus Users List'
> > Subject: RE: config of struts with cactus
> >
> >
> >
> >
> > > -Original Message-
> > > From: Manoj, Mathew [mailto:Manoj.Mathew@;principal.com]
> > > Sent: 28 October 2002 20:02
> > > To: Cactus Users List
> > > Subject: config of struts with cactus
> > >
> > >
> > > Hi
> > >  Is the Cactus latest ver is compatible with Jakarta struts 1.0  ?
> >
> > yes and with any version of Struts as it is completely independent
of
> > struts.
> >
> > >
> > > Mat
> > > -Original Message-
> > > From: Taylor,Timothy L. [mailto:ttaylor@;mitre.org]
> > > Sent: Monday, October 28, 2002 1:57 PM
> > > To: Cactus Users List
> > > Subject: Re: Junit Vs Jtest
> > >
> > >
> > > One thing to point out is that JTest can run JUnit tests, so you
> loose
> > > nothing by starting with JUnit (which is free), and then if you
want
> > to
> > > eventually move to JTest, the time invested in writing JUnit tests
> > won't
> > > have been wasted.
> > > - Tim
> > >
> > > Larry Tambascio wrote:
> > >
> > > > You should check out the archive for the JUnit mail list!! Back
in
> > > > early September there was a great many messages about this very
> > > > topic.  I won't even attempt to summarize.
> > > >
> > > > Later,
> > > > -Larry
> > > >
> > > > On Tue, 15 Oct 2002 22:01:08 -0700 (PDT)
> > > >  Prabodh Goel <[EMAIL PROTECTED]> wrote:
> > > >
> > > >>
> > > >> Hi Guys,
> > > >>
> > > >> Does anyone know which is better for unit testing
> > > >> Jtest or Junit ? and Why ?
> > > >>
> > > >> regards,
> > > >> Prabodh
> > > >>
> > > >>
> > > >> __
> > > >> Do you Yahoo!?
> > > >> Faith Hill - Exclusive Performances, Videos & More
> > > >> http://faith.yahoo.com
> > > >>
> > > >> --
> > > >> To unsubscribe, e-mail:
> > > >> 
> > > >> For additional commands, e-mail:
> > > >> 
> > > >>
> > > >
> > > >
> > > > --
> > > > To unsubscribe, e-mail:
> > > > 
> > > > For additional commands, e-mail:
> > > > 
> > > >
> > >
> > >
> > >
> > > --
> > > 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]>
> >
> >
> >
> > --
> > To unsubscribe, e-mail:
> > 
> > For additional commands, e-mail:
> > 
> >
> > --
> > To unsubscribe, e-mail:    > [EMAIL PROTECTED]>
> > For additional commands, e-mail:  > [EMAIL PROTECTED]>
> 
> 
> 
> --
> To unsubscribe, e-mail:
> 
> For additional commands, e-mail:
> 
> 
> --
> To unsubscribe, e-mail:    [EMAIL PROTECTED]>
> For additional commands, e-mail:  [EMAIL PROTECTED]>



--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




RE: config of struts with cactus

2002-10-31 Thread Vincent Massol


> -Original Message-
> From: Manoj, Mathew [mailto:Manoj.Mathew@;principal.com]
> Sent: 31 October 2002 17:07
> To: Cactus Users List
> Subject: RE: config of struts with cactus
> 
> Actually i am trying to set up a development env with Struts1.0,Vaj4.0
and
> cactus.
>   I got an error.It was as a result of the fact that the
package
> org.apache.commons.cactus had been changed to org.apache.cactus in the
> revision made from version 1.1 to version 1.2.
> So i tried with struts1.1 and it worked well.
> Hope i explained it
> thanks folks

ah ok. Yep. I would strongly suggest to upgrade to Cactus 1.4.1 :-)

Thanks for posting back
-Vincent

> 
> 
> 
> -Original Message-
> From: Vincent Massol [mailto:vmassol@;octo.com]
> Sent: Thursday, October 31, 2002 10:41 AM
> To: 'Cactus Users List'
> Subject: RE: config of struts with cactus
> 
> 
> Manoj,
> 
> I don't understand. Cactus offers features to provide *container*
> objects to your test case. If there's an incompatibility it will be
with
> some container not following the Servlet/JSP/Filter spec (or Cactus
> having a bug and doing something forbidden by the spec). Nothing to do
> with Struts, which is also using the Servlet API. Are you saying that
> Struts 1.0 was doing something forbidden WRT the Servlet API?
> 
> -Vincent
> 
> > -Original Message-
> > From: Manoj, Mathew [mailto:Manoj.Mathew@;principal.com]
> > Sent: 31 October 2002 16:35
> > To: Cactus Users List
> > Subject: RE: config of struts with cactus
> >
> > I am sorry.Actually struts1.0 is not compatible with cactus1.4.Not
the
> > other way around.The problem is with struts
> > thanks
> >
> > -Original Message-
> > From: Vincent Massol [mailto:vmassol@;octo.com]
> > Sent: Thursday, October 31, 2002 10:28 AM
> > To: 'Cactus Users List'
> > Subject: RE: config of struts with cactus
> >
> >
> >
> >
> > > -Original Message-
> > > From: Manoj, Mathew [mailto:Manoj.Mathew@;principal.com]
> > > Sent: 28 October 2002 20:02
> > > To: Cactus Users List
> > > Subject: config of struts with cactus
> > >
> > >
> > > Hi
> > >  Is the Cactus latest ver is compatible with Jakarta struts 1.0  ?
> >
> > yes and with any version of Struts as it is completely independent
of
> > struts.
> >
> > >
> > > Mat
> > > -Original Message-
> > > From: Taylor,Timothy L. [mailto:ttaylor@;mitre.org]
> > > Sent: Monday, October 28, 2002 1:57 PM
> > > To: Cactus Users List
> > > Subject: Re: Junit Vs Jtest
> > >
> > >
> > > One thing to point out is that JTest can run JUnit tests, so you
> loose
> > > nothing by starting with JUnit (which is free), and then if you
want
> > to
> > > eventually move to JTest, the time invested in writing JUnit tests
> > won't
> > > have been wasted.
> > > - Tim
> > >
> > > Larry Tambascio wrote:
> > >
> > > > You should check out the archive for the JUnit mail list!! Back
in
> > > > early September there was a great many messages about this very
> > > > topic.  I won't even attempt to summarize.
> > > >
> > > > Later,
> > > > -Larry
> > > >
> > > > On Tue, 15 Oct 2002 22:01:08 -0700 (PDT)
> > > >  Prabodh Goel <[EMAIL PROTECTED]> wrote:
> > > >
> > > >>
> > > >> Hi Guys,
> > > >>
> > > >> Does anyone know which is better for unit testing
> > > >> Jtest or Junit ? and Why ?
> > > >>
> > > >> regards,
> > > >> Prabodh
> > > >>
> > > >>
> > > >> __
> > > >> Do you Yahoo!?
> > > >> Faith Hill - Exclusive Performances, Videos & More
> > > >> http://faith.yahoo.com
> > > >>
> > > >> --
> > > >> To unsubscribe, e-mail:
> > > >>  
> > > >> For additional commands, e-mail:
> > > >> 
> > > >>
> > > >
> > > >
> > > > --
> > > > To unsubscribe, e-mail:
> > > > 
> > > > For additional commands, e-mail:
> > > > 
> > > >
> > >
> > >
> > >
> > > --
> > > 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]>
> >
> >
> >
> > --
> > 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]>
> 
> 
> 
> --
> To unsubscribe, e-mail:    [EMAIL PROTECTED]>
> For additional commands, e-mail:  [EMAIL PROTECTED]>
> 
> 
> --
> To unsubscribe, e-mail:    [EMAIL PROTECTED]>
> For additional commands, e-mail: 

RE: config of struts with cactus

2002-10-31 Thread Trieu, Danny
Sorry Vincent, I guess I am asking everyone that using Struts.  I think
It would be nice to have some sort testing framework that bundle with
Struts distribution. 

danny

-Original Message-
From: Vincent Massol [mailto:vmassol@;octo.com] 
Sent: Thursday, October 31, 2002 8:53 AM
To: 'Cactus Users List'
Subject: RE: config of struts with cactus


Hi Danny,

Are you asking me this question? Or to Manoj?

Cheers,
-Vincent

> -Original Message-
> From: Trieu, Danny [mailto:DTrieu@;downeysavings.com]
> Sent: 31 October 2002 16:40
> To: 'Cactus Users List'
> Subject: RE: config of struts with cactus
> 
> Have you try StrustTestCase?  It extended from Cactus, and it seem to
be
> very good.
> 
> Craig,
> 
> Have you consider to have some sort of test framework like
StrutsTestCase
> to
> be
> Part of the Struts distribution?
> 
> danny
> 
> -Original Message-
> From: Vincent Massol [mailto:vmassol@;octo.com]
> Sent: Thursday, October 31, 2002 8:28 AM
> To: 'Cactus Users List'
> Subject: RE: config of struts with cactus
> 
> 
> 
> 
> > -Original Message-
> > From: Manoj, Mathew [mailto:Manoj.Mathew@;principal.com]
> > Sent: 28 October 2002 20:02
> > To: Cactus Users List
> > Subject: config of struts with cactus
> >
> >
> > Hi
> >  Is the Cactus latest ver is compatible with Jakarta struts 1.0  ?
> 
> yes and with any version of Struts as it is completely independent of 
> struts.
> 
> >
> > Mat
> > -Original Message-
> > From: Taylor,Timothy L. [mailto:ttaylor@;mitre.org]
> > Sent: Monday, October 28, 2002 1:57 PM
> > To: Cactus Users List
> > Subject: Re: Junit Vs Jtest
> >
> >
> > One thing to point out is that JTest can run JUnit tests, so you
loose
> > nothing by starting with JUnit (which is free), and then if you want
> to
> > eventually move to JTest, the time invested in writing JUnit tests
> won't
> > have been wasted.
> > - Tim
> >
> > Larry Tambascio wrote:
> >
> > > You should check out the archive for the JUnit mail list!! Back in 
> > > early September there was a great many messages about this very 
> > > topic.  I won't even attempt to summarize.
> > >
> > > Later,
> > > -Larry
> > >
> > > On Tue, 15 Oct 2002 22:01:08 -0700 (PDT)
> > >  Prabodh Goel <[EMAIL PROTECTED]> wrote:
> > >
> > >>
> > >> Hi Guys,
> > >>
> > >> Does anyone know which is better for unit testing
> > >> Jtest or Junit ? and Why ?
> > >>
> > >> regards,
> > >> Prabodh
> > >>
> > >>
> > >> __
> > >> Do you Yahoo!?
> > >> Faith Hill - Exclusive Performances, Videos & More 
> > >> http://faith.yahoo.com
> > >>
> > >> --
> > >> To unsubscribe, e-mail: 
> > >> 
> > >> For additional commands, e-mail: 
> > >> 
> > >>
> > >
> > >
> > > --
> > > To unsubscribe, e-mail: 
> > > 
> > > For additional commands, e-mail: 
> > > 
> > >
> >
> >
> >
> > --
> > 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]>
> 
> 
> 
> --
> To unsubscribe, e-mail: 
> 
> For additional commands, e-mail: 
> 
> 
> --
> To unsubscribe, e-mail:    [EMAIL PROTECTED]>
> For additional commands, e-mail:  [EMAIL PROTECTED]>



--
To unsubscribe, e-mail:

For additional commands, e-mail:


--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




RE: config of struts with cactus

2002-10-31 Thread Manoj, Mathew
Actually i am trying to set up a development env with Struts1.0,Vaj4.0 and cactus.
  I got an error.It was as a result of the fact that the package 
org.apache.commons.cactus had been changed to org.apache.cactus in the revision made 
from version 1.1 to version 1.2.
So i tried with struts1.1 and it worked well.
Hope i explained it
thanks folks



-Original Message-
From: Vincent Massol [mailto:vmassol@;octo.com]
Sent: Thursday, October 31, 2002 10:41 AM
To: 'Cactus Users List'
Subject: RE: config of struts with cactus


Manoj,

I don't understand. Cactus offers features to provide *container*
objects to your test case. If there's an incompatibility it will be with
some container not following the Servlet/JSP/Filter spec (or Cactus
having a bug and doing something forbidden by the spec). Nothing to do
with Struts, which is also using the Servlet API. Are you saying that
Struts 1.0 was doing something forbidden WRT the Servlet API?

-Vincent

> -Original Message-
> From: Manoj, Mathew [mailto:Manoj.Mathew@;principal.com]
> Sent: 31 October 2002 16:35
> To: Cactus Users List
> Subject: RE: config of struts with cactus
> 
> I am sorry.Actually struts1.0 is not compatible with cactus1.4.Not the
> other way around.The problem is with struts
> thanks
> 
> -Original Message-
> From: Vincent Massol [mailto:vmassol@;octo.com]
> Sent: Thursday, October 31, 2002 10:28 AM
> To: 'Cactus Users List'
> Subject: RE: config of struts with cactus
> 
> 
> 
> 
> > -Original Message-
> > From: Manoj, Mathew [mailto:Manoj.Mathew@;principal.com]
> > Sent: 28 October 2002 20:02
> > To: Cactus Users List
> > Subject: config of struts with cactus
> >
> >
> > Hi
> >  Is the Cactus latest ver is compatible with Jakarta struts 1.0  ?
> 
> yes and with any version of Struts as it is completely independent of
> struts.
> 
> >
> > Mat
> > -Original Message-
> > From: Taylor,Timothy L. [mailto:ttaylor@;mitre.org]
> > Sent: Monday, October 28, 2002 1:57 PM
> > To: Cactus Users List
> > Subject: Re: Junit Vs Jtest
> >
> >
> > One thing to point out is that JTest can run JUnit tests, so you
loose
> > nothing by starting with JUnit (which is free), and then if you want
> to
> > eventually move to JTest, the time invested in writing JUnit tests
> won't
> > have been wasted.
> > - Tim
> >
> > Larry Tambascio wrote:
> >
> > > You should check out the archive for the JUnit mail list!! Back in
> > > early September there was a great many messages about this very
> > > topic.  I won't even attempt to summarize.
> > >
> > > Later,
> > > -Larry
> > >
> > > On Tue, 15 Oct 2002 22:01:08 -0700 (PDT)
> > >  Prabodh Goel <[EMAIL PROTECTED]> wrote:
> > >
> > >>
> > >> Hi Guys,
> > >>
> > >> Does anyone know which is better for unit testing
> > >> Jtest or Junit ? and Why ?
> > >>
> > >> regards,
> > >> Prabodh
> > >>
> > >>
> > >> __
> > >> Do you Yahoo!?
> > >> Faith Hill - Exclusive Performances, Videos & More
> > >> http://faith.yahoo.com
> > >>
> > >> --
> > >> To unsubscribe, e-mail:
> > >>  
> > >> For additional commands, e-mail:
> > >> 
> > >>
> > >
> > >
> > > --
> > > To unsubscribe, e-mail:
> > > 
> > > For additional commands, e-mail:
> > > 
> > >
> >
> >
> >
> > --
> > 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]>
> 
> 
> 
> --
> 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]>



--
To unsubscribe, e-mail:   
For additional commands, e-mail: 


--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




RE: Method endXXX doesn't work in CactusStrutsTestCase

2002-10-31 Thread Vincent Massol
Hi John,

I can't help you as I haven't used StrutsTestCase but you might also
want to post on the StrutsTestCase project's ML or forum on SF.

-Vincent

> -Original Message-
> From: John Cleber Jaraceski [mailto:john@;kolnet.com.br]
> Sent: 31 October 2002 16:49
> To: Cactus User List
> Subject: Method endXXX doesn't work in CactusStrutsTestCase
> 
> Hi,
> 
> I'm using Struts for build my Servlets and Jsp Pages. And I'm making
tests
> with CactusStrutsTestCase and Cactus.
> 
> But when I run my TestCase, the methods endXXX doesn't have value in
> WebResponse (the method WebResponse.getText() always returns null).
> 
> And this doesn't hapeen when I use JspTestCase or ServletTestCase.
> 
> This is a normal? What do i have to correct this?
> 
> Thanks for help...
> 
> Bye.
> 
> 
> John Cleber Jaraceski
> Sun Certified Java 2 Programmer
> [EMAIL PROTECTED]
> 
> 
> --
> To unsubscribe, e-mail:    [EMAIL PROTECTED]>
> For additional commands, e-mail:  [EMAIL PROTECTED]>



--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




RE: config of struts with cactus

2002-10-31 Thread Vincent Massol
Hi Danny,

Are you asking me this question? Or to Manoj?

Cheers,
-Vincent

> -Original Message-
> From: Trieu, Danny [mailto:DTrieu@;downeysavings.com]
> Sent: 31 October 2002 16:40
> To: 'Cactus Users List'
> Subject: RE: config of struts with cactus
> 
> Have you try StrustTestCase?  It extended from Cactus, and it seem to
be
> very good.
> 
> Craig,
> 
> Have you consider to have some sort of test framework like
StrutsTestCase
> to
> be
> Part of the Struts distribution?
> 
> danny
> 
> -Original Message-
> From: Vincent Massol [mailto:vmassol@;octo.com]
> Sent: Thursday, October 31, 2002 8:28 AM
> To: 'Cactus Users List'
> Subject: RE: config of struts with cactus
> 
> 
> 
> 
> > -Original Message-
> > From: Manoj, Mathew [mailto:Manoj.Mathew@;principal.com]
> > Sent: 28 October 2002 20:02
> > To: Cactus Users List
> > Subject: config of struts with cactus
> >
> >
> > Hi
> >  Is the Cactus latest ver is compatible with Jakarta struts 1.0  ?
> 
> yes and with any version of Struts as it is completely independent of
> struts.
> 
> >
> > Mat
> > -Original Message-
> > From: Taylor,Timothy L. [mailto:ttaylor@;mitre.org]
> > Sent: Monday, October 28, 2002 1:57 PM
> > To: Cactus Users List
> > Subject: Re: Junit Vs Jtest
> >
> >
> > One thing to point out is that JTest can run JUnit tests, so you
loose
> > nothing by starting with JUnit (which is free), and then if you want
> to
> > eventually move to JTest, the time invested in writing JUnit tests
> won't
> > have been wasted.
> > - Tim
> >
> > Larry Tambascio wrote:
> >
> > > You should check out the archive for the JUnit mail list!! Back in
> > > early September there was a great many messages about this very
> > > topic.  I won't even attempt to summarize.
> > >
> > > Later,
> > > -Larry
> > >
> > > On Tue, 15 Oct 2002 22:01:08 -0700 (PDT)
> > >  Prabodh Goel <[EMAIL PROTECTED]> wrote:
> > >
> > >>
> > >> Hi Guys,
> > >>
> > >> Does anyone know which is better for unit testing
> > >> Jtest or Junit ? and Why ?
> > >>
> > >> regards,
> > >> Prabodh
> > >>
> > >>
> > >> __
> > >> Do you Yahoo!?
> > >> Faith Hill - Exclusive Performances, Videos & More
> > >> http://faith.yahoo.com
> > >>
> > >> --
> > >> To unsubscribe, e-mail:
> > >> 
> > >> For additional commands, e-mail:
> > >> 
> > >>
> > >
> > >
> > > --
> > > To unsubscribe, e-mail:
> > > 
> > > For additional commands, e-mail:
> > > 
> > >
> >
> >
> >
> > --
> > 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]>
> 
> 
> 
> --
> To unsubscribe, e-mail:
> 
> For additional commands, e-mail:
> 
> 
> --
> To unsubscribe, e-mail:    [EMAIL PROTECTED]>
> For additional commands, e-mail:  [EMAIL PROTECTED]>



--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




Method endXXX doesn't work in CactusStrutsTestCase

2002-10-31 Thread John Cleber Jaraceski
Hi,

I'm using Struts for build my Servlets and Jsp Pages. And I'm making tests
with CactusStrutsTestCase and Cactus.

But when I run my TestCase, the methods endXXX doesn't have value in
WebResponse (the method WebResponse.getText() always returns null).

And this doesn't hapeen when I use JspTestCase or ServletTestCase.

This is a normal? What do i have to correct this?

Thanks for help...

Bye.


John Cleber Jaraceski
Sun Certified Java 2 Programmer
[EMAIL PROTECTED]


--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




RE: config of struts with cactus

2002-10-31 Thread Vincent Massol
Manoj,

I don't understand. Cactus offers features to provide *container*
objects to your test case. If there's an incompatibility it will be with
some container not following the Servlet/JSP/Filter spec (or Cactus
having a bug and doing something forbidden by the spec). Nothing to do
with Struts, which is also using the Servlet API. Are you saying that
Struts 1.0 was doing something forbidden WRT the Servlet API?

-Vincent

> -Original Message-
> From: Manoj, Mathew [mailto:Manoj.Mathew@;principal.com]
> Sent: 31 October 2002 16:35
> To: Cactus Users List
> Subject: RE: config of struts with cactus
> 
> I am sorry.Actually struts1.0 is not compatible with cactus1.4.Not the
> other way around.The problem is with struts
> thanks
> 
> -Original Message-
> From: Vincent Massol [mailto:vmassol@;octo.com]
> Sent: Thursday, October 31, 2002 10:28 AM
> To: 'Cactus Users List'
> Subject: RE: config of struts with cactus
> 
> 
> 
> 
> > -Original Message-
> > From: Manoj, Mathew [mailto:Manoj.Mathew@;principal.com]
> > Sent: 28 October 2002 20:02
> > To: Cactus Users List
> > Subject: config of struts with cactus
> >
> >
> > Hi
> >  Is the Cactus latest ver is compatible with Jakarta struts 1.0  ?
> 
> yes and with any version of Struts as it is completely independent of
> struts.
> 
> >
> > Mat
> > -Original Message-
> > From: Taylor,Timothy L. [mailto:ttaylor@;mitre.org]
> > Sent: Monday, October 28, 2002 1:57 PM
> > To: Cactus Users List
> > Subject: Re: Junit Vs Jtest
> >
> >
> > One thing to point out is that JTest can run JUnit tests, so you
loose
> > nothing by starting with JUnit (which is free), and then if you want
> to
> > eventually move to JTest, the time invested in writing JUnit tests
> won't
> > have been wasted.
> > - Tim
> >
> > Larry Tambascio wrote:
> >
> > > You should check out the archive for the JUnit mail list!! Back in
> > > early September there was a great many messages about this very
> > > topic.  I won't even attempt to summarize.
> > >
> > > Later,
> > > -Larry
> > >
> > > On Tue, 15 Oct 2002 22:01:08 -0700 (PDT)
> > >  Prabodh Goel <[EMAIL PROTECTED]> wrote:
> > >
> > >>
> > >> Hi Guys,
> > >>
> > >> Does anyone know which is better for unit testing
> > >> Jtest or Junit ? and Why ?
> > >>
> > >> regards,
> > >> Prabodh
> > >>
> > >>
> > >> __
> > >> Do you Yahoo!?
> > >> Faith Hill - Exclusive Performances, Videos & More
> > >> http://faith.yahoo.com
> > >>
> > >> --
> > >> To unsubscribe, e-mail:
> > >>  
> > >> For additional commands, e-mail:
> > >> 
> > >>
> > >
> > >
> > > --
> > > To unsubscribe, e-mail:
> > > 
> > > For additional commands, e-mail:
> > > 
> > >
> >
> >
> >
> > --
> > 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]>
> 
> 
> 
> --
> 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]>



--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




RE: config of struts with cactus

2002-10-31 Thread Trieu, Danny
Have you try StrustTestCase?  It extended from Cactus, and it seem to be
very good.

Craig,

Have you consider to have some sort of test framework like StrutsTestCase to
be
Part of the Struts distribution?

danny

-Original Message-
From: Vincent Massol [mailto:vmassol@;octo.com] 
Sent: Thursday, October 31, 2002 8:28 AM
To: 'Cactus Users List'
Subject: RE: config of struts with cactus




> -Original Message-
> From: Manoj, Mathew [mailto:Manoj.Mathew@;principal.com]
> Sent: 28 October 2002 20:02
> To: Cactus Users List
> Subject: config of struts with cactus
> 
> 
> Hi
>  Is the Cactus latest ver is compatible with Jakarta struts 1.0  ?

yes and with any version of Struts as it is completely independent of
struts.

> 
> Mat
> -Original Message-
> From: Taylor,Timothy L. [mailto:ttaylor@;mitre.org]
> Sent: Monday, October 28, 2002 1:57 PM
> To: Cactus Users List
> Subject: Re: Junit Vs Jtest
> 
> 
> One thing to point out is that JTest can run JUnit tests, so you loose 
> nothing by starting with JUnit (which is free), and then if you want
to
> eventually move to JTest, the time invested in writing JUnit tests
won't
> have been wasted.
> - Tim
> 
> Larry Tambascio wrote:
> 
> > You should check out the archive for the JUnit mail list!! Back in 
> > early September there was a great many messages about this very 
> > topic.  I won't even attempt to summarize.
> >
> > Later,
> > -Larry
> >
> > On Tue, 15 Oct 2002 22:01:08 -0700 (PDT)
> >  Prabodh Goel <[EMAIL PROTECTED]> wrote:
> >
> >>
> >> Hi Guys,
> >>
> >> Does anyone know which is better for unit testing
> >> Jtest or Junit ? and Why ?
> >>
> >> regards,
> >> Prabodh
> >>
> >>
> >> __
> >> Do you Yahoo!?
> >> Faith Hill - Exclusive Performances, Videos & More 
> >> http://faith.yahoo.com
> >>
> >> --
> >> To unsubscribe, e-mail:  
> >> 
> >> For additional commands, e-mail: 
> >> 
> >>
> >
> >
> > --
> > To unsubscribe, e-mail: 
> > 
> > For additional commands, e-mail: 
> > 
> >
> 
> 
> 
> --
> 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]>



--
To unsubscribe, e-mail:

For additional commands, e-mail:


--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




RE: tomcat 4.0.3

2002-10-31 Thread Vincent Massol
Hi Vikas,

Answer is no. It will work fine with Tomcat 4.0.3 AFAIK. As that page
says, it contains versions that have been reported to work. So far it
has not been a great success as I've been the only one reporting
success... And I am only human and can only test so many versions. The
reasons I have not tested 1.4.1 with Tomcat 4.0.3 was that 4.0.4 was out
at that time and I tend to concentrate my testing efforts on the newest
versions.

Cheers,
-Vincent

> -Original Message-
> From: Vikas Malla [mailto:malla6um@;yahoo.co.in]
> Sent: 31 October 2002 16:34
> To: Cactus Users List
> Subject: tomcat 4.0.3
> 
> 
> Vincent:
> I was following the link
http://jakarta.apache.org/cactus/testedon.html,
> for the list of software cactus has been tested on. The list doesn't
> include tomcat 4.0.3, so I wanted to ask whether there could be some
> vulnerabilities associated with me choosing 4.0.3 for my in-container
> testing. Please let me know if you are aware of any known issues with
> cactus 1.4.1 and tomcat 4.0.3. And why was 4.0.3 not considered?
> Thanks.
> Post your ad on Yahoo! India Autos.Check out the used Maruti, Fiat and
> Ford models on sale now.


--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




RE: config of struts with cactus

2002-10-31 Thread Manoj, Mathew
I am sorry.Actually struts1.0 is not compatible with cactus1.4.Not the other way 
around.The problem is with struts
thanks

-Original Message-
From: Vincent Massol [mailto:vmassol@;octo.com]
Sent: Thursday, October 31, 2002 10:28 AM
To: 'Cactus Users List'
Subject: RE: config of struts with cactus




> -Original Message-
> From: Manoj, Mathew [mailto:Manoj.Mathew@;principal.com]
> Sent: 28 October 2002 20:02
> To: Cactus Users List
> Subject: config of struts with cactus
> 
> 
> Hi
>  Is the Cactus latest ver is compatible with Jakarta struts 1.0  ?

yes and with any version of Struts as it is completely independent of
struts.

> 
> Mat
> -Original Message-
> From: Taylor,Timothy L. [mailto:ttaylor@;mitre.org]
> Sent: Monday, October 28, 2002 1:57 PM
> To: Cactus Users List
> Subject: Re: Junit Vs Jtest
> 
> 
> One thing to point out is that JTest can run JUnit tests, so you loose
> nothing by starting with JUnit (which is free), and then if you want
to
> eventually move to JTest, the time invested in writing JUnit tests
won't
> have been wasted.
> - Tim
> 
> Larry Tambascio wrote:
> 
> > You should check out the archive for the JUnit mail list!! Back in
> > early September there was a great many messages about this very
> > topic.  I won't even attempt to summarize.
> >
> > Later,
> > -Larry
> >
> > On Tue, 15 Oct 2002 22:01:08 -0700 (PDT)
> >  Prabodh Goel <[EMAIL PROTECTED]> wrote:
> >
> >>
> >> Hi Guys,
> >>
> >> Does anyone know which is better for unit testing
> >> Jtest or Junit ? and Why ?
> >>
> >> regards,
> >> Prabodh
> >>
> >>
> >> __
> >> Do you Yahoo!?
> >> Faith Hill - Exclusive Performances, Videos & More
> >> http://faith.yahoo.com
> >>
> >> --
> >> To unsubscribe, e-mail:
> >>  
> >> For additional commands, e-mail:
> >> 
> >>
> >
> >
> > --
> > To unsubscribe, e-mail:
> > 
> > For additional commands, e-mail:
> > 
> >
> 
> 
> 
> --
> 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]>



--
To unsubscribe, e-mail:   
For additional commands, e-mail: 


--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




tomcat 4.0.3

2002-10-31 Thread Vikas Malla

Vincent:
I was following the link http://jakarta.apache.org/cactus/testedon.html, for the list 
of software cactus has been tested on. The list doesn't include tomcat 4.0.3, so I 
wanted to ask whether there could be some vulnerabilities associated with me choosing 
4.0.3 for my in-container testing. Please let me know if you are aware of any known 
issues with cactus 1.4.1 and tomcat 4.0.3. And why was 4.0.3 not considered?
Thanks.
Post your ad on Yahoo! India Autos.Check out the used Maruti, Fiat and Ford models on 
sale now.


RE: Error instantiating class - the classes are definitely only in the war

2002-10-31 Thread Vincent Massol
Hi Aaron,

Could you provide us with the full stack trace you're getting and with
Cactus logs?

You're 100% sure you don't have any cactus jar in your system CLASSPATH
(i.e. the CP that you use when starting WL)?

Note: There should not be any problem. I'm doing exactly the same thing
on a project where we use WL 6.1.

Thanks
-Vincent

> -Original Message-
> From: Aaron Robinson [mailto:aaronrobinson67@;hotmail.com]
> Sent: 28 October 2002 10:33
> To: [EMAIL PROTECTED]
> Subject: Error instantiating class - the classes are definitely only
in
> the war
> 
> Getting an "Error instantiating class" error when trying to run a
cactus
> test using with WebLogic 6.1
> 
> The test I have created is very simple, it has a single test method
that
> is
> empty.
> 
> If this test case extends the cactus ServletTestCase class directly
> everything works okay.
> 
> I get the above error when introducing a class between the
ServletTestCase
> and my test case...
> 
> -
> |ServletTestCase|
> -
>/\
> |
> |
> |--|
> |BaseCactusTestCase|
> |--|
>/\
> |
> |
> |--|
> |MyTestCase|
> |--|
> 
> I have read through previous posts and this error occurs when the test
> case
> can be found in more than oe place.
> 
> My ear contains a war and a number of utility jars. Only the war
contains
> the BaseCactusTestCase and MyTestCase.
> 
> The war has the following structure...
> 
> web-inf
>   weblogic.xml
>   web.xml
>   classes
> com
>foo
>   bar
>  MyTestCase.class
>   utility
>  stuff
> BaseCactusTestCase.class
> meta-inf
>   Manifest.mf
> 
> ...and other log4j jars etc
> 
> Any help very much appreciated
> 
> 
> _
> Surf the Web without missing calls! Get MSN Broadband.
> http://resourcecenter.msn.com/access/plans/freeactivation.asp
> 
> 
> --
> To unsubscribe, e-mail:    [EMAIL PROTECTED]>
> For additional commands, e-mail:  [EMAIL PROTECTED]>



--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




RE: config of struts with cactus

2002-10-31 Thread Vincent Massol


> -Original Message-
> From: Manoj, Mathew [mailto:Manoj.Mathew@;principal.com]
> Sent: 28 October 2002 20:02
> To: Cactus Users List
> Subject: config of struts with cactus
> 
> 
> Hi
>  Is the Cactus latest ver is compatible with Jakarta struts 1.0  ?

yes and with any version of Struts as it is completely independent of
struts.

> 
> Mat
> -Original Message-
> From: Taylor,Timothy L. [mailto:ttaylor@;mitre.org]
> Sent: Monday, October 28, 2002 1:57 PM
> To: Cactus Users List
> Subject: Re: Junit Vs Jtest
> 
> 
> One thing to point out is that JTest can run JUnit tests, so you loose
> nothing by starting with JUnit (which is free), and then if you want
to
> eventually move to JTest, the time invested in writing JUnit tests
won't
> have been wasted.
> - Tim
> 
> Larry Tambascio wrote:
> 
> > You should check out the archive for the JUnit mail list!! Back in
> > early September there was a great many messages about this very
> > topic.  I won't even attempt to summarize.
> >
> > Later,
> > -Larry
> >
> > On Tue, 15 Oct 2002 22:01:08 -0700 (PDT)
> >  Prabodh Goel <[EMAIL PROTECTED]> wrote:
> >
> >>
> >> Hi Guys,
> >>
> >> Does anyone know which is better for unit testing
> >> Jtest or Junit ? and Why ?
> >>
> >> regards,
> >> Prabodh
> >>
> >>
> >> __
> >> Do you Yahoo!?
> >> Faith Hill - Exclusive Performances, Videos & More
> >> http://faith.yahoo.com
> >>
> >> --
> >> To unsubscribe, e-mail:
> >>  
> >> For additional commands, e-mail:
> >> 
> >>
> >
> >
> > --
> > To unsubscribe, e-mail:
> > 
> > For additional commands, e-mail:
> > 
> >
> 
> 
> 
> --
> 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]>



--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




RE: followRedirects is false

2002-10-31 Thread Vincent Massol


> -Original Message-
> From: Charlene Mitchell [mailto:charlene_ml@;yahoo.co.uk]
> Sent: 31 October 2002 13:10
> To: Cactus Users List
> Subject: RE: followRedirects is false
> 
> Thanks (yet again) for the reply.
> 
> What I am trying to achieve is actually very simple
> (at the moment).
> 
> For example, I have a method 'getData()' in an EJB, I
> simply want to call this method using Cactus and
> assert whether I get
>   a) data (ok)
>   b) null (fail)
>   c) exception (fail)
> (the Cactus code is written, and looks/compiles fine -
> so no problems there).
> 
> I don't want to test http codes, I don't want to test
> authentication, I just want to test a method.

Hey great. That's exactly the goal of Cactus! :-)

> 
> Since the normal EJB 'getData()' method cannot be
> invoked unless a valid user is logged in to the
> application (due to standard method-level J2EE
> security constraints within ejb-jar.xml), this means
> that the Cactus test also needs a valid user logged in
> (else I will get an authentication exception).

Ah ok. I understand now.

> 
> So, for me, typing the uid/pwd in a login web-page is
> enough, I do not need FormAuthentication class (though
> at the same time I have downloaded the nightly build
> jakarta-cactus-13-20021022.zip and am also trying from
> Ant, but that's another story.)
> 
> So, what happens at the moment is that I type the URL
> of the TestCase in my browser, the Web/AppServer
> decides that I am trying to access a protected
> resource and redirects me to a logon page, I then type
> in my uid/pwd, and then instead of being redirected
> back to the TestCase (now that I am allowed to execute
> it), I see the 302 errors.

Ok. I see. There's much simpler I think. As you say your goal is not to
test authentication. Here's what I would recommend:

- set up your web.xml to use BASIC authentication on the Cactus
redirector.Ex:



 
SecurityRestriction
Protect the Cactus redirector
servlet.
/ServletRedirector
GET
POST


Authorized Users Group
test


NONE




BASIC



Test role
test


- configure your application server to map this role to a physical user
and to pass the credential to the EJB layer
- in beginXXX(), use the BasicAuthentication

request.setAuthentication(
new BasicAuthentication("testuser", "testpassword"));

- start the test from wherever you wish: browser, Ant, etc.

Thus no need to sign in, no need to have login page, no need for an
error page, etc.

That's all!

Hope it helps,
-Vincent

> 
> Charlene
> 
>  --- Vincent Massol <[EMAIL PROTECTED]> wrote: >
> >
> > > -Original Message-
> > > From: Charlene Mitchell
> > [mailto:charlene_ml@;yahoo.co.uk]
> > > Sent: 31 October 2002 10:28
> > > To: Cactus Users List
> > > Subject: RE: followRedirects is false
> > >
> > > Hi,
> > >
> > > Thanks for the replies - much appreciated.
> > >
> > > > Following redirect is off in Cactus as Cactus is
> > a
> > > > unit testing tool.
> > > > Thus the idea is that if one of your method on
> > the
> > > > server side returns a
> > > > 302 HTTP response you should be able to assert
> > that
> > > > in endXXX().
> > >
> > > I'm sorry, I don't understand what you mean here.
> > > It is JBoss that is returning a 302 response, not
> > my
> > > application, after redirecting from my test to the
> > > login page and then (presumably) trying to
> > redirect
> > > back to the test.
> >
> > Sorry, my turn to not understand. What do you want
> > to do:
> > 1/ Test that when you access a protected resource,
> > you get a 302
> > or
> > 2/ Do a test on a protected resource (the cactus
> > redirector) and you
> > want to perform Form Authentication in Cactus so
> > that you can test code
> > that uses the security API (isUserInRole(), etc) ?
> >
> > If 2, then you need to use the cactus code in CVS as
> > this is not in
> > Cactus 1.4.1. In addition, there was a bug fixed
> > recently for Form
> > Authentication.
> >
> > >
> > > > That said some persons have expressed a wish to
> > make
> > > > that configurable
> > > > so that follow redirects could be turned on. I
> > think
> > > > it's a good idea. I
> > > > someone wants to submit a patch... :-)
> > > >
> > > > You mention a browser error. How do you start
> > the
> > > > test?
> > >
> > > I simply type the URL in my browser as follows:
> > > http://localhost:19201/myapp-
> > >
> >
> ejbtest/ServletTestRunner?suite=my.package.MyBeanTest
> > >
> >
> > That's fine.
> >
> > > The web.xml file knows to redirect all requests to
> > a
> > > login page where I type my username and password
> > and
> > > then I expect to be redirected back to the test.
> > > This is how the application itself works when you
> > > request a web-page before authenticating so I
> > assumed

RE: followRedirects is false

2002-10-31 Thread EPugh
If you are doing tests that require lots of that type of logic, have you
looked at WebTest?  (webtest.canoo.com).  While not a direct "Unit" test per
se, you can set up unit style tests, and it makes web testing very easy...

Eric

-Original Message-
From: Charlene Mitchell [mailto:charlene_ml@;yahoo.co.uk]
Sent: Thursday, October 31, 2002 8:10 AM
To: Cactus Users List
Subject: RE: followRedirects is false


Thanks (yet again) for the reply.

What I am trying to achieve is actually very simple
(at the moment).

For example, I have a method 'getData()' in an EJB, I
simply want to call this method using Cactus and
assert whether I get 
  a) data (ok)
  b) null (fail)
  c) exception (fail)
(the Cactus code is written, and looks/compiles fine -
so no problems there).

I don't want to test http codes, I don't want to test
authentication, I just want to test a method.

Since the normal EJB 'getData()' method cannot be
invoked unless a valid user is logged in to the
application (due to standard method-level J2EE
security constraints within ejb-jar.xml), this means
that the Cactus test also needs a valid user logged in
(else I will get an authentication exception).

So, for me, typing the uid/pwd in a login web-page is
enough, I do not need FormAuthentication class (though
at the same time I have downloaded the nightly build
jakarta-cactus-13-20021022.zip and am also trying from
Ant, but that's another story.)

So, what happens at the moment is that I type the URL
of the TestCase in my browser, the Web/AppServer
decides that I am trying to access a protected
resource and redirects me to a logon page, I then type
in my uid/pwd, and then instead of being redirected
back to the TestCase (now that I am allowed to execute
it), I see the 302 errors.

Charlene

 --- Vincent Massol <[EMAIL PROTECTED]> wrote: > 
> 
> > -Original Message-
> > From: Charlene Mitchell
> [mailto:charlene_ml@;yahoo.co.uk]
> > Sent: 31 October 2002 10:28
> > To: Cactus Users List
> > Subject: RE: followRedirects is false
> > 
> > Hi,
> > 
> > Thanks for the replies - much appreciated.
> > 
> > > Following redirect is off in Cactus as Cactus is
> a
> > > unit testing tool.
> > > Thus the idea is that if one of your method on
> the
> > > server side returns a
> > > 302 HTTP response you should be able to assert
> that
> > > in endXXX().
> > 
> > I'm sorry, I don't understand what you mean here.
> > It is JBoss that is returning a 302 response, not
> my
> > application, after redirecting from my test to the
> > login page and then (presumably) trying to
> redirect
> > back to the test.
> 
> Sorry, my turn to not understand. What do you want
> to do:
> 1/ Test that when you access a protected resource,
> you get a 302
> or
> 2/ Do a test on a protected resource (the cactus
> redirector) and you
> want to perform Form Authentication in Cactus so
> that you can test code
> that uses the security API (isUserInRole(), etc) ?
> 
> If 2, then you need to use the cactus code in CVS as
> this is not in
> Cactus 1.4.1. In addition, there was a bug fixed
> recently for Form
> Authentication.
> 
> > 
> > > That said some persons have expressed a wish to
> make
> > > that configurable
> > > so that follow redirects could be turned on. I
> think
> > > it's a good idea. I
> > > someone wants to submit a patch... :-)
> > >
> > > You mention a browser error. How do you start
> the
> > > test?
> > 
> > I simply type the URL in my browser as follows:
> > http://localhost:19201/myapp-
> >
>
ejbtest/ServletTestRunner?suite=my.package.MyBeanTest
> > 
> 
> That's fine.
> 
> > The web.xml file knows to redirect all requests to
> a
> > login page where I type my username and password
> and
> > then I expect to be redirected back to the test.
> > This is how the application itself works when you
> > request a web-page before authenticating so I
> assumed
> > that the test could work the same way.
> 
> It can (see above).
> 
> > 
> > I will also try testing from within Ant, as you
> > suggested (thanks for that), but I'm also
> interested
> > in getting it working from the browser too.
> 
> Yes, although it won't work. You need to use the
> Cactus version in CVS
> (or a recent nightly build).
> 
> I'm not sure what your question is in the end. Is
> it: "I would like to
> protect the Cactus redirector using Form based
> authentication so that I
> can unit test code that uses the servlet security
> API" ?
> 
> BTW, with Cactus 1.4.1 you can use
> BasicAuthentication and it should be
> transparent for the code using the servlet security
> API. But if what you
> wish to test in integration is your setting of the
> Form authentication
> then you need Cactus 1.5
> 
> Cheers,
> -Vincent
> 
> > 
> > Thanks
> > 
> > Charlene
> > 
> > > > -Original Message-
> > > > From: Charlene Mitchell
> > > [mailto:charlene_ml@;yahoo.co.uk]
> > > > Sent: 29 October 2002 13:26
> > > > To: [EMAIL PROTECTED]
> > > > Subject: followRedirects is false
> > > >
> > > > Hi,
> > > >

RE: followRedirects is false

2002-10-31 Thread Charlene Mitchell
Thanks (yet again) for the reply.

What I am trying to achieve is actually very simple
(at the moment).

For example, I have a method 'getData()' in an EJB, I
simply want to call this method using Cactus and
assert whether I get 
  a) data (ok)
  b) null (fail)
  c) exception (fail)
(the Cactus code is written, and looks/compiles fine -
so no problems there).

I don't want to test http codes, I don't want to test
authentication, I just want to test a method.

Since the normal EJB 'getData()' method cannot be
invoked unless a valid user is logged in to the
application (due to standard method-level J2EE
security constraints within ejb-jar.xml), this means
that the Cactus test also needs a valid user logged in
(else I will get an authentication exception).

So, for me, typing the uid/pwd in a login web-page is
enough, I do not need FormAuthentication class (though
at the same time I have downloaded the nightly build
jakarta-cactus-13-20021022.zip and am also trying from
Ant, but that's another story.)

So, what happens at the moment is that I type the URL
of the TestCase in my browser, the Web/AppServer
decides that I am trying to access a protected
resource and redirects me to a logon page, I then type
in my uid/pwd, and then instead of being redirected
back to the TestCase (now that I am allowed to execute
it), I see the 302 errors.

Charlene

 --- Vincent Massol <[EMAIL PROTECTED]> wrote: > 
> 
> > -Original Message-
> > From: Charlene Mitchell
> [mailto:charlene_ml@;yahoo.co.uk]
> > Sent: 31 October 2002 10:28
> > To: Cactus Users List
> > Subject: RE: followRedirects is false
> > 
> > Hi,
> > 
> > Thanks for the replies - much appreciated.
> > 
> > > Following redirect is off in Cactus as Cactus is
> a
> > > unit testing tool.
> > > Thus the idea is that if one of your method on
> the
> > > server side returns a
> > > 302 HTTP response you should be able to assert
> that
> > > in endXXX().
> > 
> > I'm sorry, I don't understand what you mean here.
> > It is JBoss that is returning a 302 response, not
> my
> > application, after redirecting from my test to the
> > login page and then (presumably) trying to
> redirect
> > back to the test.
> 
> Sorry, my turn to not understand. What do you want
> to do:
> 1/ Test that when you access a protected resource,
> you get a 302
> or
> 2/ Do a test on a protected resource (the cactus
> redirector) and you
> want to perform Form Authentication in Cactus so
> that you can test code
> that uses the security API (isUserInRole(), etc) ?
> 
> If 2, then you need to use the cactus code in CVS as
> this is not in
> Cactus 1.4.1. In addition, there was a bug fixed
> recently for Form
> Authentication.
> 
> > 
> > > That said some persons have expressed a wish to
> make
> > > that configurable
> > > so that follow redirects could be turned on. I
> think
> > > it's a good idea. I
> > > someone wants to submit a patch... :-)
> > >
> > > You mention a browser error. How do you start
> the
> > > test?
> > 
> > I simply type the URL in my browser as follows:
> > http://localhost:19201/myapp-
> >
>
ejbtest/ServletTestRunner?suite=my.package.MyBeanTest
> > 
> 
> That's fine.
> 
> > The web.xml file knows to redirect all requests to
> a
> > login page where I type my username and password
> and
> > then I expect to be redirected back to the test.
> > This is how the application itself works when you
> > request a web-page before authenticating so I
> assumed
> > that the test could work the same way.
> 
> It can (see above).
> 
> > 
> > I will also try testing from within Ant, as you
> > suggested (thanks for that), but I'm also
> interested
> > in getting it working from the browser too.
> 
> Yes, although it won't work. You need to use the
> Cactus version in CVS
> (or a recent nightly build).
> 
> I'm not sure what your question is in the end. Is
> it: "I would like to
> protect the Cactus redirector using Form based
> authentication so that I
> can unit test code that uses the servlet security
> API" ?
> 
> BTW, with Cactus 1.4.1 you can use
> BasicAuthentication and it should be
> transparent for the code using the servlet security
> API. But if what you
> wish to test in integration is your setting of the
> Form authentication
> then you need Cactus 1.5
> 
> Cheers,
> -Vincent
> 
> > 
> > Thanks
> > 
> > Charlene
> > 
> > > > -Original Message-
> > > > From: Charlene Mitchell
> > > [mailto:charlene_ml@;yahoo.co.uk]
> > > > Sent: 29 October 2002 13:26
> > > > To: [EMAIL PROTECTED]
> > > > Subject: followRedirects is false
> > > >
> > > > Hi,
> > > >
> > > > I have a secure EJB application running on
> > > > JBoss3.0.3/Jetty and I'm trying to integrate
> some
> > > > Cactus Unit Tests. I have read the docs and
> > > created a
> > > > sample EJB Test, deployed it in a war and
> added
> > > > security to the web.xml so that I can
> authenticate
> > > and
> > > > run the tests from a browser.
> > > >
> > > > ..but after I log in I get a page back
> indicating
> > >

RE: FormAuthentication

2002-10-31 Thread Vincent Massol
Hi Jason/Michael,

I don't believe HTTPS will work with the current version of Cactus.
We're using HttpClient to make the connection to the server side. Thus
the first thing to look at is how to enable HTTPS in httpclient. I think
we need additional jars (jsse.jar and one or 2 others). Then we may need
to change a few lines in Cactus code to allow this.

Who wants to submit a patch? :-)

Note: It's a nice to have feature but I don't believe it has any impact
on unit testing any part of the code.

Thanks
-Vincent

> -Original Message-
> From: Robertson, Jason [mailto:Jason.Robertson@;acs-inc.com]
> Sent: 29 October 2002 15:37
> To: 'Cactus Users List'
> Subject: RE: FormAuthentication
> 
> Here's my "SimpleFormLogin" project. This is project source, so look
into
> the build.xml file and adjust the "" section to fit
your
> setup.
> 
> As far as I know, form authentication over https shouldn't be a
problem as
> it's really not much different than any other form submission. As long
as
> the server is setup right and the context URL has https I'd assume it
> would
> all work, but I've never tested it.
> 
> Jason
> 
> -Original Message-
> From: Koegel, Michael [mailto:Michael.Koegel@;partner.commerzbank.com]
> Sent: Tuesday, October 29, 2002 3:23 AM
> To: Cactus Users List
> Subject: AW: FormAuthentication
> 
> 
> Hi Jason,
> 
> I would also be interested in this FormAuthentication Example.
> I didn't follow the discussion closely the last couple weeks is it
also
> possible to test form based login with https?
> 
> Regards,
>  Michael
> 
> -Ursprüngliche Nachricht-
> Von: Robertson, Jason [mailto:Jason.Robertson@;acs-inc.com]
> Gesendet am: Montag, 28. Oktober 2002 21:35
> An: 'Cactus Users List'
> Betreff: RE: FormAuthentication
> 
> I think this is a good solution. Separate WAR files is the only way I
know
> of to use different authentication techniques.
> 
> Plus, the side effect of making a clearer separation between the
example
> and
> the unit tests I agree is a good thing.
> 
> Do you want my test app? It's just a very simple web app with pages to
do
> the form authentication as well, so you have a 2nd avenue to test
> configuration if you're having troubles with cactus. Its the one I
used to
> test Tomcat and WLS. I'm sure it can be easily adapted to any other
J2EE
> server. Let me know and I'll try to bundle it up.
> 
> Jason
> 
> -Original Message-
> From: Vincent Massol [mailto:vmassol@;octo.com]
> Sent: Saturday, October 26, 2002 2:12 PM
> To: 'Cactus Users List'
> Cc: [EMAIL PROTECTED]; [EMAIL PROTECTED]
> Subject: RE: FormAuthentication
> 
> 
> Hi Jason/Pranab,
> 
> Thank you both for the good analysis! There are indeed 2 bugs you have
> found:
> - one with the FormAuthentication using only the default redirector
> - one with the HttpClient fetching the test result using only the
> default redirector
> 
> I have now fixed (hopefully) both bugs in CVS. You can check the CVS
> commit emails if you wish to see what I have modified. I would be
happy
> to know if you agree with my changes... :-)
> 
> However, there is still something missing which I was not able to
code:
> it is a test for the FormAuthentication class. The problem is that
> apparently you can only have one method of authentication in a given
> webapp and ATM the sample webapp is using Basic authentication... Thus
> we cannot easily add one more test for testing Jason's
> FormaAuthentication code ... I was pondering about what route to take
> for that. Any idea?
> 
> One solution would be to have several webapp of course and more
> specifically to have the following directory structure in CVS:
> 
> jakarta-cactus
>   |_ [...]
>   |_ servlet-sample
>   |_ servlet-unit
> 
> servlet-sample: contains only the org.apache.cactus.sample.* packages.
> It is the sample application.
> 
> servlet-unit: contains only the org.apache.cactus.unit.* packages. The
> goal of this application is to offer a full regression test suite for
> Cactus. It is not a sample application per see. The idea would then be
> to have a build file that produces 3 wars: one test.war (no
> authentication tests), one test-basic.war (basic authentication tests)
> and one test-form.war (form-based authentication tests).
> 
> Note: Some persons have told me it was difficult to understand the
> differences between the unit/ and sample/ directories in the
> servlet-sample project. That would solve the problem.
> 
> What do you think?
> 
> Thanks
> -Vincent
> 
> > -Original Message-
> > From: Robertson, Jason [mailto:Jason.Robertson@;acs-inc.com]
> > Sent: 26 October 2002 15:40
> > To: 'Cactus Users List'
> > Subject: RE: FormAuthentication
> >
> > Time for Vincent to chime in!
> >
> > Vincent, Pranab's comments below show that there's a problem in the
> > reconfiguring of the Redirector in that you can configure it in two
> > places:
> > in WebRequest and in cactus.properties, but only the latter is
> persistent
> > between callRunTest and c

RE: Struts testing problem

2002-10-31 Thread Vincent Massol
Hi Erik,

Sorry for taking so long to answer...

Here's the implementation of Cactus of getServletPath():

public String getServletPath()
{
String result;

if (this.url != null)
{
result = this.url.getServletPath();
LOGGER.debug("Using simulated servlet path : [" + result +
"]");
}
else
{
result = this.request.getServletPath();
}

return result;
}

What it means is that if you have used the WebRequest.setURL() API,
Cactus will return the servlet path you have specified in there. If not,
it will return the servlet path of the real original Http request
(that's the " this.request.getServletPath();" code).

Thus, I don't think this comes from Cactus. However, as you can see from
the code above, if you turn debugging on for Cactus you will get the
"Using simulated servlet path :[...]" string printed in the log if
you're using the setURL() API.

It may also be a problem in StrutsTestCase but then we need to ask that
project as I'm unfortunately not following it. 

Hope it helps,

Thanks and sorry for the trouble.
-Vincent

> -Original Message-
> From: Erik Hatcher [mailto:jakarta-struts@;ehatchersolutions.com]
> Sent: 29 October 2002 13:54
> To: [EMAIL PROTECTED]
> Subject: Struts testing problem
> 
> Below is part of an e-mail thread from the struts-dev list.
> 
> Here's the situation - I upgraded to a nightly build of Struts, and
that
> is the only change.  On Struts 1.1b2 all our Cactus tests succeeded,
but
> with the nightly build (20021028) they all failed.  Logically you'd
> think the problem was with Struts, but our application still worked in
> the browser just fine.  Digging a bit deeper, a change was made in
part
> of the request handling of Struts to call:
> 
>   request.getServletPath();
> 
> With Struts debugging enabled, I see this is returning "/something.do"
> when running through a web browser, but is returning "" when running
> through Cactus.
> 
> To further confuse issues, I'm using StrutsTestCase on top of Cactus.
> 
> I'm assuming something is misconfigured in the Cactus side of things
> either with our code or in the StrutsTestCase framework (which may
need
> some adjustments for the Struts code changes).
> 
> Any clues?
> 
> Thanks,
>   Erik
> 
> 
>  Original Message 
> Subject: Re: Nightly build issue
> Date: Mon, 28 Oct 2002 16:17:11 -0600
> From: Erik Hatcher <[EMAIL PROTECTED]>
> To: Struts Developers List <[EMAIL PROTECTED]>
> References: <[EMAIL PROTECTED]>
> <[EMAIL PROTECTED]>
> <[EMAIL PROTECTED]> <[EMAIL PROTECTED]>
> 
> Eddie Bush wrote:
>  > Can you verify your assumption with the logging output?  It should
say
>  > what the value of matchPath is.  This would be a debug-level
logging
>  > statment indicated by a line stating:
>  >
>  > Selecting module for path 
> 
> After getting the logging opened up, my results are  is ""
> (blank, not null) when running through Cactus/StrutsTestCase, but not
> when running through a browser.  Odd.  I guess this is not a Struts
> issue per se.  I'll take this up on the Cactus list when I get a
chance.
> 
>   Erik
> 
> 
> 
> 
> 
> --
> To unsubscribe, e-mail:    [EMAIL PROTECTED]>
> For additional commands, e-mail:  [EMAIL PROTECTED]>



--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




RE: cactus 1.4 with struts1.0

2002-10-31 Thread Vincent Massol
Hi Manoj,

Cactus has no dependency on any version of Struts and it works with all
the past ones and all the future ones to come ;-)

If you're talking about StrutsTestCase that's another story but I can't
help you here as StrutsTestCase is another project (it is on
SourceForge). Maybe you should send an email to their list?

Cheers,
-Vincent

> -Original Message-
> From: Manoj, Mathew [mailto:Manoj.Mathew@;principal.com]
> Sent: 29 October 2002 15:40
> To: Cactus Users List
> Subject: cactus 1.4 with struts1.0
> 
> 
> Hi
> I would like to know , this combination works or not.,.When i tried to
do
> it i learned that there are some changes in the package names in the
> latest version of cactus and will work only wiht struts 1.1B.
> Manoj
> 
> --
> To unsubscribe, e-mail:    [EMAIL PROTECTED]>
> For additional commands, e-mail:  [EMAIL PROTECTED]>



--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




RE: followRedirects is false

2002-10-31 Thread Vincent Massol


> -Original Message-
> From: Charlene Mitchell [mailto:charlene_ml@;yahoo.co.uk]
> Sent: 31 October 2002 10:28
> To: Cactus Users List
> Subject: RE: followRedirects is false
> 
> Hi,
> 
> Thanks for the replies - much appreciated.
> 
> > Following redirect is off in Cactus as Cactus is a
> > unit testing tool.
> > Thus the idea is that if one of your method on the
> > server side returns a
> > 302 HTTP response you should be able to assert that
> > in endXXX().
> 
> I'm sorry, I don't understand what you mean here.
> It is JBoss that is returning a 302 response, not my
> application, after redirecting from my test to the
> login page and then (presumably) trying to redirect
> back to the test.

Sorry, my turn to not understand. What do you want to do:
1/ Test that when you access a protected resource, you get a 302
or
2/ Do a test on a protected resource (the cactus redirector) and you
want to perform Form Authentication in Cactus so that you can test code
that uses the security API (isUserInRole(), etc) ?

If 2, then you need to use the cactus code in CVS as this is not in
Cactus 1.4.1. In addition, there was a bug fixed recently for Form
Authentication.

> 
> > That said some persons have expressed a wish to make
> > that configurable
> > so that follow redirects could be turned on. I think
> > it's a good idea. I
> > someone wants to submit a patch... :-)
> >
> > You mention a browser error. How do you start the
> > test?
> 
> I simply type the URL in my browser as follows:
> http://localhost:19201/myapp-
> ejbtest/ServletTestRunner?suite=my.package.MyBeanTest
> 

That's fine.

> The web.xml file knows to redirect all requests to a
> login page where I type my username and password and
> then I expect to be redirected back to the test.
> This is how the application itself works when you
> request a web-page before authenticating so I assumed
> that the test could work the same way.

It can (see above).

> 
> I will also try testing from within Ant, as you
> suggested (thanks for that), but I'm also interested
> in getting it working from the browser too.

Yes, although it won't work. You need to use the Cactus version in CVS
(or a recent nightly build).

I'm not sure what your question is in the end. Is it: "I would like to
protect the Cactus redirector using Form based authentication so that I
can unit test code that uses the servlet security API" ?

BTW, with Cactus 1.4.1 you can use BasicAuthentication and it should be
transparent for the code using the servlet security API. But if what you
wish to test in integration is your setting of the Form authentication
then you need Cactus 1.5

Cheers,
-Vincent

> 
> Thanks
> 
> Charlene
> 
> > > -Original Message-
> > > From: Charlene Mitchell
> > [mailto:charlene_ml@;yahoo.co.uk]
> > > Sent: 29 October 2002 13:26
> > > To: [EMAIL PROTECTED]
> > > Subject: followRedirects is false
> > >
> > > Hi,
> > >
> > > I have a secure EJB application running on
> > > JBoss3.0.3/Jetty and I'm trying to integrate some
> > > Cactus Unit Tests. I have read the docs and
> > created a
> > > sample EJB Test, deployed it in a war and added
> > > security to the web.xml so that I can authenticate
> > and
> > > run the tests from a browser.
> > >
> > > ..but after I log in I get a page back indicating
> > an
> > > error as follows:
> > > BROWSER ERROR
> > > =
> > > "Failed to get the test results. This is probably
> > due
> > > to an error that happened on the server side when
> > > trying to execute the tests. Here is what was
> > returned
> > > by the server : []"
> > >
> > > This tells me nothing so I look in the JBoss log
> > and I
> > > see the following:
> > > JBOSS ERROR
> > > ===
> > > INFO  [wire] >> "Content-type:
> > > application/x-www-form-urlencoded"
> > > INFO  [wire] >> "Host: localhost"
> > > INFO  [wire] >> "User-Agent: Jakarta HTTP
> > > Client/2.0.0a1"
> > > INFO  [wire] >> \r\n
> > > INFO  [wire] << "HTTP/1.1 302 Moved Temporarily"
> > > [\r\n]
> > > INFO  [wire] << "Date: Tue, 29 Oct 2002 08:16:09
> > GMT"
> > > [\r\n]
> > > INFO  [wire] << "Server: Jetty/4.1.0 (SunOS 5.8
> > > sparc)" [\r\n]
> > > INFO  [wire] << "Servlet-Engine: Jetty/4.1.0
> > (Servlet
> > > 2.3; JSP 1.2; java 1.4.0_01)" [\r\n]
> > > INFO  [wire] << "Set-Cookie:
> > > JSESSIONID=bsp7oiipqikl7;Path=/myapp-ejbtest"
> > [\r\n]
> > > INFO  [wire] << "Set-Cookie2:
> > >
> >
> JSESSIONID=bsp7oiipqikl7;Version=1;Path=/myapp-ejbtest;Discard"
> > > [\r\n]
> > > INFO  [wire] << "Location:
> > >
> >
> http://localhost/myapp-ejbtest/login.html;JSESSIONID=bsp7oiipqikl7";
> > > [\r\n]
> > > INFO  [wire] << "Transfer-Encoding: chunked"
> > [\r\n]
> > > INFO  [HttpMethod] HttpMethodBase.execute():
> > Received
> > > 302 response, but followRedirects is false.
> > Returning
> > > 302.
> > >
> > > The WebServer doesn't indicate any error as such:
> > > WEB SERVER ERROR
> > > 
> > > "POST /myapp-ejbtest/j_security_check HTTP/1.1"
> > 302 0
> > >
> >
>

RE: followRedirects is false

2002-10-31 Thread Charlene Mitchell
Hi,

Thanks for the replies - much appreciated. 

> Following redirect is off in Cactus as Cactus is a
> unit testing tool.
> Thus the idea is that if one of your method on the
> server side returns a
> 302 HTTP response you should be able to assert that
> in endXXX().

I'm sorry, I don't understand what you mean here.
It is JBoss that is returning a 302 response, not my
application, after redirecting from my test to the
login page and then (presumably) trying to redirect
back to the test.

> That said some persons have expressed a wish to make
> that configurable
> so that follow redirects could be turned on. I think
> it's a good idea. I
> someone wants to submit a patch... :-)
> 
> You mention a browser error. How do you start the
> test?

I simply type the URL in my browser as follows:
http://localhost:19201/myapp-ejbtest/ServletTestRunner?suite=my.package.MyBeanTest

The web.xml file knows to redirect all requests to a
login page where I type my username and password and
then I expect to be redirected back to the test.
This is how the application itself works when you
request a web-page before authenticating so I assumed
that the test could work the same way.

I will also try testing from within Ant, as you
suggested (thanks for that), but I'm also interested
in getting it working from the browser too.

Thanks

Charlene

> > -Original Message-
> > From: Charlene Mitchell
> [mailto:charlene_ml@;yahoo.co.uk]
> > Sent: 29 October 2002 13:26
> > To: [EMAIL PROTECTED]
> > Subject: followRedirects is false
> > 
> > Hi,
> > 
> > I have a secure EJB application running on
> > JBoss3.0.3/Jetty and I'm trying to integrate some
> > Cactus Unit Tests. I have read the docs and
> created a
> > sample EJB Test, deployed it in a war and added
> > security to the web.xml so that I can authenticate
> and
> > run the tests from a browser.
> > 
> > ..but after I log in I get a page back indicating
> an
> > error as follows:
> > BROWSER ERROR
> > =
> > "Failed to get the test results. This is probably
> due
> > to an error that happened on the server side when
> > trying to execute the tests. Here is what was
> returned
> > by the server : []"
> > 
> > This tells me nothing so I look in the JBoss log
> and I
> > see the following:
> > JBOSS ERROR
> > ===
> > INFO  [wire] >> "Content-type:
> > application/x-www-form-urlencoded"
> > INFO  [wire] >> "Host: localhost"
> > INFO  [wire] >> "User-Agent: Jakarta HTTP
> > Client/2.0.0a1"
> > INFO  [wire] >> \r\n
> > INFO  [wire] << "HTTP/1.1 302 Moved Temporarily"
> > [\r\n]
> > INFO  [wire] << "Date: Tue, 29 Oct 2002 08:16:09
> GMT"
> > [\r\n]
> > INFO  [wire] << "Server: Jetty/4.1.0 (SunOS 5.8
> > sparc)" [\r\n]
> > INFO  [wire] << "Servlet-Engine: Jetty/4.1.0
> (Servlet
> > 2.3; JSP 1.2; java 1.4.0_01)" [\r\n]
> > INFO  [wire] << "Set-Cookie:
> > JSESSIONID=bsp7oiipqikl7;Path=/myapp-ejbtest"
> [\r\n]
> > INFO  [wire] << "Set-Cookie2:
> >
>
JSESSIONID=bsp7oiipqikl7;Version=1;Path=/myapp-ejbtest;Discard"
> > [\r\n]
> > INFO  [wire] << "Location:
> >
>
http://localhost/myapp-ejbtest/login.html;JSESSIONID=bsp7oiipqikl7";
> > [\r\n]
> > INFO  [wire] << "Transfer-Encoding: chunked"
> [\r\n]
> > INFO  [HttpMethod] HttpMethodBase.execute():
> Received
> > 302 response, but followRedirects is false.
> Returning
> > 302.
> > 
> > The WebServer doesn't indicate any error as such:
> > WEB SERVER ERROR
> > 
> > "POST /myapp-ejbtest/j_security_check HTTP/1.1"
> 302 0
> >
>
"http://localhost:19201/myapp-ejbtest/login.html;JSESSIONID=bsp7oiipqikl
> 7"
> > "Mozilla/4.0 (compatible; MSIE 5.5; Windows NT
> 4.0)"
> > "GET
> > /myapp-
> >
>
ejbtest/ServletRedirector?Cactus_TestMethod=testConvert&Cactus_TestClass
> =m
> >
>
y.package.MyBeanTest&Cactus_AutomaticSession=true&Cactus_Service=CALL_TE
> ST
> > HTTP/1.1" 302 0 "-" "Jakarta HTTP Client/2.0.0a1"
> > 
> > Can some kind person point me in the right
> direction
> > here?
> > 
> > Many thanks in advance
> > 
> > Charlene

__
Do You Yahoo!?
Everything you'll ever need on one web page
from News and Sport to Email and Music Charts
http://uk.my.yahoo.com

--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




RE: followRedirects is false

2002-10-31 Thread Vincent Massol


> -Original Message-
> From: Charlene Mitchell [mailto:charlene_ml@;yahoo.co.uk]
> Sent: 31 October 2002 08:45
> To: Cactus Users List
> Subject: Re: followRedirects is false
> 
> Hello,
> 
> It's disappointing that no-one knows the answer to
> this  - it must be a fairly common problem :-(
> I have to accept that it's just not possible
> then...sigh...
> 

Hey, it's only been 2 days since you posted... :-). Ok, I've sent some
ideas in a another email.

> Okay, is there a plan B?
> I could accept running this from an Ant task 

There are several ways of starting cactus tests. Please read the
http://jakarta.apache.org/cactus/howto_runner.html

In addition to what's written there are now 2 more front ends:
- a maven plugin
(http://jakarta.apache.org/turbine/maven/reference/plugins/cactus)
- a tight Jetty integration (search the cactus archives)

A Cactus Eclipse plugin is also almost ready to be used...

> but I
> would still need the Form Authentication to work.
> However, for security reasons there is no 'test' user,
> there are only valid LDAP users so I cannot hard-code
> a username and password into the Cactus test (I can't
> have that in CVS!)
> 
> Is it possible to run Cactus from an ant task and
> specify the username and password into the test from
> the command line?
> e.g.   ant runtests -Duid=myUid -Dpwd=myPWD
> 

yes, here's an example:


public beginXXX(WebRequest request)
{
request.setAuthentication(
   new FormAuthentication(
   System.getProperty("uid"), 
   System.getProperty("pwd")));

[...]

-Vincent

> ??
> 
> (Hopefully) Thanks in advance
> 
> Charlene
> 
> 
>  --- Charlene Mitchell <[EMAIL PROTECTED]>
> wrote: > Hi,
> >
> > I have a secure EJB application running on
> > JBoss3.0.3/Jetty and I'm trying to integrate some
> > Cactus Unit Tests. I have read the docs and created
> > a
> > sample EJB Test, deployed it in a war and added
> > security to the web.xml so that I can authenticate
> > and
> > run the tests from a browser.
> >
> > ..but after I log in I get a page back indicating an
> > error as follows:
> > BROWSER ERROR
> > =
> > "Failed to get the test results. This is probably
> > due
> > to an error that happened on the server side when
> > trying to execute the tests. Here is what was
> > returned
> > by the server : []"
> >
> > This tells me nothing so I look in the JBoss log and
> > I
> > see the following:
> > JBOSS ERROR
> > ===
> > INFO  [wire] >> "Content-type:
> > application/x-www-form-urlencoded"
> > INFO  [wire] >> "Host: localhost"
> > INFO  [wire] >> "User-Agent: Jakarta HTTP
> > Client/2.0.0a1"
> > INFO  [wire] >> \r\n
> > INFO  [wire] << "HTTP/1.1 302 Moved Temporarily"
> > [\r\n]
> > INFO  [wire] << "Date: Tue, 29 Oct 2002 08:16:09
> > GMT"
> > [\r\n]
> > INFO  [wire] << "Server: Jetty/4.1.0 (SunOS 5.8
> > sparc)" [\r\n]
> > INFO  [wire] << "Servlet-Engine: Jetty/4.1.0
> > (Servlet
> > 2.3; JSP 1.2; java 1.4.0_01)" [\r\n]
> > INFO  [wire] << "Set-Cookie:
> > JSESSIONID=bsp7oiipqikl7;Path=/myapp-ejbtest" [\r\n]
> > INFO  [wire] << "Set-Cookie2:
> >
> JSESSIONID=bsp7oiipqikl7;Version=1;Path=/myapp-ejbtest;Discard"
> > [\r\n]
> > INFO  [wire] << "Location:
> >
> http://localhost/myapp-ejbtest/login.html;JSESSIONID=bsp7oiipqikl7";
> > [\r\n]
> > INFO  [wire] << "Transfer-Encoding: chunked" [\r\n]
> > INFO  [HttpMethod] HttpMethodBase.execute():
> > Received
> > 302 response, but followRedirects is false.
> > Returning
> > 302.
> >
> > The WebServer doesn't indicate any error as such:
> > WEB SERVER ERROR
> > 
> > "POST /myapp-ejbtest/j_security_check HTTP/1.1" 302
> > 0
> >
>
"http://localhost:19201/myapp-ejbtest/login.html;JSESSIONID=bsp7oiipqikl
7"
> > "Mozilla/4.0 (compatible; MSIE 5.5; Windows NT 4.0)"
> > "GET
> >
> /myapp-
>
ejbtest/ServletRedirector?Cactus_TestMethod=testConvert&Cactus_TestClass
=m
>
y.package.MyBeanTest&Cactus_AutomaticSession=true&Cactus_Service=CALL_TE
ST
> > HTTP/1.1" 302 0 "-" "Jakarta HTTP Client/2.0.0a1"
> >
> > Can some kind person point me in the right direction
> > here?
> >
> > Many thanks in advance
> >
> > Charlene
> 
> __
> Do You Yahoo!?
> Everything you'll ever need on one web page
> from News and Sport to Email and Music Charts
> http://uk.my.yahoo.com
> 
> --
> To unsubscribe, e-mail:    [EMAIL PROTECTED]>
> For additional commands, e-mail:  [EMAIL PROTECTED]>



--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




RE: followRedirects is false

2002-10-31 Thread Vincent Massol
Hi Charlene,

Following redirect is off in Cactus as Cactus is a unit testing tool.
Thus the idea is that if one of your method on the server side returns a
302 HTTP response you should be able to assert that in endXXX().

That said some persons have expressed a wish to make that configurable
so that follow redirects could be turned on. I think it's a good idea. I
someone wants to submit a patch... :-)

You mention a browser error. How do you start the test?

Thanks
-Vincent

> -Original Message-
> From: Charlene Mitchell [mailto:charlene_ml@;yahoo.co.uk]
> Sent: 29 October 2002 13:26
> To: [EMAIL PROTECTED]
> Subject: followRedirects is false
> 
> Hi,
> 
> I have a secure EJB application running on
> JBoss3.0.3/Jetty and I'm trying to integrate some
> Cactus Unit Tests. I have read the docs and created a
> sample EJB Test, deployed it in a war and added
> security to the web.xml so that I can authenticate and
> run the tests from a browser.
> 
> ..but after I log in I get a page back indicating an
> error as follows:
> BROWSER ERROR
> =
> "Failed to get the test results. This is probably due
> to an error that happened on the server side when
> trying to execute the tests. Here is what was returned
> by the server : []"
> 
> This tells me nothing so I look in the JBoss log and I
> see the following:
> JBOSS ERROR
> ===
> INFO  [wire] >> "Content-type:
> application/x-www-form-urlencoded"
> INFO  [wire] >> "Host: localhost"
> INFO  [wire] >> "User-Agent: Jakarta HTTP
> Client/2.0.0a1"
> INFO  [wire] >> \r\n
> INFO  [wire] << "HTTP/1.1 302 Moved Temporarily"
> [\r\n]
> INFO  [wire] << "Date: Tue, 29 Oct 2002 08:16:09 GMT"
> [\r\n]
> INFO  [wire] << "Server: Jetty/4.1.0 (SunOS 5.8
> sparc)" [\r\n]
> INFO  [wire] << "Servlet-Engine: Jetty/4.1.0 (Servlet
> 2.3; JSP 1.2; java 1.4.0_01)" [\r\n]
> INFO  [wire] << "Set-Cookie:
> JSESSIONID=bsp7oiipqikl7;Path=/myapp-ejbtest" [\r\n]
> INFO  [wire] << "Set-Cookie2:
> JSESSIONID=bsp7oiipqikl7;Version=1;Path=/myapp-ejbtest;Discard"
> [\r\n]
> INFO  [wire] << "Location:
> http://localhost/myapp-ejbtest/login.html;JSESSIONID=bsp7oiipqikl7";
> [\r\n]
> INFO  [wire] << "Transfer-Encoding: chunked" [\r\n]
> INFO  [HttpMethod] HttpMethodBase.execute(): Received
> 302 response, but followRedirects is false. Returning
> 302.
> 
> The WebServer doesn't indicate any error as such:
> WEB SERVER ERROR
> 
> "POST /myapp-ejbtest/j_security_check HTTP/1.1" 302 0
>
"http://localhost:19201/myapp-ejbtest/login.html;JSESSIONID=bsp7oiipqikl
7"
> "Mozilla/4.0 (compatible; MSIE 5.5; Windows NT 4.0)"
> "GET
> /myapp-
>
ejbtest/ServletRedirector?Cactus_TestMethod=testConvert&Cactus_TestClass
=m
>
y.package.MyBeanTest&Cactus_AutomaticSession=true&Cactus_Service=CALL_TE
ST
> HTTP/1.1" 302 0 "-" "Jakarta HTTP Client/2.0.0a1"
> 
> Can some kind person point me in the right direction
> here?
> 
> Many thanks in advance
> 
> Charlene
> 
> __
> Do You Yahoo!?
> Everything you'll ever need on one web page
> from News and Sport to Email and Music Charts
> http://uk.my.yahoo.com
> 
> --
> To unsubscribe, e-mail:    [EMAIL PROTECTED]>
> For additional commands, e-mail:  [EMAIL PROTECTED]>



--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




Re: followRedirects is false

2002-10-31 Thread Charlene Mitchell
Hello,

It's disappointing that no-one knows the answer to
this  - it must be a fairly common problem :-(
I have to accept that it's just not possible
then...sigh...

Okay, is there a plan B?
I could accept running this from an Ant task but I
would still need the Form Authentication to work.
However, for security reasons there is no 'test' user,
there are only valid LDAP users so I cannot hard-code
a username and password into the Cactus test (I can't
have that in CVS!)

Is it possible to run Cactus from an ant task and
specify the username and password into the test from
the command line?
e.g.   ant runtests -Duid=myUid -Dpwd=myPWD

??

(Hopefully) Thanks in advance

Charlene


 --- Charlene Mitchell <[EMAIL PROTECTED]>
wrote: > Hi,
> 
> I have a secure EJB application running on
> JBoss3.0.3/Jetty and I'm trying to integrate some
> Cactus Unit Tests. I have read the docs and created
> a
> sample EJB Test, deployed it in a war and added
> security to the web.xml so that I can authenticate
> and
> run the tests from a browser.
> 
> ..but after I log in I get a page back indicating an
> error as follows:
> BROWSER ERROR
> =
> "Failed to get the test results. This is probably
> due
> to an error that happened on the server side when
> trying to execute the tests. Here is what was
> returned
> by the server : []"
> 
> This tells me nothing so I look in the JBoss log and
> I
> see the following:
> JBOSS ERROR
> ===
> INFO  [wire] >> "Content-type:
> application/x-www-form-urlencoded"
> INFO  [wire] >> "Host: localhost"
> INFO  [wire] >> "User-Agent: Jakarta HTTP
> Client/2.0.0a1"
> INFO  [wire] >> \r\n
> INFO  [wire] << "HTTP/1.1 302 Moved Temporarily"
> [\r\n]
> INFO  [wire] << "Date: Tue, 29 Oct 2002 08:16:09
> GMT"
> [\r\n]
> INFO  [wire] << "Server: Jetty/4.1.0 (SunOS 5.8
> sparc)" [\r\n]
> INFO  [wire] << "Servlet-Engine: Jetty/4.1.0
> (Servlet
> 2.3; JSP 1.2; java 1.4.0_01)" [\r\n]
> INFO  [wire] << "Set-Cookie:
> JSESSIONID=bsp7oiipqikl7;Path=/myapp-ejbtest" [\r\n]
> INFO  [wire] << "Set-Cookie2:
>
JSESSIONID=bsp7oiipqikl7;Version=1;Path=/myapp-ejbtest;Discard"
> [\r\n]
> INFO  [wire] << "Location:
>
http://localhost/myapp-ejbtest/login.html;JSESSIONID=bsp7oiipqikl7";
> [\r\n]
> INFO  [wire] << "Transfer-Encoding: chunked" [\r\n]
> INFO  [HttpMethod] HttpMethodBase.execute():
> Received
> 302 response, but followRedirects is false.
> Returning
> 302.
> 
> The WebServer doesn't indicate any error as such:
> WEB SERVER ERROR
> 
> "POST /myapp-ejbtest/j_security_check HTTP/1.1" 302
> 0
>
"http://localhost:19201/myapp-ejbtest/login.html;JSESSIONID=bsp7oiipqikl7";
> "Mozilla/4.0 (compatible; MSIE 5.5; Windows NT 4.0)"
> "GET
>
/myapp-ejbtest/ServletRedirector?Cactus_TestMethod=testConvert&Cactus_TestClass=my.package.MyBeanTest&Cactus_AutomaticSession=true&Cactus_Service=CALL_TEST
> HTTP/1.1" 302 0 "-" "Jakarta HTTP Client/2.0.0a1"
> 
> Can some kind person point me in the right direction
> here?
> 
> Many thanks in advance
> 
> Charlene

__
Do You Yahoo!?
Everything you'll ever need on one web page
from News and Sport to Email and Music Charts
http://uk.my.yahoo.com

--
To unsubscribe, e-mail:   
For additional commands, e-mail: