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 <[EMAIL PROTECTED]> 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: [EMAIL PROTECTED] > > For additional commands, e-mail: [EMAIL PROTECTED] > > > > > > >