You are viewing a plain text version of this content. The canonical link for it is here.
Posted to cactus-dev@jakarta.apache.org by Ex...@nokia.com on 2001/10/29 13:50:08 UTC

html interface for Cactus (JUnitEE)

hi!

I have been looking at the sourceforge project JUnitEE
that let's you access your testcases inside an J2EE 
container such as tomcat, weblogic or orion.

Cactus does about the same thing but instead it uses
the client interfaces for this task and just performs the
tests inside the container.

Cactus has some features that are not (to my knowledge)
available for just using JUnitEE such as access to the 
request, server and other http objects.

So I wanted to know is it OK to use JUnitEE as a UI for Cactus? 
The answer was YES! 

The good thing about it is that I don't need to have
the classes in both client and server site. 
Everything is done in the server using a browser as UI.
I have the added features of Cactus available.
I can also run non-cactus tests in the server
(extended from junit.framework.TestCase)

What you need to do is include the JUnitEE servlet
in the container that uses Cactus
--------------------------------------
Does this sound good?
Is there something I could do to make it sound even better?

regards
Kaarle Kaila
http://www.iki.fi/kaila


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


Re: html interface for Cactus (JUnitEE)

Posted by Vincent Massol <vm...@octo.com>.
Thanks Kaarle for your enthousiasm ! :)

Yes, I remember when I first found JUnitEE about 8 months ago, we discussed
with Jeff Schnitzer about the merit of his servlet side test runner. The
problem I had (and I still have), please correct me if I'm wrong, is that it
is a manual process to check if the test has succeeded or not. That is, you
open your browser, call the url for running the tests (the servlet runner),
execute the tests and view the results as a returned HTML page. There are
several issues with this :

A- This may be fine for development but when you arrive at the stage where
you want to automate your build process, send an email when the build fails
(for example, upon running a test that fails), it is no longer providing a
good solution.
B-  Your cannot integrate with existing tool as they are running either the
default test runner or one of the gui one. All JUnit plugins for ides for
example will run fine with Cactus because Cactus is test-runner-neutral.
C- You cannot pass, in a reproductible manner, HTTP parameters to your test
(like HTTP parameters, cookies, HTTP headers, simulate a URL, ...). In other
words, it is as if your Cactus test case did not have a beginXXX() method.
D- You cannot assert the results of a returned requests (like check for HTTP
response code, cookies, content,..). Everything that is in the endXXX()
method.
E- JUnitEE is not marketed to be a new test runner for JUnit but rather an
extension to provide server side unit testing (same as Cactus). So persons
will not think about JUnitEE as a front end for Cactus right away.

That said, let's look at some solutions ... :)
-A/B are really a problem because there is no easy way to get that.
-C/D could be solved if the servlet test runner opens an HTTP connection to
the same server
-E is not really an issue. I think I remember I saw some time in the past a
junit test runner extension which was a sevlet but am not sure anymore. It
may already exist and would work with Cactus (as almost any test runner
would, as a cactus test case is a junit test case).

I agree with you on the following point : if you don't care about
integrating it in your IDE and if you're not looking to automated builds
then you could probably use a sevlet test runner to run cactus tests. As you
said, that would remove the client part of Cactus (it will still be there
but running on the server side ... :) ).

What do you think ?
-Vincent

----- Original Message -----
From: <Ex...@nokia.com>
To: <ca...@jakarta.apache.org>
Sent: Monday, October 29, 2001 12:50 PM
Subject: html interface for Cactus (JUnitEE)


> hi!
>
> I have been looking at the sourceforge project JUnitEE
> that let's you access your testcases inside an J2EE
> container such as tomcat, weblogic or orion.
>
> Cactus does about the same thing but instead it uses
> the client interfaces for this task and just performs the
> tests inside the container.
>
> Cactus has some features that are not (to my knowledge)
> available for just using JUnitEE such as access to the
> request, server and other http objects.
>
> So I wanted to know is it OK to use JUnitEE as a UI for Cactus?
> The answer was YES!
>
> The good thing about it is that I don't need to have
> the classes in both client and server site.
> Everything is done in the server using a browser as UI.
> I have the added features of Cactus available.
> I can also run non-cactus tests in the server
> (extended from junit.framework.TestCase)
>
> What you need to do is include the JUnitEE servlet
> in the container that uses Cactus
> --------------------------------------
> Does this sound good?
> Is there something I could do to make it sound even better?
>
> regards
> Kaarle Kaila
> http://www.iki.fi/kaila
>
>
> --
> To unsubscribe, e-mail:
<ma...@jakarta.apache.org>
> For additional commands, e-mail:
<ma...@jakarta.apache.org>
>
>


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