You are viewing a plain text version of this content. The canonical link for it is here.
Posted to cactus-user@jakarta.apache.org by Dos Santos <ne...@yahoo.com> on 2002/03/21 00:32:41 UTC

Integrating with HttpUnit

Hey!

I'm having some trouble with my functional tests. I'm
testing navigation on a website with HttpUnit and I
came upon a hurdle.

I need to follow a link that goes something like this:
onclick=\"window.location.href='Registration.RemoveOrEditCustomer?jsessionid=...';"

Httpunit does not suport javascript testing. So I'm
trying to use something else to follow this link which
consists of a call to a servlet. I know cactus is used
for servlet testing and I was wondering if there is
any way that I could use Cactus to obtain the
resulting page of this link and then use it for
further navigation testing with HttpUnit.

I truly appreciate any help I can get.

THANX


__________________________________________________
Do You Yahoo!?
Yahoo! Movies - coverage of the 74th Academy Awards�
http://movies.yahoo.com/

--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>


RE: Integrating with HttpUnit

Posted by Dos Santos <ne...@yahoo.com>.
Thanks for your help.

I fixed my problem. I guess the session parameter was
interfering with the correct execution. I took it out
and left everything else and it worked just fine.


--- Vincent Massol <vm...@octo.com> wrote:
> Just call the page with the needed HTTP parameters
> (i.e. the parameters
> after the ?).
> 
> -Vincent
> 
> > -----Original Message-----
> > From: Dos Santos [mailto:newbie_77@yahoo.com]
> > Sent: 25 March 2002 13:08
> > To: Cactus Users List
> > Subject: RE: Integrating with HttpUnit
> > 
> > The thing is that for some reason I cannot test
> the
> > other page without doing the specific call that's
> in
> > the link. It consists of a servlet and when you
> call
> > the servlet without the parameters that go after
> "?"
> > it returns to the same page you are on.
> > 
> > I don't know what to do, or if this is enough
> > information.
> > 
> > Thanks for your help.
> > 
> > --- Vincent Massol <vm...@octo.com> wrote:
> > > Hi,
> > >
> > > I'm not sure what you want to achieve. You say
> that
> > > you have some
> > > javascript that call a page and you want to test
> > > that page. You cannot
> > > test the javascript. Fine. So you why don't you
> test
> > > that page directly
> > > using HttpUnit ? Instead of having one test that
> > > encompasses the full
> > > navigation, you'll have 2 tests.
> > >
> > > It seems you're doing functional testing (black
> box)
> > > as opposed to unit
> > > testing (white box). Although Cactus can do
> > > functional testing to some
> > > extent, it is especially geared towards
> integration
> > > unit testing (that
> > > is a combination of functional testing and unit
> > > testing, in other words
> > > it is fine-grained functional testing, in the
> sense
> > > that you your entry
> > > points in your application).
> > >
> > > Hope it helps
> > > -Vincent
> > >
> > > > -----Original Message-----
> > > > From: Dos Santos [mailto:newbie_77@yahoo.com]
> > > > Sent: 20 March 2002 23:33
> > > > To: Cactus Users List
> > > > Subject: Integrating with HttpUnit
> > > >
> > > > Hey!
> > > >
> > > > I'm having some trouble with my functional
> tests.
> > > I'm
> > > > testing navigation on a website with HttpUnit
> and
> > > I
> > > > came upon a hurdle.
> > > >
> > > > I need to follow a link that goes something
> like
> > > this:
> > > >
> > >
> >
>
onclick=\"window.location.href='Registration.RemoveOrEditCustomer?jsessi
> > > on
> > > > id=...';"
> > > >
> > > > Httpunit does not suport javascript testing.
> So
> > > I'm
> > > > trying to use something else to follow this
> link
> > > which
> > > > consists of a call to a servlet. I know cactus
> is
> > > used
> > > > for servlet testing and I was wondering if
> there
> > > is
> > > > any way that I could use Cactus to obtain the
> > > > resulting page of this link and then use it
> for
> > > > further navigation testing with HttpUnit.
> > > >
> > > > I truly appreciate any help I can get.
> > > >
> > > > THANX
> > > >
> > > >
> > > >
> __________________________________________________
> > > > Do You Yahoo!?
> > > > Yahoo! Movies - coverage of the 74th Academy
> > > AwardsR
> > > > http://movies.yahoo.com/
> > > >
> > > > --
> > > > To unsubscribe, e-mail:   <mailto:cactus-user-
> > > > unsubscribe@jakarta.apache.org>
> > > > For additional commands, e-mail:
> > > <mailto:cactus-user-
> > > > help@jakarta.apache.org>
> > > >
> > >
> > >
> > >
> > >
> > > --
> > > To unsubscribe, e-mail:
> > >
> <ma...@jakarta.apache.org>
> > > For additional commands, e-mail:
> > > <ma...@jakarta.apache.org>
> > >
> > 
> > 
> > __________________________________________________
> > Do You Yahoo!?
> > Yahoo! Movies - coverage of the 74th Academy
> AwardsR
> > http://movies.yahoo.com/
> > 
> > --
> > To unsubscribe, e-mail:   <mailto:cactus-user-
> > unsubscribe@jakarta.apache.org>
> > For additional commands, e-mail:
> <mailto:cactus-user-
> > help@jakarta.apache.org>
> > 
> 
> 
> 
> 
> --
> To unsubscribe, e-mail:  
> <ma...@jakarta.apache.org>
> For additional commands, e-mail:
> <ma...@jakarta.apache.org>
> 


__________________________________________________
Do You Yahoo!?
Yahoo! Movies - coverage of the 74th Academy Awards�
http://movies.yahoo.com/

--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>


RE: Integrating with HttpUnit

Posted by Vincent Massol <vm...@octo.com>.
Just call the page with the needed HTTP parameters (i.e. the parameters
after the ?).

-Vincent

> -----Original Message-----
> From: Dos Santos [mailto:newbie_77@yahoo.com]
> Sent: 25 March 2002 13:08
> To: Cactus Users List
> Subject: RE: Integrating with HttpUnit
> 
> The thing is that for some reason I cannot test the
> other page without doing the specific call that's in
> the link. It consists of a servlet and when you call
> the servlet without the parameters that go after "?"
> it returns to the same page you are on.
> 
> I don't know what to do, or if this is enough
> information.
> 
> Thanks for your help.
> 
> --- Vincent Massol <vm...@octo.com> wrote:
> > Hi,
> >
> > I'm not sure what you want to achieve. You say that
> > you have some
> > javascript that call a page and you want to test
> > that page. You cannot
> > test the javascript. Fine. So you why don't you test
> > that page directly
> > using HttpUnit ? Instead of having one test that
> > encompasses the full
> > navigation, you'll have 2 tests.
> >
> > It seems you're doing functional testing (black box)
> > as opposed to unit
> > testing (white box). Although Cactus can do
> > functional testing to some
> > extent, it is especially geared towards integration
> > unit testing (that
> > is a combination of functional testing and unit
> > testing, in other words
> > it is fine-grained functional testing, in the sense
> > that you your entry
> > points in your application).
> >
> > Hope it helps
> > -Vincent
> >
> > > -----Original Message-----
> > > From: Dos Santos [mailto:newbie_77@yahoo.com]
> > > Sent: 20 March 2002 23:33
> > > To: Cactus Users List
> > > Subject: Integrating with HttpUnit
> > >
> > > Hey!
> > >
> > > I'm having some trouble with my functional tests.
> > I'm
> > > testing navigation on a website with HttpUnit and
> > I
> > > came upon a hurdle.
> > >
> > > I need to follow a link that goes something like
> > this:
> > >
> >
>
onclick=\"window.location.href='Registration.RemoveOrEditCustomer?jsessi
> > on
> > > id=...';"
> > >
> > > Httpunit does not suport javascript testing. So
> > I'm
> > > trying to use something else to follow this link
> > which
> > > consists of a call to a servlet. I know cactus is
> > used
> > > for servlet testing and I was wondering if there
> > is
> > > any way that I could use Cactus to obtain the
> > > resulting page of this link and then use it for
> > > further navigation testing with HttpUnit.
> > >
> > > I truly appreciate any help I can get.
> > >
> > > THANX
> > >
> > >
> > > __________________________________________________
> > > Do You Yahoo!?
> > > Yahoo! Movies - coverage of the 74th Academy
> > AwardsR
> > > http://movies.yahoo.com/
> > >
> > > --
> > > To unsubscribe, e-mail:   <mailto:cactus-user-
> > > unsubscribe@jakarta.apache.org>
> > > For additional commands, e-mail:
> > <mailto:cactus-user-
> > > help@jakarta.apache.org>
> > >
> >
> >
> >
> >
> > --
> > To unsubscribe, e-mail:
> > <ma...@jakarta.apache.org>
> > For additional commands, e-mail:
> > <ma...@jakarta.apache.org>
> >
> 
> 
> __________________________________________________
> Do You Yahoo!?
> Yahoo! Movies - coverage of the 74th Academy AwardsR
> http://movies.yahoo.com/
> 
> --
> To unsubscribe, e-mail:   <mailto:cactus-user-
> unsubscribe@jakarta.apache.org>
> For additional commands, e-mail: <mailto:cactus-user-
> help@jakarta.apache.org>
> 




--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>


RE: Integrating with HttpUnit

Posted by Dos Santos <ne...@yahoo.com>.
The thing is that for some reason I cannot test the
other page without doing the specific call that's in
the link. It consists of a servlet and when you call
the servlet without the parameters that go after "?"
it returns to the same page you are on. 

I don't know what to do, or if this is enough
information.

Thanks for your help.

--- Vincent Massol <vm...@octo.com> wrote:
> Hi,
> 
> I'm not sure what you want to achieve. You say that
> you have some
> javascript that call a page and you want to test
> that page. You cannot
> test the javascript. Fine. So you why don't you test
> that page directly
> using HttpUnit ? Instead of having one test that
> encompasses the full
> navigation, you'll have 2 tests.
> 
> It seems you're doing functional testing (black box)
> as opposed to unit
> testing (white box). Although Cactus can do
> functional testing to some
> extent, it is especially geared towards integration
> unit testing (that
> is a combination of functional testing and unit
> testing, in other words
> it is fine-grained functional testing, in the sense
> that you your entry
> points in your application).
> 
> Hope it helps
> -Vincent
> 
> > -----Original Message-----
> > From: Dos Santos [mailto:newbie_77@yahoo.com]
> > Sent: 20 March 2002 23:33
> > To: Cactus Users List
> > Subject: Integrating with HttpUnit
> > 
> > Hey!
> > 
> > I'm having some trouble with my functional tests.
> I'm
> > testing navigation on a website with HttpUnit and
> I
> > came upon a hurdle.
> > 
> > I need to follow a link that goes something like
> this:
> >
>
onclick=\"window.location.href='Registration.RemoveOrEditCustomer?jsessi
> on
> > id=...';"
> > 
> > Httpunit does not suport javascript testing. So
> I'm
> > trying to use something else to follow this link
> which
> > consists of a call to a servlet. I know cactus is
> used
> > for servlet testing and I was wondering if there
> is
> > any way that I could use Cactus to obtain the
> > resulting page of this link and then use it for
> > further navigation testing with HttpUnit.
> > 
> > I truly appreciate any help I can get.
> > 
> > THANX
> > 
> > 
> > __________________________________________________
> > Do You Yahoo!?
> > Yahoo! Movies - coverage of the 74th Academy
> AwardsR
> > http://movies.yahoo.com/
> > 
> > --
> > To unsubscribe, e-mail:   <mailto:cactus-user-
> > unsubscribe@jakarta.apache.org>
> > For additional commands, e-mail:
> <mailto:cactus-user-
> > help@jakarta.apache.org>
> > 
> 
> 
> 
> 
> --
> To unsubscribe, e-mail:  
> <ma...@jakarta.apache.org>
> For additional commands, e-mail:
> <ma...@jakarta.apache.org>
> 


__________________________________________________
Do You Yahoo!?
Yahoo! Movies - coverage of the 74th Academy Awards�
http://movies.yahoo.com/

--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>


RE: Integrating with HttpUnit

Posted by Vincent Massol <vm...@octo.com>.
Hi,

I'm not sure what you want to achieve. You say that you have some
javascript that call a page and you want to test that page. You cannot
test the javascript. Fine. So you why don't you test that page directly
using HttpUnit ? Instead of having one test that encompasses the full
navigation, you'll have 2 tests.

It seems you're doing functional testing (black box) as opposed to unit
testing (white box). Although Cactus can do functional testing to some
extent, it is especially geared towards integration unit testing (that
is a combination of functional testing and unit testing, in other words
it is fine-grained functional testing, in the sense that you your entry
points in your application).

Hope it helps
-Vincent

> -----Original Message-----
> From: Dos Santos [mailto:newbie_77@yahoo.com]
> Sent: 20 March 2002 23:33
> To: Cactus Users List
> Subject: Integrating with HttpUnit
> 
> Hey!
> 
> I'm having some trouble with my functional tests. I'm
> testing navigation on a website with HttpUnit and I
> came upon a hurdle.
> 
> I need to follow a link that goes something like this:
>
onclick=\"window.location.href='Registration.RemoveOrEditCustomer?jsessi
on
> id=...';"
> 
> Httpunit does not suport javascript testing. So I'm
> trying to use something else to follow this link which
> consists of a call to a servlet. I know cactus is used
> for servlet testing and I was wondering if there is
> any way that I could use Cactus to obtain the
> resulting page of this link and then use it for
> further navigation testing with HttpUnit.
> 
> I truly appreciate any help I can get.
> 
> THANX
> 
> 
> __________________________________________________
> Do You Yahoo!?
> Yahoo! Movies - coverage of the 74th Academy AwardsR
> http://movies.yahoo.com/
> 
> --
> To unsubscribe, e-mail:   <mailto:cactus-user-
> unsubscribe@jakarta.apache.org>
> For additional commands, e-mail: <mailto:cactus-user-
> help@jakarta.apache.org>
> 




--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>