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 Srinivasa R Kakumanu <sk...@yahoo.com> on 2003/12/18 04:11:01 UTC

Cactus Testing WAS 5.1

Hello,
 
I am looking for some help in terms of Tutorial (step-by-step) on Testing Struts Actions, Forms and JSP using CACTUS in WAS 5.1. I am kind of new to using CACTUS Testscripts. 
 
I gone through Jakarta Mail list but there was no clear tutorial I found. IBM site has an article but they only show tutorial for testing EJBs in WAS 5.1 and CACTUS. 
 
Can someone help me out here please?
 
Thanks,
Srinivasa



---------------------------------
Do you Yahoo!?
New Yahoo! Photos - easier uploading and sharing

Re: Cactus Testing WAS 5.1

Posted by Matt Raible <ma...@raibledesigns.com>.
You need to put junit.jar in $ANT_HOME/lib.

HTH,

Matt

On Dec 18, 2003, at 6:52 PM, PUTHENVILA P Johnson wrote:

> Hi I am new to Ant ,JUnit,and cactus.
> I am assigned to run automated testing from wsad. I know I am asking  
> silly
> questions . Please help me. I am using WSAD5 , when I tried to excute  
> the
> <junit> command from Ant from my worksapce in WSAD , it throwing an  
> error
>       [junit] BUILD FAILED: file:C:/Documents and Settings/PJohnson/My
> Documents/IBM/wsappdev51/workspace/baselineUnitTests/au/com/qtech/ 
> baseline/unittests/BaselineJunitAntScript.xml:10:
> Could not create task or type of type: junit.
>
> Ant could not find the task or a class this task relies upon.
>
> This is common and has a number of causes; the usual
> solutions are to read the manual pages then download and
> install needed JAR files, or fix the build file:
>  - You have misspelt 'junit'.
>    Fix: check your spelling.
>  - The task needs an external JAR file to execute
>    and this is not found at the right place in the classpath.
>    Fix: check the documentation for dependencies.
>    Fix: declare the task.
>  - The task is an Ant optional task and optional.jar is absent
>    Fix: look for optional.jar in ANT_HOME/lib, download if needed
>  - The task was not built into optional.jar as dependent
>    libraries were not found at build time.
>    Fix: look in the JAR to verify, then rebuild with the needed
>    libraries, or download a release version from apache.org
>  - The build file was written for a later version of Ant
>    Fix: upgrade to at least the latest release version of Ant
>  - The task is not an Ant core or optional task
>    and needs to be declared using <taskdef>.
>
> Remember that for JAR files to be visible to Ant tasks implemented
> in ANT_HOME/lib, the files must be in the same directory or on the
> classpath
>
> Please neither file bug reports on this problem, nor email the
> Ant mailing lists, until all of these causes have been explored,
> as this is not an Ant bug.
> I checked my classpath, it got ant.jar. optional.jar which is having  
> JUnit
> classes in it.
> Have you give some idea.
> Please help.
>
>
>
> Regards
> Johnson
> Qtech Business Systems Pty Ltd
> Level 1, 16 Edmondstone St, Newmarket QLD 4051
> t : 07 3356 4377   |   f : 07 3356 5927
> e :pjohnson@qtech.com.au   |    p : page us here for tech support
> Visit our new website www.qtech.com.au
> Check out our new Q - Specials by clicking here
>
> Disclaimer
>
> This transmission is intended only for the person or entity to which  
> it is
> addressed and may contain confidential and/or privileged information.  
> Any
> review, retransmission, dissemination or other use of, or taking of any
> action in reliance upon, this information by person or entities other  
> than
>
> the intended recipient is prohibited. If you have received this e-mail  
> in
> error, kindly notify the sender and please delete this message and any
> attachments or copies from your system. We use virus scanning software  
> but
> do not warrant that this e-mail and any attachments are virus free.
>
>
>
>
>
> Regards
> Johnson
> Qtech Business Systems Pty Ltd
> Level 1, 16 Edmondstone St, Newmarket QLD 4051
> t : 07 3356 4377   |   f : 07 3356 5927
> e :pjohnson@qtech.com.au   |    p : page us here for tech support
> Visit our new website www.qtech.com.au
> Check out our new Q - Specials by clicking here
>
> Disclaimer
>
> This transmission is intended only for the person or entity to which  
> it is
> addressed and may contain confidential and/or privileged information.  
> Any
> review, retransmission, dissemination or other use of, or taking of any
> action in reliance upon, this information by person or entities other  
> than
>
> the intended recipient is prohibited. If you have received this e-mail  
> in
> error, kindly notify the sender and please delete this message and any
> attachments or copies from your system. We use virus scanning software  
> but
> do not warrant that this e-mail and any attachments are virus free.
>

Re: Struts Testing

Posted by PUTHENVILA P Johnson <PJ...@qtech.com.au>.
Yes, you are absolutely correct.



Regards
Johnson
Qtech Business Systems Pty Ltd
Level 1, 16 Edmondstone St, Newmarket QLD 4051
t : 07 3356 4377   |   f : 07 3356 5927
e :pjohnson@qtech.com.au   |    p : page us here for tech support
Visit our new website www.qtech.com.au
Check out our new Q - Specials by clicking here

Disclaimer

This transmission is intended only for the person or entity to which it is 
addressed and may contain confidential and/or privileged information. Any 
review, retransmission, dissemination or other use of, or taking of any 
action in reliance upon, this information by person or entities other than 

the intended recipient is prohibited. If you have received this e-mail in 
error, kindly notify the sender and please delete this message and any 
attachments or copies from your system. We use virus scanning software but 
do not warrant that this e-mail and any attachments are virus free.


Struts Testing

Posted by Bret Kumler <bk...@firstam.com>.
In order to test a struts application, I need to get
http://strutstestcase.sourceforge.net/ from
http://sourceforge.net/project/showfiles.php?group_id=39190&package_id=31401
&release_id=157811 and use CactusStrutsTestCase, is this correct?

Thanks,

Bret



RE: how to use in the better way ServletTestSuite with EJBs

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

> -----Original Message-----
> From: Maria Sole Franzin [mailto:mariasole.franzin@allos.it]
> Sent: 22 December 2003 10:18
> To: 'Cactus Users List'
> Subject: how to use in the better way ServletTestSuite with EJBs
> 
> Hi All,
> I'm testing my EBJs with cactus 1.5, and i'd like to test all by a
> ServletTestSuite, or a simply Suite.
> 
> I did it defining this class:
> 
> %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
> package test.suite;
> import junit.framework.*;
> import org.apache.cactus.*;
> public class AllTests
>     extends ServletTestSuite {
> 
>   public AllTests(String s) {
>     super(s);
>   }
> public static Test suite() {
>     	TestSuite suite = new TestSuite();
>     	suite.addTestSuite("sessioncactustest".class);
>  	suite.addTestSuite("entity1cactustest".class);
>     	suite.addTestSuite("entity2cactustest".class);
>     	return suite;
>   }
> }

Quick note: This will not work. You must not put quotes around your
class name. If you do , "whatever".class will result in java.lang.String
... :-)

> %%%%%%%%%%%%%%%%%%%%%%%%%%%%%
> 
> This suite works fine, 

I would be surprised if it worked! String classes are not TestCase
classes :-)

> but I can't create a hierarchy of test, I think
> it's cause of the project architecture: the session bean is in a
packege
> indipendet from the package of the entity bean, even if the
sessionbean
> calls the two entityBean.

I don't undertsand this statement.

> 
> So the question are two:
> - why I have to use a SevletTestSuite that is a simply wrapper of the
> junit TestSuite, isn't the same of using a TestSuite????

You don't. If your test cases extends ServletTestCase (or JspTestCase or
FitlerTestCase) then you *must* not wrap them in a ServletTestSuite. The
ServletTestSuite must be used only for running pure JUnit test case
(i.e. classes that extends TestCase) on the server side.

> - how may i define a test hierarchy??? Do i have to call a suite
inside
> a   suite???

Yes. This is the JUnit way.

Alternatively, it depends on how you plan to run your tests. If you're
using Ant, I'd suggest your use the <batchtest> element instead of the
<test> one. It will run all the tests automatically without the need to
write TestAll classes.

-Vincent

> 
> Thank in advance
> 
> Mariasole
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: cactus-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: cactus-user-help@jakarta.apache.org



how to use in the better way ServletTestSuite with EJBs

Posted by Maria Sole Franzin <ma...@allos.it>.
Hi All, 
I'm testing my EBJs with cactus 1.5, and i'd like to test all by a
ServletTestSuite, or a simply Suite.

I did it defining this class:

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
package test.suite;
import junit.framework.*;
import org.apache.cactus.*;
public class AllTests
    extends ServletTestSuite {

  public AllTests(String s) {
    super(s);
  }
public static Test suite() {
    	TestSuite suite = new TestSuite();
    	suite.addTestSuite("sessioncactustest".class);
 	suite.addTestSuite("entity1cactustest".class);
    	suite.addTestSuite("entity2cactustest".class);
    	return suite;
  }
}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

This suite works fine, but I can't create a hierarchy of test, I think
it's cause of the project architecture: the session bean is in a packege
indipendet from the package of the entity bean, even if the sessionbean
calls the two entityBean.

So the question are two: 
- why I have to use a SevletTestSuite that is a simply wrapper of the
junit TestSuite, isn't the same of using a TestSuite????
- how may i define a test hierarchy??? Do i have to call a suite inside
a   suite???

Thank in advance

Mariasole


Re: Cactus Testing WAS 5.1

Posted by PUTHENVILA P Johnson <PJ...@qtech.com.au>.
Hi I am new to Ant ,JUnit,and cactus.
I am assigned to run automated testing from wsad. I know I am asking silly 
questions . Please help me. I am using WSAD5 , when I tried to excute the 
<junit> command from Ant from my worksapce in WSAD , it throwing an error 
      [junit] BUILD FAILED: file:C:/Documents and Settings/PJohnson/My 
Documents/IBM/wsappdev51/workspace/baselineUnitTests/au/com/qtech/baseline/unittests/BaselineJunitAntScript.xml:10: 
Could not create task or type of type: junit.

Ant could not find the task or a class this task relies upon.

This is common and has a number of causes; the usual 
solutions are to read the manual pages then download and
install needed JAR files, or fix the build file: 
 - You have misspelt 'junit'.
   Fix: check your spelling.
 - The task needs an external JAR file to execute
   and this is not found at the right place in the classpath.
   Fix: check the documentation for dependencies.
   Fix: declare the task.
 - The task is an Ant optional task and optional.jar is absent
   Fix: look for optional.jar in ANT_HOME/lib, download if needed
 - The task was not built into optional.jar as dependent
   libraries were not found at build time.
   Fix: look in the JAR to verify, then rebuild with the needed
   libraries, or download a release version from apache.org
 - The build file was written for a later version of Ant
   Fix: upgrade to at least the latest release version of Ant
 - The task is not an Ant core or optional task 
   and needs to be declared using <taskdef>.

Remember that for JAR files to be visible to Ant tasks implemented
in ANT_HOME/lib, the files must be in the same directory or on the
classpath

Please neither file bug reports on this problem, nor email the
Ant mailing lists, until all of these causes have been explored,
as this is not an Ant bug.
I checked my classpath, it got ant.jar. optional.jar which is having JUnit 
classes in it.
Have you give some idea.
Please help.



Regards
Johnson
Qtech Business Systems Pty Ltd
Level 1, 16 Edmondstone St, Newmarket QLD 4051
t : 07 3356 4377   |   f : 07 3356 5927
e :pjohnson@qtech.com.au   |    p : page us here for tech support
Visit our new website www.qtech.com.au
Check out our new Q - Specials by clicking here

Disclaimer

This transmission is intended only for the person or entity to which it is 
addressed and may contain confidential and/or privileged information. Any 
review, retransmission, dissemination or other use of, or taking of any 
action in reliance upon, this information by person or entities other than 

the intended recipient is prohibited. If you have received this e-mail in 
error, kindly notify the sender and please delete this message and any 
attachments or copies from your system. We use virus scanning software but 
do not warrant that this e-mail and any attachments are virus free.





Regards
Johnson
Qtech Business Systems Pty Ltd
Level 1, 16 Edmondstone St, Newmarket QLD 4051
t : 07 3356 4377   |   f : 07 3356 5927
e :pjohnson@qtech.com.au   |    p : page us here for tech support
Visit our new website www.qtech.com.au
Check out our new Q - Specials by clicking here

Disclaimer

This transmission is intended only for the person or entity to which it is 
addressed and may contain confidential and/or privileged information. Any 
review, retransmission, dissemination or other use of, or taking of any 
action in reliance upon, this information by person or entities other than 

the intended recipient is prohibited. If you have received this e-mail in 
error, kindly notify the sender and please delete this message and any 
attachments or copies from your system. We use virus scanning software but 
do not warrant that this e-mail and any attachments are virus free.


Re: Cactus Testing WAS 5.1

Posted by Srinivasa R Kakumanu <sk...@yahoo.com>.
Johnson,
 
Thanks for the follow-up I was also able to get cactus test script working.
 
Thanks,
Srini

PUTHENVILA P Johnson <PJ...@qtech.com.au> wrote:
Hi Srini,
Have you sort it out, because I was also searching for help in the same 
situation.I made it work with little struggle. So if you need any help 
please reply.
Johnson


---------------------------------
Do you Yahoo!?
Yahoo! Hotjobs: Enter the "Signing Bonus" Sweepstakes

Re: Cactus Testing WAS 5.1

Posted by PUTHENVILA P Johnson <PJ...@qtech.com.au>.
Hi Srini,
Have you sort it out, because I was also searching for help in the same 
situation.I made it work with little struggle. So if you need any help 
please reply.
Johnson

RE: Cactus Testing WAS 5.1

Posted by Vincent Massol <vm...@pivolis.com>.
Yes, that's a good story. It's very similar to mine with Cactus and
other projects (JUnit in Action book, lots of other proposals,
conferences, lots of good friends, etc). The morale is: if you help out
and you do it consistently, only good things can happen to you :-)

One very important part is consistency (over time). The other is hard
work... ;-)

What JB did not tell is that since 2001, he's answering almost every
single email on the JUnit mailing list (and that's quite a lot)!

Thanks JB, you deserve it!
-Vincent

> -----Original Message-----
> From: J. B. Rainsberger [mailto:jbrains@rogers.com]
> Sent: 18 December 2003 18:20
> To: Cactus Users List
> Subject: Re: Cactus Testing WAS 5.1
> 
> Siamack wrote:
> 
> > I was facing the similar situation. But it seems this mailing list
deals
> with every webcontainer except WAS !!!! . I finally gave up as almost
all
> my emails with regard to this subject went unanswered.
> 
> Maybe no-one had an answer for you. Maybe that was the indication you
> needed that you should figure it out and publish an article.
> 
> Back in 2001 there was about two weeks of constant complaining on the
> JUnit mailing list that there were no good, up-to-date tutorials on
> JUnit. I got annoyed and wrote one: "JUnit: A Starter Guide."
> 
> I found out a few days later that there was already an excellent
> tutorial by Mike Clark "JUnit Primer" on the web and easily-accessible
> from Google. Why those people couldn't find it is beyond me.
> 
> Writing that tutorial worked wonders for me:
>   * it established me in the JUnit community, and while many people
> dislike me (their loss), many more look favorably on me
>   * it got me a job doing corporate IT training, which I held for
about
> nine months, and which paid the bills until...
>   * it prompted Vince to suggest to his publisher that I be the one to
> write a book about JUnit, which is almost done
> 
> So I wrote one article and it led to a certain notoriety, introduced
me
> to /friends/ and colleagues in a large community, paid my bills for
over
> a year and got me a book deal, with perhaps another book deal next
year.
> 
> It only took five hours on a Sunday morning, but even if it had taken
a
> week, I think you can see it would have been worth it.
> 
> If you solve problems, you become in demand. If you don't then, well,
> you don't.
> --
> J. B. Rainsberger,
> Diaspar Software Services
> http://www.diasparsoftware.com :: +1 416 791-8603
> Let's write software that people understand
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: cactus-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: cactus-user-help@jakarta.apache.org



Re: Cactus Testing WAS 5.1

Posted by "J. B. Rainsberger" <jb...@rogers.com>.
Siamack wrote:

> I was facing the similar situation. But it seems this mailing list deals with every webcontainer except WAS !!!! . I finally gave up as almost all my emails with regard to this subject went unanswered.

Maybe no-one had an answer for you. Maybe that was the indication you 
needed that you should figure it out and publish an article.

Back in 2001 there was about two weeks of constant complaining on the 
JUnit mailing list that there were no good, up-to-date tutorials on 
JUnit. I got annoyed and wrote one: "JUnit: A Starter Guide."

I found out a few days later that there was already an excellent 
tutorial by Mike Clark "JUnit Primer" on the web and easily-accessible 
from Google. Why those people couldn't find it is beyond me.

Writing that tutorial worked wonders for me:
  * it established me in the JUnit community, and while many people 
dislike me (their loss), many more look favorably on me
  * it got me a job doing corporate IT training, which I held for about 
nine months, and which paid the bills until...
  * it prompted Vince to suggest to his publisher that I be the one to 
write a book about JUnit, which is almost done

So I wrote one article and it led to a certain notoriety, introduced me 
to /friends/ and colleagues in a large community, paid my bills for over 
a year and got me a book deal, with perhaps another book deal next year.

It only took five hours on a Sunday morning, but even if it had taken a 
week, I think you can see it would have been worth it.

If you solve problems, you become in demand. If you don't then, well, 
you don't.
-- 
J. B. Rainsberger,
Diaspar Software Services
http://www.diasparsoftware.com :: +1 416 791-8603
Let's write software that people understand


RE: Cactus Testing WAS 5.1

Posted by Vincent Massol <vm...@pivolis.com>.

> -----Original Message-----
> From: Siamack [mailto:safamack@yahoo.ca]
> Sent: 18 December 2003 15:21
> To: Cactus Users List
> Subject: Re: Cactus Testing WAS 5.1
> 
> 
> I was facing the similar situation. But it seems this mailing list
deals
> with every webcontainer except WAS !!!! . I finally gave up as almost
all
> my emails with regard to this subject went unanswered.

If you want to get 24/7 personal support, contact me directly and I can
draw up a contract for you. Otherwise, do as everyone does: participate
and stop whining. Once you participate and help others you'll see that
others are more likely to help you. If Cactus doesn't fit your need,
please don't use it.

> 
> What is really amazing is the IBM donated eclipse to java comunity and
the
> cactus runner that is made for eclipse supports all containers except
the
> very WAS !!! . 

Sorry but I don't see the relationship between Eclipse and WAS nor the
relationship between Cactus and IBM.
 
If you really want to see WAS natively supported in Cactus (it is
already supported in the sense that nothing prevents you from using
Cactus with WAS), you have 2 options:
- pay us for implementing it
- send a patch

Whining won't help unfortunately...

Thanks
-Vincent

>I really hope you find your answers. If you get any clue,
> please do not hesitate to let me know.
> 
> regards,
> 
> Srinivasa R Kakumanu <sk...@yahoo.com> wrote:
> 
> 
> Srinivasa R Kakumanu wrote:Hello,
> 
> I am looking for some help in terms of Tutorial (step-by-step) on
Testing
> Struts Actions, Forms and JSP using CACTUS in WAS 5.1. I am kind of
new to
> using CACTUS Testscripts.
> 
> I gone through Jakarta Mail list but there was no clear tutorial I
found.
> IBM site has an article but they only show tutorial for testing EJBs
in
> WAS 5.1 and CACTUS.
> 
> Can someone help me out here please?
> 
> Thanks,
> Srinivasa
> 
> 
> 
> ---------------------------------
> Do you Yahoo!?
> New Yahoo! Photos - easier uploading and sharing
> 
> 
> ---------------------------------
> Do you Yahoo!?
> New Yahoo! Photos - easier uploading and sharing
> 
> 
> ---------------------------------
> Post your free ad now! Yahoo! Canada Personals


Re: Cactus Testing WAS 5.1

Posted by Siamack <sa...@yahoo.ca>.
 
I was facing the similar situation. But it seems this mailing list deals with every webcontainer except WAS !!!! . I finally gave up as almost all my emails with regard to this subject went unanswered.
 
What is really amazing is the IBM donated eclipse to java comunity and the cactus runner that is made for eclipse supports all containers except the very WAS !!! . I really hope you find your answers. If you get any clue, please do not hesitate to let me know.
 
regards,

Srinivasa R Kakumanu <sk...@yahoo.com> wrote:


Srinivasa R Kakumanu wrote:Hello,

I am looking for some help in terms of Tutorial (step-by-step) on Testing Struts Actions, Forms and JSP using CACTUS in WAS 5.1. I am kind of new to using CACTUS Testscripts. 

I gone through Jakarta Mail list but there was no clear tutorial I found. IBM site has an article but they only show tutorial for testing EJBs in WAS 5.1 and CACTUS. 

Can someone help me out here please?

Thanks,
Srinivasa



---------------------------------
Do you Yahoo!?
New Yahoo! Photos - easier uploading and sharing


---------------------------------
Do you Yahoo!?
New Yahoo! Photos - easier uploading and sharing


---------------------------------
Post your free ad now! Yahoo! Canada Personals

Re: Cactus Testing WAS 5.1

Posted by Srinivasa R Kakumanu <sk...@yahoo.com>.

Srinivasa R Kakumanu <sk...@yahoo.com> wrote:Hello,

I am looking for some help in terms of Tutorial (step-by-step) on Testing Struts Actions, Forms and JSP using CACTUS in WAS 5.1. I am kind of new to using CACTUS Testscripts. 

I gone through Jakarta Mail list but there was no clear tutorial I found. IBM site has an article but they only show tutorial for testing EJBs in WAS 5.1 and CACTUS. 

Can someone help me out here please?

Thanks,
Srinivasa



---------------------------------
Do you Yahoo!?
New Yahoo! Photos - easier uploading and sharing


---------------------------------
Do you Yahoo!?
New Yahoo! Photos - easier uploading and sharing