You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tapestry.apache.org by Asim Khaja <th...@gmail.com> on 2006/03/20 19:13:20 UTC
Cactus and Testing
Hello All,
What is the best way to unit test each Tapestry page? Is there a way to
easily integrate Jakarata Cactus in it?
Thx,
Asim
Re: Cactus and Testing
Posted by Mike Snare <mi...@gmail.com>.
You might want to take a look at HtmlUnit. It's a little bit higher
level than HttpUnit so if what you are trying to test is workflows and
other high level functionality, it may be worth a look.
HtmlUnit gives lets you work with the returned documents as DOM trees
(effectively) so you don't have to worry about the low level details
too much.
http://htmlunit.sourceforge.net/
-Mike
On 3/20/06, Asim Khaja <th...@gmail.com> wrote:
> Thank for the link Konstatine, I will difently look into it. It would inded
> be cool if I could do both functional and peformance testing with the same
> tool, whihc it appears Grinder does allow me to do. If you could please
> post the example of how to generate random values per invoation as well as
> using Regexp for resopnse analysis and testing I'd really appricate it.
>
> Thanks Again,
> Asim K.
>
> On 3/20/06, Konstantin Ignatyev <kg...@yahoo.com> wrote:
> >
> > HttpUnit is too low level. In fact Grinder drives httpunit via Jython
> > script.
> > See a very simplistic usage example here
> >
> > http://sandbox.sourcelabs.com/kosta/web_ui_compare/readme/tests/technology.html
> >
> > It does not use java Random to generate unique values per invocation and
> > does not employ REgexp for sophiticated response analysis and testing, but
> > that is really easy to do. I can post an example if you wish.
> > Asim Khaja <th...@gmail.com> wrote: Thanks Konstantin and Adam for
> > your help. I was indeed trying to do Unit
> > Testing, not performance testing so I'll check out HttpUnit.
> >
> > Thanks Again,
> > Asim
> >
> > On 3/20/06, Adam Zimowski wrote:
> > >
> > > Grinder is used for performance testing. He's not asking for that. He
> > > wants a tool similar to JUnit to test Tapestry pages.
> > >
> > > Try HttpUnit: http://httpunit.sourceforge.net/
> > >
> > > Adam
> > >
> > > On 3/20/06, Konstantin Ignatyev wrote:
> > > > TheGrinder3 is the best way to test IMO.
> > http://grinder.sourceforge.net/
> > > > Next would be Selenium. http://www.openqa.org/selenium/
> > > >
> > > >
> > > > Asim Khaja wrote: Hello All,
> > > >
> > > > What is the best way to unit test each Tapestry page? Is there a way
> > to
> > > > easily integrate Jakarata Cactus in it?
> > > >
> > > > Thx,
> > > > Asim
> > > >
> > > >
> > > >
> > > > Konstantin Ignatyev
> > > >
> > > >
> > > >
> > > >
> > > > PS: If this is a typical day on planet earth, humans will add fifteen
> > > million tons of carbon to the atmosphere, destroy 115 square miles of
> > > tropical rainforest, create seventy-two miles of desert, eliminate
> > between
> > > forty to one hundred species, erode seventy-one million tons of topsoil,
> > add
> > > 2,700 tons of CFCs to the stratosphere, and increase their population by
> > > 263,000
> > > >
> > > > Bowers, C.A. The Culture of Denial: Why the Environmental Movement
> > > Needs a Strategy for Reforming Universities and Public Schools. New
> > > York: State University of New York Press, 1997: (4) (5) (p.206)
> > > >
> > >
> > > ---------------------------------------------------------------------
> > > 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
Re: Cactus and Testing
Posted by Konstantin Ignatyev <kg...@yahoo.com>.
This is the snipped of the create/update/search/read test
#
# The Grinder version 3.0-beta27
#
# Script recorded by the TCPProxy at Sep 29, 2005 1:41:54 PM
#
from struts_sm_rcru_tests import *
from net.grinder.script.Grinder import grinder
from org.apache.regexp import RE
from java.util import Random
from java.lang import System
from java.lang import String
target = System.getProperty( "target.url" ) # -Dtarget.url=<some url>
.....
rand = Random().nextLong()
companyName = 'cert7' + String().valueOf(rand)
log("blah " + companyName)
System.out.println("BJORN: " + companyName)
tests[17].POST("%s/tiles/do/companyCRUD" % target,
( NVPair('company.name', companyName),
NVPair('company.notes', 'this is a cert7 test'),
NVPair('actionCMDsave', 'create'), ))
grinder.sleep(389)
grinder.sleep(14530)
r1 = tests[19].POST("%s/tiles/do/companiesList" % target,
( NVPair('nameCriteria', companyName),
NVPair('actionCMDsearch', 'submit'), ))
idRE = RE("CRUD\/read\?id=([^\"]+)\">")
if idRE.match(r1.text) == 1:
id = idRE.getParen(1)
log("found id: %s" % id)
grinder.sleep(2047)
tests[27].POST("%s/tiles/do/companyCRUD" % target,
( NVPair('id', id),
NVPair('actionCMDedit', 'edit'), ))
tests[30].POST("%s/tiles/do/companyCRUD" % target,
( NVPair('company.name', 'cert7'),
NVPair('company.notes', 'this is a cert7 test- updated'),
NVPair('actionCMDupdate', 'update'), ))
else:
log("id not found for " + companyName)
Asim Khaja <th...@gmail.com> wrote: Thank for the link Konstatine, I will difently look into it. It would inded
be cool if I could do both functional and peformance testing with the same
tool, whihc it appears Grinder does allow me to do. If you could please
post the example of how to generate random values per invoation as well as
using Regexp for resopnse analysis and testing I'd really appricate it.
Thanks Again,
Asim K.
On 3/20/06, Konstantin Ignatyev wrote:
>
> HttpUnit is too low level. In fact Grinder drives httpunit via Jython
> script.
> See a very simplistic usage example here
>
> http://sandbox.sourcelabs.com/kosta/web_ui_compare/readme/tests/technology.html
>
> It does not use java Random to generate unique values per invocation and
> does not employ REgexp for sophiticated response analysis and testing, but
> that is really easy to do. I can post an example if you wish.
> Asim Khaja wrote: Thanks Konstantin and Adam for
> your help. I was indeed trying to do Unit
> Testing, not performance testing so I'll check out HttpUnit.
>
> Thanks Again,
> Asim
>
> On 3/20/06, Adam Zimowski wrote:
> >
> > Grinder is used for performance testing. He's not asking for that. He
> > wants a tool similar to JUnit to test Tapestry pages.
> >
> > Try HttpUnit: http://httpunit.sourceforge.net/
> >
> > Adam
> >
> > On 3/20/06, Konstantin Ignatyev wrote:
> > > TheGrinder3 is the best way to test IMO.
> http://grinder.sourceforge.net/
> > > Next would be Selenium. http://www.openqa.org/selenium/
> > >
> > >
> > > Asim Khaja wrote: Hello All,
> > >
> > > What is the best way to unit test each Tapestry page? Is there a way
> to
> > > easily integrate Jakarata Cactus in it?
> > >
> > > Thx,
> > > Asim
> > >
> > >
> > >
> > > Konstantin Ignatyev
> > >
> > >
> > >
> > >
> > > PS: If this is a typical day on planet earth, humans will add fifteen
> > million tons of carbon to the atmosphere, destroy 115 square miles of
> > tropical rainforest, create seventy-two miles of desert, eliminate
> between
> > forty to one hundred species, erode seventy-one million tons of topsoil,
> add
> > 2,700 tons of CFCs to the stratosphere, and increase their population by
> > 263,000
> > >
> > > Bowers, C.A. The Culture of Denial: Why the Environmental Movement
> > Needs a Strategy for Reforming Universities and Public Schools. New
> > York: State University of New York Press, 1997: (4) (5) (p.206)
> > >
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: tapestry-user-unsubscribe@jakarta.apache.org
> > For additional commands, e-mail: tapestry-user-help@jakarta.apache.org
> >
> >
>
>
>
Re: Cactus and Testing
Posted by Asim Khaja <th...@gmail.com>.
Thank for the link Konstatine, I will difently look into it. It would inded
be cool if I could do both functional and peformance testing with the same
tool, whihc it appears Grinder does allow me to do. If you could please
post the example of how to generate random values per invoation as well as
using Regexp for resopnse analysis and testing I'd really appricate it.
Thanks Again,
Asim K.
On 3/20/06, Konstantin Ignatyev <kg...@yahoo.com> wrote:
>
> HttpUnit is too low level. In fact Grinder drives httpunit via Jython
> script.
> See a very simplistic usage example here
>
> http://sandbox.sourcelabs.com/kosta/web_ui_compare/readme/tests/technology.html
>
> It does not use java Random to generate unique values per invocation and
> does not employ REgexp for sophiticated response analysis and testing, but
> that is really easy to do. I can post an example if you wish.
> Asim Khaja <th...@gmail.com> wrote: Thanks Konstantin and Adam for
> your help. I was indeed trying to do Unit
> Testing, not performance testing so I'll check out HttpUnit.
>
> Thanks Again,
> Asim
>
> On 3/20/06, Adam Zimowski wrote:
> >
> > Grinder is used for performance testing. He's not asking for that. He
> > wants a tool similar to JUnit to test Tapestry pages.
> >
> > Try HttpUnit: http://httpunit.sourceforge.net/
> >
> > Adam
> >
> > On 3/20/06, Konstantin Ignatyev wrote:
> > > TheGrinder3 is the best way to test IMO.
> http://grinder.sourceforge.net/
> > > Next would be Selenium. http://www.openqa.org/selenium/
> > >
> > >
> > > Asim Khaja wrote: Hello All,
> > >
> > > What is the best way to unit test each Tapestry page? Is there a way
> to
> > > easily integrate Jakarata Cactus in it?
> > >
> > > Thx,
> > > Asim
> > >
> > >
> > >
> > > Konstantin Ignatyev
> > >
> > >
> > >
> > >
> > > PS: If this is a typical day on planet earth, humans will add fifteen
> > million tons of carbon to the atmosphere, destroy 115 square miles of
> > tropical rainforest, create seventy-two miles of desert, eliminate
> between
> > forty to one hundred species, erode seventy-one million tons of topsoil,
> add
> > 2,700 tons of CFCs to the stratosphere, and increase their population by
> > 263,000
> > >
> > > Bowers, C.A. The Culture of Denial: Why the Environmental Movement
> > Needs a Strategy for Reforming Universities and Public Schools. New
> > York: State University of New York Press, 1997: (4) (5) (p.206)
> > >
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: tapestry-user-unsubscribe@jakarta.apache.org
> > For additional commands, e-mail: tapestry-user-help@jakarta.apache.org
> >
> >
>
>
>
Re: Cactus and Testing
Posted by Konstantin Ignatyev <kg...@yahoo.com>.
HttpUnit is too low level. In fact Grinder drives httpunit via Jython script.
See a very simplistic usage example here
http://sandbox.sourcelabs.com/kosta/web_ui_compare/readme/tests/technology.html
It does not use java Random to generate unique values per invocation and does not employ REgexp for sophiticated response analysis and testing, but that is really easy to do. I can post an example if you wish.
Asim Khaja <th...@gmail.com> wrote: Thanks Konstantin and Adam for your help. I was indeed trying to do Unit
Testing, not performance testing so I'll check out HttpUnit.
Thanks Again,
Asim
On 3/20/06, Adam Zimowski wrote:
>
> Grinder is used for performance testing. He's not asking for that. He
> wants a tool similar to JUnit to test Tapestry pages.
>
> Try HttpUnit: http://httpunit.sourceforge.net/
>
> Adam
>
> On 3/20/06, Konstantin Ignatyev wrote:
> > TheGrinder3 is the best way to test IMO. http://grinder.sourceforge.net/
> > Next would be Selenium. http://www.openqa.org/selenium/
> >
> >
> > Asim Khaja wrote: Hello All,
> >
> > What is the best way to unit test each Tapestry page? Is there a way to
> > easily integrate Jakarata Cactus in it?
> >
> > Thx,
> > Asim
> >
> >
> >
> > Konstantin Ignatyev
> >
> >
> >
> >
> > PS: If this is a typical day on planet earth, humans will add fifteen
> million tons of carbon to the atmosphere, destroy 115 square miles of
> tropical rainforest, create seventy-two miles of desert, eliminate between
> forty to one hundred species, erode seventy-one million tons of topsoil, add
> 2,700 tons of CFCs to the stratosphere, and increase their population by
> 263,000
> >
> > Bowers, C.A. The Culture of Denial: Why the Environmental Movement
> Needs a Strategy for Reforming Universities and Public Schools. New
> York: State University of New York Press, 1997: (4) (5) (p.206)
> >
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: tapestry-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: tapestry-user-help@jakarta.apache.org
>
>
Re: Cactus and Testing
Posted by Asim Khaja <th...@gmail.com>.
Thanks Konstantin and Adam for your help. I was indeed trying to do Unit
Testing, not performance testing so I'll check out HttpUnit.
Thanks Again,
Asim
On 3/20/06, Adam Zimowski <zi...@gmail.com> wrote:
>
> Grinder is used for performance testing. He's not asking for that. He
> wants a tool similar to JUnit to test Tapestry pages.
>
> Try HttpUnit: http://httpunit.sourceforge.net/
>
> Adam
>
> On 3/20/06, Konstantin Ignatyev <kg...@yahoo.com> wrote:
> > TheGrinder3 is the best way to test IMO. http://grinder.sourceforge.net/
> > Next would be Selenium. http://www.openqa.org/selenium/
> >
> >
> > Asim Khaja <th...@gmail.com> wrote: Hello All,
> >
> > What is the best way to unit test each Tapestry page? Is there a way to
> > easily integrate Jakarata Cactus in it?
> >
> > Thx,
> > Asim
> >
> >
> >
> > Konstantin Ignatyev
> >
> >
> >
> >
> > PS: If this is a typical day on planet earth, humans will add fifteen
> million tons of carbon to the atmosphere, destroy 115 square miles of
> tropical rainforest, create seventy-two miles of desert, eliminate between
> forty to one hundred species, erode seventy-one million tons of topsoil, add
> 2,700 tons of CFCs to the stratosphere, and increase their population by
> 263,000
> >
> > Bowers, C.A. The Culture of Denial: Why the Environmental Movement
> Needs a Strategy for Reforming Universities and Public Schools. New
> York: State University of New York Press, 1997: (4) (5) (p.206)
> >
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: tapestry-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: tapestry-user-help@jakarta.apache.org
>
>
Re: Cactus and Testing
Posted by Konstantin Ignatyev <kg...@yahoo.com>.
Grinder is most useful for functional testing becuse testing script skeleton can be written automatically in seconds and then edited to incorporate any kind of checks and alterations with power of Java and Jython combined.
It is good for performance testing too.
Adam Zimowski <zi...@gmail.com> wrote: Grinder is used for performance testing. He's not asking for that. He
wants a tool similar to JUnit to test Tapestry pages.
Try HttpUnit: http://httpunit.sourceforge.net/
Adam
Re: Cactus and Testing
Posted by Adam Zimowski <zi...@gmail.com>.
Grinder is used for performance testing. He's not asking for that. He
wants a tool similar to JUnit to test Tapestry pages.
Try HttpUnit: http://httpunit.sourceforge.net/
Adam
On 3/20/06, Konstantin Ignatyev <kg...@yahoo.com> wrote:
> TheGrinder3 is the best way to test IMO. http://grinder.sourceforge.net/
> Next would be Selenium. http://www.openqa.org/selenium/
>
>
> Asim Khaja <th...@gmail.com> wrote: Hello All,
>
> What is the best way to unit test each Tapestry page? Is there a way to
> easily integrate Jakarata Cactus in it?
>
> Thx,
> Asim
>
>
>
> Konstantin Ignatyev
>
>
>
>
> PS: If this is a typical day on planet earth, humans will add fifteen million tons of carbon to the atmosphere, destroy 115 square miles of tropical rainforest, create seventy-two miles of desert, eliminate between forty to one hundred species, erode seventy-one million tons of topsoil, add 2,700 tons of CFCs to the stratosphere, and increase their population by 263,000
>
> Bowers, C.A. The Culture of Denial: Why the Environmental Movement Needs a Strategy for Reforming Universities and Public Schools. New York: State University of New York Press, 1997: (4) (5) (p.206)
>
---------------------------------------------------------------------
To unsubscribe, e-mail: tapestry-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tapestry-user-help@jakarta.apache.org
Re: Cactus and Testing
Posted by Konstantin Ignatyev <kg...@yahoo.com>.
TheGrinder3 is the best way to test IMO. http://grinder.sourceforge.net/
Next would be Selenium. http://www.openqa.org/selenium/
Asim Khaja <th...@gmail.com> wrote: Hello All,
What is the best way to unit test each Tapestry page? Is there a way to
easily integrate Jakarata Cactus in it?
Thx,
Asim
Konstantin Ignatyev
PS: If this is a typical day on planet earth, humans will add fifteen million tons of carbon to the atmosphere, destroy 115 square miles of tropical rainforest, create seventy-two miles of desert, eliminate between forty to one hundred species, erode seventy-one million tons of topsoil, add 2,700 tons of CFCs to the stratosphere, and increase their population by 263,000
Bowers, C.A. The Culture of Denial: Why the Environmental Movement Needs a Strategy for Reforming Universities and Public Schools. New York: State University of New York Press, 1997: (4) (5) (p.206)