Infact i did get it working with static declarations. But my question was how do we set our test methods or test cases to run in a single HTTP session. For example, i test my Logon page in my first method and then i have test methods for each of the requests i would like to do with my first page, like profile creation, modifications .., e.t.c,. As each of the test methods are running in different sessions i had to add my logon code in all the methods... which I am pretty sure is not the right way to write a web application test case. Do i have to set all the session variables as hidden HTML parameters? how does it work?
Thanks much, Sree -----Original Message----- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] Behalf Of Laurent Duperval Sent: Monday, June 28, 2004 10:41 AM To: [EMAIL PROTECTED] Cc: [EMAIL PROTECTED] Subject: Re: [Jwebunit-users] Running tests in single session Sreekant wrote: > I am fairly new to testing world. I am trying to run a set of test > methods. I wrote a test class(subclass of JWebUnitTest) that has these > methods and added it to my suite. But when I run the suite it ends up > running each of the test methods in individual sessions. I have a > random number generator in the class that is instantiated in the > setup() method and each test method when run is getting a different > number as opposed to my intentions of having one number for all the > test methods in the test case. Am I missing something??? Any help is > greatly appreciated. > > Thanks much, > > Sree > The setup method is run for every test. I you want your RNG to be initialised once only, make it a static variable and intialise it in your declaration. L ------------------------------------------------------- This SF.Net email sponsored by Black Hat Briefings & Training. Attend Black Hat Briefings & Training, Las Vegas July 24-29 - digital self defense, top technical experts, no vendor pitches, unmatched networking opportunities. Visit www.blackhat.com _______________________________________________ Jwebunit-users mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/jwebunit-users ------------------------------------------------------- This SF.Net email sponsored by Black Hat Briefings & Training. Attend Black Hat Briefings & Training, Las Vegas July 24-29 - digital self defense, top technical experts, no vendor pitches, unmatched networking opportunities. Visit www.blackhat.com _______________________________________________ Jwebunit-users mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/jwebunit-users
