You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tapestry.apache.org by "Harvey, David " <Da...@Ingenix.com> on 2006/02/02 19:45:39 UTC

How can you write tests using BaseComponentTestCase?

This is a good question.  One of the reasons for us to upgrade 
to Tapestry 4.0 was to have a reasonable component test framework.  

I don't want to mess with easymock and mock testing objects if
possible.  

I would like to have unit tests based on the same framework as
the tests that run with the Tapestry 4.0 build.  

Any ideas anyone?

-----Original Message-----
From: Inge Solvoll [mailto:inge.tapestry@gmail.com] 
Sent: Thursday, February 02, 2006 2:47 AM
To: Tapestry users
Subject: Re: Where are the classes for the tests in the tapestry 4.0
source bundle

Does this mean that it is actually possible to write tests for my
tapestry page and component classes in an easy way supported by the
framework? Does there exist som documentation on this?

Inge

On 2/2/06, Mat Gessel <ma...@gmail.com> wrote:
>
> I wouldn't expect test related files to be in the Tapestry deployment 
> jars. They are only needed for the build.
>
> I did a source build using the supplied ant build file. The tests are 
> run successfully, so they must be compiling. Ah, there they 
> are...hiding in my user temp folder:
> D:\Documents and Settings\<user name>\Local 
> Settings\Temp\jakarta-tapestry\tapestry\target\test-classes
>
> Running the build is pretty easy if you are familiar with Ant. Just 
> download and extraxt the Tapestry zip then follow the instructions on 
> the Wiki:
> http://wiki.apache.org/jakarta-tapestry/BuildingTapestry
>
> -= Mat
>
> On 2/1/06, Harvey, David <Da...@ingenix.com> wrote:
> > Hello all,
> > I'm using Tapestry 4.0 and I have all the dependencies listed on the

> > jakarta tapestry web site.  My tapestry 4.0 seems to work properly 
> > with the new annotations, etc, which are very cool.
> >
> > I'm trying to base a component test on the BaseComponentTestCase
that is
> > in the source bundle under framework.   Unfortunately this is not
> > shipped in any of the tapestry 4.0 or hivemind 1.1 jars.  Do I need 
> > to compile these tests?  If so where is the HiveMindTestCase
documentation.
> >
> >
> > Also, is there any documentation on how to use the component testing

> > framework that is new with Tapestry 4.0?  I'm fairly well-versed in 
> > JUnit and it's many derivatives.
> >
> > Thanks,
> > David Harvey
> >
> >
> >
> > "Secure Server" made the following
> >  annotations on 02/01/2006 02:05:43 PM 
> > ------------------------------"This e-mail, including attachments, 
> > may
> include confidential and/or proprietary information, and may be used 
> only by the person or entity to which it is addressed. If the reader 
> of this e-mail is not the intended recipient or his or her authorized 
> agent, the reader is hereby notified that any dissemination, 
> distribution or copying of this e-mail is prohibited. If you have 
> received this e-mail in error, please notify the sender by replying to

> this message and delete this e-mail immediately."
> > ==============================
> >
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: tapestry-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: tapestry-user-help@jakarta.apache.org
>
>


"Secure Server" made the following
 annotations on 02/02/2006 01:45:40 PM
------------------------------"This e-mail, including attachments, may include confidential and/or proprietary information, and may be used only by the person or entity to which it is addressed. If the reader of this e-mail is not the intended recipient or his or her authorized agent, the reader is hereby notified that any dissemination, distribution or copying of this e-mail is prohibited. If you have received this e-mail in error, please notify the sender by replying to this message and delete this e-mail immediately."
==============================

---------------------------------------------------------------------
To unsubscribe, e-mail: tapestry-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tapestry-user-help@jakarta.apache.org


Re: How can you write tests using BaseComponentTestCase?

Posted by Andreas Andreou <an...@di.uoa.gr>.
Why not simply use the* *
org.apache.tapestry.test.Creator
utility class?

It works for me and it can instanciate both pages and components.

Harvey, David wrote:

>This is a good question.  One of the reasons for us to upgrade 
>to Tapestry 4.0 was to have a reasonable component test framework.  
>
>I don't want to mess with easymock and mock testing objects if
>possible.  
>
>I would like to have unit tests based on the same framework as
>the tests that run with the Tapestry 4.0 build.  
>
>Any ideas anyone?
>
>-----Original Message-----
>From: Inge Solvoll [mailto:inge.tapestry@gmail.com] 
>Sent: Thursday, February 02, 2006 2:47 AM
>To: Tapestry users
>Subject: Re: Where are the classes for the tests in the tapestry 4.0
>source bundle
>
>Does this mean that it is actually possible to write tests for my
>tapestry page and component classes in an easy way supported by the
>framework? Does there exist som documentation on this?
>
>Inge
>
>On 2/2/06, Mat Gessel <ma...@gmail.com> wrote:
>  
>
>>I wouldn't expect test related files to be in the Tapestry deployment 
>>jars. They are only needed for the build.
>>
>>I did a source build using the supplied ant build file. The tests are 
>>run successfully, so they must be compiling. Ah, there they 
>>are...hiding in my user temp folder:
>>D:\Documents and Settings\<user name>\Local 
>>Settings\Temp\jakarta-tapestry\tapestry\target\test-classes
>>
>>Running the build is pretty easy if you are familiar with Ant. Just 
>>download and extraxt the Tapestry zip then follow the instructions on 
>>the Wiki:
>>http://wiki.apache.org/jakarta-tapestry/BuildingTapestry
>>
>>-= Mat
>>
>>On 2/1/06, Harvey, David <Da...@ingenix.com> wrote:
>>    
>>
>>>Hello all,
>>>I'm using Tapestry 4.0 and I have all the dependencies listed on the
>>>      
>>>
>
>  
>
>>>jakarta tapestry web site.  My tapestry 4.0 seems to work properly 
>>>with the new annotations, etc, which are very cool.
>>>
>>>I'm trying to base a component test on the BaseComponentTestCase
>>>      
>>>
>that is
>  
>
>>>in the source bundle under framework.   Unfortunately this is not
>>>shipped in any of the tapestry 4.0 or hivemind 1.1 jars.  Do I need 
>>>to compile these tests?  If so where is the HiveMindTestCase
>>>      
>>>
>documentation.
>  
>
>>>Also, is there any documentation on how to use the component testing
>>>      
>>>
>
>  
>
>>>framework that is new with Tapestry 4.0?  I'm fairly well-versed in 
>>>JUnit and it's many derivatives.
>>>
>>>Thanks,
>>>David Harvey
>>>
>>>
>>>
>>>"Secure Server" made the following
>>> annotations on 02/01/2006 02:05:43 PM 
>>>------------------------------"This e-mail, including attachments, 
>>>may
>>>      
>>>
>>include confidential and/or proprietary information, and may be used 
>>only by the person or entity to which it is addressed. If the reader 
>>of this e-mail is not the intended recipient or his or her authorized 
>>agent, the reader is hereby notified that any dissemination, 
>>distribution or copying of this e-mail is prohibited. If you have 
>>received this e-mail in error, please notify the sender by replying to
>>    
>>
>
>  
>
>>this message and delete this e-mail immediately."
>>    
>>
>>>==============================
>>>
>>>      
>>>
>>---------------------------------------------------------------------
>>To unsubscribe, e-mail: tapestry-user-unsubscribe@jakarta.apache.org
>>For additional commands, e-mail: tapestry-user-help@jakarta.apache.org
>>
>>
>>    
>>
>
>
>"Secure Server" made the following
> annotations on 02/02/2006 01:45:40 PM
>------------------------------"This e-mail, including attachments, may include confidential and/or proprietary information, and may be used only by the person or entity to which it is addressed. If the reader of this e-mail is not the intended recipient or his or her authorized agent, the reader is hereby notified that any dissemination, distribution or copying of this e-mail is prohibited. If you have received this e-mail in error, please notify the sender by replying to this message and delete this e-mail immediately."
>==============================
>
>---------------------------------------------------------------------
>To unsubscribe, e-mail: tapestry-user-unsubscribe@jakarta.apache.org
>For additional commands, e-mail: tapestry-user-help@jakarta.apache.org
>
>
>
>  
>

---------------------------------------------------------------------
To unsubscribe, e-mail: tapestry-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tapestry-user-help@jakarta.apache.org